Skip to content

Commit

Permalink
Fix hindcasts
Browse files Browse the repository at this point in the history
  • Loading branch information
gmertes committed Jul 1, 2024
1 parent ea47b2b commit 590e438
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ai_models/outputs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ def write(self, data, *args, check=False, **kwargs):
# Check that the GRIB keys are as expected

if kwargs.get("expver") is None:
ignore = ("template", "expver", "class", "type", "stream")
ignore = ("template", "check_nans", "expver", "class", "type", "stream")
else:
ignore = ("template",)
ignore = ("template", "check_nans")

for key, value in itertools.chain(self.grib_keys.items(), kwargs.items()):
if key in ignore:
Expand Down Expand Up @@ -155,6 +155,9 @@ def write(self, *args, **kwargs):

return self.output.write(*args, **kwargs)

def flush(self, *args, **kwargs):
return self.output.flush(*args, **kwargs)


class NoLabelling:

Expand All @@ -166,6 +169,9 @@ def write(self, *args, **kwargs):
kwargs["deleteLocalDefinition"] = 1
return self.output.write(*args, **kwargs)

def flush(self, *args, **kwargs):
return self.output.flush(*args, **kwargs)


def get_output(name, owner, *args, **kwargs):
result = available_outputs()[name].load()(owner, *args, **kwargs)
Expand Down

0 comments on commit 590e438

Please sign in to comment.