Testing: gts_header accessor

This commit is contained in:
Shahram Najm 2023-11-07 14:17:00 +00:00
parent 858cdcb0f2
commit d84441391b
1 changed files with 16 additions and 4 deletions

View File

@ -13,14 +13,11 @@
#Enter data dir
cd ${data_dir}/gts
#Define a common label for all the tmp files
label="gts_get_test"
#Create log file
fLog=${label}".log"
rm -f $fLog
#Define tmp file
fTmp=${label}".tmp.txt"
#----------------------------------------------
@ -35,5 +32,20 @@ result=$( ${tools_dir}/grib_get -wcount=1 -p gts_CCCC -g $gts_file )
${tools_dir}/grib_get -wcount=1 -p gts_header -g $gts_file
# Encoding should be disabled
# -----------------------------
set +e
${tools_dir}/grib_set -s gts_CCCC=xxx -g $gts_file $fTmp
status=$?
set -e
[ $status -ne 0 ]
rm -f $fLog
set +e
${tools_dir}/grib_set -s gts_header=yyy -g $gts_file $fTmp
status=$?
set -e
[ $status -ne 0 ]
# Clean up
rm -f $fLog $fTmp