Skip to content

Commit

Permalink
Fix for specified ice layout non repro issue
Browse files Browse the repository at this point in the history
- Closes issue NOAA-GFDL#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
  • Loading branch information
nikizadehgfdl committed Oct 31, 2023
1 parent 8f6b0a7 commit 54b1a60
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ice_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1269,12 +1269,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

Expand Down

0 comments on commit 54b1a60

Please sign in to comment.