From 8c027520e7ec61f111aa524594abc129a0cd4401 Mon Sep 17 00:00:00 2001 From: Maggie Bruckner Date: Mon, 7 Oct 2024 13:56:35 -0600 Subject: [PATCH] Add KeyError/ValueError situation comments --- monetio/sat/_omps_nadir_mm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monetio/sat/_omps_nadir_mm.py b/monetio/sat/_omps_nadir_mm.py index 6277d385..35e7c917 100644 --- a/monetio/sat/_omps_nadir_mm.py +++ b/monetio/sat/_omps_nadir_mm.py @@ -37,6 +37,8 @@ def read_OMPS_nm(files): else: data_array = xr.concat([data_array, data], "x") except (KeyError, ValueError) as e: + # KeyError occurs when file exists but contains no data + # ValueError occurs when file cross-track dimensions are different than other files loaded print(f"warning: skipping {filename}. {type(e).__name__} occured: {e}") if count == 0: raise RuntimeError(f"no files loaded from files={files}")