diff --git a/definitions/mars/grib.dacl.pb.def b/definitions/mars/grib.dacl.pb.def index 5ecc47b04..db9763909 100644 --- a/definitions/mars/grib.dacl.pb.def +++ b/definitions/mars/grib.dacl.pb.def @@ -1,4 +1,3 @@ -alias mars.step = stepRange; -meta marsQuantile sprintf("%d:%d",perturbationNumber,numberOfForecastsInEnsemble); -alias mars.quantile = marsQuantile; +alias mars.step = stepRange; +include "mars/mars.quantile.def" diff --git a/definitions/mars/grib.dacw.pb.def b/definitions/mars/grib.dacw.pb.def index 5ecc47b04..4144f1bc3 100644 --- a/definitions/mars/grib.dacw.pb.def +++ b/definitions/mars/grib.dacw.pb.def @@ -1,4 +1,4 @@ -alias mars.step = stepRange; -meta marsQuantile sprintf("%d:%d",perturbationNumber,numberOfForecastsInEnsemble); -alias mars.quantile = marsQuantile; +alias mars.step = stepRange; + +include "mars/mars.quantile.def" diff --git a/definitions/mars/grib.eefo.pb.def b/definitions/mars/grib.eefo.pb.def index 5ecc47b04..db9763909 100644 --- a/definitions/mars/grib.eefo.pb.def +++ b/definitions/mars/grib.eefo.pb.def @@ -1,4 +1,3 @@ -alias mars.step = stepRange; -meta marsQuantile sprintf("%d:%d",perturbationNumber,numberOfForecastsInEnsemble); -alias mars.quantile = marsQuantile; +alias mars.step = stepRange; +include "mars/mars.quantile.def" diff --git a/definitions/mars/grib.eefo.pd.def b/definitions/mars/grib.eefo.pd.def index a53d82ca0..db9763909 100644 --- a/definitions/mars/grib.eefo.pd.def +++ b/definitions/mars/grib.eefo.pd.def @@ -1,3 +1,3 @@ -alias mars.step = stepRange; -meta marsQuantile sprintf("%d:%d",perturbationNumber,numberOfForecastsInEnsemble); -alias mars.quantile = marsQuantile; +alias mars.step = stepRange; + +include "mars/mars.quantile.def" diff --git a/definitions/mars/grib.eehs.cd.def b/definitions/mars/grib.eehs.cd.def index 05e94a6f1..db9763909 100644 --- a/definitions/mars/grib.eehs.cd.def +++ b/definitions/mars/grib.eehs.cd.def @@ -1,3 +1,3 @@ -alias mars.step = stepRange; -alias mars.quantile = quantile; +alias mars.step = stepRange; +include "mars/mars.quantile.def" diff --git a/definitions/mars/grib.efhs.cd.def b/definitions/mars/grib.efhs.cd.def index 05e94a6f1..db9763909 100644 --- a/definitions/mars/grib.efhs.cd.def +++ b/definitions/mars/grib.efhs.cd.def @@ -1,3 +1,3 @@ -alias mars.step = stepRange; -alias mars.quantile = quantile; +alias mars.step = stepRange; +include "mars/mars.quantile.def" diff --git a/definitions/mars/grib.enfo.pb.def b/definitions/mars/grib.enfo.pb.def index 5ecc47b04..db9763909 100644 --- a/definitions/mars/grib.enfo.pb.def +++ b/definitions/mars/grib.enfo.pb.def @@ -1,4 +1,3 @@ -alias mars.step = stepRange; -meta marsQuantile sprintf("%d:%d",perturbationNumber,numberOfForecastsInEnsemble); -alias mars.quantile = marsQuantile; +alias mars.step = stepRange; +include "mars/mars.quantile.def" diff --git a/definitions/mars/grib.enfo.pd.def b/definitions/mars/grib.enfo.pd.def index a53d82ca0..db9763909 100644 --- a/definitions/mars/grib.enfo.pd.def +++ b/definitions/mars/grib.enfo.pd.def @@ -1,3 +1,3 @@ -alias mars.step = stepRange; -meta marsQuantile sprintf("%d:%d",perturbationNumber,numberOfForecastsInEnsemble); -alias mars.quantile = marsQuantile; +alias mars.step = stepRange; + +include "mars/mars.quantile.def" diff --git a/definitions/mars/grib.mfam.pb.def b/definitions/mars/grib.mfam.pb.def index 27df3cc1b..72b841ecc 100644 --- a/definitions/mars/grib.mfam.pb.def +++ b/definitions/mars/grib.mfam.pb.def @@ -3,8 +3,7 @@ alias mars.origin = centre; meta forecastperiod g1fcperiod(P1,P2,timeRangeIndicator,indicatorOfUnitOfTimeRange) : no_copy; alias mars.fcperiod = forecastperiod; -meta marsQuantile sprintf("%d:%d",perturbationNumber,numberOfForecastsInEnsemble); -alias mars.quantile = marsQuantile; +include "mars/mars.quantile.def" # TODO: Check why they are set in the first place unalias mars.step; diff --git a/definitions/mars/grib.mfam.pd.def b/definitions/mars/grib.mfam.pd.def index 96f272f62..cd37d34f6 100644 --- a/definitions/mars/grib.mfam.pd.def +++ b/definitions/mars/grib.mfam.pd.def @@ -3,8 +3,7 @@ alias mars.origin = centre; meta forecastperiod g1fcperiod(P1,P2,timeRangeIndicator,indicatorOfUnitOfTimeRange) : no_copy; alias mars.fcperiod = forecastperiod; -meta marsQuantile sprintf("%d:%d",perturbationNumber,numberOfForecastsInEnsemble); -alias mars.quantile = marsQuantile; +include "mars/mars.quantile.def" # TODO: Check why they are set in the first place unalias mars.step; diff --git a/definitions/mars/grib.wees.cd.def b/definitions/mars/grib.wees.cd.def index 05e94a6f1..db9763909 100644 --- a/definitions/mars/grib.wees.cd.def +++ b/definitions/mars/grib.wees.cd.def @@ -1,3 +1,3 @@ -alias mars.step = stepRange; -alias mars.quantile = quantile; +alias mars.step = stepRange; +include "mars/mars.quantile.def" diff --git a/definitions/mars/grib.wehs.cd.def b/definitions/mars/grib.wehs.cd.def index 05e94a6f1..db9763909 100644 --- a/definitions/mars/grib.wehs.cd.def +++ b/definitions/mars/grib.wehs.cd.def @@ -1,3 +1,3 @@ -alias mars.step = stepRange; -alias mars.quantile = quantile; +alias mars.step = stepRange; +include "mars/mars.quantile.def" diff --git a/definitions/mars/mars.quantile.def b/definitions/mars/mars.quantile.def new file mode 100644 index 000000000..60431fc38 --- /dev/null +++ b/definitions/mars/mars.quantile.def @@ -0,0 +1,17 @@ +if ((stream is "eehs" or stream is "efhs" or stream is "wees" or stream is "wehs") and (type is "cd")){ + if (edition == 1){ + # defined in local section 19 + alias mars.quantile = quantile; + } else { + meta marsQuantile sprintf("%d:%d",quantileValue,totalNumberOfQuantiles); + alias mars.quantile = marsQuantile; + } + } else { +if (edition == 1){ + meta marsQuantile sprintf("%d:%d",perturbationNumber,numberOfForecastsInEnsemble); + alias mars.quantile = marsQuantile; + } else { + meta marsQuantile sprintf("%d:%d",quantileValue,totalNumberOfQuantiles); + alias mars.quantile = marsQuantile; + } +}