Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/mtg2_tablesVersion_switc…
Browse files Browse the repository at this point in the history
…h_chem' into feature/mtg2_tablesVersion_switch_chem_parameters
  • Loading branch information
mjg41 committed Jan 6, 2025
2 parents 393afd5 + 62e0559 commit 7528d29
Show file tree
Hide file tree
Showing 38 changed files with 166 additions and 9,409 deletions.
3 changes: 3 additions & 0 deletions definitions/grib2/MTG2SwitchConcept.def
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
-1 = {dummy=0;}
# Can also include a centre in here to have them permanently pre MTG2.
# By default all centres are post MTG2.
0 = {centre=400;}
4 changes: 4 additions & 0 deletions definitions/grib2/boot.def
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ transient missingValue = 9999;
constant ieeeFloats = 1 : edition_specific;
constant isHindcast = 0;

# Set MTG2 defaults
constant tablesVersionMTG2Switch=33: hidden;
constant MTG2SwitchDefault = 1;

include "grib2/section.0.def"

template core "grib2/sections.def";
Expand Down
10 changes: 4 additions & 6 deletions definitions/grib2/local/ecmf/section2_extras.def
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# (C) Copyright 2005- ECMWF.
# ECMWF specific section 2 extras

constant tablesVersionMTG2Switch=33: hidden;

# MTG2 behaviour based on tablesVersion above
# MTG2 behaviour based on tablesVersion defined in boot.def
# Without accessing this logic (i.e. no ECMWF Section 2) the default is 1 = post-MTG2
# 0 = pre-MTG2 encoding used
# 1 = post-MTG2 encoding used
# 2 = post-MTG2 encoding with paramId + chemId used
Expand Down Expand Up @@ -59,6 +58,5 @@ if (tablesVersion <= tablesVersionMTG2Switch) {
# }
# }

# Now evaluate concept

concept MTG2Switch(MTG2SwitchDefault, "MTG2SwitchConcept.def", conceptsDir2,conceptsDir1): no_copy, read_only, long_type;
# Evaluate concept itself in parameters.def
# This allows non-ECMWF centres to also access functionality of switch
2 changes: 2 additions & 0 deletions definitions/grib2/localConcepts/era/MTG2SwitchConcept.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This centre should remain permanently on pre-MTG2 definitions
0 = {edition=2;}
Loading

0 comments on commit 7528d29

Please sign in to comment.