Move common code into single place (Tigge, S2S and Uerra)

This commit is contained in:
Shahram Najm 2016-01-18 17:22:44 +00:00
parent e074e069c1
commit 0bcd6672b4
9 changed files with 331 additions and 592 deletions

View File

@ -9,95 +9,4 @@
# Tigge
constant marsExpver = 'prod';
constant marsClass = 'ti';
constant marsModel = 'glob';
alias is_tigge = one;
alias tigge_short_name=shortName;
alias short_name=shortName;
alias parameter=paramId;
alias tigge_name=name;
alias parameter.paramId=paramId;
alias parameter.shortName=shortName;
alias parameter.units=units;
alias parameter.name=name;
if(levtype is "sfc")
{
unalias mars.levelist;
}
alias mars.expver = marsExpver;
alias mars.class = marsClass;
alias mars.param = paramId;
alias mars.model = marsModel;
alias mars.origin = centre;
# Tigge-LAM rules
# productionStatusOfProcessedData == 4
if (section2Used == 1) {
constant marsLamModel = 'lam';
alias mars.model = marsLamModel; # model redefined. It is not 'glob'
alias mars.origin = tiggeSuiteID; # origin is the suiteName for Tigge-LAM
unalias mars.domain; # No mars domain needed
}
concept marsType {
fc = {
typeOfProcessedData = 2;
}
"9" = {
typeOfProcessedData = 2;
}
cf = {
typeOfProcessedData = 3;
}
"10" = {
typeOfProcessedData = 3;
}
pf = {
typeOfProcessedData = 4;
}
"11" = {
typeOfProcessedData = 4;
}
"default" = {
dummyc = 0;
}
}
# See GRIB-205 re no_copy
concept marsStream {
oper = {
typeOfProcessedData = 0;
}
oper = {
typeOfProcessedData = 2;
}
enfo = {
typeOfProcessedData = 3;
}
enfo = {
typeOfProcessedData = 4;
}
enfo = {
typeOfProcessedData = 8;
}
"default" = {
dummyc = 0;
}
} : no_copy;
alias mars.stream = marsStream;
alias mars.type = marsType;
include "grib2/products_tigge.def"

View File

@ -9,95 +9,4 @@
# Tigge
constant marsExpver = 'test';
constant marsClass = 'ti';
constant marsModel = 'glob';
alias is_tigge = one;
alias tigge_short_name=shortName;
alias short_name=shortName;
alias parameter=paramId;
alias tigge_name=name;
alias parameter.paramId=paramId;
alias parameter.shortName=shortName;
alias parameter.units=units;
alias parameter.name=name;
if(levtype is "sfc")
{
unalias mars.levelist;
}
alias mars.expver = marsExpver;
alias mars.class = marsClass;
alias mars.param = paramId;
alias mars.model = marsModel;
alias mars.origin = centre;
# Tigge-LAM rules
# productionStatusOfProcessedData == 5
if (section2Used == 1) {
constant marsLamModel = 'lam';
alias mars.model = marsLamModel; # model redefined. It is not 'glob'
alias mars.origin = tiggeSuiteID; # origin is the suiteName for Tigge-LAM
unalias mars.domain; # No mars domain needed
}
concept marsType {
fc = {
typeOfProcessedData = 2;
}
"9" = {
typeOfProcessedData = 2;
}
cf = {
typeOfProcessedData = 3;
}
"10" = {
typeOfProcessedData = 3;
}
pf = {
typeOfProcessedData = 4;
}
"11" = {
typeOfProcessedData = 4;
}
"default" = {
dummyc = 0;
}
}
# See GRIB-205 re no_copy
concept marsStream {
oper = {
typeOfProcessedData = 0;
}
oper = {
typeOfProcessedData = 2;
}
enfo = {
typeOfProcessedData = 3;
}
enfo = {
typeOfProcessedData = 4;
}
enfo = {
typeOfProcessedData = 8;
}
"default" = {
dummyc = 0;
}
} : no_copy;
alias mars.stream = marsStream;
alias mars.type = marsType;
include "grib2/products_tigge.def"

View File

