The cdump files I have come from a tar.gz file (a backup from an old computer) so I'm extracting them from there onto our remote server using tar commands, then to transfer them off I'm using scp.
So if the cdump files have got corrupted somehow, do you know if there's any way to salvage / reproduce them without having to re-run the model to get them?
Using Hysplit tools with older cdump files
-
- Posts: 660
- Joined: November 7th, 2012, 3:14 pm
- Registered HYSPLIT User: Yes
Re: Using Hysplit tools with older cdump files
I have tried using conread to see if only the CPACK variable was corrupted. However, it seems that all the data is corrupted since I get a latitude of 2.80E-45.
You can try using conread and see if your other files make any sense.
Sorry.
You can try using conread and see if your other files make any sense.
Sorry.
Re: Using Hysplit tools with older cdump files
I'll try conread as you suggested to see if any other files make sense.
Thank you for your help with this!
Thank you for your help with this!
Re: Using Hysplit tools with older cdump files
In fact, the data files are not corrupted but they were stored as little endian format. HYSPLIT concentration data normally should be big endian. I don't know if conread or concplot has option to read these little endian data. I just updated MeteoInfo/MeteoInfoLab software to solve this condition (MeteoInfo 1.4.2R8 version).
The example to read and plot normal HYSPLIT concentration data:
For little endian data, big_endian augument should be added as False in addfile_hyconc funciton:
The result plot:
The example to read and plot normal HYSPLIT concentration data:
Code: Select all
fn = 'D:/Temp/HYSPLIT/cdump'
f = addfile_hyconc(fn)
data = f['TEST'][0,0,:,:]
axesm()
lworld = shaperead('D:/Temp/Map/country1.shp')
geoshow(lworld)
layer = imshowm(data)
colorbar(layer)
For little endian data, big_endian augument should be added as False in addfile_hyconc funciton:
Code: Select all
fn = 'D:/Temp/HYSPLIT/cdump.t00z'
f = addfile_hyconc(fn, big_endian=False)
data = f['SO2'][25,0,:,:]
axesm()
lworld = shaperead('D:/Temp/Map/country1.shp')
geoshow(lworld, edgecolor='k')
levs = arange(0.2, 10, 0.2)
layer = imshowm(data, levs, cmap='WhBlGrYeRe')
colorbar(layer)
xlim(-161, -154)
ylim(17, 21)
title('HYSPLIT concentration data with little endian')
-
- Posts: 660
- Joined: November 7th, 2012, 3:14 pm
- Registered HYSPLIT User: Yes
Re: Using Hysplit tools with older cdump files
Thanks Yaqiang!! I haven't thought about this.
We only compile HYSPLIT and its peripheral programs using big endian. It is pretty unusual to find little endian formatted cdump files.
I guess an option to try would be to compile conread and concplot without the big endian flag in the Makefile.
We only compile HYSPLIT and its peripheral programs using big endian. It is pretty unusual to find little endian formatted cdump files.
I guess an option to try would be to compile conread and concplot without the big endian flag in the Makefile.
Re: Using Hysplit tools with older cdump files
I recompiled the Hysplit tools without the big endian flag and used them with the cdump files and everything is working! I'm not sure why the the older cdump files I have are little endian, so it's good to know.
So thank you Yaqiang, that thought hadn't even occurred to me! And thank you Ariel for saying to recompile without the big endian flag!
So thank you Yaqiang, that thought hadn't even occurred to me! And thank you Ariel for saying to recompile without the big endian flag!