From 306bf180d435df5df50ca19ff83149b4f6b10233 Mon Sep 17 00:00:00 2001 From: Niki Zadeh Date: Tue, 31 Oct 2023 15:46:41 -0400 Subject: [PATCH] Fix for specified ice layout non repro issue - Closes issue #199 - Specified-Ice mode needs albedo update at every timestep because coszen changes every timestep - Fix ice_layout non-repro of amip using specified ice mode - Ensure Ice%sCS is associated before checking Ice%sCS%specified_ice --- src/ice_model.F90 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ice_model.F90 b/src/ice_model.F90 index 3f3c8ed2..474b723a 100644 --- a/src/ice_model.F90 +++ b/src/ice_model.F90 @@ -1267,12 +1267,16 @@ subroutine set_fast_ocean_sfc_properties( Atmos_boundary, Ice, IST, Rad, FIA, & Ice%t_surf(i2,j2,k2) = US%C_to_degC*Rad%t_skin(i,j,k) + T_0degC enddo ; enddo ; enddo + ! coszen has changed if we are using the specified ice mode + if (associated(Ice%sCS)) then + if(Ice%sCS%specified_ice) coszen_changed = .true. + endif ! set_ocean_albedo only needs to be called if do_sun_angle_for_alb is true or ! if the coupled model's radiation timestep is shorter than the slow coupling ! timestep. However, it is safe (if wasteful) to call it more frequently. if (Rad%do_sun_angle_for_alb) then call set_ocean_albedo_from_astronomy(Ice, G, Time_start, Time_end) - elseif (coszen_changed .or. Ice%sCS%specified_ice) then + elseif (coszen_changed) then call set_ocean_albedo_from_coszen(Ice, G, Rad%coszen_nextrad) endif