From d3cd42143dbc8a507df4a001a33b9d066ea66222 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 5 Nov 2019 16:41:09 +0000 Subject: [PATCH] ECC-1013: MARS levtype (o2d/o3d) and parameters for S2S ocean --- definitions/grib2/products_s2s.def | 59 +++++++++++++++------ definitions/grib2/template.4.horizontal.def | 4 ++ 2 files changed, 47 insertions(+), 16 deletions(-) diff --git a/definitions/grib2/products_s2s.def b/definitions/grib2/products_s2s.def index 3e7806b24..4b06a7ffe 100644 --- a/definitions/grib2/products_s2s.def +++ b/definitions/grib2/products_s2s.def @@ -98,21 +98,48 @@ if (isHindcast == 1) { alias mars.time = modelVersionTime; } -# ECC-891 -concept is_ocean_param(zero) { - '1' = { paramId = 151219; } - '1' = { paramId = 151163; } - '1' = { paramId = 151127; } - '1' = { paramId = 151175; } - '1' = { paramId = 151131; } - '1' = { paramId = 151132; } - '1' = { paramId = 151145; } - '1' = { paramId = 151225; } - '1' = { paramId = 174098; } - '0' = { dummy=1; } +# ECC-891, ECC-1013 +concept is_ocean2d_param(zero) { + '1' = { discipline=10; typeOfFirstFixedSurface=160; scaleFactorOfFirstFixedSurface=0; scaledValueOfFirstFixedSurface=0; typeOfSecondFixedSurface=255; } + '1' = { discipline=10; typeOfFirstFixedSurface=160; scaleFactorOfFirstFixedSurface=missing(); scaledValueOfFirstFixedSurface=missing(); typeOfSecondFixedSurface=255; } + '1' = { discipline=10; typeOfFirstFixedSurface=20; scaleFactorOfFirstFixedSurface=2; scaledValueOfFirstFixedSurface=29315; typeOfSecondFixedSurface=255; } + '1' = { discipline=10; typeOfFirstFixedSurface=169; scaleFactorOfFirstFixedSurface=2; scaledValueOfFirstFixedSurface=1; typeOfSecondFixedSurface=255; } + '1' = { discipline=10; typeOfFirstFixedSurface=160; scaleFactorOfFirstFixedSurface=0; scaledValueOfFirstFixedSurface=0; typeOfSecondFixedSurface=160; scaleFactorOfSecondFixedSurface=0; scaledValueOfSecondFixedSurface=300; } + '0' = { dummy=1; } } -if (is_ocean_param) { - constant oceanLevName = 'o2d'; - alias mars.levtype = oceanLevName; - unalias mars.levelist; +concept is_ocean3d_param(zero) { + '1' = { discipline=10; typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=160; } + '0' = { discipline=10; typeOfFirstFixedSurface=160; scaleFactorOfFirstFixedSurface=0; scaledValueOfFirstFixedSurface=0; typeOfSecondFixedSurface=160; scaleFactorOfSecondFixedSurface=0; scaledValueOfSecondFixedSurface=300; } + '0' = { dummy=1; } } + +if (is_ocean2d_param) { + constant oceanLevName = 'o2d'; + alias mars.levtype = oceanLevName; + unalias mars.levelist; +} + +if (is_ocean3d_param) { + constant oceanLevName = 'o3d'; + alias mars.levtype = oceanLevName; + unalias mars.levelist; +} + +#########old +#concept is_ocean_param(zero) { +# '1' = { paramId = 151219; } 2D +# '1' = { paramId = 151163; } 2D +# '1' = { paramId = 151127; } 2D exception!! +# '1' = { paramId = 151175; } 2D exception!! +# '1' = { paramId = 151131; } 2D or 3D +# '1' = { paramId = 151132; } 2D or 3D +# '1' = { paramId = 151145; } 2D +# '1' = { paramId = 151225; } 2D +# '1' = { paramId = 174098; } 2D +# '0' = { dummy=1; } +#} +#if (is_ocean_param) { +# constant oceanLevName = 'o2d'; +# alias mars.levtype = oceanLevName; +# unalias mars.levelist; +#} diff --git a/definitions/grib2/template.4.horizontal.def b/definitions/grib2/template.4.horizontal.def index 51ebbcb80..b9e913418 100755 --- a/definitions/grib2/template.4.horizontal.def +++ b/definitions/grib2/template.4.horizontal.def @@ -74,6 +74,10 @@ concept_nofail vertical.typeOfLevel (unknown) { 'entireOcean' = {typeOfFirstFixedSurface=1;typeOfSecondFixedSurface=9;} 'snow' = {typeOfFirstFixedSurface=114;typeOfSecondFixedSurface=255;} 'snowLayer' = {typeOfFirstFixedSurface=114; typeOfSecondFixedSurface=114;} + + 'oceanSurface' = {typeOfFirstFixedSurface=160; scaleFactorOfFirstFixedSurface=0; scaledValueOfFirstFixedSurface=0; typeOfSecondFixedSurface=255;} + 'oceanLayer' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=160;} + 'mixedLayerDepth' = {typeOfFirstFixedSurface=169; typeOfSecondFixedSurface=255;} } alias levelType=typeOfFirstFixedSurface;