From 453122aee8e81d6232a2fb65d6353cc7b50fc2ad Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 23 Apr 2024 16:35:52 +0000 Subject: [PATCH] ECC-1810: GRIB: Surface sea water velocity encodings --- .../grib1/localConcepts/ecmf/cfName.def | 4 ++-- .../grib1/localConcepts/ecmf/cfVarName.def | 4 ++-- definitions/grib1/localConcepts/ecmf/name.def | 8 ++++---- .../grib1/localConcepts/ecmf/paramId.def | 4 ++-- .../grib1/localConcepts/ecmf/shortName.def | 4 ++-- definitions/grib1/localConcepts/ecmf/units.def | 4 ++-- definitions/grib2/cfName.def | 14 -------------- definitions/grib2/cfVarName.def | 14 -------------- definitions/grib2/localConcepts/s2s/cfName.def | 16 ++++++++++++++++ .../grib2/localConcepts/s2s/cfVarName.def | 16 ++++++++++++++++ definitions/grib2/localConcepts/s2s/name.def | 16 ++++++++++++++++ .../grib2/localConcepts/s2s/paramId.def | 16 ++++++++++++++++ .../grib2/localConcepts/s2s/shortName.def | 16 ++++++++++++++++ definitions/grib2/localConcepts/s2s/units.def | 16 ++++++++++++++++ definitions/grib2/name.def | 14 -------------- definitions/grib2/paramId.def | 14 -------------- definitions/grib2/shortName.def | 14 -------------- definitions/grib2/units.def | 14 -------------- definitions/param_limits.def | 2 ++ tests/grib_data_quality_checks.sh | 18 +----------------- 20 files changed, 113 insertions(+), 115 deletions(-) diff --git a/definitions/grib1/localConcepts/ecmf/cfName.def b/definitions/grib1/localConcepts/ecmf/cfName.def index 48b023899..f1377da79 100644 --- a/definitions/grib1/localConcepts/ecmf/cfName.def +++ b/definitions/grib1/localConcepts/ecmf/cfName.def @@ -909,12 +909,12 @@ table2Version = 151 ; indicatorOfParameter = 130 ; } -#Eastward sea water velocity +#Eastward surface sea water velocity 'eastward_sea_water_velocity' = { table2Version = 151 ; indicatorOfParameter = 131 ; } -#Northward sea water velocity +#Northward surface sea water velocity 'northward_sea_water_velocity' = { table2Version = 151 ; indicatorOfParameter = 132 ; diff --git a/definitions/grib1/localConcepts/ecmf/cfVarName.def b/definitions/grib1/localConcepts/ecmf/cfVarName.def index f1e0a847a..e3d757597 100644 --- a/definitions/grib1/localConcepts/ecmf/cfVarName.def +++ b/definitions/grib1/localConcepts/ecmf/cfVarName.def @@ -13024,12 +13024,12 @@ table2Version = 151 ; indicatorOfParameter = 130 ; } -#Eastward sea water velocity +#Eastward surface sea water velocity 'uoe' = { table2Version = 151 ; indicatorOfParameter = 131 ; } -#Northward sea water velocity +#Northward surface sea water velocity 'von' = { table2Version = 151 ; indicatorOfParameter = 132 ; diff --git a/definitions/grib1/localConcepts/ecmf/name.def b/definitions/grib1/localConcepts/ecmf/name.def index 822393940..77d5535a7 100644 --- a/definitions/grib1/localConcepts/ecmf/name.def +++ b/definitions/grib1/localConcepts/ecmf/name.def @@ -13024,13 +13024,13 @@ table2Version = 151 ; indicatorOfParameter = 130 ; } -#Eastward sea water velocity -'Eastward sea water velocity' = { +#Eastward surface sea water velocity +'Eastward surface sea water velocity' = { table2Version = 151 ; indicatorOfParameter = 131 ; } -#Northward sea water velocity -'Northward sea water velocity' = { +#Northward surface sea water velocity +'Northward surface sea water velocity' = { table2Version = 151 ; indicatorOfParameter = 132 ; } diff --git a/definitions/grib1/localConcepts/ecmf/paramId.def b/definitions/grib1/localConcepts/ecmf/paramId.def index d70774a03..0ea5b7ea3 100644 --- a/definitions/grib1/localConcepts/ecmf/paramId.def +++ b/definitions/grib1/localConcepts/ecmf/paramId.def @@ -13024,12 +13024,12 @@ table2Version = 151 ; indicatorOfParameter = 130 ; } -#Eastward sea water velocity +#Eastward surface sea water velocity '151131' = { table2Version = 151 ; indicatorOfParameter = 131 ; } -#Northward sea water velocity +#Northward surface sea water velocity '151132' = { table2Version = 151 ; indicatorOfParameter = 132 ; diff --git a/definitions/grib1/localConcepts/ecmf/shortName.def b/definitions/grib1/localConcepts/ecmf/shortName.def index 456286de5..4eb5e6f67 100644 --- a/definitions/grib1/localConcepts/ecmf/shortName.def +++ b/definitions/grib1/localConcepts/ecmf/shortName.def @@ -13024,12 +13024,12 @@ table2Version = 151 ; indicatorOfParameter = 130 ; } -#Eastward sea water velocity +#Eastward surface sea water velocity 'ocu' = { table2Version = 151 ; indicatorOfParameter = 131 ; } -#Northward sea water velocity +#Northward surface sea water velocity 'ocv' = { table2Version = 151 ; indicatorOfParameter = 132 ; diff --git a/definitions/grib1/localConcepts/ecmf/units.def b/definitions/grib1/localConcepts/ecmf/units.def index 799ca28a7..193a0e3c6 100644 --- a/definitions/grib1/localConcepts/ecmf/units.def +++ b/definitions/grib1/localConcepts/ecmf/units.def @@ -13024,12 +13024,12 @@ table2Version = 151 ; indicatorOfParameter = 130 ; } -#Eastward sea water velocity +#Eastward surface sea water velocity 'm s**-1' = { table2Version = 151 ; indicatorOfParameter = 131 ; } -#Northward sea water velocity +#Northward surface sea water velocity 'm s**-1' = { table2Version = 151 ; indicatorOfParameter = 132 ; diff --git a/definitions/grib2/cfName.def b/definitions/grib2/cfName.def index 3ff5e57ac..a3105477e 100644 --- a/definitions/grib2/cfName.def +++ b/definitions/grib2/cfName.def @@ -343,20 +343,6 @@ parameterCategory = 1 ; parameterNumber = 10 ; } -#Eastward sea water velocity -'eastward_sea_water_velocity' = { - discipline = 10 ; - parameterCategory = 1 ; - parameterNumber = 2 ; - typeOfFirstFixedSurface = 160 ; - } -#Northward sea water velocity -'northward_sea_water_velocity' = { - discipline = 10 ; - parameterCategory = 1 ; - parameterNumber = 3 ; - typeOfFirstFixedSurface = 160 ; - } #Nitrogen dioxide mass mixing ratio 'mass_fraction_of_nitrogen_dioxide_in_air' = { discipline = 0 ; diff --git a/definitions/grib2/cfVarName.def b/definitions/grib2/cfVarName.def index 510e4b2af..12861730d 100644 --- a/definitions/grib2/cfVarName.def +++ b/definitions/grib2/cfVarName.def @@ -10565,20 +10565,6 @@ parameterCategory = 0 ; parameterNumber = 44 ; } -#Eastward sea water velocity -'uoe' = { - discipline = 10 ; - parameterCategory = 1 ; - parameterNumber = 2 ; - typeOfFirstFixedSurface = 160 ; - } -#Northward sea water velocity -'von' = { - discipline = 10 ; - parameterCategory = 1 ; - parameterNumber = 3 ; - typeOfFirstFixedSurface = 160 ; - } #Skin reservoir content 'srcrea' = { discipline = 2 ; diff --git a/definitions/grib2/localConcepts/s2s/cfName.def b/definitions/grib2/localConcepts/s2s/cfName.def index bcf3dbc72..76e473557 100644 --- a/definitions/grib2/localConcepts/s2s/cfName.def +++ b/definitions/grib2/localConcepts/s2s/cfName.def @@ -56,6 +56,22 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } +#Eastward surface sea water velocity +'eastward_sea_water_velocity' = { + discipline = 10 ; + parameterCategory = 1 ; + parameterNumber = 2 ; + typeOfFirstFixedSurface = 160 ; + typeOfStatisticalProcessing = 0 ; + } +#Northward surface sea water velocity +'northward_sea_water_velocity' = { + discipline = 10 ; + parameterCategory = 1 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 160 ; + typeOfStatisticalProcessing = 0 ; + } #Sea surface height 'sea_surface_height_above_geoid' = { discipline = 10 ; diff --git a/definitions/grib2/localConcepts/s2s/cfVarName.def b/definitions/grib2/localConcepts/s2s/cfVarName.def index 3839fd01a..551609168 100644 --- a/definitions/grib2/localConcepts/s2s/cfVarName.def +++ b/definitions/grib2/localConcepts/s2s/cfVarName.def @@ -173,6 +173,22 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } +#Eastward surface sea water velocity +'ocu' = { + discipline = 10 ; + parameterCategory = 1 ; + parameterNumber = 2 ; + typeOfFirstFixedSurface = 160 ; + typeOfStatisticalProcessing = 0 ; + } +#Northward surface sea water velocity +'ocv' = { + discipline = 10 ; + parameterCategory = 1 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 160 ; + typeOfStatisticalProcessing = 0 ; + } #Sea surface height 'zos' = { discipline = 10 ; diff --git a/definitions/grib2/localConcepts/s2s/name.def b/definitions/grib2/localConcepts/s2s/name.def index 8705ee5a4..cf970208c 100644 --- a/definitions/grib2/localConcepts/s2s/name.def +++ b/definitions/grib2/localConcepts/s2s/name.def @@ -173,6 +173,22 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } +#Eastward surface sea water velocity +'Eastward surface sea water velocity' = { + discipline = 10 ; + parameterCategory = 1 ; + parameterNumber = 2 ; + typeOfFirstFixedSurface = 160 ; + typeOfStatisticalProcessing = 0 ; + } +#Northward surface sea water velocity +'Northward surface sea water velocity' = { + discipline = 10 ; + parameterCategory = 1 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 160 ; + typeOfStatisticalProcessing = 0 ; + } #Sea surface height 'Sea surface height' = { discipline = 10 ; diff --git a/definitions/grib2/localConcepts/s2s/paramId.def b/definitions/grib2/localConcepts/s2s/paramId.def index 89416c6bb..bfc1c9ee1 100644 --- a/definitions/grib2/localConcepts/s2s/paramId.def +++ b/definitions/grib2/localConcepts/s2s/paramId.def @@ -173,6 +173,22 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } +#Eastward surface sea water velocity +'151131' = { + discipline = 10 ; + parameterCategory = 1 ; + parameterNumber = 2 ; + typeOfFirstFixedSurface = 160 ; + typeOfStatisticalProcessing = 0 ; + } +#Northward surface sea water velocity +'151132' = { + discipline = 10 ; + parameterCategory = 1 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 160 ; + typeOfStatisticalProcessing = 0 ; + } #Sea surface height '151145' = { discipline = 10 ; diff --git a/definitions/grib2/localConcepts/s2s/shortName.def b/definitions/grib2/localConcepts/s2s/shortName.def index 232411ae6..135b5992a 100644 --- a/definitions/grib2/localConcepts/s2s/shortName.def +++ b/definitions/grib2/localConcepts/s2s/shortName.def @@ -173,6 +173,22 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } +#Eastward surface sea water velocity +'ocu' = { + discipline = 10 ; + parameterCategory = 1 ; + parameterNumber = 2 ; + typeOfFirstFixedSurface = 160 ; + typeOfStatisticalProcessing = 0 ; + } +#Northward surface sea water velocity +'ocv' = { + discipline = 10 ; + parameterCategory = 1 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 160 ; + typeOfStatisticalProcessing = 0 ; + } #Sea surface height 'zos' = { discipline = 10 ; diff --git a/definitions/grib2/localConcepts/s2s/units.def b/definitions/grib2/localConcepts/s2s/units.def index e1b6ecd4e..a37997b56 100644 --- a/definitions/grib2/localConcepts/s2s/units.def +++ b/definitions/grib2/localConcepts/s2s/units.def @@ -173,6 +173,22 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } +#Eastward surface sea water velocity +'m s**-1' = { + discipline = 10 ; + parameterCategory = 1 ; + parameterNumber = 2 ; + typeOfFirstFixedSurface = 160 ; + typeOfStatisticalProcessing = 0 ; + } +#Northward surface sea water velocity +'m s**-1' = { + discipline = 10 ; + parameterCategory = 1 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 160 ; + typeOfStatisticalProcessing = 0 ; + } #Sea surface height 'm' = { discipline = 10 ; diff --git a/definitions/grib2/name.def b/definitions/grib2/name.def index 1a0196347..c849348ab 100644 --- a/definitions/grib2/name.def +++ b/definitions/grib2/name.def @@ -10565,20 +10565,6 @@ parameterCategory = 0 ; parameterNumber = 44 ; } -#Eastward sea water velocity -'Eastward sea water velocity' = { - discipline = 10 ; - parameterCategory = 1 ; - parameterNumber = 2 ; - typeOfFirstFixedSurface = 160 ; - } -#Northward sea water velocity -'Northward sea water velocity' = { - discipline = 10 ; - parameterCategory = 1 ; - parameterNumber = 3 ; - typeOfFirstFixedSurface = 160 ; - } #Skin reservoir content 'Skin reservoir content' = { discipline = 2 ; diff --git a/definitions/grib2/paramId.def b/definitions/grib2/paramId.def index 55cc9a44e..5e9b0a30c 100644 --- a/definitions/grib2/paramId.def +++ b/definitions/grib2/paramId.def @@ -10565,20 +10565,6 @@ parameterCategory = 0 ; parameterNumber = 44 ; } -#Eastward sea water velocity -'151131' = { - discipline = 10 ; - parameterCategory = 1 ; - parameterNumber = 2 ; - typeOfFirstFixedSurface = 160 ; - } -#Northward sea water velocity -'151132' = { - discipline = 10 ; - parameterCategory = 1 ; - parameterNumber = 3 ; - typeOfFirstFixedSurface = 160 ; - } #Skin reservoir content '160198' = { discipline = 2 ; diff --git a/definitions/grib2/shortName.def b/definitions/grib2/shortName.def index b855a6063..08c54e9f9 100644 --- a/definitions/grib2/shortName.def +++ b/definitions/grib2/shortName.def @@ -10565,20 +10565,6 @@ parameterCategory = 0 ; parameterNumber = 44 ; } -#Eastward sea water velocity -'ocu' = { - discipline = 10 ; - parameterCategory = 1 ; - parameterNumber = 2 ; - typeOfFirstFixedSurface = 160 ; - } -#Northward sea water velocity -'ocv' = { - discipline = 10 ; - parameterCategory = 1 ; - parameterNumber = 3 ; - typeOfFirstFixedSurface = 160 ; - } #Skin reservoir content 'srcrea' = { discipline = 2 ; diff --git a/definitions/grib2/units.def b/definitions/grib2/units.def index ab472b684..7966dd8f0 100644 --- a/definitions/grib2/units.def +++ b/definitions/grib2/units.def @@ -10565,20 +10565,6 @@ parameterCategory = 0 ; parameterNumber = 44 ; } -#Eastward sea water velocity -'m s**-1' = { - discipline = 10 ; - parameterCategory = 1 ; - parameterNumber = 2 ; - typeOfFirstFixedSurface = 160 ; - } -#Northward sea water velocity -'m s**-1' = { - discipline = 10 ; - parameterCategory = 1 ; - parameterNumber = 3 ; - typeOfFirstFixedSurface = 160 ; - } #Skin reservoir content 'kg m**-2' = { discipline = 2 ; diff --git a/definitions/param_limits.def b/definitions/param_limits.def index 1bbcd18d6..215cbfec0 100644 --- a/definitions/param_limits.def +++ b/definitions/param_limits.def @@ -18,6 +18,7 @@ concept param_value_min(default_min_val) { -60000 = { paramId=228001; } 0 = { paramId=151163; } -3.5 = { paramId=151131; } + -3.5 = { paramId=262140; } -10 = { paramId=260259; } -13000 = { paramId=129; } -1300 = { paramId=156; } @@ -103,6 +104,7 @@ concept param_value_max(default_max_val) { 1000 = { paramId=228001; } 1500 = { paramId=151163; } 3.5 = { paramId=151131; } + 3.5 = { paramId=262140; } 5 = { paramId=260259; } 3500000 = { paramId=129; } 35000 = { paramId=156; } diff --git a/tests/grib_data_quality_checks.sh b/tests/grib_data_quality_checks.sh index bf2fc77b2..6462a8662 100755 --- a/tests/grib_data_quality_checks.sh +++ b/tests/grib_data_quality_checks.sh @@ -88,15 +88,10 @@ grep -q 'allowable limit' $tempErr echo "Test limits which are doubles..." # ------------------------------------- -pid=151131 # has limits -3.5 and +3.5 -${tools_dir}/grib_set -s paramId=$pid $input1 $tempGrib1 +pid=262140 # has limits -3.5 and +3.5 ${tools_dir}/grib_set -s paramId=$pid $input2 $tempGrib2 -minval1=`${tools_dir}/grib_get -p param_value_min:d $tempGrib1` -maxval1=`${tools_dir}/grib_get -p param_value_max:d $tempGrib1` minval2=`${tools_dir}/grib_get -p param_value_min:d $tempGrib2` maxval2=`${tools_dir}/grib_get -p param_value_max:d $tempGrib2` -[ "$minval1" = "-3.5" ] -[ "$maxval1" = "3.5" ] [ "$minval2" = "-3.5" ] [ "$maxval2" = "3.5" ] @@ -104,16 +99,12 @@ maxval2=`${tools_dir}/grib_get -p param_value_max:d $tempGrib2` grib_check_key_equals $tempGrib2 'param_value_min:s,param_value_max:s' '-3.5 3.5' set +e -${tools_dir}/grib_set -s scaleValuesBy=1.1 $tempGrib1 $tempOut 2>$tempErr -stat1=$? ${tools_dir}/grib_set -s scaleValuesBy=1.1 $tempGrib2 $tempOut 2>$tempErr stat2=$? set -e -[ $stat1 -ne 0 ] [ $stat2 -ne 0 ] # Should succeed. Change paramId first and then scale all values down -${tools_dir}/grib_set -s paramId=$pid,scaleValuesBy=0.01 $input1 $tempOut ${tools_dir}/grib_set -s paramId=$pid,scaleValuesBy=0.01 $input2 $tempOut echo "Test close to the limit..." @@ -126,13 +117,6 @@ ${tools_dir}/grib_set -s scaleValuesBy=3.6 $tempGrib2 $tempOut set -e [ $status -ne 0 ] -${tools_dir}/grib_set -s edition=1 $tempGrib2 $tempGrib1 -${tools_dir}/grib_set -s scaleValuesBy=-3 $tempGrib1 $tempOut # OK -set +e -${tools_dir}/grib_set -s scaleValuesBy=-3.55 $tempGrib1 $tempOut -set -e -[ $status -ne 0 ] - echo "Test limits with steps..." # -----------------------------