From 0066766e4997161a1b9189b8e9a0a8e4817c7b31 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 5 Oct 2026 16:06:03 -0500 Subject: [PATCH] FIX: Units recognition for act_accumulate_precip --- act/utils/data_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/act/utils/data_utils.py b/act/utils/data_utils.py index ffd47b621e..64eb7942ea 100644 --- a/act/utils/data_utils.py +++ b/act/utils/data_utils.py @@ -785,7 +785,8 @@ def accumulate_precip(ds, variable, time_delta=None): # Calculate the accumulation based on the units t_factor = t_delta / 60.0 - if units == 'mm/hr': + RATE_UNITS = ("mm/hr", "mm/hour", "mm/h", "mm h-1") + if units in RATE_UNITS: data = data * (t_factor / 60.0) accum = np.nancumsum(data.values)