From 44e2fa37c16c40caec8642f733b83d6120b6fee4 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Fri, 29 Nov 2013 15:50:22 +0000 Subject: [PATCH] GRIB-420 rename the environment variable --- tools/grib_to_netcdf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/grib_to_netcdf.c b/tools/grib_to_netcdf.c index 5b0fbecb2..81d629269 100644 --- a/tools/grib_to_netcdf.c +++ b/tools/grib_to_netcdf.c @@ -2009,6 +2009,7 @@ static void free_nc_options() static void get_nc_options(const request *user_r) { + const char *checkvalidtime_env = NULL; const char *validtime = get_value(user_r, "usevalidtime", 0); const char *refdate = get_value(user_r, "referencedate", 0); @@ -2023,7 +2024,9 @@ static void get_nc_options(const request *user_r) setup.title = title ? grib_context_strdup(ctx, (title)) : NULL; setup.history = history ? grib_context_strdup(ctx, (history)) : NULL; setup.unlimited = unlimited ? grib_context_strdup(ctx, ((unlimited))) : NULL; - setup.checkvalidtime = getenv("checkvalidtime") ? atol(getenv("checkvalidtime")) : 1; + + checkvalidtime_env = getenv("GRIB_TO_NETCDF_CHECKVALIDTIME"); + setup.checkvalidtime = checkvalidtime_env ? atol(checkvalidtime_env) : 1; setup.mars_description = empty_request("MARS"); }