Skip to content

Commit

Permalink
Merge pull request #67 from ecmwf-lab/develop
Browse files Browse the repository at this point in the history
Allow for model to set GRIB edition
  • Loading branch information
HCookie authored Dec 9, 2024
2 parents b1a202c + 3a7028b commit 5c2ebf0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/ai_models/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class Model:
assets_extra_dir = None
retrieve = {} # Extra parameters for retrieve
version = 1 # To be overriden in subclasses
grib_edition = 2 # Default GRIB edition
grib_extra_metadata = {} # Extra metadata for grib files

param_level_ml = ([], []) # param, level
Expand Down
2 changes: 1 addition & 1 deletion src/ai_models/outputs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, owner, path, metadata, **kwargs):

@cached_property
def grib_keys(self):
edition = self.metadata.pop("edition", 2)
edition = self.metadata.pop("edition", self.owner.grib_edition)

_grib_keys = dict(
edition=edition,
Expand Down

0 comments on commit 5c2ebf0

Please sign in to comment.