@ -9,99 +9,4 @@
# S2S
constant marsExpver = 'prod';
constant marsClass = 's2';
constant marsModel = 'glob';
alias is_s2s = one;
alias parameter.paramId=paramId;
alias parameter.shortName=shortName;
alias parameter.units=units;
alias parameter.name=name;
alias mars.expver = marsExpver;
alias mars.class = marsClass;
alias mars.param = paramId;
alias mars.model = marsModel;
# See GRIB-761. For Italy, subCentre 102 is ISAC-CNR
if (centre is "cnmc" && subCentre == 102) {
constant cnmc_isac = 'isac';
alias mars.origin = cnmc_isac;
} else {
alias mars.origin = centre;
}
unalias mars.domain;
concept marsType {
fc = {
typeOfProcessedData = 2;
}
"9" = {
typeOfProcessedData = 2;
}
cf = {
typeOfProcessedData = 3;
}
"10" = {
typeOfProcessedData = 3;
}
pf = {
typeOfProcessedData = 4;
}
"11" = {
typeOfProcessedData = 4;
}
"default" = {
dummyc = 0;
}
}
# See GRIB-205 re no_copy
concept marsStream {
oper = {
typeOfProcessedData = 0;
}
oper = {
typeOfProcessedData = 2;
}
enfo = {
typeOfProcessedData = 3;
}
enfo = {
typeOfProcessedData = 4;
}
enfo = {
typeOfProcessedData = 8;
}
"default" = {
dummyc = 0;
}
} : no_copy;
alias mars.stream = marsStream;
alias mars.type = marsType;
# Normally MARS step is endStep but for monthly means we want stepRange
if (stepType is "avg") {
alias mars.step = stepRange;
}
if (isHindcast == 1) {
# S2S reforecasts
constant theHindcastMarsStream = "enfh";
alias mars.stream = theHindcastMarsStream;
alias mars.hdate = dataDate;
alias mars.date = modelVersionDate;
alias mars.time = modelVersionTime;
}
include "grib2/products_s2s.def"

View File

@ -9,99 +9,4 @@
# S2S test
constant marsExpver = 'test';
constant marsClass = 's2';
constant marsModel = 'glob';
alias is_s2s = one;
alias parameter.paramId=paramId;
alias parameter.shortName=shortName;
alias parameter.units=units;
alias parameter.name=name;
alias mars.expver = marsExpver;
alias mars.class = marsClass;
alias mars.param = paramId;
alias mars.model = marsModel;
# See GRIB-761. For Italy, subCentre 102 is ISAC-CNR
if (centre is "cnmc" && subCentre == 102) {
constant cnmc_isac = 'isac';
alias mars.origin = cnmc_isac;
} else {
alias mars.origin = centre;
}
unalias mars.domain;
concept marsType {
fc = {
typeOfProcessedData = 2;
}
"9" = {
typeOfProcessedData = 2;
}
cf = {
typeOfProcessedData = 3;
}
"10" = {
typeOfProcessedData = 3;
}
pf = {
typeOfProcessedData = 4;
}
"11" = {
typeOfProcessedData = 4;
}
"default" = {
dummyc = 0;
}
}
# See GRIB-205 re no_copy
concept marsStream {
oper = {
typeOfProcessedData = 0;
}
oper = {
typeOfProcessedData = 2;
}
enfo = {
typeOfProcessedData = 3;
}
enfo = {
typeOfProcessedData = 4;
}
enfo = {
typeOfProcessedData = 8;
}
"default" = {
dummyc = 0;
}
} : no_copy;
alias mars.stream = marsStream;
alias mars.type = marsType;
# Normally MARS step is endStep but for monthly means we want stepRange
if (stepType is "avg") {
alias mars.step = stepRange;
}
if (isHindcast == 1) {
# S2S reforecasts
constant theHindcastMarsStream = "enfh";
alias mars.stream = theHindcastMarsStream;
alias mars.hdate = dataDate;
alias mars.date = modelVersionDate;
alias mars.time = modelVersionTime;
}
include "grib2/products_s2s.def"

View File

@ -9,111 +9,4 @@
# Uncertainties in ensembles of regional re-analysis project (UERRA)
constant marsExpver = 'prod';
constant marsClass = 'ur';
#alias is_tigge = one;
alias tigge_short_name=shortName;
alias short_name=shortName;
alias parameter=paramId;
alias tigge_name=name;
alias parameter.paramId=paramId;
alias parameter.shortName=shortName;
alias parameter.units=units;
alias parameter.name=name;
if(levtype is "sfc")
{
unalias mars.levelist;
}
# Special UERRA rule for level type 103 'Specified height level above ground (m)'
if(typeOfFirstFixedSurface == 103) {
# Exclude the parameters: 10u, 10v and 2t
if (paramId != 165 &&
paramId != 166 &&
paramId != 167)
{
constant heightLevelName = 'hl';
alias mars.levtype = heightLevelName;
}
}
alias mars.expver = marsExpver;
alias mars.class = marsClass;
alias mars.param = paramId;
alias mars.origin = centre;
# Tigge-LAM rules
if (section2Used == 1) {
constant marsLamModel = 'lam';
alias mars.model = marsLamModel; # model redefined. It is not 'glob'
alias mars.origin = tiggeSuiteID; # origin is the suiteName for Tigge-LAM
unalias mars.domain; # No mars domain needed
}
concept marsType {
fc = {
typeOfProcessedData = 2;
}
"9" = {
typeOfProcessedData = 2;
}
cf = {
typeOfProcessedData = 3;
}
"10" = {
typeOfProcessedData = 3;
}
pf = {
typeOfProcessedData = 4;
}
"11" = {
typeOfProcessedData = 4;
}
an = {
typeOfProcessedData = 0;
}
"2" = {
typeOfProcessedData = 0;
}
"default" = {
dummyc = 0;
}
}
# See GRIB-205 re no_copy
concept marsStream {
oper = {
typeOfProcessedData = 0;
}
oper = {
typeOfProcessedData = 2;
}
enfo = {
typeOfProcessedData = 3;
}
enfo = {
typeOfProcessedData = 4;
}
enfo = {
typeOfProcessedData = 8;
}
"default" = {
dummyc = 0;
}
} : no_copy;
alias mars.stream = marsStream;
alias mars.type = marsType;
include "grib2/products_uerra.def"

