mirror of https://github.com/ecmwf/eccodes.git
Testing: gts_header accessor
This commit is contained in:
parent
858cdcb0f2
commit
d84441391b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue