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

Adjust icepack interface for E3SM #31

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
bring some mushy functions into icepack interface
  • Loading branch information
eclare108213 committed Sep 25, 2023
commit baaa3f4f9c3242412b12499029b25fec6bdd3714
8 changes: 4 additions & 4 deletions columnphysics/icepack_mushy_physics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module icepack_mushy_physics
conductivity_snow_array, &
enthalpy_snow, &
enthalpy_brine, &
enthalpy_mush, &
icepack_enthalpy_mush, &
enthalpy_mush_liquid_fraction, &
enthalpy_of_melting, &
temperature_snow, &
Expand Down Expand Up @@ -262,7 +262,7 @@ end function liquidus_temperature_mush
!=======================================================================
! Enthalpy of mush from mush temperature and bulk salinity

function enthalpy_mush(zTin, zSin) result(zqin)
function icepack_enthalpy_mush(zTin, zSin) result(zqin)

real(kind=dbl_kind), intent(in) :: &
zTin, & ! ice layer temperature (C)
Expand All @@ -274,14 +274,14 @@ function enthalpy_mush(zTin, zSin) result(zqin)
real(kind=dbl_kind) :: &
phi ! ice liquid fraction

character(len=*),parameter :: subname='(enthalpy_mush)'
character(len=*),parameter :: subname='(icepack_enthalpy_mush)'

phi = icepack_mushy_liquid_fraction(zTin, zSin)

zqin = phi * (cp_ocn * rhow - cp_ice * rhoi) * zTin + &
rhoi * cp_ice * zTin - (c1 - phi) * rhoi * Lfresh

end function enthalpy_mush
end function icepack_enthalpy_mush

!=======================================================================
! Enthalpy of mush from mush temperature and liquid fraction
Expand Down
4 changes: 2 additions & 2 deletions columnphysics/icepack_therm_itd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module icepack_therm_itd
use icepack_itd, only: aggregate_area, shift_ice
use icepack_itd, only: column_sum, column_conservation_check
use icepack_isotope, only: isoice_alpha, isotope_frac_method
use icepack_mushy_physics, only: liquidus_temperature_mush, enthalpy_mush
use icepack_mushy_physics, only: liquidus_temperature_mush, icepack_enthalpy_mush
use icepack_zbgc, only: add_new_ice_bgc
use icepack_zbgc, only: lateral_melt_bgc

Expand Down Expand Up @@ -1579,7 +1579,7 @@ subroutine add_new_ice (ncat, nilyr, &
Sprofile(k) = Si0new
enddo
Ti = min(liquidus_temperature_mush(Si0new/phi_init), Tliquidus_max)
qi0new = enthalpy_mush(Ti, Si0new)
qi0new = icepack_enthalpy_mush(Ti, Si0new)
else
do k = 1, nilyr
Sprofile(k) = salinz(k)
Expand Down
4 changes: 2 additions & 2 deletions columnphysics/icepack_therm_shared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module icepack_therm_shared
use icepack_warnings, only: warnstr, icepack_warnings_add
use icepack_warnings, only: icepack_warnings_setabort, icepack_warnings_aborted

use icepack_mushy_physics, only: enthalpy_mush
use icepack_mushy_physics, only: icepack_enthalpy_mush
use icepack_mushy_physics, only: temperature_snow
use icepack_mushy_physics, only: enthalpy_snow
use icepack_mushy_physics, only: icepack_mushy_temperature_mush
Expand Down Expand Up @@ -317,7 +317,7 @@ subroutine icepack_init_trcr(Tair, Tf, &
Ti = Tsfc + slope*(real(k,kind=dbl_kind)-p5) &
/real(nilyr,kind=dbl_kind)
if (ktherm == 2) then
qin(k) = enthalpy_mush(Ti, Sprofile(k))
qin(k) = icepack_enthalpy_mush(Ti, Sprofile(k))
else
qin(k) = -(rhoi * (cp_ice*(Tprofile(k)-Ti) &
+ Lfresh*(c1-Tprofile(k)/Ti) - cp_ocn*Tprofile(k)))
Expand Down
4 changes: 2 additions & 2 deletions columnphysics/icepack_therm_vertical.F90
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module icepack_therm_vertical

use icepack_mushy_physics, only: icepack_mushy_temperature_mush
use icepack_mushy_physics, only: liquidus_temperature_mush
use icepack_mushy_physics, only: enthalpy_mush, enthalpy_of_melting
use icepack_mushy_physics, only: icepack_enthalpy_mush, enthalpy_of_melting

use icepack_aerosol, only: update_aerosol
use icepack_isotope, only: update_isotope
Expand Down Expand Up @@ -1257,7 +1257,7 @@ subroutine thickness_changes (nilyr, nslyr, &

if (ktherm == 2) then

qbotm = enthalpy_mush(Tbot, sss)
qbotm = icepack_enthalpy_mush(Tbot, sss)
qbotp = -Lfresh * rhoi * (c1 - phi_i_mushy)
qbot0 = qbotm - qbotp

Expand Down