ECC-726: grib_get -l reports wrong values with reduced_ll grid

This commit is contained in:
Shahram Najm 2022-12-05 13:15:46 +00:00
parent 312eb5935a
commit d0b4506010
1 changed files with 2 additions and 1 deletions

View File

@ -125,7 +125,8 @@ static int find(grib_nearest* nearest, grib_handle* h,
grib_get_double(h, "latitudeFirstInDegrees", &lat1) == GRIB_SUCCESS &&
grib_get_double(h, "latitudeLastInDegrees", &lat2) == GRIB_SUCCESS)
{
if (fabs(lat1) != 90 || fabs(lat2) != 90 || lon1 != 0 || lon2 < 359) {
const double difflat = fabs(lat1-lat2);
if (difflat < 180 || lon1 != 0 || lon2 < 359) {
is_global = 0; /* subarea */
}
}