Skip to content

Commit

Permalink
Fix convert_32_bit() logic for under & overflow checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
truth-quark committed Sep 10, 2024
1 parent 1527401 commit d282d45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion umpost/um2netcdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,8 @@ def convert_32_bit(cube):
if _max > MAX_NP_INT32:
msg = f"Converting {cube.var_name} causes a 32 bit overflow!"
warnings.warn(msg, category=RuntimeWarning)
elif _min < MIN_NP_INT32:

if _min < MIN_NP_INT32:
msg = f"Converting {cube.var_name} causes a 32 bit underflow!"
warnings.warn(msg, category=RuntimeWarning)

Expand Down

0 comments on commit d282d45

Please sign in to comment.