Skip to content

Commit dc41e2d

Browse files
committed
use DataArray.cumulative functionality in _get_lslr_plan_data
1 parent fdffaf0 commit dc41e2d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pyCIAM/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ def _get_lslr_plan_data(
9494
if diaz_negative_retreat:
9595
RH_heights = _pos(RH_heights)
9696
else:
97-
for i in range(1, len(RH_heights.at)):
98-
RH_heights[{"at": i}] = RH_heights.isel(at=slice(None, i + 1)).max("at")
97+
RH_heights = RH_heights.cumulative("at").max()
9998

10099
# set initial RH_heights to 0 (e.g.
101100
# assuming no retreat or protection anywhere such that both w/ and w/o climate

0 commit comments

Comments
 (0)