-
Notifications
You must be signed in to change notification settings - Fork 78
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
cfgrib generates NaNs when reading data #313
Comments
Hi @clessig , that URL does not work for me - could you check that it's correct? |
Hi Iain, Please try again: http://graphics.cs.uni-magdeburg.de/misc/reanalysis_geopotential_y1979_m01_pl850.grib Thanks, |
Hi Christian, Thanks, it worked this time! So, I had a suspicion about this one, checked the data using Metview, and yes - the data values contain the magic number 9999! Unfortunately this was being used as a missing value indicator (a really bad choice, but it comes from a decision made in another package many years ago). It's easily fixed, but I want to do it properly, and with tests. In the meantime, if you have your own copy of cfgrib, you can make the relevant change. It's on line 560 of dataset.py. Currently the line is:
Change it to:
Best regards, |
Hi Iain, Many thanks for looking into this so quickly. I can find a workaround now. Best, |
cfgrib generates NaNs while loading grib files, see code example below. We reproduced this on multiple machines (with slightly different configurations) and verified with grib_get_data and the old python interface that the file is free of NaNs. For your convenience, the grib of the example can be found here: http://graphics.cs.uni-magdeburg.de/misc/reanalysis_geopotential_y1979_m01_pl850.grib. However, we were able to reproduce the problem with various files (although there seems to be a correlation with the large values of geopotential compared to, e.g., vorticity).
The text was updated successfully, but these errors were encountered: