Conversation
|
Note that in GRIB edition 1 there is only one boolean called ijDirectionIncrementGiven. In GRIB2 they fixed this and created two separate booleans Setting ijDirectionIncrementGiven=0 for GRIB2 sets both the above to 0 But I agree it is better to be explicit and set the keys individually in grib-util-set-spec |
|
Hi @sawom666, I also observed this behavior but @joobog pointed out to me that setting it to zero is ambiguous since it can have 3 meanings: |
b4fdb47 to
92105b3
Compare
92105b3 to
87e6906
Compare
|
Some GRIB samples in the repository appear invalid, as the new tests show. It looks like a minor issue and should be easy to fix, but the impact of changing them is difficult to predict. |
14bf67a to
f90d5b8
Compare
pmaciel
left a comment
There was a problem hiding this comment.
I only have that comment, to avoid edition-dependant logic
dffce3b to
ad7df94
Compare
… in healpix, regular_gg and rotated_gg
5fba6d9 to
18146f9
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #559 +/- ##
===========================================
- Coverage 88.14% 87.99% -0.15%
===========================================
Files 855 855
Lines 63643 63666 +23
Branches 11306 11315 +9
===========================================
- Hits 56095 56021 -74
- Misses 7548 7645 +97 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| // HEALPix (GRIB2, Grid definition template 3.150) does not encode Di/Dj at all, | ||
| // so both "increments given" bits must be zero. (There is no HEALPix in GRIB1) | ||
| if (edition_ == 2 && STR_EQUAL(gridType, "healpix")) { |
There was a problem hiding this comment.
No need to check the edition here; HEALPix doesn't exist in GRIB1
Also when GRIB3 comes along, it is very likely that it will also have HEALPix.
So just check the gridType string and not the edition
Setting:
SET_LONG_VALUE("ijDirectionIncrementGiven", 0);is not allowed since value 0 is ambiguous.In some cases Di is given, but not Dj. This should be reflected by the flags.