From 8e4e6456c96ddf6e64817d3ffe3c9bead4b2b9e4 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 1 Oct 2013 10:19:35 +0100 Subject: [PATCH] grib to netcdf: should not handle fields for different levtypes --- tests/grib_to_netcdf.sh | 2 +- tools/grib_to_netcdf.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/grib_to_netcdf.sh b/tests/grib_to_netcdf.sh index 329f60bd8..82f86bc2d 100755 --- a/tests/grib_to_netcdf.sh +++ b/tests/grib_to_netcdf.sh @@ -34,7 +34,7 @@ if [ $skip_test -eq 1 ]; then fi echo "NetCDF was enabled." -grib_files="tigge_pf_ecmwf.grib2 \ +grib_files="\ set.grib2 set.grib1 \ regular_latlon_surface.grib2 \ regular_latlon_surface.grib1 \ diff --git a/tools/grib_to_netcdf.c b/tools/grib_to_netcdf.c index 1b9538057..4f3601305 100644 --- a/tools/grib_to_netcdf.c +++ b/tools/grib_to_netcdf.c @@ -1577,7 +1577,7 @@ static void cube_indexes(const hypercube *h, request *r, int *indexes, int size) if(size < c) { - grib_context_log(ctx, GRIB_LOG_ERROR, "MARS internal error in cube_indexes. size=%d < axis=%d", size, c); + grib_context_log(ctx, GRIB_LOG_ERROR, "Internal error in cube_indexes. size=%d < axis=%d", size, c); } if(h->index_cache == 0 || h->index_cache_size != c) @@ -1610,7 +1610,6 @@ static void cube_indexes(const hypercube *h, request *r, int *indexes, int size) } indexes[i] = j; } - } /*********************************/ @@ -2785,7 +2784,7 @@ static int define_netcdf_dimensions(hypercube *h, fieldset *fs, int ncid, datase char *longname = (char *) lowaxis; n = count_values(cube, axis); - if(count_values(data_r,"LEVTYPE") > 1) + if(count_values(data_r,"levtype") > 1) { grib_context_log(ctx, GRIB_LOG_ERROR, "Cannot handle fields for different levtypes.\n"); grib_context_log(ctx, GRIB_LOG_ERROR, "Please split input data into different files. Exiting!\n");