ECC-28: Change the prefix of all environment variables

This commit is contained in:
Shahram Najm 2015-01-23 22:47:51 +00:00
parent 8201a88536
commit 8e3f489091
36 changed files with 117 additions and 120 deletions

View File

@ -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;

View File

@ -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.

View File

@ -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.
*/

View File

@ -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"
)

View File

@ -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

View File

@ -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

View File

@ -34,7 +34,7 @@ int main(int argc, char** argv)
/* 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 */
/* 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);

View File

@ -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/

View File

@ -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

View File

@ -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

View File

@ -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')

View File

@ -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

View File

@ -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

View File

@ -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/

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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";

View File

@ -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"

View File

@ -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)

View File

@ -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 */

View File

@ -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;
}

View File

@ -10,7 +10,7 @@
. ./include.sh
set -x
# set -x
#Enter data dir
cd ${data_dir}/bufr

View File

@ -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()

View File

@ -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

View File

@ -57,7 +57,7 @@ cat > ${data_dir}/formatint.rules <<EOF
print "edition=[edition%.3d], level=[level%5ld]";
EOF
result=`${tools_dir}/grib_filter ${data_dir}/formatint.rules $GRIB_SAMPLES_PATH/GRIB1.tmpl`
result=`${tools_dir}/grib_filter ${data_dir}/formatint.rules $ECCODES_SAMPLES_PATH/GRIB1.tmpl`
[ "$result" = "edition=001, level= 500" ]
# Convert from grib1 to grib2 "Generalized vertical height coordinates"
@ -68,7 +68,7 @@ set nlev=41.0;
write;
EOF
${tools_dir}/grib_filter -o temp.grib2 temp.filt $GRIB_SAMPLES_PATH/sh_ml_grib1.tmpl
${tools_dir}/grib_filter -o temp.grib2 temp.filt $ECCODES_SAMPLES_PATH/sh_ml_grib1.tmpl
result=`${tools_dir}/grib_get -p typeOfFirstFixedSurface,NV,nlev temp.grib2`
[ "$result" = "150 6 41" ]
@ -100,7 +100,7 @@ else {
assert(0);
}
EOF
${tools_dir}/grib_filter ${data_dir}/binop.rules $GRIB_SAMPLES_PATH/gg_sfc_grib1.tmpl >/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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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);