From ce5d7482d1623e01cbcc4bac8f7f8716119b909c Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 13 Jan 2022 13:05:19 +0000 Subject: [PATCH] ECC-1298: GRIB2: Open Data parameters (Part 2) --- definitions/grib2/localConcepts/ecmf/cfVarName.def | 5 +++-- definitions/grib2/localConcepts/ecmf/name.def | 5 +++-- definitions/grib2/localConcepts/ecmf/paramId.def | 5 +++-- definitions/grib2/localConcepts/ecmf/shortName.def | 5 +++-- definitions/grib2/localConcepts/ecmf/units.def | 5 +++-- tests/grib1to2.sh | 8 +++++--- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/definitions/grib2/localConcepts/ecmf/cfVarName.def b/definitions/grib2/localConcepts/ecmf/cfVarName.def index 20aee6817..5416c43b8 100644 --- a/definitions/grib2/localConcepts/ecmf/cfVarName.def +++ b/definitions/grib2/localConcepts/ecmf/cfVarName.def @@ -1044,12 +1044,13 @@ } #Total precipitation 'tp' = { + localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 1 ; - parameterNumber = 52 ; + parameterNumber = 193 ; typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 255 ; typeOfStatisticalProcessing = 1 ; - unitsFactor = 1000 ; } #Instantaneous eastward turbulent surface stress 'iews' = { diff --git a/definitions/grib2/localConcepts/ecmf/name.def b/definitions/grib2/localConcepts/ecmf/name.def index 180f5e3af..04cc9e702 100644 --- a/definitions/grib2/localConcepts/ecmf/name.def +++ b/definitions/grib2/localConcepts/ecmf/name.def @@ -1044,12 +1044,13 @@ } #Total precipitation 'Total precipitation' = { + localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 1 ; - parameterNumber = 52 ; + parameterNumber = 193 ; typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 255 ; typeOfStatisticalProcessing = 1 ; - unitsFactor = 1000 ; } #Instantaneous eastward turbulent surface stress 'Instantaneous eastward turbulent surface stress' = { diff --git a/definitions/grib2/localConcepts/ecmf/paramId.def b/definitions/grib2/localConcepts/ecmf/paramId.def index f30aa6025..a3e7a7532 100644 --- a/definitions/grib2/localConcepts/ecmf/paramId.def +++ b/definitions/grib2/localConcepts/ecmf/paramId.def @@ -1044,12 +1044,13 @@ } #Total precipitation '228' = { + localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 1 ; - parameterNumber = 52 ; + parameterNumber = 193 ; typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 255 ; typeOfStatisticalProcessing = 1 ; - unitsFactor = 1000 ; } #Instantaneous eastward turbulent surface stress '229' = { diff --git a/definitions/grib2/localConcepts/ecmf/shortName.def b/definitions/grib2/localConcepts/ecmf/shortName.def index 36fb2f03a..f0346b424 100644 --- a/definitions/grib2/localConcepts/ecmf/shortName.def +++ b/definitions/grib2/localConcepts/ecmf/shortName.def @@ -1044,12 +1044,13 @@ } #Total precipitation 'tp' = { + localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 1 ; - parameterNumber = 52 ; + parameterNumber = 193 ; typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 255 ; typeOfStatisticalProcessing = 1 ; - unitsFactor = 1000 ; } #Instantaneous eastward turbulent surface stress 'iews' = { diff --git a/definitions/grib2/localConcepts/ecmf/units.def b/definitions/grib2/localConcepts/ecmf/units.def index 8da8944d4..c49227bd6 100644 --- a/definitions/grib2/localConcepts/ecmf/units.def +++ b/definitions/grib2/localConcepts/ecmf/units.def @@ -1044,12 +1044,13 @@ } #Total precipitation 'm' = { + localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 1 ; - parameterNumber = 52 ; + parameterNumber = 193 ; typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 255 ; typeOfStatisticalProcessing = 1 ; - unitsFactor = 1000 ; } #Instantaneous eastward turbulent surface stress 'N m**-2' = { diff --git a/tests/grib1to2.sh b/tests/grib1to2.sh index 74140cc32..5f98013a4 100755 --- a/tests/grib1to2.sh +++ b/tests/grib1to2.sh @@ -50,13 +50,15 @@ do done -echo "ECC-457 ECMWF total precipitation..." -# ----------------------------------------- +echo "ECC-457,ECC-1298 ECMWF total precipitation..." +# --------------------------------------------------- input=${data_dir}/tp_ecmwf.grib output=temp.grib1to2.grib ${tools_dir}/grib_set -s edition=2 $input $output res=`${tools_dir}/grib_get -w count=1 -p edition,paramId,units $output` -[ "$res" = "2 228228 kg m**-2" ] +[ "$res" = "2 228 m" ] +res=`${tools_dir}/grib_get -w count=1 -p stepType $output` +[ "$res" = "accum" ] rm -f $output