Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
klarsonSITC opened this issue Feb 9, 2023 · 5 comments
Closed

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

klarsonSITC opened this issue Feb 9, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@klarsonSITC
Copy link

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
Copy link
Member

zmoon commented Feb 9, 2023

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.

@zmoon zmoon added the bug Something isn't working label Feb 14, 2023
@amcz
Copy link
Collaborator

amcz commented Feb 14, 2023

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
Copy link
Author

20230215_system

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

@zmoon
Copy link
Member

zmoon commented Feb 24, 2023

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

@bbakernoaa
Copy link
Member

@klarsonSITC Has this been resolved?

@zmoon zmoon closed this as completed Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants