eccodes/tests/gts_get.sh

40 lines
1.0 KiB
Bash
Raw Normal View History

#!/bin/sh
2020-01-28 14:32:34 +00:00
# (C) Copyright 2005- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
. ./include.ctest.sh
#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"
#----------------------------------------------
# Test "-p" switch
#----------------------------------------------
gts_file=EGRR20150317121020_00493212.DAT
${tools_dir}/gts_get -p TT,AA,II,CCCC,YY,GG,gg,BBB $gts_file >/dev/null
2023-11-07 13:49:02 +00:00
gts_file=${data_dir}/gts.grib
result=$( ${tools_dir}/grib_get -wcount=1 -p gts_CCCC -g $gts_file )
[ "$result" = "ECMG" ]
${tools_dir}/grib_get -wcount=1 -p gts_header -g $gts_file
2016-11-18 13:39:01 +00:00
rm -f $fLog