mirror of https://github.com/ecmwf/eccodes.git
Remove trailing / from tools_dir
This commit is contained in:
parent
2d59f77e0f
commit
710d01c7bc
|
@ -26,7 +26,7 @@ ${examples_dir}c_bufr_clone $f $fBufrTmp >$REDIRECT 2> $REDIRECT
|
|||
|
||||
#Compare clone to the original
|
||||
set +e
|
||||
${tools_dir}bufr_compare $f $fBufrTmp >$REDIRECT 2> $REDIRECT
|
||||
${tools_dir}/bufr_compare $f $fBufrTmp >$REDIRECT 2> $REDIRECT
|
||||
|
||||
#Check if clone is different
|
||||
if [ $? -eq 0 ]; then
|
||||
|
|
|
@ -57,7 +57,7 @@ ${examples_dir}c_bufr_copy_data ${INPUT} ${TEMP}
|
|||
|
||||
# The input and output BUFR messages should be different
|
||||
set +e
|
||||
${tools_dir}bufr_compare ${TEMP} ${INPUT} > ${MYLOG}
|
||||
${tools_dir}/bufr_compare ${TEMP} ${INPUT} > ${MYLOG}
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
|
|
|
@ -29,7 +29,7 @@ ${examples_dir}c_bufr_set_keys $fBufrTmp 2> $REDIRECT > $REDIRECT
|
|||
|
||||
#Compare modified to the original
|
||||
set +e
|
||||
${tools_dir}bufr_compare $f $fBufrTmp >$REDIRECT 2> $REDIRECT
|
||||
${tools_dir}/bufr_compare $f $fBufrTmp >$REDIRECT 2> $REDIRECT
|
||||
|
||||
#Check if modified is different
|
||||
if [ $? -eq 0 ]; then
|
||||
|
@ -40,7 +40,7 @@ fi
|
|||
set -e
|
||||
|
||||
#Check if modified has the same number of messages
|
||||
[ `${tools_dir}bufr_count $f` -eq `${tools_dir}bufr_count ${fBufrTmp}` ]
|
||||
[ `${tools_dir}/bufr_count $f` -eq `${tools_dir}/bufr_count ${fBufrTmp}` ]
|
||||
|
||||
#Clean up
|
||||
rm -f $fBufrTmp | true
|
||||
|
|
|
@ -13,10 +13,10 @@ TEMP=cloned.grib
|
|||
|
||||
INPUT=${data_dir}/reduced_gaussian_pressure_level.grib1
|
||||
${examples_dir}c_grib_clone ${INPUT} ${TEMP} > /dev/null
|
||||
${tools_dir}grib_compare ${INPUT} ${TEMP}
|
||||
${tools_dir}/grib_compare ${INPUT} ${TEMP}
|
||||
|
||||
INPUT=${data_dir}/sample.grib2
|
||||
${examples_dir}c_grib_clone ${INPUT} ${TEMP} > /dev/null
|
||||
${tools_dir}grib_compare ${INPUT} ${TEMP}
|
||||
${tools_dir}/grib_compare ${INPUT} ${TEMP}
|
||||
|
||||
rm -f ${TEMP}
|
||||
|
|
|
@ -13,10 +13,10 @@ TEMP=c_grib_copy_message.grib
|
|||
|
||||
INPUT=${data_dir}/reduced_gaussian_pressure_level.grib1
|
||||
${examples_dir}c_grib_copy_message ${INPUT} ${TEMP} > /dev/null
|
||||
${tools_dir}grib_compare -b hour ${INPUT} ${TEMP}
|
||||
${tools_dir}/grib_compare -b hour ${INPUT} ${TEMP}
|
||||
|
||||
INPUT=${data_dir}/sample.grib2
|
||||
${examples_dir}c_grib_copy_message ${INPUT} ${TEMP} > /dev/null
|
||||
${tools_dir}grib_compare -b hour ${INPUT} ${TEMP}
|
||||
${tools_dir}/grib_compare -b hour ${INPUT} ${TEMP}
|
||||
|
||||
rm -f ${TEMP}
|
||||
|
|
|
@ -16,11 +16,11 @@ then
|
|||
fi
|
||||
${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
|
||||
${tools_dir}/grib_get -p step ${data_dir}/multi_sample.grib2 > ${data_dir}/multi_step.test
|
||||
|
||||
diff ${data_dir}/multi_step.test ${data_dir}/multi_step.txt
|
||||
|
||||
step=`${tools_dir}grib_get -M -p step ${data_dir}/multi_sample.grib2`
|
||||
step=`${tools_dir}/grib_get -M -p step ${data_dir}/multi_sample.grib2`
|
||||
|
||||
[ $step -eq 12 ]
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ OUT_TMP=out.set_bitmap_c.grib
|
|||
# The input and output files are hardcoded in the example
|
||||
${examples_dir}c_grib_set_bitmap
|
||||
|
||||
x=`${tools_dir}grib_get -p numberOfDataPoints,numberOfCodedValues,numberOfMissing $OUT_TMP`
|
||||
x=`${tools_dir}/grib_get -p numberOfDataPoints,numberOfCodedValues,numberOfMissing $OUT_TMP`
|
||||
[ "$x" = "496 486 10" ]
|
||||
|
||||
rm -f $OUT_TMP
|
||||
|
|
|
@ -15,7 +15,7 @@ def_dir="@CMAKE_BINARY_DIR@/@ECCODES_DEFINITION_SUFF@"
|
|||
ECCODES_DEFINITION_PATH="${def_dir}"
|
||||
export ECCODES_DEFINITION_PATH
|
||||
|
||||
tools_dir=@CMAKE_BINARY_DIR@/bin/
|
||||
tools_dir=@CMAKE_BINARY_DIR@/bin
|
||||
examples_dir=@CMAKE_CURRENT_BINARY_DIR@/
|
||||
|
||||
# If this environment variable is set, then run the
|
||||
|
|
|
@ -32,11 +32,11 @@ else
|
|||
export ECCODES_DEFINITION_PATH
|
||||
ECCODES_SAMPLES_PATH=$cpath/samples
|
||||
export ECCODES_SAMPLES_PATH
|
||||
tools_dir=$cpath/tools/
|
||||
tools_dir=$cpath/tools
|
||||
examples_dir=$cpath/examples/C/
|
||||
|
||||
if test "x$ECCODES_TEST_WITH_VALGRIND" != "x"; then
|
||||
tools_dir="valgrind --error-exitcode=1 -q $cpath/tools/"
|
||||
tools_dir="valgrind --error-exitcode=1 -q $cpath/tools"
|
||||
examples_dir="valgrind --error-exitcode=1 -q $cpath/examples/C/"
|
||||
fi
|
||||
|
||||
|
@ -61,6 +61,6 @@ else
|
|||
# Download the data needed for tests
|
||||
${data_dir}/download.sh "${data_dir}"
|
||||
|
||||
#${tools_dir}codes_info
|
||||
#${tools_dir}/codes_info
|
||||
set -u
|
||||
fi
|
||||
|
|
|
@ -14,5 +14,5 @@ ${examples_dir}c_large_grib1
|
|||
|
||||
# Make sure the newly created file can be listed OK
|
||||
output=bigfile.grib
|
||||
${tools_dir}grib_ls $output > /dev/null
|
||||
${tools_dir}/grib_ls $output > /dev/null
|
||||
rm -f $output
|
||||
|
|
|
@ -19,7 +19,7 @@ ${examples_dir}c_sections_copy $REGUL_GRID_FILE $GAUSS_GRID_FILE g $OUTPUT >/dev
|
|||
|
||||
# Now the output should have a regular grid
|
||||
# but its date should be the same as the Gaussian grid sample
|
||||
grid_tmpl=`${tools_dir}grib_get -p gridType,date $OUTPUT`
|
||||
grid_tmpl=`${tools_dir}/grib_get -p gridType,date $OUTPUT`
|
||||
[ "$grid_tmpl" = "regular_ll 20100912" ]
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@ ${examples_dir}c_sections_copy $GAUSS_GRID_FILE $REGUL_GRID_FILE g $OUTPUT >/dev
|
|||
|
||||
# Now the output should have a gaussian grid
|
||||
# but its date should be the same as the regular grid
|
||||
grid_tmpl=`${tools_dir}grib_get -p gridType,date $OUTPUT`
|
||||
grid_tmpl=`${tools_dir}/grib_get -p gridType,date $OUTPUT`
|
||||
[ "$grid_tmpl" = "reduced_gg 20070323" ]
|
||||
|
||||
|
||||
|
@ -39,7 +39,7 @@ ${examples_dir}c_sections_copy $REGUL_GRID_FILE $GAUSS_GRID_FILE gp $OUTPUT >/de
|
|||
|
||||
# Now the output should have a regular grid
|
||||
# and its date should be the same as the regular latlon
|
||||
grid_tmpl=`${tools_dir}grib_get -p gridType,date $OUTPUT`
|
||||
grid_tmpl=`${tools_dir}/grib_get -p gridType,date $OUTPUT`
|
||||
[ "$grid_tmpl" = "regular_ll 20070323" ]
|
||||
|
||||
|
||||
|
@ -48,6 +48,6 @@ grid_tmpl=`${tools_dir}grib_get -p gridType,date $OUTPUT`
|
|||
${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
|
||||
${tools_dir}/grib_compare $REGUL_GRID_FILE $OUTPUT
|
||||
|
||||
rm -f $OUTPUT
|
||||
|
|
|
@ -26,7 +26,7 @@ ${examples_dir}/eccodes_f_bufr_clone >$REDIRECT 2> $REDIRECT
|
|||
|
||||
#Compare clone to the original
|
||||
set +e
|
||||
${tools_dir}bufr_compare $f $fBufrTmp >$REDIRECT 2> $REDIRECT
|
||||
${tools_dir}/bufr_compare $f $fBufrTmp >$REDIRECT 2> $REDIRECT
|
||||
|
||||
#Check if clone is different
|
||||
if [ $? -eq 0 ]; then
|
||||
|
|
|
@ -57,7 +57,7 @@ INPUT=metar_with_2_bias.bufr
|
|||
${examples_dir}eccodes_f_bufr_copy_data ${INPUT} ${TEMP}
|
||||
# The input and output BUFR messages should be different
|
||||
set +e
|
||||
${tools_dir}bufr_compare ${TEMP} ${INPUT} > ${MYLOG}
|
||||
${tools_dir}/bufr_compare ${TEMP} ${INPUT} > ${MYLOG}
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
|
|
|
@ -19,7 +19,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
|
||||
res=`${tools_dir}bufr_get -p bufrHeaderCentre $OUTPUT`
|
||||
res=`${tools_dir}/bufr_get -p bufrHeaderCentre $OUTPUT`
|
||||
[ "$res" = "80" ]
|
||||
|
||||
rm -f $OUTPUT
|
||||
|
|
|
@ -13,6 +13,6 @@ INPUT="../../data/bufr/syno_1.bufr"
|
|||
OUTPUT=out.copy.bufr
|
||||
|
||||
${examples_dir}eccodes_f_bufr_copy_message > /dev/null
|
||||
${tools_dir}bufr_compare -b bufrHeaderSubCentre $INPUT $OUTPUT
|
||||
${tools_dir}/bufr_compare -b bufrHeaderSubCentre $INPUT $OUTPUT
|
||||
|
||||
rm -f $OUTPUT
|
||||
|
|
|
@ -26,7 +26,7 @@ ${examples_dir}/eccodes_f_bufr_set_keys >$REDIRECT
|
|||
|
||||
#Compare modified file to the original
|
||||
set +e
|
||||
${tools_dir}bufr_compare $f $fBufrTmp >$REDIRECT
|
||||
${tools_dir}/bufr_compare $f $fBufrTmp >$REDIRECT
|
||||
|
||||
#Check if they are different
|
||||
if [ $? -eq 0 ]; then
|
||||
|
@ -37,7 +37,7 @@ fi
|
|||
set -e
|
||||
|
||||
#Check if modified file has the same number of messages
|
||||
[ `${tools_dir}bufr_count $f` = `${tools_dir}bufr_count ${fBufrTmp}` ]
|
||||
[ `${tools_dir}/bufr_count $f` = `${tools_dir}/bufr_count ${fBufrTmp}` ]
|
||||
|
||||
#Clean up
|
||||
rm -f ${fBufrTmp}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
. ./include.sh
|
||||
|
||||
|
||||
uuid=`${tools_dir}grib_get -w count=1 -p uuidOfVGrid:s ${data_dir}/test_uuid.grib2`
|
||||
uuid=`${tools_dir}/grib_get -w count=1 -p uuidOfVGrid:s ${data_dir}/test_uuid.grib2`
|
||||
[ "$uuid" = "08b1e836bc6911e1951fb51b5624ad8d" ]
|
||||
|
||||
# This reads the file in data/test_uuid.grib2 and creates test_uuid.grib2
|
||||
|
@ -21,7 +21,7 @@ output=out_uuid.grib2
|
|||
|
||||
[ -f "$output" ]
|
||||
|
||||
uuid=`${tools_dir}grib_get -w count=1 -p uuidOfVGrid:s $output`
|
||||
uuid=`${tools_dir}/grib_get -w count=1 -p uuidOfVGrid:s $output`
|
||||
[ "$uuid" = "8dad24561bb51f95e11169bc36e8b108" ]
|
||||
|
||||
rm -f $output
|
||||
|
|
|
@ -13,6 +13,6 @@ INPUT="../../data/constant_field.grib1"
|
|||
OUTPUT=out.copy.grib1
|
||||
|
||||
${examples_dir}eccodes_f_grib_copy_message > /dev/null
|
||||
${tools_dir}grib_compare -b centre $INPUT $OUTPUT
|
||||
${tools_dir}/grib_compare -b centre $INPUT $OUTPUT
|
||||
|
||||
rm -f $OUTPUT
|
||||
|
|
|
@ -13,14 +13,14 @@
|
|||
label="grib_copy_namespace_test_f"
|
||||
|
||||
INPUT=../../data/regular_latlon_surface.grib1
|
||||
res=`${tools_dir}grib_get -p Ni,Nj $INPUT`
|
||||
res=`${tools_dir}/grib_get -p Ni,Nj $INPUT`
|
||||
[ "$res" = "16 31" ]
|
||||
|
||||
#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
|
||||
|
||||
res=`${tools_dir}grib_get -p Ni,Nj $OUTPUT`
|
||||
res=`${tools_dir}/grib_get -p Ni,Nj $OUTPUT`
|
||||
[ "$res" = "MISSING 501" ]
|
||||
|
||||
rm -f $OUTPUT
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
${examples_dir}eccodes_f_grib_multi_write > /dev/null
|
||||
|
||||
${tools_dir}grib_compare ${data_dir}/multi_created.grib2 multi_created.grib2
|
||||
${tools_dir}/grib_compare ${data_dir}/multi_created.grib2 multi_created.grib2
|
||||
|
||||
rm -f multi_created.grib2
|
||||
|
||||
|
|
|
@ -14,7 +14,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
|
||||
|
||||
x=`${tools_dir}grib_get -p numberOfDataPoints,numberOfCodedValues,numberOfMissing $OUT_TMP`
|
||||
x=`${tools_dir}/grib_get -p numberOfDataPoints,numberOfCodedValues,numberOfMissing $OUT_TMP`
|
||||
[ "$x" = "496 486 10" ]
|
||||
|
||||
rm -f $OUT_TMP
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
. ./include.sh
|
||||
|
||||
${examples_dir}eccodes_f_grib_set_keys > /dev/null
|
||||
res=`${tools_dir}grib_get -p centre out.set.grib1`
|
||||
res=`${tools_dir}/grib_get -p centre out.set.grib1`
|
||||
[ "$res" = "cnmc" ]
|
||||
|
||||
${examples_dir}eccodes_f_grib_set_gvc > /dev/null
|
||||
res=`${tools_dir}grib_get -p typeOfLevel,NV out_gvc.grib2`
|
||||
res=`${tools_dir}/grib_get -p typeOfLevel,NV out_gvc.grib2`
|
||||
[ "$res" = "generalVertical 6" ]
|
||||
|
||||
rm -f out.set.grib1 out_gvc.grib2
|
||||
|
|
|
@ -15,7 +15,7 @@ def_dir="@CMAKE_BINARY_DIR@/@ECCODES_DEFINITION_SUFF@"
|
|||
ECCODES_DEFINITION_PATH="${def_dir}"
|
||||
export ECCODES_DEFINITION_PATH
|
||||
|
||||
tools_dir=@CMAKE_BINARY_DIR@/bin/
|
||||
tools_dir=@CMAKE_BINARY_DIR@/bin
|
||||
examples_dir=@CMAKE_CURRENT_BINARY_DIR@/
|
||||
|
||||
# If this environment variable is set, then run the
|
||||
|
|
|
@ -31,13 +31,13 @@ else
|
|||
export ECCODES_DEFINITION_PATH
|
||||
ECCODES_SAMPLES_PATH=$cpath/samples
|
||||
export ECCODES_SAMPLES_PATH
|
||||
tools_dir=$cpath/tools/
|
||||
tools_dir=$cpath/tools
|
||||
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/"
|
||||
tools_dir="valgrind --error-exitcode=1 -q $cpath/tools"
|
||||
examples_dir="valgrind --error-exitcode=1 -q $cpath/examples/F90/"
|
||||
fi
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ rm -f $out | true
|
|||
|
||||
${examples_dir}eccodes_f_read_message > /dev/null
|
||||
|
||||
${tools_dir}grib_compare $in $out
|
||||
${tools_dir}/grib_compare $in $out
|
||||
|
||||
rm -f $out
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ then
|
|||
export ECCODES_DEFINITION_PATH
|
||||
ECCODES_SAMPLES_PATH=$cpath/templates
|
||||
export ECCODES_SAMPLES_PATH
|
||||
tools_dir=$cpath/tools/
|
||||
tools_dir=$cpath/tools
|
||||
examples_dir=$cpath/examples/
|
||||
data_dir=$cpath/data
|
||||
else
|
||||
|
@ -31,7 +31,7 @@ then
|
|||
GRIB_API_LIB=`pwd`/src
|
||||
fi
|
||||
|
||||
#${tools_dir}codes_info
|
||||
#${tools_dir}/codes_info
|
||||
|
||||
set -u
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ then
|
|||
export ECCODES_DEFINITION_PATH
|
||||
ECCODES_SAMPLES_PATH=$cpath/samples
|
||||
export ECCODES_SAMPLES_PATH
|
||||
tools_dir=$cpath/tools/
|
||||
tools_dir=$cpath/tools
|
||||
examples_dir=$cpath/examples/extra/
|
||||
data_dir=$cpath/data
|
||||
else
|
||||
|
|
|
@ -57,7 +57,7 @@ INPUT=metar_with_2_bias.bufr
|
|||
$PYTHON ${examples_src}bufr_copy_data.py ${INPUT} ${TEMP}
|
||||
# The input and output BUFR messages should be different
|
||||
set +e
|
||||
${tools_dir}bufr_compare ${TEMP} ${INPUT} > ${MYLOG}
|
||||
${tools_dir}/bufr_compare ${TEMP} ${INPUT} > ${MYLOG}
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
|
|
|
@ -17,9 +17,9 @@ REDIRECT=/dev/null
|
|||
$PYTHON $examples_src/bufr_encode_flight.py $csv_in $bufr_in $fBufrTmp
|
||||
|
||||
# Make sure output is OK
|
||||
${tools_dir}bufr_dump $fBufrTmp > $REDIRECT
|
||||
${tools_dir}/bufr_dump $fBufrTmp > $REDIRECT
|
||||
|
||||
numSubsets=`${tools_dir}bufr_get -p numberOfSubsets $fBufrTmp`
|
||||
numSubsets=`${tools_dir}/bufr_get -p numberOfSubsets $fBufrTmp`
|
||||
[ "$numSubsets" = "185" ]
|
||||
|
||||
rm -f $fBufrTmp
|
||||
|
|
|
@ -28,7 +28,7 @@ $PYTHON $examples_src/bufr_set_keys.py 2> $REDIRECT > $REDIRECT
|
|||
|
||||
#Compare modified to the original
|
||||
set +e
|
||||
${tools_dir}/bufr_compare $f $fBufrTmp 1>$REDIRECT 2> $REDIRECT
|
||||
${tools_dir}//bufr_compare $f $fBufrTmp 1>$REDIRECT 2> $REDIRECT
|
||||
|
||||
#Check if modified is different
|
||||
if [ $? -eq 0 ]; then
|
||||
|
@ -39,7 +39,7 @@ fi
|
|||
set -e
|
||||
|
||||
#Check if modified has the same number of messages
|
||||
[ `${tools_dir}bufr_count $f` -eq `${tools_dir}/bufr_count ${fBufrTmp}` ]
|
||||
[ `${tools_dir}/bufr_count $f` -eq `${tools_dir}//bufr_count ${fBufrTmp}` ]
|
||||
|
||||
#Clean up
|
||||
rm -f $fBufrTmp
|
||||
|
|
|
@ -14,7 +14,7 @@ def_dir="@CMAKE_BINARY_DIR@/@ECCODES_DEFINITION_SUFF@"
|
|||
ECCODES_DEFINITION_PATH="${def_dir}"
|
||||
export ECCODES_DEFINITION_PATH
|
||||
|
||||
tools_dir=@CMAKE_BINARY_DIR@/bin/
|
||||
tools_dir=@CMAKE_BINARY_DIR@/bin
|
||||
examples_dir=@CMAKE_CURRENT_BINARY_DIR@/
|
||||
examples_src=@CMAKE_CURRENT_SOURCE_DIR@/
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ else
|
|||
export ECCODES_DEFINITION_PATH
|
||||
ECCODES_SAMPLES_PATH=$cpath/samples
|
||||
export ECCODES_SAMPLES_PATH
|
||||
tools_dir=$cpath/tools/
|
||||
tools_dir=$cpath/tools
|
||||
examples_dir=$cpath/examples/python
|
||||
data_dir=$cpath/data
|
||||
examples_src=$examples_dir
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
|
||||
REDIRECT=/dev/null
|
||||
|
||||
${tools_dir}grib_ls -7 ${data_dir}/bad.grib 2> $REDIRECT > $REDIRECT
|
||||
${tools_dir}/grib_ls -7 ${data_dir}/bad.grib 2> $REDIRECT > $REDIRECT
|
||||
|
||||
|
|
|
@ -20,20 +20,20 @@ outfile1=${data_dir}/without_bitmap.grib1
|
|||
|
||||
rm -f $outfile
|
||||
|
||||
${tools_dir}grib_set -s bitmapPresent=1 $infile $outfile >$REDIRECT
|
||||
${tools_dir}/grib_set -s bitmapPresent=1 $infile $outfile >$REDIRECT
|
||||
|
||||
${tools_dir}grib_dump -O $infile | grep -v FILE > $infile.dump
|
||||
${tools_dir}grib_dump -O $outfile | grep -v FILE > $outfile.dump
|
||||
${tools_dir}/grib_dump -O $infile | grep -v FILE > $infile.dump
|
||||
${tools_dir}/grib_dump -O $outfile | grep -v FILE > $outfile.dump
|
||||
|
||||
diff $outfile.dump ${data_dir}/bitmap.diff
|
||||
diff $infile.dump ${data_dir}/no_bitmap.diff
|
||||
|
||||
rm -f $infile.dump $outfile.dump || true
|
||||
|
||||
${tools_dir}grib_set -s bitmapPresent=0 $outfile $outfile1 >$REDIRECT
|
||||
${tools_dir}/grib_set -s bitmapPresent=0 $outfile $outfile1 >$REDIRECT
|
||||
|
||||
${tools_dir}grib_dump -O $outfile1 | grep -v FILE > $outfile1.dump
|
||||
${tools_dir}grib_dump -O $outfile | grep -v FILE> $outfile.dump
|
||||
${tools_dir}/grib_dump -O $outfile1 | grep -v FILE > $outfile1.dump
|
||||
${tools_dir}/grib_dump -O $outfile | grep -v FILE> $outfile.dump
|
||||
|
||||
diff $outfile1.dump ${data_dir}/no_bitmap.diff
|
||||
|
||||
|
@ -48,12 +48,12 @@ set values={1,2,3,4,5,6,7,1111,1111,8,9,10};
|
|||
write ;
|
||||
EOF
|
||||
|
||||
${tools_dir}grib_filter -o out.bmp.grib1 bitmap.rules $grib1
|
||||
${tools_dir}grib_filter -o out.bmp.grib2 bitmap.rules $grib2
|
||||
${tools_dir}/grib_filter -o out.bmp.grib1 bitmap.rules $grib1
|
||||
${tools_dir}/grib_filter -o out.bmp.grib2 bitmap.rules $grib2
|
||||
#exit 0
|
||||
|
||||
${tools_dir}grib_get_data -m missing out.bmp.grib1 > out.bmp.grib1.data
|
||||
${tools_dir}grib_get_data -m missing out.bmp.grib2 > out.bmp.grib2.data
|
||||
${tools_dir}/grib_get_data -m missing out.bmp.grib1 > out.bmp.grib1.data
|
||||
${tools_dir}/grib_get_data -m missing out.bmp.grib2 > out.bmp.grib2.data
|
||||
|
||||
diff out.bmp.grib1.data out.bmp.grib2.data
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ v.grib2
|
|||
for file in $files; do
|
||||
infile=${data_dir}/$file
|
||||
if [ -f "$infile" ]; then
|
||||
${tools_dir}grib_get -p bitsPerValue $infile >/dev/null
|
||||
${tools_dir}/grib_get -p bitsPerValue $infile >/dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -102,16 +102,16 @@ for file in `echo $files`; do
|
|||
outfile1=${infile}_bitsPerValue_1
|
||||
outfile2=${infile}_bitsPerValue_2
|
||||
|
||||
${tools_dir}grib_set -r -s bitsPerValue=10 $infile $outfile1
|
||||
${tools_dir}/grib_set -r -s bitsPerValue=10 $infile $outfile1
|
||||
|
||||
${tools_dir}grib_set -s setBitsPerValue=10 $infile $outfile2
|
||||
${tools_dir}/grib_set -s setBitsPerValue=10 $infile $outfile2
|
||||
|
||||
${tools_dir}grib_compare $outfile1 $outfile2
|
||||
${tools_dir}/grib_compare $outfile1 $outfile2
|
||||
|
||||
rm -f $outfile1 $outfile2 || true
|
||||
|
||||
done
|
||||
|
||||
# Extra test for grid_complex_spatial_differencing
|
||||
res=`${tools_dir}grib_get -p decimalScaleFactor,bitsPerValue ${data_dir}/gfs.c255.grib2`
|
||||
res=`${tools_dir}/grib_get -p decimalScaleFactor,bitsPerValue ${data_dir}/gfs.c255.grib2`
|
||||
[ "$res" = "1 20" ]
|
||||
|
|
|
@ -13,6 +13,6 @@
|
|||
|
||||
REDIRECT=/dev/null
|
||||
|
||||
${tools_dir}grib_ls ${data_dir}/budg > $REDIRECT
|
||||
${tools_dir}grib_dump ${data_dir}/budg > $REDIRECT
|
||||
${tools_dir}/grib_ls ${data_dir}/budg > $REDIRECT
|
||||
${tools_dir}/grib_dump ${data_dir}/budg > $REDIRECT
|
||||
|
||||
|
|
|
@ -23,10 +23,10 @@ for f in ${bufr_files}; do
|
|||
if [ "$f" = "ias1_240.bufr" ]; then continue; fi
|
||||
|
||||
# Convert to BUFR edition 4
|
||||
${tools_dir}bufr_set -s editionNumber=4 $f $fBufrTmp
|
||||
${tools_dir}bufr_compare -b edition $f $fBufrTmp
|
||||
${tools_dir}/bufr_set -s editionNumber=4 $f $fBufrTmp
|
||||
${tools_dir}/bufr_compare -b edition $f $fBufrTmp
|
||||
|
||||
ed=`${tools_dir}bufr_get -w count=1 -p editionNumber $fBufrTmp`
|
||||
ed=`${tools_dir}/bufr_get -w count=1 -p editionNumber $fBufrTmp`
|
||||
[ "$ed" = "4" ]
|
||||
|
||||
done
|
||||
|
|
|
@ -35,7 +35,7 @@ fRules=${label}.filter
|
|||
f="syno_1.bufr"
|
||||
echo "Test: comparing the same files" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}/bufr_compare $f $f >> $fLog
|
||||
${tools_dir}//bufr_compare $f $f >> $fLog
|
||||
|
||||
#----------------------------------------------------
|
||||
# Test: comparing two completely different files
|
||||
|
@ -45,7 +45,7 @@ f1="syno_1.bufr"
|
|||
f2="aaen_55.bufr"
|
||||
echo "Test: comparing two completely different files" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}/bufr_compare $f1 $f2 >> $fLog
|
||||
${tools_dir}//bufr_compare $f1 $f2 >> $fLog
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "bufr_compare should have failed if files are completely different" >&2
|
||||
exit 1
|
||||
|
@ -60,10 +60,10 @@ echo "Test: comparing with and witout the -b switch" >> $fLog
|
|||
echo "file: $f" >> $fLog
|
||||
|
||||
#Alter a key in the file
|
||||
${tools_dir}/bufr_set -s dataCategory=2 $f ${fBufrTmp} >> $fLog
|
||||
${tools_dir}//bufr_set -s dataCategory=2 $f ${fBufrTmp} >> $fLog
|
||||
|
||||
set +e
|
||||
${tools_dir}/bufr_compare $f ${fBufrTmp}>> $fLog
|
||||
${tools_dir}//bufr_compare $f ${fBufrTmp}>> $fLog
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "bufr_compare should have failed if files are different" >&2
|
||||
exit 1
|
||||
|
@ -71,7 +71,7 @@ fi
|
|||
set -e
|
||||
|
||||
# Now compare with -b switch. No difference should be found.
|
||||
${tools_dir}/bufr_compare -b dataCategory $f ${fBufrTmp}>> $fLog
|
||||
${tools_dir}//bufr_compare -b dataCategory $f ${fBufrTmp}>> $fLog
|
||||
|
||||
#----------------------------------------------------
|
||||
# Test: comparing with the -r switch
|
||||
|
@ -81,20 +81,20 @@ ${tools_dir}/bufr_compare -b dataCategory $f ${fBufrTmp}>> $fLog
|
|||
#cat temp_101.bufr syno_multi.bufr > $fBufrInput2
|
||||
|
||||
#set +e
|
||||
#${tools_dir}/bufr_compare ${fBufrInput1} ${fBufrInput2} >> $fLog
|
||||
#${tools_dir}//bufr_compare ${fBufrInput1} ${fBufrInput2} >> $fLog
|
||||
#if [ $? -eq 0 ]; then
|
||||
# echo "bufr_compare should have failed if the message order in the files is different" >&2
|
||||
# exit 1
|
||||
#fi
|
||||
#set -e
|
||||
#${tools_dir}/bufr_compare -r ${fBufrInput1} ${fBufrInput2}>> $fLog
|
||||
#${tools_dir}//bufr_compare -r ${fBufrInput1} ${fBufrInput2}>> $fLog
|
||||
|
||||
#----------------------------------------------------
|
||||
# Change subCentre and compare
|
||||
#----------------------------------------------------
|
||||
${tools_dir}bufr_set -s bufrHeaderSubCentre=12 aaen_55.bufr $fBufrTmp
|
||||
${tools_dir}/bufr_set -s bufrHeaderSubCentre=12 aaen_55.bufr $fBufrTmp
|
||||
set +e
|
||||
${tools_dir}bufr_compare aaen_55.bufr $fBufrTmp > $fLog 2>&1
|
||||
${tools_dir}/bufr_compare aaen_55.bufr $fBufrTmp > $fLog 2>&1
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
|
@ -107,14 +107,14 @@ temp_dir=tempdir.${label}
|
|||
mkdir -p $temp_dir
|
||||
infile=aaen_55.bufr
|
||||
cp $infile $temp_dir
|
||||
${tools_dir}bufr_compare $infile $temp_dir >/dev/null
|
||||
${tools_dir}/bufr_compare $infile $temp_dir >/dev/null
|
||||
rm -fr $temp_dir
|
||||
|
||||
#----------------------------------------------------
|
||||
# Compare attributes
|
||||
#----------------------------------------------------
|
||||
set +e
|
||||
${tools_dir}bufr_compare amv2_87.bufr amv3_87.bufr > $fLog 2>&1
|
||||
${tools_dir}/bufr_compare amv2_87.bufr amv3_87.bufr > $fLog 2>&1
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
|
@ -134,9 +134,9 @@ cat > $fRules <<EOF
|
|||
set pack=1;
|
||||
write;
|
||||
EOF
|
||||
${tools_dir}codes_bufr_filter -o $fBufrTmp $fRules $f
|
||||
${tools_dir}/codes_bufr_filter -o $fBufrTmp $fRules $f
|
||||
# Header keys have not changed
|
||||
${tools_dir}bufr_compare -H $f $fBufrTmp
|
||||
${tools_dir}/bufr_compare -H $f $fBufrTmp
|
||||
|
||||
#Clean up
|
||||
rm -f $fLog $fBufrTmp $fBufrInput1 $fBufrInput2 $fRules
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
cd ${data_dir}/bufr
|
||||
|
||||
# counting messages
|
||||
count=`${tools_dir}bufr_count syno_multi.bufr`
|
||||
count=`${tools_dir}/bufr_count syno_multi.bufr`
|
||||
#[ "$count" = "3" ]
|
||||
count=`${tools_dir}codes_count syno_multi.bufr`
|
||||
count=`${tools_dir}/codes_count syno_multi.bufr`
|
||||
[ "$count" = "3" ]
|
||||
|
|
|
@ -29,7 +29,7 @@ REDIRECT=/dev/null
|
|||
|
||||
for file in ${bufr_files}
|
||||
do
|
||||
${tools_dir}bufr_dump -O ${data_dir}/bufr/$file >/dev/null
|
||||
${tools_dir}/bufr_dump -O ${data_dir}/bufr/$file >/dev/null
|
||||
done
|
||||
|
||||
#==============================================
|
||||
|
@ -39,11 +39,11 @@ file="aaen_55.bufr"
|
|||
export ECCODES_DEBUG=1
|
||||
|
||||
# By default debug output goes to stderr
|
||||
${tools_dir}bufr_dump -O ${data_dir}/bufr/$file 2>&1 | grep -q "BUFR data .*ing"
|
||||
${tools_dir}/bufr_dump -O ${data_dir}/bufr/$file 2>&1 | grep -q "BUFR data .*ing"
|
||||
|
||||
# Redirect it to stdout
|
||||
export ECCODES_LOG_STREAM=stdout
|
||||
${tools_dir}bufr_dump -O ${data_dir}/bufr/$file | grep -q "BUFR data .*ing"
|
||||
${tools_dir}/bufr_dump -O ${data_dir}/bufr/$file | grep -q "BUFR data .*ing"
|
||||
|
||||
unset ECCODES_DEBUG
|
||||
unset ECCODES_LOG_STREAM
|
||||
|
@ -62,7 +62,7 @@ unset ECCODES_LOG_STREAM
|
|||
# In v0.16.0 we changed the shortNames so we use a newer ref file
|
||||
#fJsonRef=${data_dir}/bufr/"bad.bufr.json.v0.16.0.ref"
|
||||
|
||||
#${tools_dir}bufr_dump -js $fBufr > $fJsonTmp
|
||||
#${tools_dir}/bufr_dump -js $fBufr > $fJsonTmp
|
||||
|
||||
#diff $fJsonTmp $fJsonRef
|
||||
|
||||
|
@ -77,7 +77,7 @@ unset ECCODES_LOG_STREAM
|
|||
#fBufr=${data_dir}/bufr/"207003.bufr"
|
||||
#fJsonRef=${data_dir}/bufr/"207003.bufr.json.ref"
|
||||
#
|
||||
#${tools_dir}bufr_dump -ja $fBufr > $fJsonTmp
|
||||
#${tools_dir}/bufr_dump -ja $fBufr > $fJsonTmp
|
||||
#
|
||||
#diff $fJsonTmp $fJsonRef
|
||||
#
|
||||
|
|
|
@ -60,7 +60,7 @@ do
|
|||
filePath=${data_dir}/bufr/$file
|
||||
|
||||
# Generate C code from BUFR file
|
||||
${tools_dir}bufr_dump -DC $filePath > $tempSrc
|
||||
${tools_dir}/bufr_dump -DC $filePath > $tempSrc
|
||||
|
||||
# Too large for this test
|
||||
if [ "$file" = "ias1_240.bufr" ]; then
|
||||
|
|
|
@ -46,9 +46,9 @@ do
|
|||
echo "Test: bufr_dump -Dfilter " >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
|
||||
${tools_dir}bufr_dump -Dfilter $f > $fRules
|
||||
${tools_dir}/bufr_dump -Dfilter $f > $fRules
|
||||
|
||||
${tools_dir}bufr_filter $fRules $f >/dev/null
|
||||
${tools_dir}/bufr_filter $fRules $f >/dev/null
|
||||
|
||||
rm -f $fRules
|
||||
fi
|
||||
|
|
|
@ -59,7 +59,7 @@ do
|
|||
filePath=${data_dir}/bufr/$file
|
||||
|
||||
# Generate F90 code from BUFR file
|
||||
${tools_dir}bufr_dump -Dfortran ${filePath} > $tempSrc
|
||||
${tools_dir}/bufr_dump -Dfortran ${filePath} > $tempSrc
|
||||
|
||||
# Too large for this test
|
||||
if [ "$file" = "ias1_240.bufr" ]; then
|
||||
|
|
|
@ -36,7 +36,7 @@ do
|
|||
fi
|
||||
|
||||
# Generate Python code from BUFR file
|
||||
${tools_dir}bufr_dump -Dpython $inputBufr > $tempSrc
|
||||
${tools_dir}/bufr_dump -Dpython $inputBufr > $tempSrc
|
||||
|
||||
$PYTHON $tempSrc $inputBufr
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ do
|
|||
tempExe=$label.$file.exe
|
||||
|
||||
# Generate C code from BUFR file
|
||||
${tools_dir}bufr_dump -EC ${data_dir}/bufr/$file > $tempSrc
|
||||
${tools_dir}/bufr_dump -EC ${data_dir}/bufr/$file > $tempSrc
|
||||
|
||||
# Too large for this test
|
||||
if [ "$file" = "ias1_240.bufr" ]; then
|
||||
|
@ -79,12 +79,12 @@ do
|
|||
# The executable always creates a file called outfile.bufr
|
||||
# valgrind --error-exitcode=1 ./$tempExe
|
||||
./$tempExe
|
||||
${tools_dir}bufr_compare ${data_dir}/bufr/$file $tempBufr
|
||||
${tools_dir}/bufr_compare ${data_dir}/bufr/$file $tempBufr
|
||||
|
||||
TEMP_JSON1=${label}.$file.json
|
||||
TEMP_JSON2=${label}.$tempBufr.json
|
||||
${tools_dir}bufr_dump ${data_dir}/bufr/$file > $TEMP_JSON1
|
||||
${tools_dir}bufr_dump $tempBufr > $TEMP_JSON2
|
||||
${tools_dir}/bufr_dump ${data_dir}/bufr/$file > $TEMP_JSON1
|
||||
${tools_dir}/bufr_dump $tempBufr > $TEMP_JSON2
|
||||
diff $TEMP_JSON1 $TEMP_JSON2
|
||||
rm -f $TEMP_JSON1 $TEMP_JSON2
|
||||
fi
|
||||
|
|
|
@ -49,15 +49,15 @@ do
|
|||
echo "Test: bufr_dump -Efilter " >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
|
||||
${tools_dir}bufr_dump -Efilter $f > $fRules
|
||||
${tools_dir}/bufr_dump -Efilter $f > $fRules
|
||||
|
||||
${tools_dir}bufr_filter -o $fBufrTmp $fRules $f
|
||||
${tools_dir}bufr_compare $fBufrTmp $f
|
||||
${tools_dir}/bufr_filter -o $fBufrTmp $fRules $f
|
||||
${tools_dir}/bufr_compare $fBufrTmp $f
|
||||
|
||||
TEMP_JSON1=${label}.$f.json
|
||||
TEMP_JSON2=${label}.$fBufrTmp.json
|
||||
${tools_dir}bufr_dump $f > $TEMP_JSON1
|
||||
${tools_dir}bufr_dump $fBufrTmp > $TEMP_JSON2
|
||||
${tools_dir}/bufr_dump $f > $TEMP_JSON1
|
||||
${tools_dir}/bufr_dump $fBufrTmp > $TEMP_JSON2
|
||||
diff $TEMP_JSON1 $TEMP_JSON2
|
||||
rm -f $TEMP_JSON1 $TEMP_JSON2
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ do
|
|||
tempExe=$label.$file.exe
|
||||
|
||||
# Generate F90 code from BUFR file
|
||||
${tools_dir}bufr_dump -Efortran ${data_dir}/bufr/$file > $tempSrc
|
||||
${tools_dir}/bufr_dump -Efortran ${data_dir}/bufr/$file > $tempSrc
|
||||
|
||||
# Too large for this test
|
||||
if [ "$file" = "ias1_240.bufr" ]; then
|
||||
|
@ -71,12 +71,12 @@ do
|
|||
# The executable always creates a file called outfile.bufr
|
||||
# valgrind --error-exitcode=1 ./$tempExe
|
||||
./$tempExe
|
||||
${tools_dir}bufr_compare ${data_dir}/bufr/$file $tempBufr
|
||||
${tools_dir}/bufr_compare ${data_dir}/bufr/$file $tempBufr
|
||||
|
||||
TEMP_JSON1=${label}.$file.json
|
||||
TEMP_JSON2=${label}.$tempBufr.json
|
||||
${tools_dir}bufr_dump ${data_dir}/bufr/$file > $TEMP_JSON1
|
||||
${tools_dir}bufr_dump $tempBufr > $TEMP_JSON2
|
||||
${tools_dir}/bufr_dump ${data_dir}/bufr/$file > $TEMP_JSON1
|
||||
${tools_dir}/bufr_dump $tempBufr > $TEMP_JSON2
|
||||
diff $TEMP_JSON1 $TEMP_JSON2
|
||||
rm -f $TEMP_JSON1 $TEMP_JSON2
|
||||
fi
|
||||
|
|
|
@ -35,17 +35,17 @@ do
|
|||
fi
|
||||
|
||||
# Generate Python code from BUFR file
|
||||
${tools_dir}bufr_dump -Epython $inputBufr > $tempSrc
|
||||
${tools_dir}/bufr_dump -Epython $inputBufr > $tempSrc
|
||||
# The python code always creates an output file called outfile.bufr
|
||||
$PYTHON $tempSrc
|
||||
|
||||
# Check original BUFR file against one we generated from sample
|
||||
${tools_dir}bufr_compare $inputBufr $tempBufr
|
||||
${tools_dir}/bufr_compare $inputBufr $tempBufr
|
||||
|
||||
TEMP_JSON1=${label}.$file.json
|
||||
TEMP_JSON2=${label}.$tempBufr.json
|
||||
${tools_dir}bufr_dump $inputBufr > $TEMP_JSON1
|
||||
${tools_dir}bufr_dump $tempBufr > $TEMP_JSON2
|
||||
${tools_dir}/bufr_dump $inputBufr > $TEMP_JSON1
|
||||
${tools_dir}/bufr_dump $tempBufr > $TEMP_JSON2
|
||||
diff $TEMP_JSON1 $TEMP_JSON2 2>/dev/null
|
||||
rm -f $TEMP_JSON1 $TEMP_JSON2
|
||||
|
||||
|
|
|
@ -44,8 +44,8 @@ EOF
|
|||
bufr_files=`cat bufr_data_files.txt`
|
||||
for f in ${bufr_files} ; do
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f >> $fLog
|
||||
${tools_dir}bufr_filter $fRules $f >> $fLog # See ECC-205
|
||||
${tools_dir}/codes_bufr_filter $fRules $f >> $fLog
|
||||
${tools_dir}/bufr_filter $fRules $f >> $fLog # See ECC-205
|
||||
done
|
||||
|
||||
#-----------------------------------------------------------
|
||||
|
@ -60,7 +60,7 @@ EOF
|
|||
f="syno_multi.bufr"
|
||||
echo "Test: dump SYNOP values" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f >> $fLog
|
||||
${tools_dir}/codes_bufr_filter $fRules $f >> $fLog
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Test: filter SYNOP message according to conditions
|
||||
|
@ -81,7 +81,7 @@ rm -f $fBufrTmp | true
|
|||
f="syno_multi.bufr"
|
||||
echo "Test: filter SYNOP message according to conditions" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f >> $fLog
|
||||
${tools_dir}/codes_bufr_filter $fRules $f >> $fLog
|
||||
|
||||
#Check if the resulting bufr message is the right one
|
||||
cat > $fRules <<EOF
|
||||
|
@ -90,7 +90,7 @@ transient statid=1000*blockNumber+stationNumber;
|
|||
print "[statid]";
|
||||
EOF
|
||||
|
||||
[ `${tools_dir}codes_bufr_filter $fRules $fBufrTmp` = "1003" ]
|
||||
[ `${tools_dir}/codes_bufr_filter $fRules $fBufrTmp` = "1003" ]
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Test: splitting according to keys
|
||||
|
@ -110,7 +110,7 @@ EOF
|
|||
f="syno_multi.bufr"
|
||||
echo "Test: splitting according to keys" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f >> $fLog
|
||||
${tools_dir}/codes_bufr_filter $fRules $f >> $fLog
|
||||
|
||||
#Check if the resulting files exist
|
||||
for statid in 1 3 7 ; do
|
||||
|
@ -137,9 +137,9 @@ EOF
|
|||
f="syno_1.bufr"
|
||||
echo "Test: attributes" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
cat > ${f}.ref <<EOF
|
||||
pressure=100910 Pa
|
||||
pressure->code=010004
|
||||
|
@ -169,9 +169,9 @@ EOF
|
|||
f="temp_101.bufr"
|
||||
echo "Test: access element by rank" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
cat > ${f}.ref <<EOF
|
||||
pressure=98500 Pa
|
||||
pressure=102000 101800 100000 98500 96400 92500 92100 89700
|
||||
|
@ -203,9 +203,9 @@ EOF
|
|||
f="b005_89.bufr"
|
||||
echo "Test: access marker operators" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
cat > ${f}.ref <<EOF
|
||||
brightnessTemperature={-1e+100,290.8,-1e+100,289.7,289.5,289.5,289.4,287.5,
|
||||
287.4,288.3,288.2,-1e+100,-1e+100,-1e+100,-1e+100,-1e+100,
|
||||
|
@ -277,9 +277,9 @@ EOF
|
|||
f="temp_101.bufr"
|
||||
echo "Test: access marker operators 2" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
cat > ${f}.ref <<EOF
|
||||
pressure=102000 101800 100000 98500 96400 92500 92100 89700
|
||||
88100 86100 85000 84400 79400 79000 78300 77300
|
||||
|
@ -328,10 +328,10 @@ EOF
|
|||
f="asca_139.bufr"
|
||||
echo "Test: access by condition" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
rm -f ${f}.log
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
|
||||
REFERENCE_FILE="../../tests/asca_139.t1.ref"
|
||||
diff $REFERENCE_FILE ${f}.log
|
||||
|
@ -354,9 +354,9 @@ EOF
|
|||
f="temp_101.bufr"
|
||||
echo "Test: access by condition 2" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
cat > ${f}.ref <<EOF
|
||||
----- /verticalSoundingSignificance=4/airTemperature -----
|
||||
272.1 269.5 268.1 267.9 266.7 266.1 264.9 264.9
|
||||
|
@ -412,8 +412,8 @@ rm -f ${f}.ref ${f}.log
|
|||
#echo "set -x" > $testScript1
|
||||
#chmod +x $testScript1
|
||||
|
||||
#${tools_dir}codes_bufr_filter $fRulesReady $f 2>> $fLog 1>> $testScript
|
||||
#sed -e "s:diff:${tools_dir}bufr_compare:" < $testScript >> $testScript1
|
||||
#${tools_dir}/codes_bufr_filter $fRulesReady $f 2>> $fLog 1>> $testScript
|
||||
#sed -e "s:diff:${tools_dir}/bufr_compare:" < $testScript >> $testScript1
|
||||
#./$testScript1
|
||||
#rm -f new_*bufr
|
||||
#rm -f $testScript $testScript1
|
||||
|
@ -449,9 +449,9 @@ for f in $files
|
|||
do
|
||||
echo "Test: packing " >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter -o ${f}.out $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter -o ${f}.out $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
${tools_dir}bufr_compare ${f}.out $f
|
||||
${tools_dir}/bufr_compare ${f}.out $f
|
||||
|
||||
rm -f ${f}.out
|
||||
done
|
||||
|
@ -470,9 +470,9 @@ EOF
|
|||
f="ship_9.bufr"
|
||||
echo "Test: get string" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
cat > ${f}.ref <<EOF
|
||||
WYM9567
|
||||
EOF
|
||||
|
@ -494,9 +494,9 @@ EOF
|
|||
f="synop_multi_subset.bufr"
|
||||
echo "Test: get string array and stringValues" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
cat > ${f}.ref <<EOF
|
||||
TROMSO-HOLT
|
||||
PASVIK
|
||||
|
@ -546,7 +546,7 @@ set +e
|
|||
f="syno_1.bufr"
|
||||
echo "Test: nonexistent keys" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "bufr_filter should have failed if key not found" >&2
|
||||
exit 1
|
||||
|
@ -554,7 +554,7 @@ fi
|
|||
set -e
|
||||
|
||||
# Now repeat with -f option (do not exit on error)
|
||||
${tools_dir}codes_bufr_filter -f $fRules $f 2>>$fLog 1>>$fLog
|
||||
${tools_dir}/codes_bufr_filter -f $fRules $f 2>>$fLog 1>>$fLog
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
|
@ -572,7 +572,7 @@ set +e
|
|||
f="syno_1.bufr"
|
||||
echo "Test: not allowed key values" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "bufr_filter should have failed if key value is not allowed" >&2
|
||||
exit 1
|
||||
|
@ -580,7 +580,7 @@ fi
|
|||
set -e
|
||||
|
||||
# Now repeat with -f option (do not exit on error)
|
||||
${tools_dir}codes_bufr_filter -f $fRules $f 2>>$fLog 1>>$fLog
|
||||
${tools_dir}/codes_bufr_filter -f $fRules $f 2>>$fLog 1>>$fLog
|
||||
|
||||
|
||||
#----------------------------------------------------
|
||||
|
@ -598,7 +598,7 @@ EOF
|
|||
f="syno_1.bufr"
|
||||
echo "Test: nformat specifier for integer keys" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
result=`${tools_dir}codes_bufr_filter $fRules $f`
|
||||
result=`${tools_dir}/codes_bufr_filter $fRules $f`
|
||||
#[ "$result" = "centre=098, height= 3" ]
|
||||
|
||||
|
||||
|
@ -621,7 +621,7 @@ rm -f $fBufrTmp | true
|
|||
f="syno_1.bufr"
|
||||
echo "Test: setting keys" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
#${tools_dir}codes_bufr_filter -o $fBufrTmp $fRules $f >> $fLog
|
||||
#${tools_dir}/codes_bufr_filter -o $fBufrTmp $fRules $f >> $fLog
|
||||
|
||||
#Check if the resulting bufr message is the right one
|
||||
cat > $fRules <<EOF
|
||||
|
@ -629,7 +629,7 @@ set unpack=1;
|
|||
print "[typicalDate] [year] [airTemperatureAt2M%.1f]";
|
||||
EOF
|
||||
|
||||
#[ `${tools_dir}codes_bufr_filter $fRules $fBufrTmp` = "20010511 2001 234.5" ]
|
||||
#[ `${tools_dir}/codes_bufr_filter $fRules $fBufrTmp` = "20010511 2001 234.5" ]
|
||||
|
||||
#Clean up
|
||||
rm -f ${dSplit}/*
|
||||
|
@ -652,8 +652,8 @@ write;
|
|||
|
||||
EOF
|
||||
|
||||
${tools_dir}codes_bufr_filter -o ${f}.out $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}bufr_compare ${f}.out $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter -o ${f}.out $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/bufr_compare ${f}.out $f 2>> $fLog 1>> $fLog
|
||||
|
||||
rm -f ${f}.out
|
||||
|
||||
|
@ -671,8 +671,8 @@ set BufrTemplate="synopLand";
|
|||
write;
|
||||
EOF
|
||||
|
||||
${tools_dir}codes_bufr_filter -o $fOut $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}bufr_compare $fOut $fRef 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter -o $fOut $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/bufr_compare $fOut $fRef 2>> $fLog 1>> $fLog
|
||||
|
||||
rm -f $fOut
|
||||
|
||||
|
@ -684,8 +684,8 @@ set BufrTemplate="aircraftReportWithSecondsAndPressure";
|
|||
write;
|
||||
EOF
|
||||
|
||||
${tools_dir}codes_bufr_filter -o $fOut $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}bufr_compare $fOut $fRef 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter -o $fOut $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/bufr_compare $fOut $fRef 2>> $fLog 1>> $fLog
|
||||
|
||||
rm -f $fOut
|
||||
|
||||
|
@ -713,8 +713,8 @@ write;
|
|||
|
||||
EOF
|
||||
|
||||
${tools_dir}codes_bufr_filter -o ${fout} $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}bufr_compare $fout ${fout}.ref 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter -o ${fout} $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/bufr_compare $fout ${fout}.ref 2>> $fLog 1>> $fLog
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# ECC-147
|
||||
|
@ -728,10 +728,10 @@ write;
|
|||
EOF
|
||||
|
||||
f="syno_1.bufr"
|
||||
${tools_dir}codes_bufr_filter -o ${f}.out $fRules $f
|
||||
${tools_dir}/codes_bufr_filter -o ${f}.out $fRules $f
|
||||
# This part of the test is meant to fail
|
||||
set +e
|
||||
${tools_dir}bufr_compare ${f}.out $f
|
||||
${tools_dir}/bufr_compare ${f}.out $f
|
||||
status=$?
|
||||
set -e
|
||||
if [ $status -eq 0 ]; then
|
||||
|
@ -739,7 +739,7 @@ if [ $status -eq 0 ]; then
|
|||
exit 1
|
||||
fi
|
||||
# Now blacklist the failing keys and it should pass
|
||||
${tools_dir}bufr_compare -b relativeHumidity,horizontalVisibility ${f}.out $f
|
||||
${tools_dir}/bufr_compare -b relativeHumidity,horizontalVisibility ${f}.out $f
|
||||
|
||||
rm -f ${f}.out
|
||||
|
||||
|
@ -763,9 +763,9 @@ EOF
|
|||
f="synop_multi_subset.bufr"
|
||||
echo "Test: access subsets by condition" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
cat > ${f}.ref <<EOF
|
||||
stationId=01371
|
||||
latitude=61.122
|
||||
|
@ -793,9 +793,9 @@ EOF
|
|||
f="amda_144.bufr"
|
||||
echo "Test: access subsets and attribute by condition" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
cat > ${f}.ref <<EOF
|
||||
/subsetNumber=1/airTemperature->percentConfidence=70 %
|
||||
EOF
|
||||
|
@ -816,9 +816,9 @@ EOF
|
|||
f="temp_101.bufr"
|
||||
echo "Test: set key by rank" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
${tools_dir}codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
${tools_dir}/codes_bufr_filter $fRules $f 2> ${f}.log 1> ${f}.log
|
||||
cat > ${f}.ref <<EOF
|
||||
#4#airTemperature=300.1
|
||||
EOF
|
||||
|
@ -861,9 +861,9 @@ f="syno_1.bufr"
|
|||
fOut="new_replication.bufr"
|
||||
echo "Test: initialise with given values of delayed replications" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter -o ${fOut} $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter -o ${fOut} $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
${tools_dir}codes_bufr_filter -o ${fOut} $fRules $f > ${fOut}.log
|
||||
${tools_dir}/codes_bufr_filter -o ${fOut} $fRules $f > ${fOut}.log
|
||||
|
||||
cat > ${fOut}.log.ref <<EOF
|
||||
inputDelayedDescriptorReplicationFactor=2 3
|
||||
|
@ -877,7 +877,7 @@ pressure={102400,50000,40000,30000,20000,15000,102400,50000,40000,30000,20000,15
|
|||
EOF
|
||||
|
||||
diff ${fOut}.log.ref ${fOut}.log
|
||||
${tools_dir}bufr_compare ${fOut} ${fOut}.ref
|
||||
${tools_dir}/bufr_compare ${fOut} ${fOut}.ref
|
||||
|
||||
rm -f ${fOut}.log
|
||||
rm -f $fLog $fRules ${fOut}
|
||||
|
@ -896,9 +896,9 @@ if [ -f "$f" ]; then
|
|||
fOut="vos308014_v3_26_sec_2.bufr"
|
||||
echo "Test: initialise with given values of delayed replications" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter -o ${fOut} $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter -o ${fOut} $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
${tools_dir}bufr_ls ${fOut} > ${fOut}.log
|
||||
${tools_dir}/bufr_ls ${fOut} > ${fOut}.log
|
||||
|
||||
cat > ${fOut}.log.ref <<EOF
|
||||
vos308014_v3_26_sec_2.bufr
|
||||
|
@ -944,14 +944,14 @@ fOut="extract.bufr"
|
|||
|
||||
echo "Test: extract subsets uncompressed data" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter -o ${fOut} $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/codes_bufr_filter -o ${fOut} $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
cat > ${fRules} <<EOF
|
||||
set unpack=1;
|
||||
print "stationNumber=[stationNumber!13]";
|
||||
EOF
|
||||
|
||||
${tools_dir}codes_bufr_filter $fRules $f $fOut > ${fOut}.log
|
||||
${tools_dir}/codes_bufr_filter $fRules $f $fOut > ${fOut}.log
|
||||
|
||||
cat > ${fOut}.log.ref <<EOF
|
||||
stationNumber=27 84 270 272 308 371 381 382 387 413 464 485
|
||||
|
@ -980,7 +980,7 @@ f="profiler_european.bufr"
|
|||
|
||||
echo "Test: associatedField" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}codes_bufr_filter $fRules $f > ${f}.log
|
||||
${tools_dir}/codes_bufr_filter $fRules $f > ${f}.log
|
||||
|
||||
cat > ${f}.log.ref <<EOF
|
||||
/height=918/windDirection->associatedField=1
|
||||
|
@ -1013,7 +1013,7 @@ fOut="g2nd_208.bufr.out"
|
|||
|
||||
echo "Test: extract subsets compressed data" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}bufr_filter -o $fOut $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/bufr_filter -o $fOut $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
cat > ${fRules} <<EOF
|
||||
set unpack=1;
|
||||
|
@ -1025,7 +1025,7 @@ print "orbitNumber=[orbitNumber!10]";
|
|||
print "casRegistryNumber=[casRegistryNumber!10]";
|
||||
EOF
|
||||
|
||||
${tools_dir}bufr_filter $fRules $fOut > ${f}.log
|
||||
${tools_dir}/bufr_filter $fRules $fOut > ${f}.log
|
||||
|
||||
cat > ${f}.log.ref <<EOF
|
||||
=== message number 1
|
||||
|
@ -1062,7 +1062,7 @@ f="gosat.bufr"
|
|||
|
||||
echo "Test: firstOrderStatistics" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}bufr_filter $fRules $f > ${f}.log
|
||||
${tools_dir}/bufr_filter $fRules $f > ${f}.log
|
||||
|
||||
cat > ${f}.log.ref <<EOF
|
||||
decimalScaleOfFollowingSignificands->firstOrderStatisticalValue=-15 -15 -15 -15 -15 -15 -15 -15 -15 -15
|
||||
|
@ -1109,7 +1109,7 @@ fOut="asel_139.bufr.out"
|
|||
|
||||
echo "Test: delayed replication compressed data" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}bufr_filter -o $fOut $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/bufr_filter -o $fOut $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
cat > ${fRules} <<EOF
|
||||
set unpack=1;
|
||||
|
@ -1120,7 +1120,7 @@ print "#3#windSpeedAt10M=[#3#windSpeedAt10M]";
|
|||
print "#5#windSpeedAt10M=[#5#windSpeedAt10M]";
|
||||
EOF
|
||||
|
||||
${tools_dir}bufr_filter $fRules $fOut > ${f}.log
|
||||
${tools_dir}/bufr_filter $fRules $fOut > ${f}.log
|
||||
|
||||
cat > ${f}.log.ref <<EOF
|
||||
delayedDescriptorReplicationFactor=5
|
||||
|
@ -1161,7 +1161,7 @@ fOut="out.bufr"
|
|||
|
||||
echo "Test: create new BUFR with bitmap" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}bufr_filter -o $fOut $fRules $f 2>> $fLog 1>> $fLog
|
||||
${tools_dir}/bufr_filter -o $fOut $fRules $f 2>> $fLog 1>> $fLog
|
||||
|
||||
cat > ${fRules} <<EOF
|
||||
set unpack=1;
|
||||
|
@ -1170,7 +1170,7 @@ print "delayedDescriptorReplicationFactor=[delayedDescriptorReplicationFactor!20
|
|||
print "dataPresentIndicator=[dataPresentIndicator!20]";
|
||||
EOF
|
||||
|
||||
${tools_dir}bufr_filter $fRules $fOut > ${f}.log
|
||||
${tools_dir}/bufr_filter $fRules $fOut > ${f}.log
|
||||
|
||||
cat > ${f}.log.ref <<EOF
|
||||
delayedDescriptorReplicationFactor=4 1 4 15 2 2
|
||||
|
@ -1213,7 +1213,7 @@ f="go15_87.bufr"
|
|||
echo "Test: create new BUFR with bitmap" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
|
||||
${tools_dir}bufr_filter $fRules $f > ${f}.log
|
||||
${tools_dir}/bufr_filter $fRules $f > ${f}.log
|
||||
|
||||
cat > ${f}.log.ref <<EOF
|
||||
numberOfSubsets=128
|
||||
|
@ -1328,7 +1328,7 @@ f="metar_with_2_bias.bufr"
|
|||
echo "Test: Data with two bias correction wrong bitmap" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
|
||||
${tools_dir}bufr_filter $fRules $f > ${f}.log
|
||||
${tools_dir}/bufr_filter $fRules $f > ${f}.log
|
||||
|
||||
cat > ${f}.log.ref <<EOF
|
||||
70
|
||||
|
@ -1355,7 +1355,7 @@ f="temp-land-with-substituted-values.bufr"
|
|||
echo "Test: Data with substituted value" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
|
||||
${tools_dir}bufr_filter $fRules $f > ${f}.log
|
||||
${tools_dir}/bufr_filter $fRules $f > ${f}.log
|
||||
|
||||
cat > ${f}.log.ref <<EOF
|
||||
110
|
||||
|
@ -1382,7 +1382,7 @@ f="syno_1.bufr"
|
|||
echo "Test: Nested delayed replication" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
|
||||
${tools_dir}bufr_filter $fRules $f > ${f}.log
|
||||
${tools_dir}/bufr_filter $fRules $f > ${f}.log
|
||||
|
||||
cat > ${f}.log.ref <<EOF
|
||||
-1e+100 -1e+100 2 -1e+100 -1e+100 3 -1e+100 -1e+100
|
||||
|
@ -1410,7 +1410,7 @@ f="imssnow.bufr"
|
|||
echo "Test: Simple thinning" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
|
||||
${tools_dir}bufr_filter -o ${f}.out $fRules $f
|
||||
${tools_dir}/bufr_filter -o ${f}.out $fRules $f
|
||||
|
||||
cat > $fRules <<EOF
|
||||
set unpack=1;
|
||||
|
@ -1419,7 +1419,7 @@ print "longitude=[longitude]";
|
|||
print "height=[height]";
|
||||
EOF
|
||||
|
||||
${tools_dir}bufr_filter $fRules ${f}.out > ${f}.log
|
||||
${tools_dir}/bufr_filter $fRules ${f}.out > ${f}.log
|
||||
|
||||
cat > ${f}.log.ref <<EOF
|
||||
latitude=4.93301 5.17216 5.40243 5.62361 7.86075
|
||||
|
@ -1447,7 +1447,7 @@ f="go15_87.bufr"
|
|||
echo "Test: subset extraction constant values" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
|
||||
${tools_dir}bufr_filter -o ${f}.out $fRules $f
|
||||
${tools_dir}/bufr_filter -o ${f}.out $fRules $f
|
||||
|
||||
cat > $fRules <<EOF
|
||||
set unpack=1;
|
||||
|
@ -1457,14 +1457,14 @@ set doExtractSubsets=1;
|
|||
write;
|
||||
EOF
|
||||
|
||||
${tools_dir}bufr_filter -o ${f}.out.out $fRules ${f}.out
|
||||
${tools_dir}/bufr_filter -o ${f}.out.out $fRules ${f}.out
|
||||
|
||||
cat > $fRules <<EOF
|
||||
set unpack=1;
|
||||
print "latitude=[latitude]";
|
||||
EOF
|
||||
|
||||
${tools_dir}bufr_filter $fRules ${f}.out.out > ${f}.log
|
||||
${tools_dir}/bufr_filter $fRules ${f}.out.out > ${f}.log
|
||||
|
||||
cat > ${f}.log.ref <<EOF
|
||||
latitude=0
|
||||
|
@ -1491,14 +1491,14 @@ f="amsu_55.bufr"
|
|||
echo "Test: fix for ECC-389" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
|
||||
${tools_dir}bufr_filter -o ${f}.out $fRules $f
|
||||
${tools_dir}/bufr_filter -o ${f}.out $fRules $f
|
||||
|
||||
cat > $fRules <<EOF
|
||||
set unpack=1;
|
||||
print "[#14#brightnessTemperature]";
|
||||
EOF
|
||||
|
||||
${tools_dir}bufr_filter $fRules ${f}.out > ${f}.log
|
||||
${tools_dir}/bufr_filter $fRules ${f}.out > ${f}.log
|
||||
|
||||
cat > ${f}.log.ref <<EOF
|
||||
266.53
|
||||
|
|
|
@ -52,7 +52,7 @@ rm -f $outputFilt
|
|||
echo "Test: Area extraction" >> $fLog
|
||||
echo "file: $outputBufr" >> $fLog
|
||||
|
||||
${tools_dir}bufr_filter -o $outputBufr $fRules $inputBufr > $outputFilt
|
||||
${tools_dir}/bufr_filter -o $outputBufr $fRules $inputBufr > $outputFilt
|
||||
[ -f $outputBufr ]
|
||||
|
||||
cat > $fRules <<EOF
|
||||
|
@ -68,7 +68,7 @@ print "===========";
|
|||
print "fieldOfViewNumber=[fieldOfViewNumber!15]";
|
||||
print "===========";
|
||||
EOF
|
||||
${tools_dir}bufr_filter $fRules $inputBufr $outputBufr >> $outputFilt
|
||||
${tools_dir}/bufr_filter $fRules $inputBufr $outputBufr >> $outputFilt
|
||||
|
||||
cat > $outputRef <<EOF
|
||||
extracted 14 of 128 subsets
|
||||
|
|
|
@ -64,7 +64,7 @@ rm -f $outputFilt
|
|||
echo "Test: Datetime extraction" >> $fLog
|
||||
echo "file: $inputBufr" >> $fLog
|
||||
|
||||
${tools_dir}bufr_filter -o $outputBufr $fRules $inputBufr > $outputFilt
|
||||
${tools_dir}/bufr_filter -o $outputBufr $fRules $inputBufr > $outputFilt
|
||||
[ -f $outputBufr ]
|
||||
|
||||
cat > $fRules <<EOF
|
||||
|
@ -82,7 +82,7 @@ print "===========";
|
|||
print "second=[second!15]";
|
||||
print "===========";
|
||||
EOF
|
||||
${tools_dir}bufr_filter $fRules $inputBufr $outputBufr >> $outputFilt
|
||||
${tools_dir}/bufr_filter $fRules $inputBufr $outputBufr >> $outputFilt
|
||||
|
||||
cat > $outputRef <<EOF
|
||||
extracted 30 of 128 subsets
|
||||
|
@ -148,7 +148,7 @@ inputBufr="amsa_55.bufr"
|
|||
outputBufr=${label}.${inputBufr}.out
|
||||
|
||||
set +e
|
||||
${tools_dir}bufr_filter -o $outputBufr $fRules $inputBufr
|
||||
${tools_dir}/bufr_filter -o $outputBufr $fRules $inputBufr
|
||||
status=$?
|
||||
set -e
|
||||
if [ $status -eq 0 ]; then
|
||||
|
@ -182,7 +182,7 @@ inputBufr="amsa_55.bufr"
|
|||
outputBufr=${label}.${inputBufr}.out
|
||||
|
||||
set +e
|
||||
${tools_dir}bufr_filter -o $outputBufr $fRules $inputBufr
|
||||
${tools_dir}/bufr_filter -o $outputBufr $fRules $inputBufr
|
||||
status=$?
|
||||
set -e
|
||||
if [ $status -eq 0 ]; then
|
||||
|
|
|
@ -27,7 +27,7 @@ do
|
|||
# Test the various JSON dump modes: 'structure', 'all' and 'flat'
|
||||
for mode in s a f; do
|
||||
rm -f ${file}.json
|
||||
${tools_dir}bufr_dump -j$mode $file 2> $REDIRECT > ${file}.json
|
||||
${tools_dir}/bufr_dump -j$mode $file 2> $REDIRECT > ${file}.json
|
||||
if test "x$JSON_CHECK" != "x"; then
|
||||
json_xs < ${file}.json >$REDIRECT 2> $REDIRECT
|
||||
fi
|
||||
|
@ -39,11 +39,11 @@ done
|
|||
# ECC-233: Test JSON dump when selecting messages with '-w' switch
|
||||
file=tropical_cyclone.bufr
|
||||
for c in 1 3 1/3; do
|
||||
${tools_dir}bufr_dump -w count=$c $file 2> $REDIRECT > ${file}.json
|
||||
${tools_dir}/bufr_dump -w count=$c $file 2> $REDIRECT > ${file}.json
|
||||
if test "x$JSON_CHECK" != "x"; then
|
||||
json_xs < ${file}.json >$REDIRECT 2> $REDIRECT
|
||||
fi
|
||||
done
|
||||
|
||||
# ECC-272
|
||||
${tools_dir}bufr_dump -jf aaen_55.bufr | grep -q -w channelRadiance
|
||||
${tools_dir}/bufr_dump -jf aaen_55.bufr | grep -q -w channelRadiance
|
||||
|
|
|
@ -28,7 +28,7 @@ do
|
|||
|
||||
rm -f $res_desc
|
||||
|
||||
${tools_dir}codes_bufr_filter bufrdc_desc_ref.filter $file 2> $REDIRECT > $res_desc
|
||||
${tools_dir}/codes_bufr_filter bufrdc_desc_ref.filter $file 2> $REDIRECT > $res_desc
|
||||
if [ -f "$ref_desc" ]; then
|
||||
diff $ref_desc $res_desc > $diff_desc 2> $diff_desc
|
||||
fi
|
||||
|
|
|
@ -29,7 +29,7 @@ do
|
|||
|
||||
rm -f $res_num | true
|
||||
|
||||
${tools_dir}codes_bufr_filter bufrdc_num_ref.filter $file 2> $REDIRECT > $res_num
|
||||
${tools_dir}/codes_bufr_filter bufrdc_num_ref.filter $file 2> $REDIRECT > $res_num
|
||||
|
||||
# Exclude the BUFR file uegabe.bufr because its reference file is incorrect
|
||||
if [ "$bf" = "uegabe.bufr" ]; then
|
||||
|
|
|
@ -17,19 +17,19 @@ temp2=temp2.calendar.$$
|
|||
sample=$ECCODES_SAMPLES_PATH/GRIB2.tmpl
|
||||
|
||||
|
||||
${tools_dir}grib_set -s tablesVersion=13,setCalendarId=1,typeOfCalendar=0 $sample $temp1
|
||||
${tools_dir}/grib_set -s tablesVersion=13,setCalendarId=1,typeOfCalendar=0 $sample $temp1
|
||||
grib_check_key_equals $temp1 calendarIdPresent 1
|
||||
grib_check_key_equals $temp1 section1Length 24
|
||||
grib_check_key_equals $temp1 calendarIdentificationTemplateNumber 0
|
||||
grib_check_key_equals $temp1 typeOfCalendar 0
|
||||
|
||||
${tools_dir}grib_set -s tablesVersion=13,setCalendarId=1,calendarIdentificationTemplateNumber=1 $sample $temp1
|
||||
${tools_dir}/grib_set -s tablesVersion=13,setCalendarId=1,calendarIdentificationTemplateNumber=1 $sample $temp1
|
||||
grib_check_key_equals $temp1 calendarIdPresent 1
|
||||
grib_check_key_equals $temp1 section1Length 25
|
||||
grib_check_key_equals $temp1 calendarIdentificationTemplateNumber 1
|
||||
grib_check_key_equals $temp1 numberOfTensOfThousandsOfYearsOfOffset MISSING
|
||||
|
||||
${tools_dir}grib_set -s tablesVersion=13,setCalendarId=1,calendarIdentificationTemplateNumber=2 $sample $temp1
|
||||
${tools_dir}/grib_set -s tablesVersion=13,setCalendarId=1,calendarIdentificationTemplateNumber=2 $sample $temp1
|
||||
grib_check_key_equals $temp1 calendarIdPresent 1
|
||||
grib_check_key_equals $temp1 section1Length 26
|
||||
grib_check_key_equals $temp1 calendarIdentificationTemplateNumber 2
|
||||
|
@ -37,7 +37,7 @@ grib_check_key_equals $temp1 typeOfCalendar 255
|
|||
grib_check_key_equals $temp1 numberOfTensOfThousandsOfYearsOfOffset MISSING
|
||||
|
||||
# Remove the calendar section
|
||||
${tools_dir}grib_set -s deleteCalendarId=1 $temp1 $temp2
|
||||
${tools_dir}/grib_set -s deleteCalendarId=1 $temp1 $temp2
|
||||
grib_check_key_equals $temp2 section1Length 21
|
||||
grib_check_key_equals $temp2 calendarIdPresent 0
|
||||
|
||||
|
|
|
@ -38,13 +38,13 @@ outfile1=$infile.tmp_ccsds.1
|
|||
outfile2=$infile.tmp_ccsds.2
|
||||
|
||||
rm -f $outfile1 $outfile2 || true
|
||||
${tools_dir}grib_set -f -r -s packingType=grid_simple $infile $outfile1 2> $REDIRECT
|
||||
${tools_dir}grib_compare -P -b $BLACKLIST $outfile1 $infile > $REDIRECT
|
||||
${tools_dir}/grib_set -f -r -s packingType=grid_simple $infile $outfile1 2> $REDIRECT
|
||||
${tools_dir}/grib_compare -P -b $BLACKLIST $outfile1 $infile > $REDIRECT
|
||||
|
||||
${tools_dir}grib_set -r -s packingType=grid_ccsds $outfile1 $outfile2
|
||||
${tools_dir}grib_compare -P -b $BLACKLIST $outfile1 $outfile2 > $REDIRECT
|
||||
${tools_dir}/grib_set -r -s packingType=grid_ccsds $outfile1 $outfile2
|
||||
${tools_dir}/grib_compare -P -b $BLACKLIST $outfile1 $outfile2 > $REDIRECT
|
||||
|
||||
templateNumber=`${tools_dir}grib_get -p dataRepresentationTemplateNumber $outfile2`
|
||||
templateNumber=`${tools_dir}/grib_get -p dataRepresentationTemplateNumber $outfile2`
|
||||
|
||||
if [ $templateNumber -ne 42 ]
|
||||
then
|
||||
|
@ -58,14 +58,14 @@ infile=${data_dir}/reduced_latlon_surface.grib2
|
|||
outfile1=$infile.tmp_ccsds.1
|
||||
outfile2=$infile.tmp_ccsds.2
|
||||
|
||||
${tools_dir}grib_set -r -s packingType=grid_ccsds $infile $outfile1
|
||||
${tools_dir}grib_compare -P -b $BLACKLIST $infile $outfile1 > $REDIRECT
|
||||
${tools_dir}grib_set -f -r -s packingType=grid_simple $outfile1 $outfile2 2> $REDIRECT
|
||||
${tools_dir}grib_compare -P -b $BLACKLIST $outfile2 $outfile1 > $REDIRECT
|
||||
${tools_dir}/grib_set -r -s packingType=grid_ccsds $infile $outfile1
|
||||
${tools_dir}/grib_compare -P -b $BLACKLIST $infile $outfile1 > $REDIRECT
|
||||
${tools_dir}/grib_set -f -r -s packingType=grid_simple $outfile1 $outfile2 2> $REDIRECT
|
||||
${tools_dir}/grib_compare -P -b $BLACKLIST $outfile2 $outfile1 > $REDIRECT
|
||||
|
||||
res1=`${tools_dir}grib_get '-F%1.2f' -p min,max,avg $infile`
|
||||
res2=`${tools_dir}grib_get '-F%1.2f' -p min,max,avg $outfile1`
|
||||
res3=`${tools_dir}grib_get '-F%1.2f' -p min,max,avg $outfile2`
|
||||
res1=`${tools_dir}/grib_get '-F%1.2f' -p min,max,avg $infile`
|
||||
res2=`${tools_dir}/grib_get '-F%1.2f' -p min,max,avg $outfile1`
|
||||
res3=`${tools_dir}/grib_get '-F%1.2f' -p min,max,avg $outfile2`
|
||||
[ "$res1" = "$res2" ]
|
||||
[ "$res1" = "$res3" ]
|
||||
|
||||
|
@ -76,8 +76,8 @@ infile=${data_dir}/tigge_ecmwf.grib2
|
|||
outfile1=$infile.tmp_ccsds.1
|
||||
outfile2=$infile.tmp_ccsds.2
|
||||
|
||||
${tools_dir}grib_set -r -s bitsPerValue=17 $infile $outfile1
|
||||
${tools_dir}grib_set -r -s packingType=grid_ccsds $outfile1 $outfile2
|
||||
${tools_dir}grib_compare -P -c data:n $outfile1 $outfile2
|
||||
${tools_dir}/grib_set -r -s bitsPerValue=17 $infile $outfile1
|
||||
${tools_dir}/grib_set -r -s packingType=grid_ccsds $outfile1 $outfile2
|
||||
${tools_dir}/grib_compare -P -c data:n $outfile1 $outfile2
|
||||
|
||||
rm -f $outfile1 $outfile2
|
||||
|
|
|
@ -54,17 +54,17 @@ EOF
|
|||
write "${data_dir}/scan1.grib";
|
||||
EOF
|
||||
|
||||
${tools_dir}grib_filter ${data_dir}/change_scanning_${gridType}.filter $file
|
||||
#ed=`${tools_dir}grib_get -p edition ${data_dir}/scan1.grib`
|
||||
${tools_dir}/grib_filter ${data_dir}/change_scanning_${gridType}.filter $file
|
||||
#ed=`${tools_dir}/grib_get -p edition ${data_dir}/scan1.grib`
|
||||
#echo edition=$ed
|
||||
|
||||
${tools_dir}grib_set -s swapScanningX=1 ${data_dir}/scan1.grib ${data_dir}/scan.grib
|
||||
${tools_dir}grib_get_data -F "%g" ${data_dir}/scan.grib > ${data_dir}/scan_x_${gridType}_${Ni}_${Nj}.dump
|
||||
${tools_dir}/grib_set -s swapScanningX=1 ${data_dir}/scan1.grib ${data_dir}/scan.grib
|
||||
${tools_dir}/grib_get_data -F "%g" ${data_dir}/scan.grib > ${data_dir}/scan_x_${gridType}_${Ni}_${Nj}.dump
|
||||
diff ${data_dir}/scan_x_${gridType}_${Ni}_${Nj}.dump ${data_dir}/scan_x_${gridType}_${Ni}_${Nj}_good.dump
|
||||
rm -f ${data_dir}/scan_x_${gridType}_${Ni}_${Nj}.dump
|
||||
|
||||
${tools_dir}grib_set -s swapScanningY=1 ${data_dir}/scan1.grib ${data_dir}/scan.grib
|
||||
${tools_dir}grib_get_data -F "%g" ${data_dir}/scan.grib > ${data_dir}/scan_y_${gridType}_${Ni}_${Nj}.dump
|
||||
${tools_dir}/grib_set -s swapScanningY=1 ${data_dir}/scan1.grib ${data_dir}/scan.grib
|
||||
${tools_dir}/grib_get_data -F "%g" ${data_dir}/scan.grib > ${data_dir}/scan_y_${gridType}_${Ni}_${Nj}.dump
|
||||
diff ${data_dir}/scan_y_${gridType}_${Ni}_${Nj}.dump ${data_dir}/scan_y_${gridType}_${Ni}_${Nj}_good.dump
|
||||
rm -f ${data_dir}/scan_y_${gridType}_${Ni}_${Nj}.dump
|
||||
rm -f ${data_dir}/change_scanning_${gridType}.filter
|
||||
|
|
|
@ -12,6 +12,6 @@
|
|||
# Check all sample GRIBs with a Gaussian grid
|
||||
samples_dir=$ECCODES_SAMPLES_PATH
|
||||
for gg in ${samples_dir}/reduced_gg_* ${samples_dir}/regular_gg_*; do
|
||||
${tools_dir}grib_check_gaussian_grid $gg >/dev/null
|
||||
${tools_dir}/grib_check_gaussian_grid $gg >/dev/null
|
||||
grib_check_key_equals $gg "global" 1
|
||||
done
|
||||
|
|
|
@ -74,7 +74,7 @@ tmp="tmp.concept.out"
|
|||
for d in $data
|
||||
do
|
||||
set -e
|
||||
${tools_dir}grib_ls -p gridType,packingType -w dataRepresentationType!=192 ${data_dir}/$d > $tmp
|
||||
${tools_dir}/grib_ls -p gridType,packingType -w dataRepresentationType!=192 ${data_dir}/$d > $tmp
|
||||
|
||||
set +e
|
||||
grep unknown $tmp
|
||||
|
|
|
@ -20,11 +20,11 @@ for file in $files; do
|
|||
infile=${data_dir}/$file
|
||||
outfile1=${infile}_decimalPrecision_1
|
||||
outfile2=${infile}_decimalPrecision_2
|
||||
${tools_dir}grib_set -r -s decimalScaleFactor=1,bitsPerValue=0 $infile $outfile1
|
||||
${tools_dir}grib_compare -P -c data:n $infile $outfile1 > $REDIRECT
|
||||
${tools_dir}/grib_set -r -s decimalScaleFactor=1,bitsPerValue=0 $infile $outfile1
|
||||
${tools_dir}/grib_compare -P -c data:n $infile $outfile1 > $REDIRECT
|
||||
|
||||
${tools_dir}grib_set -s changeDecimalPrecision=1 $infile $outfile2
|
||||
${tools_dir}grib_compare -P -c data:n $infile $outfile2 > $REDIRECT
|
||||
${tools_dir}grib_compare $outfile1 $outfile2
|
||||
${tools_dir}/grib_set -s changeDecimalPrecision=1 $infile $outfile2
|
||||
${tools_dir}/grib_compare -P -c data:n $infile $outfile2 > $REDIRECT
|
||||
${tools_dir}/grib_compare $outfile1 $outfile2
|
||||
rm -f $outfile1 $outfile2 || true
|
||||
done
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
|
||||
REDIRECT=/dev/null
|
||||
|
||||
[ -z "$ECCODES_DEFINITION_PATH" ] | ECCODES_DEFINITION_PATH=`${tools_dir}codes_info -d`
|
||||
[ -z "$ECCODES_DEFINITION_PATH" ] | ECCODES_DEFINITION_PATH=`${tools_dir}/codes_info -d`
|
||||
|
||||
for file in `find ${ECCODES_DEFINITION_PATH}/ -name '*.def' -print`
|
||||
do
|
||||
${tools_dir}codes_parser $file > $REDIRECT
|
||||
${tools_dir}/codes_parser $file > $REDIRECT
|
||||
done
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ MY_DEFS=`pwd`/$TEMP_DIR/definitions
|
|||
export ECCODES_DEFINITION_PATH=$MY_DEFS:$ECCODES_DEFINITION_PATH
|
||||
|
||||
# Now decode
|
||||
${tools_dir}bufr_dump $input > $TEMP
|
||||
${tools_dir}/bufr_dump $input > $TEMP
|
||||
# Ensure output JSON has all the expected contents
|
||||
# After calling 'wc' and 'set', $1 will be the line count
|
||||
set `wc -l $TEMP`
|
||||
|
|
|
@ -29,7 +29,7 @@ cat > $tempRules <<EOF
|
|||
print "[3HourPressureChange]";
|
||||
EOF
|
||||
|
||||
${tools_dir}bufr_filter $tempRules $BufrFile > $tempOut
|
||||
${tools_dir}/bufr_filter $tempRules $BufrFile > $tempOut
|
||||
|
||||
cat > $tempRef <<EOF
|
||||
20
|
||||
|
|
|
@ -26,17 +26,17 @@ cat > $tempRules <<EOF
|
|||
write;
|
||||
EOF
|
||||
|
||||
${tools_dir}bufr_filter -o $tempOut $tempRules $BufrFile
|
||||
${tools_dir}/bufr_filter -o $tempOut $tempRules $BufrFile
|
||||
|
||||
# There is a difference in localLongitude, rel error=6.58627e-06
|
||||
# So this should fail
|
||||
set +e
|
||||
${tools_dir}bufr_compare $tempOut $BufrFile
|
||||
${tools_dir}/bufr_compare $tempOut $BufrFile
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
|
||||
# Now apply the option and now it should pass
|
||||
${tools_dir}bufr_compare -R localLongitude=6.59e-06 $tempOut $BufrFile
|
||||
${tools_dir}/bufr_compare -R localLongitude=6.59e-06 $tempOut $BufrFile
|
||||
|
||||
rm -rf $tempOut $tempRules
|
||||
|
|
|
@ -34,17 +34,17 @@ EOF
|
|||
|
||||
# Expect this to fail as two values are out-of-range
|
||||
set +e
|
||||
${tools_dir}bufr_filter -o $tempOut $tempRules $BufrFile 2>/dev/null
|
||||
${tools_dir}/bufr_filter -o $tempOut $tempRules $BufrFile 2>/dev/null
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -ne 0 ]
|
||||
# Now set environment variable to turn out-of-range values into 'missing'
|
||||
export ECCODES_BUFR_SET_TO_MISSING_IF_OUT_OF_RANGE=1
|
||||
${tools_dir}bufr_filter -o $tempOut $tempRules $BufrFile
|
||||
${tools_dir}/bufr_filter -o $tempOut $tempRules $BufrFile
|
||||
unset ECCODES_BUFR_SET_TO_MISSING_IF_OUT_OF_RANGE
|
||||
|
||||
#echo 'set unpack=1;print "[longitude]";' | ${tools_dir}bufr_filter - $BufrFile
|
||||
#echo 'set unpack=1;print "[longitude]";' | ${tools_dir}bufr_filter - $tempOut > $tempText
|
||||
#echo 'set unpack=1;print "[longitude]";' | ${tools_dir}/bufr_filter - $BufrFile
|
||||
#echo 'set unpack=1;print "[longitude]";' | ${tools_dir}/bufr_filter - $tempOut > $tempText
|
||||
#cat > $tempRef << EOF
|
||||
#-1e+100 -172.14317 -1e+100 -170.17433 -169.407 -168.9308 -168.49104 -167.98389
|
||||
#-166.95331 -166.52921 -166.06108 -165.66135 -164.99666 -164.67058 -164.23764
|
||||
|
@ -62,13 +62,13 @@ EOF
|
|||
|
||||
# The latitude is out of range. So we expect this to fail
|
||||
set +e
|
||||
${tools_dir}bufr_filter -o $tempOut $tempRules $BufrFile 2>/dev/null
|
||||
${tools_dir}/bufr_filter -o $tempOut $tempRules $BufrFile 2>/dev/null
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -ne 0 ]
|
||||
|
||||
export ECCODES_BUFR_SET_TO_MISSING_IF_OUT_OF_RANGE=1
|
||||
${tools_dir}bufr_filter -o $tempOut $tempRules $BufrFile
|
||||
${tools_dir}/bufr_filter -o $tempOut $tempRules $BufrFile
|
||||
unset ECCODES_BUFR_SET_TO_MISSING_IF_OUT_OF_RANGE
|
||||
|
||||
# ------------------------
|
||||
|
|
|
@ -31,24 +31,24 @@ cat > $tempRules <<EOF
|
|||
write;
|
||||
EOF
|
||||
|
||||
${tools_dir}bufr_filter -o $tempOut $tempRules $BufrFile
|
||||
${tools_dir}/bufr_filter -o $tempOut $tempRules $BufrFile
|
||||
|
||||
# There are two differences. So this should fail
|
||||
set +e
|
||||
${tools_dir}bufr_compare $tempOut $BufrFile
|
||||
${tools_dir}/bufr_compare $tempOut $BufrFile
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
|
||||
# Blacklist all the channelQualityFlagsForAtovs keys
|
||||
${tools_dir}bufr_compare -b channelQualityFlagsForAtovs $tempOut $BufrFile
|
||||
${tools_dir}/bufr_compare -b channelQualityFlagsForAtovs $tempOut $BufrFile
|
||||
|
||||
# Blacklist both the channelQualityFlagsForAtovs keys individually
|
||||
${tools_dir}bufr_compare -b '#3#channelQualityFlagsForAtovs,#5#channelQualityFlagsForAtovs' $tempOut $BufrFile
|
||||
${tools_dir}/bufr_compare -b '#3#channelQualityFlagsForAtovs,#5#channelQualityFlagsForAtovs' $tempOut $BufrFile
|
||||
|
||||
# Blacklist only one of the channelQualityFlagsForAtovs keys. Will fail
|
||||
set +e
|
||||
${tools_dir}bufr_compare -b '#5#channelQualityFlagsForAtovs' $tempOut $BufrFile >$tempText
|
||||
${tools_dir}/bufr_compare -b '#5#channelQualityFlagsForAtovs' $tempOut $BufrFile >$tempText
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
|
|
|
@ -14,7 +14,7 @@ REDIRECT=/dev/null
|
|||
|
||||
set +e
|
||||
|
||||
${tools_dir}grib_get -p gribname ${data_dir}/regular_latlon_surface.grib1 2> $REDIRECT > $REDIRECT
|
||||
${tools_dir}/grib_get -p gribname ${data_dir}/regular_latlon_surface.grib1 2> $REDIRECT > $REDIRECT
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
|
|
|
@ -34,30 +34,30 @@ do
|
|||
file=${data_dir}/$f
|
||||
output=${file}.grib2_
|
||||
rm -f ${output}
|
||||
${tools_dir}grib_set -s editionNumber=2 ${file}.grib1 ${output} 2> $REDIRECT > $REDIRECT
|
||||
${tools_dir}/grib_set -s editionNumber=2 ${file}.grib1 ${output} 2> $REDIRECT > $REDIRECT
|
||||
|
||||
grib1Statistics=`${tools_dir}grib_get -fp numberOfValues,numberOfPoints,max,min,average,numberOfMissing ${file}.grib1`
|
||||
grib2Statistics=`${tools_dir}grib_get -fp numberOfValues,numberOfPoints,max,min,average,numberOfMissing ${output}`
|
||||
grib1Statistics=`${tools_dir}/grib_get -fp numberOfValues,numberOfPoints,max,min,average,numberOfMissing ${file}.grib1`
|
||||
grib2Statistics=`${tools_dir}/grib_get -fp numberOfValues,numberOfPoints,max,min,average,numberOfMissing ${output}`
|
||||
|
||||
if [ "$grib1Statistics" != "$grib2Statistics" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#${tools_dir}grib_compare -A1.0e-8 -c values ${file}.grib1 ${output} 2> /dev/null > /dev/null
|
||||
${tools_dir}grib_compare -P -c values ${file}.grib1 ${output} 2> $REDIRECT > $REDIRECT
|
||||
#${tools_dir}/grib_compare -A1.0e-8 -c values ${file}.grib1 ${output} 2> /dev/null > /dev/null
|
||||
${tools_dir}/grib_compare -P -c values ${file}.grib1 ${output} 2> $REDIRECT > $REDIRECT
|
||||
|
||||
rm -f ${output}
|
||||
|
||||
done
|
||||
|
||||
#sed "s:toolsdir:${tools_dir}:" ${tools_dir}grib1to2.txt > ${tools_dir}grib1to2.test
|
||||
#chmod +x ${tools_dir}grib1to2.test
|
||||
#${tools_dir}grib1to2.test -f ${data_dir}/test.grib1 ${data_dir}/test.grib2
|
||||
#${tools_dir}grib_get -p typeOfProcessedData:s,type:s ${data_dir}/test.grib2 > ${data_dir}/typeOfProcessedData.log
|
||||
#sed "s:toolsdir:${tools_dir}/:" ${tools_dir}/grib1to2.txt > ${tools_dir}/grib1to2.test
|
||||
#chmod +x ${tools_dir}/grib1to2.test
|
||||
#${tools_dir}/grib1to2.test -f ${data_dir}/test.grib1 ${data_dir}/test.grib2
|
||||
#${tools_dir}/grib_get -p typeOfProcessedData:s,type:s ${data_dir}/test.grib2 > ${data_dir}/typeOfProcessedData.log
|
||||
|
||||
#diff ${data_dir}/typeOfProcessedData.log ${data_dir}/typeOfProcessedData.ok
|
||||
|
||||
#${tools_dir}grib_compare -Pe ${data_dir}/test.grib1 ${data_dir}/test.grib2
|
||||
#${tools_dir}/grib_compare -Pe ${data_dir}/test.grib1 ${data_dir}/test.grib2
|
||||
|
||||
#rm -f ${data_dir}/test.grib2
|
||||
|
||||
|
|
|
@ -33,16 +33,16 @@ do
|
|||
file=${data_dir}/$f
|
||||
output=${file}.grib1_
|
||||
rm -f ${output} || true
|
||||
${tools_dir}grib_set -s editionNumber=1 ${file}.grib2 ${output} 2> $REDIRECT > $REDIRECT
|
||||
${tools_dir}/grib_set -s editionNumber=1 ${file}.grib2 ${output} 2> $REDIRECT > $REDIRECT
|
||||
|
||||
grib1Statistics=`${tools_dir}grib_get -fp numberOfValues,numberOfPoints,max,min,average,numberOfMissing ${output}`
|
||||
grib2Statistics=`${tools_dir}grib_get -fp numberOfValues,numberOfPoints,max,min,average,numberOfMissing ${file}.grib2`
|
||||
grib1Statistics=`${tools_dir}/grib_get -fp numberOfValues,numberOfPoints,max,min,average,numberOfMissing ${output}`
|
||||
grib2Statistics=`${tools_dir}/grib_get -fp numberOfValues,numberOfPoints,max,min,average,numberOfMissing ${file}.grib2`
|
||||
|
||||
if [ "$grib1Statistics" != "$grib2Statistics" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#${tools_dir}grib_compare -A1.0e-8 -c values ${output} ${file}.grib2 2> /dev/null > /dev/null
|
||||
#${tools_dir}/grib_compare -A1.0e-8 -c values ${output} ${file}.grib2 2> /dev/null > /dev/null
|
||||
rm -f ${output}
|
||||
done
|
||||
|
||||
|
@ -64,10 +64,10 @@ 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 $ECCODES_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
|
||||
${tools_dir}/grib_set -s edition=1 temp.pv.grib2 temp.bad.grib1 2>$REDIRECT
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "ERROR: Conversion from grib2 to grib1 should have failed for large NV!" >&2
|
||||
exit 1
|
||||
|
|
|
@ -17,20 +17,20 @@ outfile=${infile}.compare.$$
|
|||
|
||||
rm -f $outfile
|
||||
|
||||
${tools_dir}grib_set -s shortName=2d $infile $outfile
|
||||
${tools_dir}grib_compare -b indicatorOfParameter,paramId,shortName $infile $outfile > $REDIRECT
|
||||
${tools_dir}/grib_set -s shortName=2d $infile $outfile
|
||||
${tools_dir}/grib_compare -b indicatorOfParameter,paramId,shortName $infile $outfile > $REDIRECT
|
||||
|
||||
# Test the -r switch
|
||||
# ----------------------------------------
|
||||
infile=${data_dir}/v.grib2
|
||||
for i in 1 2 3; do
|
||||
${tools_dir}grib_copy -wcount=$i $infile temp_comp.$i
|
||||
${tools_dir}/grib_copy -wcount=$i $infile temp_comp.$i
|
||||
done
|
||||
cat temp_comp.1 temp_comp.2 temp_comp.3 > temp_comp.123
|
||||
cat temp_comp.3 temp_comp.2 temp_comp.1 > temp_comp.321
|
||||
|
||||
# Compare files in which the messages are not in the same order
|
||||
${tools_dir}grib_compare -r temp_comp.123 temp_comp.321
|
||||
${tools_dir}/grib_compare -r temp_comp.123 temp_comp.321
|
||||
|
||||
rm -f temp_comp.1 temp_comp.2 temp_comp.3 temp_comp.123 temp_comp.321
|
||||
|
||||
|
@ -39,29 +39,29 @@ rm -f temp_comp.1 temp_comp.2 temp_comp.3 temp_comp.123 temp_comp.321
|
|||
temp_dir=tempdir.grib_compare
|
||||
mkdir -p $temp_dir
|
||||
cp $infile $temp_dir
|
||||
${tools_dir}grib_compare $infile $temp_dir
|
||||
${tools_dir}/grib_compare $infile $temp_dir
|
||||
rm -rf $temp_dir
|
||||
|
||||
# ECC-245: blacklist and 2nd order packing
|
||||
# ----------------------------------------
|
||||
temp1=grib_compare_temp1.grib
|
||||
temp2=grib_compare_temp2.grib
|
||||
${tools_dir}grib_copy -w count=25 ${data_dir}/lfpw.grib1 $temp1
|
||||
${tools_dir}grib_copy -w count=30 ${data_dir}/lfpw.grib1 $temp2
|
||||
${tools_dir}/grib_copy -w count=25 ${data_dir}/lfpw.grib1 $temp1
|
||||
${tools_dir}/grib_copy -w count=30 ${data_dir}/lfpw.grib1 $temp2
|
||||
|
||||
# This should fail but not crash! so check exit code is not 134
|
||||
set +e
|
||||
${tools_dir}grib_compare -b firstOrderValues $temp1 $temp2 >/dev/null
|
||||
${tools_dir}/grib_compare -b firstOrderValues $temp1 $temp2 >/dev/null
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
|
||||
# GRIB-915: blacklisting totalLength key
|
||||
${tools_dir}grib_copy -w count=1 ${data_dir}/v.grib2 $temp1
|
||||
${tools_dir}grib_copy -w count=2 ${data_dir}/v.grib2 $temp2
|
||||
${tools_dir}/grib_copy -w count=1 ${data_dir}/v.grib2 $temp1
|
||||
${tools_dir}/grib_copy -w count=2 ${data_dir}/v.grib2 $temp2
|
||||
# This should fail as we only blacklisted one key
|
||||
set +e
|
||||
${tools_dir}grib_compare -b totalLength $temp1 $temp2 >/dev/null
|
||||
${tools_dir}/grib_compare -b totalLength $temp1 $temp2 >/dev/null
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
|
@ -69,13 +69,13 @@ set -e
|
|||
|
||||
# ECC-355: -R with "all" option
|
||||
# ----------------------------------------
|
||||
${tools_dir}grib_copy -w count=1 ${data_dir}/tigge_cf_ecmwf.grib2 $temp1
|
||||
${tools_dir}grib_copy -w count=1 ${data_dir}/tigge_pf_ecmwf.grib2 $temp2
|
||||
${tools_dir}/grib_copy -w count=1 ${data_dir}/tigge_cf_ecmwf.grib2 $temp1
|
||||
${tools_dir}/grib_copy -w count=1 ${data_dir}/tigge_pf_ecmwf.grib2 $temp2
|
||||
BLACKLIST="typeOfProcessedData,typeOfEnsembleForecast,perturbationNumber"
|
||||
# Specify relative tolerances for each floating point key
|
||||
${tools_dir}grib_compare -b $BLACKLIST -R referenceValue=0.03,codedValues=2 $temp1 $temp2
|
||||
${tools_dir}/grib_compare -b $BLACKLIST -R referenceValue=0.03,codedValues=2 $temp1 $temp2
|
||||
# Now try the "all" option with the highest relative diff value
|
||||
${tools_dir}grib_compare -b $BLACKLIST -R all=2 $temp1 $temp2
|
||||
${tools_dir}/grib_compare -b $BLACKLIST -R all=2 $temp1 $temp2
|
||||
|
||||
|
||||
rm -f $temp1 $temp2
|
||||
|
|
|
@ -68,6 +68,6 @@ v.grib2
|
|||
|
||||
for file in $files; do
|
||||
if [ -f ${data_dir}/$file ]; then
|
||||
${tools_dir}grib_dump -O ${data_dir}/$file 2> $REDIRECT > $REDIRECT
|
||||
${tools_dir}/grib_dump -O ${data_dir}/$file 2> $REDIRECT > $REDIRECT
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -68,6 +68,6 @@ v.grib2
|
|||
|
||||
for file in $files; do
|
||||
if [ -f ${data_dir}/$file ]; then
|
||||
${tools_dir}grib_dump -Da ${data_dir}/$file 2> $REDIRECT > $REDIRECT
|
||||
${tools_dir}/grib_dump -Da ${data_dir}/$file 2> $REDIRECT > $REDIRECT
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -16,7 +16,7 @@ if [ -f ${data_dir}/geavg.t12z.pgrbaf108 ]
|
|||
then
|
||||
tmpdata=grib_api.$$.grib
|
||||
rm -f $tmpdata || true
|
||||
${tools_dir}grib_filter ${data_dir}/filter_rules ${data_dir}/geavg.t12z.pgrbaf108 > $REDIRECT
|
||||
${tools_dir}/grib_filter ${data_dir}/filter_rules ${data_dir}/geavg.t12z.pgrbaf108 > $REDIRECT
|
||||
rm -f $tmpdata
|
||||
fi
|
||||
|
||||
|
@ -26,7 +26,7 @@ EOF
|
|||
|
||||
[ -d ${data_dir}/split ] || mkdir -p ${data_dir}/split
|
||||
|
||||
${tools_dir}grib_filter ${data_dir}/f.rules ${data_dir}/tigge_pf_ecmwf.grib2 2> $REDIRECT > $REDIRECT
|
||||
${tools_dir}/grib_filter ${data_dir}/f.rules ${data_dir}/tigge_pf_ecmwf.grib2 2> $REDIRECT > $REDIRECT
|
||||
|
||||
rm -f ${data_dir}/split/*
|
||||
rmdir ${data_dir}/split
|
||||
|
@ -39,14 +39,14 @@ set center="john";
|
|||
EOF
|
||||
# Invoke without -f i.e. should fail if error encountered
|
||||
set +e
|
||||
${tools_dir}grib_filter ${data_dir}/nonexkey.rules ${data_dir}/tigge_pf_ecmwf.grib2 2> $REDIRECT > $REDIRECT
|
||||
${tools_dir}/grib_filter ${data_dir}/nonexkey.rules ${data_dir}/tigge_pf_ecmwf.grib2 2> $REDIRECT > $REDIRECT
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "grib_filter should have failed if key not found" >&2
|
||||
exit 1
|
||||
fi
|
||||
set -e
|
||||
# Now repeat with -f option (do not exit on error)
|
||||
${tools_dir}grib_filter -f ${data_dir}/nonexkey.rules ${data_dir}/tigge_pf_ecmwf.grib2 2> $REDIRECT > $REDIRECT
|
||||
${tools_dir}/grib_filter -f ${data_dir}/nonexkey.rules ${data_dir}/tigge_pf_ecmwf.grib2 2> $REDIRECT > $REDIRECT
|
||||
|
||||
rm -f ${data_dir}/nonexkey.rules
|
||||
|
||||
|
@ -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 $ECCODES_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,8 +68,8 @@ set nlev=41.0;
|
|||
write;
|
||||
EOF
|
||||
|
||||
${tools_dir}/grib_filter -o temp_filt.grib2 temp.filt $ECCODES_SAMPLES_PATH/sh_ml_grib1.tmpl
|
||||
result=`${tools_dir}/grib_get -p typeOfFirstFixedSurface,NV,nlev temp_filt.grib2`
|
||||
${tools_dir}//grib_filter -o temp_filt.grib2 temp.filt $ECCODES_SAMPLES_PATH/sh_ml_grib1.tmpl
|
||||
result=`${tools_dir}//grib_get -p typeOfFirstFixedSurface,NV,nlev temp_filt.grib2`
|
||||
[ "$result" = "150 6 41" ]
|
||||
|
||||
# GRIB-394: grib_filter arithmetic operators not correct for floating point values
|
||||
|
@ -100,7 +100,7 @@ else {
|
|||
assert(0);
|
||||
}
|
||||
EOF
|
||||
${tools_dir}/grib_filter ${data_dir}/binop.rules $ECCODES_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,18 +114,18 @@ set values = {
|
|||
.4,
|
||||
45. };
|
||||
EOF
|
||||
${tools_dir}/grib_filter temp.filt $ECCODES_SAMPLES_PATH/GRIB1.tmpl
|
||||
${tools_dir}//grib_filter temp.filt $ECCODES_SAMPLES_PATH/GRIB1.tmpl
|
||||
|
||||
# Test reading from stdin
|
||||
echo 'set centre="kwbc";write;' | ${tools_dir}/grib_filter -o temp_filt.grib2 - $ECCODES_SAMPLES_PATH/GRIB2.tmpl
|
||||
result=`${tools_dir}/grib_get -p centre temp_filt.grib2`
|
||||
echo 'set centre="kwbc";write;' | ${tools_dir}//grib_filter -o temp_filt.grib2 - $ECCODES_SAMPLES_PATH/GRIB2.tmpl
|
||||
result=`${tools_dir}//grib_get -p centre temp_filt.grib2`
|
||||
[ "$result" = "kwbc" ]
|
||||
|
||||
|
||||
# ECC-365: placeholder in the output filename
|
||||
########################################################
|
||||
input=${data_dir}/tigge_cf_ecmwf.grib2
|
||||
echo 'write;' | ${tools_dir}/grib_filter -o 'temp.out.gfilter.[date].[level].grib' - $input
|
||||
echo 'write;' | ${tools_dir}//grib_filter -o 'temp.out.gfilter.[date].[level].grib' - $input
|
||||
[ -f temp.out.gfilter.20070122.925.grib ]
|
||||
[ -f temp.out.gfilter.20070122.320.grib ]
|
||||
[ -f temp.out.gfilter.20070122.2.grib ]
|
||||
|
@ -134,7 +134,7 @@ echo 'write;' | ${tools_dir}/grib_filter -o 'temp.out.gfilter.[date].[level].gri
|
|||
[ -f temp.out.gfilter.20060630.0.grib ]
|
||||
[ -f temp.out.gfilter.20060623.0.grib ]
|
||||
# Check the contents of one of the output files
|
||||
c=`${tools_dir}/grib_count temp.out.gfilter.20070122.320.grib`
|
||||
c=`${tools_dir}//grib_count temp.out.gfilter.20070122.320.grib`
|
||||
[ "$c" = 1 ]
|
||||
grib_check_key_equals temp.out.gfilter.20070122.320.grib "date,level" "20070122 320"
|
||||
rm -f temp.out.gfilter.*.grib
|
||||
|
|
|
@ -34,10 +34,10 @@ fi
|
|||
|
||||
for file in $files; do
|
||||
infile=${data_dir}/$file
|
||||
${tools_dir}grib_set -r -s packingType=grid_png $infile $temp >/dev/null
|
||||
${tools_dir}/grib_set -r -s packingType=grid_png $infile $temp >/dev/null
|
||||
|
||||
${tools_dir}grib_get '-F%.2f' -p min,max,avg $infile > $temp1
|
||||
${tools_dir}grib_get '-F%.2f' -p min,max,avg $temp > $temp2
|
||||
${tools_dir}/grib_get '-F%.2f' -p min,max,avg $infile > $temp1
|
||||
${tools_dir}/grib_get '-F%.2f' -p min,max,avg $temp > $temp2
|
||||
diff $temp1 $temp2
|
||||
|
||||
rm -f $temp $temp1 $temp2
|
||||
|
|
|
@ -19,7 +19,7 @@ rm -f $tmp_out | true
|
|||
# Invoke the grib_to_netcdf command with no options. If NetCDF was enabled
|
||||
# we get a usage message otherwise we get a specific message. Note: In both cases
|
||||
# the command fails.
|
||||
${tools_dir}grib_to_netcdf > $tmp_out
|
||||
${tools_dir}/grib_to_netcdf > $tmp_out
|
||||
grep 'ecCodes was not compiled with NETCDF enabled' $tmp_out > /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
# Message was found
|
||||
|
@ -53,8 +53,8 @@ do
|
|||
do
|
||||
rm -f $tmp_netcdf | true
|
||||
if [ -f "${data_dir}/$f" ]; then
|
||||
${tools_dir}grib_to_netcdf -D $dt -o $tmp_netcdf ${data_dir}/$f >/dev/null
|
||||
${tools_dir}grib_to_netcdf -T -o $tmp_netcdf ${data_dir}/$f >/dev/null
|
||||
${tools_dir}/grib_to_netcdf -D $dt -o $tmp_netcdf ${data_dir}/$f >/dev/null
|
||||
${tools_dir}/grib_to_netcdf -T -o $tmp_netcdf ${data_dir}/$f >/dev/null
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
@ -62,10 +62,10 @@ done
|
|||
# Try creating different kinds; netcdf3 classic and large
|
||||
# TODO: enable tests for netcdf4 formats too
|
||||
input=${data_dir}/regular_latlon_surface.grib2
|
||||
${tools_dir}grib_to_netcdf -k 1 -o $tmp_netcdf $input >/dev/null
|
||||
${tools_dir}grib_to_netcdf -k 2 -o $tmp_netcdf $input >/dev/null
|
||||
#${tools_dir}grib_to_netcdf -k 3 -o $tmp_netcdf $input >/dev/null
|
||||
#${tools_dir}grib_to_netcdf -k 4 -o $tmp_netcdf $input >/dev/null
|
||||
${tools_dir}/grib_to_netcdf -k 1 -o $tmp_netcdf $input >/dev/null
|
||||
${tools_dir}/grib_to_netcdf -k 2 -o $tmp_netcdf $input >/dev/null
|
||||
#${tools_dir}/grib_to_netcdf -k 3 -o $tmp_netcdf $input >/dev/null
|
||||
#${tools_dir}/grib_to_netcdf -k 4 -o $tmp_netcdf $input >/dev/null
|
||||
|
||||
rm -f $tmp_netcdf | true
|
||||
|
||||
|
|
|
@ -22,21 +22,21 @@ rm -f $outfile
|
|||
# GRIB1 with local definition for MARS. Convert to edition2 and remove local def
|
||||
${test_dir}grib_util_set_spec -e 2 -r $infile $outfile > /dev/null
|
||||
|
||||
res=`${tools_dir}grib_get -p edition,section2Used,Ni,Nj,numberOfValues,bitsPerValue $outfile`
|
||||
res=`${tools_dir}/grib_get -p edition,section2Used,Ni,Nj,numberOfValues,bitsPerValue $outfile`
|
||||
[ "$res" = "2 0 17 14 238 24" ]
|
||||
|
||||
# Check output file geometry
|
||||
${tools_dir}grib_get_data $outfile > /dev/null
|
||||
${tools_dir}/grib_get_data $outfile > /dev/null
|
||||
|
||||
# Remove the local definition from input
|
||||
${tools_dir}grib_set -s deleteLocalDefinition=1 $infile $tempOut
|
||||
${tools_dir}/grib_set -s deleteLocalDefinition=1 $infile $tempOut
|
||||
${test_dir}grib_util_set_spec $tempOut $outfile > /dev/null
|
||||
|
||||
# Add another grib1 local definition (which is not in grib2)
|
||||
${tools_dir}grib_set -s setLocalDefinition=1,localDefinitionNumber=5 $infile $tempOut
|
||||
${tools_dir}/grib_set -s setLocalDefinition=1,localDefinitionNumber=5 $infile $tempOut
|
||||
infile=$tempOut
|
||||
${test_dir}grib_util_set_spec -r -e 2 $tempOut $outfile > /dev/null
|
||||
res=`${tools_dir}grib_get -p edition,section2Used $outfile`
|
||||
res=`${tools_dir}/grib_get -p edition,section2Used $outfile`
|
||||
[ "$res" = "2 0" ]
|
||||
|
||||
# GRIB2 input with local definition
|
||||
|
@ -55,7 +55,7 @@ if [ x"$HAVE_JPEG" != "x" ]; then
|
|||
if [ $HAVE_JPEG -eq 1 ]; then
|
||||
infile=../data/latlon.grib
|
||||
${test_dir}grib_util_set_spec -e 2 -p grid_jpeg $infile $outfile > /dev/null
|
||||
res=`${tools_dir}grib_get -p edition,section2Used,packingType $outfile`
|
||||
res=`${tools_dir}/grib_get -p edition,section2Used,packingType $outfile`
|
||||
[ "$res" = "2 1 grid_jpeg" ]
|
||||
fi
|
||||
fi
|
||||
|
@ -68,18 +68,18 @@ infile=../data/reduced_gaussian_model_level.grib2
|
|||
outfile=out.grib_util_set_spec.grib
|
||||
rm -f $outfile
|
||||
|
||||
stats_old=`${tools_dir}grib_get -F%.2f -p min,max $infile`
|
||||
stats_old=`${tools_dir}/grib_get -F%.2f -p min,max $infile`
|
||||
[ "$stats_old" = "160.25 224.45" ]
|
||||
|
||||
${test_dir}grib_util_set_spec -p grid_second_order $infile $outfile
|
||||
|
||||
# Check output file. Values are scaled up by 1.1
|
||||
grib_check_key_equals $outfile packingType grid_second_order
|
||||
stats_new=`${tools_dir}grib_get -F%.2f -p min,max $outfile`
|
||||
stats_new=`${tools_dir}/grib_get -F%.2f -p min,max $outfile`
|
||||
[ "$stats_new" = "176.28 246.90" ]
|
||||
|
||||
${tools_dir}grib_get_data $outfile > /dev/null
|
||||
CHECK_TOOL="${tools_dir}grib_check_gaussian_grid"
|
||||
${tools_dir}/grib_get_data $outfile > /dev/null
|
||||
CHECK_TOOL="${tools_dir}/grib_check_gaussian_grid"
|
||||
if [ -x $CHECK_TOOL ]; then
|
||||
$CHECK_TOOL $outfile
|
||||
fi
|
||||
|
@ -91,7 +91,7 @@ rm -f $outfile
|
|||
|
||||
${test_dir}grib_util_set_spec $infile $outfile
|
||||
grib_check_key_equals $outfile "packingType,const" "grid_simple 1"
|
||||
${tools_dir}grib_get_data $outfile > /dev/null
|
||||
${tools_dir}/grib_get_data $outfile > /dev/null
|
||||
|
||||
|
||||
### Clean up
|
||||
|
|
|
@ -15,9 +15,9 @@ REDIRECT=/dev/null
|
|||
tmpdata=grib_api.gridType.grib
|
||||
rm -f $tmpdata
|
||||
|
||||
${tools_dir}grib_set -s gridType=regular_gg ${data_dir}/reduced_latlon_surface.grib1 ${tmpdata} > $REDIRECT
|
||||
${tools_dir}/grib_set -s gridType=regular_gg ${data_dir}/reduced_latlon_surface.grib1 ${tmpdata} > $REDIRECT
|
||||
|
||||
gridType=`${tools_dir}grib_get -p gridType $tmpdata`
|
||||
gridType=`${tools_dir}/grib_get -p gridType $tmpdata`
|
||||
if [ $gridType != "regular_gg" ]
|
||||
then
|
||||
echo "Unable to change from reduced_latlon to regular_gg"
|
||||
|
@ -27,9 +27,9 @@ fi
|
|||
|
||||
rm -f $tmpdata
|
||||
|
||||
${tools_dir}grib_set -s gridType=reduced_gg ${data_dir}/regular_gaussian_pressure_level.grib1 ${tmpdata} > $REDIRECT
|
||||
${tools_dir}/grib_set -s gridType=reduced_gg ${data_dir}/regular_gaussian_pressure_level.grib1 ${tmpdata} > $REDIRECT
|
||||
|
||||
gridType=`${tools_dir}grib_get -p gridType $tmpdata`
|
||||
gridType=`${tools_dir}/grib_get -p gridType $tmpdata`
|
||||
if [ $gridType != "reduced_gg" ]
|
||||
then
|
||||
echo "Unable to change from regular_gg to reduced_gg"
|
||||
|
@ -43,11 +43,11 @@ rm -f $tmpdata
|
|||
# gridName
|
||||
###########
|
||||
for f in $ECCODES_SAMPLES_PATH/regular_gg_ml_grib*tmpl; do
|
||||
gname=`${tools_dir}grib_get -p gridName $f`
|
||||
gname=`${tools_dir}/grib_get -p gridName $f`
|
||||
[ "$gname" = "F32" ]
|
||||
done
|
||||
for f in $ECCODES_SAMPLES_PATH/reduced_gg_pl_512_grib*.tmpl; do
|
||||
gname=`${tools_dir}grib_get -p gridName $f`
|
||||
gname=`${tools_dir}/grib_get -p gridName $f`
|
||||
[ "$gname" = "N512" ]
|
||||
done
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ fBufrInput2=${label}".bufr.input2"
|
|||
gts_file="EGRR20150317121020_00493212.DAT"
|
||||
echo "Test: comparing the same files" >> $fLog
|
||||
echo "file: $gts_file" >> $fLog
|
||||
${tools_dir}/gts_compare $gts_file $gts_file
|
||||
${tools_dir}//gts_compare $gts_file $gts_file
|
||||
|
||||
#----------------------------------------------------
|
||||
# Test: comparing two different files
|
||||
|
@ -44,9 +44,9 @@ cat > $fRules<<EOF
|
|||
if (count == 1) { set GG="01"; }
|
||||
write;
|
||||
EOF
|
||||
${tools_dir}gts_filter -o $fGtsTmp $fRules $gts_file
|
||||
${tools_dir}/gts_filter -o $fGtsTmp $fRules $gts_file
|
||||
set +e
|
||||
${tools_dir}/gts_compare $gts_file $fGtsTmp
|
||||
${tools_dir}//gts_compare $gts_file $fGtsTmp
|
||||
status=$?
|
||||
set -e
|
||||
if [ $status -eq 0 ]; then
|
||||
|
@ -57,7 +57,7 @@ fi
|
|||
#----------------------------------------------------
|
||||
# Test: comparing with and witout the -b switch
|
||||
#----------------------------------------------------
|
||||
${tools_dir}/gts_compare -b GG $gts_file $fGtsTmp >> $fLog
|
||||
${tools_dir}//gts_compare -b GG $gts_file $fGtsTmp >> $fLog
|
||||
|
||||
#Clean up
|
||||
rm -f $fLog $fGtsTmp $fRules
|
||||
|
|
|
@ -34,51 +34,51 @@ cat > r.filter <<EOF
|
|||
print "[values%g]";
|
||||
EOF
|
||||
|
||||
${tools_dir}grib_filter -o $outsimple w.filter $infile
|
||||
${tools_dir}/grib_filter -o $outsimple w.filter $infile
|
||||
|
||||
${tools_dir}grib_filter r.filter $outsimple > $outsimple.txt
|
||||
${tools_dir}/grib_filter r.filter $outsimple > $outsimple.txt
|
||||
diff $outsimple.txt ${data_dir}/ieee_test.good
|
||||
|
||||
${tools_dir}grib_set -r -s packingType=grid_ieee $outsimple $out32
|
||||
${tools_dir}grib_filter r.filter $out32 > $out32.txt
|
||||
${tools_dir}/grib_set -r -s packingType=grid_ieee $outsimple $out32
|
||||
${tools_dir}/grib_filter r.filter $out32 > $out32.txt
|
||||
diff $out32.txt ${data_dir}/ieee_test.good
|
||||
|
||||
# Disabled for now. See GRIB-2 and GRIB-80
|
||||
#GRIB_IEEE_PACKING=32
|
||||
#export GRIB_IEEE_PACKING
|
||||
#${tools_dir}grib_filter -o $out32 w.filter $infile
|
||||
#${tools_dir}grib_filter r.filter $out32 > $out32.txt
|
||||
#${tools_dir}/grib_filter -o $out32 w.filter $infile
|
||||
#${tools_dir}/grib_filter r.filter $out32 > $out32.txt
|
||||
#diff $out32.txt ${data_dir}/ieee_test.good
|
||||
|
||||
#GRIB_IEEE_PACKING=64
|
||||
#export GRIB_IEEE_PACKING
|
||||
#${tools_dir}grib_filter -o $out64 w.filter $infile
|
||||
#${tools_dir}grib_filter r.filter $out64 > $out64.txt
|
||||
#${tools_dir}/grib_filter -o $out64 w.filter $infile
|
||||
#${tools_dir}/grib_filter r.filter $out64 > $out64.txt
|
||||
#diff $out64.txt ${data_dir}/ieee_test.good
|
||||
|
||||
rm -f $outsimple $out32 $out64 $out32.txt $out64.txt
|
||||
rm -f ${data_dir}/$outsimple.txt ${data_dir}/$out32.txt ${data_dir}/$out64.txt
|
||||
rm -f w.filter $outsimple.txt
|
||||
|
||||
${tools_dir}grib_filter r.filter $shdata > $shdata.txt
|
||||
${tools_dir}/grib_filter r.filter $shdata > $shdata.txt
|
||||
diff $shdata.txt $shdata.good
|
||||
|
||||
${tools_dir}grib_set -r -s packingType=grid_ieee $shdata ${shdata}_ieee
|
||||
${tools_dir}grib_filter r.filter ${shdata}_ieee > $shdata.txt
|
||||
${tools_dir}/grib_set -r -s packingType=grid_ieee $shdata ${shdata}_ieee
|
||||
${tools_dir}/grib_filter r.filter ${shdata}_ieee > $shdata.txt
|
||||
diff $shdata.txt $shdata.good
|
||||
rm -f ${shdata}_ieee
|
||||
|
||||
##########################
|
||||
#GRIB_IEEE_PACKING=32
|
||||
#export GRIB_IEEE_PACKING
|
||||
#${tools_dir}grib_copy -r $shdata ${shdata}_32
|
||||
#${tools_dir}grib_filter r.filter ${shdata}_32 > ${shdata}_32.txt
|
||||
#${tools_dir}/grib_copy -r $shdata ${shdata}_32
|
||||
#${tools_dir}/grib_filter r.filter ${shdata}_32 > ${shdata}_32.txt
|
||||
#diff ${shdata}_32.txt ${shdata}_32.good
|
||||
|
||||
#GRIB_IEEE_PACKING=64
|
||||
#export GRIB_IEEE_PACKING
|
||||
#${tools_dir}grib_copy -r $shdata ${shdata}_64
|
||||
#${tools_dir}grib_filter r.filter ${shdata}_64 > ${shdata}_64.txt
|
||||
#${tools_dir}/grib_copy -r $shdata ${shdata}_64
|
||||
#${tools_dir}/grib_filter r.filter ${shdata}_64 > ${shdata}_64.txt
|
||||
#diff ${shdata}_64.txt ${shdata}.good
|
||||
|
||||
rm -f r.filter ${shdata}_64.txt ${shdata}_32.txt $shdata.txt
|
||||
|
|
|
@ -16,13 +16,13 @@ ECCODES_DEFINITION_PATH="${def_dir}"
|
|||
export ECCODES_DEFINITION_PATH
|
||||
|
||||
# binaries are in the TOP CMAKE_BINARY_DIR
|
||||
tools_dir=@CMAKE_BINARY_DIR@/bin/
|
||||
tools_dir=@CMAKE_BINARY_DIR@/bin
|
||||
tigge_dir=@CMAKE_BINARY_DIR@/bin/
|
||||
|
||||
# If this environment variable is set, then run the
|
||||
# executables with valgrind
|
||||
if test "x$ECCODES_TEST_WITH_VALGRIND" != "x"; then
|
||||
tools_dir="valgrind --error-exitcode=1 -q @CMAKE_BINARY_DIR@/bin/"
|
||||
tools_dir="valgrind --error-exitcode=1 -q @CMAKE_BINARY_DIR@/bin"
|
||||
fi
|
||||
|
||||
# ecCodes tests are in the PROJECT_BINARY_DIR
|
||||
|
|
|
@ -39,10 +39,10 @@ else
|
|||
export ECCODES_DEFINITION_PATH
|
||||
ECCODES_SAMPLES_PATH=$cpath/samples
|
||||
export ECCODES_SAMPLES_PATH
|
||||
tools_dir=$cpath/tools/
|
||||
tools_dir=$cpath/tools
|
||||
|
||||
if test "x$ECCODES_TEST_WITH_VALGRIND" != "x"; then
|
||||
tools_dir="valgrind --error-exitcode=1 -q $cpath/tools/"
|
||||
tools_dir="valgrind --error-exitcode=1 -q $cpath/tools"
|
||||
fi
|
||||
|
||||
tigge_dir=$cpath/tigge/
|
||||
|
@ -51,7 +51,7 @@ else
|
|||
def_dir=$cpath/definitions
|
||||
src_dir=$cpath/src
|
||||
else
|
||||
tools_dir=""
|
||||
tools_dir="."
|
||||
tigge_dir=""
|
||||
fi
|
||||
|
||||
|
|
|
@ -33,13 +33,13 @@ rm -f index.out out.gribidx
|
|||
# Test grib_index_build
|
||||
#-------------------------------
|
||||
tempIndex=temp.$$.ix
|
||||
${tools_dir}grib_index_build -o $tempIndex ${infile} >/dev/null
|
||||
${tools_dir}grib_dump -D ${tempIndex} > /dev/null
|
||||
${tools_dir}/grib_index_build -o $tempIndex ${infile} >/dev/null
|
||||
${tools_dir}/grib_dump -D ${tempIndex} > /dev/null
|
||||
|
||||
${tools_dir}grib_index_build -k mars.levtype -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
|
||||
${tools_dir}/grib_index_build -k mars.levtype -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
|
||||
grep -q "mars.levtype = { sfc, pl, pv, pt }"
|
||||
|
||||
${tools_dir}grib_index_build -k mars.levtype:i -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
|
||||
${tools_dir}/grib_index_build -k mars.levtype:i -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
|
||||
grep -q "mars.levtype = { 103, 1, 106, 100, 101, 8, 109, 107 }"
|
||||
|
||||
rm -f $tempIndex
|
||||
|
|
|
@ -24,8 +24,8 @@ files="reduced_latlon_surface.grib1 \
|
|||
for f in `echo $files`
|
||||
do
|
||||
file=${data_dir}/$f
|
||||
iterator_count=`${tools_dir}grib_get_data -m 9999:missing -f -p centre -F "%g" -w count=1 $file | grep -v Lat |wc -l `
|
||||
numberOfPoints=`${tools_dir}grib_get -w count=1 -p numberOfPoints $file`
|
||||
iterator_count=`${tools_dir}/grib_get_data -m 9999:missing -f -p centre -F "%g" -w count=1 $file | grep -v Lat |wc -l `
|
||||
numberOfPoints=`${tools_dir}/grib_get -w count=1 -p numberOfPoints $file`
|
||||
[ $numberOfPoints = ${iterator_count} ]
|
||||
done
|
||||
|
||||
|
|
|
@ -39,12 +39,12 @@ outfile2=$infile.tmp_jpeg.2
|
|||
|
||||
rm -f $outfile1 $outfile2
|
||||
|
||||
${tools_dir}grib_set -s packingType=grid_simple $infile $outfile1
|
||||
${tools_dir}grib_compare -P -b $BLACKLIST,typeOfCompressionUsed,targetCompressionRatio $infile $outfile1 > $REDIRECT
|
||||
${tools_dir}grib_set -s packingType=grid_jpeg $outfile1 $outfile2
|
||||
${tools_dir}grib_compare -P -b $BLACKLIST $outfile1 $outfile2 > $REDIRECT
|
||||
${tools_dir}/grib_set -s packingType=grid_simple $infile $outfile1
|
||||
${tools_dir}/grib_compare -P -b $BLACKLIST,typeOfCompressionUsed,targetCompressionRatio $infile $outfile1 > $REDIRECT
|
||||
${tools_dir}/grib_set -s packingType=grid_jpeg $outfile1 $outfile2
|
||||
${tools_dir}/grib_compare -P -b $BLACKLIST $outfile1 $outfile2 > $REDIRECT
|
||||
|
||||
templateNumber=`${tools_dir}grib_get -p dataRepresentationTemplateNumber $outfile2`
|
||||
templateNumber=`${tools_dir}/grib_get -p dataRepresentationTemplateNumber $outfile2`
|
||||
|
||||
if [ $templateNumber -ne 40 ]
|
||||
then
|
||||
|
@ -57,21 +57,21 @@ rm -f $outfile1 $outfile2
|
|||
infile=${data_dir}/reduced_latlon_surface.grib2
|
||||
outfile1=$infile.tmp_jpeg.1
|
||||
outfile2=$infile.tmp_jpeg.2
|
||||
${tools_dir}grib_set -s packingType=grid_jpeg $infile $outfile1
|
||||
${tools_dir}grib_compare -P -b $BLACKLIST $infile $outfile1 > $REDIRECT
|
||||
${tools_dir}grib_set -s packingType=grid_simple $outfile1 $outfile2
|
||||
${tools_dir}grib_compare -P -b $BLACKLIST,typeOfCompressionUsed,targetCompressionRatio $outfile1 $outfile2 > $REDIRECT
|
||||
${tools_dir}/grib_set -s packingType=grid_jpeg $infile $outfile1
|
||||
${tools_dir}/grib_compare -P -b $BLACKLIST $infile $outfile1 > $REDIRECT
|
||||
${tools_dir}/grib_set -s packingType=grid_simple $outfile1 $outfile2
|
||||
${tools_dir}/grib_compare -P -b $BLACKLIST,typeOfCompressionUsed,targetCompressionRatio $outfile1 $outfile2 > $REDIRECT
|
||||
|
||||
res1=`${tools_dir}grib_get '-F%1.2f' -p min,max,avg $infile`
|
||||
res2=`${tools_dir}grib_get '-F%1.2f' -p min,max,avg $outfile1`
|
||||
res3=`${tools_dir}grib_get '-F%1.2f' -p min,max,avg $outfile2`
|
||||
res1=`${tools_dir}/grib_get '-F%1.2f' -p min,max,avg $infile`
|
||||
res2=`${tools_dir}/grib_get '-F%1.2f' -p min,max,avg $outfile1`
|
||||
res3=`${tools_dir}/grib_get '-F%1.2f' -p min,max,avg $outfile2`
|
||||
[ "$res1" = "$res2" ]
|
||||
[ "$res1" = "$res3" ]
|
||||
|
||||
rm -f $outfile2
|
||||
|
||||
# GRIB-564 nearest 4 neighbours with JPEG packing
|
||||
res=`${tools_dir}grib_get -l 0,50 $outfile1`
|
||||
res=`${tools_dir}/grib_get -l 0,50 $outfile1`
|
||||
[ "$res" = "2.47244 2.47244 2.5115 2.51931 " ]
|
||||
|
||||
rm -f $outfile1
|
||||
|
@ -83,7 +83,7 @@ infile=${data_dir}/jpeg.grib2
|
|||
outfile=$infile.temp.const
|
||||
tempFilter1=temp.grib_jpeg_test1.filt
|
||||
tempFilter2=temp.grib_jpeg_test2.filt
|
||||
numberOfValuesOrig=`${tools_dir}grib_get -p numberOfValues $infile`
|
||||
numberOfValuesOrig=`${tools_dir}/grib_get -p numberOfValues $infile`
|
||||
# Create a filter to print the values. This will be used to create another filter
|
||||
cat > $tempFilter1 <<EOF
|
||||
print "set values={[values!1',']};";
|
||||
|
@ -91,11 +91,11 @@ cat > $tempFilter1 <<EOF
|
|||
EOF
|
||||
# Run the filter on the input. Change the output to set all values to 1 with an additional entry
|
||||
# so the output file should have original numberOfValues+1
|
||||
${tools_dir}grib_filter $tempFilter1 $infile |\
|
||||
${tools_dir}/grib_filter $tempFilter1 $infile |\
|
||||
sed -e 's/[0-9][0-9]*/1/' |\
|
||||
sed -e 's/set values={1,/set values={1,1,/' > $tempFilter2
|
||||
# Apply the new filter to create the constant field JPEG file
|
||||
${tools_dir}grib_filter -o $outfile $tempFilter2 $infile
|
||||
${tools_dir}/grib_filter -o $outfile $tempFilter2 $infile
|
||||
numberOfValuesNew=`expr $numberOfValuesOrig + 1`
|
||||
grib_check_key_equals $outfile "numberOfValues" $numberOfValuesNew
|
||||
rm -f $tempFilter1 $tempFilter2
|
||||
|
|
|
@ -41,13 +41,13 @@ write "lamb_az_eq_area.grib2";
|
|||
EOF
|
||||
|
||||
# Use this filter and the input GRIB to create a new GRIB
|
||||
${tools_dir}grib_filter $FILTER_FILE $GRIB_INFILE
|
||||
${tools_dir}/grib_filter $FILTER_FILE $GRIB_INFILE
|
||||
if [ ! -f "$GRIB_OUTFILE" ]; then
|
||||
echo Failed to create output GRIB from filter >&2
|
||||
exit 1
|
||||
fi
|
||||
# Now get the data from the newly created GRIB file
|
||||
${tools_dir}grib_get_data $GRIB_OUTFILE > $DATA_OUTFILE
|
||||
${tools_dir}/grib_get_data $GRIB_OUTFILE > $DATA_OUTFILE
|
||||
|
||||
# Compare output with reference. If the diff fails, script will immediately exit with status 1
|
||||
diff $DATA_OUTFILE $REF_FILE
|
||||
|
|
|
@ -56,22 +56,22 @@ print "grib[edition]: level=[level] topLevel=[topLevel] bottomLevel=[bottomLevel
|
|||
EOF
|
||||
|
||||
|
||||
${tools_dir}grib_filter level.filter $file > test.dump
|
||||
${tools_dir}/grib_filter level.filter $file > test.dump
|
||||
diff temp.level.good test.dump
|
||||
|
||||
# GRIB-492
|
||||
${tools_dir}grib_set -s indicatorOfTypeOfLevel=110 $sample_g1 $temp
|
||||
res=`${tools_dir}grib_get -p indicatorOfTypeOfLevel:l,topLevel,bottomLevel $temp`
|
||||
${tools_dir}/grib_set -s indicatorOfTypeOfLevel=110 $sample_g1 $temp
|
||||
res=`${tools_dir}/grib_get -p indicatorOfTypeOfLevel:l,topLevel,bottomLevel $temp`
|
||||
[ "$res" = "110 0 0" ]
|
||||
|
||||
# GRIB-415 evaluate level as a double
|
||||
${tools_dir}grib_set -s scaledValueOfFirstFixedSurface=15,scaleFactorOfFirstFixedSurface=1 $sample_g2 $temp
|
||||
res=`${tools_dir}grib_get -p level:d $temp`
|
||||
${tools_dir}/grib_set -s scaledValueOfFirstFixedSurface=15,scaleFactorOfFirstFixedSurface=1 $sample_g2 $temp
|
||||
res=`${tools_dir}/grib_get -p level:d $temp`
|
||||
[ "$res" = "1.5" ]
|
||||
|
||||
# GRIB-637 grib2 Potential vorticity surface
|
||||
input=${data_dir}/tigge_pf_ecmwf.grib2
|
||||
res=`${tools_dir}grib_get -wcount=7 -F%.20f -p level:d $input`
|
||||
res=`${tools_dir}/grib_get -wcount=7 -F%.20f -p level:d $input`
|
||||
[ "$res" = "2.00000000000000000000" ]
|
||||
|
||||
rm -f level.filter temp.level.good test.dump $temp
|
||||
|
|
|
@ -23,7 +23,7 @@ EOF
|
|||
|
||||
file="${data_dir}/reduced_gaussian_model_level.grib2"
|
||||
|
||||
${tools_dir}grib_filter list.filter $file
|
||||
${tools_dir}/grib_filter list.filter $file
|
||||
|
||||
cat >list.filter<<EOF
|
||||
print("x.out") "productDefinitionTemplateNumber=[productDefinitionTemplateNumber]";
|
||||
|
@ -35,7 +35,7 @@ print("x.out") "scaleFactorOfCentralWaveNumber={[scaleFactorOfCentralWaveNumber'
|
|||
print("x.out") "scaledValueOfCentralWaveNumber={[scaledValueOfCentralWaveNumber',']}";
|
||||
EOF
|
||||
|
||||
${tools_dir}grib_filter list.filter test.list.grib
|
||||
${tools_dir}/grib_filter list.filter test.list.grib
|
||||
|
||||
cat >list.ref<<EOF
|
||||
productDefinitionTemplateNumber=31
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
. ./include.sh
|
||||
|
||||
[ -z "$ECCODES_DEFINITION_PATH" ] | ECCODES_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 $ECCODES_DEFINITION_PATH -name '*.def' -print`
|
||||
do
|
||||
${tools_dir}grib_list_keys $file >> tmp$$
|
||||
${tools_dir}/grib_list_keys $file >> tmp$$
|
||||
done
|
||||
|
||||
cat >keys <<EOF
|
||||
|
|
|
@ -16,50 +16,50 @@ REDIRECT=/dev/null
|
|||
cd ${data_dir}
|
||||
rm -f local.log
|
||||
|
||||
${tools_dir}grib_set -s edition=2,setLocalDefinition=1 reduced_gaussian_model_level.grib1 loc.grib2
|
||||
${tools_dir}grib_set -s setLocalDefinition=1 reduced_gaussian_model_level.grib1 loc.grib1
|
||||
${tools_dir}/grib_set -s edition=2,setLocalDefinition=1 reduced_gaussian_model_level.grib1 loc.grib2
|
||||
${tools_dir}/grib_set -s setLocalDefinition=1 reduced_gaussian_model_level.grib1 loc.grib1
|
||||
|
||||
# conversion 1->2
|
||||
for localDefinitionNumber in 1 15 26 30
|
||||
do
|
||||
${tools_dir}grib_set -s localDefinitionNumber=$localDefinitionNumber,perturbationNumber=2,numberOfForecastsInEnsemble=50 loc.grib1 eps.grib1
|
||||
${tools_dir}grib_set -s edition=2 eps.grib1 eps.grib2
|
||||
${tools_dir}/grib_set -s localDefinitionNumber=$localDefinitionNumber,perturbationNumber=2,numberOfForecastsInEnsemble=50 loc.grib1 eps.grib1
|
||||
${tools_dir}/grib_set -s edition=2 eps.grib1 eps.grib2
|
||||
|
||||
${tools_dir}grib_get -p localDefinitionNumber,perturbationNumber,numberOfForecastsInEnsemble,productDefinitionTemplateNumber eps.grib2 >> local.log
|
||||
${tools_dir}grib_compare -e -b param eps.grib1 eps.grib2
|
||||
${tools_dir}/grib_get -p localDefinitionNumber,perturbationNumber,numberOfForecastsInEnsemble,productDefinitionTemplateNumber eps.grib2 >> local.log
|
||||
${tools_dir}/grib_compare -e -b param eps.grib1 eps.grib2
|
||||
|
||||
${tools_dir}grib_set -s localDefinitionNumber=$localDefinitionNumber,numberOfForecastsInEnsemble=0 loc.grib1 eps.grib1
|
||||
${tools_dir}grib_set -s edition=2 eps.grib1 eps.grib2
|
||||
${tools_dir}/grib_set -s localDefinitionNumber=$localDefinitionNumber,numberOfForecastsInEnsemble=0 loc.grib1 eps.grib1
|
||||
${tools_dir}/grib_set -s edition=2 eps.grib1 eps.grib2
|
||||
|
||||
${tools_dir}grib_get -f -p localDefinitionNumber,perturbationNumber,productDefinitionTemplateNumber eps.grib2 >> local.log
|
||||
${tools_dir}grib_compare -e -b param eps.grib1 eps.grib2
|
||||
${tools_dir}/grib_get -f -p localDefinitionNumber,perturbationNumber,productDefinitionTemplateNumber eps.grib2 >> local.log
|
||||
${tools_dir}/grib_compare -e -b param eps.grib1 eps.grib2
|
||||
done
|
||||
|
||||
#local -> local
|
||||
for localStart in 1 7 9 20 25 26 30
|
||||
do
|
||||
${tools_dir}grib_set -s localDefinitionNumber=$localStart loc.grib1 loc1.grib1
|
||||
${tools_dir}grib_set -s edition=2 loc1.grib1 loc1.grib2
|
||||
${tools_dir}grib_get -p localDefinitionNumber loc1.grib1 >> local.log
|
||||
${tools_dir}grib_get -p localDefinitionNumber loc1.grib2 >> local.log
|
||||
${tools_dir}/grib_set -s localDefinitionNumber=$localStart loc.grib1 loc1.grib1
|
||||
${tools_dir}/grib_set -s edition=2 loc1.grib1 loc1.grib2
|
||||
${tools_dir}/grib_get -p localDefinitionNumber loc1.grib1 >> local.log
|
||||
${tools_dir}/grib_get -p localDefinitionNumber loc1.grib2 >> local.log
|
||||
|
||||
for localEps in 1 15 26 30
|
||||
do
|
||||
${tools_dir}grib_set -s localDefinitionNumber=$localEps,eps=1,perturbationNumber=2,numberOfForecastsInEnsemble=50 loc1.grib2 eps.grib2
|
||||
${tools_dir}grib_get -p localDefinitionNumber,perturbationNumber,numberOfForecastsInEnsemble,productDefinitionTemplateNumber eps.grib2 >> local.log
|
||||
${tools_dir}/grib_set -s localDefinitionNumber=$localEps,eps=1,perturbationNumber=2,numberOfForecastsInEnsemble=50 loc1.grib2 eps.grib2
|
||||
${tools_dir}/grib_get -p localDefinitionNumber,perturbationNumber,numberOfForecastsInEnsemble,productDefinitionTemplateNumber eps.grib2 >> local.log
|
||||
done
|
||||
done
|
||||
|
||||
#special types/streams
|
||||
${tools_dir}grib_set -s localDefinitionNumber=1,numberOfForecastsInEnsemble=0 loc.grib1 loc1.grib1
|
||||
${tools_dir}grib_set -s edition=2 loc1.grib1 loc1.grib2
|
||||
${tools_dir}grib_get -f -p localDefinitionNumber,perturbationNumber loc1.grib2 >> local.log
|
||||
${tools_dir}grib_set -s type=em loc1.grib2 eps.grib2
|
||||
${tools_dir}grib_get -p localDefinitionNumber,productDefinitionTemplateNumber,derivedForecast eps.grib2 >> local.log
|
||||
${tools_dir}grib_set -s type=es loc1.grib2 eps.grib2
|
||||
${tools_dir}grib_get -p localDefinitionNumber,productDefinitionTemplateNumber,derivedForecast eps.grib2 >> local.log
|
||||
${tools_dir}grib_set -s stream=enda loc1.grib2 eps.grib2 #2> $REDIRECT
|
||||
${tools_dir}grib_get -p localDefinitionNumber,productDefinitionTemplateNumber eps.grib2 >> local.log
|
||||
${tools_dir}/grib_set -s localDefinitionNumber=1,numberOfForecastsInEnsemble=0 loc.grib1 loc1.grib1
|
||||
${tools_dir}/grib_set -s edition=2 loc1.grib1 loc1.grib2
|
||||
${tools_dir}/grib_get -f -p localDefinitionNumber,perturbationNumber loc1.grib2 >> local.log
|
||||
${tools_dir}/grib_set -s type=em loc1.grib2 eps.grib2
|
||||
${tools_dir}/grib_get -p localDefinitionNumber,productDefinitionTemplateNumber,derivedForecast eps.grib2 >> local.log
|
||||
${tools_dir}/grib_set -s type=es loc1.grib2 eps.grib2
|
||||
${tools_dir}/grib_get -p localDefinitionNumber,productDefinitionTemplateNumber,derivedForecast eps.grib2 >> local.log
|
||||
${tools_dir}/grib_set -s stream=enda loc1.grib2 eps.grib2 #2> $REDIRECT
|
||||
${tools_dir}/grib_get -p localDefinitionNumber,productDefinitionTemplateNumber eps.grib2 >> local.log
|
||||
|
||||
diff local.log local.good.log
|
||||
|
||||
|
|
34
tests/ls.sh
34
tests/ls.sh
|
@ -16,13 +16,13 @@ rm -f $tempLog
|
|||
cd ${data_dir}
|
||||
infile=regular_gaussian_model_level.grib1
|
||||
|
||||
${tools_dir}grib_ls -P count $infile > $tempLog
|
||||
${tools_dir}grib_ls -p count,step $infile >> $tempLog
|
||||
${tools_dir}grib_ls $infile >> $tempLog
|
||||
${tools_dir}grib_ls -l 0,0,1 $infile >> $tempLog
|
||||
${tools_dir}grib_get -l 0,0,1 $infile >> $tempLog
|
||||
${tools_dir}grib_get -p count,step $infile >> $tempLog
|
||||
${tools_dir}grib_get -P count $infile >> $tempLog
|
||||
${tools_dir}/grib_ls -P count $infile > $tempLog
|
||||
${tools_dir}/grib_ls -p count,step $infile >> $tempLog
|
||||
${tools_dir}/grib_ls $infile >> $tempLog
|
||||
${tools_dir}/grib_ls -l 0,0,1 $infile >> $tempLog
|
||||
${tools_dir}/grib_get -l 0,0,1 $infile >> $tempLog
|
||||
${tools_dir}/grib_get -p count,step $infile >> $tempLog
|
||||
${tools_dir}/grib_get -P count $infile >> $tempLog
|
||||
|
||||
files=" reduced_gaussian_lsm.grib1
|
||||
reduced_gaussian_model_level.grib1
|
||||
|
@ -53,37 +53,37 @@ for file in $files
|
|||
do
|
||||
[ -f "$file" ]
|
||||
echo $file >> $tempLog
|
||||
${tools_dir}grib_ls -l 40,28 $file | grep index | awk '{print $4;}' >> $tempLog
|
||||
${tools_dir}/grib_ls -l 40,28 $file | grep index | awk '{print $4;}' >> $tempLog
|
||||
done
|
||||
|
||||
diff $tempLog ls.log
|
||||
rm -f $tempLog
|
||||
|
||||
# Test for bug GRIB-56
|
||||
${tools_dir}grib_set -s typeOfLevel=depthBelowLandLayer,topLevel=missing regular_latlon_surface.grib1 tmp_rlls.grib1
|
||||
${tools_dir}grib_ls -plevels tmp_rlls.grib1 | grep MISSING>/dev/null
|
||||
${tools_dir}/grib_set -s typeOfLevel=depthBelowLandLayer,topLevel=missing regular_latlon_surface.grib1 tmp_rlls.grib1
|
||||
${tools_dir}/grib_ls -plevels tmp_rlls.grib1 | grep MISSING>/dev/null
|
||||
|
||||
${tools_dir}grib_set -s typeOfLevel=depthBelowLandLayer,bottomLevel=missing regular_latlon_surface.grib1 tmp_rlls.grib1
|
||||
${tools_dir}grib_ls -plevels tmp_rlls.grib1 | grep MISSING>/dev/null
|
||||
${tools_dir}/grib_set -s typeOfLevel=depthBelowLandLayer,bottomLevel=missing regular_latlon_surface.grib1 tmp_rlls.grib1
|
||||
${tools_dir}/grib_ls -plevels tmp_rlls.grib1 | grep MISSING>/dev/null
|
||||
rm -f tmp_rlls.grib1 | true
|
||||
|
||||
# GRIB-305. GRIB edition 1 file with one large message
|
||||
if [ -f "sst_globus0083.grib" ]; then
|
||||
${tools_dir}grib_ls sst_globus0083.grib > /dev/null
|
||||
${tools_dir}/grib_ls sst_globus0083.grib > /dev/null
|
||||
fi
|
||||
|
||||
# GRIB-387 printing key of type byte
|
||||
${tools_dir}grib_ls -p uuidOfVGrid test_uuid.grib2 > /dev/null
|
||||
${tools_dir}/grib_ls -p uuidOfVGrid test_uuid.grib2 > /dev/null
|
||||
|
||||
type=`${tools_dir}grib_get -wcount=1 -p typeOfLevel test_uuid.grib2`
|
||||
type=`${tools_dir}/grib_get -wcount=1 -p typeOfLevel test_uuid.grib2`
|
||||
[ "$type" = "generalVertical" ]
|
||||
|
||||
# GRIB-213 nearest with land-sea mask
|
||||
temp_ls=test.grib-213.temp
|
||||
${tools_dir}grib_ls -l 85,13,1,reduced_gaussian_lsm.grib1 reduced_gaussian_surface.grib1 >$temp_ls
|
||||
${tools_dir}/grib_ls -l 85,13,1,reduced_gaussian_lsm.grib1 reduced_gaussian_surface.grib1 >$temp_ls
|
||||
grep -q 'Point chosen #3 index=21 .* distance=11\.' $temp_ls
|
||||
|
||||
${tools_dir}grib_ls -l 53,2,1,reduced_gaussian_lsm.grib1 reduced_gaussian_surface.grib1 >$temp_ls
|
||||
${tools_dir}/grib_ls -l 53,2,1,reduced_gaussian_lsm.grib1 reduced_gaussian_surface.grib1 >$temp_ls
|
||||
grep -q 'Point chosen #2 index=749 .* distance=204\.' $temp_ls
|
||||
|
||||
rm -f $temp_ls
|
||||
|
|
|
@ -13,7 +13,7 @@ test_md5()
|
|||
file=$ECCODES_SAMPLES_PATH/$1
|
||||
expected=$2
|
||||
|
||||
result=`${tools_dir}grib_get -p md5GridSection:s $file`
|
||||
result=`${tools_dir}/grib_get -p md5GridSection:s $file`
|
||||
[ "$result" = "$expected" ]
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ metar_file=metar.txt
|
|||
export METAR_YEAR=2015
|
||||
export METAR_MONTH=4
|
||||
|
||||
${tools_dir}metar_get -n ls $metar_file >/dev/null
|
||||
${tools_dir}metar_get -w count=1/2/3 -p CCCC,latitude,longitude,dateTime,elevation,temperature,dewPointTemperature,qnh $metar_file
|
||||
${tools_dir}/metar_get -n ls $metar_file >/dev/null
|
||||
${tools_dir}/metar_get -w count=1/2/3 -p CCCC,latitude,longitude,dateTime,elevation,temperature,dewPointTemperature,qnh $metar_file
|
||||
|
||||
rm -f $fLog
|
||||
|
|
|
@ -34,7 +34,7 @@ export METAR_YEAR=2015
|
|||
export METAR_MONTH=4
|
||||
|
||||
echo $f >> $fLog
|
||||
${tools_dir}metar_ls $f >> $fLog
|
||||
${tools_dir}/metar_ls $f >> $fLog
|
||||
|
||||
#-------------------------------------------
|
||||
# Test "-p" switch
|
||||
|
@ -43,7 +43,7 @@ ref_ls=$f".ls.ref"
|
|||
res_ls=$f".ls.test"
|
||||
REDIRECT=/dev/null
|
||||
|
||||
${tools_dir}/metar_ls -pCCCC,latitude,longitude,dateTime,elevation,temperature,dewPointTemperature,qnh $f 2> $REDIRECT > $res_ls
|
||||
${tools_dir}//metar_ls -pCCCC,latitude,longitude,dateTime,elevation,temperature,dewPointTemperature,qnh $f 2> $REDIRECT > $res_ls
|
||||
|
||||
diff $ref_ls $res_ls >$REDIRECT 2> $REDIRECT
|
||||
|
||||
|
|
|
@ -15,23 +15,23 @@ REDIRECT=/dev/null
|
|||
infile="${data_dir}/missing.grib2"
|
||||
outfile="${data_dir}/missing_new.grib2"
|
||||
|
||||
scaleFactorOfSecondFixedSurface=`${tools_dir}grib_get -w count=1 -p scaleFactorOfSecondFixedSurface $infile`
|
||||
scaleFactorOfSecondFixedSurface=`${tools_dir}/grib_get -w count=1 -p scaleFactorOfSecondFixedSurface $infile`
|
||||
[ "$scaleFactorOfSecondFixedSurface" = "0" ]
|
||||
|
||||
scaledValueOfSecondFixedSurface=`${tools_dir}grib_get -w count=1 -p scaledValueOfSecondFixedSurface $infile`
|
||||
scaledValueOfSecondFixedSurface=`${tools_dir}/grib_get -w count=1 -p scaledValueOfSecondFixedSurface $infile`
|
||||
[ "$scaledValueOfSecondFixedSurface" = "0" ]
|
||||
|
||||
${tools_dir}grib_set -s scaleFactorOfSecondFixedSurface=missing,scaledValueOfSecondFixedSurface=missing $infile $outfile
|
||||
${tools_dir}/grib_set -s scaleFactorOfSecondFixedSurface=missing,scaledValueOfSecondFixedSurface=missing $infile $outfile
|
||||
|
||||
scaleFactorOfSecondFixedSurface=`${tools_dir}grib_get -w count=1 -p scaleFactorOfSecondFixedSurface $outfile`
|
||||
scaleFactorOfSecondFixedSurface=`${tools_dir}/grib_get -w count=1 -p scaleFactorOfSecondFixedSurface $outfile`
|
||||
[ "$scaleFactorOfSecondFixedSurface" = "MISSING" ]
|
||||
|
||||
scaledValueOfSecondFixedSurface=`${tools_dir}grib_get -w count=1 -p scaledValueOfSecondFixedSurface $outfile`
|
||||
scaledValueOfSecondFixedSurface=`${tools_dir}/grib_get -w count=1 -p scaledValueOfSecondFixedSurface $outfile`
|
||||
[ "$scaledValueOfSecondFixedSurface" = "MISSING" ]
|
||||
|
||||
set +e
|
||||
|
||||
${tools_dir}grib_set -s centre=missing $infile $outfile 2> $REDIRECT > $REDIRECT
|
||||
${tools_dir}/grib_set -s centre=missing $infile $outfile 2> $REDIRECT > $REDIRECT
|
||||
|
||||
[ $? -ne 0 ]
|
||||
|
||||
|
|
|
@ -19,15 +19,15 @@ fi
|
|||
tmpdata=grib_api.$$.grib
|
||||
rm -f $tmpdata
|
||||
|
||||
parameterNumber=`${tools_dir}grib_get -p parameterNumber -w parameterCategory=2,parameterNumber=3 ${data_dir}/multi.grib2`
|
||||
parameterNumber=`${tools_dir}/grib_get -p parameterNumber -w parameterCategory=2,parameterNumber=3 ${data_dir}/multi.grib2`
|
||||
if [ -z "$parameterNumber" ]
|
||||
then
|
||||
echo ---------- grib_get failure
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${tools_dir}grib_copy -w parameterCategory=2,parameterNumber=3 ${data_dir}/multi.grib2 $tmpdata.1
|
||||
${tools_dir}grib_compare ${data_dir}/v.grib2 $tmpdata.1
|
||||
${tools_dir}/grib_copy -w parameterCategory=2,parameterNumber=3 ${data_dir}/multi.grib2 $tmpdata.1
|
||||
${tools_dir}/grib_compare ${data_dir}/v.grib2 $tmpdata.1
|
||||
|
||||
cat > $tmpdata.rules <<EOF
|
||||
if ( parameterCategory==2 && parameterNumber==3) {
|
||||
|
@ -35,7 +35,7 @@ if ( parameterCategory==2 && parameterNumber==3) {
|
|||
}
|
||||
EOF
|
||||
|
||||
parameterNumber=`${tools_dir}grib_filter $tmpdata.rules ${data_dir}/multi.grib2`
|
||||
parameterNumber=`${tools_dir}/grib_filter $tmpdata.rules ${data_dir}/multi.grib2`
|
||||
if [ -z "$parameterNumber" ]
|
||||
then
|
||||
echo ---------- grib_filter failure
|
||||
|
|
|
@ -23,11 +23,11 @@ do
|
|||
fi
|
||||
|
||||
${test_dir}/multi_from_message -m $infile > $out1
|
||||
${tools_dir}grib_get -p count,shortName,level $infile > $out2
|
||||
${tools_dir}/grib_get -p count,shortName,level $infile > $out2
|
||||
diff $out1 $out2
|
||||
|
||||
${test_dir}/multi_from_message $infile > $out1
|
||||
${tools_dir}grib_get -M -p count,shortName,level $infile > $out2
|
||||
${tools_dir}/grib_get -M -p count,shortName,level $infile > $out2
|
||||
diff $out1 $out2
|
||||
|
||||
rm -f $out1 $out2 | true
|
||||
|
|
|
@ -28,7 +28,7 @@ do
|
|||
rm -f $res_num | true
|
||||
|
||||
set +e
|
||||
${tools_dir}codes_bufr_filter bufrdc_num_ref.filter $file 2> $REDIRECT > $res_num
|
||||
${tools_dir}/codes_bufr_filter bufrdc_num_ref.filter $file 2> $REDIRECT > $res_num
|
||||
if [ $? != 0 ]
|
||||
then
|
||||
mv $file $file.no
|
||||
|
|
|
@ -21,7 +21,7 @@ input=${data_dir}/sample.grib2
|
|||
sample2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl
|
||||
PDTs="0 1 2 3 8 9 10 11 12 13 14 45 46 47 48 53"
|
||||
for p in $PDTs; do
|
||||
${tools_dir}grib_set -s productDefinitionTemplateNumber=$p,forecastTime=-2 $sample2 $temp
|
||||
${tools_dir}/grib_set -s productDefinitionTemplateNumber=$p,forecastTime=-2 $sample2 $temp
|
||||
done
|
||||
|
||||
|
||||
|
@ -32,33 +32,33 @@ grib_check_key_equals $input 'dataDate,dataTime' '20080206 1200'
|
|||
|
||||
# Negative step in same day
|
||||
# --------------------------
|
||||
${tools_dir}grib_set -s forecastTime=-2 $input $temp
|
||||
${tools_dir}/grib_set -s forecastTime=-2 $input $temp
|
||||
grib_check_key_equals $temp 'validityDate,validityTime' '20080206 1000'
|
||||
|
||||
${tools_dir}grib_set -s forecastTime=-11 $input $temp
|
||||
${tools_dir}/grib_set -s forecastTime=-11 $input $temp
|
||||
grib_check_key_equals $temp 'validityDate,validityTime' '20080206 100'
|
||||
|
||||
${tools_dir}grib_set -s forecastTime=-12 $input $temp
|
||||
${tools_dir}/grib_set -s forecastTime=-12 $input $temp
|
||||
grib_check_key_equals $temp 'validityDate,validityTime' '20080206 0'
|
||||
|
||||
|
||||
# Negative step previous day
|
||||
# --------------------------
|
||||
${tools_dir}grib_set -s forecastTime=-13 $input $temp
|
||||
${tools_dir}/grib_set -s forecastTime=-13 $input $temp
|
||||
grib_check_key_equals $temp 'validityDate,validityTime' '20080205 2300'
|
||||
|
||||
${tools_dir}grib_set -s forecastTime=-24 $input $temp
|
||||
${tools_dir}/grib_set -s forecastTime=-24 $input $temp
|
||||
grib_check_key_equals $temp 'validityDate,validityTime' '20080205 1200'
|
||||
|
||||
${tools_dir}grib_set -s forecastTime=-33 $input $temp
|
||||
${tools_dir}/grib_set -s forecastTime=-33 $input $temp
|
||||
grib_check_key_equals $temp 'validityDate,validityTime' '20080205 300'
|
||||
|
||||
# Negative step further back
|
||||
# --------------------------
|
||||
${tools_dir}grib_set -s forecastTime=-38 $input $temp
|
||||
${tools_dir}/grib_set -s forecastTime=-38 $input $temp
|
||||
grib_check_key_equals $temp 'validityDate,validityTime' '20080204 2200'
|
||||
|
||||
${tools_dir}grib_set -s forecastTime=-185 $input $temp
|
||||
${tools_dir}/grib_set -s forecastTime=-185 $input $temp
|
||||
grib_check_key_equals $temp 'validityDate,validityTime' '20080129 1900'
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ grib_check_key_equals $input "global,isOctahedral" "1 1"
|
|||
grib_check_key_equals $input "numberOfDataPoints,numberOfCodedValues" "6599680 6599680"
|
||||
|
||||
# Iterator
|
||||
${tools_dir}grib_get_data $input > $temp
|
||||
${tools_dir}/grib_get_data $input > $temp
|
||||
numlines=`wc -l $temp | awk '{print $1}'`
|
||||
[ "$numlines" = "6599681" ] # 1 + numberOfDataPoints
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
REDIRECT=/dev/null
|
||||
temp=loc.padding.grib1
|
||||
|
||||
${tools_dir}grib_set -s setLocalDefinition=1 ${data_dir}/regular_latlon_surface.grib1 $temp
|
||||
${tools_dir}/grib_set -s setLocalDefinition=1 ${data_dir}/regular_latlon_surface.grib1 $temp
|
||||
cat > $$_f <<EOF
|
||||
if (GRIBEXSection1Problem ) {
|
||||
print "localDefinitionNumber=[localDefinitionNumber] size(GRIBEX-section1)=[GRIBEXSection1Problem] section1Length=[section1Length]";
|
||||
|
@ -34,13 +34,13 @@ localDefinitions=`find ${def_dir}/grib1/ -name 'local.98.*def' | sed -e 's:.*/::
|
|||
|
||||
for l1 in $localDefinitions
|
||||
do
|
||||
${tools_dir}grib_set -s localDefinitionNumber=$l1 $temp locx.grib1
|
||||
${tools_dir}grib_filter $$_f locx.grib1
|
||||
${tools_dir}/grib_set -s localDefinitionNumber=$l1 $temp locx.grib1
|
||||
${tools_dir}/grib_filter $$_f locx.grib1
|
||||
for l2 in $localDefinitions
|
||||
do
|
||||
#echo "$l1 -> $l2"
|
||||
${tools_dir}grib_set -s localDefinitionNumber=$l2 locx.grib1 locy.grib1
|
||||
${tools_dir}grib_filter $$_f locy.grib1
|
||||
${tools_dir}/grib_set -s localDefinitionNumber=$l2 locx.grib1 locy.grib1
|
||||
${tools_dir}/grib_filter $$_f locy.grib1
|
||||
done
|
||||
done
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue