Comments (4)
Thanks for this.
Unfortunately, we are just about to release a "v0.17" ...
... and I don't think we have time to investigate/fix this just yet so it won't make it in 😞
Hope that will be ok. We can always do a another release soon (it isn't hard).
Meanwhile...
this is a bug in gribapi, but that seems to have been end-of-lifed a while ago
Actually iris-grib is using ecCodes + that is what we test against here (CI).
They retained the name 'gribapi' as an optional alias for the package, and we are still using that.
(perhaps we should not).
from iris-grib.
Thanks for clarifying about the ecCodes, I'm new to grib and it's been kind of confusing. Updating the package name at some point would probably help people desperately googling for answers in the future.
From our perspective, having this data missing is acceptable––in most cases the variable being absent would mean the same thing as the zero array, I think, and the commonly-used variables aren't affected. So we don't need an urgent fix, although I do wonder whether this was the real problem behind some of the issues reported in the past that gave the "'codedValues' not defined in section 7" error message where the bug reporter just kind of wandered off mumbling that maybe the data was corrupt.
from iris-grib.
Are there any plans to address this in an upcoming release? We are seeing this issue in a number of files containing all-zero messages.
from iris-grib.
Hi -
This issue is biting us as well. Am attaching a sample GRIB2 message that can be read "correctly" by ecCodes (and wgrib2, FWIW) to return an ndarray of correct size and populated with all zeros as expected. From what we've seen (and haven't confirmed) is that NCEP's g2clib has an optimization for constant fields to leave the values section (7) empty.
Here's a simple example program to confirm the behavior:
import eccodes as ec
filename = "/tmp/empty_section7.grib2"
with open(filename, "rb") as fp:
msg = ec.codes_grib_new_from_file(fp)
ny = ec.codes_get(msg, 'Nj')
nx = ec.codes_get(msg, 'Ni')
data = ec.codes_get_values(msg).reshape((ny, nx))
ec.codes_release(msg)
print(type(data))
print(data.shape)
print(data.min(), data.max())
This yields:
<class 'numpy.ndarray'> (721, 1440) 0.0 0.0
Here's a data file (zipped for upload) that demonstrates one of the messages in question.
empty_section7.zip
from iris-grib.
Related Issues (20)
- iris-grib pyproject.toml
- iris-grib pre-commit-config HOT 1
- iris-grib dependabot
- iris-grib codespell HOT 1
- iris-grib prettier HOT 1
- iris-grib repo review GHA with exclusions HOT 1
- iris-grib sprint consider using more reusable workflows HOT 1
- iris-grib test coverage and test folder HOT 1
- iris-grib pytest tests HOT 2
- Direct users to "iris.load" rather than "iris_grib.load_cubes" HOT 2
- Stop using nose HOT 1
- Linkchecks for new GHA tests HOT 1
- Adopt automatic versioning
- Shift all the package code from `iris_grib` to `src/iris_grib`. HOT 1
- Add pytest-mock to deps
- Remove _iris_mercator_support.py
- add zenodo badge
- add contributor covenant code of conduct
- (after sprint) Review all the excluded rules + checks
- iris min pin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iris-grib.