Skip to content

Commit

Permalink
Make rfmip fail if the reference data is empty or corrupted.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiil committed Jun 21, 2023
1 parent 5b31709 commit 1cb0a4e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/rfmip-clear-sky/compare-to-reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@

failed = False
for v in variables:
if np.any(np.isnan(ref.variables[v].values)):
raise Exception(
v + ": some ref values are missing. Now that is strange.")
if np.all(np.isnan(tst.variables[v].values)):
raise Exception(
v + ": all test values are missing. Were the tests run?")
Expand Down

0 comments on commit 1cb0a4e

Please sign in to comment.