Skip to content

Commit

Permalink
ice_history: use avg_ice_present, mask_ice_free_points to reduce dupl…
Browse files Browse the repository at this point in the history
…ication

Some CMIP variables are processed differently in
ice_history::accum_hist: they are averaged only for time steps when ice
is present, and points where ice is absent are masked. This processing
is repeated for each of these variables in the 2D and 3Dc loops.

To reduce code duplication, use the new components avg_ice_present and
mask_ice_free_points of ice_hist_field to perform this processing only
for variables that were defined accordingly. The relevant variables
already have those components defined as of the previous commit.

Note that we still need a separate loop for the variable 'sialb' (sea
ice albedo) to mask points below the horizon.
  • Loading branch information
phil-blain committed Nov 21, 2023
1 parent d8bb728 commit 6ffd547
Showing 1 changed file with 13 additions and 421 deletions.
Loading

0 comments on commit 6ffd547

Please sign in to comment.