Using Hysplit tools with older cdump files

General questions and postings pertaining to the use of HYSPLIT regardless of the platform. For platform specific questions, use the HYSPLIT Platform forums.
sarahw4
Posts: 8
Joined: April 24th, 2017, 3:27 pm
Registered HYSPLIT User: No

Re: Using Hysplit tools with older cdump files

Post by sarahw4 »

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?
ariel.stein
Posts: 660
Joined: November 7th, 2012, 3:14 pm
Registered HYSPLIT User: Yes

Re: Using Hysplit tools with older cdump files

Post by ariel.stein »

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.
sarahw4
Posts: 8
Joined: April 24th, 2017, 3:27 pm
Registered HYSPLIT User: No

Re: Using Hysplit tools with older cdump files

Post by sarahw4 »

I'll try conread as you suggested to see if any other files make sense.

Thank you for your help with this!
yaqiang
Posts: 59
Joined: October 5th, 2015, 10:20 pm
Registered HYSPLIT User: Yes

Re: Using Hysplit tools with older cdump files

Post by yaqiang »

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:

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')
The result plot:
hy_conc_little_endian.png
ariel.stein
Posts: 660
Joined: November 7th, 2012, 3:14 pm
Registered HYSPLIT User: Yes

Re: Using Hysplit tools with older cdump files

Post by ariel.stein »

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.
sarahw4
Posts: 8
Joined: April 24th, 2017, 3:27 pm
Registered HYSPLIT User: No

Re: Using Hysplit tools with older cdump files

Post by sarahw4 »

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!
Post Reply

Return to “Users”