mirror of https://github.com/ecmwf/eccodes.git
ECC-1704: Test
This commit is contained in:
parent
db19ba9405
commit
993cc42e4c
|
@ -17,6 +17,9 @@ tempGrb=${data_dir}/temp.$label.out.grib
|
|||
templog=${data_dir}/temp.$label.log
|
||||
rm -f $templog $tempGrb
|
||||
|
||||
grib1_sample=$ECCODES_SAMPLES_PATH/GRIB1.tmpl
|
||||
grib2_sample=$ECCODES_SAMPLES_PATH/GRIB2.tmpl
|
||||
|
||||
for i in 0 10
|
||||
do
|
||||
for s in 0 1200 600 6000
|
||||
|
@ -83,8 +86,6 @@ hourEnd=$1; dayEnd=$2
|
|||
|
||||
# ECC-134 case-sensitivity
|
||||
# --------------------------
|
||||
grib1_sample=$ECCODES_SAMPLES_PATH/GRIB1.tmpl
|
||||
grib2_sample=$ECCODES_SAMPLES_PATH/GRIB2.tmpl
|
||||
temp=temp.step.$$.grib
|
||||
# M is for Month (code 3)
|
||||
${tools_dir}/grib_set -s indicatorOfUnitOfTimeRange=M $grib1_sample $temp
|
||||
|
@ -147,6 +148,14 @@ grib_check_key_equals $input "dataDate,dataTime,step" "20061205 1200 6"
|
|||
grib_check_key_equals $input "validityDate,validityTime" "20061205 1800"
|
||||
grib_check_key_equals $input "validityDateTime:s" "20061205 001800"
|
||||
|
||||
# ECC-1704: Key validityTime as string
|
||||
# -----------------------------------------------
|
||||
result=$( ${tools_dir}/grib_get -p validityTime:s -s dataTime=0000 $grib2_sample )
|
||||
[ "$result" = "0000" ]
|
||||
input=$data_dir/simple.grib
|
||||
grib_check_key_equals $input "validityTime:s" "0600"
|
||||
|
||||
|
||||
# Key julianDay
|
||||
# -----------------------------------------------
|
||||
input=${data_dir}/sample.grib2
|
||||
|
@ -157,7 +166,6 @@ grib_check_key_equals $temp day 7
|
|||
|
||||
# Seconds (ignored)
|
||||
# -----------------------------------------------
|
||||
grib2_sample=$ECCODES_SAMPLES_PATH/GRIB2.tmpl
|
||||
${tools_dir}/grib_ls -s second=9 -n time $grib2_sample 2>$templog
|
||||
# Something should have been written to stderr
|
||||
[ -s $templog ]
|
||||
|
|
Loading…
Reference in New Issue