diff --git a/definitions/grib2/grib2LocalSectionNumber.98.table b/definitions/grib2/grib2LocalSectionNumber.98.table index cd2de3ec6..2c3f15543 100644 --- a/definitions/grib2/grib2LocalSectionNumber.98.table +++ b/definitions/grib2/grib2LocalSectionNumber.98.table @@ -18,5 +18,6 @@ 36 36 MARS labelling for long window 4DVar system 38 38 4D variational increments for long window 4DVar system 39 39 4DVar model errors for long window 4Dvar system +42 42 Lead Centre for Wave Forecast Verification 192 192 Multiple ECMWF local definitions 300 300 Multi-dimensional parameters diff --git a/definitions/grib2/lcwfv_suiteName.table b/definitions/grib2/lcwfv_suiteName.table new file mode 100644 index 000000000..287854c85 --- /dev/null +++ b/definitions/grib2/lcwfv_suiteName.table @@ -0,0 +1,14 @@ +# LC-WFV table of suite names +0 unknown Unknown +1 ecmf-wam-glob Wave Model run on HRES-WAM global domain by ECMWF +2 ecmf-saw-glob Wave Model run on HRES-SAW global domain by ECMWF +3 fnmo-wavewatch-glob Wave Watch model run on global domain by FNMOC +4 edzw-wam-gwam WAM model run on global domain by DWD +5 edzw-wam-ewam WAM model run on EWAM domain by DWD +6 edzw-wam-cwam WAM model run on CWAM domain by DWD +7 rjtd-mri3-glob MRI-III model run on global domain by JMA +8 sabm-wavewatch-glob Wave Watch model run on global domain by SHN/SMN +9 sabm-wavewatch-aus Wave Watch model run on Austral domain by SHN/SMN +10 sabm-wavewatch-plat Wave Watch model run on Plataforma domain by SHN/SMN +11 sabm-wavewatch-lit Wave Watch model run on Litoral domain by SHN/SMN +12 sabm-wavewatch-pam Wave Watch model run on Pampa domain by SHN/SMN diff --git a/definitions/grib2/local.98.42.def b/definitions/grib2/local.98.42.def new file mode 100644 index 000000000..a555a0dd3 --- /dev/null +++ b/definitions/grib2/local.98.42.def @@ -0,0 +1,13 @@ +# Copyright 2005-2018 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. +# + +# Definition 42 - WMO Lead Centre for Wave Forecast Verification (LC-WFV) + +codetable[2] lcwfvSuiteName "grib2/lcwfv_suiteName.table" : dump; +alias mars.origin = lcwfvSuiteName; diff --git a/definitions/mars/grib.wave.an.def b/definitions/mars/grib.wave.an.def index 46a39ac0c..4bb19de43 100644 --- a/definitions/mars/grib.wave.an.def +++ b/definitions/mars/grib.wave.an.def @@ -1,3 +1,8 @@ transient conceptDir = "mars"; concept waveDomain(unknown,"wave_domain.def",conceptDir,conceptDir) : no_copy,read_only; alias mars.domain = waveDomain; + +# ECC-570 +if (class is "lw") { + unalias mars.domain; +} diff --git a/definitions/mars/grib.wave.fc.def b/definitions/mars/grib.wave.fc.def index 46a39ac0c..4bb19de43 100644 --- a/definitions/mars/grib.wave.fc.def +++ b/definitions/mars/grib.wave.fc.def @@ -1,3 +1,8 @@ transient conceptDir = "mars"; concept waveDomain(unknown,"wave_domain.def",conceptDir,conceptDir) : no_copy,read_only; alias mars.domain = waveDomain; + +# ECC-570 +if (class is "lw") { + unalias mars.domain; +} diff --git a/src/grib_accessor_class_local_definition.c b/src/grib_accessor_class_local_definition.c index 8f984d626..432e5982b 100644 --- a/src/grib_accessor_class_local_definition.c +++ b/src/grib_accessor_class_local_definition.c @@ -226,6 +226,7 @@ static int pack_long(grib_accessor* a, const long* val, size_t *len) case 1: /* MARS labelling */ case 36: /* MARS labelling for long window 4Dvar system */ case 40: /* MARS labeling with domain and model (for LAM) */ + case 42: /* LC-WFV: Wave forecast verification */ if (isInstant) { /* type=em || type=es */ if (type==17) { diff --git a/tests/grib_local.sh b/tests/grib_local.sh index 11e1eaae2..83538f2e5 100755 --- a/tests/grib_local.sh +++ b/tests/grib_local.sh @@ -106,4 +106,9 @@ grib_check_key_equals $temp.3 edition,productDefinitionTemplateNumber "2 5" grib_check_key_equals $temp.3 forecastProbabilityNumber,totalNumberOfForecastProbabilities "2 25" grib_check_key_equals $temp.3 probabilityType,scaledValueOfLowerLimit,scaledValueOfUpperLimit "2 54 56" +# Local Definition 42 for GRIB2 (LC-WFV) +# --------------------------------------- +${tools_dir}/grib_set -s setLocalDefinition=1,localDefinitionNumber=42,lcwfvSuiteName=1 $sample_g2 $temp +grib_check_key_equals $temp 'mars.origin:s' 'ecmf-wam-glob' + rm -f $temp $temp.1 $temp.2 $temp.3