Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Oct 9, 2023
1 parent b7176d8 commit 09591a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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.9"
__version__ = "0.2.10"
3 changes: 2 additions & 1 deletion ai_models/outputs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class HindcastReLabel:
def __init__(self, owner, output):
self.owner = owner
self.output = output
self.hindcast_reference_year = int(owner.hindcast_reference_year)

def write(self, *args, **kwargs):
if "date" in kwargs:
Expand All @@ -49,7 +50,7 @@ def write(self, *args, **kwargs):

assert len(str(date)) == 8
date = int(date)
referenceDate = self.owner.hindcast_reference_year * 10000 + date % 10000
referenceDate = self.hindcast_reference_year * 10000 + date % 10000

kwargs.pop("date", None)
kwargs["referenceDate"] = referenceDate
Expand Down

0 comments on commit 09591a8

Please sign in to comment.