From 5179c8685b26c35ca5c3dfaa427b008640f20fc4 Mon Sep 17 00:00:00 2001 From: Uwe Schulzweida <uwe.schulzweida@mpimet.mpg.de> Date: Fri, 21 Jun 2024 09:29:21 +0200 Subject: [PATCH] gribapiGetEnsembleInfo: don't check perturbationNumber (bug fix) --- ChangeLog | 4 ++++ src/cdf_write.c | 3 ++- src/stream_gribapi.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4e33abaa3..73b5180b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,10 @@ * using EXSE library version 2.0.0 * Version 2.4.2 released +2024-06-21 Uwe Schulzweida + + * gribapiGetEnsembleInfo: don't check perturbationNumber (bug fix) + 2024-06-20 Uwe Schulzweida * NetCDF4: switched off output chunk cache diff --git a/src/cdf_write.c b/src/cdf_write.c index fbb32cefd..7eb196630 100644 --- a/src/cdf_write.c +++ b/src/cdf_write.c @@ -38,7 +38,8 @@ cdf_def_var_filter(int ncid, int ncvarID, const char *filterSpec) for (size_t i = 0; i < nfilters; i++) { unsigned int filterid = filters[i]->filterid; - // printf("filter %zu id:%d nparams:%zu param1 %d\n", i + 1, filterid, filters[i]->nparams, filters[i]->params[0]); + // printf("filter %zu id:%d nparams:%zu param1 %d %d\n", i + 1, filterid, filters[i]->nparams, filters[i]->params[0], + // filters[i]->params[1]); status = nc_def_var_filter(ncid, ncvarID, filterid, filters[i]->nparams, filters[i]->params); if (status != NC_NOERR) { diff --git a/src/stream_gribapi.c b/src/stream_gribapi.c index d7b18f3fe..cd3247252 100644 --- a/src/stream_gribapi.c +++ b/src/stream_gribapi.c @@ -435,7 +435,7 @@ gribapiGetEnsembleInfo(grib_handle *gh, long *numberOfForecastsInEnsemble, long if (grib_get_long(gh, "numberOfForecastsInEnsemble", numberOfForecastsInEnsemble) == 0) { if (*numberOfForecastsInEnsemble > 0) status = 1; - GRIB_CHECK(grib_get_long(gh, "perturbationNumber", perturbationNumber), 0); + grib_get_long(gh, "perturbationNumber", perturbationNumber); grib_get_long(gh, "typeOfEnsembleForecast", typeOfEnsembleForecast); } -- GitLab