Skip to content

Commit

Permalink
temporal fix to be able to use eccodes with land forcings initialisin…
Browse files Browse the repository at this point in the history
…g from era5
  • Loading branch information
anaprietonem committed Sep 20, 2024
1 parent fd858b6 commit d5235ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ai_models/outputs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ def __init__(self, owner, path, metadata, **kwargs):

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

_grib_keys = dict(
edition=edition,
generatingProcessIdentifier=self.owner.version,
)

_grib_keys.update(self.metadata)

return _grib_keys
Expand All @@ -57,8 +58,8 @@ def output(self):
)

def write(self, data, *args, check=False, **kwargs):

try:
kwargs.pop('backgroundProcess')
handle, path = self.output.write(data, *args, **kwargs)

except Exception:
Expand Down

0 comments on commit d5235ed

Please sign in to comment.