Testing: Test for WRAP

This commit is contained in:
Shahram Najm 2021-08-15 15:54:13 +01:00
parent e7c6360c50
commit 20a52d119a
5 changed files with 85 additions and 67 deletions

View File

@ -1,13 +1,6 @@
# (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.
#
section_length[3] section4Length ;
section_length[3] section4Length;
unsigned[1] reserved=0 : hidden;
@ -17,15 +10,15 @@ unsigned[1] numberOfBytesPerInteger ;
unsigned[2] reserved=0 : hidden;
unsigned[3] numberOfChars ;
unsigned[3] numberOfChars;
unsigned[3] numberOfFloats ;
unsigned[3] numberOfFloats;
unsigned[3] numberOfInts ;
unsigned[3] numberOfInts;
unsigned[3] numberOfLogicals ;
unsigned[3] numberOfLogicals;
unsigned[3] numberOfReservedBytes ;
unsigned[3] numberOfReservedBytes;
unsigned[4] reserved=0 : hidden;
unsigned[4] reserved=0 : hidden;
@ -52,7 +45,6 @@ if(numberOfChars >= 12)
ascii[1] char;
}
constant zero = 0;
concept isEps(zero) { 1 = { marsType = "pf"; } }
concept isSens(zero) { 1 = { marsType = "sf"; } }
@ -84,18 +76,14 @@ if(numberOfChars >= 12)
alias mars.class = marsClass;
alias mars.type = marsType;
alias mars.expver = marsExpver;
}
else
{
charValues list(numberOfChars) {
ascii[1] char;
}
}
#reservedBytes list (numberOfReservedBytes){
# unsigned[1] byte;
# }
#}

BIN
samples/wrap.tmpl Normal file

Binary file not shown.

View File

@ -100,6 +100,7 @@ if( HAVE_BUILD_TOOLS )
grib_sh_imag
grib_sh_spectral_complex
pseudo_diag
wrap
grib_levtype
grib_grid_unstructured
grib_grid_lambert_conformal

29
tests/wrap.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/sh
# (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.
#
# Tests for WRAP
. ./include.sh
label="wrap-test"
tempOut=temp.${label}.out
tempTxt=temp.${label}.txt
tempRef=temp.${label}.ref
REDIRECT=/dev/null
input=$ECCODES_SAMPLES_PATH/wrap.tmpl
${tools_dir}/grib_dump -TA -O $input
id=`${tools_dir}/grib_get -TA -p identifier $input`
[ "$id" = "WRAP" ]
# Clean up
rm -f $tempOut $tempRef $tempTxt