Skip to content

Commit

Permalink
Definitions: Simplify IF statements
Browse files Browse the repository at this point in the history
  • Loading branch information
shahramn committed Sep 10, 2024
1 parent 15685f9 commit b74bc1e
Show file tree
Hide file tree
Showing 16 changed files with 49 additions and 55 deletions.
5 changes: 3 additions & 2 deletions definitions/mars/grib.mmam.fcmean.def
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ alias mars.fcmonth = marsForecastMonth;
unalias mars.step;

alias mars.method = methodNumber;
if (class is "od") { alias mars.system = systemNumber; }
if (class is "en") { alias mars.system = systemNumber; }
if (class is "od" || class is "en") {
alias mars.system = systemNumber;
}
7 changes: 3 additions & 4 deletions definitions/mars/grib.msmm.em.def
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ unalias mars.step;
alias mars.origin = centre;
alias mars.method = methodNumber;

if (class is "od") { alias mars.system = systemNumber; }
if (class is "me") { alias mars.system = systemNumber; }
if (class is "en") { alias mars.system = systemNumber; }
if (class is "c3") { alias mars.system = systemNumber; }
if (class is "od" || class is "me" || class is "en" || class is "c3") {
alias mars.system = systemNumber;
}

# See ECC-624
if (centre == 80 && subCentre == 98 && (class is "c3" || class is "ci")) {
Expand Down
7 changes: 3 additions & 4 deletions definitions/mars/grib.msmm.fcmax.def
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ alias mars.number = perturbationNumber;
alias mars.origin = centre;
alias mars.method = methodNumber;

if (class is "od") { alias mars.system = systemNumber; }
if (class is "me") { alias mars.system = systemNumber; }
if (class is "en") { alias mars.system = systemNumber; }
if (class is "c3") { alias mars.system = systemNumber; }
if (class is "od" || class is "me" || class is "en" || class is "c3") {
alias mars.system = systemNumber;
}

# See ECC-624
if (centre == 80 && subCentre == 98 && (class is "c3" || class is "ci")) {
Expand Down
8 changes: 3 additions & 5 deletions definitions/mars/grib.msmm.fcmean.def
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ alias mars.method = methodNumber;

unalias mars.step;

if (class is "od") { alias mars.system = systemNumber; }
if (class is "me") { alias mars.system = systemNumber; }
if (class is "en") { alias mars.system = systemNumber; }
if (class is "c3") { alias mars.system = systemNumber; }
if (class is "ci") { alias mars.system = systemNumber; }
if (class is "od" || class is "me" || class is "en" || class is "c3" || class is "ci") {
alias mars.system = systemNumber;
}

# See ECC-624
if (centre == 80 && subCentre == 98 && (class is "c3" || class is "ci")) {
Expand Down
8 changes: 3 additions & 5 deletions definitions/mars/grib.msmm.fcmin.def
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ alias mars.number = perturbationNumber;
alias mars.origin = centre;
alias mars.method = methodNumber;


if (class is "od") { alias mars.system = systemNumber; }
if (class is "me") { alias mars.system = systemNumber; }
if (class is "en") { alias mars.system = systemNumber; }
if (class is "c3") { alias mars.system = systemNumber; }
if (class is "od" || class is "me" || class is "en" || class is "c3") {
alias mars.system = systemNumber;
}

# See ECC-624
if (centre == 80 && subCentre == 98 && (class is "c3" || class is "ci")) {
Expand Down
7 changes: 3 additions & 4 deletions definitions/mars/grib.msmm.fcstdev.def
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ unalias mars.step;

alias mars.method = methodNumber;

if (class is "od") { alias mars.system = systemNumber; }
if (class is "me") { alias mars.system = systemNumber; }
if (class is "en") { alias mars.system = systemNumber; }
if (class is "c3") { alias mars.system = systemNumber; }
if (class is "od" || class is "me" || class is "en" || class is "c3") {
alias mars.system = systemNumber;
}

# See ECC-624
if (centre == 80 && subCentre == 98 && (class is "c3" || class is "ci")) {
Expand Down
7 changes: 3 additions & 4 deletions definitions/mars/grib.msmm.hcmean.def
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ unalias mars.step;
alias mars.origin = centre;
alias mars.method = methodNumber;

if (class is "od") { alias mars.system = systemNumber; }
if (class is "me") { alias mars.system = systemNumber; }
if (class is "en") { alias mars.system = systemNumber; }
if (class is "c3") { alias mars.system = systemNumber; }
if (class is "od" || class is "me" || class is "en" || class is "c3") {
alias mars.system = systemNumber;
}

# See ECC-624
if (centre == 80 && subCentre == 98 && (class is "c3" || class is "ci")) {
Expand Down
7 changes: 4 additions & 3 deletions definitions/mars/grib.ocea.an.def
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
alias mars.number = perturbationNumber;
alias mars.method = methodNumber;
if (class is "od") { alias mars.system = systemNumber; }
if (class is "me") { alias mars.system = systemNumber; }
if (class is "en") { alias mars.system = systemNumber; }

if (class is "od" || class is "me" || class is "en") {
alias mars.system = systemNumber;
}
6 changes: 3 additions & 3 deletions definitions/mars/grib.ocea.ff.def
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
alias mars.number = perturbationNumber;
alias mars.method = methodNumber;
if (class is "od") { alias mars.system = systemNumber; }
if (class is "me") { alias mars.system = systemNumber; }
if (class is "en") { alias mars.system = systemNumber; }
if (class is "od" || class is "me" || class is "en") {
alias mars.system = systemNumber;
}
6 changes: 3 additions & 3 deletions definitions/mars/grib.ocea.fx.def
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
alias mars.number = perturbationNumber;
alias mars.method = methodNumber;
if (class is "od") { alias mars.system = systemNumber; }
if (class is "me") { alias mars.system = systemNumber; }
if (class is "en") { alias mars.system = systemNumber; }
if (class is "od" || class is "me" || class is "en") {
alias mars.system = systemNumber;
}
6 changes: 3 additions & 3 deletions definitions/mars/grib.ocea.of.def
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
alias mars.number = perturbationNumber;
alias mars.method = methodNumber;
if (class is "od") { alias mars.system = systemNumber; }
if (class is "me") { alias mars.system = systemNumber; }
if (class is "en") { alias mars.system = systemNumber; }
if (class is "od" || class is "me" || class is "en") {
alias mars.system = systemNumber;
}
6 changes: 3 additions & 3 deletions definitions/mars/grib.ocea.or.def
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
alias mars.number = perturbationNumber;
alias mars.method = methodNumber;
if (class is "od") { alias mars.system = systemNumber; }
if (class is "me") { alias mars.system = systemNumber; }
if (class is "en") { alias mars.system = systemNumber; }
if (class is "od" || class is "me" || class is "en") {
alias mars.system = systemNumber;
}
6 changes: 3 additions & 3 deletions definitions/mars/grib.swmm.fcmax.def
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ alias mars.number = perturbationNumber;
unalias mars.step;

alias mars.method = methodNumber;
if (class is "od") { alias mars.system = systemNumber; }
if (class is "me") { alias mars.system = systemNumber; }
if (class is "en") { alias mars.system = systemNumber; }
if (class is "od" || class is "me" || class is "en") {
alias mars.system = systemNumber;
}
6 changes: 3 additions & 3 deletions definitions/mars/grib.swmm.fcmean.def
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ alias mars.number = perturbationNumber;
unalias mars.step;

alias mars.method = methodNumber;
if (class is "od") { alias mars.system = systemNumber; }
if (class is "me") { alias mars.system = systemNumber; }
if (class is "en") { alias mars.system = systemNumber; }
if (class is "od" || class is "me" || class is "en") {
alias mars.system = systemNumber;
}
6 changes: 3 additions & 3 deletions definitions/mars/grib.swmm.fcmin.def
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ alias mars.number = perturbationNumber;
unalias mars.step;

alias mars.method = methodNumber;
if (class is "od") { alias mars.system = systemNumber; }
if (class is "me") { alias mars.system = systemNumber; }
if (class is "en") { alias mars.system = systemNumber; }
if (class is "od" || class is "me" || class is "en") {
alias mars.system = systemNumber;
}
6 changes: 3 additions & 3 deletions definitions/mars/grib.swmm.fcstdev.def
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ alias mars.number = perturbationNumber;
unalias mars.step;

alias mars.method = methodNumber;
if (class is "od") { alias mars.system = systemNumber; }
if (class is "me") { alias mars.system = systemNumber; }
if (class is "en") { alias mars.system = systemNumber; }
if (class is "od" || class is "me" || class is "en") {
alias mars.system = systemNumber;
}

0 comments on commit b74bc1e

Please sign in to comment.