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