Skip to content

Commit

Permalink
move shortwave absorbed in negligible snow layers to surface (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
eclare108213 authored Mar 23, 2021
1 parent f298152 commit c027a3c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
2 changes: 2 additions & 0 deletions columnphysics/icepack_shortwave.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4323,6 +4323,8 @@ subroutine icepack_step_radiation (dt, ncat, &

end subroutine icepack_step_radiation

!=======================================================================

! Delta-Eddington solution expressions

!=======================================================================
Expand Down
42 changes: 19 additions & 23 deletions columnphysics/icepack_therm_mushy.F90
Original file line number Diff line number Diff line change
Expand Up @@ -217,32 +217,28 @@ subroutine temperature_changes_salinity(dt, &
!-----------------------------------------------------------------
!mclaren: Should there be an if calc_Tsfc statement here then??

dswabs = c0
if (sw_redist) then
dt_rhoi_hlyr = dt / (rhoi*hilyr)
do k = 1, nilyr
Iswabs_tmp = c0 ! all Iswabs is moved into fswsfc
Tmlt = liquidus_temperature_mush(zSin(k))

dt_rhoi_hlyr = dt / (rhoi*hilyr)

do k = 1, nilyr

Iswabs_tmp = c0 ! all Iswabs is moved into fswsfc

Tmlt = liquidus_temperature_mush(zSin(k))

if (zTin(k) <= Tmlt - sw_dtemp) then
ci = cp_ice - Lfresh * Tmlt / (zTin(k)**2)
Iswabs_tmp = min(Iswabs(k), &
sw_frac*(Tmlt-zTin(k))*ci/dt_rhoi_hlyr)
endif
if (Iswabs_tmp < puny) Iswabs_tmp = c0

dswabs = min(Iswabs(k) - Iswabs_tmp, fswint)

fswsfc = fswsfc + dswabs
fswint = fswint - dswabs
Iswabs(k) = Iswabs_tmp

enddo

if (zTin(k) <= Tmlt - sw_dtemp) then
ci = cp_ice - Lfresh * Tmlt / (zTin(k)**2)
Iswabs_tmp = min(Iswabs(k), &
sw_frac*(Tmlt-zTin(k))*ci/dt_rhoi_hlyr)
endif
if (Iswabs_tmp < puny) Iswabs_tmp = c0
dswabs = dswabs + min(Iswabs(k) - Iswabs_tmp, fswint)
Iswabs(k) = Iswabs_tmp
enddo
endif
if (.not. lsnow) then ! hs <= hs_min
dswabs = dswabs + sum(Sswabs(:))
endif
fswsfc = fswsfc + dswabs
fswint = fswint - dswabs

if (lsnow) then
! case with snow
Expand Down

0 comments on commit c027a3c

Please sign in to comment.