Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move shortwave absorbed in negligible snow layers to surface #355

Merged
merged 1 commit into from
Mar 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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