diff --git a/definitions/grib1/localConcepts/ecmf/cfName.def b/definitions/grib1/localConcepts/ecmf/cfName.def index 9868daef7..48b023899 100644 --- a/definitions/grib1/localConcepts/ecmf/cfName.def +++ b/definitions/grib1/localConcepts/ecmf/cfName.def @@ -589,32 +589,32 @@ table2Version = 190 ; indicatorOfParameter = 179 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress 'surface_downward_eastward_stress' = { table2Version = 128 ; indicatorOfParameter = 180 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress 'surface_downward_eastward_stress' = { table2Version = 170 ; indicatorOfParameter = 180 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress 'surface_downward_eastward_stress' = { table2Version = 180 ; indicatorOfParameter = 180 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress 'surface_downward_northward_stress' = { table2Version = 128 ; indicatorOfParameter = 181 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress 'surface_downward_northward_stress' = { table2Version = 170 ; indicatorOfParameter = 181 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress 'surface_downward_northward_stress' = { table2Version = 180 ; indicatorOfParameter = 181 ; @@ -959,7 +959,7 @@ table2Version = 174 ; indicatorOfParameter = 98 ; } -#Carbon Dioxide +#Carbon dioxide mass mixing ratio 'mass_fraction_of_carbon_dioxide_in_air' = { table2Version = 210 ; indicatorOfParameter = 61 ; diff --git a/definitions/grib1/localConcepts/ecmf/cfVarName.def b/definitions/grib1/localConcepts/ecmf/cfVarName.def index 36530b6f3..6e19617e2 100644 --- a/definitions/grib1/localConcepts/ecmf/cfVarName.def +++ b/definitions/grib1/localConcepts/ecmf/cfVarName.def @@ -1054,12 +1054,12 @@ table2Version = 128 ; indicatorOfParameter = 148 ; } -#Surface net radiation +#Surface net radiation (SW and LW) 'snr' = { table2Version = 128 ; indicatorOfParameter = 149 ; } -#Top net radiation +#Top net radiation (SW and LW) 'tnr' = { table2Version = 128 ; indicatorOfParameter = 150 ; @@ -1459,32 +1459,32 @@ table2Version = 190 ; indicatorOfParameter = 179 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress 'ewss' = { table2Version = 128 ; indicatorOfParameter = 180 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress 'ewss' = { table2Version = 170 ; indicatorOfParameter = 180 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress 'ewss' = { table2Version = 180 ; indicatorOfParameter = 180 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress 'nsss' = { table2Version = 128 ; indicatorOfParameter = 181 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress 'nsss' = { table2Version = 170 ; indicatorOfParameter = 181 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress 'nsss' = { table2Version = 180 ; indicatorOfParameter = 181 ; @@ -15024,7 +15024,7 @@ table2Version = 172 ; indicatorOfParameter = 147 ; } -#Mean surface net radiation flux +#Time-mean surface net radiation flux (SW and LW) 'msnrf' = { table2Version = 172 ; indicatorOfParameter = 149 ; @@ -17509,7 +17509,7 @@ table2Version = 228 ; indicatorOfParameter = 3 ; } -#Mean temperature at 2 metres +#Mean 2 metre temperature 'mean2t' = { table2Version = 228 ; indicatorOfParameter = 4 ; diff --git a/definitions/grib1/localConcepts/ecmf/name.def b/definitions/grib1/localConcepts/ecmf/name.def index 78ecaecad..bee6eddab 100644 --- a/definitions/grib1/localConcepts/ecmf/name.def +++ b/definitions/grib1/localConcepts/ecmf/name.def @@ -1054,13 +1054,13 @@ table2Version = 128 ; indicatorOfParameter = 148 ; } -#Surface net radiation -'Surface net radiation' = { +#Surface net radiation (SW and LW) +'Surface net radiation (SW and LW)' = { table2Version = 128 ; indicatorOfParameter = 149 ; } -#Top net radiation -'Top net radiation' = { +#Top net radiation (SW and LW) +'Top net radiation (SW and LW)' = { table2Version = 128 ; indicatorOfParameter = 150 ; } @@ -1459,33 +1459,33 @@ table2Version = 190 ; indicatorOfParameter = 179 ; } -#Eastward turbulent surface stress -'Eastward turbulent surface stress' = { +#Time-integrated eastward turbulent surface stress +'Time-integrated eastward turbulent surface stress' = { table2Version = 128 ; indicatorOfParameter = 180 ; } -#Eastward turbulent surface stress -'Eastward turbulent surface stress' = { +#Time-integrated eastward turbulent surface stress +'Time-integrated eastward turbulent surface stress' = { table2Version = 170 ; indicatorOfParameter = 180 ; } -#Eastward turbulent surface stress -'Eastward turbulent surface stress' = { +#Time-integrated eastward turbulent surface stress +'Time-integrated eastward turbulent surface stress' = { table2Version = 180 ; indicatorOfParameter = 180 ; } -#Northward turbulent surface stress -'Northward turbulent surface stress' = { +#Time-integrated northward turbulent surface stress +'Time-integrated northward turbulent surface stress' = { table2Version = 128 ; indicatorOfParameter = 181 ; } -#Northward turbulent surface stress -'Northward turbulent surface stress' = { +#Time-integrated northward turbulent surface stress +'Time-integrated northward turbulent surface stress' = { table2Version = 170 ; indicatorOfParameter = 181 ; } -#Northward turbulent surface stress -'Northward turbulent surface stress' = { +#Time-integrated northward turbulent surface stress +'Time-integrated northward turbulent surface stress' = { table2Version = 180 ; indicatorOfParameter = 181 ; } @@ -15024,8 +15024,8 @@ table2Version = 172 ; indicatorOfParameter = 147 ; } -#Mean surface net radiation flux -'Mean surface net radiation flux' = { +#Time-mean surface net radiation flux (SW and LW) +'Time-mean surface net radiation flux (SW and LW)' = { table2Version = 172 ; indicatorOfParameter = 149 ; } @@ -17509,8 +17509,8 @@ table2Version = 228 ; indicatorOfParameter = 3 ; } -#Mean temperature at 2 metres -'Mean temperature at 2 metres' = { +#Mean 2 metre temperature +'Mean 2 metre temperature' = { table2Version = 228 ; indicatorOfParameter = 4 ; } diff --git a/definitions/grib1/localConcepts/ecmf/paramId.def b/definitions/grib1/localConcepts/ecmf/paramId.def index 572393e2e..bd07cf762 100644 --- a/definitions/grib1/localConcepts/ecmf/paramId.def +++ b/definitions/grib1/localConcepts/ecmf/paramId.def @@ -1054,12 +1054,12 @@ table2Version = 128 ; indicatorOfParameter = 148 ; } -#Surface net radiation +#Surface net radiation (SW and LW) '149' = { table2Version = 128 ; indicatorOfParameter = 149 ; } -#Top net radiation +#Top net radiation (SW and LW) '150' = { table2Version = 128 ; indicatorOfParameter = 150 ; @@ -1459,32 +1459,32 @@ table2Version = 190 ; indicatorOfParameter = 179 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress '180' = { table2Version = 128 ; indicatorOfParameter = 180 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress '180' = { table2Version = 170 ; indicatorOfParameter = 180 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress '180' = { table2Version = 180 ; indicatorOfParameter = 180 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress '181' = { table2Version = 128 ; indicatorOfParameter = 181 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress '181' = { table2Version = 170 ; indicatorOfParameter = 181 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress '181' = { table2Version = 180 ; indicatorOfParameter = 181 ; @@ -15024,7 +15024,7 @@ table2Version = 172 ; indicatorOfParameter = 147 ; } -#Mean surface net radiation flux +#Time-mean surface net radiation flux (SW and LW) '172149' = { table2Version = 172 ; indicatorOfParameter = 149 ; @@ -17509,7 +17509,7 @@ table2Version = 228 ; indicatorOfParameter = 3 ; } -#Mean temperature at 2 metres +#Mean 2 metre temperature '228004' = { table2Version = 228 ; indicatorOfParameter = 4 ; diff --git a/definitions/grib1/localConcepts/ecmf/shortName.def b/definitions/grib1/localConcepts/ecmf/shortName.def index 6fd82758e..54ef51c2b 100644 --- a/definitions/grib1/localConcepts/ecmf/shortName.def +++ b/definitions/grib1/localConcepts/ecmf/shortName.def @@ -1054,12 +1054,12 @@ table2Version = 128 ; indicatorOfParameter = 148 ; } -#Surface net radiation +#Surface net radiation (SW and LW) 'snr' = { table2Version = 128 ; indicatorOfParameter = 149 ; } -#Top net radiation +#Top net radiation (SW and LW) 'tnr' = { table2Version = 128 ; indicatorOfParameter = 150 ; @@ -1459,32 +1459,32 @@ table2Version = 190 ; indicatorOfParameter = 179 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress 'ewss' = { table2Version = 128 ; indicatorOfParameter = 180 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress 'ewss' = { table2Version = 170 ; indicatorOfParameter = 180 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress 'ewss' = { table2Version = 180 ; indicatorOfParameter = 180 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress 'nsss' = { table2Version = 128 ; indicatorOfParameter = 181 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress 'nsss' = { table2Version = 170 ; indicatorOfParameter = 181 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress 'nsss' = { table2Version = 180 ; indicatorOfParameter = 181 ; @@ -15024,7 +15024,7 @@ table2Version = 172 ; indicatorOfParameter = 147 ; } -#Mean surface net radiation flux +#Time-mean surface net radiation flux (SW and LW) 'msnrf' = { table2Version = 172 ; indicatorOfParameter = 149 ; @@ -17509,7 +17509,7 @@ table2Version = 228 ; indicatorOfParameter = 3 ; } -#Mean temperature at 2 metres +#Mean 2 metre temperature 'mean2t' = { table2Version = 228 ; indicatorOfParameter = 4 ; diff --git a/definitions/grib1/localConcepts/ecmf/units.def b/definitions/grib1/localConcepts/ecmf/units.def index 027242702..12d9b715b 100644 --- a/definitions/grib1/localConcepts/ecmf/units.def +++ b/definitions/grib1/localConcepts/ecmf/units.def @@ -665,7 +665,7 @@ indicatorOfParameter = 123 ; } #Surface emissivity -'dimensionless' = { +'Proportion' = { table2Version = 128 ; indicatorOfParameter = 124 ; } @@ -1054,12 +1054,12 @@ table2Version = 128 ; indicatorOfParameter = 148 ; } -#Surface net radiation +#Surface net radiation (SW and LW) 'J m**-2' = { table2Version = 128 ; indicatorOfParameter = 149 ; } -#Top net radiation +#Top net radiation (SW and LW) 'J m**-2' = { table2Version = 128 ; indicatorOfParameter = 150 ; @@ -1459,32 +1459,32 @@ table2Version = 190 ; indicatorOfParameter = 179 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress 'N m**-2 s' = { table2Version = 128 ; indicatorOfParameter = 180 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress 'N m**-2 s' = { table2Version = 170 ; indicatorOfParameter = 180 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress 'N m**-2 s' = { table2Version = 180 ; indicatorOfParameter = 180 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress 'N m**-2 s' = { table2Version = 128 ; indicatorOfParameter = 181 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress 'N m**-2 s' = { table2Version = 170 ; indicatorOfParameter = 181 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress 'N m**-2 s' = { table2Version = 180 ; indicatorOfParameter = 181 ; @@ -15024,7 +15024,7 @@ table2Version = 172 ; indicatorOfParameter = 147 ; } -#Mean surface net radiation flux +#Time-mean surface net radiation flux (SW and LW) 'W m**-2' = { table2Version = 172 ; indicatorOfParameter = 149 ; @@ -17509,7 +17509,7 @@ table2Version = 228 ; indicatorOfParameter = 3 ; } -#Mean temperature at 2 metres +#Mean 2 metre temperature 'K' = { table2Version = 228 ; indicatorOfParameter = 4 ; diff --git a/definitions/grib2/cfName.def b/definitions/grib2/cfName.def index c21d5b9ae..7e769ee34 100644 --- a/definitions/grib2/cfName.def +++ b/definitions/grib2/cfName.def @@ -45,19 +45,19 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress 'surface_downward_eastward_stress' = { discipline = 0 ; parameterCategory = 2 ; - parameterNumber = 38 ; + parameterNumber = 62 ; typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress 'surface_downward_northward_stress' = { discipline = 0 ; parameterCategory = 2 ; - parameterNumber = 37 ; + parameterNumber = 63 ; typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } diff --git a/definitions/grib2/cfVarName.def b/definitions/grib2/cfVarName.def index 784426270..cafebf06b 100644 --- a/definitions/grib2/cfVarName.def +++ b/definitions/grib2/cfVarName.def @@ -299,6 +299,13 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Surface emissivity +'emis' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 62 ; + typeOfFirstFixedSurface = 1 ; + } #Total column vertically-integrated water vapour 'tcwv' = { discipline = 0 ; @@ -320,6 +327,22 @@ parameterCategory = 0 ; parameterNumber = 76 ; } +#Surface net radiation (SW and LW) +'snr' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Top net radiation (SW and LW) +'tnr' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } #Boundary layer height 'blh' = { discipline = 0 ; @@ -382,19 +405,19 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress 'ewss' = { discipline = 0 ; parameterCategory = 2 ; - parameterNumber = 38 ; + parameterNumber = 62 ; typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress 'nsss' = { discipline = 0 ; parameterCategory = 2 ; - parameterNumber = 37 ; + parameterNumber = 63 ; typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } @@ -724,6 +747,20 @@ parameterCategory = 0 ; parameterNumber = 89 ; } +#U-component of atmospheric surface momentum flux +'utaua' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 17 ; + typeOfFirstFixedSurface = 1 ; + } +#V-component of atmospheric surface momentum flux +'vtaua' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 1 ; + } #U-component of surface momentum flux into ocean 'utauo' = { discipline = 10 ; @@ -3114,6 +3151,321 @@ parameterCategory = 1 ; parameterNumber = 30 ; } +#Vertical divergence +'vdiv' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 59 ; + } +#Drag thermal coefficient +'dtc' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 1 ; + } +#Drag evaporation coefficient +'dec' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 61 ; + typeOfFirstFixedSurface = 1 ; + } +#Pressure departure from hydrostatic state +'pdhs' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 46 ; + } +#Surface net radiation flux (SW and LW) +'snrf' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 1 ; + } +#Top net radiation flux (SW and LW) +'tnrf' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 8 ; + } +#Time-mean top net radiation flux (SW and LW) +'mtnrf' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 8 ; + typeOfStatisticalProcessing = 0 ; + } +#Global irradiance on tilted surfaces +'gits' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 47 ; + } +#Eady growth rate +'eagr' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 22 ; + } +#Tropical cyclones track density +'tdtc' = { + discipline = 0 ; + parameterCategory = 191 ; + parameterNumber = 4 ; + } +#Canopy air temperature +'cant' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 63 ; + } +#Soil wetness index (total layer) +'swit' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 30 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 151 ; + } +#Soil wetness index (root zone) +'swir' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 30 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 167 ; + } +#Soil wetness index (layer) +'swil' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 30 ; + typeOfFirstFixedSurface = 151 ; + typeOfSecondFixedSurface = 151 ; + } +#Distance downward from roof surface +'ddrf' = { + discipline = 2 ; + parameterCategory = 6 ; + parameterNumber = 6 ; + } +#Distance inward from outer wall surface +'diws' = { + discipline = 2 ; + parameterCategory = 6 ; + parameterNumber = 7 ; + } +#Distance downward from road surface +'ddrd' = { + discipline = 2 ; + parameterCategory = 6 ; + parameterNumber = 8 ; + } +#Renewable power capacity +'rpc' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Renewable power production rate +'rppr' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Renewable power production +'rpp' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Wind power capacity +'wpc' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 2 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Wind power production rate +'wppr' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Wind power production +'wpp' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Solar photovoltaic (PV) power capacity +'pvpc' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 4 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Solar photovoltaic (PV) power production rate +'pvppr' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 5 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Solar photovoltaic (PV) power production +'pvpp' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 5 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Graupel (snow pellets) precipitation +'tgrp' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 75 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total lightning flash density +'litotint' = { + discipline = 0 ; + parameterCategory = 17 ; + parameterNumber = 4 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Maximum total column integrated graupel (snow pellets) +'maxtcg' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 74 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 2 ; + } +#Minimum visibility +'minvis' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 0 ; + typeOfStatisticalProcessing = 3 ; + } +#Geometric height of theta level above ground +'hthg' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 107 ; + } +#Pressure at cloud base +'pcdb' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 2 ; + } +#Geometric height of adiabatic condensation level above ground +'hacg' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 5 ; + } +#Geometric height of free convection level above ground +'hfcg' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 14 ; + } +#Geometric height of neutral buoyancy level above ground +'hnbg' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 16 ; + } +#Geometric height of atmospheric isothermal level above ground +'haig' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 20 ; + } +#Roof temperature +'rflt' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 185 ; + } +#Wall temperature +'wlt' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 186 ; + } +#Road temperature +'rdlt' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 187 ; + } +#Snow depth water equivalent on roof +'sdrf' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 185 ; + } +#Snow depth water equivalent on road +'sdrd' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 187 ; + } +#Urban canyon temperature +'uct' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 187 ; + typeOfSecondFixedSurface = 185 ; + } +#Urban canyon specific humidity +'ucq' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 187 ; + typeOfSecondFixedSurface = 185 ; + } #Burned area 'fba' = { discipline = 2 ; @@ -3156,6 +3508,60 @@ parameterCategory = 4 ; parameterNumber = 25 ; } +#Live leaf fuel load +'llfl' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 27 ; + } +#Live wood fuel load +'lwfl' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 28 ; + } +#Dead leaf fuel load +'dlfl' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 29 ; + } +#Dead wood fuel load +'dwfl' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 30 ; + } +#Live fuel moisture content +'lfmc' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 31 ; + } +#Fine dead leaf moisture content +'fdlmc' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 32 ; + } +#Dense dead leaf moisture content +'ddlmc' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 33 ; + } +#Fine dead wood moisture content +'fdwmc' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 34 ; + } +#Dense dead wood moisture content +'ddwmc' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 35 ; + } #Time-integrated total column vertically-integrated eastward geopotential flux 'tvige' = { discipline = 0 ; @@ -3745,6 +4151,22 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 0 ; } +#Mean eastward turbulent surface stress +'metss' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 62 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } +#Mean northward turbulent surface stress +'mntss' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 63 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } #Mean evaporation rate 'mer' = { discipline = 0 ; @@ -4131,6 +4553,14 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } +#Total snow precipitation +'tsnowp' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 66 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Total column integrated ozone 'tcioz' = { discipline = 0 ; @@ -4735,6 +5165,52 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 255 ; } +#Time-integrated eastward turbulent surface stress due to orographic form drag +'etssofd' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 64 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated northward turbulent surface stress due to orographic form drag +'ntssofd' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 65 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated eastward turbulent surface stress due to surface roughness +'etsssr' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 66 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated northward turbulent surface stress due to surface roughness +'ntsssr' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 67 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Saturation specific humidity with respect to water +'sqw' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 168 ; + } +#Total column integrated saturation specific humidity with respect to water +'tcsqw' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 169 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #Universal thermal climate index 'utci' = { discipline = 20 ; @@ -5671,6 +6147,54 @@ scaledValueOfSecondFixedSurface = 300 ; scaleFactorOfSecondFixedSurface = 0 ; } +#Sea surface salinity +'sss' = { + discipline = 10 ; + parameterCategory = 3 ; + parameterNumber = 21 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 255 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + } +#Vertically integrated sea water practical salinity in the upper 300 m +'sc300v' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + } +#Vertically integrated sea water practical salinity in the upper 700 m +'sc700v' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 700 ; + scaleFactorOfSecondFixedSurface = 0 ; + } +#Total column vertically integrated sea water practical salinity +'scbtv' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 9 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + } #Sea water practical salinity 'so' = { discipline = 10 ; @@ -6792,6 +7316,58 @@ scaleFactorOfSecondFixedSurface = 0 ; typeOfStatisticalProcessing = 0 ; } +#Time-mean sea surface salinity +'avg_sss' = { + discipline = 10 ; + parameterCategory = 3 ; + parameterNumber = 21 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 255 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + typeOfStatisticalProcessing = 0 ; + } +#Time-mean vertically integrated sea water practical salinity in the upper 300 m +'avg_sc300v' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } +#Time-mean vertically integrated sea water practical salinity in the upper 700 m +'avg_sc700v' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 700 ; + scaleFactorOfSecondFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } +#Time-mean total column vertically integrated sea water practical salinity +'avg_scbtv' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 9 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + typeOfStatisticalProcessing = 0 ; + } #Time-mean sea water practical salinity 'avg_so' = { discipline = 10 ; @@ -7881,6 +8457,14 @@ parameterNumber = 40 ; typeOfStatisticalProcessing = 1 ; } +#Time-mean surface net radiation flux (SW and LW) +'msnrf' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } #Surface runoff 'sro' = { discipline = 2 ; @@ -7961,6 +8545,16 @@ parameterCategory = 0 ; parameterNumber = 17 ; } +#Mean 2 metre temperature +'mean2t' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 103 ; + scaledValueOfFirstFixedSurface = 2 ; + scaleFactorOfFirstFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } #Lake total depth 'dl' = { discipline = 1 ; @@ -8636,12 +9230,6 @@ parameterCategory = 1 ; parameterNumber = 49 ; } -#Total snow precipitation -'tsnowp' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 50 ; - } #Total column water (Vertically integrated total water (vapour + cloud water/ice)) 'tcwat' = { discipline = 0 ; @@ -8715,18 +9303,6 @@ parameterCategory = 1 ; parameterNumber = 68 ; } -#Momentum flux, u component -'uflx' = { - discipline = 0 ; - parameterCategory = 2 ; - parameterNumber = 17 ; - } -#Momentum flux, v component -'vflx' = { - discipline = 0 ; - parameterCategory = 2 ; - parameterNumber = 18 ; - } #Maximum wind speed 'maxgust' = { discipline = 0 ; diff --git a/definitions/grib2/destineLocalVersion.table b/definitions/grib2/destineLocalVersion.table new file mode 100644 index 000000000..5d488d2ae --- /dev/null +++ b/definitions/grib2/destineLocalVersion.table @@ -0,0 +1 @@ +1 1 MARS labeling diff --git a/definitions/grib2/destine_activity.table b/definitions/grib2/destine_activity.table new file mode 100644 index 000000000..8217458fd --- /dev/null +++ b/definitions/grib2/destine_activity.table @@ -0,0 +1,5 @@ +0 unknown unknown +1 CMIP6 Coupled Model Intercomparison Project Phase 6 +2 ScenarioMIP Scenario Model Intercomparison Project +3 HighResMIP High Resolution Model Intercomparison Project +65535 65535 Missing diff --git a/definitions/grib2/destine_dataset.table b/definitions/grib2/destine_dataset.table new file mode 100644 index 000000000..58b82fc41 --- /dev/null +++ b/definitions/grib2/destine_dataset.table @@ -0,0 +1,6 @@ +0 unknown unknown +1 climate-dt Climate change adaptation digital twin +2 extremes-dt Weather and geophysical extremes digital twin +3 on-demand-climate-dt On-demand climate change adaptation digital twin +4 on-demand-extremes-dt On-demand weather and geophysical extremes digital twin +65535 65535 Missing diff --git a/definitions/grib2/destine_experiment.table b/definitions/grib2/destine_experiment.table new file mode 100644 index 000000000..d98a8dd70 --- /dev/null +++ b/definitions/grib2/destine_experiment.table @@ -0,0 +1,10 @@ +0 unknown unknown +1 hist Historical +2 cont Control +3 amip Atmospheric Model Intercomparison Project +4 SSP1-1.9 Shared Socio-economic Pathways 1-1.9 +5 SSP1-2.6 Shared Socio-economic Pathways 1-2.6 +6 SSP2-4.5 Shared Socio-economic Pathways 2-4.5 +7 SSP3-7.0 Shared Socio-economic Pathways 3-7.0 +8 SSP5-8.5 Shared Socio-economic Pathways 5-8.5 +65535 65535 Missing diff --git a/definitions/grib2/destine_model.table b/definitions/grib2/destine_model.table new file mode 100644 index 000000000..1e33fbac1 --- /dev/null +++ b/definitions/grib2/destine_model.table @@ -0,0 +1,6 @@ +0 unknown unknown +1 IFS IFS with no ocean model +2 IFS-NEMO IFS with NEMO ocean model +3 IFS-FESOM IFS with FESOM ocean model +4 ICON ICON with no ocean model +65535 65535 Missing diff --git a/definitions/grib2/destine_resolution.table b/definitions/grib2/destine_resolution.table new file mode 100644 index 000000000..1df78ebbc --- /dev/null +++ b/definitions/grib2/destine_resolution.table @@ -0,0 +1,4 @@ +0 unknown unknown +1 standard Standard resolution model output with longer availability +2 high High resolution model output with limited availability +65535 65535 Missing diff --git a/definitions/grib2/local.destine.1.def b/definitions/grib2/local.destine.1.def new file mode 100644 index 000000000..db1f2f389 --- /dev/null +++ b/definitions/grib2/local.destine.1.def @@ -0,0 +1,7 @@ +# DestinE MARS layout + +# Base keywords for all datasets +include "grib2/local.destine.base.def"; + +# Keywords based on dataset +template_nofail datasetTemplate "grib2/local.destine.[dataset:s].def"; diff --git a/definitions/grib2/local.destine.base.def b/definitions/grib2/local.destine.base.def new file mode 100644 index 000000000..9a87b6b9a --- /dev/null +++ b/definitions/grib2/local.destine.base.def @@ -0,0 +1,4 @@ +# DestinE MARS base keywords + +codetable[2] dataset "grib2/destine_dataset.table" : dump; +alias mars.dataset = dataset; \ No newline at end of file diff --git a/definitions/grib2/local.destine.climate-dt.def b/definitions/grib2/local.destine.climate-dt.def new file mode 100644 index 000000000..61df737fc --- /dev/null +++ b/definitions/grib2/local.destine.climate-dt.def @@ -0,0 +1,19 @@ +# DestinE MARS ClimateDT keywords + +codetable[2] activity "grib2/destine_activity.table" : dump; +alias mars.activity = activity; + +codetable[2] experiment "grib2/destine_experiment.table" : dump; +alias mars.experiment = experiment; + +unsigned[1] generation = 255 : dump; +alias mars.generation = generation; + +codetable[2] model "grib2/destine_model.table" : dump; +alias mars.model = model; + +unsigned[1] realization = 255 : dump; +alias mars.realization = realization; + +codetable[2] resolution "grib2/destine_resolution.table" : dump; +alias mars.resolution = resolution; diff --git a/definitions/grib2/localConcepts/destine/destineOriginConcept.def b/definitions/grib2/localConcepts/destine/destineOriginConcept.def new file mode 100644 index 000000000..aabe1dca6 --- /dev/null +++ b/definitions/grib2/localConcepts/destine/destineOriginConcept.def @@ -0,0 +1,10 @@ +# Concept destineOrigin +"DWD" = { centre=98; subCentre=78; } +"Meteo-France" = { centre=98; subCentre=84; } +"Meteo-France" = { centre=98; subCentre=85; } +"MPI-M" = { centre=98; subCentre=252; } +"AWI" = { centre=98; subCentre=253; } +"BSC" = { centre=98; subCentre=1000; } +"CSC" = { centre=98; subCentre=1001; } +"DKRZ" = { centre=98; subCentre=1002; } +"Climate DT consortium (CSC,AWI,BSC,MPI-M)" = { centre=98; subCentre=1003; } diff --git a/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def b/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def new file mode 100644 index 000000000..1ae35446d --- /dev/null +++ b/definitions/grib2/localConcepts/destine/gridSpecificationConcept.def @@ -0,0 +1,13 @@ +# Concept gridSpecification +'H16' = {numberOfDataPoints=3072; gridDefinitionTemplateNumber=150; Nside=16;} +'H32' = {numberOfDataPoints=12288; gridDefinitionTemplateNumber=150; Nside=32;} +'H64' = {numberOfDataPoints=49152; gridDefinitionTemplateNumber=150; Nside=64;} +'H128' = {numberOfDataPoints=196608; gridDefinitionTemplateNumber=150; Nside=128;} +'H256' = {numberOfDataPoints=786432; gridDefinitionTemplateNumber=150; Nside=256;} +'H512' = {numberOfDataPoints=3145728; gridDefinitionTemplateNumber=150; Nside=512;} +'H1024' = {numberOfDataPoints=12582912; gridDefinitionTemplateNumber=150; Nside=1024;} +'O1280' = {numberOfDataPoints=6599680; gridDefinitionTemplateNumber=40; Nj=2560;} +'O2560' = {numberOfDataPoints=26306560; gridDefinitionTemplateNumber=40; Nj=5120;} +'O8000' = {numberOfDataPoints=256288000; gridDefinitionTemplateNumber=40; Nj=16000;} +'F90' = {numberOfDataPoints=65160; gridDefinitionTemplateNumber=0; Ni=360; Nj=181; } +'F360' = {numberOfDataPoints=1038240; gridDefinitionTemplateNumber=0; Ni=1440; Nj=721; } diff --git a/definitions/grib2/localConcepts/ecmf/cfVarName.def b/definitions/grib2/localConcepts/ecmf/cfVarName.def index 4f85bb57e..3f3a05316 100644 --- a/definitions/grib2/localConcepts/ecmf/cfVarName.def +++ b/definitions/grib2/localConcepts/ecmf/cfVarName.def @@ -548,12 +548,6 @@ parameterCategory = 128 ; parameterNumber = 123 ; } -#Surface emissivity -'emis' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 124 ; - } #Vertically integrated total energy 'vite' = { discipline = 192 ; @@ -624,18 +618,6 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#Surface net radiation -'snr' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 149 ; - } -#Top net radiation -'tnr' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 150 ; - } #Logarithm of surface pressure 'lnsp' = { discipline = 0 ; @@ -18871,12 +18853,6 @@ parameterCategory = 172 ; parameterNumber = 147 ; } -#Mean surface net radiation flux -'msnrf' = { - discipline = 192 ; - parameterCategory = 172 ; - parameterNumber = 149 ; - } #Mean short-wave heating rate 'mswhr' = { discipline = 192 ; @@ -21697,12 +21673,6 @@ parameterCategory = 220 ; parameterNumber = 228 ; } -#Mean temperature at 2 metres -'mean2t' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 4 ; - } #Mean of 10 metre wind speed 'mean10ws' = { discipline = 192 ; diff --git a/definitions/grib2/localConcepts/ecmf/cfVarName.legacy.def b/definitions/grib2/localConcepts/ecmf/cfVarName.legacy.def index d7faa1e1d..27f6cde86 100644 --- a/definitions/grib2/localConcepts/ecmf/cfVarName.legacy.def +++ b/definitions/grib2/localConcepts/ecmf/cfVarName.legacy.def @@ -1309,3 +1309,33 @@ parameterCategory = 140 ; parameterNumber = 249 ; } +#Mean temperature at 2 metres +'mean2t' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 4 ; +} +#Mean surface net radiation flux +'msnrf' = { + discipline = 192 ; + parameterCategory = 172 ; + parameterNumber = 149 ; +} +#Surface net radiation +'snr' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 149 ; +} +#Top net radiation +'tnr' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 150 ; +} +#Surface emissivity +'emis' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 124 ; +} diff --git a/definitions/grib2/localConcepts/ecmf/name.def b/definitions/grib2/localConcepts/ecmf/name.def index 1d626bf3d..a0081e32f 100644 --- a/definitions/grib2/localConcepts/ecmf/name.def +++ b/definitions/grib2/localConcepts/ecmf/name.def @@ -548,12 +548,6 @@ parameterCategory = 128 ; parameterNumber = 123 ; } -#Surface emissivity -'Surface emissivity' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 124 ; - } #Vertically integrated total energy 'Vertically integrated total energy' = { discipline = 192 ; @@ -624,18 +618,6 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#Surface net radiation -'Surface net radiation' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 149 ; - } -#Top net radiation -'Top net radiation' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 150 ; - } #Logarithm of surface pressure 'Logarithm of surface pressure' = { discipline = 0 ; @@ -18871,12 +18853,6 @@ parameterCategory = 172 ; parameterNumber = 147 ; } -#Mean surface net radiation flux -'Mean surface net radiation flux' = { - discipline = 192 ; - parameterCategory = 172 ; - parameterNumber = 149 ; - } #Mean short-wave heating rate 'Mean short-wave heating rate' = { discipline = 192 ; @@ -21697,12 +21673,6 @@ parameterCategory = 220 ; parameterNumber = 228 ; } -#Mean temperature at 2 metres -'Mean temperature at 2 metres' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 4 ; - } #Mean of 10 metre wind speed 'Mean of 10 metre wind speed' = { discipline = 192 ; diff --git a/definitions/grib2/localConcepts/ecmf/name.legacy.def b/definitions/grib2/localConcepts/ecmf/name.legacy.def index c7a877462..01695cdf0 100644 --- a/definitions/grib2/localConcepts/ecmf/name.legacy.def +++ b/definitions/grib2/localConcepts/ecmf/name.legacy.def @@ -1309,3 +1309,33 @@ parameterCategory = 140 ; parameterNumber = 249 ; } +#Mean temperature at 2 metres +'Mean temperature at 2 metres' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 4 ; +} +#Mean surface net radiation flux +'Mean surface net radiation flux' = { + discipline = 192 ; + parameterCategory = 172 ; + parameterNumber = 149 ; +} +#Surface net radiation +'Surface net radiation' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 149 ; +} +#Top net radiation +'Top net radiation' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 150 ; +} +#Surface emissivity +'Surface emissivity' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 124 ; +} diff --git a/definitions/grib2/localConcepts/ecmf/paramId.def b/definitions/grib2/localConcepts/ecmf/paramId.def index 9886c1f16..8b6604847 100644 --- a/definitions/grib2/localConcepts/ecmf/paramId.def +++ b/definitions/grib2/localConcepts/ecmf/paramId.def @@ -548,12 +548,6 @@ parameterCategory = 128 ; parameterNumber = 123 ; } -#Surface emissivity -'124' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 124 ; - } #Vertically integrated total energy '125' = { discipline = 192 ; @@ -624,18 +618,6 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#Surface net radiation -'149' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 149 ; - } -#Top net radiation -'150' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 150 ; - } #Logarithm of surface pressure '152' = { discipline = 0 ; @@ -18871,12 +18853,6 @@ parameterCategory = 172 ; parameterNumber = 147 ; } -#Mean surface net radiation flux -'172149' = { - discipline = 192 ; - parameterCategory = 172 ; - parameterNumber = 149 ; - } #Mean short-wave heating rate '172153' = { discipline = 192 ; @@ -21697,12 +21673,6 @@ parameterCategory = 220 ; parameterNumber = 228 ; } -#Mean temperature at 2 metres -'228004' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 4 ; - } #Mean of 10 metre wind speed '228005' = { discipline = 192 ; diff --git a/definitions/grib2/localConcepts/ecmf/paramId.legacy.def b/definitions/grib2/localConcepts/ecmf/paramId.legacy.def index cb5186931..6c8e0c585 100644 --- a/definitions/grib2/localConcepts/ecmf/paramId.legacy.def +++ b/definitions/grib2/localConcepts/ecmf/paramId.legacy.def @@ -1309,3 +1309,33 @@ parameterCategory = 140 ; parameterNumber = 249 ; } +#Mean temperature at 2 metres +'228004' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 4 ; +} +#Mean surface net radiation flux +'172149' = { + discipline = 192 ; + parameterCategory = 172 ; + parameterNumber = 149 ; +} +#Surface net radiation +'149' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 149 ; +} +#Top net radiation +'150' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 150 ; +} +#Surface emissivity +'124' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 124 ; +} diff --git a/definitions/grib2/localConcepts/ecmf/shortName.def b/definitions/grib2/localConcepts/ecmf/shortName.def index 3d30e0aec..0a3476f15 100644 --- a/definitions/grib2/localConcepts/ecmf/shortName.def +++ b/definitions/grib2/localConcepts/ecmf/shortName.def @@ -548,12 +548,6 @@ parameterCategory = 128 ; parameterNumber = 123 ; } -#Surface emissivity -'emis' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 124 ; - } #Vertically integrated total energy 'vite' = { discipline = 192 ; @@ -624,18 +618,6 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#Surface net radiation -'snr' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 149 ; - } -#Top net radiation -'tnr' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 150 ; - } #Logarithm of surface pressure 'lnsp' = { discipline = 0 ; @@ -18871,12 +18853,6 @@ parameterCategory = 172 ; parameterNumber = 147 ; } -#Mean surface net radiation flux -'msnrf' = { - discipline = 192 ; - parameterCategory = 172 ; - parameterNumber = 149 ; - } #Mean short-wave heating rate 'mswhr' = { discipline = 192 ; @@ -21697,12 +21673,6 @@ parameterCategory = 220 ; parameterNumber = 228 ; } -#Mean temperature at 2 metres -'mean2t' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 4 ; - } #Mean of 10 metre wind speed 'mean10ws' = { discipline = 192 ; diff --git a/definitions/grib2/localConcepts/ecmf/shortName.legacy.def b/definitions/grib2/localConcepts/ecmf/shortName.legacy.def index 7e0d60eed..655244bc1 100644 --- a/definitions/grib2/localConcepts/ecmf/shortName.legacy.def +++ b/definitions/grib2/localConcepts/ecmf/shortName.legacy.def @@ -1309,3 +1309,33 @@ parameterCategory = 140 ; parameterNumber = 249 ; } +#Mean temperature at 2 metres +'mean2t' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 4 ; +} +#Mean surface net radiation flux +'msnrf' = { + discipline = 192 ; + parameterCategory = 172 ; + parameterNumber = 149 ; +} +#Surface net radiation +'snr' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 149 ; +} +#Top net radiation +'tnr' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 150 ; +} +#Surface emissivity +'emis' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 124 ; +} diff --git a/definitions/grib2/localConcepts/ecmf/units.def b/definitions/grib2/localConcepts/ecmf/units.def index 26a9c0a22..f1a5418f3 100644 --- a/definitions/grib2/localConcepts/ecmf/units.def +++ b/definitions/grib2/localConcepts/ecmf/units.def @@ -548,12 +548,6 @@ parameterCategory = 128 ; parameterNumber = 123 ; } -#Surface emissivity -'dimensionless' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 124 ; - } #Vertically integrated total energy 'J m**-2' = { discipline = 192 ; @@ -624,18 +618,6 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#Surface net radiation -'J m**-2' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 149 ; - } -#Top net radiation -'J m**-2' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 150 ; - } #Logarithm of surface pressure 'Numeric' = { discipline = 0 ; @@ -18871,12 +18853,6 @@ parameterCategory = 172 ; parameterNumber = 147 ; } -#Mean surface net radiation flux -'W m**-2' = { - discipline = 192 ; - parameterCategory = 172 ; - parameterNumber = 149 ; - } #Mean short-wave heating rate 'K s**-1' = { discipline = 192 ; @@ -21697,12 +21673,6 @@ parameterCategory = 220 ; parameterNumber = 228 ; } -#Mean temperature at 2 metres -'K' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 4 ; - } #Mean of 10 metre wind speed 'm s**-1' = { discipline = 192 ; diff --git a/definitions/grib2/localConcepts/ecmf/units.legacy.def b/definitions/grib2/localConcepts/ecmf/units.legacy.def index 4b5d36486..20bce98cf 100644 --- a/definitions/grib2/localConcepts/ecmf/units.legacy.def +++ b/definitions/grib2/localConcepts/ecmf/units.legacy.def @@ -1309,3 +1309,33 @@ parameterCategory = 140 ; parameterNumber = 249 ; } +#Mean temperature at 2 metres +'K' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 4 ; +} +#Mean surface net radiation flux +'W m**-2' = { + discipline = 192 ; + parameterCategory = 172 ; + parameterNumber = 149 ; +} +#Surface net radiation +'J m**-2' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 149 ; +} +#Top net radiation +'J m**-2' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 150 ; +} +#Surface emissivity +'dimensionless' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 124 ; +} diff --git a/definitions/grib2/localConcepts/ecmf/unstructuredGridSubtype.def b/definitions/grib2/localConcepts/ecmf/unstructuredGridSubtype.def index 3f93215f3..0f9911a54 100644 --- a/definitions/grib2/localConcepts/ecmf/unstructuredGridSubtype.def +++ b/definitions/grib2/localConcepts/ecmf/unstructuredGridSubtype.def @@ -4,3 +4,5 @@ 'V' = { numberOfGridInReference = 3; } 'W' = { numberOfGridInReference = 4; } 'F' = { numberOfGridInReference = 5; } +'C' = { numberOfGridInReference = 6; } +'N' = { numberOfGridInReference = 7; } diff --git a/definitions/grib2/localConcepts/ecmf/unstructuredGridType.def b/definitions/grib2/localConcepts/ecmf/unstructuredGridType.def index 33dcb3cac..dfcc93e2f 100644 --- a/definitions/grib2/localConcepts/ecmf/unstructuredGridType.def +++ b/definitions/grib2/localConcepts/ecmf/unstructuredGridType.def @@ -6,3 +6,5 @@ 'eORCA1' = { numberOfGridUsed = 5; } 'eORCA025' = { numberOfGridUsed = 6; } 'eORCA12' = { numberOfGridUsed = 7; } +'CORE2' = { numberOfGridUsed = 8; } +'NG5' = { numberOfGridUsed = 9; } diff --git a/definitions/grib2/localConcepts/s2s/cfName.def b/definitions/grib2/localConcepts/s2s/cfName.def index 140e70741..ae98cc52f 100644 --- a/definitions/grib2/localConcepts/s2s/cfName.def +++ b/definitions/grib2/localConcepts/s2s/cfName.def @@ -6,6 +6,22 @@ parameterNumber = 0 ; typeOfFirstFixedSurface = 1 ; } +#Time-integrated eastward turbulent surface stress +'surface_downward_eastward_stress' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 38 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated northward turbulent surface stress +'surface_downward_northward_stress' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 37 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Sea surface practical salinity 'sea_surface_salinity' = { discipline = 10 ; diff --git a/definitions/grib2/localConcepts/s2s/cfVarName.def b/definitions/grib2/localConcepts/s2s/cfVarName.def index d3598d7d0..18ae6bde2 100644 --- a/definitions/grib2/localConcepts/s2s/cfVarName.def +++ b/definitions/grib2/localConcepts/s2s/cfVarName.def @@ -38,6 +38,17 @@ typeOfFirstFixedSurface = 103 ; scaledValueOfFirstFixedSurface = 15 ; scaleFactorOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } +#2 metre temperature +'t2m' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 103 ; + scaledValueOfFirstFixedSurface = 2 ; + scaleFactorOfFirstFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; } #2 metre dewpoint temperature 'd2m' = { @@ -57,6 +68,22 @@ scaledValueOfFirstFixedSurface = 15 ; scaleFactorOfFirstFixedSurface = 1 ; } +#Time-integrated eastward turbulent surface stress +'ewss' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 38 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated northward turbulent surface stress +'nsss' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 37 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Mean sea water potential temperature in the upper 300 m 'mswpt300m' = { discipline = 10 ; diff --git a/definitions/grib2/localConcepts/s2s/name.def b/definitions/grib2/localConcepts/s2s/name.def index 3821406fa..207a8bf75 100644 --- a/definitions/grib2/localConcepts/s2s/name.def +++ b/definitions/grib2/localConcepts/s2s/name.def @@ -38,6 +38,17 @@ typeOfFirstFixedSurface = 103 ; scaledValueOfFirstFixedSurface = 15 ; scaleFactorOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } +#2 metre temperature +'2 metre temperature' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 103 ; + scaledValueOfFirstFixedSurface = 2 ; + scaleFactorOfFirstFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; } #2 metre dewpoint temperature '2 metre dewpoint temperature' = { @@ -57,6 +68,22 @@ scaledValueOfFirstFixedSurface = 15 ; scaleFactorOfFirstFixedSurface = 1 ; } +#Time-integrated eastward turbulent surface stress +'Time-integrated eastward turbulent surface stress' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 38 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated northward turbulent surface stress +'Time-integrated northward turbulent surface stress' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 37 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Mean sea water potential temperature in the upper 300 m 'Mean sea water potential temperature in the upper 300 m' = { discipline = 10 ; diff --git a/definitions/grib2/localConcepts/s2s/paramId.def b/definitions/grib2/localConcepts/s2s/paramId.def index ecd296acf..9c9436700 100644 --- a/definitions/grib2/localConcepts/s2s/paramId.def +++ b/definitions/grib2/localConcepts/s2s/paramId.def @@ -38,6 +38,17 @@ typeOfFirstFixedSurface = 103 ; scaledValueOfFirstFixedSurface = 15 ; scaleFactorOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } +#2 metre temperature +'167' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 103 ; + scaledValueOfFirstFixedSurface = 2 ; + scaleFactorOfFirstFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; } #2 metre dewpoint temperature '168' = { @@ -57,6 +68,22 @@ scaledValueOfFirstFixedSurface = 15 ; scaleFactorOfFirstFixedSurface = 1 ; } +#Time-integrated eastward turbulent surface stress +'180' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 38 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated northward turbulent surface stress +'181' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 37 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Mean sea water potential temperature in the upper 300 m '151126' = { discipline = 10 ; diff --git a/definitions/grib2/localConcepts/s2s/shortName.def b/definitions/grib2/localConcepts/s2s/shortName.def index a9f3910a6..e850dd014 100644 --- a/definitions/grib2/localConcepts/s2s/shortName.def +++ b/definitions/grib2/localConcepts/s2s/shortName.def @@ -38,6 +38,17 @@ typeOfFirstFixedSurface = 103 ; scaledValueOfFirstFixedSurface = 15 ; scaleFactorOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } +#2 metre temperature +'2t' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 103 ; + scaledValueOfFirstFixedSurface = 2 ; + scaleFactorOfFirstFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; } #2 metre dewpoint temperature '2d' = { @@ -57,6 +68,22 @@ scaledValueOfFirstFixedSurface = 15 ; scaleFactorOfFirstFixedSurface = 1 ; } +#Time-integrated eastward turbulent surface stress +'ewss' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 38 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated northward turbulent surface stress +'nsss' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 37 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Mean sea water potential temperature in the upper 300 m 'mswpt300m' = { discipline = 10 ; diff --git a/definitions/grib2/localConcepts/s2s/units.def b/definitions/grib2/localConcepts/s2s/units.def index 3dbb1d7e8..f96b2c9e1 100644 --- a/definitions/grib2/localConcepts/s2s/units.def +++ b/definitions/grib2/localConcepts/s2s/units.def @@ -38,6 +38,17 @@ typeOfFirstFixedSurface = 103 ; scaledValueOfFirstFixedSurface = 15 ; scaleFactorOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } +#2 metre temperature +'K' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 103 ; + scaledValueOfFirstFixedSurface = 2 ; + scaleFactorOfFirstFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; } #2 metre dewpoint temperature 'K' = { @@ -57,6 +68,22 @@ scaledValueOfFirstFixedSurface = 15 ; scaleFactorOfFirstFixedSurface = 1 ; } +#Time-integrated eastward turbulent surface stress +'N m**-2 s' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 38 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated northward turbulent surface stress +'N m**-2 s' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 37 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Mean sea water potential temperature in the upper 300 m 'K' = { discipline = 10 ; diff --git a/definitions/grib2/localConcepts/uerra/cfVarName.def b/definitions/grib2/localConcepts/uerra/cfVarName.def index a77e854d9..2b23e1570 100644 --- a/definitions/grib2/localConcepts/uerra/cfVarName.def +++ b/definitions/grib2/localConcepts/uerra/cfVarName.def @@ -148,6 +148,18 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Momentum flux, u component +'uflx' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 17 ; + } +#Momentum flux, v component +'vflx' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 18 ; + } #Standard deviation of sub-grid scale orography 'sdsgso' = { discipline = 0 ; diff --git a/definitions/grib2/localConcepts/uerra/name.def b/definitions/grib2/localConcepts/uerra/name.def index 938e1072a..5a5c6865e 100644 --- a/definitions/grib2/localConcepts/uerra/name.def +++ b/definitions/grib2/localConcepts/uerra/name.def @@ -148,6 +148,18 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Momentum flux, u component +'Momentum flux, u component' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 17 ; + } +#Momentum flux, v component +'Momentum flux, v component' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 18 ; + } #Standard deviation of sub-grid scale orography 'Standard deviation of sub-grid scale orography' = { discipline = 0 ; diff --git a/definitions/grib2/localConcepts/uerra/paramId.def b/definitions/grib2/localConcepts/uerra/paramId.def index 3db8ad4fa..2bd651ace 100644 --- a/definitions/grib2/localConcepts/uerra/paramId.def +++ b/definitions/grib2/localConcepts/uerra/paramId.def @@ -148,6 +148,18 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Momentum flux, u component +'260062' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 17 ; + } +#Momentum flux, v component +'260063' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 18 ; + } #Standard deviation of sub-grid scale orography '260085' = { discipline = 0 ; diff --git a/definitions/grib2/localConcepts/uerra/shortName.def b/definitions/grib2/localConcepts/uerra/shortName.def index 9cbb74cd7..3c73c0761 100644 --- a/definitions/grib2/localConcepts/uerra/shortName.def +++ b/definitions/grib2/localConcepts/uerra/shortName.def @@ -148,6 +148,18 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Momentum flux, u component +'uflx' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 17 ; + } +#Momentum flux, v component +'vflx' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 18 ; + } #Standard deviation of sub-grid scale orography 'sdsgso' = { discipline = 0 ; diff --git a/definitions/grib2/localConcepts/uerra/units.def b/definitions/grib2/localConcepts/uerra/units.def index aa1f30814..b84fdc016 100644 --- a/definitions/grib2/localConcepts/uerra/units.def +++ b/definitions/grib2/localConcepts/uerra/units.def @@ -148,6 +148,18 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Momentum flux, u component +'N m**-2' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 17 ; + } +#Momentum flux, v component +'N m**-2' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 18 ; + } #Standard deviation of sub-grid scale orography 'm' = { discipline = 0 ; diff --git a/definitions/grib2/marsLevtypeConcept.def b/definitions/grib2/marsLevtypeConcept.def index 109473e86..4f9c8ae0b 100644 --- a/definitions/grib2/marsLevtypeConcept.def +++ b/definitions/grib2/marsLevtypeConcept.def @@ -66,3 +66,15 @@ 'sfc' = {typeOfFirstFixedSurface=177; typeOfSecondFixedSurface=255;} 'o2d' = {typeOfFirstFixedSurface=188; typeOfSecondFixedSurface=189;} +'sfc' = {typeOfFirstFixedSurface=5; typeOfSecondFixedSurface=255;} +'sfc' = {typeOfFirstFixedSurface=14; typeOfSecondFixedSurface=255;} +'sfc' = {typeOfFirstFixedSurface=16; typeOfSecondFixedSurface=255;} +'sfc' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=151;} +'sfc' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=167;} +'sol' = {typeOfFirstFixedSurface=185; typeOfSecondFixedSurface=255;} +'sol' = {typeOfFirstFixedSurface=185; typeOfSecondFixedSurface=185;} +'sol' = {typeOfFirstFixedSurface=186; typeOfSecondFixedSurface=255;} +'sol' = {typeOfFirstFixedSurface=186; typeOfSecondFixedSurface=186;} +'sol' = {typeOfFirstFixedSurface=187; typeOfSecondFixedSurface=255;} +'sol' = {typeOfFirstFixedSurface=187; typeOfSecondFixedSurface=187;} +'sfc' = {typeOfFirstFixedSurface=187; typeOfSecondFixedSurface=185;} diff --git a/definitions/grib2/name.def b/definitions/grib2/name.def index 5320a39ff..052da0f13 100644 --- a/definitions/grib2/name.def +++ b/definitions/grib2/name.def @@ -299,6 +299,13 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Surface emissivity +'Surface emissivity' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 62 ; + typeOfFirstFixedSurface = 1 ; + } #Total column vertically-integrated water vapour 'Total column vertically-integrated water vapour' = { discipline = 0 ; @@ -320,6 +327,22 @@ parameterCategory = 0 ; parameterNumber = 76 ; } +#Surface net radiation (SW and LW) +'Surface net radiation (SW and LW)' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Top net radiation (SW and LW) +'Top net radiation (SW and LW)' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } #Boundary layer height 'Boundary layer height' = { discipline = 0 ; @@ -382,19 +405,19 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } -#Eastward turbulent surface stress -'Eastward turbulent surface stress' = { +#Time-integrated eastward turbulent surface stress +'Time-integrated eastward turbulent surface stress' = { discipline = 0 ; parameterCategory = 2 ; - parameterNumber = 38 ; + parameterNumber = 62 ; typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#Northward turbulent surface stress -'Northward turbulent surface stress' = { +#Time-integrated northward turbulent surface stress +'Time-integrated northward turbulent surface stress' = { discipline = 0 ; parameterCategory = 2 ; - parameterNumber = 37 ; + parameterNumber = 63 ; typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } @@ -724,6 +747,20 @@ parameterCategory = 0 ; parameterNumber = 89 ; } +#U-component of atmospheric surface momentum flux +'U-component of atmospheric surface momentum flux' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 17 ; + typeOfFirstFixedSurface = 1 ; + } +#V-component of atmospheric surface momentum flux +'V-component of atmospheric surface momentum flux' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 1 ; + } #U-component of surface momentum flux into ocean 'U-component of surface momentum flux into ocean' = { discipline = 10 ; @@ -3114,6 +3151,321 @@ parameterCategory = 1 ; parameterNumber = 30 ; } +#Vertical divergence +'Vertical divergence' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 59 ; + } +#Drag thermal coefficient +'Drag thermal coefficient' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 1 ; + } +#Drag evaporation coefficient +'Drag evaporation coefficient' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 61 ; + typeOfFirstFixedSurface = 1 ; + } +#Pressure departure from hydrostatic state +'Pressure departure from hydrostatic state' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 46 ; + } +#Surface net radiation flux (SW and LW) +'Surface net radiation flux (SW and LW)' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 1 ; + } +#Top net radiation flux (SW and LW) +'Top net radiation flux (SW and LW)' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 8 ; + } +#Time-mean top net radiation flux (SW and LW) +'Time-mean top net radiation flux (SW and LW)' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 8 ; + typeOfStatisticalProcessing = 0 ; + } +#Global irradiance on tilted surfaces +'Global irradiance on tilted surfaces' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 47 ; + } +#Eady growth rate +'Eady growth rate' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 22 ; + } +#Tropical cyclones track density +'Tropical cyclones track density' = { + discipline = 0 ; + parameterCategory = 191 ; + parameterNumber = 4 ; + } +#Canopy air temperature +'Canopy air temperature' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 63 ; + } +#Soil wetness index (total layer) +'Soil wetness index (total layer)' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 30 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 151 ; + } +#Soil wetness index (root zone) +'Soil wetness index (root zone)' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 30 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 167 ; + } +#Soil wetness index (layer) +'Soil wetness index (layer)' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 30 ; + typeOfFirstFixedSurface = 151 ; + typeOfSecondFixedSurface = 151 ; + } +#Distance downward from roof surface +'Distance downward from roof surface' = { + discipline = 2 ; + parameterCategory = 6 ; + parameterNumber = 6 ; + } +#Distance inward from outer wall surface +'Distance inward from outer wall surface' = { + discipline = 2 ; + parameterCategory = 6 ; + parameterNumber = 7 ; + } +#Distance downward from road surface +'Distance downward from road surface' = { + discipline = 2 ; + parameterCategory = 6 ; + parameterNumber = 8 ; + } +#Renewable power capacity +'Renewable power capacity' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Renewable power production rate +'Renewable power production rate' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Renewable power production +'Renewable power production' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Wind power capacity +'Wind power capacity' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 2 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Wind power production rate +'Wind power production rate' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Wind power production +'Wind power production' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Solar photovoltaic (PV) power capacity +'Solar photovoltaic (PV) power capacity' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 4 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Solar photovoltaic (PV) power production rate +'Solar photovoltaic (PV) power production rate' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 5 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Solar photovoltaic (PV) power production +'Solar photovoltaic (PV) power production' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 5 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Graupel (snow pellets) precipitation +'Graupel (snow pellets) precipitation' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 75 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total lightning flash density +'Time-integrated total lightning flash density' = { + discipline = 0 ; + parameterCategory = 17 ; + parameterNumber = 4 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Maximum total column integrated graupel (snow pellets) +'Maximum total column integrated graupel (snow pellets)' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 74 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 2 ; + } +#Minimum visibility +'Minimum visibility' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 0 ; + typeOfStatisticalProcessing = 3 ; + } +#Geometric height of theta level above ground +'Geometric height of theta level above ground' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 107 ; + } +#Pressure at cloud base +'Pressure at cloud base' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 2 ; + } +#Geometric height of adiabatic condensation level above ground +'Geometric height of adiabatic condensation level above ground' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 5 ; + } +#Geometric height of free convection level above ground +'Geometric height of free convection level above ground' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 14 ; + } +#Geometric height of neutral buoyancy level above ground +'Geometric height of neutral buoyancy level above ground' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 16 ; + } +#Geometric height of atmospheric isothermal level above ground +'Geometric height of atmospheric isothermal level above ground' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 20 ; + } +#Roof temperature +'Roof temperature' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 185 ; + } +#Wall temperature +'Wall temperature' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 186 ; + } +#Road temperature +'Road temperature' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 187 ; + } +#Snow depth water equivalent on roof +'Snow depth water equivalent on roof' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 185 ; + } +#Snow depth water equivalent on road +'Snow depth water equivalent on road' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 187 ; + } +#Urban canyon temperature +'Urban canyon temperature' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 187 ; + typeOfSecondFixedSurface = 185 ; + } +#Urban canyon specific humidity +'Urban canyon specific humidity' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 187 ; + typeOfSecondFixedSurface = 185 ; + } #Burned area 'Burned area' = { discipline = 2 ; @@ -3156,6 +3508,60 @@ parameterCategory = 4 ; parameterNumber = 25 ; } +#Live leaf fuel load +'Live leaf fuel load' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 27 ; + } +#Live wood fuel load +'Live wood fuel load ' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 28 ; + } +#Dead leaf fuel load +'Dead leaf fuel load' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 29 ; + } +#Dead wood fuel load +'Dead wood fuel load' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 30 ; + } +#Live fuel moisture content +'Live fuel moisture content' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 31 ; + } +#Fine dead leaf moisture content +'Fine dead leaf moisture content' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 32 ; + } +#Dense dead leaf moisture content +'Dense dead leaf moisture content' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 33 ; + } +#Fine dead wood moisture content +'Fine dead wood moisture content' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 34 ; + } +#Dense dead wood moisture content +'Dense dead wood moisture content' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 35 ; + } #Time-integrated total column vertically-integrated eastward geopotential flux 'Time-integrated total column vertically-integrated eastward geopotential flux' = { discipline = 0 ; @@ -3745,6 +4151,22 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 0 ; } +#Mean eastward turbulent surface stress +'Mean eastward turbulent surface stress' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 62 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } +#Mean northward turbulent surface stress +'Mean northward turbulent surface stress' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 63 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } #Mean evaporation rate 'Mean evaporation rate' = { discipline = 0 ; @@ -4131,6 +4553,14 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } +#Total snow precipitation +'Total snow precipitation' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 66 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Total column integrated ozone 'Total column integrated ozone' = { discipline = 0 ; @@ -4735,6 +5165,52 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 255 ; } +#Time-integrated eastward turbulent surface stress due to orographic form drag +'Time-integrated eastward turbulent surface stress due to orographic form drag' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 64 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated northward turbulent surface stress due to orographic form drag +'Time-integrated northward turbulent surface stress due to orographic form drag' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 65 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated eastward turbulent surface stress due to surface roughness +'Time-integrated eastward turbulent surface stress due to surface roughness' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 66 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated northward turbulent surface stress due to surface roughness +'Time-integrated northward turbulent surface stress due to surface roughness' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 67 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Saturation specific humidity with respect to water +'Saturation specific humidity with respect to water' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 168 ; + } +#Total column integrated saturation specific humidity with respect to water +'Total column integrated saturation specific humidity with respect to water' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 169 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #Universal thermal climate index 'Universal thermal climate index' = { discipline = 20 ; @@ -5671,6 +6147,54 @@ scaledValueOfSecondFixedSurface = 300 ; scaleFactorOfSecondFixedSurface = 0 ; } +#Sea surface salinity +'Sea surface salinity' = { + discipline = 10 ; + parameterCategory = 3 ; + parameterNumber = 21 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 255 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + } +#Vertically integrated sea water practical salinity in the upper 300 m +'Vertically integrated sea water practical salinity in the upper 300 m' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + } +#Vertically integrated sea water practical salinity in the upper 700 m +'Vertically integrated sea water practical salinity in the upper 700 m' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 700 ; + scaleFactorOfSecondFixedSurface = 0 ; + } +#Total column vertically integrated sea water practical salinity +'Total column vertically integrated sea water practical salinity' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 9 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + } #Sea water practical salinity 'Sea water practical salinity' = { discipline = 10 ; @@ -6792,6 +7316,58 @@ scaleFactorOfSecondFixedSurface = 0 ; typeOfStatisticalProcessing = 0 ; } +#Time-mean sea surface salinity +'Time-mean sea surface salinity' = { + discipline = 10 ; + parameterCategory = 3 ; + parameterNumber = 21 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 255 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + typeOfStatisticalProcessing = 0 ; + } +#Time-mean vertically integrated sea water practical salinity in the upper 300 m +'Time-mean vertically integrated sea water practical salinity in the upper 300 m' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } +#Time-mean vertically integrated sea water practical salinity in the upper 700 m +'Time-mean vertically integrated sea water practical salinity in the upper 700 m' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 700 ; + scaleFactorOfSecondFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } +#Time-mean total column vertically integrated sea water practical salinity +'Time-mean total column vertically integrated sea water practical salinity' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 9 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + typeOfStatisticalProcessing = 0 ; + } #Time-mean sea water practical salinity 'Time-mean sea water practical salinity' = { discipline = 10 ; @@ -7881,6 +8457,14 @@ parameterNumber = 40 ; typeOfStatisticalProcessing = 1 ; } +#Time-mean surface net radiation flux (SW and LW) +'Time-mean surface net radiation flux (SW and LW)' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } #Surface runoff 'Surface runoff' = { discipline = 2 ; @@ -7961,6 +8545,16 @@ parameterCategory = 0 ; parameterNumber = 17 ; } +#Mean 2 metre temperature +'Mean 2 metre temperature' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 103 ; + scaledValueOfFirstFixedSurface = 2 ; + scaleFactorOfFirstFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } #Lake total depth 'Lake total depth' = { discipline = 1 ; @@ -8636,12 +9230,6 @@ parameterCategory = 1 ; parameterNumber = 49 ; } -#Total snow precipitation -'Total snow precipitation' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 50 ; - } #Total column water (Vertically integrated total water (vapour + cloud water/ice)) 'Total column water (Vertically integrated total water (vapour + cloud water/ice))' = { discipline = 0 ; @@ -8715,18 +9303,6 @@ parameterCategory = 1 ; parameterNumber = 68 ; } -#Momentum flux, u component -'Momentum flux, u component' = { - discipline = 0 ; - parameterCategory = 2 ; - parameterNumber = 17 ; - } -#Momentum flux, v component -'Momentum flux, v component' = { - discipline = 0 ; - parameterCategory = 2 ; - parameterNumber = 18 ; - } #Maximum wind speed 'Maximum wind speed' = { discipline = 0 ; diff --git a/definitions/grib2/paramId.def b/definitions/grib2/paramId.def index 494bd146c..bd892dfee 100644 --- a/definitions/grib2/paramId.def +++ b/definitions/grib2/paramId.def @@ -299,6 +299,13 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Surface emissivity +'124' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 62 ; + typeOfFirstFixedSurface = 1 ; + } #Total column vertically-integrated water vapour '137' = { discipline = 0 ; @@ -320,6 +327,22 @@ parameterCategory = 0 ; parameterNumber = 76 ; } +#Surface net radiation (SW and LW) +'149' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Top net radiation (SW and LW) +'150' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } #Boundary layer height '159' = { discipline = 0 ; @@ -382,19 +405,19 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress '180' = { discipline = 0 ; parameterCategory = 2 ; - parameterNumber = 38 ; + parameterNumber = 62 ; typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress '181' = { discipline = 0 ; parameterCategory = 2 ; - parameterNumber = 37 ; + parameterNumber = 63 ; typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } @@ -724,6 +747,20 @@ parameterCategory = 0 ; parameterNumber = 89 ; } +#U-component of atmospheric surface momentum flux +'140101' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 17 ; + typeOfFirstFixedSurface = 1 ; + } +#V-component of atmospheric surface momentum flux +'140102' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 1 ; + } #U-component of surface momentum flux into ocean '140103' = { discipline = 10 ; @@ -3114,6 +3151,321 @@ parameterCategory = 1 ; parameterNumber = 30 ; } +#Vertical divergence +'231014' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 59 ; + } +#Drag thermal coefficient +'231015' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 1 ; + } +#Drag evaporation coefficient +'231016' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 61 ; + typeOfFirstFixedSurface = 1 ; + } +#Pressure departure from hydrostatic state +'231017' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 46 ; + } +#Surface net radiation flux (SW and LW) +'231018' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 1 ; + } +#Top net radiation flux (SW and LW) +'231019' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 8 ; + } +#Time-mean top net radiation flux (SW and LW) +'231020' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 8 ; + typeOfStatisticalProcessing = 0 ; + } +#Global irradiance on tilted surfaces +'231021' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 47 ; + } +#Eady growth rate +'231022' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 22 ; + } +#Tropical cyclones track density +'231023' = { + discipline = 0 ; + parameterCategory = 191 ; + parameterNumber = 4 ; + } +#Canopy air temperature +'231024' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 63 ; + } +#Soil wetness index (total layer) +'231025' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 30 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 151 ; + } +#Soil wetness index (root zone) +'231026' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 30 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 167 ; + } +#Soil wetness index (layer) +'231027' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 30 ; + typeOfFirstFixedSurface = 151 ; + typeOfSecondFixedSurface = 151 ; + } +#Distance downward from roof surface +'231028' = { + discipline = 2 ; + parameterCategory = 6 ; + parameterNumber = 6 ; + } +#Distance inward from outer wall surface +'231029' = { + discipline = 2 ; + parameterCategory = 6 ; + parameterNumber = 7 ; + } +#Distance downward from road surface +'231030' = { + discipline = 2 ; + parameterCategory = 6 ; + parameterNumber = 8 ; + } +#Renewable power capacity +'231031' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Renewable power production rate +'231032' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Renewable power production +'231033' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Wind power capacity +'231034' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 2 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Wind power production rate +'231035' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Wind power production +'231036' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Solar photovoltaic (PV) power capacity +'231037' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 4 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Solar photovoltaic (PV) power production rate +'231038' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 5 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Solar photovoltaic (PV) power production +'231039' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 5 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Graupel (snow pellets) precipitation +'231040' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 75 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total lightning flash density +'231041' = { + discipline = 0 ; + parameterCategory = 17 ; + parameterNumber = 4 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Maximum total column integrated graupel (snow pellets) +'231042' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 74 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 2 ; + } +#Minimum visibility +'231043' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 0 ; + typeOfStatisticalProcessing = 3 ; + } +#Geometric height of theta level above ground +'231044' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 107 ; + } +#Pressure at cloud base +'231045' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 2 ; + } +#Geometric height of adiabatic condensation level above ground +'231046' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 5 ; + } +#Geometric height of free convection level above ground +'231047' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 14 ; + } +#Geometric height of neutral buoyancy level above ground +'231048' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 16 ; + } +#Geometric height of atmospheric isothermal level above ground +'231049' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 20 ; + } +#Roof temperature +'231050' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 185 ; + } +#Wall temperature +'231051' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 186 ; + } +#Road temperature +'231052' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 187 ; + } +#Snow depth water equivalent on roof +'231053' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 185 ; + } +#Snow depth water equivalent on road +'231054' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 187 ; + } +#Urban canyon temperature +'231055' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 187 ; + typeOfSecondFixedSurface = 185 ; + } +#Urban canyon specific humidity +'231056' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 187 ; + typeOfSecondFixedSurface = 185 ; + } #Burned area '232000' = { discipline = 2 ; @@ -3156,6 +3508,60 @@ parameterCategory = 4 ; parameterNumber = 25 ; } +#Live leaf fuel load +'232007' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 27 ; + } +#Live wood fuel load +'232008' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 28 ; + } +#Dead leaf fuel load +'232009' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 29 ; + } +#Dead wood fuel load +'232010' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 30 ; + } +#Live fuel moisture content +'232011' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 31 ; + } +#Fine dead leaf moisture content +'232012' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 32 ; + } +#Dense dead leaf moisture content +'232013' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 33 ; + } +#Fine dead wood moisture content +'232014' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 34 ; + } +#Dense dead wood moisture content +'232015' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 35 ; + } #Time-integrated total column vertically-integrated eastward geopotential flux '233000' = { discipline = 0 ; @@ -3745,6 +4151,22 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 0 ; } +#Mean eastward turbulent surface stress +'235041' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 62 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } +#Mean northward turbulent surface stress +'235042' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 63 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } #Mean evaporation rate '235043' = { discipline = 0 ; @@ -4131,6 +4553,14 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } +#Total snow precipitation +'260046' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 66 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Total column integrated ozone '260132' = { discipline = 0 ; @@ -4735,6 +5165,52 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 255 ; } +#Time-integrated eastward turbulent surface stress due to orographic form drag +'260652' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 64 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated northward turbulent surface stress due to orographic form drag +'260653' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 65 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated eastward turbulent surface stress due to surface roughness +'260654' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 66 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated northward turbulent surface stress due to surface roughness +'260655' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 67 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Saturation specific humidity with respect to water +'260656' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 168 ; + } +#Total column integrated saturation specific humidity with respect to water +'260657' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 169 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #Universal thermal climate index '261001' = { discipline = 20 ; @@ -5671,6 +6147,54 @@ scaledValueOfSecondFixedSurface = 300 ; scaleFactorOfSecondFixedSurface = 0 ; } +#Sea surface salinity +'262145' = { + discipline = 10 ; + parameterCategory = 3 ; + parameterNumber = 21 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 255 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + } +#Vertically integrated sea water practical salinity in the upper 300 m +'262146' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + } +#Vertically integrated sea water practical salinity in the upper 700 m +'262147' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 700 ; + scaleFactorOfSecondFixedSurface = 0 ; + } +#Total column vertically integrated sea water practical salinity +'262148' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 9 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + } #Sea water practical salinity '262500' = { discipline = 10 ; @@ -6792,6 +7316,58 @@ scaleFactorOfSecondFixedSurface = 0 ; typeOfStatisticalProcessing = 0 ; } +#Time-mean sea surface salinity +'263145' = { + discipline = 10 ; + parameterCategory = 3 ; + parameterNumber = 21 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 255 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + typeOfStatisticalProcessing = 0 ; + } +#Time-mean vertically integrated sea water practical salinity in the upper 300 m +'263146' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } +#Time-mean vertically integrated sea water practical salinity in the upper 700 m +'263147' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 700 ; + scaleFactorOfSecondFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } +#Time-mean total column vertically integrated sea water practical salinity +'263148' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 9 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + typeOfStatisticalProcessing = 0 ; + } #Time-mean sea water practical salinity '263500' = { discipline = 10 ; @@ -7881,6 +8457,14 @@ parameterNumber = 40 ; typeOfStatisticalProcessing = 1 ; } +#Time-mean surface net radiation flux (SW and LW) +'172149' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } #Surface runoff '174008' = { discipline = 2 ; @@ -7961,6 +8545,16 @@ parameterCategory = 0 ; parameterNumber = 17 ; } +#Mean 2 metre temperature +'228004' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 103 ; + scaledValueOfFirstFixedSurface = 2 ; + scaleFactorOfFirstFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } #Lake total depth '228007' = { discipline = 1 ; @@ -8636,12 +9230,6 @@ parameterCategory = 1 ; parameterNumber = 49 ; } -#Total snow precipitation -'260046' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 50 ; - } #Total column water (Vertically integrated total water (vapour + cloud water/ice)) '260047' = { discipline = 0 ; @@ -8715,18 +9303,6 @@ parameterCategory = 1 ; parameterNumber = 68 ; } -#Momentum flux, u component -'260062' = { - discipline = 0 ; - parameterCategory = 2 ; - parameterNumber = 17 ; - } -#Momentum flux, v component -'260063' = { - discipline = 0 ; - parameterCategory = 2 ; - parameterNumber = 18 ; - } #Maximum wind speed '260064' = { discipline = 0 ; diff --git a/definitions/grib2/post_meta_data.hook.products_12.def b/definitions/grib2/post_meta_data.hook.products_12.def new file mode 100644 index 000000000..17a4c2001 --- /dev/null +++ b/definitions/grib2/post_meta_data.hook.products_12.def @@ -0,0 +1,8 @@ +# (C) Copyright 2005- ECMWF. +# Hooks post meta-data for DestinE (productionStatusOfProcessedData=12) + +# conceptsDir2 --> datasetForLocal +concept gridSpecification(unknown, "gridSpecificationConcept.def",conceptsDir2,conceptsDir1): no_copy, read_only, dump; + +concept destineOrigin (unknown, "destineOriginConcept.def",conceptsDir2,conceptsDir1): no_copy, dump; + diff --git a/definitions/grib2/products_12.def b/definitions/grib2/products_12.def new file mode 100644 index 000000000..35c5f909c --- /dev/null +++ b/definitions/grib2/products_12.def @@ -0,0 +1,5 @@ +# (C) Copyright 2005- ECMWF. + +# Destination Earth (DestinE) + +include "grib2/products_destine.def" diff --git a/definitions/grib2/products_destine.def b/definitions/grib2/products_destine.def new file mode 100644 index 000000000..b1d0c4aee --- /dev/null +++ b/definitions/grib2/products_destine.def @@ -0,0 +1,21 @@ +# (C) Copyright 2005- ECMWF. + +alias mars.expver = experimentVersionNumber; +alias parameter.paramId=paramId; +alias parameter.shortName=shortName; +alias parameter.units=units; +alias parameter.name=name; + +alias mars.class = marsClass; +alias mars.param = paramId; + +# Special rule for level type 103 'Specified height level above ground (m)' +if(typeOfFirstFixedSurface == 103) { + # only the parameters above 10m + if (level > 10) { + constant heightLevelName = 'hl'; + alias mars.levtype = heightLevelName; + # levelist was unaliased in template.4.horizontal.def so we must have it back + alias mars.levelist = level; + } +} \ No newline at end of file diff --git a/definitions/grib2/section.2.def b/definitions/grib2/section.2.def index f7da1537a..f6081b10b 100644 --- a/definitions/grib2/section.2.def +++ b/definitions/grib2/section.2.def @@ -34,6 +34,12 @@ if ( addEmptySection2 == 0 ) { template crraSection "grib2/local.crra.[crraLocalVersion:l].def"; } + if(productionStatusOfProcessedData == 12 || productionStatusOfProcessedData == 13) { + # destine = Destination Earth + codetable[2] destineLocalVersion 'grib2/destineLocalVersion.table' = 1 : dump; + template destineSection "grib2/local.destine.[destineLocalVersion:l].def"; + } + codetable[2] grib2LocalSectionNumber 'grib2/grib2LocalSectionNumber.[centreForLocal:l].table' = 1 : dump; if (grib2LocalSectionNumber!=0) { diff --git a/definitions/grib2/sections.def b/definitions/grib2/sections.def index ed998ca61..19f6b61db 100644 --- a/definitions/grib2/sections.def +++ b/definitions/grib2/sections.def @@ -44,6 +44,8 @@ meta md5Headers md5(startOfHeaders,lengthOfHeaders); lookup[1] sectionNumber(4) ; +template_nofail hook_post_meta_data "grib2/post_meta_data.hook.products_[productionStatusOfProcessedData].def"; + if (!headersOnly) { if (sectionNumber == 5 or new() ) { position sectionPosition; diff --git a/definitions/grib2/shortName.def b/definitions/grib2/shortName.def index 4bb585551..8bfaf4ded 100644 --- a/definitions/grib2/shortName.def +++ b/definitions/grib2/shortName.def @@ -299,6 +299,13 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Surface emissivity +'emis' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 62 ; + typeOfFirstFixedSurface = 1 ; + } #Total column vertically-integrated water vapour 'tcwv' = { discipline = 0 ; @@ -320,6 +327,22 @@ parameterCategory = 0 ; parameterNumber = 76 ; } +#Surface net radiation (SW and LW) +'snr' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Top net radiation (SW and LW) +'tnr' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } #Boundary layer height 'blh' = { discipline = 0 ; @@ -382,19 +405,19 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress 'ewss' = { discipline = 0 ; parameterCategory = 2 ; - parameterNumber = 38 ; + parameterNumber = 62 ; typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress 'nsss' = { discipline = 0 ; parameterCategory = 2 ; - parameterNumber = 37 ; + parameterNumber = 63 ; typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } @@ -724,6 +747,20 @@ parameterCategory = 0 ; parameterNumber = 89 ; } +#U-component of atmospheric surface momentum flux +'utaua' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 17 ; + typeOfFirstFixedSurface = 1 ; + } +#V-component of atmospheric surface momentum flux +'vtaua' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 1 ; + } #U-component of surface momentum flux into ocean 'utauo' = { discipline = 10 ; @@ -3114,6 +3151,321 @@ parameterCategory = 1 ; parameterNumber = 30 ; } +#Vertical divergence +'vdiv' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 59 ; + } +#Drag thermal coefficient +'dtc' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 1 ; + } +#Drag evaporation coefficient +'dec' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 61 ; + typeOfFirstFixedSurface = 1 ; + } +#Pressure departure from hydrostatic state +'pdhs' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 46 ; + } +#Surface net radiation flux (SW and LW) +'snrf' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 1 ; + } +#Top net radiation flux (SW and LW) +'tnrf' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 8 ; + } +#Time-mean top net radiation flux (SW and LW) +'mtnrf' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 8 ; + typeOfStatisticalProcessing = 0 ; + } +#Global irradiance on tilted surfaces +'gits' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 47 ; + } +#Eady growth rate +'eagr' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 22 ; + } +#Tropical cyclones track density +'tdtc' = { + discipline = 0 ; + parameterCategory = 191 ; + parameterNumber = 4 ; + } +#Canopy air temperature +'cant' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 63 ; + } +#Soil wetness index (total layer) +'swit' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 30 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 151 ; + } +#Soil wetness index (root zone) +'swir' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 30 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 167 ; + } +#Soil wetness index (layer) +'swil' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 30 ; + typeOfFirstFixedSurface = 151 ; + typeOfSecondFixedSurface = 151 ; + } +#Distance downward from roof surface +'ddrf' = { + discipline = 2 ; + parameterCategory = 6 ; + parameterNumber = 6 ; + } +#Distance inward from outer wall surface +'diws' = { + discipline = 2 ; + parameterCategory = 6 ; + parameterNumber = 7 ; + } +#Distance downward from road surface +'ddrd' = { + discipline = 2 ; + parameterCategory = 6 ; + parameterNumber = 8 ; + } +#Renewable power capacity +'rpc' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Renewable power production rate +'rppr' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Renewable power production +'rpp' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Wind power capacity +'wpc' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 2 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Wind power production rate +'wppr' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Wind power production +'wpp' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Solar photovoltaic (PV) power capacity +'pvpc' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 4 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Solar photovoltaic (PV) power production rate +'pvppr' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 5 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Solar photovoltaic (PV) power production +'pvpp' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 5 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Graupel (snow pellets) precipitation +'tgrp' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 75 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total lightning flash density +'litotint' = { + discipline = 0 ; + parameterCategory = 17 ; + parameterNumber = 4 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Maximum total column integrated graupel (snow pellets) +'maxtcg' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 74 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 2 ; + } +#Minimum visibility +'minvis' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 0 ; + typeOfStatisticalProcessing = 3 ; + } +#Geometric height of theta level above ground +'hthg' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 107 ; + } +#Pressure at cloud base +'pcdb' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 2 ; + } +#Geometric height of adiabatic condensation level above ground +'hacg' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 5 ; + } +#Geometric height of free convection level above ground +'hfcg' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 14 ; + } +#Geometric height of neutral buoyancy level above ground +'hnbg' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 16 ; + } +#Geometric height of atmospheric isothermal level above ground +'haig' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 20 ; + } +#Roof temperature +'rft' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 185 ; + } +#Wall temperature +'wlt' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 186 ; + } +#Road temperature +'rdt' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 187 ; + } +#Snow depth water equivalent on roof +'sdrf' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 185 ; + } +#Snow depth water equivalent on road +'sdrd' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 187 ; + } +#Urban canyon temperature +'uct' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 187 ; + typeOfSecondFixedSurface = 185 ; + } +#Urban canyon specific humidity +'ucq' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 187 ; + typeOfSecondFixedSurface = 185 ; + } #Burned area 'fba' = { discipline = 2 ; @@ -3156,6 +3508,60 @@ parameterCategory = 4 ; parameterNumber = 25 ; } +#Live leaf fuel load +'llfl' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 27 ; + } +#Live wood fuel load +'lwfl' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 28 ; + } +#Dead leaf fuel load +'dlfl' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 29 ; + } +#Dead wood fuel load +'dwfl' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 30 ; + } +#Live fuel moisture content +'lfmc' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 31 ; + } +#Fine dead leaf moisture content +'fdlmc' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 32 ; + } +#Dense dead leaf moisture content +'ddlmc' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 33 ; + } +#Fine dead wood moisture content +'fdwmc' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 34 ; + } +#Dense dead wood moisture content +'ddwmc' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 35 ; + } #Time-integrated total column vertically-integrated eastward geopotential flux 'tvige' = { discipline = 0 ; @@ -3745,6 +4151,22 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 0 ; } +#Mean eastward turbulent surface stress +'metss' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 62 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } +#Mean northward turbulent surface stress +'mntss' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 63 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } #Mean evaporation rate 'mer' = { discipline = 0 ; @@ -4131,6 +4553,14 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } +#Total snow precipitation +'tsnowp' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 66 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Total column integrated ozone 'tcioz' = { discipline = 0 ; @@ -4735,6 +5165,52 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 255 ; } +#Time-integrated eastward turbulent surface stress due to orographic form drag +'etssofd' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 64 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated northward turbulent surface stress due to orographic form drag +'ntssofd' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 65 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated eastward turbulent surface stress due to surface roughness +'etsssr' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 66 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated northward turbulent surface stress due to surface roughness +'ntsssr' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 67 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Saturation specific humidity with respect to water +'sqw' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 168 ; + } +#Total column integrated saturation specific humidity with respect to water +'tcsqw' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 169 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #Universal thermal climate index 'utci' = { discipline = 20 ; @@ -5671,6 +6147,54 @@ scaledValueOfSecondFixedSurface = 300 ; scaleFactorOfSecondFixedSurface = 0 ; } +#Sea surface salinity +'sss' = { + discipline = 10 ; + parameterCategory = 3 ; + parameterNumber = 21 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 255 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + } +#Vertically integrated sea water practical salinity in the upper 300 m +'sc300v' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + } +#Vertically integrated sea water practical salinity in the upper 700 m +'sc700v' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 700 ; + scaleFactorOfSecondFixedSurface = 0 ; + } +#Total column vertically integrated sea water practical salinity +'scbtv' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 9 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + } #Sea water practical salinity 'so' = { discipline = 10 ; @@ -6792,6 +7316,58 @@ scaleFactorOfSecondFixedSurface = 0 ; typeOfStatisticalProcessing = 0 ; } +#Time-mean sea surface salinity +'avg_sss' = { + discipline = 10 ; + parameterCategory = 3 ; + parameterNumber = 21 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 255 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + typeOfStatisticalProcessing = 0 ; + } +#Time-mean vertically integrated sea water practical salinity in the upper 300 m +'avg_sc300v' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } +#Time-mean vertically integrated sea water practical salinity in the upper 700 m +'avg_sc700v' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 700 ; + scaleFactorOfSecondFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } +#Time-mean total column vertically integrated sea water practical salinity +'avg_scbtv' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 9 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + typeOfStatisticalProcessing = 0 ; + } #Time-mean sea water practical salinity 'avg_so' = { discipline = 10 ; @@ -7881,6 +8457,14 @@ parameterNumber = 40 ; typeOfStatisticalProcessing = 1 ; } +#Time-mean surface net radiation flux (SW and LW) +'msnrf' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } #Surface runoff 'sro' = { discipline = 2 ; @@ -7961,6 +8545,16 @@ parameterCategory = 0 ; parameterNumber = 17 ; } +#Mean 2 metre temperature +'mean2t' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 103 ; + scaledValueOfFirstFixedSurface = 2 ; + scaleFactorOfFirstFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } #Lake total depth 'dl' = { discipline = 1 ; @@ -8636,12 +9230,6 @@ parameterCategory = 1 ; parameterNumber = 49 ; } -#Total snow precipitation -'tsnowp' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 50 ; - } #Total column water (Vertically integrated total water (vapour + cloud water/ice)) 'tcwat' = { discipline = 0 ; @@ -8715,18 +9303,6 @@ parameterCategory = 1 ; parameterNumber = 68 ; } -#Momentum flux, u component -'uflx' = { - discipline = 0 ; - parameterCategory = 2 ; - parameterNumber = 17 ; - } -#Momentum flux, v component -'vflx' = { - discipline = 0 ; - parameterCategory = 2 ; - parameterNumber = 18 ; - } #Maximum wind speed 'maxgust' = { discipline = 0 ; diff --git a/definitions/grib2/template.4.20.def b/definitions/grib2/template.4.20.def index 9ba5668eb..83db46bc5 100644 --- a/definitions/grib2/template.4.20.def +++ b/definitions/grib2/template.4.20.def @@ -1,7 +1,6 @@ # (C) Copyright 2005- ECMWF. # TEMPLATE 4.20, Radar product -# Parameter category codetable[1] parameterCategory ('4.1.[discipline:l].table',masterDir,localDir) : dump; # Parameter number @@ -9,22 +8,21 @@ codetable[1] parameterNumber ('4.2.[discipline:l].[parameterCategory:l].table',m meta parameterUnits codetable_units(parameterNumber) : dump; meta parameterName codetable_title(parameterNumber) : dump; -# Type of generating process codetable[1] typeOfGeneratingProcess ('4.3.table',masterDir,localDir) : dump; # Number of radar sites used unsigned[1] numberOfRadarSitesUsed : dump; -# Indicator of unit of time range codetable[1] indicatorOfUnitOfTimeRange ('4.4.table',masterDir,localDir) : dump; +alias indicatorOfUnitForForecastTime = indicatorOfUnitOfTimeRange; alias defaultStepUnits = one; # 1 means Hour. See code table 4.4 template_nofail default_step_units "grib2/localConcepts/[centre:s]/default_step_units.def"; codetable[1] stepUnits 'stepUnits.table' = defaultStepUnits : transient,dump,no_copy; -# Site latitude (in 10-6 degree) +# Site latitude (in microdegrees) unsigned[4] siteLatitude : dump; -# Site longitude (in 10-6 degree) +# Site longitude (in microdegrees) unsigned[4] siteLongitude : dump; # Site elevation (meters) diff --git a/definitions/grib2/template.4.forecast_time.def b/definitions/grib2/template.4.forecast_time.def index 662310fc6..d4999d24f 100644 --- a/definitions/grib2/template.4.forecast_time.def +++ b/definitions/grib2/template.4.forecast_time.def @@ -8,8 +8,10 @@ alias hoursAfterReferenceTimeOfDataCutoff=hoursAfterDataCutoff; unsigned[1] minutesAfterDataCutoff = missing() : edition_specific,can_be_missing; alias minutesAfterReferenceTimeOfDataCutoff=minutesAfterDataCutoff; -# Indicator of unit of time range +# Indicator of unit for forecastTime (ECC-1709) codetable[1] indicatorOfUnitOfTimeRange ('4.4.table',masterDir,localDir) : dump; +alias indicatorOfUnitForForecastTime = indicatorOfUnitOfTimeRange; + alias defaultStepUnits = one; # 1 means Hour. See code table 4.4 template_nofail default_step_units "grib2/localConcepts/[centre:s]/default_step_units.def"; codetable[1] stepUnits 'stepUnits.table' = defaultStepUnits : transient,dump,no_copy; diff --git a/definitions/grib2/template.4.forecast_time_44.def b/definitions/grib2/template.4.forecast_time_44.def index 494921b35..0ad48c53b 100644 --- a/definitions/grib2/template.4.forecast_time_44.def +++ b/definitions/grib2/template.4.forecast_time_44.def @@ -10,8 +10,10 @@ alias hoursAfterReferenceTimeOfDataCutoff=hoursAfterDataCutoff; unsigned[1] minutesAfterDataCutoff = missing() : edition_specific,can_be_missing; alias minutesAfterReferenceTimeOfDataCutoff=minutesAfterDataCutoff; -# Indicator of unit of time range +# Indicator of unit for forecastTime (ECC-1709) codetable[1] indicatorOfUnitOfTimeRange ('4.4.table',masterDir,localDir) : dump; +alias indicatorOfUnitForForecastTime = indicatorOfUnitOfTimeRange; + alias defaultStepUnits = one; # 1 means Hour. See code table 4.4 template_nofail default_step_units "grib2/localConcepts/[centre:s]/default_step_units.def"; codetable[1] stepUnits 'stepUnits.table' = defaultStepUnits : transient,dump,no_copy; diff --git a/definitions/grib2/typeOfLevelConcept.def b/definitions/grib2/typeOfLevelConcept.def index 30fad4464..a32abd7e0 100644 --- a/definitions/grib2/typeOfLevelConcept.def +++ b/definitions/grib2/typeOfLevelConcept.def @@ -87,3 +87,13 @@ scaleFactorOfSecondFixedSurface=0; scaledValueOfSecondFixedSurface=0;} 'waterSurfaceToIsothermalOceanLayer' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=20; scaledValueOfFirstFixedSurface=0; scaleFactorOfFirstFixedSurface=0;} + +'totalSoilLayer' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=151;} +'rootZone' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=167;} +'roof' = {typeOfFirstFixedSurface=185; typeOfSecondFixedSurface=255;} +'roofLayer' = {typeOfFirstFixedSurface=185; typeOfSecondFixedSurface=185;} +'wall' = {typeOfFirstFixedSurface=186; typeOfSecondFixedSurface=255;} +'wallLayer' = {typeOfFirstFixedSurface=186; typeOfSecondFixedSurface=186;} +'road' = {typeOfFirstFixedSurface=187; typeOfSecondFixedSurface=255;} +'roadLayer' = {typeOfFirstFixedSurface=187; typeOfSecondFixedSurface=187;} +'urbanCanyon' = {typeOfFirstFixedSurface=187; typeOfSecondFixedSurface=185;} diff --git a/definitions/grib2/units.def b/definitions/grib2/units.def index 67f8c5b77..12c2fe58c 100644 --- a/definitions/grib2/units.def +++ b/definitions/grib2/units.def @@ -299,6 +299,13 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Surface emissivity +'Proportion' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 62 ; + typeOfFirstFixedSurface = 1 ; + } #Total column vertically-integrated water vapour 'kg m**-2' = { discipline = 0 ; @@ -320,6 +327,22 @@ parameterCategory = 0 ; parameterNumber = 76 ; } +#Surface net radiation (SW and LW) +'J m**-2' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Top net radiation (SW and LW) +'J m**-2' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } #Boundary layer height 'm' = { discipline = 0 ; @@ -382,19 +405,19 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } -#Eastward turbulent surface stress +#Time-integrated eastward turbulent surface stress 'N m**-2 s' = { discipline = 0 ; parameterCategory = 2 ; - parameterNumber = 38 ; + parameterNumber = 62 ; typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#Northward turbulent surface stress +#Time-integrated northward turbulent surface stress 'N m**-2 s' = { discipline = 0 ; parameterCategory = 2 ; - parameterNumber = 37 ; + parameterNumber = 63 ; typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } @@ -724,6 +747,20 @@ parameterCategory = 0 ; parameterNumber = 89 ; } +#U-component of atmospheric surface momentum flux +'N m**-2' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 17 ; + typeOfFirstFixedSurface = 1 ; + } +#V-component of atmospheric surface momentum flux +'N m**-2' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 1 ; + } #U-component of surface momentum flux into ocean 'N m**-2' = { discipline = 10 ; @@ -3114,6 +3151,321 @@ parameterCategory = 1 ; parameterNumber = 30 ; } +#Vertical divergence +'s**-1' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 59 ; + } +#Drag thermal coefficient +'Numeric' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 1 ; + } +#Drag evaporation coefficient +'Numeric' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 61 ; + typeOfFirstFixedSurface = 1 ; + } +#Pressure departure from hydrostatic state +'Pa' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 46 ; + } +#Surface net radiation flux (SW and LW) +'W m**-2' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 1 ; + } +#Top net radiation flux (SW and LW) +'W m**-2' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 8 ; + } +#Time-mean top net radiation flux (SW and LW) +'W m**-2' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 8 ; + typeOfStatisticalProcessing = 0 ; + } +#Global irradiance on tilted surfaces +'W m**-2' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 47 ; + } +#Eady growth rate +'day**-1' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 22 ; + } +#Tropical cyclones track density +'Numeric' = { + discipline = 0 ; + parameterCategory = 191 ; + parameterNumber = 4 ; + } +#Canopy air temperature +'K' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 63 ; + } +#Soil wetness index (total layer) +'Numeric' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 30 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 151 ; + } +#Soil wetness index (root zone) +'Numeric' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 30 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 167 ; + } +#Soil wetness index (layer) +'Numeric' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 30 ; + typeOfFirstFixedSurface = 151 ; + typeOfSecondFixedSurface = 151 ; + } +#Distance downward from roof surface +'m' = { + discipline = 2 ; + parameterCategory = 6 ; + parameterNumber = 6 ; + } +#Distance inward from outer wall surface +'m' = { + discipline = 2 ; + parameterCategory = 6 ; + parameterNumber = 7 ; + } +#Distance downward from road surface +'m' = { + discipline = 2 ; + parameterCategory = 6 ; + parameterNumber = 8 ; + } +#Renewable power capacity +'W' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Renewable power production rate +'W' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Renewable power production +'W s' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Wind power capacity +'W' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 2 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Wind power production rate +'W' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Wind power production +'W s' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Solar photovoltaic (PV) power capacity +'W' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 4 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Solar photovoltaic (PV) power production rate +'W' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 5 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Solar photovoltaic (PV) power production +'W s' = { + discipline = 20 ; + parameterCategory = 3 ; + parameterNumber = 5 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Graupel (snow pellets) precipitation +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 75 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total lightning flash density +'km**-2' = { + discipline = 0 ; + parameterCategory = 17 ; + parameterNumber = 4 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Maximum total column integrated graupel (snow pellets) +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 74 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 2 ; + } +#Minimum visibility +'m' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 0 ; + typeOfStatisticalProcessing = 3 ; + } +#Geometric height of theta level above ground +'m' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 107 ; + } +#Pressure at cloud base +'Pa' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 2 ; + } +#Geometric height of adiabatic condensation level above ground +'m' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 5 ; + } +#Geometric height of free convection level above ground +'m' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 14 ; + } +#Geometric height of neutral buoyancy level above ground +'m' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 16 ; + } +#Geometric height of atmospheric isothermal level above ground +'m' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 34 ; + typeOfFirstFixedSurface = 20 ; + } +#Roof temperature +'K' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 185 ; + } +#Wall temperature +'K' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 186 ; + } +#Road temperature +'K' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 187 ; + } +#Snow depth water equivalent on roof +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 185 ; + } +#Snow depth water equivalent on road +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 187 ; + } +#Urban canyon temperature +'K' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 187 ; + typeOfSecondFixedSurface = 185 ; + } +#Urban canyon specific humidity +'kg kg**-1' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 187 ; + typeOfSecondFixedSurface = 185 ; + } #Burned area '%' = { discipline = 2 ; @@ -3156,6 +3508,60 @@ parameterCategory = 4 ; parameterNumber = 25 ; } +#Live leaf fuel load +'kg m**-2' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 27 ; + } +#Live wood fuel load +'kg m**-2' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 28 ; + } +#Dead leaf fuel load +'kg m**-2' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 29 ; + } +#Dead wood fuel load +'kg m**-2' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 30 ; + } +#Live fuel moisture content +'kg kg**-1' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 31 ; + } +#Fine dead leaf moisture content +'kg kg**-1' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 32 ; + } +#Dense dead leaf moisture content +'kg kg**-1' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 33 ; + } +#Fine dead wood moisture content +'kg kg**-1' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 34 ; + } +#Dense dead wood moisture content +'kg kg**-1' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 35 ; + } #Time-integrated total column vertically-integrated eastward geopotential flux 'J m**-1' = { discipline = 0 ; @@ -3745,6 +4151,22 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 0 ; } +#Mean eastward turbulent surface stress +'N m**-2' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 62 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } +#Mean northward turbulent surface stress +'N m**-2' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 63 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } #Mean evaporation rate 'kg m**-2 s**-1' = { discipline = 0 ; @@ -4131,6 +4553,14 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } +#Total snow precipitation +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 66 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Total column integrated ozone 'DU' = { discipline = 0 ; @@ -4735,6 +5165,52 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 255 ; } +#Time-integrated eastward turbulent surface stress due to orographic form drag +'N m**-2 s' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 64 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated northward turbulent surface stress due to orographic form drag +'N m**-2 s' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 65 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated eastward turbulent surface stress due to surface roughness +'N m**-2 s' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 66 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated northward turbulent surface stress due to surface roughness +'N m**-2 s' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 67 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Saturation specific humidity with respect to water +'kg m**-3' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 168 ; + } +#Total column integrated saturation specific humidity with respect to water +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 169 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #Universal thermal climate index 'K' = { discipline = 20 ; @@ -5671,6 +6147,54 @@ scaledValueOfSecondFixedSurface = 300 ; scaleFactorOfSecondFixedSurface = 0 ; } +#Sea surface salinity +'kg kg**-1' = { + discipline = 10 ; + parameterCategory = 3 ; + parameterNumber = 21 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 255 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + } +#Vertically integrated sea water practical salinity in the upper 300 m +'g kg**-1 m' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + } +#Vertically integrated sea water practical salinity in the upper 700 m +'g kg**-1 m' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 700 ; + scaleFactorOfSecondFixedSurface = 0 ; + } +#Total column vertically integrated sea water practical salinity +'g kg**-1 m' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 9 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + } #Sea water practical salinity 'g kg**-1' = { discipline = 10 ; @@ -6792,6 +7316,58 @@ scaleFactorOfSecondFixedSurface = 0 ; typeOfStatisticalProcessing = 0 ; } +#Time-mean sea surface salinity +'kg kg**-1' = { + discipline = 10 ; + parameterCategory = 3 ; + parameterNumber = 21 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 255 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + typeOfStatisticalProcessing = 0 ; + } +#Time-mean vertically integrated sea water practical salinity in the upper 300 m +'g kg**-1 m' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } +#Time-mean vertically integrated sea water practical salinity in the upper 700 m +'g kg**-1 m' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 700 ; + scaleFactorOfSecondFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } +#Time-mean total column vertically integrated sea water practical salinity +'g kg**-1 m' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 50 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 9 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + typeOfStatisticalProcessing = 0 ; + } #Time-mean sea water practical salinity 'g kg**-1' = { discipline = 10 ; @@ -7881,6 +8457,14 @@ parameterNumber = 40 ; typeOfStatisticalProcessing = 1 ; } +#Time-mean surface net radiation flux (SW and LW) +'W m**-2' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 46 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } #Surface runoff 'kg m**-2' = { discipline = 2 ; @@ -7961,6 +8545,16 @@ parameterCategory = 0 ; parameterNumber = 17 ; } +#Mean 2 metre temperature +'K' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 103 ; + scaledValueOfFirstFixedSurface = 2 ; + scaleFactorOfFirstFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } #Lake total depth 'm' = { discipline = 1 ; @@ -8636,12 +9230,6 @@ parameterCategory = 1 ; parameterNumber = 49 ; } -#Total snow precipitation -'kg m**-2' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 50 ; - } #Total column water (Vertically integrated total water (vapour + cloud water/ice)) 'kg m**-2' = { discipline = 0 ; @@ -8715,18 +9303,6 @@ parameterCategory = 1 ; parameterNumber = 68 ; } -#Momentum flux, u component -'N m**-2' = { - discipline = 0 ; - parameterCategory = 2 ; - parameterNumber = 17 ; - } -#Momentum flux, v component -'N m**-2' = { - discipline = 0 ; - parameterCategory = 2 ; - parameterNumber = 18 ; - } #Maximum wind speed 'm s**-1' = { discipline = 0 ; diff --git a/definitions/mars/grib.clmn.fc.def b/definitions/mars/grib.clmn.fc.def new file mode 100644 index 000000000..34723b605 --- /dev/null +++ b/definitions/mars/grib.clmn.fc.def @@ -0,0 +1,6 @@ +alias mars.year = year; +alias mars.month = month; +unalias mars.date; +unalias mars.time; +unalias mars.step; +unalias mars.domain; \ No newline at end of file diff --git a/definitions/mars/grib.clte.fc.def b/definitions/mars/grib.clte.fc.def new file mode 100644 index 000000000..8d899381f --- /dev/null +++ b/definitions/mars/grib.clte.fc.def @@ -0,0 +1,4 @@ +alias mars.date = dataDate; +alias mars.time = dataTime; +unalias mars.step; +unalias mars.domain; diff --git a/definitions/mars/stream.table b/definitions/mars/stream.table index a5d90c167..446d5e6b0 100644 --- a/definitions/mars/stream.table +++ b/definitions/mars/stream.table @@ -69,6 +69,8 @@ 1095 wamf Wave monthly forecast 1096 wmfm Wave monthly forecast means 1097 smma Seasonal monthly means anomalies +1098 clte Climate run output +1099 clmn Climate run monthly means output 1110 seap Sensitive area prediction 1120 eefh Extended ensemble forecast hindcast 1121 eehs Extended ensemble forecast hindcast statistics diff --git a/examples/C/grib_set_missing.c b/examples/C/grib_set_missing.c index 543bb1db3..2b8b036e4 100644 --- a/examples/C/grib_set_missing.c +++ b/examples/C/grib_set_missing.c @@ -59,6 +59,10 @@ int main(int argc, char** argv) CODES_CHECK(codes_set_missing(h, "scaleFactorOfFirstFixedSurface"), 0); CODES_CHECK(codes_set_missing(h, "scaledValueOfFirstFixedSurface"), 0); + /* Can also set to MISSING via codes_set_string */ + CODES_CHECK(codes_set_string(h, "scaleFactorOfFirstFixedSurface", "missing", &str_len), 0); + CODES_CHECK(codes_set_string(h, "scaledValueOfFirstFixedSurface", "missing", &str_len), 0); + /* see GRIB-490 */ CODES_CHECK(codes_get_long(h, "Ni", &Ni), 0); is_missing = codes_is_missing(h, "Ni", &err); diff --git a/samples/destine_grib2.tmpl b/samples/destine_grib2.tmpl new file mode 100644 index 000000000..95154453c Binary files /dev/null and b/samples/destine_grib2.tmpl differ diff --git a/src/action.cc b/src/action.cc index 847862edc..026bca74e 100644 --- a/src/action.cc +++ b/src/action.cc @@ -98,22 +98,21 @@ static void grib_dump(grib_action* a, FILE* f, int l) DEBUG_ASSERT(0); } -void grib_xref(grib_action* a, FILE* f, const char* path) -{ - grib_action_class* c = a->cclass; - init(c); - - while (c) { - if (c->xref) { - c->xref(a, f, path); - return; - } - c = c->super ? *(c->super) : NULL; - } - printf("xref not implemented for %s\n", a->cclass->name); - DEBUG_ASSERT(0); -} +// void grib_xref(grib_action* a, FILE* f, const char* path) +// { +// grib_action_class* c = a->cclass; +// init(c); +// while (c) { +// if (c->xref) { +// c->xref(a, f, path); +// return; +// } +// c = c->super ? *(c->super) : NULL; +// } +// printf("xref not implemented for %s\n", a->cclass->name); +// DEBUG_ASSERT(0); +// } void grib_action_delete(grib_context* context, grib_action* a) { @@ -214,10 +213,10 @@ void grib_dump_action_tree(grib_context* ctx, FILE* out) grib_dump_action_branch(out, ctx->grib_reader->first->root, 0); } -void grib_xref_action_branch(FILE* out, grib_action* a, const char* path) -{ - while (a) { - grib_xref(a, out, path); - a = a->next; - } -} +// void grib_xref_action_branch(FILE* out, grib_action* a, const char* path) +// { +// while (a) { +// grib_xref(a, out, path); +// a = a->next; +// } +// } diff --git a/src/action_class_alias.cc b/src/action_class_alias.cc index 945d3aa7a..014a3f47c 100644 --- a/src/action_class_alias.cc +++ b/src/action_class_alias.cc @@ -19,7 +19,7 @@ START_CLASS_DEF CLASS = action IMPLEMENTS = create_accessor - IMPLEMENTS = dump;xref + IMPLEMENTS = dump IMPLEMENTS = destroy MEMBERS = char* target END_CLASS_DEF @@ -38,7 +38,6 @@ or edit "action.class" and rerun ./make_class.pl static void init_class (grib_action_class*); static void dump (grib_action* d, FILE*,int); -static void xref (grib_action* d, FILE* f,const char* path); static void destroy (grib_context*,grib_action*); static int create_accessor(grib_section*,grib_action*,grib_loader*); @@ -60,7 +59,7 @@ static grib_action_class _grib_action_class_alias = { &destroy, /* destroy */ &dump, /* dump */ - &xref, /* xref */ + 0, /* xref */ &create_accessor, /* create_accessor*/ @@ -268,23 +267,6 @@ static void dump(grib_action* act, FILE* f, int lvl) grib_context_print(act->context, f, " unalias %s \n", act->name); } -static void xref(grib_action* act, FILE* f, const char* path) -{ - Assert(!"xref is disabled"); - - // grib_action_alias* a = (grib_action_alias*)act; - // if (a->target) { - // fprintf(f, "bless({name=>'%s', target=>'%s', path=>'%s'},'xref::alias'),\n", act->name, a->target, path); - // if (act->name_space) - // fprintf(f, "bless({name=>'%s.%s', target=>'%s', path=>'%s'},'xref::alias'),\n", act->name_space, act->name, a->target, path); - // } - // else { - // fprintf(f, "bless({name=>'%s', path=>'%s'},'xref::unalias'),\n", act->name, path); - // if (act->name_space) - // fprintf(f, "bless({name=>'%s.%s', path=>'%s'},'xref::unalias'),\n", act->name_space, act->name, path); - // } -} - static void destroy(grib_context* context, grib_action* act) { grib_action_alias* a = (grib_action_alias*)act; diff --git a/src/action_class_gen.cc b/src/action_class_gen.cc index 8c5945889..641aa3c92 100644 --- a/src/action_class_gen.cc +++ b/src/action_class_gen.cc @@ -19,7 +19,7 @@ START_CLASS_DEF CLASS = action IMPLEMENTS = create_accessor - IMPLEMENTS = dump;xref + IMPLEMENTS = dump IMPLEMENTS = destroy IMPLEMENTS = notify_change MEMBERS = long len @@ -40,7 +40,6 @@ or edit "action.class" and rerun ./make_class.pl static void init_class (grib_action_class*); static void dump (grib_action* d, FILE*,int); -static void xref (grib_action* d, FILE* f,const char* path); static void destroy (grib_context*,grib_action*); static int create_accessor(grib_section*,grib_action*,grib_loader*); static int notify_change(grib_action* a, grib_accessor* observer,grib_accessor* observed); @@ -64,7 +63,7 @@ static grib_action_class _grib_action_class_gen = { &destroy, /* destroy */ &dump, /* dump */ - &xref, /* xref */ + 0, /* xref */ &create_accessor, /* create_accessor*/ @@ -130,11 +129,6 @@ static void dump(grib_action* act, FILE* f, int lvl) // For xref implementation see // src/deprecated/action_class_gen.cc -static void xref(grib_action* act, FILE* f, const char* path) -{ - Assert(!"xref is disabled"); -} - static int create_accessor(grib_section* p, grib_action* act, grib_loader* loader) { grib_action_gen* a = (grib_action_gen*)act; diff --git a/src/action_class_if.cc b/src/action_class_if.cc index a4da2f4be..a5d28725a 100644 --- a/src/action_class_if.cc +++ b/src/action_class_if.cc @@ -22,7 +22,6 @@ IMPLEMENTS = create_accessor IMPLEMENTS = dump IMPLEMENTS = destroy - IMPLEMENTS = xref IMPLEMENTS = reparse;execute MEMBERS = grib_expression *expression MEMBERS = grib_action *block_true @@ -44,7 +43,6 @@ or edit "action.class" and rerun ./make_class.pl static void init_class (grib_action_class*); static void dump (grib_action* d, FILE*,int); -static void xref (grib_action* d, FILE* f,const char* path); static void destroy (grib_context*,grib_action*); static int create_accessor(grib_section*,grib_action*,grib_loader*); static grib_action* reparse(grib_action* a,grib_accessor* acc,int *doit); @@ -73,7 +71,7 @@ static grib_action_class _grib_action_class_if = { &destroy, /* destroy */ &dump, /* dump */ - &xref, /* xref */ + 0, /* xref */ &create_accessor, /* create_accessor*/ @@ -86,6 +84,7 @@ grib_action_class* grib_action_class_if = &_grib_action_class_if; static void init_class(grib_action_class* c) { + c->xref = (*(c->super))->xref; c->notify_change = (*(c->super))->notify_change; } /* END_CLASS_IMP */ @@ -272,7 +271,7 @@ static grib_action* reparse(grib_action* a, grib_accessor* acc, int* doit) if ((ret = grib_expression_evaluate_long(grib_handle_of_accessor(acc), self->expression, &lres)) != GRIB_SUCCESS) grib_context_log(acc->context, - GRIB_LOG_ERROR, "if reparse grib_expression_evaluate_long %s", + GRIB_LOG_ERROR, "action_class_if::reparse: grib_expression_evaluate_long failed: %s", grib_get_error_message(ret)); if (lres) @@ -306,6 +305,3 @@ static void destroy(grib_context* context, grib_action* act) grib_context_free_persistent(context, act->op); } -static void xref(grib_action* d, FILE* f, const char* path) -{ -} diff --git a/src/action_class_modify.cc b/src/action_class_modify.cc index c379d7300..ef09a3c96 100644 --- a/src/action_class_modify.cc +++ b/src/action_class_modify.cc @@ -17,7 +17,7 @@ START_CLASS_DEF CLASS = action - IMPLEMENTS = dump;xref + IMPLEMENTS = dump IMPLEMENTS = create_accessor IMPLEMENTS = destroy MEMBERS = long flags @@ -38,7 +38,6 @@ or edit "action.class" and rerun ./make_class.pl static void init_class (grib_action_class*); static void dump (grib_action* d, FILE*,int); -static void xref (grib_action* d, FILE* f,const char* path); static void destroy (grib_context*,grib_action*); static int create_accessor(grib_section*,grib_action*,grib_loader*); @@ -61,7 +60,7 @@ static grib_action_class _grib_action_class_modify = { &destroy, /* destroy */ &dump, /* dump */ - &xref, /* xref */ + 0, /* xref */ &create_accessor, /* create_accessor*/ @@ -128,6 +127,3 @@ static void destroy(grib_context* context, grib_action* act) grib_context_free_persistent(context, act->op); } -static void xref(grib_action* d, FILE* f, const char* path) -{ -} diff --git a/src/action_class_noop.cc b/src/action_class_noop.cc index c2b3bc2f0..d4d2ff133 100644 --- a/src/action_class_noop.cc +++ b/src/action_class_noop.cc @@ -17,7 +17,7 @@ START_CLASS_DEF CLASS = action - IMPLEMENTS = dump;destroy;xref;execute + IMPLEMENTS = dump;destroy;execute END_CLASS_DEF */ @@ -34,7 +34,6 @@ or edit "action.class" and rerun ./make_class.pl static void init_class (grib_action_class*); static void dump (grib_action* d, FILE*,int); -static void xref (grib_action* d, FILE* f,const char* path); static void destroy (grib_context*,grib_action*); static int execute(grib_action* a,grib_handle* h); @@ -55,7 +54,7 @@ static grib_action_class _grib_action_class_noop = { &destroy, /* destroy */ &dump, /* dump */ - &xref, /* xref */ + 0, /* xref */ 0, /* create_accessor*/ @@ -101,10 +100,6 @@ static void destroy(grib_context* context, grib_action* act) grib_context_free_persistent(context, act->op); } -static void xref(grib_action* d, FILE* f, const char* path) -{ -} - static int execute(grib_action* act, grib_handle* h) { return 0; diff --git a/src/action_class_remove.cc b/src/action_class_remove.cc index 853a1a648..26ab6760b 100644 --- a/src/action_class_remove.cc +++ b/src/action_class_remove.cc @@ -19,7 +19,7 @@ CLASS = action IMPLEMENTS = create_accessor IMPLEMENTS = dump - IMPLEMENTS = destroy; xref + IMPLEMENTS = destroy MEMBERS = grib_arguments* args END_CLASS_DEF @@ -37,7 +37,6 @@ or edit "action.class" and rerun ./make_class.pl static void init_class (grib_action_class*); static void dump (grib_action* d, FILE*,int); -static void xref (grib_action* d, FILE* f,const char* path); static void destroy (grib_context*,grib_action*); static int create_accessor(grib_section*,grib_action*,grib_loader*); @@ -59,7 +58,7 @@ static grib_action_class _grib_action_class_remove = { &destroy, /* destroy */ &dump, /* dump */ - &xref, /* xref */ + 0, /* xref */ &create_accessor, /* create_accessor*/ @@ -153,6 +152,3 @@ static void destroy(grib_context* context, grib_action* act) grib_context_free_persistent(context, act->op); } -static void xref(grib_action* d, FILE* f, const char* path) -{ -} diff --git a/src/action_class_rename.cc b/src/action_class_rename.cc index 2666c4f75..b6533895e 100644 --- a/src/action_class_rename.cc +++ b/src/action_class_rename.cc @@ -19,7 +19,7 @@ CLASS = action IMPLEMENTS = create_accessor IMPLEMENTS = dump - IMPLEMENTS = destroy; xref + IMPLEMENTS = destroy MEMBERS = char* the_old MEMBERS = char* the_new END_CLASS_DEF @@ -38,7 +38,6 @@ or edit "action.class" and rerun ./make_class.pl static void init_class (grib_action_class*); static void dump (grib_action* d, FILE*,int); -static void xref (grib_action* d, FILE* f,const char* path); static void destroy (grib_context*,grib_action*); static int create_accessor(grib_section*,grib_action*,grib_loader*); @@ -61,7 +60,7 @@ static grib_action_class _grib_action_class_rename = { &destroy, /* destroy */ &dump, /* dump */ - &xref, /* xref */ + 0, /* xref */ &create_accessor, /* create_accessor*/ @@ -148,7 +147,3 @@ static void destroy(grib_context* context, grib_action* act) grib_context_free_persistent(context, act->name); grib_context_free_persistent(context, act->op); } - -static void xref(grib_action* d, FILE* f, const char* path) -{ -} diff --git a/src/action_class_section.cc b/src/action_class_section.cc index fc64351df..9dda3dc30 100644 --- a/src/action_class_section.cc +++ b/src/action_class_section.cc @@ -10,7 +10,6 @@ /*************************************************************************** * Jean Baptiste Filippi - 01.11.2005 * - * Enrico Fucile * ***************************************************************************/ #include "grib_api_internal.h" @@ -20,8 +19,6 @@ START_CLASS_DEF CLASS = action IMPLEMENTS = notify_change - IMPLEMENTS = reparse - IMPLEMENTS = xref END_CLASS_DEF */ @@ -37,9 +34,7 @@ or edit "action.class" and rerun ./make_class.pl */ static void init_class (grib_action_class*); -static void xref (grib_action* d, FILE* f,const char* path); static int notify_change(grib_action* a, grib_accessor* observer,grib_accessor* observed); -static grib_action* reparse(grib_action* a,grib_accessor* acc,int *doit); typedef struct grib_action_section { @@ -58,12 +53,12 @@ static grib_action_class _grib_action_class_section = { 0, /* destroy */ 0, /* dump */ - &xref, /* xref */ + 0, /* xref */ 0, /* create_accessor*/ ¬ify_change, /* notify_change */ - &reparse, /* reparse */ + 0, /* reparse */ 0, /* execute */ }; @@ -232,16 +227,3 @@ static int notify_change(grib_action* act, grib_accessor* notified, return GRIB_SUCCESS; } - -static grib_action* reparse(grib_action* a, grib_accessor* acc, int* doit) -{ - /* Should be inherited */ - printf("reparse should be inherited: %s\n", a->name); - - Assert(1 == 0); - return 0; -} - -static void xref(grib_action* d, FILE* f, const char* path) -{ -} diff --git a/src/action_class_set.cc b/src/action_class_set.cc index 8febce99d..1068181d5 100644 --- a/src/action_class_set.cc +++ b/src/action_class_set.cc @@ -8,16 +8,13 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/*************************************************************************** - * Enrico Fucile * - ***************************************************************************/ #include "grib_api_internal.h" /* This is used by make_class.pl START_CLASS_DEF CLASS = action - IMPLEMENTS = dump;xref + IMPLEMENTS = dump IMPLEMENTS = destroy;execute MEMBERS = grib_expression *expression MEMBERS = char *name @@ -38,7 +35,6 @@ or edit "action.class" and rerun ./make_class.pl static void init_class (grib_action_class*); static void dump (grib_action* d, FILE*,int); -static void xref (grib_action* d, FILE* f,const char* path); static void destroy (grib_context*,grib_action*); static int execute(grib_action* a,grib_handle* h); @@ -62,7 +58,7 @@ static grib_action_class _grib_action_class_set = { &destroy, /* destroy */ &dump, /* dump */ - &xref, /* xref */ + 0, /* xref */ 0, /* create_accessor*/ @@ -135,7 +131,3 @@ static void destroy(grib_context* context, grib_action* act) grib_context_free_persistent(context, act->name); grib_context_free_persistent(context, act->op); } - -static void xref(grib_action* d, FILE* f, const char* path) -{ -} diff --git a/src/action_class_set_darray.cc b/src/action_class_set_darray.cc index 43d249594..97211a219 100644 --- a/src/action_class_set_darray.cc +++ b/src/action_class_set_darray.cc @@ -14,7 +14,7 @@ START_CLASS_DEF CLASS = action - IMPLEMENTS = dump;xref + IMPLEMENTS = dump IMPLEMENTS = destroy;execute MEMBERS = grib_darray *darray MEMBERS = char *name @@ -34,7 +34,6 @@ or edit "action.class" and rerun ./make_class.pl static void init_class (grib_action_class*); static void dump (grib_action* d, FILE*,int); -static void xref (grib_action* d, FILE* f,const char* path); static void destroy (grib_context*,grib_action*); static int execute(grib_action* a,grib_handle* h); @@ -57,7 +56,7 @@ static grib_action_class _grib_action_class_set_darray = { &destroy, /* destroy */ &dump, /* dump */ - &xref, /* xref */ + 0, /* xref */ 0, /* create_accessor*/ @@ -123,7 +122,3 @@ static void destroy(grib_context* context, grib_action* act) grib_context_free_persistent(context, act->name); grib_context_free_persistent(context, act->op); } - -static void xref(grib_action* d, FILE* f, const char* path) -{ -} diff --git a/src/action_class_set_sarray.cc b/src/action_class_set_sarray.cc index b12443f23..3b670aa87 100644 --- a/src/action_class_set_sarray.cc +++ b/src/action_class_set_sarray.cc @@ -8,16 +8,13 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/*************************************************************************** - * Enrico Fucile * - ***************************************************************************/ #include "grib_api_internal.h" /* This is used by make_class.pl START_CLASS_DEF CLASS = action - IMPLEMENTS = dump;xref + IMPLEMENTS = dump IMPLEMENTS = destroy;execute MEMBERS = grib_sarray *sarray MEMBERS = char *name @@ -37,7 +34,6 @@ or edit "action.class" and rerun ./make_class.pl static void init_class (grib_action_class*); static void dump (grib_action* d, FILE*,int); -static void xref (grib_action* d, FILE* f,const char* path); static void destroy (grib_context*,grib_action*); static int execute(grib_action* a,grib_handle* h); @@ -60,7 +56,7 @@ static grib_action_class _grib_action_class_set_sarray = { &destroy, /* destroy */ &dump, /* dump */ - &xref, /* xref */ + 0, /* xref */ 0, /* create_accessor*/ @@ -127,7 +123,3 @@ static void destroy(grib_context* context, grib_action* act) grib_context_free_persistent(context, act->name); grib_context_free_persistent(context, act->op); } - -static void xref(grib_action* d, FILE* f, const char* path) -{ -} diff --git a/src/action_class_switch.cc b/src/action_class_switch.cc index 57e47dc89..b116aa846 100644 --- a/src/action_class_switch.cc +++ b/src/action_class_switch.cc @@ -8,9 +8,6 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/*************************************************************************** - * Enrico Fucile * - ***************************************************************************/ #include "grib_api_internal.h" /* This is used by make_class.pl @@ -19,7 +16,6 @@ CLASS = action SUPER = action_class_section IMPLEMENTS = destroy - IMPLEMENTS = xref IMPLEMENTS = execute MEMBERS = grib_arguments* args MEMBERS = grib_case *Case @@ -39,7 +35,6 @@ or edit "action.class" and rerun ./make_class.pl */ static void init_class (grib_action_class*); -static void xref (grib_action* d, FILE* f,const char* path); static void destroy (grib_context*,grib_action*); static int execute(grib_action* a,grib_handle* h); @@ -65,7 +60,7 @@ static grib_action_class _grib_action_class_switch = { &destroy, /* destroy */ 0, /* dump */ - &xref, /* xref */ + 0, /* xref */ 0, /* create_accessor*/ @@ -79,6 +74,7 @@ grib_action_class* grib_action_class_switch = &_grib_action_class_switch; static void init_class(grib_action_class* c) { c->dump = (*(c->super))->dump; + c->xref = (*(c->super))->xref; c->create_accessor = (*(c->super))->create_accessor; c->notify_change = (*(c->super))->notify_change; c->reparse = (*(c->super))->reparse; @@ -240,7 +236,3 @@ static void destroy(grib_context* context, grib_action* act) grib_context_free_persistent(context, act->name); grib_context_free_persistent(context, act->op); } - -static void xref(grib_action* d, FILE* f, const char* path) -{ -} diff --git a/src/action_class_transient_darray.cc b/src/action_class_transient_darray.cc index ce4e514f9..9990beb41 100644 --- a/src/action_class_transient_darray.cc +++ b/src/action_class_transient_darray.cc @@ -8,9 +8,6 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/*************************************************************************** - * Enrico Fucile * - ***************************************************************************/ #include "grib_api_internal.h" /* This is used by make_class.pl @@ -18,7 +15,7 @@ START_CLASS_DEF CLASS = action SUPER = action_class_gen - IMPLEMENTS = dump;xref + IMPLEMENTS = dump IMPLEMENTS = destroy;execute MEMBERS = grib_darray *darray MEMBERS = char *name @@ -38,7 +35,6 @@ or edit "action.class" and rerun ./make_class.pl static void init_class (grib_action_class*); static void dump (grib_action* d, FILE*,int); -static void xref (grib_action* d, FILE* f,const char* path); static void destroy (grib_context*,grib_action*); static int execute(grib_action* a,grib_handle* h); @@ -65,7 +61,7 @@ static grib_action_class _grib_action_class_transient_darray = { &destroy, /* destroy */ &dump, /* dump */ - &xref, /* xref */ + 0, /* xref */ 0, /* create_accessor*/ @@ -78,6 +74,7 @@ grib_action_class* grib_action_class_transient_darray = &_grib_action_class_tran static void init_class(grib_action_class* c) { + c->xref = (*(c->super))->xref; c->create_accessor = (*(c->super))->create_accessor; c->notify_change = (*(c->super))->notify_change; c->reparse = (*(c->super))->reparse; @@ -140,7 +137,3 @@ static void destroy(grib_context* context, grib_action* act) grib_context_free_persistent(context, a->name); grib_darray_delete(context, a->darray); } - -static void xref(grib_action* d, FILE* f, const char* path) -{ -} diff --git a/src/action_class_when.cc b/src/action_class_when.cc index a274a7c27..49fc325be 100644 --- a/src/action_class_when.cc +++ b/src/action_class_when.cc @@ -18,7 +18,7 @@ START_CLASS_DEF CLASS = action IMPLEMENTS = create_accessor - IMPLEMENTS = dump;xref + IMPLEMENTS = dump IMPLEMENTS = destroy;notify_change MEMBERS = grib_expression *expression MEMBERS = grib_action *block_true @@ -40,7 +40,6 @@ or edit "action.class" and rerun ./make_class.pl static void init_class (grib_action_class*); static void dump (grib_action* d, FILE*,int); -static void xref (grib_action* d, FILE* f,const char* path); static void destroy (grib_context*,grib_action*); static int create_accessor(grib_section*,grib_action*,grib_loader*); static int notify_change(grib_action* a, grib_accessor* observer,grib_accessor* observed); @@ -66,7 +65,7 @@ static grib_action_class _grib_action_class_when = { &destroy, /* destroy */ &dump, /* dump */ - &xref, /* xref */ + 0, /* xref */ &create_accessor, /* create_accessor*/ @@ -232,7 +231,3 @@ static void destroy(grib_context* context, grib_action* act) grib_context_free_persistent(context, act->name); grib_context_free_persistent(context, act->op); } - -static void xref(grib_action* d, FILE* f, const char* path) -{ -} diff --git a/src/eccodes.cc b/src/eccodes.cc index 13b23ddc0..961e69139 100644 --- a/src/eccodes.cc +++ b/src/eccodes.cc @@ -321,6 +321,10 @@ int codes_set_missing(grib_handle* h, const char* key) { return grib_set_missing(h, key); } +int codes_get_offset(const codes_handle* h, const char* key, size_t* offset) +{ + return grib_get_offset(h, key, offset); +} int codes_get_size(const grib_handle* h, const char* key, size_t* size) { return grib_get_size(h, key, size); diff --git a/src/eccodes.h b/src/eccodes.h index d890438f2..b4db4406a 100644 --- a/src/eccodes.h +++ b/src/eccodes.h @@ -724,7 +724,7 @@ int codes_grib_nearest_find_multiple(const codes_handle* h, int is_lsm, /*! \defgroup get_set Accessing header and data values */ /*! @{ */ /** - * Get the number offset of a key, in a message if several keys of the same name + * Get the byte offset of a key, if several keys of the same name * are present, the offset of the last one is returned * * @param h : the handle to get the offset from @@ -737,7 +737,7 @@ int codes_get_offset(const codes_handle* h, const char* key, size_t* offset); /** * Get the number of coded value from a key, if several keys of the same name are present, the total sum is returned * - * @param h : the handle to get the offset from + * @param h : the handle to get the data from * @param key : the key to be searched * @param size : the address of a size_t where the size will be set * @return 0 if OK, integer value on error @@ -747,7 +747,7 @@ int codes_get_size(const codes_handle* h, const char* key, size_t* size); /** * Get the length of the string representation of the key, if several keys of the same name are present, the maximum length is returned * - * @param h : the handle to get the offset from + * @param h : the handle to get the data from * @param key : the key to be searched * @param length : the address of a size_t where the length will be set * @return 0 if OK, integer value on error @@ -809,7 +809,8 @@ int codes_get_float_elements(const codes_handle* h, const char* key, const int* * @param h : the handle to get the data from * @param key : the key to be searched * @param mesg : the address of a string where the data will be retrieved - * @param length : the address of a size_t that contains allocated length of the string on input, and that contains the actual length of the string on output + * @param length : the address of a size_t that contains allocated length of the string on input, + * and that contains the actual length of the string on output * @return 0 if OK, integer value on error */ int codes_get_string(const codes_handle* h, const char* key, char* mesg, size_t* length); @@ -821,7 +822,8 @@ int codes_get_string(const codes_handle* h, const char* key, char* mesg, size_t* * @param h : the handle to get the data from * @param key : the key to be searched * @param vals : the address of a string array where the data will be retrieved - * @param length : the address of a size_t that contains allocated length of the array on input, and that contains the actual length of the array on output + * @param length : the address of a size_t that contains allocated length of the array on input, + * and that contains the actual length of the array on output * @return 0 if OK, integer value on error */ int codes_get_string_array(const codes_handle* h, const char* key, char** vals, size_t* length); @@ -830,11 +832,12 @@ int codes_get_string_array(const codes_handle* h, const char* key, char** vals, * Get raw bytes values from a key. If several keys of the same name are present, the last one is returned * @see codes_set_bytes * - * @param h : the handle to get the data from - * @param key : the key to be searched - * @param bytes : the address of a byte array where the data will be retrieved - * @param length : the address of a size_t that contains allocated length of the byte array on input, and that contains the actual length of the byte array on output - * @return 0 if OK, integer value on error + * @param h : the handle to get the data from + * @param key : the key to be searched + * @param bytes : the address of a byte array where the data will be retrieved + * @param length : the address of a size_t that contains allocated length of the byte array on input, + * and that contains the actual length of the byte array on output + * @return 0 if OK, integer value on error */ int codes_get_bytes(const codes_handle* h, const char* key, unsigned char* bytes, size_t* length); @@ -845,7 +848,8 @@ int codes_get_bytes(const codes_handle* h, const char* key, unsigned char* bytes * @param h : the handle to get the data from * @param key : the key to be searched * @param vals : the address of a double array where the data will be retrieved - * @param length : the address of a size_t that contains allocated length of the double array on input, and that contains the actual length of the double array on output + * @param length : the address of a size_t that contains allocated length of the double array on input, + * and that contains the actual length of the double array on output * @return 0 if OK, integer value on error */ int codes_get_double_array(const codes_handle* h, const char* key, double* vals, size_t* length); @@ -857,8 +861,9 @@ int codes_get_float_array(const codes_handle* h, const char* key, float* vals, s * * @param h : the handle to get the data from * @param key : the key to be searched - * @param vals : the address of a long array where the data will be retrieved - * @param length : the address of a size_t that contains allocated length of the long array on input, and that contains the actual length of the long array on output + * @param vals : the address of a long array where the data will be retrieved + * @param length : the address of a size_t that contains allocated length of the long array on input, + * and that contains the actual length of the long array on output * @return 0 if OK, integer value on error */ int codes_get_long_array(const codes_handle* h, const char* key, long* vals, size_t* length); @@ -891,10 +896,10 @@ int codes_set_long(codes_handle* h, const char* key, long val); * Set a double value from a key. If several keys of the same name are present, the last one is set * @see codes_get_double * - * @param h : the handle to set the data to - * @param key : the key to be searched + * @param h : the handle to set the data to + * @param key : the key to be searched * @param val : a double where the data will be read - * @return 0 if OK, integer value on error + * @return 0 if OK, integer value on error */ int codes_set_double(codes_handle* h, const char* key, double val); @@ -902,11 +907,12 @@ int codes_set_double(codes_handle* h, const char* key, double val); * Set a string value from a key. If several keys of the same name are present, the last one is set * @see codes_get_string * - * @param h : the handle to set the data to - * @param key : the key to be searched + * @param h : the handle to set the data to + * @param key : the key to be searched * @param mesg : the address of a string where the data will be read - * @param length : the address of a size_t that contains the length of the string on input, and that contains the actual packed length of the string on output - * @return 0 if OK, integer value on error + * @param length : the address of a size_t that contains the length of the string on input, + * and that contains the actual packed length of the string on output + * @return 0 if OK, integer value on error */ int codes_set_string(codes_handle* h, const char* key, const char* mesg, size_t* length); @@ -917,7 +923,8 @@ int codes_set_string(codes_handle* h, const char* key, const char* mesg, size_t* * @param h : the handle to set the data to * @param key : the key to be searched * @param bytes : the address of a byte array where the data will be read - * @param length : the address of a size_t that contains the length of the byte array on input, and that contains the actual packed length of the byte array on output + * @param length : the address of a size_t that contains the length of the byte array on input, + * and that contains the actual packed length of the byte array on output * @return 0 if OK, integer value on error */ int codes_set_bytes(codes_handle* h, const char* key, const unsigned char* bytes, size_t* length); diff --git a/src/eccodes_prototypes.h b/src/eccodes_prototypes.h index 3b405a05a..c9032e08e 100644 --- a/src/eccodes_prototypes.h +++ b/src/eccodes_prototypes.h @@ -5,7 +5,6 @@ #endif /* action.cc */ -void grib_xref(grib_action* a, FILE* f, const char* path); void grib_action_delete(grib_context* context, grib_action* a); int grib_create_accessor(grib_section* p, grib_action* a, grib_loader* h); int grib_action_notify_change(grib_action* a, grib_accessor* observer, grib_accessor* observed); @@ -13,7 +12,6 @@ grib_action* grib_action_reparse(grib_action* a, grib_accessor* acc, int* doit); int grib_action_execute(grib_action* a, grib_handle* h); void grib_dump_action_branch(FILE* out, grib_action* a, int decay); void grib_dump_action_tree(grib_context* ctx, FILE* out); -void grib_xref_action_branch(FILE* out, grib_action* a, const char* path); /* action_class_alias.cc */ grib_action* grib_action_create_alias(grib_context* context, const char* name, const char* arg1, const char* name_space, int flags); @@ -792,7 +790,6 @@ void grib_buffer_free(const grib_context* c, void* p); void* grib_buffer_realloc(const grib_context* c, void* p, size_t s); /* grib_buffer.cc*/ -void grib_get_buffer_ownership(const grib_context* c, grib_buffer* b); grib_buffer* grib_create_growable_buffer(const grib_context* c); grib_buffer* grib_new_buffer(const grib_context* c, const unsigned char* data, size_t buflen); void grib_buffer_delete(const grib_context* c, grib_buffer* b); @@ -997,7 +994,7 @@ int codes_check_message_header(const void* bytes, size_t length, ProductKind pro int codes_check_message_footer(const void* bytes, size_t length, ProductKind product); int grib_get_message_size(const grib_handle* h, size_t* size); int grib_get_message(const grib_handle* h, const void** msg, size_t* size); -int grib_get_message_headers(grib_handle* h, const void** msg, size_t* size); +int grib_get_message_headers(const grib_handle* h, const void** msg, size_t* size); grib_action* grib_action_from_filter(const char* filter); int grib_handle_apply_action(grib_handle* h, grib_action* a); void grib_multi_support_reset_file(grib_context* c, FILE* f); diff --git a/src/grib_accessor_class_count_missing.cc b/src/grib_accessor_class_count_missing.cc index 32f7f16c8..a4ed76841 100644 --- a/src/grib_accessor_class_count_missing.cc +++ b/src/grib_accessor_class_count_missing.cc @@ -200,10 +200,15 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len) if (grib_get_long(h, self->unusedBitsInBitmap, &unusedBitsInBitmap) != GRIB_SUCCESS) { if (grib_get_long(h, self->numberOfDataPoints, &numberOfDataPoints) != GRIB_SUCCESS) { - grib_context_log(a->context, GRIB_LOG_ERROR, "unable to count missing values"); + grib_context_log(a->context, GRIB_LOG_ERROR, "Unable to count missing values"); return GRIB_INTERNAL_ERROR; } unusedBitsInBitmap = size * 8 - numberOfDataPoints; + if (unusedBitsInBitmap < 0) { + grib_context_log(a->context, GRIB_LOG_ERROR, "Inconsistent number of bitmap points: Check the bitmap and data sections!"); + grib_context_log(a->context, GRIB_LOG_ERROR, "Bitmap size=%ld, numberOfDataPoints=%ld", size*8, numberOfDataPoints); + return GRIB_DECODING_ERROR; + } } p = h->buffer->data + offset; diff --git a/src/grib_accessor_class_data_g22order_packing.cc b/src/grib_accessor_class_data_g22order_packing.cc index af462d667..f45d9f722 100644 --- a/src/grib_accessor_class_data_g22order_packing.cc +++ b/src/grib_accessor_class_data_g22order_packing.cc @@ -267,11 +267,9 @@ static void add_bitstream(bitstream_context *ctx, grib_accessor* a, int t, int n return; } -/* - * find min/max of an integer array - * return 0: if min max found - * return 1: if min max not found, min = max = 0 - */ +// find min/max of an integer array +// return 0: if min max found +// return 1: if min max not found, min = max = 0 static int int_min_max_array(int* data, unsigned int n, int* min, int* max) { unsigned int first; @@ -1325,8 +1323,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: failed to get min max of data", cclass_name); return GRIB_ENCODING_ERROR; } - min_val = static_cast(mn); - max_val = static_cast(mx); + min_val = mn; + max_val = mx; binary_scale = bin_scale; diff --git a/src/grib_accessor_class_element.cc b/src/grib_accessor_class_element.cc index 5de471be4..78dd2a5ac 100644 --- a/src/grib_accessor_class_element.cc +++ b/src/grib_accessor_class_element.cc @@ -8,11 +8,6 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/************************************** - * Enrico Fucile - **************************************/ - - #include "grib_api_internal.h" /* This is used by make_class.pl @@ -21,6 +16,7 @@ CLASS = accessor SUPER = grib_accessor_class_long IMPLEMENTS = unpack_long;pack_long; + IMPLEMENTS = unpack_double IMPLEMENTS = init MEMBERS=const char* array MEMBERS=long element @@ -39,6 +35,7 @@ or edit "accessor.class" and rerun ./make_class.pl */ static int pack_long(grib_accessor*, const long* val, size_t* len); +static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); @@ -77,7 +74,7 @@ static grib_accessor_class _grib_accessor_class_element = { &unpack_long, /* unpack_long */ 0, /* pack_double */ 0, /* pack_float */ - 0, /* unpack_double */ + &unpack_double, /* unpack_double */ 0, /* unpack_float */ 0, /* pack_string */ 0, /* unpack_string */ @@ -110,10 +107,11 @@ grib_accessor_class* grib_accessor_class_element = &_grib_accessor_class_element static void init(grib_accessor* a, const long l, grib_arguments* c) { grib_accessor_element* self = (grib_accessor_element*)a; - int n = 0; + grib_handle* hand = grib_handle_of_accessor(a); - self->array = grib_arguments_get_name(grib_handle_of_accessor(a), c, n++); - self->element = grib_arguments_get_long(grib_handle_of_accessor(a), c, n++); + int n = 0; + self->array = grib_arguments_get_name(hand, c, n++); + self->element = grib_arguments_get_long(hand, c, n++); } static int unpack_long(grib_accessor* a, long* val, size_t* len) @@ -123,26 +121,27 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len) size_t size = 0; long* ar = NULL; grib_context* c = a->context; + grib_handle* hand = grib_handle_of_accessor(a); if (*len < 1) { ret = GRIB_ARRAY_TOO_SMALL; return ret; } - if ((ret = grib_get_size(grib_handle_of_accessor(a), self->array, &size)) != GRIB_SUCCESS) + if ((ret = grib_get_size(hand, self->array, &size)) != GRIB_SUCCESS) return ret; ar = (long*)grib_context_malloc_clear(c, size * sizeof(long)); if (!ar) { - grib_context_log(c, GRIB_LOG_ERROR, "unable to allocate %zu bytes", size * sizeof(long)); + grib_context_log(c, GRIB_LOG_ERROR, "Error allocating %zu bytes", size * sizeof(long)); return GRIB_OUT_OF_MEMORY; } - if ((ret = grib_get_long_array_internal(grib_handle_of_accessor(a), self->array, ar, &size)) != GRIB_SUCCESS) + if ((ret = grib_get_long_array_internal(hand, self->array, ar, &size)) != GRIB_SUCCESS) return ret; if (self->element < 0 || self->element >= size) { - grib_context_log(c, GRIB_LOG_ERROR, "Invalid element %ld for array '%s'. Value must be between 0 and %lu", + grib_context_log(c, GRIB_LOG_ERROR, "Invalid element %ld for array '%s'. Value must be between 0 and %zu", self->element, self->array, size - 1); ret = GRIB_INVALID_ARGUMENT; goto the_end; @@ -162,29 +161,70 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len) size_t size = 0; long* ar = NULL; grib_context* c = a->context; + grib_handle* hand = grib_handle_of_accessor(a); if (*len < 1) { ret = GRIB_ARRAY_TOO_SMALL; return ret; } - if ((ret = grib_get_size(grib_handle_of_accessor(a), self->array, &size)) != GRIB_SUCCESS) + if ((ret = grib_get_size(hand, self->array, &size)) != GRIB_SUCCESS) return ret; ar = (long*)grib_context_malloc_clear(c, size * sizeof(long)); if (!ar) { - grib_context_log(c, GRIB_LOG_ERROR, "unable to allocate %zu bytes", size * sizeof(long)); + grib_context_log(c, GRIB_LOG_ERROR, "Error allocating %zu bytes", size * sizeof(long)); return GRIB_OUT_OF_MEMORY; } - if ((ret = grib_get_long_array_internal(grib_handle_of_accessor(a), self->array, ar, &size)) != GRIB_SUCCESS) + if ((ret = grib_get_long_array_internal(hand, self->array, ar, &size)) != GRIB_SUCCESS) return ret; ar[self->element] = *val; - if ((ret = grib_set_long_array_internal(grib_handle_of_accessor(a), self->array, ar, size)) != GRIB_SUCCESS) + if ((ret = grib_set_long_array_internal(hand, self->array, ar, size)) != GRIB_SUCCESS) + return ret; + + grib_context_free(c, ar); + return ret; +} + +static int unpack_double(grib_accessor* a, double* val, size_t* len) +{ + grib_accessor_element* self = (grib_accessor_element*)a; + int ret = 0; + size_t size = 0; + double* ar = NULL; + grib_context* c = a->context; + grib_handle* hand = grib_handle_of_accessor(a); + + if (*len < 1) { + ret = GRIB_ARRAY_TOO_SMALL; + return ret; + } + + if ((ret = grib_get_size(hand, self->array, &size)) != GRIB_SUCCESS) return ret; + ar = (double*)grib_context_malloc_clear(c, size * sizeof(double)); + if (!ar) { + grib_context_log(c, GRIB_LOG_ERROR, "Error allocating %zu bytes", size * sizeof(double)); + return GRIB_OUT_OF_MEMORY; + } + + if ((ret = grib_get_double_array_internal(hand, self->array, ar, &size)) != GRIB_SUCCESS) + return ret; + + if (self->element < 0 || self->element >= size) { + grib_context_log(c, GRIB_LOG_ERROR, "Invalid element %ld for array '%s'. Value must be between 0 and %zu", + self->element, self->array, size - 1); + ret = GRIB_INVALID_ARGUMENT; + goto the_end; + } + + *val = ar[self->element]; + +the_end: grib_context_free(c, ar); return ret; } diff --git a/src/grib_accessor_class_gts_header.cc b/src/grib_accessor_class_gts_header.cc index 44aa9852d..149e9cfdd 100644 --- a/src/grib_accessor_class_gts_header.cc +++ b/src/grib_accessor_class_gts_header.cc @@ -15,7 +15,7 @@ START_CLASS_DEF CLASS = accessor SUPER = grib_accessor_class_ascii - IMPLEMENTS = pack_string;unpack_string;value_count + IMPLEMENTS = unpack_string;value_count IMPLEMENTS = init;string_length MEMBERS = int gts_offset MEMBERS = int gts_length @@ -33,7 +33,6 @@ or edit "accessor.class" and rerun ./make_class.pl */ -static int pack_string(grib_accessor*, const char*, size_t* len); static int unpack_string(grib_accessor*, char*, size_t* len); static size_t string_length(grib_accessor*); static int value_count(grib_accessor*, long*); @@ -76,7 +75,7 @@ static grib_accessor_class _grib_accessor_class_gts_header = { 0, /* pack_float */ 0, /* unpack_double */ 0, /* unpack_float */ - &pack_string, /* pack_string */ + 0, /* pack_string */ &unpack_string, /* unpack_string */ 0, /* pack_string_array */ 0, /* unpack_string_array */ @@ -107,18 +106,13 @@ grib_accessor_class* grib_accessor_class_gts_header = &_grib_accessor_class_gts_ static void init(grib_accessor* a, const long l, grib_arguments* c) { grib_accessor_gts_header* self = (grib_accessor_gts_header*)a; - self->gts_offset = -1; - self->gts_length = -1; - self->gts_offset = grib_arguments_get_long(grib_handle_of_accessor(a), c, 0); - self->gts_length = grib_arguments_get_long(grib_handle_of_accessor(a), c, 1); + self->gts_offset = -1; + self->gts_length = -1; + self->gts_offset = grib_arguments_get_long(grib_handle_of_accessor(a), c, 0); + self->gts_length = grib_arguments_get_long(grib_handle_of_accessor(a), c, 1); + a->flags |= GRIB_ACCESSOR_FLAG_READ_ONLY; } -static int pack_string(grib_accessor* a, const char* val, size_t* len) -{ - return GRIB_NOT_IMPLEMENTED; -} - - static int unpack_string(grib_accessor* a, char* val, size_t* len) { grib_accessor_gts_header* self = (grib_accessor_gts_header*)a; diff --git a/src/grib_accessor_class_long.cc b/src/grib_accessor_class_long.cc index 1f97a539e..7fa0e5846 100644 --- a/src/grib_accessor_class_long.cc +++ b/src/grib_accessor_class_long.cc @@ -257,10 +257,10 @@ static int pack_string(grib_accessor* a, const char* val, size_t* len) { long v = 0; /* The converted value */ - // Requires more work e.g. filter - //if (strcmp_nocase(val, "missing")==0) { - // return pack_missing(a); - //} + // ECC-1722 + if (strcmp_nocase(val, "missing")==0) { + return pack_missing(a); + } if (string_to_long(val, &v, 1) != GRIB_SUCCESS) { grib_context_log(a->context, GRIB_LOG_ERROR, diff --git a/src/grib_accessor_class_proj_string.cc b/src/grib_accessor_class_proj_string.cc index ffd5ed831..00b25c6a3 100644 --- a/src/grib_accessor_class_proj_string.cc +++ b/src/grib_accessor_class_proj_string.cc @@ -161,7 +161,7 @@ static int proj_space_view(grib_handle* h, char* result) { return GRIB_NOT_IMPLEMENTED; // int err = 0; - // char shape[64] = {0,}; + // char shape[128] = {0,}; // double latOfSubSatellitePointInDegrees, lonOfSubSatellitePointInDegrees; // if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS) // return err; @@ -190,7 +190,7 @@ static int proj_equatorial_azimuthal_equidistant(grib_handle* h, char* result) static int proj_lambert_conformal(grib_handle* h, char* result) { int err = 0; - char shape[64] = {0,}; + char shape[128] = {0,}; double LoVInDegrees = 0, LaDInDegrees = 0, Latin1InDegrees = 0, Latin2InDegrees = 0; if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS) @@ -211,7 +211,7 @@ static int proj_lambert_conformal(grib_handle* h, char* result) static int proj_lambert_azimuthal_equal_area(grib_handle* h, char* result) { int err = 0; - char shape[64] = {0,}; + char shape[128] = {0,}; double standardParallel = 0, centralLongitude = 0; if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS) @@ -231,7 +231,7 @@ static int proj_polar_stereographic(grib_handle* h, char* result) double centralLongitude = 0, centralLatitude = 0; int has_northPole = 0; long projectionCentreFlag = 0; - char shape[64] = {0,}; + char shape[128] = {0,}; if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS) return err; @@ -252,7 +252,7 @@ static int proj_polar_stereographic(grib_handle* h, char* result) static int proj_unprojected(grib_handle* h, char* result) { int err = 0; - //char shape[64] = {0,}; + //char shape[128] = {0,}; //if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS) return err; //snprintf(result, 1024, "+proj=longlat %s", shape); snprintf(result, 1024, "+proj=longlat +datum=WGS84 +no_defs +type=crs"); @@ -264,7 +264,7 @@ static int proj_mercator(grib_handle* h, char* result) { int err = 0; double LaDInDegrees = 0; - char shape[64] = {0,}; + char shape[128] = {0,}; if ((err = grib_get_double_internal(h, "LaDInDegrees", &LaDInDegrees)) != GRIB_SUCCESS) return err; diff --git a/src/grib_accessor_class_when.cc b/src/grib_accessor_class_when.cc index 6717c2c4a..1bf0d999e 100644 --- a/src/grib_accessor_class_when.cc +++ b/src/grib_accessor_class_when.cc @@ -8,11 +8,6 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/************************************** - * Enrico Fucile - **************************************/ - - #include "grib_api_internal.h" /* This is used by make_class.pl @@ -21,6 +16,7 @@ CLASS = accessor SUPER = grib_accessor_class_gen IMPLEMENTS = init;dump; + IMPLEMENTS = get_native_type IMPLEMENTS = notify_change END_CLASS_DEF @@ -36,6 +32,7 @@ or edit "accessor.class" and rerun ./make_class.pl */ +static int get_native_type(grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); static int notify_change(grib_accessor*, grib_accessor*); @@ -64,7 +61,7 @@ static grib_accessor_class _grib_accessor_class_when = { 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ - 0, /* get native type */ + &get_native_type, /* get native type */ 0, /* get sub_section */ 0, /* pack_missing */ 0, /* is_missing */ @@ -109,7 +106,6 @@ static void init(grib_accessor* a, const long len, grib_arguments* arg) a->flags |= GRIB_ACCESSOR_FLAG_READ_ONLY; } - static void dump(grib_accessor* a, grib_dumper* dumper) { /* grib_dump_when(dumper,a,NULL); */ @@ -119,3 +115,8 @@ static int notify_change(grib_accessor* a, grib_accessor* changed) { return grib_action_notify_change(a->creator, a, changed); } + +static int get_native_type(grib_accessor* a) +{ + return GRIB_TYPE_UNDEFINED; +} diff --git a/src/grib_api.h b/src/grib_api.h index 9a3e46ffc..21e605baa 100644 --- a/src/grib_api.h +++ b/src/grib_api.h @@ -732,7 +732,7 @@ int grib_nearest_find_multiple(const grib_handle* h, int is_lsm, /*! \defgroup get_set Accessing header and data values */ /*! @{ */ /** - * Get the number offset of a key, in a message if several keys of the same name + * Get the byte offset of a key. If several keys of the same name * are present, the offset of the last one is returned * * @param h : the handle to get the offset from @@ -745,7 +745,7 @@ int grib_get_offset(const grib_handle* h, const char* key, size_t* offset); /** * Get the number of coded value from a key, if several keys of the same name are present, the total sum is returned * - * @param h : the handle to get the offset from + * @param h : the handle to get the data from * @param key : the key to be searched * @param size : the address of a size_t where the size will be set * @return 0 if OK, integer value on error @@ -755,7 +755,7 @@ int grib_get_size(const grib_handle* h, const char* key, size_t* size); /** * Get the length of the string representation of the key, if several keys of the same name are present, the maximum length is returned * - * @param h : the handle to get the offset from + * @param h : the handle to get the data from * @param key : the key to be searched * @param length : the address of a size_t where the length will be set * @return 0 if OK, integer value on error diff --git a/src/grib_buffer.cc b/src/grib_buffer.cc index 370cafc13..548c546cc 100644 --- a/src/grib_buffer.cc +++ b/src/grib_buffer.cc @@ -13,7 +13,7 @@ ***************************************************************************/ #include "grib_api_internal.h" -void grib_get_buffer_ownership(const grib_context* c, grib_buffer* b) +static void grib_get_buffer_ownership(const grib_context* c, grib_buffer* b) { unsigned char* newdata; if (b->property == CODES_MY_BUFFER) @@ -137,23 +137,19 @@ static void update_offsets_after(grib_accessor* a, long len) } } -// /* new GCC compiler v4.5.0 complains function is defined but not used*/ // void grib_recompute_sections_lengths(grib_section* s) // { // if(s) // { // long plen = 0; // size_t len = 1; - // grib_accessor* a = s->block->first; - // while(a) // { // /* grib_recompute_sections_lengths(grib_get_sub_section(a)); */ // grib_recompute_sections_lengths(a->sub_section); // a = a->next; // } - // if(s->aclength) // { // int ret; @@ -161,10 +157,8 @@ static void update_offsets_after(grib_accessor* a, long len) // plen = grib_get_next_position_offset(s->block->last) - s->owner->offset; // else // plen = grib_get_next_position_offset(s->block->last); - // if((ret = grib_pack_long(s->aclength, &plen, &len)) != GRIB_SUCCESS) // ; - // // if(s->h->context->debug) // printf("SECTION updating length %ld .. %s\n",plen,s->owner->name); @@ -177,7 +171,6 @@ static void update_offsets_after(grib_accessor* a, long len) // { // long plen = 0; // size_t len = 1; - // if(!s) return; // if(s->aclength) // { @@ -186,14 +179,11 @@ static void update_offsets_after(grib_accessor* a, long len) // plen = grib_get_next_position_offset(s->block->last) - s->owner->offset; // else // plen = grib_get_next_position_offset(s->block->last); - // /* if(s->owner) */ // /* s->owner->length = plen; */ - // /* if(s->aclength) */ // if((ret = grib_pack_long(s->aclength, &plen, &len)) != GRIB_SUCCESS) // ; - // if(s->h->context->debug) // { // printf("SECTION updating length %ld .. %s\n",plen,s->owner->name); diff --git a/src/grib_expression_class_functor.cc b/src/grib_expression_class_functor.cc index c7ffc072e..89c4d8a6a 100644 --- a/src/grib_expression_class_functor.cc +++ b/src/grib_expression_class_functor.cc @@ -86,16 +86,24 @@ static int evaluate_long(grib_expression* g, grib_handle* h, long* lres) { grib_expression_functor* e = (grib_expression_functor*)g; - if (strcmp(e->name, "lookup") == 0) { + if (STR_EQUAL(e->name, "lookup")) { return GRIB_SUCCESS; } - if (strcmp(e->name, "new") == 0) { + if (STR_EQUAL(e->name, "new")) { *lres = h->loader != NULL; return GRIB_SUCCESS; } - if (strcmp(e->name, "missing") == 0) { + if (STR_EQUAL(e->name, "abs")) { + grib_expression* exp = grib_arguments_get_expression(h, e->args, 0); + long lval = 0; + int ret = grib_expression_evaluate_long(h, exp, &lval); + *lres = abs(lval); + return ret; + } + + if (STR_EQUAL(e->name, "missing")) { const char* p = grib_arguments_get_name(h, e->args, 0); if (p) { long val = 0; @@ -122,7 +130,7 @@ static int evaluate_long(grib_expression* g, grib_handle* h, long* lres) return GRIB_SUCCESS; } - if (strcmp(e->name, "defined") == 0) { + if (STR_EQUAL(e->name, "defined")) { const char* p = grib_arguments_get_name(h, e->args, 0); if (p) { @@ -134,7 +142,7 @@ static int evaluate_long(grib_expression* g, grib_handle* h, long* lres) return GRIB_SUCCESS; } - if (strcmp(e->name, "environment_variable") == 0) { + if (STR_EQUAL(e->name, "environment_variable")) { // ECC-1520: This implementation has some limitations: // 1. Cannot distinguish between environment variable NOT SET // and SET but equal to 0 @@ -154,12 +162,12 @@ static int evaluate_long(grib_expression* g, grib_handle* h, long* lres) return GRIB_SUCCESS; } - if (strcmp(e->name, "changed") == 0) { + if (STR_EQUAL(e->name, "changed")) { *lres = 1; return GRIB_SUCCESS; } - if (strcmp(e->name, "gribex_mode_on") == 0) { + if (STR_EQUAL(e->name, "gribex_mode_on")) { *lres = h->context->gribex_mode_on ? 1 : 0; return GRIB_SUCCESS; } diff --git a/src/grib_fieldset.cc b/src/grib_fieldset.cc index 88eabeb7b..72cb928c6 100644 --- a/src/grib_fieldset.cc +++ b/src/grib_fieldset.cc @@ -73,8 +73,7 @@ int grib_fieldset_new_column(grib_fieldset* set, int id, char* key, int type) set->columns[id].long_values = (long*)grib_context_malloc_clear(c, sizeof(long) * GRIB_START_ARRAY_SIZE); if (!set->columns[id].long_values) { grib_context_log(c, GRIB_LOG_ERROR, - "grib_fieldset_new_column: Cannot malloc %ld bytes", - sizeof(long) * GRIB_START_ARRAY_SIZE); + "%s: Error allocating %zu bytes", __func__, sizeof(long) * GRIB_START_ARRAY_SIZE); err = GRIB_OUT_OF_MEMORY; return err; } @@ -83,8 +82,7 @@ int grib_fieldset_new_column(grib_fieldset* set, int id, char* key, int type) set->columns[id].double_values = (double*)grib_context_malloc_clear(c, sizeof(double) * GRIB_START_ARRAY_SIZE); if (!set->columns[id].double_values) { grib_context_log(c, GRIB_LOG_ERROR, - "grib_fieldset_new_column: Cannot malloc %ld bytes", - sizeof(double) * GRIB_START_ARRAY_SIZE); + "%s: Error allocating %zu bytes", __func__, sizeof(double) * GRIB_START_ARRAY_SIZE); err = GRIB_OUT_OF_MEMORY; return err; } @@ -93,8 +91,7 @@ int grib_fieldset_new_column(grib_fieldset* set, int id, char* key, int type) set->columns[id].string_values = (char**)grib_context_malloc_clear(c, sizeof(char*) * GRIB_START_ARRAY_SIZE); if (!set->columns[id].string_values) { grib_context_log(c, GRIB_LOG_ERROR, - "grib_fieldset_new_column: Cannot malloc %ld bytes", - sizeof(char*) * GRIB_START_ARRAY_SIZE); + "%s: Error allocating %zu bytes", __func__, sizeof(char*) * GRIB_START_ARRAY_SIZE); err = GRIB_OUT_OF_MEMORY; return err; } @@ -171,8 +168,7 @@ static int grib_fieldset_columns_resize(grib_fieldset* set, size_t newsize) newsize * sizeof(long)); if (!newlongs) { grib_context_log(c, GRIB_LOG_ERROR, - "grib_fieldset_columns_resize: Cannot malloc %ld bytes", - newsize - set->columns[i].values_array_size); + "%s: Error allocating %zu bytes", __func__, newsize - set->columns[i].values_array_size); return GRIB_OUT_OF_MEMORY; } else @@ -183,8 +179,7 @@ static int grib_fieldset_columns_resize(grib_fieldset* set, size_t newsize) newsize * sizeof(double)); if (!newdoubles) { grib_context_log(c, GRIB_LOG_ERROR, - "grib_fieldset_columns_resize: Cannot malloc %ld bytes", - newsize - set->columns[i].values_array_size); + "%s: Error allocating %zu bytes", __func__, newsize - set->columns[i].values_array_size); return GRIB_OUT_OF_MEMORY; } else @@ -195,8 +190,7 @@ static int grib_fieldset_columns_resize(grib_fieldset* set, size_t newsize) newsize * sizeof(char*)); if (!newstrings) { grib_context_log(c, GRIB_LOG_ERROR, - "grib_fieldset_columns_resize: Cannot malloc %ld bytes", - newsize - set->columns[i].values_array_size); + "%s: Error allocating %zu bytes", __func__, newsize - set->columns[i].values_array_size); return GRIB_OUT_OF_MEMORY; } else @@ -206,8 +200,7 @@ static int grib_fieldset_columns_resize(grib_fieldset* set, size_t newsize) newerrors = (int*)grib_context_realloc(c, set->columns[i].errors, newsize * sizeof(int)); if (!newerrors) { grib_context_log(c, GRIB_LOG_ERROR, - "grib_fieldset_columns_resize: Cannot malloc %ld bytes", - newsize * sizeof(int)); + "%s: Error allocating %zu bytes", __func__, newsize * sizeof(int)); return GRIB_OUT_OF_MEMORY; } else @@ -332,8 +325,7 @@ static grib_fieldset* grib_fieldset_create_from_keys(grib_context* c, const char msize = sizeof(grib_fieldset); set = (grib_fieldset*)grib_context_malloc_clear(c, msize); if (!set) { - grib_context_log(c, GRIB_LOG_ERROR, - "grib_fieldset_create_from_keys: Cannot malloc %lu bytes", msize); + grib_context_log(c, GRIB_LOG_ERROR, "%s: Error allocating %zu bytes", __func__, msize); return NULL; } @@ -357,7 +349,7 @@ static grib_fieldset* grib_fieldset_create_from_keys(grib_context* c, const char set->columns = (grib_column*)grib_context_malloc_clear(c, sizeof(grib_column) * nkeys); if (!set->columns) { - grib_context_log(c, GRIB_LOG_ERROR, "grib_fieldset_create_from_keys: memory allocation error"); + grib_context_log(c, GRIB_LOG_ERROR, "%s: memory allocation error", __func__); *err = GRIB_OUT_OF_MEMORY; return NULL; } @@ -417,7 +409,6 @@ int grib_fieldset_apply_where(grib_fieldset* set, const char* where_string) // grib_math* m = NULL; // m = grib_math_new(set->context, where_string, &err); // if (err || !m) return err; - // print_math(m); // printf("\n"); // grib_math_delete(set->context, m); @@ -816,8 +807,7 @@ static int grib_fieldset_resize_int_array(grib_int_array* a, size_t newsize) el = (int*)grib_context_realloc(a->context, a->el, newsize); if (!el) { grib_context_log(a->context, GRIB_LOG_ERROR, - "grib_fieldset_resize_int_array: Cannot malloc %lu bytes", - newsize); + "%s: Error allocating %zu bytes", __func__, newsize); return GRIB_OUT_OF_MEMORY; } else @@ -860,8 +850,7 @@ static int grib_fieldset_resize_fields(grib_fieldset* set, size_t newsize) fields = (grib_field**)grib_context_realloc(set->context, set->fields, newsize * sizeof(grib_field*)); if (!fields) { grib_context_log(set->context, GRIB_LOG_ERROR, - "grib_fieldset_resize_fields: Cannot malloc %lu bytes", - newsize * sizeof(grib_field*)); + "%s: Error allocating %zu bytes", __func__, newsize * sizeof(grib_field*)); return GRIB_OUT_OF_MEMORY; } else diff --git a/src/grib_handle.cc b/src/grib_handle.cc index be5cdecda..5520c0fc7 100644 --- a/src/grib_handle.cc +++ b/src/grib_handle.cc @@ -1149,9 +1149,7 @@ grib_multi_handle* grib_multi_handle_new(grib_context* c) } h = (grib_multi_handle*)grib_context_malloc_clear(c, sizeof(grib_multi_handle)); if (h == NULL) { - grib_context_log(c, GRIB_LOG_ERROR, - "grib_multi_handle_new: unable to allocate memory. %s", - grib_get_error_message(GRIB_OUT_OF_MEMORY)); + grib_context_log(c, GRIB_LOG_ERROR, "%s: Unable to allocate memory", __func__); return NULL; } h->buffer = grib_create_growable_buffer(c); @@ -1375,7 +1373,7 @@ int grib_get_message(const grib_handle* ch, const void** msg, size_t* size) return 0; } -int grib_get_message_headers(grib_handle* h, const void** msg, size_t* size) +int grib_get_message_headers(const grib_handle* h, const void** msg, size_t* size) { int err = 0; size_t endOfHeadersMarker; @@ -1384,7 +1382,7 @@ int grib_get_message_headers(grib_handle* h, const void** msg, size_t* size) if ((err = grib_get_offset(h, "endOfHeadersMarker", &endOfHeadersMarker)) != GRIB_SUCCESS) { grib_context_log(h->context, GRIB_LOG_ERROR, - "grib_get_message_headers: unable to get offset of endOfHeadersMarker"); + "%s: Unable to get offset of endOfHeadersMarker", __func__); return err; } diff --git a/src/grib_iterator_class_mercator.cc b/src/grib_iterator_class_mercator.cc index 19d7195ff..c4f668186 100644 --- a/src/grib_iterator_class_mercator.cc +++ b/src/grib_iterator_class_mercator.cc @@ -199,7 +199,7 @@ static int init_mercator(grib_handle* h, false_easting = x0; false_northing = y0; for (j = 0; j < ny; j++) { - y = j * DiInMetres; + y = j * DjInMetres; for (i = 0; i < nx; i++) { const int index = i + j * nx; double _x, _y; diff --git a/src/grib_iterator_class_regular.cc b/src/grib_iterator_class_regular.cc index 857112261..64033b8de 100644 --- a/src/grib_iterator_class_regular.cc +++ b/src/grib_iterator_class_regular.cc @@ -233,10 +233,14 @@ static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args) self->los[loi] = lon1; lon1 += idir; } - /* ECC-1406: Due to rounding, errors can accumulate. - * So we ensure the last longitude is longitudeOfLastGridPointInDegrees - */ - self->los[Ni-1] = normalise_longitude_in_degrees(lon2); // Also see ECC-1671 + + // ECC-1406: Due to rounding, errors can accumulate. + // So we ensure the last longitude is longitudeOfLastGridPointInDegrees + // Also see ECC-1671, ECC-1708 + if (lon2 > 0) { + lon2 = normalise_longitude_in_degrees(lon2); + } + self->los[Ni-1] = lon2; return ret; } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0cbf0cb65..73d62b2ec 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -128,6 +128,9 @@ if( HAVE_BUILD_TOOLS ) grib_ecc-1560 grib_ecc-1571 grib_ecc-1654 + grib_ecc-1671 + grib_ecc-1708 + grib_ecc-1691 bufr_ecc-1028 bufr_ecc-1195 bufr_ecc-1259 diff --git a/tests/grib_copy_message.cc b/tests/grib_copy_message.cc index 0fd6bb021..b3ea95cdc 100644 --- a/tests/grib_copy_message.cc +++ b/tests/grib_copy_message.cc @@ -23,6 +23,8 @@ int main(int argc, char* argv[]) assert (argc == 3); + printf("%ld\n", codes_get_api_version()); + in = fopen(argv[1], "rb"); assert(in); diff --git a/tests/grib_ecc-1671.sh b/tests/grib_ecc-1671.sh new file mode 100755 index 000000000..aa7a50bbc --- /dev/null +++ b/tests/grib_ecc-1671.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# (C) Copyright 2005- 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.ctest.sh + +label="grib_ecc-1671_test" + +tempGrib=temp.$label.grib +tempFilt=temp.${label}.filt +tempOut=temp.${label}.txt + +sample="$samp_dir/GRIB2.tmpl" + +cat > $tempFilt < $tempFilt < 0.001 ) { + print "Error: last longitude is [last_elem:d] but should be 179.95"; + assert(0); + } +EOF +${tools_dir}/grib_filter $tempFilt $tempGrib + +# ${tools_dir}/grib_get_data $tempGrib > $tempOut +# cat $tempOut +# ${tools_dir}/grib_ls -l 37.5,16.0,1 $tempGrib > $tempOut + +rm -f $tempGrib $tempFilt $tempOut diff --git a/tests/grib_ecc-1691.sh b/tests/grib_ecc-1691.sh new file mode 100755 index 000000000..97c38108d --- /dev/null +++ b/tests/grib_ecc-1691.sh @@ -0,0 +1,95 @@ +#!/bin/sh +# (C) Copyright 2005- 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.ctest.sh + +REDIRECT=/dev/null + +# ECC-1691: Destination Earth ClimateDT metadata support + +label="grib_ecc-1691_test" +temp_grib_a=temp.$label.a.grib +temp_grib_b=temp.$label.b.grib +destine_sample=temp.$label.destine.grib +sample_grib2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl + +tablesVersionLatest=$( ${tools_dir}/grib_get -p tablesVersionLatest $sample_grib2 ) + +# Setup Destine pseudo-centre GRIB message +# First latest tables version and add local section with MARS labeling +${tools_dir}/grib_set -s tablesVersion=$tablesVersionLatest,setLocalDefinition=1,grib2LocalSectionNumber=1 $sample_grib2 $temp_grib_a + +# Then change to processed data = 12 --> DestinE +${tools_dir}/grib_set -s productionStatusOfProcessedData=12,class=d1 $temp_grib_a $destine_sample + +# Check DestinE base related keys are present and correct +grib_check_key_exists $destine_sample destineLocalVersion,dataset,marsClass,marsType,marsStream,experimentVersionNumber +grib_check_key_equals $destine_sample "marsClass,dataset,destineLocalVersion" "d1 0 1" + +# Check setting dataset to climate-dt (1). Check keys are present and equal defaults +${tools_dir}/grib_set -s dataset=1 $destine_sample $temp_grib_a + +grib_check_key_exists $temp_grib_a dataset,generation,activity,experiment,model,realization,resolution +grib_check_key_equals $temp_grib_a "dataset,generation,activity,experiment,model,realization,resolution" "1 255 0 0 0 255 0" + +# Check an example where a few additional things are set in climate-dt +${tools_dir}/grib_set -s dataset=1,generation=2,activity=1,experiment=1,model=2,realization=1,resolution=1 $destine_sample $temp_grib_a + +grib_check_key_equals $temp_grib_a "dataset,generation,activity,experiment,model,realization,resolution" "1 2 1 1 2 1 1" +grib_check_key_equals $temp_grib_a "dataset:s,activity:s,experiment:s,model:s,resolution:s" "climate-dt CMIP6 hist IFS-NEMO standard" + +# Check setting dataset to extremes-dt (2). This time we will check string also +${tools_dir}/grib_set -s dataset=2 $destine_sample $temp_grib_a + +grib_check_key_equals $temp_grib_a "dataset,dataset:s" "2 extremes-dt" + +# Check concepts. First check default value and then example of mapping +grib_check_key_exists $destine_sample destineOrigin,gridSpecification +grib_check_key_equals $destine_sample "destineOrigin,gridSpecification" "unknown unknown" + +# Below mapping is for MeteoFrance +${tools_dir}/grib_set -s centre=98,subCentre=85 $destine_sample $temp_grib_a + +grib_check_key_equals $temp_grib_a "destineOrigin" "Meteo-France" + +# Below mapping is for H1024 +${tools_dir}/grib_set -s numberOfDataPoints=12582912,gridDefinitionTemplateNumber=150,Nside=1024 $destine_sample $temp_grib_a + +grib_check_key_equals $temp_grib_a "gridSpecification" "H1024" + +# Now check streams. +# Setting stream clte and type fc should set mars.date and mars.time to dataDate and dataTime, +# and mars.step should be unaliased + +${tools_dir}/grib_set -s stream=clte,type=fc $destine_sample $temp_grib_a + +result1=$( ${tools_dir}/grib_get -p mars.date,mars.time $temp_grib_a ) +result2=$( ${tools_dir}/grib_get -p dataDate,dataTime $temp_grib_a ) +[ "$result1" = "$result2" ] + +${tools_dir}/grib_ls -jm $temp_grib_a +[ $( ${tools_dir}/grib_get -f -p mars.step $temp_grib_a ) = "not_found" ] + +# Setting stream clmn and type fc should set mars.year and mars.month to year and month, +# and mars.date, mars.time, mars.step should be unaliased + +${tools_dir}/grib_set -s stream=clmn,type=fc $destine_sample $temp_grib_a + +result1=$( ${tools_dir}/grib_get -p mars.year,mars.month $temp_grib_a ) +result2=$( ${tools_dir}/grib_get -p year,month $temp_grib_a ) +[ "$result1" = "$result2" ] + +${tools_dir}/grib_ls -jm $temp_grib_a +[ $( ${tools_dir}/grib_get -f -p mars.date $temp_grib_a ) = "not_found" ] +[ $( ${tools_dir}/grib_get -f -p mars.time $temp_grib_a ) = "not_found" ] +[ $( ${tools_dir}/grib_get -f -p mars.step $temp_grib_a ) = "not_found" ] + +# Clean up +rm -f $temp_grib_a $temp_grib_b $destine_sample diff --git a/tests/grib_ecc-1708.sh b/tests/grib_ecc-1708.sh new file mode 100755 index 000000000..2bbf485f2 --- /dev/null +++ b/tests/grib_ecc-1708.sh @@ -0,0 +1,46 @@ +#!/bin/sh +# (C) Copyright 2005- 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.ctest.sh + +label="grib_ecc-1708_test" + +tempGrib=temp.$label.grib +tempFilt=temp.${label}.filt +tempOut=temp.${label}.txt + +sample="$samp_dir/GRIB1.tmpl" + +cat > $tempFilt < $tempFilt < 0.001 ) { + print "Error: last longitude is [last_elem:d] but should be -40"; + assert(0); + } +EOF +${tools_dir}/grib_filter $tempFilt $tempGrib + +rm -f $tempGrib $tempFilt $tempOut diff --git a/tests/grib_filter.sh b/tests/grib_filter.sh index 6a7ebb38f..c114c5e4e 100755 --- a/tests/grib_filter.sh +++ b/tests/grib_filter.sh @@ -383,9 +383,28 @@ cat >$tempFilt < $tempOut -cat $tempOut grep "MISSING" $tempOut +# Test string_compare +cat >$tempFilt < $tempOut 2>&1 +cat $tempOut +grep "rubbish must fail" $tempOut +grep "garbage must fail" $tempOut +grep "unable to get rubbish as string" $tempOut +grep "unable to get garbage as string" $tempOut + + +# Use of "abs" +cat >$tempFilt < $temp @@ -109,9 +110,48 @@ ${tools_dir}/grib_index_build -N -o $tempIndex2 $tempGribFile2 ${tools_dir}/grib_compare -v $tempIndex1 $tempIndex2 rm -f $tempIndex1 $tempIndex2 $tempGribFile1 $tempGribFile2 +# Indexes containing different keys +${tools_dir}/grib_index_build -k date,time -N -o $tempIndex1 $sample1 +${tools_dir}/grib_index_build -k level -N -o $tempIndex2 $sample1 +set +e +${tools_dir}/grib_compare -v $tempIndex1 $tempIndex2 2>$tempOut +status=$? +set -e +[ $status -ne 0 ] +cat $tempOut +grep -q "Indexes contained in the input files have different keys" $tempOut +rm -f $tempIndex1 $tempIndex2 $tempOut + + +${tools_dir}/grib_index_build -k date,time -N -o $tempIndex1 $sample1 +${tools_dir}/grib_index_build -k date,time,level -N -o $tempIndex2 $sample1 +set +e +${tools_dir}/grib_compare -v $tempIndex2 $tempIndex1 2>$tempOut +status=$? +set -e +[ $status -ne 0 ] +cat $tempOut +grep -q "Indexes contained in the input files have different keys" $tempOut +rm -f $tempIndex1 $tempIndex2 $tempOut + +# Indexing with directory traversal +# ---------------------------------- +temp_dir_A=tempdir.$label +temp_dir_B=tempdir.$label/subdir.$label +rm -rf $temp_dir_A +mkdir $temp_dir_A +mkdir $temp_dir_B +cp ${data_dir}/tigge/tigge_rjtd_pl_*grib $temp_dir_A +cp ${data_dir}/tigge/tigge_rjtd_sfc_*grib $temp_dir_B + +${tools_dir}/grib_index_build -o $tempIndex1 $temp_dir_A +${tools_dir}/grib_dump $tempIndex1 + +rm -rf $temp_dir_A + + # ECC-1516 # --------- -sample1=$ECCODES_SAMPLES_PATH/GRIB1.tmpl ${tools_dir}/grib_index_build -N -o $tempIndex1 $sample1 > /dev/null ${tools_dir}/grib_dump $tempIndex1 >/dev/null diff --git a/tests/grib_lam_gp.cc b/tests/grib_lam_gp.cc index 38b2178ed..29b94a96c 100644 --- a/tests/grib_lam_gp.cc +++ b/tests/grib_lam_gp.cc @@ -908,7 +908,7 @@ int main(int argc, char* argv[]) GRIB_CHECK(grib_set_long(h, "minute", 0), 0); GRIB_CHECK(grib_set_long(h, "second", 0), 0); len = strlen("s"); - GRIB_CHECK(grib_set_string(h, "indicatorOfUnitOfTimeRange", "s", &len), 0); + GRIB_CHECK(grib_set_string(h, "indicatorOfUnitForForecastTime", "s", &len), 0); len = strlen("s"); GRIB_CHECK(grib_set_string(h, "stepUnits", "s", &len), 0); GRIB_CHECK(grib_set_long(h, "endStep", 3600), 0); diff --git a/tests/grib_step.sh b/tests/grib_step.sh index 308a60170..ca101b3d5 100755 --- a/tests/grib_step.sh +++ b/tests/grib_step.sh @@ -101,7 +101,7 @@ ${tools_dir}/grib_set -s indicatorOfUnitOfTimeRange=m $grib1_sample $temp unit=`${tools_dir}/grib_get -p unitOfTimeRange $temp` [ "$unit" = "0" ] ${tools_dir}/grib_set -s indicatorOfUnitOfTimeRange=m $grib2_sample $temp -unit=`${tools_dir}/grib_get -p indicatorOfUnitOfTimeRange $temp` +unit=`${tools_dir}/grib_get -p indicatorOfUnitForForecastTime $temp` [ "$unit" = "0" ] # ECC-457 @@ -206,6 +206,21 @@ result=$(${tools_dir}/grib_get -w count=1 -p step -s stepUnits=D $input) result=$(${tools_dir}/grib_get -w count=1 -p step -s stepUnits=m $input) [ $result = 5760 ] +# GRIB1 stepRange and timeRangeIndicator=10 +# ----------------------------------------- +input=${data_dir}/reduced_latlon_surface.grib1 +grib_check_key_equals $input timeRangeIndicator,P1,P2 '10 0 0' +ECCODES_GRIBEX_MODE_ON=1 ${tools_dir}/grib_set -s stepRange=11-12 $input $temp +grib_check_key_equals $temp P1,P2 '0 11' + +set +e +${tools_dir}/grib_set -s stepRange=11-12 $input $temp 2>$templog +status=$? +set -e +[ $status -ne 0 ] +grep -q "Unable to set stepRange" $templog + + # Clean up rm -f $temp $templog rm -f $grib2File.p8tmp ${grib2File}.tmp x.grib diff --git a/tests/grib_to_netcdf.sh b/tests/grib_to_netcdf.sh index e83f9a620..c07dc89e9 100755 --- a/tests/grib_to_netcdf.sh +++ b/tests/grib_to_netcdf.sh @@ -148,6 +148,16 @@ set -e [ $status -ne 0 ] grep -q "Wrong number of fields" $tempText +# Not regular grid +input=${data_dir}/reduced_gaussian_pressure_level.grib2 +set +e +${tools_dir}/grib_to_netcdf -o $tempNetcdf $input > $tempText 2>&1 +status=$? +set -e +[ $status -ne 0 ] +grep -q "not on a regular lat/lon grid or on a regular Gaussian grid" $tempText + + export GRIB_TO_NETCDF_CHECKVALIDTIME=0 ${tools_dir}/grib_to_netcdf -o $tempNetcdf $tempGrib [ -f "$tempNetcdf" ] diff --git a/tests/gts_get.sh b/tests/gts_get.sh index b633e55c7..0bea9b259 100755 --- a/tests/gts_get.sh +++ b/tests/gts_get.sh @@ -13,14 +13,11 @@ #Enter data dir cd ${data_dir}/gts -#Define a common label for all the tmp files label="gts_get_test" -#Create log file fLog=${label}".log" rm -f $fLog -#Define tmp file fTmp=${label}".tmp.txt" #---------------------------------------------- @@ -29,4 +26,26 @@ fTmp=${label}".tmp.txt" gts_file=EGRR20150317121020_00493212.DAT ${tools_dir}/gts_get -p TT,AA,II,CCCC,YY,GG,gg,BBB $gts_file >/dev/null -rm -f $fLog +gts_file=${data_dir}/gts.grib +result=$( ${tools_dir}/grib_get -wcount=1 -p gts_CCCC -g $gts_file ) +[ "$result" = "ECMG" ] + +${tools_dir}/grib_get -wcount=1 -p gts_header -g $gts_file + +# Encoding should be disabled +# ----------------------------- +set +e +${tools_dir}/grib_set -s gts_CCCC=xxx -g $gts_file $fTmp +status=$? +set -e +[ $status -ne 0 ] + +set +e +${tools_dir}/grib_set -s gts_header=yyy -g $gts_file $fTmp +status=$? +set -e +[ $status -ne 0 ] + + +# Clean up +rm -f $fLog $fTmp diff --git a/tests/gts_ls.sh b/tests/gts_ls.sh index 3de662f3e..ca6fbf29e 100755 --- a/tests/gts_ls.sh +++ b/tests/gts_ls.sh @@ -52,5 +52,10 @@ echo 'print "[theMessage]";' | ${tools_dir}/gts_filter - $gts_file ${tools_dir}/gts_ls -wcount=1 -p theMessage $f + +gts_file=${data_dir}/gts.grib +result=$( ${tools_dir}/grib_ls -wcount=1 -p gts_CCCC -g $gts_file ) + + # Clean up rm -f $fLog $res_ls diff --git a/tests/metar_get.sh b/tests/metar_get.sh index 181461526..25613ce04 100755 --- a/tests/metar_get.sh +++ b/tests/metar_get.sh @@ -35,4 +35,9 @@ export METAR_MONTH=4 ${tools_dir}/metar_get -n ls $metar_file >/dev/null ${tools_dir}/metar_get -w count=1/2/3 -p CCCC,latitude,longitude,dateTime,elevation,temperature,dewPointTemperature,qnh $metar_file +# Decode a 'group' key as int and double +result=$( ${tools_dir}/metar_get -p visibilityInMetres:i,visibilityInMetres:d -w count=1 $metar_file ) +[ "$result" = "6000 6000" ] + +# Clean up rm -f $fLog diff --git a/tools/bufr_compare.cc b/tools/bufr_compare.cc index 94da7ba2a..268d7ac8e 100644 --- a/tools/bufr_compare.cc +++ b/tools/bufr_compare.cc @@ -34,7 +34,8 @@ grib_option grib_options[] = { { "I", 0, 0, 1, 0, 0 }, { "V", 0, 0, 0, 1, 0 }, { "7", 0, 0, 0, 1, 0 }, - { "v", 0, 0, 0, 1, 0 } + { "v", 0, 0, 0, 1, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; int grib_options_count = sizeof(grib_options) / sizeof(grib_option); diff --git a/tools/bufr_copy.cc b/tools/bufr_copy.cc index af1bc712c..c4c8cbf8d 100644 --- a/tools/bufr_copy.cc +++ b/tools/bufr_copy.cc @@ -44,7 +44,8 @@ grib_option grib_options[] = { { "g", 0, 0, 0, 1, 0 }, { "7", 0, 0, 0, 1, 0 }, { "X:", 0, 0, 0, 1, 0 }, - { "v", 0, 0, 0, 1, 0 } + { "v", 0, 0, 0, 1, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; int grib_options_count = sizeof(grib_options) / sizeof(grib_option); diff --git a/tools/bufr_dump.cc b/tools/bufr_dump.cc index 60265b085..ed5fe88b8 100644 --- a/tools/bufr_dump.cc +++ b/tools/bufr_dump.cc @@ -53,7 +53,8 @@ grib_option grib_options[] = { { "V", 0, 0, 0, 1, 0 }, { "q", 0, 0, 1, 0, 0 }, { "S:", "subset_number", "\n\t\tDump the given subset\n", 0, 1, 0 }, - { "X:", 0, 0, 0, 1, 0 } + { "X:", 0, 0, 0, 1, 0 }, + { "h", 0, 0, 0, 1, 0 }, /* {"x",0,0,0,1,0} */ }; diff --git a/tools/bufr_filter.cc b/tools/bufr_filter.cc index bee0fe2da..fbabc7a76 100644 --- a/tools/bufr_filter.cc +++ b/tools/bufr_filter.cc @@ -23,7 +23,8 @@ grib_option grib_options[] = { /* {"G",0,0,0,1,0}, */ { "T:", 0, 0, 1, 0, "B" }, { "7", 0, 0, 0, 1, 0 }, - { "v", 0, 0, 0, 1, 0 } + { "v", 0, 0, 0, 1, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; const char* tool_description = "Apply the rules defined in rules_file to each BUFR " diff --git a/tools/bufr_get.cc b/tools/bufr_get.cc index 57664a7ce..ba76afca7 100644 --- a/tools/bufr_get.cc +++ b/tools/bufr_get.cc @@ -27,7 +27,8 @@ grib_option grib_options[] = { /* {"G",0,0,0,1,0}, */ { "T:", 0, 0, 1, 0, "B" }, { "7", 0, 0, 0, 1, 0 }, - { "v", 0, 0, 1, 0, 0 } + { "v", 0, 0, 1, 0, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; const char* tool_description = diff --git a/tools/bufr_index_build.cc b/tools/bufr_index_build.cc index 12dcf7bf5..ac29bd6b7 100644 --- a/tools/bufr_index_build.cc +++ b/tools/bufr_index_build.cc @@ -34,7 +34,8 @@ grib_option grib_options[] = { { "N", 0, "Do not compress index." "\n\t\tBy default the index is compressed to remove keys with only one value.\n", - 0, 1, 0 } + 0, 1, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; static int compress_index; diff --git a/tools/bufr_ls.cc b/tools/bufr_ls.cc index f86319e22..4537cc666 100644 --- a/tools/bufr_ls.cc +++ b/tools/bufr_ls.cc @@ -30,7 +30,8 @@ grib_option grib_options[] = { { "P", 0, 0, 1, 0, 0 }, { "T:", 0, 0, 1, 0, "B" }, { "7", 0, 0, 0, 1, 0 }, - { "v", 0, 0, 1, 0, 0 } + { "v", 0, 0, 1, 0, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; const char* tool_description = diff --git a/tools/bufr_set.cc b/tools/bufr_set.cc index 38c41dd1b..40c51547b 100644 --- a/tools/bufr_set.cc +++ b/tools/bufr_set.cc @@ -35,7 +35,8 @@ grib_option grib_options[] = { /* {"G",0,0,0,1,0}, */ { "T:", 0, 0, 1, 0, "B" }, { "f", 0, 0, 0, 1, 0 }, - { "v", 0, 0, 0, 1, 0 } + { "v", 0, 0, 0, 1, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; const char* tool_description = diff --git a/tools/grib_compare.cc b/tools/grib_compare.cc index 800c3eca6..a538f2a8c 100644 --- a/tools/grib_compare.cc +++ b/tools/grib_compare.cc @@ -34,7 +34,8 @@ grib_option grib_options[] = { { "I", 0, 0, 1, 0, 0 }, { "V", 0, 0, 0, 1, 0 }, { "7", 0, 0, 0, 1, 0 }, - { "v", 0, 0, 0, 1, 0 } + { "v", 0, 0, 0, 1, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; int grib_options_count = sizeof(grib_options) / sizeof(grib_option); diff --git a/tools/grib_copy.cc b/tools/grib_copy.cc index ccc4c690a..349a32259 100644 --- a/tools/grib_copy.cc +++ b/tools/grib_copy.cc @@ -48,7 +48,8 @@ grib_option grib_options[] = { { "G", 0, 0, 0, 1, 0 }, { "7", 0, 0, 0, 1, 0 }, { "X:", 0, 0, 0, 1, 0 }, - { "v", 0, 0, 0, 1, 0 } + { "v", 0, 0, 0, 1, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; int grib_options_count = sizeof(grib_options) / sizeof(grib_option); diff --git a/tools/grib_dump.cc b/tools/grib_dump.cc index f61c6597e..c7e0c02d9 100644 --- a/tools/grib_dump.cc +++ b/tools/grib_dump.cc @@ -31,7 +31,8 @@ grib_option grib_options[] = { { "p:", "key1,key2,...", "\n\t\tDeclaration of keys to dump. Only those keys are dumped (not the whole message).\n", 0, 1, 0 }, { "X:", 0, 0, 0, 1, 0 }, - { "x", 0, 0, 0, 1, 0 } + { "x", 0, 0, 0, 1, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; const char* tool_description = "Dump the content of a GRIB file in different formats."; diff --git a/tools/grib_filter.cc b/tools/grib_filter.cc index 8ed7ff296..019fc48c8 100644 --- a/tools/grib_filter.cc +++ b/tools/grib_filter.cc @@ -24,7 +24,8 @@ grib_option grib_options[] = { { "G", 0, 0, 0, 1, 0 }, { "T:", 0, 0, 0, 1, 0 }, { "7", 0, 0, 0, 1, 0 }, - { "v", 0, 0, 0, 1, 0 } + { "v", 0, 0, 0, 1, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; const char* tool_description = "Apply the rules defined in rules_file to each GRIB " diff --git a/tools/grib_get.cc b/tools/grib_get.cc index 12acb78da..6251c436f 100644 --- a/tools/grib_get.cc +++ b/tools/grib_get.cc @@ -32,7 +32,8 @@ grib_option grib_options[] = { { "7", 0, 0, 0, 1, 0 }, { "v", 0, 0, 1, 0, 0 }, { "X:", 0, 0, 0, 1, 0 }, - { "i:", 0, 0, 0, 1, 0 } + { "i:", 0, 0, 0, 1, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; const char* tool_description = diff --git a/tools/grib_get_data.cc b/tools/grib_get_data.cc index 83b87421d..54185ac61 100644 --- a/tools/grib_get_data.cc +++ b/tools/grib_get_data.cc @@ -31,7 +31,8 @@ grib_option grib_options[] = { { "G", 0, 0, 0, 1, 0 }, { "7", 0, 0, 0, 1, 0 }, { "X:", 0, 0, 0, 1, 0 }, - { "V", 0, 0, 0, 1, 0 } + { "V", 0, 0, 0, 1, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; const char* tool_description = diff --git a/tools/grib_histogram.cc b/tools/grib_histogram.cc index a41105c74..789cdcc26 100644 --- a/tools/grib_histogram.cc +++ b/tools/grib_histogram.cc @@ -15,7 +15,8 @@ grib_option grib_options[] = { { "V", 0, 0, 0, 1, 0 }, { "p:", 0, 0, 0, 1, 0 }, /* print keys */ { "S", 0, 0, 1, 0, 0 }, /* needed for skip */ - { "w:", 0, 0, 0, 1, 0 } /* 'where' clause */ + { "w:", 0, 0, 0, 1, 0 }, /* 'where' clause */ + { "h", 0, 0, 0, 1, 0 }, }; int grib_options_count = sizeof(grib_options) / sizeof(grib_option); diff --git a/tools/grib_index_build.cc b/tools/grib_index_build.cc index 5d1d16915..6e933da2b 100644 --- a/tools/grib_index_build.cc +++ b/tools/grib_index_build.cc @@ -33,7 +33,8 @@ grib_option grib_options[] = { { "N", 0, "Do not compress index." "\n\t\tBy default the index is compressed to remove keys with only one value.\n", - 0, 1, 0 } + 0, 1, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; static int compress_index; diff --git a/tools/grib_ls.cc b/tools/grib_ls.cc index 0193b3e17..2be9333e4 100644 --- a/tools/grib_ls.cc +++ b/tools/grib_ls.cc @@ -35,7 +35,8 @@ grib_option grib_options[] = { { "7", 0, 0, 0, 1, 0 }, { "v", 0, 0, 1, 0, 0 }, { "X:", 0, 0, 0, 1, 0 }, - { "x", 0, 0, 0, 1, 0 } + { "x", 0, 0, 0, 1, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; const char* tool_description = diff --git a/tools/grib_merge.cc b/tools/grib_merge.cc index 8e18e54ea..7848935ff 100644 --- a/tools/grib_merge.cc +++ b/tools/grib_merge.cc @@ -56,7 +56,8 @@ grib_option grib_options[] = { { "g", 0, 0, 0, 1, 0 }, { "G", 0, 0, 0, 1, 0 }, { "7", 0, 0, 0, 1, 0 }, - { "v", 0, 0, 0, 1, 0 } + { "v", 0, 0, 0, 1, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; int grib_options_count = sizeof(grib_options) / sizeof(grib_option); diff --git a/tools/grib_options.cc b/tools/grib_options.cc index 475f22fdf..3d792ca4e 100644 --- a/tools/grib_options.cc +++ b/tools/grib_options.cc @@ -106,8 +106,8 @@ static grib_options_help grib_options_help_list[] = { { "k:", "key1,key2,...", "\n\t\tSpecify a list of keys to index on. By default the input files are indexed on the MARS keys." "\n\t\tFor each key a string (key:s) or a double (key:d) or an integer (key:i)" - "\n\t\ttype can be requested.\n" } - + "\n\t\ttype can be requested.\n" }, + { "h", 0, "Display this help text and exit.\n" } }; static int grib_options_help_count = sizeof(grib_options_help_list) / sizeof(grib_options_help); @@ -198,6 +198,10 @@ int grib_process_runtime_options(grib_context* context, int argc, char** argv, g int has_input_extra = 0, nfiles = 0; char *karg = NULL, *warg = NULL, *sarg = NULL, *barg = NULL; + if (grib_options_on("h")) { + usage(); + } + if (grib_options_on("V")) { printf("\necCodes Version "); grib_print_api_version(stdout); diff --git a/tools/grib_set.cc b/tools/grib_set.cc index 13adcde65..537eb8a9f 100644 --- a/tools/grib_set.cc +++ b/tools/grib_set.cc @@ -39,7 +39,8 @@ grib_option grib_options[] = { { "G", 0, 0, 0, 1, 0 }, { "T:", 0, 0, 0, 1, 0 }, { "f", 0, 0, 0, 1, 0 }, - { "v", 0, 0, 0, 1, 0 } + { "v", 0, 0, 0, 1, 0 }, + { "h", 0, 0, 0, 1, 0 }, }; const char* tool_description = diff --git a/tools/grib_to_netcdf.cc b/tools/grib_to_netcdf.cc index fec300970..b46145123 100644 --- a/tools/grib_to_netcdf.cc +++ b/tools/grib_to_netcdf.cc @@ -1317,8 +1317,9 @@ static int axisindex(const char* name) { size_t i = 0; for (i = 0; i < NUMBER(global_axis); i++) { - if (strcmp(name, global_axis[i].name) == 0) - return i; + if (STR_EQUAL(name, global_axis[i].name)){ + return (int)i; + } } return -1; } @@ -1335,7 +1336,7 @@ static namecmp comparator(const char* name) } if (dontcompare != NULL) { - if (strcmp(dontcompare, name) == 0) + if (STR_EQUAL(dontcompare, name)) return eq_null; } @@ -1434,7 +1435,7 @@ static void unset_value(request* r, const char* parname) p = r->params; while (p) { - if (strcmp(parname, p->name) == 0) { + if (STR_EQUAL(parname, p->name)) { if (q) q->next = p->next; else @@ -1624,7 +1625,7 @@ static void cube_indexes( int k = 0; int count = count_values(cube, axis); int last = h->index_cache[i]; - const bool is_time_axis = (strcmp(axis, "time") == 0); + const bool is_time_axis = (STR_EQUAL(axis, "time")); if (is_time_axis) { Assert(times_array); Assert(times_array_size == count); @@ -1956,9 +1957,9 @@ static long monthnumber(const char* m) static int check_stepUnits(const char* step_units_str) { /* Only hours, minutes and seconds supported */ - if (strcmp(step_units_str, "h") == 0 || - strcmp(step_units_str, "m") == 0 || - strcmp(step_units_str, "s") == 0) { + if (STR_EQUAL(step_units_str, "h") || + STR_EQUAL(step_units_str, "m") || + STR_EQUAL(step_units_str, "s")) { return GRIB_SUCCESS; } return GRIB_WRONG_STEP_UNIT; @@ -2051,10 +2052,10 @@ static void validation_time(request* r) grib_context_log(ctx, GRIB_LOG_ERROR, "Cannot convert stepUnits of '%s'. Only hours, minutes and seconds supported.", step_units); } - if (strcmp("m", step_units) == 0) { + if (STR_EQUAL("m", step_units)) { step /= 60; } - else if (strcmp("s", step_units) == 0) { + else if (STR_EQUAL("s", step_units)) { step /= 3600; } } @@ -2121,19 +2122,19 @@ static nc_type translate_nctype(const char* name) if (!name) return NC_SHORT; - if (strcmp(name, "NC_BYTE") == 0) + if (STR_EQUAL(name, "NC_BYTE")) return NC_BYTE; - if (strcmp(name, "NC_SHORT") == 0) + if (STR_EQUAL(name, "NC_SHORT")) return NC_SHORT; - if (strcmp(name, "NC_INT") == 0) + if (STR_EQUAL(name, "NC_INT")) return NC_INT; - if (strcmp(name, "NC_FLOAT") == 0) + if (STR_EQUAL(name, "NC_FLOAT")) return NC_FLOAT; - if (strcmp(name, "NC_DOUBLE") == 0) + if (STR_EQUAL(name, "NC_DOUBLE")) return NC_DOUBLE; grib_context_log(ctx, GRIB_LOG_ERROR, "Unknown netCDF type '%s'. Using NC_SHORT", name); @@ -2163,7 +2164,7 @@ static int set_dimension(int ncid, const char* name, int n, int xtype, const cha int dim_id = DIM_ID; int dim_vec[DIM_ID]; - if (setup.unlimited && (strcmp(name, setup.unlimited) == 0)) + if ( setup.unlimited && (STR_EQUAL(name, setup.unlimited)) ) n = NC_UNLIMITED; stat = nc_def_dim(ncid, name, n, &dim_id); @@ -2197,7 +2198,7 @@ static int check_grid(field* f) return e; } - if (strcmp(grid_type, "regular_ll") != 0 && (strcmp(grid_type, "regular_gg") != 0)) { + if ( !STR_EQUAL(grid_type, "regular_ll") && !STR_EQUAL(grid_type, "regular_gg") ) { grib_context_log(ctx, GRIB_LOG_ERROR, "Grid type = %s", grid_type); grib_context_log(ctx, GRIB_LOG_ERROR, "First GRIB is not on a regular lat/lon grid or on a regular Gaussian grid. Exiting.\n"); return GRIB_GEOCALCULUS_PROBLEM; @@ -3935,7 +3936,8 @@ grib_option grib_options[] = { "\n\t\tChunking strategy based on GRIB message.\n", 0, 1, "6" }, { "s", 0, "Shuffle data before deflation compression.\n", 0, 1, 0 }, - { "u:", "dimension", "\n\t\tSet dimension to be an unlimited dimension.\n", 0, 1, "time" } + { "u:", "dimension", "\n\t\tSet dimension to be an unlimited dimension.\n", 0, 1, "time" }, + { "h", 0, 0, 0, 1, 0 }, }; int grib_options_count = sizeof(grib_options) / sizeof(grib_option); diff --git a/tools/grib_tools.cc b/tools/grib_tools.cc index ce038d07f..b039c8d0d 100644 --- a/tools/grib_tools.cc +++ b/tools/grib_tools.cc @@ -511,17 +511,17 @@ static int grib_tool_index(grib_runtime_options* options) k2 = k2->next; } if (!found) { - printf("Indexes contained in the input files have different keys\n"); - printf("keys in file %s:\n", f1); + fprintf(stderr, "Indexes contained in the input files have different keys!\n"); + fprintf(stderr, "keys in file %s:\n", f1); k1 = options->index1->keys; while (k1) { - printf("\t%s\n", k1->name); + fprintf(stderr, "\t%s\n", k1->name); k1 = k1->next; } - printf("keys in file %s:\n", f2); + fprintf(stderr, "keys in file %s:\n", f2); k2 = options->index2->keys; while (k2) { - printf("\t%s\n", k2->name); + fprintf(stderr, "\t%s\n", k2->name); k2 = k2->next; } exit(1); @@ -543,17 +543,17 @@ static int grib_tool_index(grib_runtime_options* options) k1 = k1->next; } if (!found) { - printf("Indexes contained in the input files have different keys\n"); - printf("keys in file %s:\n", f2); + fprintf(stderr,"Indexes contained in the input files have different keys!\n"); + fprintf(stderr, "keys in file %s:\n", f2); k2 = options->index2->keys; while (k2) { - printf("\t%s\n", k2->name); + fprintf(stderr, "\t%s\n", k2->name); k2 = k2->next; } - printf("keys in file %s:\n", f1); + fprintf(stderr, "keys in file %s:\n", f1); k1 = options->index1->keys; while (k1) { - printf("\t%s\n", k1->name); + fprintf(stderr, "\t%s\n", k1->name); k1 = k1->next; } @@ -1079,7 +1079,7 @@ void grib_print_key_values(grib_runtime_options* options, grib_handle* h) int strlenvalue = 0; double dvalue = 0; long lvalue = 0; - char value[MAX_STRING_LEN]; + char value[MAX_STRING_LEN] = {0,}; const char* notfound = "not_found"; int written_to_dump = 0; /* boolean */ grib_accessor* acc = NULL;