Skip to content

Commit

Permalink
use DataArray.cumulative functionality in _get_lslr_plan_data
Browse files Browse the repository at this point in the history
  • Loading branch information
bolliger32 committed Jan 7, 2025
1 parent fdffaf0 commit dc41e2d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pyCIAM/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ def _get_lslr_plan_data(
if diaz_negative_retreat:
RH_heights = _pos(RH_heights)
else:
for i in range(1, len(RH_heights.at)):
RH_heights[{"at": i}] = RH_heights.isel(at=slice(None, i + 1)).max("at")
RH_heights = RH_heights.cumulative("at").max()

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

0 comments on commit dc41e2d

Please sign in to comment.