Skip to content

Commit

Permalink
Add KeyError/ValueError situation comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mbruckner-work authored Oct 7, 2024
1 parent 3188f6a commit 8c02752
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions monetio/sat/_omps_nadir_mm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Check failure on line 42 in monetio/sat/_omps_nadir_mm.py

View workflow job for this annotation

GitHub Actions / codespell

occured ==> occurred
if count == 0:
raise RuntimeError(f"no files loaded from files={files}")
Expand Down

0 comments on commit 8c02752

Please sign in to comment.