From 03d1f2282ee82e1d54b85bfad4557f69befff1cd Mon Sep 17 00:00:00 2001 From: Baudouin Raoult Date: Sun, 15 Sep 2024 14:13:12 +0000 Subject: [PATCH] Bug fix --- src/ai_models_graphcast/input.py | 2 +- src/ai_models_graphcast/output.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ai_models_graphcast/input.py b/src/ai_models_graphcast/input.py index e839581..4b04f61 100644 --- a/src/ai_models_graphcast/input.py +++ b/src/ai_models_graphcast/input.py @@ -37,7 +37,7 @@ def forcing_variables_numpy(sample, forcing_variables, dates): - """Generate variables from climetlabs + """Generate variables from earthkit-data Args: date (datetime): Datetime of current time step in forecast diff --git a/src/ai_models_graphcast/output.py b/src/ai_models_graphcast/output.py index 49fc095..f46b326 100644 --- a/src/ai_models_graphcast/output.py +++ b/src/ai_models_graphcast/output.py @@ -39,7 +39,7 @@ def save_output_xarray( for time in range(lead_time // hour_steps): for fs in all_fields[: len(all_fields) // len(lagged)]: - param, level = fs.metadata("shortName"), fs.metadata("levelist") + param, level = fs.metadata("shortName"), fs.metadata("levelist", default=0) if level != 0: param = GRIB_TO_XARRAY_PL.get(param, param)