#!/bin/sh # Copyright 2005-2016 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.sh #set -x sample_g1=$ECCODES_SAMPLES_PATH/GRIB1.tmpl sample_g2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl temp=temp.level.grib file=${data_dir}/regular_gaussian_pressure_level.grib1 cat >temp.level.good<level.filter< test.dump diff temp.level.good test.dump # GRIB-492 ${tools_dir}grib_set -s indicatorOfTypeOfLevel=110 $sample_g1 $temp res=`${tools_dir}grib_get -p indicatorOfTypeOfLevel:l,topLevel,bottomLevel $temp` [ "$res" = "110 0 0" ] # GRIB-415 evaluate level as a double ${tools_dir}grib_set -s scaledValueOfFirstFixedSurface=15,scaleFactorOfFirstFixedSurface=1 $sample_g2 $temp res=`${tools_dir}grib_get -p level:d $temp` [ "$res" = "1.5" ] # GRIB-637 grib2 Potential vorticity surface input=${data_dir}/tigge_pf_ecmwf.grib2 res=`${tools_dir}grib_get -wcount=7 -F%.20f -p level:d $input` [ "$res" = "2.00000000000000000000" ] rm -f level.filter temp.level.good test.dump $temp