diff --git a/src/grib_geography.cc b/src/grib_geography.cc index b385ceb10..0493f8549 100644 --- a/src/grib_geography.cc +++ b/src/grib_geography.cc @@ -4003,6 +4003,8 @@ static int ecc_grib_get_gaussian_latitudes(long trunc, double* lats) int grib_get_gaussian_latitudes(long trunc, double* lats) { + if (trunc == 0) + return GRIB_GEOCALCULUS_PROBLEM; if (trunc == 1280) return get_precomputed_latitudes_N1280(lats); if (trunc == 640) diff --git a/src/grib_iterator_class_gaussian.cc b/src/grib_iterator_class_gaussian.cc index 7042b6233..20807be96 100644 --- a/src/grib_iterator_class_gaussian.cc +++ b/src/grib_iterator_class_gaussian.cc @@ -129,7 +129,7 @@ static int init(grib_iterator* i, grib_handle* h, grib_arguments* args) ret = grib_get_gaussian_latitudes(trunc, lats); if (ret != GRIB_SUCCESS) { - grib_context_log(h->context, GRIB_LOG_ERROR, "error %d calculating gaussian points", ret); + grib_context_log(h->context, GRIB_LOG_ERROR, "Error calculating gaussian points: %s", grib_get_error_message(ret)); return ret; } /*