mirror of https://github.com/ecmwf/eccodes.git
Testing: Add test for global gaussian grids during conversion
This commit is contained in:
parent
d7ead3398e
commit
56f025558b
|
@ -50,8 +50,8 @@ do
|
|||
|
||||
done
|
||||
|
||||
# ECC-457 ECMWF total precipitation
|
||||
# ----------------------------------
|
||||
echo "ECC-457 ECMWF total precipitation..."
|
||||
# -----------------------------------------
|
||||
input=${data_dir}/tp_ecmwf.grib
|
||||
output=temp.grib1to2.grib
|
||||
${tools_dir}/grib_set -s edition=2 $input $output
|
||||
|
@ -59,8 +59,9 @@ res=`${tools_dir}/grib_get -w count=1 -p edition,paramId,units $output`
|
|||
[ "$res" = "2 228228 kg m**-2" ]
|
||||
rm -f $output
|
||||
|
||||
# Local Definition 30
|
||||
# --------------------
|
||||
|
||||
echo "Local Definition 30..."
|
||||
# ----------------------------
|
||||
sample_g1=$ECCODES_SAMPLES_PATH/GRIB1.tmpl
|
||||
${tools_dir}/grib_set -s setLocalDefinition=1,localDefinitionNumber=30,stepType=accum,edition=2 $sample_g1 $output
|
||||
grib_check_key_equals $output productDefinitionTemplateNumber 11
|
||||
|
@ -68,6 +69,16 @@ ${tools_dir}/grib_set -s setLocalDefinition=1,localDefinitionNumber=30,type=em,s
|
|||
grib_check_key_equals $output productDefinitionTemplateNumber 12
|
||||
rm -f $output
|
||||
|
||||
|
||||
echo "Check global gaussian grids are preserved..."
|
||||
# -------------------------------------------------
|
||||
# Input is global gaussian so converted output should also be global with the correct lat/lon
|
||||
input=$data_dir/reduced_gaussian_surface.grib1
|
||||
${tools_dir}/grib_set -s edition=2 $input $output
|
||||
grib_check_key_equals $output latitudeOfFirstGridPoint,longitudeOfLastGridPoint '87863799 357187500'
|
||||
${tools_dir}/grib_check_gaussian_grid $input $output
|
||||
|
||||
|
||||
#sed "s:toolsdir:${tools_dir}/:" ${tools_dir}/grib1to2.txt > ${tools_dir}/grib1to2.test
|
||||
#chmod +x ${tools_dir}/grib1to2.test
|
||||
#${tools_dir}/grib1to2.test -f ${data_dir}/test.grib1 ${data_dir}/test.grib2
|
||||
|
|
Loading…
Reference in New Issue