diff --git a/examples/C/bufr_attributes.sh b/examples/C/bufr_attributes.sh index 5e83863c6..28b94e4c8 100755 --- a/examples/C/bufr_attributes.sh +++ b/examples/C/bufr_attributes.sh @@ -24,7 +24,7 @@ rm -f $fTmp | true REDIRECT=/dev/null #Write the key values into a file -${examples_dir}c_bufr_attributes 2> $REDIRECT > $fTmp +${examples_dir}/c_bufr_attributes 2> $REDIRECT > $fTmp #TODO: check the results diff --git a/examples/C/bufr_clone.sh b/examples/C/bufr_clone.sh index dc0748486..482cb4ed5 100755 --- a/examples/C/bufr_clone.sh +++ b/examples/C/bufr_clone.sh @@ -22,7 +22,7 @@ f=${data_dir}/bufr/syno_1.bufr REDIRECT=/dev/null #Clone the bufr messages -${examples_dir}c_bufr_clone $f $fBufrTmp >$REDIRECT 2> $REDIRECT +${examples_dir}/c_bufr_clone $f $fBufrTmp >$REDIRECT 2> $REDIRECT #Compare clone to the original set +e diff --git a/examples/C/bufr_copy_data.sh b/examples/C/bufr_copy_data.sh index bed15eebd..c9dc2f7ab 100755 --- a/examples/C/bufr_copy_data.sh +++ b/examples/C/bufr_copy_data.sh @@ -53,7 +53,7 @@ cat > ${REF} < $fTmp 2> $REDIRECT +${examples_dir}/c_bufr_expanded $f > $fTmp 2> $REDIRECT #TODO: add a better check. It could be compared against the bufrdc # references. diff --git a/examples/C/bufr_get_keys.sh b/examples/C/bufr_get_keys.sh index 7185871b6..f8edd4241 100755 --- a/examples/C/bufr_get_keys.sh +++ b/examples/C/bufr_get_keys.sh @@ -24,7 +24,7 @@ rm -f $fTmp | true REDIRECT=/dev/null #Write the key values into a file -${examples_dir}c_bufr_get_keys 2> $REDIRECT > $fTmp +${examples_dir}/c_bufr_get_keys 2> $REDIRECT > $fTmp #TODO: check the results diff --git a/examples/C/bufr_keys_iterator.sh b/examples/C/bufr_keys_iterator.sh index 5d5aad83a..c93d09a5d 100755 --- a/examples/C/bufr_keys_iterator.sh +++ b/examples/C/bufr_keys_iterator.sh @@ -24,7 +24,7 @@ REDIRECT=/dev/null f=${data_dir}/bufr/syno_1.bufr #Dump the keys -${examples_dir}c_bufr_keys_iterator $f 2> $REDIRECT > $fTmp +${examples_dir}/c_bufr_keys_iterator $f 2> $REDIRECT > $fTmp #TODO: check the output grep -q '#5#cloudAmount->percentConfidence=70' $fTmp diff --git a/examples/C/bufr_missing.sh b/examples/C/bufr_missing.sh index be50f2f6d..7d096ebff 100755 --- a/examples/C/bufr_missing.sh +++ b/examples/C/bufr_missing.sh @@ -24,7 +24,7 @@ rm -f $fTmp | true REDIRECT=/dev/null #Write the key values into a file -${examples_dir}c_bufr_missing #2> $REDIRECT > $fTmp +${examples_dir}/c_bufr_missing #2> $REDIRECT > $fTmp #TODO: check the results diff --git a/examples/C/bufr_pthreads.sh b/examples/C/bufr_pthreads.sh index b6a49a6af..811e23660 100755 --- a/examples/C/bufr_pthreads.sh +++ b/examples/C/bufr_pthreads.sh @@ -11,5 +11,5 @@ for i in `seq 0 100`; do #echo iteration $i - ${examples_dir}c_bufr_pthreads + ${examples_dir}/c_bufr_pthreads done diff --git a/examples/C/bufr_read_header.sh b/examples/C/bufr_read_header.sh index f3efa1616..397a6337a 100755 --- a/examples/C/bufr_read_header.sh +++ b/examples/C/bufr_read_header.sh @@ -28,7 +28,7 @@ fRef=${f}.header.ref REDIRECT=/dev/null #Write the values into a file and compare with reference -${examples_dir}c_bufr_read_header $f 2> $REDIRECT > $fTmp +${examples_dir}/c_bufr_read_header $f 2> $REDIRECT > $fTmp #We compare output to the reference by ignoring the whitespaces diff -w $fRef $fTmp >$REDIRECT 2> $REDIRECT diff --git a/examples/C/bufr_read_scatterometer.sh b/examples/C/bufr_read_scatterometer.sh index d407a3728..e3548e8bb 100755 --- a/examples/C/bufr_read_scatterometer.sh +++ b/examples/C/bufr_read_scatterometer.sh @@ -23,7 +23,7 @@ rm -f $fTmp REDIRECT=/dev/null # Write the key values into a file -${examples_dir}c_bufr_read_scatterometer 2> $REDIRECT > $fTmp +${examples_dir}/c_bufr_read_scatterometer 2> $REDIRECT > $fTmp # Check the results grep -q "Number of values: 2016" $fTmp diff --git a/examples/C/bufr_read_synop.sh b/examples/C/bufr_read_synop.sh index efc0f076b..561ad4fb5 100755 --- a/examples/C/bufr_read_synop.sh +++ b/examples/C/bufr_read_synop.sh @@ -24,7 +24,7 @@ rm -f $fTmp | true REDIRECT=/dev/null #Write the values into a file and compare with reference -${examples_dir}c_bufr_read_synop #2> $REDIRECT > $fTmp +${examples_dir}/c_bufr_read_synop #2> $REDIRECT > $fTmp #TODO: check the output diff --git a/examples/C/bufr_read_temp.sh b/examples/C/bufr_read_temp.sh index 81cc89927..6e7b401d0 100755 --- a/examples/C/bufr_read_temp.sh +++ b/examples/C/bufr_read_temp.sh @@ -24,7 +24,7 @@ rm -f $fTmp | true REDIRECT=/dev/null #Write the key values into a file -${examples_dir}c_bufr_read_temp #2> $REDIRECT > $fTmp +${examples_dir}/c_bufr_read_temp #2> $REDIRECT > $fTmp #TODO: check the results diff --git a/examples/C/bufr_set_keys.sh b/examples/C/bufr_set_keys.sh index f885484c3..3956858d2 100755 --- a/examples/C/bufr_set_keys.sh +++ b/examples/C/bufr_set_keys.sh @@ -25,7 +25,7 @@ f=${data_dir}/bufr/syno_multi.bufr REDIRECT=/dev/null # -${examples_dir}c_bufr_set_keys $fBufrTmp 2> $REDIRECT > $REDIRECT +${examples_dir}/c_bufr_set_keys $fBufrTmp 2> $REDIRECT > $REDIRECT #Compare modified to the original set +e diff --git a/examples/C/bufr_subset.sh b/examples/C/bufr_subset.sh index 66619e4e3..2b16cce10 100755 --- a/examples/C/bufr_subset.sh +++ b/examples/C/bufr_subset.sh @@ -42,7 +42,7 @@ EOF REDIRECT=/dev/null #Write the values into a file and compare with reference -${examples_dir}c_bufr_subset 2> $REDIRECT > $fTmp +${examples_dir}/c_bufr_subset 2> $REDIRECT > $fTmp #We compare output to the reference by ignoring the whitespaces diff -w $fRef $fTmp >$REDIRECT 2> $REDIRECT diff --git a/examples/C/get_product_kind.sh b/examples/C/get_product_kind.sh index a1b77b7cd..4e2107fd2 100755 --- a/examples/C/get_product_kind.sh +++ b/examples/C/get_product_kind.sh @@ -16,6 +16,6 @@ fTmp=${label}.tmp # Create a file containing both GRIB and BUFR messages cat ${data_dir}/sample.grib2 ${data_dir}/bufr/syno_multi.bufr >$fTmp -${examples_dir}c_get_product_kind $fTmp +${examples_dir}/c_get_product_kind $fTmp rm -f $fTmp diff --git a/examples/C/grib_clone.sh b/examples/C/grib_clone.sh index da0854860..0179ebbdc 100755 --- a/examples/C/grib_clone.sh +++ b/examples/C/grib_clone.sh @@ -12,11 +12,11 @@ TEMP=cloned.grib INPUT=${data_dir}/reduced_gaussian_pressure_level.grib1 -${examples_dir}c_grib_clone ${INPUT} ${TEMP} > /dev/null +${examples_dir}/c_grib_clone ${INPUT} ${TEMP} > /dev/null ${tools_dir}/grib_compare ${INPUT} ${TEMP} INPUT=${data_dir}/sample.grib2 -${examples_dir}c_grib_clone ${INPUT} ${TEMP} > /dev/null +${examples_dir}/c_grib_clone ${INPUT} ${TEMP} > /dev/null ${tools_dir}/grib_compare ${INPUT} ${TEMP} rm -f ${TEMP} diff --git a/examples/C/grib_copy_message.sh b/examples/C/grib_copy_message.sh index b25e3ace4..1277c7f3d 100755 --- a/examples/C/grib_copy_message.sh +++ b/examples/C/grib_copy_message.sh @@ -12,11 +12,11 @@ TEMP=c_grib_copy_message.grib INPUT=${data_dir}/reduced_gaussian_pressure_level.grib1 -${examples_dir}c_grib_copy_message ${INPUT} ${TEMP} > /dev/null +${examples_dir}/c_grib_copy_message ${INPUT} ${TEMP} > /dev/null ${tools_dir}/grib_compare -b hour ${INPUT} ${TEMP} INPUT=${data_dir}/sample.grib2 -${examples_dir}c_grib_copy_message ${INPUT} ${TEMP} > /dev/null +${examples_dir}/c_grib_copy_message ${INPUT} ${TEMP} > /dev/null ${tools_dir}/grib_compare -b hour ${INPUT} ${TEMP} rm -f ${TEMP} diff --git a/examples/C/grib_ensemble_index.sh b/examples/C/grib_ensemble_index.sh index 59cb5ea2a..1928b078a 100755 --- a/examples/C/grib_ensemble_index.sh +++ b/examples/C/grib_ensemble_index.sh @@ -10,13 +10,13 @@ . ./include.sh input="../../data/index.grib" -${examples_dir}c_grib_ensemble_index $input +${examples_dir}/c_grib_ensemble_index $input # ECC-378: Empty input file temp=temp_index.empty.grib touch $temp set +e -${examples_dir}c_grib_ensemble_index $temp 2>/dev/null +${examples_dir}/c_grib_ensemble_index $temp 2>/dev/null status=$? set -e [ $status -ne 0 ] diff --git a/examples/C/grib_get_data.sh b/examples/C/grib_get_data.sh index 7adb6d67b..0df938088 100755 --- a/examples/C/grib_get_data.sh +++ b/examples/C/grib_get_data.sh @@ -9,4 +9,4 @@ . ./include.sh -${examples_dir}c_grib_get_data > /dev/null +${examples_dir}/c_grib_get_data > /dev/null diff --git a/examples/C/grib_get_keys.sh b/examples/C/grib_get_keys.sh index 814a1aca0..f8f63bd5d 100755 --- a/examples/C/grib_get_keys.sh +++ b/examples/C/grib_get_keys.sh @@ -9,5 +9,5 @@ . ./include.sh -${examples_dir}c_grib_get_keys +${examples_dir}/c_grib_get_keys diff --git a/examples/C/grib_iterator.sh b/examples/C/grib_iterator.sh index 9d93a5de6..d4ec0140d 100755 --- a/examples/C/grib_iterator.sh +++ b/examples/C/grib_iterator.sh @@ -9,7 +9,7 @@ . ./include.sh -${examples_dir}c_grib_iterator ${data_dir}/reduced_gaussian_model_level.grib1 > /dev/null +${examples_dir}/c_grib_iterator ${data_dir}/reduced_gaussian_model_level.grib1 > /dev/null -${examples_dir}c_grib_iterator ${data_dir}/regular_gaussian_model_level.grib1 > /dev/null +${examples_dir}/c_grib_iterator ${data_dir}/regular_gaussian_model_level.grib1 > /dev/null diff --git a/examples/C/grib_keys_iterator.sh b/examples/C/grib_keys_iterator.sh index 8ab00fe82..b9e226978 100755 --- a/examples/C/grib_keys_iterator.sh +++ b/examples/C/grib_keys_iterator.sh @@ -9,8 +9,8 @@ . ./include.sh -${examples_dir}c_grib_keys_iterator ${data_dir}/reduced_latlon_surface.grib1 > /dev/null +${examples_dir}/c_grib_keys_iterator ${data_dir}/reduced_latlon_surface.grib1 > /dev/null -${examples_dir}c_grib_keys_iterator ${data_dir}/regular_gaussian_model_level.grib1 > /dev/null +${examples_dir}/c_grib_keys_iterator ${data_dir}/regular_gaussian_model_level.grib1 > /dev/null -${examples_dir}c_grib_keys_iterator ${data_dir}/mixed.grib > /dev/null +${examples_dir}/c_grib_keys_iterator ${data_dir}/mixed.grib > /dev/null diff --git a/examples/C/grib_list.sh b/examples/C/grib_list.sh index 94a644b38..70e108165 100755 --- a/examples/C/grib_list.sh +++ b/examples/C/grib_list.sh @@ -9,5 +9,5 @@ . ./include.sh -${examples_dir}c_grib_list +${examples_dir}/c_grib_list diff --git a/examples/C/grib_multi.sh b/examples/C/grib_multi.sh index 5addb9a67..d379013c1 100755 --- a/examples/C/grib_multi.sh +++ b/examples/C/grib_multi.sh @@ -13,13 +13,13 @@ if [ ! -f "${data_dir}/multi.grib2" ] then echo "SKIP test 1: $0" else - ${examples_dir}c_grib_multi > /dev/null + ${examples_dir}/c_grib_multi > /dev/null fi if [ ! -f "${data_dir}/multi_created.grib2" ] then echo "SKIP test 2: $0" else - ${examples_dir}c_multi2 > /dev/null + ${examples_dir}/c_multi2 > /dev/null fi diff --git a/examples/C/grib_multi_write.sh b/examples/C/grib_multi_write.sh index 4ee60c6c5..ca5d4ecc2 100755 --- a/examples/C/grib_multi_write.sh +++ b/examples/C/grib_multi_write.sh @@ -14,7 +14,7 @@ then echo SKIP: $0 exit fi -${examples_dir}c_grib_multi_write ${data_dir}/sample.grib2 ${data_dir}/multi_sample.grib2 > /dev/null +${examples_dir}/c_grib_multi_write ${data_dir}/sample.grib2 ${data_dir}/multi_sample.grib2 > /dev/null ${tools_dir}/grib_get -p step ${data_dir}/multi_sample.grib2 > ${data_dir}/multi_step.test diff --git a/examples/C/grib_precision.sh b/examples/C/grib_precision.sh index 996fe4f67..c53b96e21 100755 --- a/examples/C/grib_precision.sh +++ b/examples/C/grib_precision.sh @@ -9,6 +9,6 @@ . ./include.sh -${examples_dir}c_grib_precision +${examples_dir}/c_grib_precision rm -f out.precision.grib1 diff --git a/examples/C/grib_print_data.sh b/examples/C/grib_print_data.sh index 4bb4a2edf..fa43fa1a3 100755 --- a/examples/C/grib_print_data.sh +++ b/examples/C/grib_print_data.sh @@ -9,7 +9,7 @@ . ./include.sh -numberOfValues=`${examples_dir}c_grib_print_data ../../data/constant_field.grib1 | grep values | awk '{print $1}'` +numberOfValues=`${examples_dir}/c_grib_print_data ../../data/constant_field.grib1 | grep values | awk '{print $1}'` if [ $numberOfValues -ne 99200 ] then diff --git a/examples/C/grib_pthreads.sh b/examples/C/grib_pthreads.sh index ef725a9bd..e220a7fd1 100755 --- a/examples/C/grib_pthreads.sh +++ b/examples/C/grib_pthreads.sh @@ -10,5 +10,5 @@ . ./include.sh for i in `seq 0 100`; do - ${examples_dir}c_grib_pthreads + ${examples_dir}/c_grib_pthreads done diff --git a/examples/C/grib_set_bitmap.sh b/examples/C/grib_set_bitmap.sh index de1f5ef18..9f7fa0e4f 100755 --- a/examples/C/grib_set_bitmap.sh +++ b/examples/C/grib_set_bitmap.sh @@ -12,7 +12,7 @@ OUT_TMP=out.set_bitmap_c.grib # The input and output files are hardcoded in the example -${examples_dir}c_grib_set_bitmap +${examples_dir}/c_grib_set_bitmap x=`${tools_dir}/grib_get -p numberOfDataPoints,numberOfCodedValues,numberOfMissing $OUT_TMP` [ "$x" = "496 486 10" ] diff --git a/examples/C/grib_set_data.sh b/examples/C/grib_set_data.sh index e27cfbf9d..be1d1f69a 100755 --- a/examples/C/grib_set_data.sh +++ b/examples/C/grib_set_data.sh @@ -11,6 +11,6 @@ OUT=temp.c_grib_set_data.out.grib -${examples_dir}c_grib_set_data $OUT +${examples_dir}/c_grib_set_data $OUT rm -f $OUT diff --git a/examples/C/grib_set_keys.sh b/examples/C/grib_set_keys.sh index 3d514d3f2..d48586754 100755 --- a/examples/C/grib_set_keys.sh +++ b/examples/C/grib_set_keys.sh @@ -9,6 +9,6 @@ . ./include.sh -${examples_dir}c_grib_set_keys +${examples_dir}/c_grib_set_keys rm -f out.set.grib1 diff --git a/examples/C/grib_set_pv.sh b/examples/C/grib_set_pv.sh index 518fd8e29..67a7d04e7 100755 --- a/examples/C/grib_set_pv.sh +++ b/examples/C/grib_set_pv.sh @@ -13,7 +13,7 @@ GRIB1=${data_dir}/regular_latlon_surface.grib1 GRIB2=${proj_dir}/samples/regular_ll_sfc_grib2.tmpl OUT=temp.$$.out -${examples_dir}c_grib_set_pv $GRIB1 $OUT > /dev/null -${examples_dir}c_grib_set_pv $GRIB2 $OUT > /dev/null +${examples_dir}/c_grib_set_pv $GRIB1 $OUT > /dev/null +${examples_dir}/c_grib_set_pv $GRIB2 $OUT > /dev/null rm -f $OUT diff --git a/examples/C/include.ctest.sh.in b/examples/C/include.ctest.sh.in index ef165ae80..fbddce14e 100644 --- a/examples/C/include.ctest.sh.in +++ b/examples/C/include.ctest.sh.in @@ -16,7 +16,7 @@ ECCODES_DEFINITION_PATH="${def_dir}" export ECCODES_DEFINITION_PATH tools_dir=@CMAKE_BINARY_DIR@/bin -examples_dir=@CMAKE_CURRENT_BINARY_DIR@/ +examples_dir=@CMAKE_CURRENT_BINARY_DIR@ # If this environment variable is set, then run the # executables with valgrind diff --git a/examples/C/include.sh b/examples/C/include.sh index 0a4d43e5d..4e2a9d0db 100644 --- a/examples/C/include.sh +++ b/examples/C/include.sh @@ -33,11 +33,11 @@ else ECCODES_SAMPLES_PATH=$cpath/samples export ECCODES_SAMPLES_PATH tools_dir=$cpath/tools - examples_dir=$cpath/examples/C/ + examples_dir=$cpath/examples/C if test "x$ECCODES_TEST_WITH_VALGRIND" != "x"; then tools_dir="valgrind --error-exitcode=1 -q $cpath/tools" - examples_dir="valgrind --error-exitcode=1 -q $cpath/examples/C/" + examples_dir="valgrind --error-exitcode=1 -q $cpath/examples/C" fi data_dir=$cpath/data diff --git a/examples/C/large_grib1.sh b/examples/C/large_grib1.sh index 8e67805e7..9d9438773 100755 --- a/examples/C/large_grib1.sh +++ b/examples/C/large_grib1.sh @@ -10,7 +10,7 @@ . ./include.sh # The executable should produce a GRIB1 file -${examples_dir}c_large_grib1 +${examples_dir}/c_large_grib1 # Make sure the newly created file can be listed OK output=bigfile.grib diff --git a/examples/C/sections_copy.sh b/examples/C/sections_copy.sh index 949dc831c..3a3b8c445 100755 --- a/examples/C/sections_copy.sh +++ b/examples/C/sections_copy.sh @@ -15,7 +15,7 @@ OUTPUT=temp.sections.grib ################## # Copy the GRID section from REGUL_GRID_FILE -${examples_dir}c_sections_copy $REGUL_GRID_FILE $GAUSS_GRID_FILE g $OUTPUT >/dev/null +${examples_dir}/c_sections_copy $REGUL_GRID_FILE $GAUSS_GRID_FILE g $OUTPUT >/dev/null # Now the output should have a regular grid # but its date should be the same as the Gaussian grid sample @@ -25,7 +25,7 @@ grid_tmpl=`${tools_dir}/grib_get -p gridType,date $OUTPUT` ################## # Copy the GRID section from GAUSS_GRID_FILE -${examples_dir}c_sections_copy $GAUSS_GRID_FILE $REGUL_GRID_FILE g $OUTPUT >/dev/null +${examples_dir}/c_sections_copy $GAUSS_GRID_FILE $REGUL_GRID_FILE g $OUTPUT >/dev/null # Now the output should have a gaussian grid # but its date should be the same as the regular grid @@ -35,7 +35,7 @@ grid_tmpl=`${tools_dir}/grib_get -p gridType,date $OUTPUT` ################## # Copy both the PRODUCT and GRID sections from REGUL_GRID_FILE -${examples_dir}c_sections_copy $REGUL_GRID_FILE $GAUSS_GRID_FILE gp $OUTPUT >/dev/null +${examples_dir}/c_sections_copy $REGUL_GRID_FILE $GAUSS_GRID_FILE gp $OUTPUT >/dev/null # Now the output should have a regular grid # and its date should be the same as the regular latlon @@ -45,7 +45,7 @@ grid_tmpl=`${tools_dir}/grib_get -p gridType,date $OUTPUT` ################## # Copy all sections from REGUL_GRID_FILE (use commas) -${examples_dir}c_sections_copy $REGUL_GRID_FILE $GAUSS_GRID_FILE p,l,g,d,b $OUTPUT >/dev/null +${examples_dir}/c_sections_copy $REGUL_GRID_FILE $GAUSS_GRID_FILE p,l,g,d,b $OUTPUT >/dev/null # Now the output should be identical to the regular grib ${tools_dir}/grib_compare $REGUL_GRID_FILE $OUTPUT diff --git a/examples/C/set_missing.sh b/examples/C/set_missing.sh index 5e8aadd8c..468a9d11a 100755 --- a/examples/C/set_missing.sh +++ b/examples/C/set_missing.sh @@ -9,5 +9,5 @@ . ./include.sh -${examples_dir}c_set_missing +${examples_dir}/c_set_missing rm -f out_surface_level.grib2 diff --git a/examples/F90/bufr_copy_data.sh b/examples/F90/bufr_copy_data.sh index dc6d7d00d..5b4f8d9e7 100755 --- a/examples/F90/bufr_copy_data.sh +++ b/examples/F90/bufr_copy_data.sh @@ -54,7 +54,7 @@ cat > ${REF} < ${MYLOG} diff --git a/examples/F90/bufr_copy_keys.sh b/examples/F90/bufr_copy_keys.sh index ff30b3a8a..c3b203044 100755 --- a/examples/F90/bufr_copy_keys.sh +++ b/examples/F90/bufr_copy_keys.sh @@ -18,7 +18,7 @@ cd ${data_dir}/bufr #The input and output BUFR files are hardcoded in the f90 example!!! OUTPUT=out.$label.bufr -${examples_dir}eccodes_f_bufr_copy_keys +${examples_dir}/eccodes_f_bufr_copy_keys res=`${tools_dir}/bufr_get -p bufrHeaderCentre $OUTPUT` [ "$res" = "80" ] diff --git a/examples/F90/bufr_copy_message.sh b/examples/F90/bufr_copy_message.sh index cf781055c..b35dfb4fb 100755 --- a/examples/F90/bufr_copy_message.sh +++ b/examples/F90/bufr_copy_message.sh @@ -12,7 +12,7 @@ INPUT="../../data/bufr/syno_1.bufr" OUTPUT=out.copy.bufr -${examples_dir}eccodes_f_bufr_copy_message > /dev/null +${examples_dir}/eccodes_f_bufr_copy_message > /dev/null ${tools_dir}/bufr_compare -b bufrHeaderSubCentre $INPUT $OUTPUT rm -f $OUTPUT diff --git a/examples/F90/get_pl.sh b/examples/F90/get_pl.sh index 38a17dfe5..2fe1a0f74 100755 --- a/examples/F90/get_pl.sh +++ b/examples/F90/get_pl.sh @@ -9,4 +9,4 @@ . ./include.sh -${examples_dir}eccodes_f_get_pl > /dev/null +${examples_dir}/eccodes_f_get_pl > /dev/null diff --git a/examples/F90/get_pv.sh b/examples/F90/get_pv.sh index 31468fa10..23912ac2b 100755 --- a/examples/F90/get_pv.sh +++ b/examples/F90/get_pv.sh @@ -9,4 +9,4 @@ . ./include.sh -${examples_dir}eccodes_f_get_pv > /dev/null +${examples_dir}/eccodes_f_get_pv > /dev/null diff --git a/examples/F90/get_set_uuid.sh b/examples/F90/get_set_uuid.sh index 0dbeac2e7..d54b9c6f8 100755 --- a/examples/F90/get_set_uuid.sh +++ b/examples/F90/get_set_uuid.sh @@ -14,7 +14,7 @@ uuid=`${tools_dir}/grib_get -w count=1 -p uuidOfVGrid:s ${data_dir}/test_uuid.gr [ "$uuid" = "08b1e836bc6911e1951fb51b5624ad8d" ] # This reads the file in data/test_uuid.grib2 and creates test_uuid.grib2 -${examples_dir}eccodes_f_get_set_uuid > /dev/null +${examples_dir}/eccodes_f_get_set_uuid > /dev/null # Check output was written output=out_uuid.grib2 diff --git a/examples/F90/grib_clone.sh b/examples/F90/grib_clone.sh index fe703a554..b8cbaae91 100755 --- a/examples/F90/grib_clone.sh +++ b/examples/F90/grib_clone.sh @@ -9,5 +9,5 @@ . ./include.sh -${examples_dir}eccodes_f_grib_clone > /dev/null +${examples_dir}/eccodes_f_grib_clone > /dev/null rm -f out.clone.grib1 diff --git a/examples/F90/grib_copy_message.sh b/examples/F90/grib_copy_message.sh index 84544300d..516c4170f 100755 --- a/examples/F90/grib_copy_message.sh +++ b/examples/F90/grib_copy_message.sh @@ -12,7 +12,7 @@ INPUT="../../data/constant_field.grib1" OUTPUT=out.copy.grib1 -${examples_dir}eccodes_f_grib_copy_message > /dev/null +${examples_dir}/eccodes_f_grib_copy_message > /dev/null ${tools_dir}/grib_compare -b centre $INPUT $OUTPUT rm -f $OUTPUT diff --git a/examples/F90/grib_copy_namespace.sh b/examples/F90/grib_copy_namespace.sh index 815f072e2..c54a710f6 100755 --- a/examples/F90/grib_copy_namespace.sh +++ b/examples/F90/grib_copy_namespace.sh @@ -18,7 +18,7 @@ res=`${tools_dir}/grib_get -p Ni,Nj $INPUT` #The input and output BUFR files are hardcoded in the f90 example!!! OUTPUT=out.grib_copy_namespace.grib -${examples_dir}./eccodes_f_grib_copy_namespace +${examples_dir}/eccodes_f_grib_copy_namespace res=`${tools_dir}/grib_get -p Ni,Nj $OUTPUT` [ "$res" = "MISSING 501" ] diff --git a/examples/F90/grib_count_messages.sh b/examples/F90/grib_count_messages.sh index 00977078c..93c493fba 100755 --- a/examples/F90/grib_count_messages.sh +++ b/examples/F90/grib_count_messages.sh @@ -9,4 +9,4 @@ . ./include.sh -${examples_dir}eccodes_f_grib_count_messages > /dev/null +${examples_dir}/eccodes_f_grib_count_messages > /dev/null diff --git a/examples/F90/grib_count_messages_multi.sh b/examples/F90/grib_count_messages_multi.sh index 697bef724..a82eaaa7b 100755 --- a/examples/F90/grib_count_messages_multi.sh +++ b/examples/F90/grib_count_messages_multi.sh @@ -12,9 +12,9 @@ INPUT="../../data/multi.grib2" # Without multi-field support -c=`${examples_dir}eccodes_f_grib_count_messages_multi 0 $INPUT | tr -d ' '` +c=`${examples_dir}/eccodes_f_grib_count_messages_multi 0 $INPUT | tr -d ' '` [ "$c" = "30" ] # With multi-field support (more messages should be counted) -c=`${examples_dir}eccodes_f_grib_count_messages_multi 1 $INPUT | tr -d ' '` +c=`${examples_dir}/eccodes_f_grib_count_messages_multi 1 $INPUT | tr -d ' '` [ "$c" = "56" ] diff --git a/examples/F90/grib_get_data.sh b/examples/F90/grib_get_data.sh index 2ab0752b1..c945d8967 100755 --- a/examples/F90/grib_get_data.sh +++ b/examples/F90/grib_get_data.sh @@ -9,4 +9,4 @@ . ./include.sh -${examples_dir}eccodes_f_grib_get_data > /dev/null +${examples_dir}/eccodes_f_grib_get_data > /dev/null diff --git a/examples/F90/grib_get_keys.sh b/examples/F90/grib_get_keys.sh index 5cf3d24ce..3026358d7 100755 --- a/examples/F90/grib_get_keys.sh +++ b/examples/F90/grib_get_keys.sh @@ -9,4 +9,4 @@ . ./include.sh -${examples_dir}eccodes_f_grib_get_keys > /dev/null +${examples_dir}/eccodes_f_grib_get_keys > /dev/null diff --git a/examples/F90/grib_index.sh b/examples/F90/grib_index.sh index 54a904a4d..a1a6d3ce4 100755 --- a/examples/F90/grib_index.sh +++ b/examples/F90/grib_index.sh @@ -11,11 +11,11 @@ # if an index file does not exist then # create index and save to disk -${examples_dir}eccodes_f_grib_index > index_f90.out +${examples_dir}/eccodes_f_grib_index > index_f90.out diff index_f90.out ${data_dir}/index_f90.ok # if an index file exists then load the index from it -${examples_dir}eccodes_f_grib_index > index_f90.out +${examples_dir}/eccodes_f_grib_index > index_f90.out diff index_f90.out ${data_dir}/index_f90.ok rm -f index.idx index_f90.out diff --git a/examples/F90/grib_keys_iterator.sh b/examples/F90/grib_keys_iterator.sh index 6f1e1877c..171b13f7a 100755 --- a/examples/F90/grib_keys_iterator.sh +++ b/examples/F90/grib_keys_iterator.sh @@ -9,4 +9,4 @@ . ./include.sh -${examples_dir}eccodes_f_grib_keys_iterator > /dev/null +${examples_dir}/eccodes_f_grib_keys_iterator > /dev/null diff --git a/examples/F90/grib_multi.sh b/examples/F90/grib_multi.sh index 03e8ecd62..84172c106 100755 --- a/examples/F90/grib_multi.sh +++ b/examples/F90/grib_multi.sh @@ -9,6 +9,6 @@ . ./include.sh -${examples_dir}eccodes_f_grib_multi > multi.out +${examples_dir}/eccodes_f_grib_multi > multi.out diff multi.out ${data_dir}/multi.ok rm -f multi.out diff --git a/examples/F90/grib_multi_write.sh b/examples/F90/grib_multi_write.sh index e31ddbc6f..dfb61995a 100755 --- a/examples/F90/grib_multi_write.sh +++ b/examples/F90/grib_multi_write.sh @@ -9,7 +9,7 @@ . ./include.sh -${examples_dir}eccodes_f_grib_multi_write > /dev/null +${examples_dir}/eccodes_f_grib_multi_write > /dev/null ${tools_dir}/grib_compare ${data_dir}/multi_created.grib2 multi_created.grib2 diff --git a/examples/F90/grib_nearest.sh b/examples/F90/grib_nearest.sh index 567d79c92..2730cd327 100755 --- a/examples/F90/grib_nearest.sh +++ b/examples/F90/grib_nearest.sh @@ -9,4 +9,4 @@ . ./include.sh -${examples_dir}eccodes_f_grib_nearest > /dev/null +${examples_dir}/eccodes_f_grib_nearest > /dev/null diff --git a/examples/F90/grib_precision.sh b/examples/F90/grib_precision.sh index d302ce18a..94c8226f0 100755 --- a/examples/F90/grib_precision.sh +++ b/examples/F90/grib_precision.sh @@ -9,5 +9,5 @@ . ./include.sh -${examples_dir}eccodes_f_grib_precision > /dev/null +${examples_dir}/eccodes_f_grib_precision > /dev/null rm -f ${data_dir}/regular_latlon_surface_prec.grib1 diff --git a/examples/F90/grib_print_data.sh b/examples/F90/grib_print_data.sh index 6354dc0dc..b96231f37 100755 --- a/examples/F90/grib_print_data.sh +++ b/examples/F90/grib_print_data.sh @@ -9,5 +9,5 @@ . ./include.sh -${examples_dir}eccodes_f_grib_print_data | grep '99200 *values found' -${examples_dir}eccodes_f_grib_print_data_static | grep '99200 *values found' +${examples_dir}/eccodes_f_grib_print_data | grep '99200 *values found' +${examples_dir}/eccodes_f_grib_print_data_static | grep '99200 *values found' diff --git a/examples/F90/grib_samples.sh b/examples/F90/grib_samples.sh index bfdb4ab58..7f636f14c 100755 --- a/examples/F90/grib_samples.sh +++ b/examples/F90/grib_samples.sh @@ -16,12 +16,12 @@ cp ${data_dir}/regular_latlon_surface.grib1 ${data_dir}/regular_latlon_surface.g # Change the ECCODES_SAMPLES_PATH: put the data dir first ECCODES_SAMPLES_PATH=${data_dir}:${samples_dir} export ECCODES_SAMPLES_PATH -${examples_dir}eccodes_f_grib_samples > /dev/null +${examples_dir}/eccodes_f_grib_samples > /dev/null # Extend the ECCODES_SAMPLES_PATH: put the data dir second ECCODES_SAMPLES_PATH=${samples_dir}:${data_dir} export ECCODES_SAMPLES_PATH -${examples_dir}eccodes_f_grib_samples > /dev/null +${examples_dir}/eccodes_f_grib_samples > /dev/null rm -f f_out.samples.grib1 rm -f ${data_dir}/regular_latlon_surface.grib1.tmpl diff --git a/examples/F90/grib_set_bitmap.sh b/examples/F90/grib_set_bitmap.sh index 4fb077e11..75d37e0c4 100755 --- a/examples/F90/grib_set_bitmap.sh +++ b/examples/F90/grib_set_bitmap.sh @@ -12,7 +12,7 @@ OUT_TMP=out.set_bitmap_f.grib # The input and output files are hardcoded in the example -${examples_dir}eccodes_f_grib_set_bitmap +${examples_dir}/eccodes_f_grib_set_bitmap x=`${tools_dir}/grib_get -p numberOfDataPoints,numberOfCodedValues,numberOfMissing $OUT_TMP` [ "$x" = "496 486 10" ] diff --git a/examples/F90/grib_set_data.sh b/examples/F90/grib_set_data.sh index be198038a..fc02bf943 100755 --- a/examples/F90/grib_set_data.sh +++ b/examples/F90/grib_set_data.sh @@ -11,6 +11,6 @@ OUT=temp.f_grib_set_data.out.grib -${examples_dir}eccodes_f_grib_set_data $OUT +${examples_dir}/eccodes_f_grib_set_data $OUT rm -f $OUT diff --git a/examples/F90/grib_set_keys.sh b/examples/F90/grib_set_keys.sh index a35520e6f..d3a36614f 100755 --- a/examples/F90/grib_set_keys.sh +++ b/examples/F90/grib_set_keys.sh @@ -9,11 +9,11 @@ . ./include.sh -${examples_dir}eccodes_f_grib_set_keys > /dev/null +${examples_dir}/eccodes_f_grib_set_keys > /dev/null res=`${tools_dir}/grib_get -p centre out.set.grib1` [ "$res" = "cnmc" ] -${examples_dir}eccodes_f_grib_set_gvc > /dev/null +${examples_dir}/eccodes_f_grib_set_gvc > /dev/null res=`${tools_dir}/grib_get -p typeOfLevel,NV out_gvc.grib2` [ "$res" = "generalVertical 6" ] diff --git a/examples/F90/grib_set_missing.sh b/examples/F90/grib_set_missing.sh index e00fa41b6..7b5a17dbc 100755 --- a/examples/F90/grib_set_missing.sh +++ b/examples/F90/grib_set_missing.sh @@ -9,5 +9,5 @@ . ./include.sh -${examples_dir}eccodes_f_grib_set_missing > /dev/null +${examples_dir}/eccodes_f_grib_set_missing > /dev/null rm -f f_out_surface_level.grib2 diff --git a/examples/F90/grib_set_pv.sh b/examples/F90/grib_set_pv.sh index 0c89b8a14..1248ced63 100755 --- a/examples/F90/grib_set_pv.sh +++ b/examples/F90/grib_set_pv.sh @@ -9,5 +9,5 @@ . ./include.sh -${examples_dir}eccodes_f_grib_set_pv > /dev/null +${examples_dir}/eccodes_f_grib_set_pv > /dev/null rm -f out.pv.grib1 diff --git a/examples/F90/include.ctest.sh.in b/examples/F90/include.ctest.sh.in index 18fc550d6..d1d9079a8 100644 --- a/examples/F90/include.ctest.sh.in +++ b/examples/F90/include.ctest.sh.in @@ -16,7 +16,7 @@ ECCODES_DEFINITION_PATH="${def_dir}" export ECCODES_DEFINITION_PATH tools_dir=@CMAKE_BINARY_DIR@/bin -examples_dir=@CMAKE_CURRENT_BINARY_DIR@/ +examples_dir=@CMAKE_CURRENT_BINARY_DIR@ # If this environment variable is set, then run the # executables with valgrind diff --git a/examples/F90/include.sh b/examples/F90/include.sh index 11e1e5d36..40d0bee3a 100755 --- a/examples/F90/include.sh +++ b/examples/F90/include.sh @@ -32,13 +32,13 @@ else ECCODES_SAMPLES_PATH=$cpath/samples export ECCODES_SAMPLES_PATH tools_dir=$cpath/tools - examples_dir=$cpath/examples/F90/ + examples_dir=$cpath/examples/F90 data_dir=$cpath/data samples_dir=$cpath/samples if test "x$ECCODES_TEST_WITH_VALGRIND" != "x"; then tools_dir="valgrind --error-exitcode=1 -q $cpath/tools" - examples_dir="valgrind --error-exitcode=1 -q $cpath/examples/F90/" + examples_dir="valgrind --error-exitcode=1 -q $cpath/examples/F90" fi else diff --git a/examples/F90/read_from_file.sh b/examples/F90/read_from_file.sh index 3cab05604..e20fd9204 100755 --- a/examples/F90/read_from_file.sh +++ b/examples/F90/read_from_file.sh @@ -13,4 +13,4 @@ # Check program completed successfully. We have to resort to testing # the output as there is no way in Fortran to set the exit code # -${examples_dir}eccodes_f_read_from_file | grep 'Passed' +${examples_dir}/eccodes_f_read_from_file | grep 'Passed' diff --git a/examples/F90/read_message.sh b/examples/F90/read_message.sh index f43dbcd0c..25d995ae0 100755 --- a/examples/F90/read_message.sh +++ b/examples/F90/read_message.sh @@ -14,7 +14,7 @@ out=out.readmsg.grib rm -f $out | true -${examples_dir}eccodes_f_read_message > /dev/null +${examples_dir}/eccodes_f_read_message > /dev/null ${tools_dir}/grib_compare $in $out diff --git a/examples/deprecated/get.sh b/examples/deprecated/get.sh index 264ff005b..e5819ba0b 100755 --- a/examples/deprecated/get.sh +++ b/examples/deprecated/get.sh @@ -2,6 +2,6 @@ . ./include.sh -${examples_dir}get > /dev/null +${examples_dir}/get > /dev/null diff --git a/examples/deprecated/get_fortran.sh b/examples/deprecated/get_fortran.sh index cc9817b51..08b7f017d 100755 --- a/examples/deprecated/get_fortran.sh +++ b/examples/deprecated/get_fortran.sh @@ -2,6 +2,6 @@ . ./include.sh -${examples_dir}get_fortran > /dev/null +${examples_dir}/get_fortran > /dev/null diff --git a/examples/deprecated/include.sh b/examples/deprecated/include.sh index 95ecf4d83..28bf51a04 100644 --- a/examples/deprecated/include.sh +++ b/examples/deprecated/include.sh @@ -12,7 +12,7 @@ then ECCODES_SAMPLES_PATH=$cpath/templates export ECCODES_SAMPLES_PATH tools_dir=$cpath/tools - examples_dir=$cpath/examples/ + examples_dir=$cpath/examples data_dir=$cpath/data else echo "Skipping test $0" diff --git a/examples/deprecated/iterator.sh b/examples/deprecated/iterator.sh index a314f93e3..f226fa37e 100755 --- a/examples/deprecated/iterator.sh +++ b/examples/deprecated/iterator.sh @@ -2,7 +2,7 @@ . ./include.sh -${examples_dir}iterator ${data_dir}/reduced_gaussian_model_level.grib1 > /dev/null +${examples_dir}/iterator ${data_dir}/reduced_gaussian_model_level.grib1 > /dev/null -${examples_dir}iterator ${data_dir}/regular_gaussian_model_level.grib1 > /dev/null +${examples_dir}/iterator ${data_dir}/regular_gaussian_model_level.grib1 > /dev/null diff --git a/examples/deprecated/iterator_fortran.sh b/examples/deprecated/iterator_fortran.sh index ec38d52d9..45dd54c59 100755 --- a/examples/deprecated/iterator_fortran.sh +++ b/examples/deprecated/iterator_fortran.sh @@ -2,6 +2,6 @@ . ./include.sh -${examples_dir}iterator_fortran > /dev/null +${examples_dir}/iterator_fortran > /dev/null diff --git a/examples/deprecated/keys_iterator.sh b/examples/deprecated/keys_iterator.sh index cf83dc1d8..80b7becb4 100755 --- a/examples/deprecated/keys_iterator.sh +++ b/examples/deprecated/keys_iterator.sh @@ -2,7 +2,7 @@ . ./include.sh -${examples_dir}keys_iterator ${data_dir}/reduced_latlon_surface.grib1 > /dev/null +${examples_dir}/keys_iterator ${data_dir}/reduced_latlon_surface.grib1 > /dev/null -${examples_dir}keys_iterator ${data_dir}/regular_gaussian_model_level.grib1 > /dev/null +${examples_dir}/keys_iterator ${data_dir}/regular_gaussian_model_level.grib1 > /dev/null diff --git a/examples/deprecated/keys_iterator_fortran.sh b/examples/deprecated/keys_iterator_fortran.sh index 57ac528cd..1015b1b0a 100755 --- a/examples/deprecated/keys_iterator_fortran.sh +++ b/examples/deprecated/keys_iterator_fortran.sh @@ -2,6 +2,6 @@ . ./include.sh -${examples_dir}keys_iterator_fortran > /dev/null +${examples_dir}/keys_iterator_fortran > /dev/null diff --git a/examples/deprecated/multi.sh b/examples/deprecated/multi.sh index e4f691de3..9f2ac148c 100755 --- a/examples/deprecated/multi.sh +++ b/examples/deprecated/multi.sh @@ -7,6 +7,6 @@ then echo SKIP: $0 exit fi -${examples_dir}multi > /dev/null +${examples_dir}/multi > /dev/null diff --git a/examples/deprecated/multi_fortran.sh b/examples/deprecated/multi_fortran.sh index 38d3c9d37..6c4c8a1f6 100755 --- a/examples/deprecated/multi_fortran.sh +++ b/examples/deprecated/multi_fortran.sh @@ -8,6 +8,6 @@ then exit fi -${examples_dir}multi_fortran > /dev/null +${examples_dir}/multi_fortran > /dev/null diff --git a/examples/deprecated/precision.sh b/examples/deprecated/precision.sh index 7dcb0c5a7..4a0f05773 100755 --- a/examples/deprecated/precision.sh +++ b/examples/deprecated/precision.sh @@ -2,6 +2,6 @@ . ./include.sh -${examples_dir}precision > /dev/null +${examples_dir}/precision > /dev/null diff --git a/examples/deprecated/precision_fortran.sh b/examples/deprecated/precision_fortran.sh index 6b17b45ff..b149fc2ad 100755 --- a/examples/deprecated/precision_fortran.sh +++ b/examples/deprecated/precision_fortran.sh @@ -2,6 +2,6 @@ . ./include.sh -${examples_dir}precision_fortran > /dev/null +${examples_dir}/precision_fortran > /dev/null diff --git a/examples/deprecated/print_data.sh b/examples/deprecated/print_data.sh index b2db6e47f..fcd8dba75 100755 --- a/examples/deprecated/print_data.sh +++ b/examples/deprecated/print_data.sh @@ -2,7 +2,7 @@ . ./include.sh -numberOfValues=`${examples_dir}print_data ../data/constant_field.grib1 | grep values | awk '{print $1}'` +numberOfValues=`${examples_dir}/print_data ../data/constant_field.grib1 | grep values | awk '{print $1}'` if [ $numberOfValues -ne 99200 ] then diff --git a/examples/deprecated/print_data_fortran.sh b/examples/deprecated/print_data_fortran.sh index 96335f6b1..d5cf0ebf6 100755 --- a/examples/deprecated/print_data_fortran.sh +++ b/examples/deprecated/print_data_fortran.sh @@ -2,7 +2,7 @@ . ./include.sh -numberOfValues=`${examples_dir}print_data_fortran | grep values | awk '{print $1}'` +numberOfValues=`${examples_dir}/print_data_fortran | grep values | awk '{print $1}'` if [ $numberOfValues -ne 99200 ] then diff --git a/examples/deprecated/set.sh b/examples/deprecated/set.sh index 433107507..526f315ce 100755 --- a/examples/deprecated/set.sh +++ b/examples/deprecated/set.sh @@ -2,6 +2,6 @@ . ./include.sh -${examples_dir}set > /dev/null +${examples_dir}/set > /dev/null diff --git a/examples/deprecated/set_fortran.sh b/examples/deprecated/set_fortran.sh index fc761ef13..4177b9ff9 100755 --- a/examples/deprecated/set_fortran.sh +++ b/examples/deprecated/set_fortran.sh @@ -2,6 +2,6 @@ . ./include.sh -${examples_dir}set_fortran > /dev/null +${examples_dir}/set_fortran > /dev/null diff --git a/examples/extra/include.sh b/examples/extra/include.sh index 771fd9c6f..5262cc930 100755 --- a/examples/extra/include.sh +++ b/examples/extra/include.sh @@ -12,7 +12,7 @@ then ECCODES_SAMPLES_PATH=$cpath/samples export ECCODES_SAMPLES_PATH tools_dir=$cpath/tools - examples_dir=$cpath/examples/extra/ + examples_dir=$cpath/examples/extra data_dir=$cpath/data else echo "Skipping test $0" diff --git a/examples/python/include.ctest.sh.in b/examples/python/include.ctest.sh.in index ab36c2853..57c2ddb55 100644 --- a/examples/python/include.ctest.sh.in +++ b/examples/python/include.ctest.sh.in @@ -15,7 +15,7 @@ ECCODES_DEFINITION_PATH="${def_dir}" export ECCODES_DEFINITION_PATH tools_dir=@CMAKE_BINARY_DIR@/bin -examples_dir=@CMAKE_CURRENT_BINARY_DIR@/ +examples_dir=@CMAKE_CURRENT_BINARY_DIR@ examples_src=@CMAKE_CURRENT_SOURCE_DIR@/ # use samples from binary dir to test if installation will be correct