View File

@ -9,111 +9,4 @@
# Uncertainties in ensembles of regional re-analysis project test (UERRA)
constant marsExpver = 'test';
constant marsClass = 'ur';
#alias is_tigge = one;
alias tigge_short_name=shortName;
alias short_name=shortName;
alias parameter=paramId;
alias tigge_name=name;
alias parameter.paramId=paramId;
alias parameter.shortName=shortName;
alias parameter.units=units;
alias parameter.name=name;
if(levtype is "sfc")
{
unalias mars.levelist;
}
# Special UERRA rule for level type 103 'Specified height level above ground (m)'
if(typeOfFirstFixedSurface == 103) {
# Exclude the parameters: 10u, 10v and 2t
if (paramId != 165 &&
paramId != 166 &&
paramId != 167)
{
constant heightLevelName = 'hl';
alias mars.levtype = heightLevelName;
}
}
alias mars.expver = marsExpver;
alias mars.class = marsClass;
alias mars.param = paramId;
alias mars.origin = centre;
# Tigge-LAM rules
if (section2Used == 1) {
constant marsLamModel = 'lam';
alias mars.model = marsLamModel; # model redefined. It is not 'glob'
alias mars.origin = tiggeSuiteID; # origin is the suiteName for Tigge-LAM
unalias mars.domain; # No mars domain needed
}
concept marsType {
fc = {
typeOfProcessedData = 2;
}
"9" = {
typeOfProcessedData = 2;
}
cf = {
typeOfProcessedData = 3;
}
"10" = {
typeOfProcessedData = 3;
}
pf = {
typeOfProcessedData = 4;
}
"11" = {
typeOfProcessedData = 4;
}
an = {
typeOfProcessedData = 0;
}
"2" = {
typeOfProcessedData = 0;
}
"default" = {
dummyc = 0;
}
}
# See GRIB-205 re no_copy
concept marsStream {
oper = {
typeOfProcessedData = 0;
}
oper = {
typeOfProcessedData = 2;
}
enfo = {
typeOfProcessedData = 3;
}
enfo = {
typeOfProcessedData = 4;
}
enfo = {
typeOfProcessedData = 8;
}
"default" = {
dummyc = 0;
}
} : no_copy;
alias mars.stream = marsStream;
alias mars.type = marsType;
include "grib2/products_uerra.def"

View File

@ -0,0 +1,106 @@
# Copyright 2005-2016 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.
#
# S2S
constant marsClass = 's2';
constant marsModel = 'glob';
alias is_s2s = one;
alias parameter.paramId=paramId;
alias parameter.shortName=shortName;
alias parameter.units=units;
alias parameter.name=name;
alias mars.expver = marsExpver;
alias mars.class = marsClass;
alias mars.param = paramId;
alias mars.model = marsModel;
# See GRIB-761. For Italy, subCentre 102 is ISAC-CNR
if (centre is "cnmc" && subCentre == 102) {
constant cnmc_isac = 'isac';
alias mars.origin = cnmc_isac;
} else {
alias mars.origin = centre;
}
unalias mars.domain;
concept marsType {
fc = {
typeOfProcessedData = 2;
}
"9" = {
typeOfProcessedData = 2;
}
cf = {
typeOfProcessedData = 3;
}
"10" = {
typeOfProcessedData = 3;
}
pf = {
typeOfProcessedData = 4;
}
"11" = {
typeOfProcessedData = 4;
}
"default" = {
dummyc = 0;
}
}
# See GRIB-205 re no_copy
concept marsStream {
oper = {
typeOfProcessedData = 0;
}
oper = {
typeOfProcessedData = 2;
}
enfo = {
typeOfProcessedData = 3;
}
enfo = {
typeOfProcessedData = 4;
}
enfo = {
typeOfProcessedData = 8;
}
"default" = {
dummyc = 0;
}
} : no_copy;
alias mars.stream = marsStream;
alias mars.type = marsType;
# Normally MARS step is endStep but for monthly means we want stepRange
if (stepType is "avg") {
alias mars.step = stepRange;
}
if (isHindcast == 1) {
# S2S reforecasts
constant theHindcastMarsStream = "enfh";
alias mars.stream = theHindcastMarsStream;
alias mars.hdate = dataDate;
alias mars.date = modelVersionDate;
alias mars.time = modelVersionTime;
}

