grib-rs icon indicating copy to clipboard operation
grib-rs copied to clipboard

Lat/lon computation of grid points for CMC GDPS data fails

Open noritada opened this issue 1 year ago • 0 comments

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

noritada avatar Feb 11 '23 05:02 noritada