From f22c70dfa491bf97a2883fd988e9ad46a6937021 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Wed, 7 Oct 2020 17:42:28 +0100 Subject: [PATCH] ECC-1154: grib_get_data: File with missing jDirectionIncrement and lat1 < lat2 --- src/grib_iterator_class_latlon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/grib_iterator_class_latlon.c b/src/grib_iterator_class_latlon.c index 59f883376..fc8ab47ed 100644 --- a/src/grib_iterator_class_latlon.c +++ b/src/grib_iterator_class_latlon.c @@ -186,7 +186,7 @@ static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args) jdir = (lat1 - lat2) / (Nj - 1); } else { - jdir = (lat1 + 360.0 - lat2) / (Nj - 1); + jdir = (lat2 - lat1) / (Nj - 1); } grib_context_log(h->context, GRIB_LOG_INFO, "%s is missing (See jDirectionIncrementGiven). Using value of %.6f obtained from La1, La2 and Nj", s_jdir, jdir);