From a51463be7c400adf56db9d7e808e187401cda1e1 Mon Sep 17 00:00:00 2001 From: Baudouin Raoult Date: Mon, 23 Sep 2024 19:23:25 +0000 Subject: [PATCH] GRIB2 input --- src/ai_models_graphcast/output.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ai_models_graphcast/output.py b/src/ai_models_graphcast/output.py index f46b326..0a4d2b5 100644 --- a/src/ai_models_graphcast/output.py +++ b/src/ai_models_graphcast/output.py @@ -39,9 +39,9 @@ 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", default=0) + param, level = fs.metadata("shortName"), fs.metadata("levelist", default=None) - if level != 0: + if level is not None: param = GRIB_TO_XARRAY_PL.get(param, param) if param not in target_variables: continue