diff --git a/definitions/boot.def b/definitions/boot.def index c798a8d96..f607cc8e2 100644 --- a/definitions/boot.def +++ b/definitions/boot.def @@ -15,7 +15,7 @@ constant defaultTypeOfLevel="unknown" : hidden; # GRIBEX special boustrophedonic mode. See GRIB-472 # If the environment variable is not defined, the key will be 0 -GRIBEX_boustrophedonic = getenv("GRIB_API_GRIBEX_BOUSTROPHEDONIC","0"); +GRIBEX_boustrophedonic = getenv("ECCODES_GRIBEX_BOUSTROPHEDONIC","0"); constant zero=0 : hidden; diff --git a/doxygen/conversion.dox b/doxygen/conversion.dox index 4534141c9..f7923952e 100644 --- a/doxygen/conversion.dox +++ b/doxygen/conversion.dox @@ -104,7 +104,7 @@ grib 1 messages encoded in non standard local ways. To separete the definition files contained in the installation directory from the definition files described in the previous section, in which the user can put some extra and local parameter definitions, -the environment variable GRIB_DEFINITION_PATH can be used. +the environment variable ECCODES_DEFINITION_PATH can be used. To set properly this environment variable we have first to find the definitions files directory used by GRIB API. @@ -118,10 +118,10 @@ information about the library. grib_api Version 1.8.0 Default definition files path is used: /usr/local/lib/grib_api/definitions -Definition files path can be changed setting GRIB_DEFINITION_PATH environment variable +Definition files path can be changed setting ECCODES_DEFINITION_PATH environment variable Default SAMPLES path is used: /usr/local/lib/metaps/lib/grib_api/samples -SAMPLES path can be changed setting GRIB_SAMPLES_PATH environment variable +SAMPLES path can be changed setting ECCODES_SAMPLES_PATH environment variable \endverbatim To enable the parameter defintions described in the files contained in our directory @@ -129,10 +129,10 @@ To enable the parameter defintions described in the files contained in our direc /home/u/grib_api/definitions \endcode -we have to set the environment variable GRIB_DEFINITION_PATH as +we have to set the environment variable ECCODES_DEFINITION_PATH as \verbatim -export GRIB_DEFINITION_PATH=/home/u/definitions:/usr/local/lib/grib_api/definitions +export ECCODES_DEFINITION_PATH=/home/u/definitions:/usr/local/lib/grib_api/definitions \endverbatim so that our definition of the parameters will be read by GRIB API during run time. diff --git a/doxygen/environment.dox b/doxygen/environment.dox index e7cf1ccca..31e101ab6 100644 --- a/doxygen/environment.dox +++ b/doxygen/environment.dox @@ -1,23 +1,22 @@ /*! \defgroup environment Environment variables -Environment variables applicable to grib_api: +Environment variables applicable to eccodes: -\b GRIB_API_DEBUG - If set to 1, it will enable debug level logging messages to be displayed by the library. +\b ECCODES_DEBUG - If set to 1, it will enable debug level logging messages to be displayed by the library. -\b GRIB_API_FAIL_IF_LOG_MESSAGE - If set to 1, it will cause the library to exit when an error or warning is encountered. +\b ECCODES_FAIL_IF_LOG_MESSAGE - If set to 1, it will cause the library to exit when an error or warning is encountered. -\b GRIB_API_IO_BUFFER_SIZE - Defines the size in bytes of the buffer used in the IO calls from Fortran and in the tools. +\b ECCODES_IO_BUFFER_SIZE - Defines the size in bytes of the buffer used in the IO calls from Fortran and in the tools. -\b GRIB_API_NO_ABORT - When set to 1 it causes grib_api not to abort execution on failing asserts. +\b ECCODES_NO_ABORT - When set to 1 it causes grib_api not to abort execution on failing asserts. \b GRIB_API_WRITE_ON_FAIL - When set to 1 it will write the last processed grib message in a file named $PID_$FILEID_error.grib on failure in a fortran function used without the return code argument. -\b GRIB_DEFINITION_PATH - Set to the folder containing the set of definition files you want grib_api to use instead of the default one. +\b ECCODES_DEFINITION_PATH - Set to the folder containing the set of definition files you want grib_api to use instead of the default one. -\b GRIB_GRIBEX_MODE_ON - When set to 1 it will enable the GRIBEX compatibility mode and grib_api will produce GRIB messages readable by GRIBEX. +\b ECCODES_GRIBEX_MODE_ON - When set to 1 it will enable the GRIBEX compatibility mode and grib_api will produce GRIB messages readable by GRIBEX. -\b GRIB_IEEE_PACKING - Accepted values 32 or 64 for 32 or 64 bits IEEE floating point respectively. The GRIB message produced will contain data written in IEEE floating point without packing. +\b ECCODES_GRIB_IEEE_PACKING - Accepted values 32 or 64 for 32 or 64 bits IEEE floating point respectively. The GRIB message produced will contain data written in IEEE floating point without packing. -\b GRIB_SAMPLES_PATH - Set to the folder containing the set of samples you want grib_api to use instead of the default one. +\b ECCODES_SAMPLES_PATH - Set to the folder containing the set of samples you want grib_api to use instead of the default one. -\b GRIB_TEMPLATES_PATH - Now obsolete. See GRIB_SAMPLES_PATH. */ diff --git a/examples/C/CMakeLists.txt b/examples/C/CMakeLists.txt index ca6e29841..d7744cc26 100644 --- a/examples/C/CMakeLists.txt +++ b/examples/C/CMakeLists.txt @@ -76,6 +76,6 @@ ecbuild_add_test( TARGET c_new_sample SOURCES new_sample.c LIBS grib_api ARGS "out.grib" - ENVIRONMENT "GRIB_SAMPLES_PATH=${PROJECT_SOURCE_DIR}/samples" "GRIB_DEFINITION_PATH=${PROJECT_SOURCE_DIR}/definitions" + ENVIRONMENT "ECCODES_SAMPLES_PATH=${PROJECT_SOURCE_DIR}/samples" "ECCODES_DEFINITION_PATH=${PROJECT_SOURCE_DIR}/definitions" ) diff --git a/examples/C/include.ctest.sh.in b/examples/C/include.ctest.sh.in index 93cb78c35..67664e379 100644 --- a/examples/C/include.ctest.sh.in +++ b/examples/C/include.ctest.sh.in @@ -5,12 +5,12 @@ proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data def_dir="${proj_dir}/definitions" -GRIB_DEFINITION_PATH="${def_dir}" -export GRIB_DEFINITION_PATH +ECCODES_DEFINITION_PATH="${def_dir}" +export ECCODES_DEFINITION_PATH tools_dir=@CMAKE_BINARY_DIR@/bin/ examples_dir=@CMAKE_CURRENT_BINARY_DIR@/ samp_dir="${proj_dir}/samples" -GRIB_SAMPLES_PATH=${samp_dir} -export GRIB_SAMPLES_PATH +ECCODES_SAMPLES_PATH=${samp_dir} +export ECCODES_SAMPLES_PATH diff --git a/examples/C/include.sh b/examples/C/include.sh index 43476b161..5b554fe13 100644 --- a/examples/C/include.sh +++ b/examples/C/include.sh @@ -22,10 +22,10 @@ else cd ../../ cpath=`pwd` proj_dir=$cpath - GRIB_DEFINITION_PATH=$cpath/definitions - export GRIB_DEFINITION_PATH - GRIB_SAMPLES_PATH=$cpath/samples - export GRIB_SAMPLES_PATH + ECCODES_DEFINITION_PATH=$cpath/definitions + export ECCODES_DEFINITION_PATH + ECCODES_SAMPLES_PATH=$cpath/samples + export ECCODES_SAMPLES_PATH tools_dir=$cpath/tools/ examples_dir=$cpath/examples/C/ data_dir=$cpath/data diff --git a/examples/C/set_data.c b/examples/C/set_data.c index 0aba19679..f4b1213e1 100644 --- a/examples/C/set_data.c +++ b/examples/C/set_data.c @@ -32,9 +32,9 @@ int main(int argc, char** argv) size_t values_len= 0; /* Note: the full name of the sample file is "regular_ll_pl_grib1.tmpl" */ - /* Sample files are stored in the samples directory (use codes_info to */ + /* Sample files are stored in the samples directory (use codes_info to */ /* see where that is). The default sample path can be changed by */ - /* setting the environment variable GRIB_SAMPLES_PATH */ + /* setting the environment variable ECCODES_SAMPLES_PATH */ const char* sample_filename = "regular_ll_pl_grib1"; /* Here is how you can get the samples path */ const char* samples_path = codes_samples_path(NULL); diff --git a/examples/F77/include.sh b/examples/F77/include.sh index e3e4e99c6..9ca18fd34 100644 --- a/examples/F77/include.sh +++ b/examples/F77/include.sh @@ -7,8 +7,8 @@ if [ -z "${data_dir}" ] then cd ../../ cpath=`pwd` - GRIB_DEFINITION_PATH=$cpath/definitions - export GRIB_DEFINITION_PATH + ECCODES_DEFINITION_PATH=$cpath/definitions + export ECCODES_DEFINITION_PATH GRIB_TEMPLATES_PATH=$cpath/templates export GRIB_TEMPLATES_PATH tools_dir=$cpath/tools/ diff --git a/examples/F90/include.ctest.sh.in b/examples/F90/include.ctest.sh.in index dcf474464..c2274affe 100644 --- a/examples/F90/include.ctest.sh.in +++ b/examples/F90/include.ctest.sh.in @@ -5,12 +5,12 @@ proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data def_dir="${proj_dir}/definitions" -GRIB_DEFINITION_PATH="${def_dir}" -export GRIB_DEFINITION_PATH +ECCODES_DEFINITION_PATH="${def_dir}" +export ECCODES_DEFINITION_PATH tools_dir=@CMAKE_BINARY_DIR@/bin/ examples_dir=@CMAKE_CURRENT_BINARY_DIR@/ samp_dir="${proj_dir}/samples" -GRIB_SAMPLES_PATH=${samp_dir} -export GRIB_SAMPLES_PATH +ECCODES_SAMPLES_PATH=${samp_dir} +export ECCODES_SAMPLES_PATH diff --git a/examples/F90/include.sh b/examples/F90/include.sh index df62a9ccb..8f6ed4e4a 100755 --- a/examples/F90/include.sh +++ b/examples/F90/include.sh @@ -21,10 +21,10 @@ else then cd ../../ cpath=`pwd` - GRIB_DEFINITION_PATH=$cpath/definitions - export GRIB_DEFINITION_PATH - GRIB_SAMPLES_PATH=$cpath/samples - export GRIB_SAMPLES_PATH + ECCODES_DEFINITION_PATH=$cpath/definitions + export ECCODES_DEFINITION_PATH + ECCODES_SAMPLES_PATH=$cpath/samples + export ECCODES_SAMPLES_PATH tools_dir=$cpath/tools/ examples_dir=$cpath/examples/F90/ data_dir=$cpath/data diff --git a/examples/F90/samples.f90 b/examples/F90/samples.f90 index 9db893652..ed7ea8e92 100644 --- a/examples/F90/samples.f90 +++ b/examples/F90/samples.f90 @@ -33,7 +33,7 @@ program sample ! A new grib message is loaded from an existing sample. ! Samples are searched in a default sample path (use codes_info ! to see where that is). The default sample path can be changed by - ! setting the environment variable GRIB_SAMPLES_PATH + ! setting the environment variable ECCODES_SAMPLES_PATH call codes_new_from_samples(igribsample, "regular_latlon_surface.grib1") call codes_open_file(outfile, 'out.grib1','w') diff --git a/examples/F90/samples.sh b/examples/F90/samples.sh index 76e2e2a39..19e7e5673 100755 --- a/examples/F90/samples.sh +++ b/examples/F90/samples.sh @@ -13,14 +13,14 @@ rm -f ${data_dir}/regular_latlon_surface.grib1.tmpl | true cp ${data_dir}/regular_latlon_surface.grib1 ${data_dir}/regular_latlon_surface.grib1.tmpl -# Change the GRIB_SAMPLES_PATH: put the data dir first -GRIB_SAMPLES_PATH=${data_dir}:${samples_dir} -export GRIB_SAMPLES_PATH +# Change the ECCODES_SAMPLES_PATH: put the data dir first +ECCODES_SAMPLES_PATH=${data_dir}:${samples_dir} +export ECCODES_SAMPLES_PATH ${examples_dir}f_samples > /dev/null -# Extend the GRIB_SAMPLES_PATH: put the data dir second -GRIB_SAMPLES_PATH=${samples_dir}:${data_dir} -export GRIB_SAMPLES_PATH +# Extend the ECCODES_SAMPLES_PATH: put the data dir second +ECCODES_SAMPLES_PATH=${samples_dir}:${data_dir} +export ECCODES_SAMPLES_PATH ${examples_dir}f_samples > /dev/null rm -f out.grib1 diff --git a/examples/extra/include.sh b/examples/extra/include.sh index 3b4272a73..9fbd2b7dd 100755 --- a/examples/extra/include.sh +++ b/examples/extra/include.sh @@ -7,10 +7,10 @@ if [ -z "${data_dir}" ] then cd ../../ cpath=`pwd` - GRIB_DEFINITION_PATH=$cpath/definitions - export GRIB_DEFINITION_PATH - GRIB_SAMPLES_PATH=$cpath/samples - export GRIB_SAMPLES_PATH + ECCODES_DEFINITION_PATH=$cpath/definitions + export ECCODES_DEFINITION_PATH + ECCODES_SAMPLES_PATH=$cpath/samples + export ECCODES_SAMPLES_PATH tools_dir=$cpath/tools/ examples_dir=$cpath/examples/extra/ data_dir=$cpath/data diff --git a/examples/include.sh b/examples/include.sh index d19998d5b..a09781a50 100644 --- a/examples/include.sh +++ b/examples/include.sh @@ -7,8 +7,8 @@ if [ -z "${data_dir}" ] then cd ../ cpath=`pwd` - GRIB_DEFINITION_PATH=$cpath/definitions - export GRIB_DEFINITION_PATH + ECCODES_DEFINITION_PATH=$cpath/definitions + export ECCODES_DEFINITION_PATH GRIB_TEMPLATES_PATH=$cpath/templates export GRIB_TEMPLATES_PATH tools_dir=$cpath/tools/ diff --git a/examples/python/include.ctest.sh.in b/examples/python/include.ctest.sh.in index 5425ac612..4ab82a383 100644 --- a/examples/python/include.ctest.sh.in +++ b/examples/python/include.ctest.sh.in @@ -5,15 +5,15 @@ proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data def_dir="${proj_dir}/definitions" -GRIB_DEFINITION_PATH="${def_dir}" -export GRIB_DEFINITION_PATH +ECCODES_DEFINITION_PATH="${def_dir}" +export ECCODES_DEFINITION_PATH tools_dir=@CMAKE_BINARY_DIR@/bin/ examples_dir=@CMAKE_CURRENT_BINARY_DIR@/ samp_dir="${proj_dir}/samples" -GRIB_SAMPLES_PATH=${samp_dir} -export GRIB_SAMPLES_PATH +ECCODES_SAMPLES_PATH=${samp_dir} +export ECCODES_SAMPLES_PATH PYTHONPATH=$proj_dir/python:@PROJECT_BINARY_DIR@/python:$PYTHONPATH export PYTHONPATH diff --git a/examples/python/include.sh b/examples/python/include.sh index 3485d9af7..c6263298e 100644 --- a/examples/python/include.sh +++ b/examples/python/include.sh @@ -9,10 +9,10 @@ else echo "TEST: $0" cpath=$TOPBUILDDIR - GRIB_DEFINITION_PATH=$cpath/definitions - export GRIB_DEFINITION_PATH - GRIB_SAMPLES_PATH=$cpath/samples - export GRIB_SAMPLES_PATH + ECCODES_DEFINITION_PATH=$cpath/definitions + export ECCODES_DEFINITION_PATH + ECCODES_SAMPLES_PATH=$cpath/samples + export ECCODES_SAMPLES_PATH tools_dir=$cpath/tools/ examples_dir=$cpath/examples/python data_dir=$cpath/data diff --git a/examples/python/iterator.sh b/examples/python/iterator.sh index e35acc5a5..8f3e56137 100755 --- a/examples/python/iterator.sh +++ b/examples/python/iterator.sh @@ -12,7 +12,7 @@ diff $TEMP1 $TEMP2 # Polar stereographic -FILE="${GRIB_SAMPLES_PATH}/polar_stereographic_pl_grib2.tmpl" +FILE="${ECCODES_SAMPLES_PATH}/polar_stereographic_pl_grib2.tmpl" $PYTHON iterator.py $FILE 2> $TEMP1 > $TEMP1 ./p_iterator $FILE 2> $TEMP2 > $TEMP2 diff $TEMP1 $TEMP2 diff --git a/fortran/grib_f90_tail.f90 b/fortran/grib_f90_tail.f90 index e2f41004a..6fff9ae09 100644 --- a/fortran/grib_f90_tail.f90 +++ b/fortran/grib_f90_tail.f90 @@ -1359,7 +1359,7 @@ end subroutine grib_new_from_message_int4 !> Create a new valid gribid from a sample contained in a samples directory pointed - !> by the environment variable GRIB_SAMPLES_PATH. + !> by the environment variable ECCODES_SAMPLES_PATH. !> To know where the samples directory is run the codes_info tool.\n !> !> In case of error, if the status parameter (optional) is not given, the program will diff --git a/mars_tests/include.sh b/mars_tests/include.sh index d646b369d..16601d3fb 100644 --- a/mars_tests/include.sh +++ b/mars_tests/include.sh @@ -20,10 +20,10 @@ if [ -z "${data_dir}" ] then cd ../ cpath=`pwd` - GRIB_DEFINITION_PATH=$cpath/definitions - export GRIB_DEFINITION_PATH - GRIB_SAMPLES_PATH=$cpath/samples - export GRIB_SAMPLES_PATH + ECCODES_DEFINITION_PATH=$cpath/definitions + export ECCODES_DEFINITION_PATH + ECCODES_SAMPLES_PATH=$cpath/samples + export ECCODES_SAMPLES_PATH tools_dir=$cpath/tools/ tigge_dir=$cpath/tigge/ data_dir=$cpath/data diff --git a/parameters/human_readable.pl b/parameters/human_readable.pl index 3eb5a8bc8..54751f08f 100755 --- a/parameters/human_readable.pl +++ b/parameters/human_readable.pl @@ -6,7 +6,7 @@ use strict; @ARGV = qw(master.info) unless(@ARGV); -my $path = $ENV{ GRIB_DEFINITION_PATH }; +my $path = $ENV{ ECCODES_DEFINITION_PATH }; $path = "../definitions" unless( $path ); $path = $path . "/grib2"; diff --git a/python/gribapi.py b/python/gribapi.py index 3283e7afb..76da3fd7e 100644 --- a/python/gribapi.py +++ b/python/gribapi.py @@ -682,7 +682,7 @@ def grib_new_from_samples(samplename): @brief Create a new valid gribid from a sample. The available samples are picked up from the directory pointed to - by the environment variable GRIB_SAMPLES_PATH. + by the environment variable ECCODES_SAMPLES_PATH. To know where the samples directory is run the codes_info tool.\n \b Examples: \ref samples.py "samples.py" diff --git a/src/grib_accessor_class_data_jpeg2000_packing.c b/src/grib_accessor_class_data_jpeg2000_packing.c index fa230117f..3bc81d999 100644 --- a/src/grib_accessor_class_data_jpeg2000_packing.c +++ b/src/grib_accessor_class_data_jpeg2000_packing.c @@ -189,7 +189,7 @@ static void init(grib_accessor* a,const long v, grib_arguments* args) self->jpeg_lib=OPENJPEG_LIB; #endif - if ((user_lib=getenv("GRIB_JPEG"))!=NULL ) { + if ((user_lib=getenv("ECCODES_GRIB_JPEG"))!=NULL ) { if (!strcmp(user_lib,"jasper")) { self->jpeg_lib=JASPER_LIB; } else if (!strcmp(user_lib,"openjpeg")) { @@ -197,7 +197,7 @@ static void init(grib_accessor* a,const long v, grib_arguments* args) } } - self->dump_jpg = getenv("GRIB_DUMP_JPG_FILE"); + self->dump_jpg = getenv("ECCODES_GRIB_DUMP_JPG_FILE"); if(first) { if(self->dump_jpg) diff --git a/src/grib_context.c b/src/grib_context.c index 63f7d6bb9..0eac91a3c 100644 --- a/src/grib_context.c +++ b/src/grib_context.c @@ -188,9 +188,9 @@ static void default_log(const grib_context* c, int level, const char* mess) if(level == GRIB_LOG_FATAL) { Assert(0);} - if(getenv("GRIB_API_FAIL_IF_LOG_MESSAGE")) + if(getenv("ECCODES_FAIL_IF_LOG_MESSAGE")) { - long n = atol(getenv("GRIB_API_FAIL_IF_LOG_MESSAGE")); + long n = atol(getenv("ECCODES_FAIL_IF_LOG_MESSAGE")); if(n >= 1 && level == GRIB_LOG_ERROR) Assert(0); if(n >= 2 && level == GRIB_LOG_WARNING) Assert(0); } @@ -339,18 +339,18 @@ grib_context* grib_context_get_default() GRIB_MUTEX_LOCK(&mutex_c); - write_on_fail = getenv("GRIB_API_WRITE_ON_FAIL"); - large_constant_fields = getenv("GRIB_API_LARGE_CONSTANT_FIELDS"); - no_abort = getenv("GRIB_API_NO_ABORT"); - debug = getenv("GRIB_API_DEBUG"); - gribex=getenv("GRIB_GRIBEX_MODE_ON"); - ieee_packing=getenv("GRIB_IEEE_PACKING"); - io_buffer_size=getenv("GRIB_API_IO_BUFFER_SIZE"); - log_stream=getenv("GRIB_API_LOG_STREAM"); - no_big_group_split=getenv("GRIB_API_NO_BIG_GROUP_SPLIT"); - no_spd=getenv("GRIB_API_NO_SPD"); - keep_matrix=getenv("GRIB_API_KEEP_MATRIX"); - nounpack=getenv("GRIB_API_NO_UNPACK"); + write_on_fail = getenv("ECCODES_GRIB_WRITE_ON_FAIL"); + large_constant_fields = getenv("ECCODES_GRIB_LARGE_CONSTANT_FIELDS"); + no_abort = getenv("ECCODES_NO_ABORT"); + debug = getenv("ECCODES_DEBUG"); + gribex=getenv("ECCODES_GRIBEX_MODE_ON"); + ieee_packing=getenv("ECCODES_GRIB_IEEE_PACKING"); + io_buffer_size=getenv("ECCODES_IO_BUFFER_SIZE"); + log_stream=getenv("ECCODES_LOG_STREAM"); + no_big_group_split=getenv("ECCODES_GRIB_NO_BIG_GROUP_SPLIT"); + no_spd=getenv("ECCODES_GRIB_NO_SPD"); + keep_matrix=getenv("ECCODES_GRIB_KEEP_MATRIX"); + nounpack=getenv("ECCODES_NO_UNPACK"); /* On UNIX, when we read from a file we get exactly what is in the file on disk. * But on Windows a file can be opened in binary or text mode. In binary mode the system behaves exactly as in UNIX. @@ -371,7 +371,7 @@ grib_context* grib_context_get_default() default_grib_context.gribex_mode_on=gribex ? atoi(gribex) : 0; default_grib_context.large_constant_fields = large_constant_fields ? atoi(large_constant_fields) : 0; default_grib_context.ieee_packing=ieee_packing ? atoi(ieee_packing) : 0; - default_grib_context.grib_samples_path = getenv("GRIB_SAMPLES_PATH"); + default_grib_context.grib_samples_path = getenv("ECCODES_SAMPLES_PATH"); default_grib_context.log_stream=stderr; if (!log_stream) { default_grib_context.log_stream=stderr; @@ -382,13 +382,13 @@ grib_context* grib_context_get_default() } if (!default_grib_context.grib_samples_path) - default_grib_context.grib_samples_path = getenv("GRIB_TEMPLATES_PATH"); + default_grib_context.grib_samples_path = getenv("ECCODES_TEMPLATES_PATH"); #ifdef GRIB_TEMPLATES_PATH if(!default_grib_context.grib_samples_path) default_grib_context.grib_samples_path = GRIB_TEMPLATES_PATH ; #endif - default_grib_context.grib_definition_files_path = getenv("GRIB_DEFINITION_PATH"); + default_grib_context.grib_definition_files_path = getenv("ECCODES_DEFINITION_PATH"); #ifdef GRIB_DEFINITION_PATH if(!default_grib_context.grib_definition_files_path) { default_grib_context.grib_definition_files_path = GRIB_DEFINITION_PATH ; @@ -469,7 +469,7 @@ grib_context* grib_context_new(grib_context* parent) return c; } -/* Hopefully big enough. Note: GRIB_DEFINITION_PATH can contain SEVERAL colon-separated sub-paths */ +/* Hopefully big enough. Note: ECCODES_DEFINITION_PATH can contain SEVERAL colon-separated sub-paths */ #define DEF_PATH_MAXLEN 8192 /* GRIB-235: Resolve path to expand symbolic links etc */ diff --git a/src/grib_loader_from_handle.c b/src/grib_loader_from_handle.c index 57740a86c..755b858db 100644 --- a/src/grib_loader_from_handle.c +++ b/src/grib_loader_from_handle.c @@ -142,7 +142,7 @@ int grib_init_accessor_from_handle(grib_loader* loader,grib_accessor* ga,grib_ar if(first) { - missing = getenv("GRIB_PRINT_MISSING"); + missing = getenv("ECCODES_PRINT_MISSING"); first = 0; } diff --git a/tests/bufr_read_header.sh b/tests/bufr_read_header.sh index db4eaca6f..55dccce0a 100755 --- a/tests/bufr_read_header.sh +++ b/tests/bufr_read_header.sh @@ -10,7 +10,7 @@ . ./include.sh -set -x +# set -x #Enter data dir cd ${data_dir}/bufr diff --git a/tests/calendar.sh b/tests/calendar.sh index d3e15ee6e..a0f736087 100755 --- a/tests/calendar.sh +++ b/tests/calendar.sh @@ -14,7 +14,7 @@ REDIRECT=/dev/null temp1=temp1.calendar.$$ temp2=temp2.calendar.$$ -sample=$GRIB_SAMPLES_PATH/GRIB2.tmpl +sample=$ECCODES_SAMPLES_PATH/GRIB2.tmpl ########### Utility function ############## check_key_equals() diff --git a/tests/definitions.sh b/tests/definitions.sh index fe68d7c1e..7ac37f300 100755 --- a/tests/definitions.sh +++ b/tests/definitions.sh @@ -13,9 +13,9 @@ REDIRECT=/dev/null -[ -z "$GRIB_DEFINITION_PATH" ] | GRIB_DEFINITION_PATH=`${tools_dir}codes_info -d` +[ -z "$ECCODES_DEFINITION_PATH" ] | ECCODES_DEFINITION_PATH=`${tools_dir}codes_info -d` -for file in `find $GRIB_DEFINITION_PATH -name '*.def' -print` +for file in `find $ECCODES_DEFINITION_PATH -name '*.def' -print` do ${tools_dir}parser $file > $REDIRECT done diff --git a/tests/filter.sh b/tests/filter.sh index 1c5313821..6a00499c8 100755 --- a/tests/filter.sh +++ b/tests/filter.sh @@ -57,7 +57,7 @@ cat > ${data_dir}/formatint.rules </dev/null +${tools_dir}/grib_filter ${data_dir}/binop.rules $ECCODES_SAMPLES_PATH/gg_sfc_grib1.tmpl >/dev/null # GRIB-526 grib_filter very picky about format of floats @@ -114,7 +114,7 @@ set values = { .4, 45. }; EOF -${tools_dir}/grib_filter temp.filt $GRIB_SAMPLES_PATH/GRIB1.tmpl +${tools_dir}/grib_filter temp.filt $ECCODES_SAMPLES_PATH/GRIB1.tmpl rm -f temp.grib2 temp.filt diff --git a/tests/fortran_interface.sh b/tests/fortran_interface.sh index fe6448237..68f7c9cb5 100755 --- a/tests/fortran_interface.sh +++ b/tests/fortran_interface.sh @@ -12,7 +12,7 @@ tmpfiles="fortran_interface.dat" trap 'rm -f $tmpfiles' 1 2 3 15 -export GRIB_DEFINITION_PATH=`pwd`"/definitions" +export ECCODES_DEFINITION_PATH=`pwd`"/definitions" path=../data grib1=latlon.grib diff --git a/tests/grib2to1.sh b/tests/grib2to1.sh index 8a8863d9c..e29d51d98 100755 --- a/tests/grib2to1.sh +++ b/tests/grib2to1.sh @@ -65,7 +65,7 @@ while [ $i -le $COUNT ]; do done echo "};write;" >> $filter # Apply this filter to a grib2 file from samples. -${tools_dir}grib_filter -o temp.pv.grib2 $filter $GRIB_SAMPLES_PATH/reduced_gg_ml_grib2.tmpl +${tools_dir}grib_filter -o temp.pv.grib2 $filter $ECCODES_SAMPLES_PATH/reduced_gg_ml_grib2.tmpl # Convert this new grib2 file to grib1. This command SHOULD FAIL set +e ${tools_dir}grib_set -s edition=1 temp.pv.grib2 temp.bad.grib1 2>$REDIRECT diff --git a/tests/include.ctest.sh.in b/tests/include.ctest.sh.in index 6db1eaeb5..01bc11db0 100644 --- a/tests/include.ctest.sh.in +++ b/tests/include.ctest.sh.in @@ -5,15 +5,13 @@ proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data def_dir=@PROJECT_SOURCE_DIR@/definitions -GRIB_DEFINITION_PATH="${def_dir}" -export GRIB_DEFINITION_PATH -#echo gdp=$GRIB_DEFINITION_PATH +ECCODES_DEFINITION_PATH="${def_dir}" +export ECCODES_DEFINITION_PATH tools_dir=@CMAKE_BINARY_DIR@/bin/ tigge_dir=@CMAKE_BINARY_DIR@/bin/ test_dir=@CMAKE_BINARY_DIR@/tests samp_dir="${proj_dir}/samples" -GRIB_SAMPLES_PATH=${samp_dir} -export GRIB_SAMPLES_PATH -#echo sp=$GRIB_SAMPLES_PATH +ECCODES_SAMPLES_PATH=${samp_dir} +export ECCODES_SAMPLES_PATH diff --git a/tests/include.sh b/tests/include.sh index f13b32b26..9c2f19250 100644 --- a/tests/include.sh +++ b/tests/include.sh @@ -26,10 +26,10 @@ else then cd ../ cpath=`pwd` - GRIB_DEFINITION_PATH=$cpath/definitions - export GRIB_DEFINITION_PATH - GRIB_SAMPLES_PATH=$cpath/samples - export GRIB_SAMPLES_PATH + ECCODES_DEFINITION_PATH=$cpath/definitions + export ECCODES_DEFINITION_PATH + ECCODES_SAMPLES_PATH=$cpath/samples + export ECCODES_SAMPLES_PATH tools_dir=$cpath/tools/ tigge_dir=$cpath/tigge/ data_dir=$cpath/data diff --git a/tests/level.sh b/tests/level.sh index e79862256..27955c33a 100755 --- a/tests/level.sh +++ b/tests/level.sh @@ -12,8 +12,8 @@ #set -x outfile=out.grib -sample_g1=$GRIB_SAMPLES_PATH/GRIB1.tmpl -sample_g2=$GRIB_SAMPLES_PATH/GRIB2.tmpl +sample_g1=$ECCODES_SAMPLES_PATH/GRIB1.tmpl +sample_g2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl temp=temp.grib file=${data_dir}/regular_gaussian_pressure_level.grib1 diff --git a/tests/list_all_keys.ksh b/tests/list_all_keys.ksh index 0f5535bed..cdd4de0b2 100755 --- a/tests/list_all_keys.ksh +++ b/tests/list_all_keys.ksh @@ -9,10 +9,10 @@ . ./include.sh -[ -z "$GRIB_DEFINITION_PATH" ] | GRIB_DEFINITION_PATH=`${tools_dir}codes_info -d` +[ -z "$ECCODES_DEFINITION_PATH" ] | ECCODES_DEFINITION_PATH=`${tools_dir}codes_info -d` touch tmp$$ -for file in `find $GRIB_DEFINITION_PATH -name '*.def' -print` +for file in `find $ECCODES_DEFINITION_PATH -name '*.def' -print` do ${tools_dir}grib_list_keys $file >> tmp$$ done diff --git a/tests/tigge.sh b/tests/tigge.sh index 79756be27..5e2bd9e04 100755 --- a/tests/tigge.sh +++ b/tests/tigge.sh @@ -31,7 +31,7 @@ done # Now test non-TIGGE files too. We now expect tigge_check to fail! # All the grib files in the samples are non-TIGGE -for file in ${GRIB_SAMPLES_PATH}/*.tmpl +for file in ${ECCODES_SAMPLES_PATH}/*.tmpl do set +e ${tigge_dir}tigge_check ${file} 2> $REDIRECT > $REDIRECT diff --git a/tools/codes_info.c b/tools/codes_info.c index 851a5e42a..12d499c92 100644 --- a/tools/codes_info.c +++ b/tools/codes_info.c @@ -67,21 +67,21 @@ int main( int argc,char* argv[]) printf("\n"); - if ((path=getenv("GRIB_DEFINITION_PATH")) != NULL) { + if ((path=getenv("ECCODES_DEFINITION_PATH")) != NULL) { printf("Definition files path from environment variable"); - printf(" GRIB_DEFINITION_PATH=%s\n",path); + printf(" ECCODES_DEFINITION_PATH=%s\n",path); } else { printf("Default definition files path is used: %s\n",GRIB_DEFINITION_PATH); - printf("Definition files path can be changed setting GRIB_DEFINITION_PATH environment variable\n"); + printf("Definition files path can be changed setting ECCODES_DEFINITION_PATH environment variable\n"); } printf("\n"); - if ((path=getenv("GRIB_SAMPLES_PATH")) != NULL) { + if ((path=getenv("ECCODES_SAMPLES_PATH")) != NULL) { printf("SAMPLES path from environment variable"); - printf(" GRIB_SAMPLES_PATH=%s\n",path); + printf(" ECCODES_SAMPLES_PATH=%s\n",path); } else { printf("Default SAMPLES path is used: %s\n",GRIB_SAMPLES_PATH); - printf("SAMPLES path can be changed setting GRIB_SAMPLES_PATH environment variable\n"); + printf("SAMPLES path can be changed setting ECCODES_SAMPLES_PATH environment variable\n"); } printf("\n"); return 0; @@ -91,7 +91,7 @@ int main( int argc,char* argv[]) printf("%d.%d.%d ",major,minor,revision); if (print_flags & INFO_PRINT_DEFINITION_PATH) { - if ((path=getenv("GRIB_DEFINITION_PATH")) != NULL) { + if ((path=getenv("ECCODES_DEFINITION_PATH")) != NULL) { printf("%s",path); } else { printf("%s",GRIB_DEFINITION_PATH); @@ -99,7 +99,7 @@ int main( int argc,char* argv[]) } if (print_flags & INFO_PRINT_SAMPLES_PATH) { - if ((path=getenv("GRIB_SAMPLES_PATH")) != NULL) { + if ((path=getenv("ECCODES_SAMPLES_PATH")) != NULL) { printf("%s",path); } else { printf("%s",GRIB_SAMPLES_PATH);