From ac5266ab777b28f93b2bfebc95a6a41a5eeff494 Mon Sep 17 00:00:00 2001 From: Sebastien Villaume Date: Fri, 15 May 2020 10:59:52 +0100 Subject: [PATCH 1/4] adding sea ice Level and sea ice layer in the GRIB2 typeOfLevel concept --- definitions/grib2/template.4.horizontal.def | 2 ++ 1 file changed, 2 insertions(+) diff --git a/definitions/grib2/template.4.horizontal.def b/definitions/grib2/template.4.horizontal.def index 348e4eb89..4a6f69902 100755 --- a/definitions/grib2/template.4.horizontal.def +++ b/definitions/grib2/template.4.horizontal.def @@ -74,6 +74,8 @@ concept_nofail vertical.typeOfLevel (unknown) { 'entireOcean' = {typeOfFirstFixedSurface=1;typeOfSecondFixedSurface=9;} 'snow' = {typeOfFirstFixedSurface=114;typeOfSecondFixedSurface=255;} 'snowLayer' = {typeOfFirstFixedSurface=114; typeOfSecondFixedSurface=114;} + 'seaIce' = {typeOfFirstFixedSurface=152; typeOfSecondFixedSurface=255;} + 'seaIceLayer' = {typeOfFirstFixedSurface=152; typeOfSecondFixedSurface=152;} 'oceanSurface' = {typeOfFirstFixedSurface=160; scaleFactorOfFirstFixedSurface=0; scaledValueOfFirstFixedSurface=0; typeOfSecondFixedSurface=255;} 'oceanLayer' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=160;} From 43b3aff9a1c2986357e663d86b8fd8b975fb9ee2 Mon Sep 17 00:00:00 2001 From: Sebastien Villaume Date: Fri, 15 May 2020 11:29:14 +0100 Subject: [PATCH 2/4] move TypeOfLevel concept into a external file typeOfLevelConcept.def --- definitions/grib2/template.4.horizontal.def | 58 +-------------------- definitions/grib2/typeOfLevelConcept.def | 47 +++++++++++++++++ 2 files changed, 48 insertions(+), 57 deletions(-) create mode 100644 definitions/grib2/typeOfLevelConcept.def diff --git a/definitions/grib2/template.4.horizontal.def b/definitions/grib2/template.4.horizontal.def index 4a6f69902..d9f82be5f 100755 --- a/definitions/grib2/template.4.horizontal.def +++ b/definitions/grib2/template.4.horizontal.def @@ -24,63 +24,7 @@ unsigned[4] scaledValueOfSecondFixedSurface = missing() : can_be_missing,dump,no transient pressureUnits="hPa"; -concept_nofail vertical.typeOfLevel (unknown) { -#set uses the last one -#get returns the first match - 'surface' = { typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=255; } - 'cloudBase' = { typeOfFirstFixedSurface=2; typeOfSecondFixedSurface=255; } - 'cloudTop' = { typeOfFirstFixedSurface=3; typeOfSecondFixedSurface=255; } - 'isothermZero' = { typeOfFirstFixedSurface=4; typeOfSecondFixedSurface=255; } - 'adiabaticCondensation' = {typeOfFirstFixedSurface=5; typeOfSecondFixedSurface=255; } - 'maxWind' = {typeOfFirstFixedSurface=6; typeOfSecondFixedSurface=255;} - 'tropopause' = {typeOfFirstFixedSurface=7; typeOfSecondFixedSurface=255;} - 'nominalTop' = {typeOfFirstFixedSurface=8; typeOfSecondFixedSurface=255; } - 'seaBottom' = {typeOfFirstFixedSurface=9; typeOfSecondFixedSurface=255;} - - # Note: We already had 'entireAtmosphere' mapped before adding this one so had to choose another name - 'atmosphere' = {typeOfFirstFixedSurface=10; typeOfSecondFixedSurface=255;} - - 'isothermal' = {typeOfFirstFixedSurface=20; typeOfSecondFixedSurface=255;} - 'isobaricInPa' = {typeOfFirstFixedSurface=100; typeOfSecondFixedSurface=255; pressureUnits='Pa'; } - 'isobaricInhPa' = {typeOfFirstFixedSurface=100; pressureUnits='hPa'; typeOfSecondFixedSurface=255;} - 'isobaricLayer' = {typeOfFirstFixedSurface=100; typeOfSecondFixedSurface=100;} - 'meanSea' = { typeOfFirstFixedSurface=101; typeOfSecondFixedSurface=255; } - 'heightAboveSea' = {typeOfFirstFixedSurface=102; typeOfSecondFixedSurface=255;} - 'heightAboveSeaLayer' = {typeOfFirstFixedSurface=102; typeOfSecondFixedSurface=102;} - 'heightAboveGround' = {typeOfFirstFixedSurface=103; typeOfSecondFixedSurface=255;} - 'heightAboveGroundLayer' = {typeOfFirstFixedSurface=103;typeOfSecondFixedSurface=103;} - 'sigma' = {typeOfFirstFixedSurface=104; typeOfSecondFixedSurface=255;} - 'sigmaLayer' = {typeOfFirstFixedSurface=104; typeOfSecondFixedSurface=104;} - 'hybrid' = {typeOfFirstFixedSurface=105; typeOfSecondFixedSurface=255;} - 'hybridHeight' = {typeOfFirstFixedSurface=118; typeOfSecondFixedSurface=255;} - 'hybridLayer' = {typeOfFirstFixedSurface=105; typeOfSecondFixedSurface=105; } - 'depthBelowLand' = {typeOfFirstFixedSurface=106; typeOfSecondFixedSurface=255;} - 'depthBelowLandLayer' = {typeOfFirstFixedSurface=106; typeOfSecondFixedSurface=106;} - 'theta' = {typeOfFirstFixedSurface=107; typeOfSecondFixedSurface=255;} - 'thetaLayer' = {typeOfFirstFixedSurface=107;typeOfSecondFixedSurface=107;} - 'pressureFromGround' = {typeOfFirstFixedSurface=108; typeOfSecondFixedSurface=255;} - 'pressureFromGroundLayer' = {typeOfFirstFixedSurface=108;typeOfSecondFixedSurface=108;} - 'potentialVorticity' = {typeOfFirstFixedSurface=109; typeOfSecondFixedSurface=255;} - 'eta' = {typeOfFirstFixedSurface=111; typeOfSecondFixedSurface=255;} - 'soil' = {typeOfFirstFixedSurface=151; typeOfSecondFixedSurface=255;} - 'soilLayer' = {typeOfFirstFixedSurface=151; typeOfSecondFixedSurface=151;} - -# In the case of Generalized vertical height coordinates, NV must be 6 - 'generalVertical' = {genVertHeightCoords=1; typeOfFirstFixedSurface=150; NV=6;} - 'generalVerticalLayer' = {genVertHeightCoords=1; typeOfFirstFixedSurface=150; typeOfSecondFixedSurface=150; NV=6;} - - 'depthBelowSea' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=255;} - 'entireAtmosphere' = {typeOfFirstFixedSurface=1;typeOfSecondFixedSurface=8;} - 'entireOcean' = {typeOfFirstFixedSurface=1;typeOfSecondFixedSurface=9;} - 'snow' = {typeOfFirstFixedSurface=114;typeOfSecondFixedSurface=255;} - 'snowLayer' = {typeOfFirstFixedSurface=114; typeOfSecondFixedSurface=114;} - 'seaIce' = {typeOfFirstFixedSurface=152; typeOfSecondFixedSurface=255;} - 'seaIceLayer' = {typeOfFirstFixedSurface=152; typeOfSecondFixedSurface=152;} - - 'oceanSurface' = {typeOfFirstFixedSurface=160; scaleFactorOfFirstFixedSurface=0; scaledValueOfFirstFixedSurface=0; typeOfSecondFixedSurface=255;} - 'oceanLayer' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=160;} - 'mixedLayerDepth' = {typeOfFirstFixedSurface=169; typeOfSecondFixedSurface=255;} -} +concept_nofail vertical.typeOfLevel (unknown,"typeOfLevelConcept.def",conceptsLocalMarsDirAll,conceptsMasterMarsDir); alias levelType=typeOfFirstFixedSurface; diff --git a/definitions/grib2/typeOfLevelConcept.def b/definitions/grib2/typeOfLevelConcept.def new file mode 100644 index 000000000..83893e82e --- /dev/null +++ b/definitions/grib2/typeOfLevelConcept.def @@ -0,0 +1,47 @@ +# Concept type of level +'surface' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=255;} +'cloudBase' = {typeOfFirstFixedSurface=2; typeOfSecondFixedSurface=255;} +'cloudTop' = {typeOfFirstFixedSurface=3; typeOfSecondFixedSurface=255;} +'isothermZero' = {typeOfFirstFixedSurface=4; typeOfSecondFixedSurface=255;} +'adiabaticCondensation' = {typeOfFirstFixedSurface=5; typeOfSecondFixedSurface=255;} +'maxWind' = {typeOfFirstFixedSurface=6; typeOfSecondFixedSurface=255;} +'tropopause' = {typeOfFirstFixedSurface=7; typeOfSecondFixedSurface=255;} +'nominalTop' = {typeOfFirstFixedSurface=8; typeOfSecondFixedSurface=255;} +'seaBottom' = {typeOfFirstFixedSurface=9; typeOfSecondFixedSurface=255;} +'atmosphere' = {typeOfFirstFixedSurface=10; typeOfSecondFixedSurface=255;} +'isothermal' = {typeOfFirstFixedSurface=20; typeOfSecondFixedSurface=255;} +'isobaricInPa' = {typeOfFirstFixedSurface=100; typeOfSecondFixedSurface=255; pressureUnits='Pa';} +'isobaricInhPa' = {typeOfFirstFixedSurface=100; pressureUnits='hPa'; typeOfSecondFixedSurface=255;} +'isobaricLayer' = {typeOfFirstFixedSurface=100; typeOfSecondFixedSurface=100;} +'meanSea' = {typeOfFirstFixedSurface=101; typeOfSecondFixedSurface=255;} +'heightAboveSea' = {typeOfFirstFixedSurface=102; typeOfSecondFixedSurface=255;} +'heightAboveSeaLayer' = {typeOfFirstFixedSurface=102; typeOfSecondFixedSurface=102;} +'heightAboveGround' = {typeOfFirstFixedSurface=103; typeOfSecondFixedSurface=255;} +'heightAboveGroundLayer' = {typeOfFirstFixedSurface=103; typeOfSecondFixedSurface=103;} +'sigma' = {typeOfFirstFixedSurface=104; typeOfSecondFixedSurface=255;} +'sigmaLayer' = {typeOfFirstFixedSurface=104; typeOfSecondFixedSurface=104;} +'hybrid' = {typeOfFirstFixedSurface=105; typeOfSecondFixedSurface=255;} +'hybridHeight' = {typeOfFirstFixedSurface=118; typeOfSecondFixedSurface=255;} +'hybridLayer' = {typeOfFirstFixedSurface=105; typeOfSecondFixedSurface=105;} +'depthBelowLand' = {typeOfFirstFixedSurface=106; typeOfSecondFixedSurface=255;} +'depthBelowLandLayer' = {typeOfFirstFixedSurface=106; typeOfSecondFixedSurface=106;} +'theta' = {typeOfFirstFixedSurface=107; typeOfSecondFixedSurface=255;} +'thetaLayer' = {typeOfFirstFixedSurface=107; typeOfSecondFixedSurface=107;} +'pressureFromGround' = {typeOfFirstFixedSurface=108; typeOfSecondFixedSurface=255;} +'pressureFromGroundLayer' = {typeOfFirstFixedSurface=108; typeOfSecondFixedSurface=108;} +'potentialVorticity' = {typeOfFirstFixedSurface=109; typeOfSecondFixedSurface=255;} +'eta' = {typeOfFirstFixedSurface=111; typeOfSecondFixedSurface=255;} +'soil' = {typeOfFirstFixedSurface=151; typeOfSecondFixedSurface=255;} +'soilLayer' = {typeOfFirstFixedSurface=151; typeOfSecondFixedSurface=151;} +'generalVertical' = {genVertHeightCoords=1; typeOfFirstFixedSurface=150; NV=6;} +'generalVerticalLayer' = {genVertHeightCoords=1; typeOfFirstFixedSurface=150; typeOfSecondFixedSurface=150; NV=6;} +'depthBelowSea' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=255;} +'oceanSurface' = {typeOfFirstFixedSurface=160; scaleFactorOfFirstFixedSurface=0; scaledValueOfFirstFixedSurface=0; typeOfSecondFixedSurface=255;} +'oceanLayer' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=160;} +'entireAtmosphere' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=8;} +'entireOcean' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=9;} +'snow' = {typeOfFirstFixedSurface=114; typeOfSecondFixedSurface=255;} +'snowLayer' = {typeOfFirstFixedSurface=114; typeOfSecondFixedSurface=114;} +'seaIce' = {typeOfFirstFixedSurface=152; typeOfSecondFixedSurface=255;} +'seaIceLayer' = {typeOfFirstFixedSurface=152; typeOfSecondFixedSurface=152;} +'mixedLayerDepth' = {typeOfFirstFixedSurface=169; typeOfSecondFixedSurface=255;} From fa45bf2a472498446aeeed41dca2019a4ccb1294 Mon Sep 17 00:00:00 2001 From: Sebastien Villaume Date: Fri, 15 May 2020 11:46:19 +0100 Subject: [PATCH 3/4] update the typeOfLevel concept with correct lookup paths --- definitions/grib2/template.4.horizontal.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/definitions/grib2/template.4.horizontal.def b/definitions/grib2/template.4.horizontal.def index d9f82be5f..d3739c0b1 100755 --- a/definitions/grib2/template.4.horizontal.def +++ b/definitions/grib2/template.4.horizontal.def @@ -24,7 +24,7 @@ unsigned[4] scaledValueOfSecondFixedSurface = missing() : can_be_missing,dump,no transient pressureUnits="hPa"; -concept_nofail vertical.typeOfLevel (unknown,"typeOfLevelConcept.def",conceptsLocalMarsDirAll,conceptsMasterMarsDir); +concept_nofail vertical.typeOfLevel (unknown,"typeOfLevelConcept.def",conceptsMasterDir,conceptsLocalDirAll); alias levelType=typeOfFirstFixedSurface; From 5ce9acba221734ef6664e8eca0fca0b576d98dc4 Mon Sep 17 00:00:00 2001 From: Sebastien Villaume Date: Mon, 20 Jul 2020 18:11:10 +0100 Subject: [PATCH 4/4] mapping snow level and sea ice level in table 4.5 to levtype sol --- definitions/grib2/tables/25/4.5.table | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/definitions/grib2/tables/25/4.5.table b/definitions/grib2/tables/25/4.5.table index a600714b0..bf8473c40 100644 --- a/definitions/grib2/tables/25/4.5.table +++ b/definitions/grib2/tables/25/4.5.table @@ -13,9 +13,9 @@ 11 11 Cumulonimbus (CB) base (m) 12 12 Cumulonimbus (CB) top (m) 13 13 Lowest level where vertically integrated cloud cover exceeds the specified percentage (cloud base for a given percentage cloud cover) (%) -14 14 Level of free convection (LFC) -15 15 Convective condensation level (CCL) -16 16 Level of neutral buoyancy or equilibrium level (LNB) +14 14 Level of free convection (LFC) (-) +15 15 Convective condensation level (CCL) (-) +16 16 Level of neutral buoyancy or equilibrium level (LNB) (-) # 17-19 Reserved 20 20 Isothermal level (K) 21 21 Lowest level where mass density exceeds the specified value (base for a given threshold of mass density) (kg m-3) @@ -45,7 +45,7 @@ 111 111 Eta level (-) 112 112 Reserved 113 113 Logarithmic hybrid level -114 114 Snow level (Numeric) +114 sol Snow level (Numeric) 115 115 Sigma height level # 116 Reserved 117 117 Mixed layer depth (m) @@ -54,7 +54,7 @@ # 120-149 Reserved 150 150 Generalized vertical height coordinate 151 sol Soil level (Numeric) -152 152 Sea ice level (Numeric) +152 sol Sea ice level (Numeric) # 153-159 Reserved 160 160 Depth below sea level (m) 161 161 Depth below water surface (m)