noaa-oar-arl / monetio

The Model and ObservatioN Evaluation Tool I/O package
https://monetio.readthedocs.io
MIT License
16 stars 19 forks source link

pardump not reading READY HYSPLIT PARDUMP.#### files #99

Closed klarsonSITC closed 1 year ago

klarsonSITC commented 1 year ago

Hello, I'm attempting to use MONETIO to read the PARDUMP file generated by running HYSPLIT on the READY server. The "self.pardt" formatting in the MONETIO "pardump.open_dataset" function doesn't seem to be the same as the generated PARDUMP.#### (#### = job number) file. Here is what I'm doing:

Input: (minus path) `import monetio as mio import glob

folderpath = "path" partfiles=glob.glob(folderpath+"/PARDUMP") part = mio.pardump.open_dataset(partfiles[0],century=2000,verbose=1)`

Output: `Record Header [(28, 10020, 1, 22, 12, 24, 23, 0)] Date 2022-12-24 23:00:00 **** None Adding data [(28, 10020, 1, 22, 12, 24, 23, 0)] 2022-12-24 23:00:00 Record Header [(7, 0, 1, 1, 8907, 20, 4, 940279797)] Traceback (most recent call last):

File "\sitc2\Planning\USER\WATER\6_AIR_QUALITY\C_AQ_BKGD_RESEARCH\4_PROGRAMS\Python\Plot_Hysplit.py", line 21, in part = mio.pardump.open_dataset(partfiles[0],century=2000,verbose=1)

File "C:\Users\klarson\Anaconda3\lib\site-packages\monetio\models\pardump.py", line 36, in open_dataset pardf = pdump.read(drange=drange, century=century, verbose=verbose)

File "C:\Users\klarson\Anaconda3\lib\site-packages\monetio\models\pardump.py", line 191, in read pdate = datetime.datetime(

ValueError: month must be in 1..12`

Using the Debugger, I looked at the par_frame before the padding is dropped. There seems to be an offset as the pandas array fills "lon", "ht", and "su" with the latitude, longitude, and height values (see attached screen shot). I'm not sure if this is a general issue with all PARDUMP HYSPLIT files or if this is solely a PARDUMP generated-on-the-READY-server HYSPLIT file issue. I have the same dispersion back trajectory from READY file I was attempting to read attached as a zip file below.

par_frame

2022122500.zip

zmoon commented 1 year ago

Hi @klarsonSITC , thanks for this report. I know @amcz made some changes to HYSPLIT reading that we haven't released yet, but I don't think the pardump reader was touched.

amcz commented 1 year ago

I cannot reproduce your error using the PARDUMP.21498 file you provided. See screenshot. Can you provide more information on your system?

AMC_PARDUMP_TEST

klarsonSITC commented 1 year ago
20230215_system

Sorry for the delay, I have a windows system. Thank you for the help!

zmoon commented 1 year ago

@klarsonSITC this should now be fixed in our develop branch. And I will try to do a new conda-forge release soon.

bbakernoaa commented 1 year ago

@klarsonSITC Has this been resolved?