diff --git a/src/grib_iterator_class_polar_stereographic.cc b/src/grib_iterator_class_polar_stereographic.cc index b9c0314a3..1f0c59d69 100644 --- a/src/grib_iterator_class_polar_stereographic.cc +++ b/src/grib_iterator_class_polar_stereographic.cc @@ -123,7 +123,8 @@ static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args) double *lats, *lons; /* arrays for latitudes and longitudes */ double lonFirstInDegrees, latFirstInDegrees, radius; double x, y, Dx, Dy; - long nx, ny, centralLongitudeInDegrees, centralLatitudeInDegrees; + long nx, ny; + double centralLongitudeInDegrees, centralLatitudeInDegrees; long alternativeRowScanning, iScansNegatively, i, j; long jScansPositively, jPointsAreConsecutive, southPoleOnPlane; double centralLongitude, centralLatitude; /* in radians */ @@ -173,9 +174,9 @@ static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args) return ret; if ((ret = grib_get_long_internal(h, s_southPoleOnPlane, &southPoleOnPlane)) != GRIB_SUCCESS) return ret; - if ((ret = grib_get_long_internal(h, s_centralLongitude, ¢ralLongitudeInDegrees)) != GRIB_SUCCESS) + if ((ret = grib_get_double_internal(h, s_centralLongitude, ¢ralLongitudeInDegrees)) != GRIB_SUCCESS) return ret; - if ((ret = grib_get_long_internal(h, s_centralLatitude, ¢ralLatitudeInDegrees)) != GRIB_SUCCESS) + if ((ret = grib_get_double_internal(h, s_centralLatitude, ¢ralLatitudeInDegrees)) != GRIB_SUCCESS) return ret; if ((ret = grib_get_double_internal(h, s_Dx, &Dx)) != GRIB_SUCCESS) return ret;