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

Some missing values not being converted to NaN in IGRA2 #213

Closed
danielmwatkins opened this issue Apr 5, 2018 · 4 comments
Closed

Some missing values not being converted to NaN in IGRA2 #213

danielmwatkins opened this issue Apr 5, 2018 · 4 comments

Comments

@danielmwatkins
Copy link
Contributor

Values flagged as missing or invalid in the raw IGRA2 files contain the value -9999 or -8888. On fields that have a decimal value (e.g. 1234 representing 123.4) instead of NaN we sometimes get -999.9.

@avatar101
Copy link

avatar101 commented Apr 11, 2018

@DanielWatkins
Hi, I'm also using IGRA datasets for my work and wrote a code to import it in a pandas data frame. I wish I knew the Siphon module before. Now, I would be happy to test siphon module but, I would like to see the background functions you wrote for reading the data in order to compare and improve my coding style. I wasn't able to find it here, being new to this platform. However, I did find your repo of climstat/igratools.py. Is it the same set of functions that have been implemented?

Cheers,
EDIT: Found the code.

@danielmwatkins
Copy link
Contributor Author

@avatar101 Glad you found the code! igratools is an old incomplete version of what's in Siphon. The version in Siphon is much simpler than the approach I was taking in igratools. For one thing, I learned about the existence of pandas.read_fwf() which was helpful and faster.

@avatar101
Copy link

I'm also using pd.read_fwf() but, your overall approach is much better. If you're interested in the approach I'm using, it is based on this https://stackoverflow.com/questions/48992164/reading-file-between-headers-in-python

It makes the code shorter but, I find it a bit complicated. I find your approach better and certainly, your function is much more versatile and powerful than what I could come up with. However, I still need some time to go through all the code you wrote.

@dopplershift
Copy link
Member

@DanielWatkins did your PR #219 fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants