grib-rs
grib-rs copied to clipboard
Lat/lon computation of grid points for CMC GDPS data fails
Simple Description on the Bug
Lat/lon computation of grid points fails for testdata/CMC_glb_TMP_ISBL_1_latlon.24x.24_2021051800_P000.grib2
.
It is because longitude range [180000000, 179760000] has a final value smaller than the initial value, although it is expected to increase from the scanning mode 0b01000000
.
Steps to Reproduce
Test code using a grid definition extracted from that data is like this:
#[test]
fn cmc_gdps_lat_lon_grid() {
let grid = LatLonGridDefinition::new(
1500,
751,
-90000000,
180000000,
90000000,
179760000,
ScanningMode(0b01000000),
);
assert!(grid.latlons().is_ok())
}
Expected Behavior
Test passes.
Actual Behavior
Test fails.
Additional Context
No response