Skip to content

Commit

Permalink
hindcasts
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Oct 5, 2023
1 parent f6a6e92 commit ac8f9b5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,4 @@ bar
*.nc
*.npz
*.json
*.req
2 changes: 1 addition & 1 deletion ai_models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.

__version__ = "0.2.6"
__version__ = "0.2.7"
8 changes: 6 additions & 2 deletions ai_models/outputs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ def __init__(self, owner, path, metadata, **kwargs):
LOG.info("Writing results to %s.", path)
self.path = path
self.owner = owner

edition = metadata.pop("edition", 2)

self.output = cml.new_grib_output(
path,
split_output=True,
edition=2,
edition=edition,
generatingProcessIdentifier=self.owner.version,
**metadata,
)
Expand All @@ -44,7 +47,8 @@ def write(self, *args, **kwargs):
else:
date = kwargs["template"]["date"]

kwargs["date"] = self.owner.hindcast_reference_date
kwargs.pop("date", None)
kwargs["referenceDate"] = self.owner.hindcast_reference_date
kwargs["hdate"] = date
return self.output.write(*args, **kwargs)

Expand Down

0 comments on commit ac8f9b5

Please sign in to comment.