From 03db509ea59dc44994b31b9625cf15dbc763a08b Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 27 Aug 2013 15:56:56 +0100 Subject: [PATCH] S2S: Updated for mars stream and date --- definitions/grib2/products_6.def | 47 ++++++++++++--------- definitions/grib2/products_7.def | 11 ++++- definitions/grib2/template.4.reforecast.def | 8 ++++ 3 files changed, 46 insertions(+), 20 deletions(-) diff --git a/definitions/grib2/products_6.def b/definitions/grib2/products_6.def index effd7211f..a332d84ce 100644 --- a/definitions/grib2/products_6.def +++ b/definitions/grib2/products_6.def @@ -48,31 +48,40 @@ concept marsType { concept marsStream { - oper = { - typeOfProcessedData = 0; - } + oper = { + typeOfProcessedData = 0; + } - oper = { - typeOfProcessedData = 2; - } + oper = { + typeOfProcessedData = 2; + } - enfo = { - typeOfProcessedData = 3; - } + enfo = { + typeOfProcessedData = 3; + } - enfo = { - typeOfProcessedData = 4; - } + enfo = { + typeOfProcessedData = 4; + } - enfo = { - typeOfProcessedData = 8; - } - - "default" = { - dummyc = 0; - } + enfo = { + typeOfProcessedData = 8; + } + "default" = { + dummyc = 0; + } } alias mars.stream = marsStream; alias mars.type = marsType; + +if (isHindcast == 1) { + # S2S reforecasts + constant theHindcastMarsStream = "enfh"; + alias mars.stream = theHindcastMarsStream; + alias mars.hdate = dataDate; + alias mars.date = dateOfModelVersion; + alias mars.time = timeOfModelVersion; +} + diff --git a/definitions/grib2/products_7.def b/definitions/grib2/products_7.def index cb710da53..51ac03a8e 100644 --- a/definitions/grib2/products_7.def +++ b/definitions/grib2/products_7.def @@ -71,8 +71,17 @@ concept marsStream { "default" = { dummyc = 0; } - } alias mars.stream = marsStream; alias mars.type = marsType; + +if (isHindcast == 1) { + # S2S reforecasts + constant theHindcastMarsStream = "enfh"; + alias mars.stream = theHindcastMarsStream; + alias mars.hdate = dataDate; + alias mars.date = dateOfModelVersion; + alias mars.time = timeOfModelVersion; +} + diff --git a/definitions/grib2/template.4.reforecast.def b/definitions/grib2/template.4.reforecast.def index fb3e37a0a..12b19594a 100644 --- a/definitions/grib2/template.4.reforecast.def +++ b/definitions/grib2/template.4.reforecast.def @@ -1,8 +1,16 @@ label "S2S reforecasts"; +# The Model Version Date +# This is the date when the reforecast is produced with a particular version of the model + unsigned[2] YearOfModelVersion = 0: edition_specific; unsigned[1] MonthOfModelVersion = 0: edition_specific; unsigned[1] DayOfModelVersion = 0: edition_specific; unsigned[1] HourOfModelVersion = 0: edition_specific; unsigned[1] MinuteOfModelVersion = 0: edition_specific; unsigned[1] SecondOfModelVersion = 0: edition_specific; + +meta dateOfModelVersion g2date(YearOfModelVersion,MonthOfModelVersion,DayOfModelVersion) : dump; +meta timeOfModelVersion time(HourOfModelVersion, MinuteOfModelVersion, SecondOfModelVersion) : dump; + +constant isHindcast = 1;