View File

@ -0,0 +1,102 @@
# Copyright 2005-2016 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.
#
# Tigge
constant marsClass = 'ti';
constant marsModel = 'glob';
alias is_tigge = one;
alias tigge_short_name=shortName;
alias short_name=shortName;
alias parameter=paramId;
alias tigge_name=name;
alias parameter.paramId=paramId;
alias parameter.shortName=shortName;
alias parameter.units=units;
alias parameter.name=name;
if(levtype is "sfc")
{
unalias mars.levelist;
}
alias mars.expver = marsExpver;
alias mars.class = marsClass;
alias mars.param = paramId;
alias mars.model = marsModel;
alias mars.origin = centre;
# Tigge-LAM rules
# productionStatusOfProcessedData == 4
if (section2Used == 1) {
constant marsLamModel = 'lam';
alias mars.model = marsLamModel; # model redefined. It is not 'glob'
alias mars.origin = tiggeSuiteID; # origin is the suiteName for Tigge-LAM
unalias mars.domain; # No mars domain needed
}
concept marsType {
fc = {
typeOfProcessedData = 2;
}
"9" = {
typeOfProcessedData = 2;
}
cf = {
typeOfProcessedData = 3;
}
"10" = {
typeOfProcessedData = 3;
}
pf = {
typeOfProcessedData = 4;
}
"11" = {
typeOfProcessedData = 4;
}
"default" = {
dummyc = 0;
}
}
# See GRIB-205 re no_copy
concept marsStream {
oper = {
typeOfProcessedData = 0;
}
oper = {
typeOfProcessedData = 2;
}
enfo = {
typeOfProcessedData = 3;
}
enfo = {
typeOfProcessedData = 4;
}
enfo = {
typeOfProcessedData = 8;
}
"default" = {
dummyc = 0;
}
} : no_copy;
alias mars.stream = marsStream;
alias mars.type = marsType;

View File

@ -0,0 +1,117 @@
# Copyright 2005-2016 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.
#
# Uncertainties in ensembles of regional re-analysis project (UERRA)
constant marsClass = 'ur';
alias tigge_short_name=shortName;
alias short_name=shortName;
alias parameter=paramId;
alias tigge_name=name;
alias parameter.paramId=paramId;
alias parameter.shortName=shortName;
alias parameter.units=units;
alias parameter.name=name;
if(levtype is "sfc")
{
unalias mars.levelist;
}
# Special UERRA rule for level type 103 'Specified height level above ground (m)'
if(typeOfFirstFixedSurface == 103) {
# Exclude the parameters: 10u, 10v and 2t
if (paramId != 165 &&
paramId != 166 &&
paramId != 167)
{
constant heightLevelName = 'hl';
alias mars.levtype = heightLevelName;
}
}
alias mars.expver = marsExpver;
alias mars.class = marsClass;
alias mars.param = paramId;
alias mars.origin = centre;
# Tigge-LAM rules
if (section2Used == 1) {
constant marsLamModel = 'lam';
alias mars.model = marsLamModel; # model redefined. It is not 'glob'
alias mars.origin = tiggeSuiteID; # origin is the suiteName for Tigge-LAM
unalias mars.domain; # No mars domain needed
}
concept marsType {
fc = {
typeOfProcessedData = 2;
}
"9" = {
typeOfProcessedData = 2;
}
cf = {
typeOfProcessedData = 3;
}
"10" = {
typeOfProcessedData = 3;
}
pf = {
typeOfProcessedData = 4;
}
"11" = {
typeOfProcessedData = 4;
}
an = {
typeOfProcessedData = 0;
}
"2" = {
typeOfProcessedData = 0;
}
"default" = {
dummyc = 0;
}
}
# See GRIB-205 re no_copy
concept marsStream {
oper = {
typeOfProcessedData = 0;
}
oper = {
typeOfProcessedData = 2;
}
enfo = {
typeOfProcessedData = 3;
}
enfo = {
typeOfProcessedData = 4;
}
enfo = {
typeOfProcessedData = 8;
}
"default" = {
dummyc = 0;
}
} : no_copy;
alias mars.stream = marsStream;
alias mars.type = marsType;