diff --git a/columnphysics/icepack_intfc.F90 b/columnphysics/icepack_intfc.F90 index d76be4ff8..0d8be0b31 100644 --- a/columnphysics/icepack_intfc.F90 +++ b/columnphysics/icepack_intfc.F90 @@ -112,10 +112,12 @@ module icepack_intfc use icepack_therm_shared , only: icepack_snow_temperature use icepack_therm_shared , only: icepack_liquidus_temperature use icepack_therm_shared , only: icepack_sea_freezing_temperature - use icepack_therm_shared , only: icepack_enthalpy_snow use icepack_therm_shared , only: icepack_init_thermo + use icepack_therm_shared , only: icepack_salinity_profile use icepack_therm_shared , only: icepack_init_trcr + use icepack_mushy_physics , only: icepack_enthalpy_snow + use icepack_mushy_physics , only: icepack_enthalpy_mush use icepack_mushy_physics , only: icepack_mushy_density_brine use icepack_mushy_physics , only: icepack_mushy_liquid_fraction use icepack_mushy_physics , only: icepack_mushy_temperature_mush diff --git a/columnphysics/icepack_mushy_physics.F90 b/columnphysics/icepack_mushy_physics.F90 index 3f572e7cd..03700d56c 100644 --- a/columnphysics/icepack_mushy_physics.F90 +++ b/columnphysics/icepack_mushy_physics.F90 @@ -14,7 +14,7 @@ module icepack_mushy_physics public :: & conductivity_mush_array, & conductivity_snow_array, & - enthalpy_snow, & + icepack_enthalpy_snow, & enthalpy_brine, & icepack_enthalpy_mush, & enthalpy_mush_liquid_fraction, & @@ -143,7 +143,7 @@ end subroutine conductivity_snow_array !======================================================================= ! Enthalpy of snow from snow temperature - function enthalpy_snow(zTsn) result(zqsn) + function icepack_enthalpy_snow(zTsn) result(zqsn) real(kind=dbl_kind), intent(in) :: & zTsn ! snow layer temperature (C) @@ -151,11 +151,11 @@ function enthalpy_snow(zTsn) result(zqsn) real(kind=dbl_kind) :: & zqsn ! snow layer enthalpy (J m-3) - character(len=*),parameter :: subname='(enthalpy_snow)' + character(len=*),parameter :: subname='(icepack_enthalpy_snow)' zqsn = -rhos * (-cp_ice * zTsn + Lfresh) - end function enthalpy_snow + end function icepack_enthalpy_snow !======================================================================= ! Temperature of snow from the snow enthalpy diff --git a/columnphysics/icepack_therm_mushy.F90 b/columnphysics/icepack_therm_mushy.F90 index 999c92af7..e182e7db2 100644 --- a/columnphysics/icepack_therm_mushy.F90 +++ b/columnphysics/icepack_therm_mushy.F90 @@ -10,7 +10,7 @@ module icepack_therm_mushy use icepack_parameters, only: a_rapid_mode, Rac_rapid_mode use icepack_parameters, only: aspect_rapid_mode, dSdt_slow_mode, phi_c_slow_mode use icepack_parameters, only: sw_redist, sw_frac, sw_dtemp - use icepack_mushy_physics, only: icepack_mushy_density_brine, enthalpy_brine, enthalpy_snow + use icepack_mushy_physics, only: icepack_mushy_density_brine, enthalpy_brine, icepack_enthalpy_snow use icepack_mushy_physics, only: enthalpy_mush_liquid_fraction use icepack_mushy_physics, only: icepack_mushy_temperature_mush, icepack_mushy_liquid_fraction use icepack_mushy_physics, only: temperature_snow, temperature_mush_liquid_fraction @@ -1802,7 +1802,7 @@ subroutine picard_final(lsnow, & if (lsnow) then do k = 1, nslyr - zqsn(k) = enthalpy_snow(zTsn(k)) + zqsn(k) = icepack_enthalpy_snow(zTsn(k)) enddo ! k endif ! lsnow diff --git a/columnphysics/icepack_therm_shared.F90 b/columnphysics/icepack_therm_shared.F90 index 47c29ce86..b3a752f1b 100644 --- a/columnphysics/icepack_therm_shared.F90 +++ b/columnphysics/icepack_therm_shared.F90 @@ -19,7 +19,6 @@ module icepack_therm_shared 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 use icepack_mushy_physics, only: liquidus_temperature_mush @@ -30,12 +29,12 @@ module icepack_therm_shared surface_heat_flux, & dsurface_heat_flux_dTsf, & icepack_init_thermo, & + icepack_salinity_profile, & icepack_init_trcr, & icepack_ice_temperature, & icepack_snow_temperature, & icepack_liquidus_temperature, & icepack_sea_freezing_temperature, & - icepack_enthalpy_snow, & adjust_enthalpy real (kind=dbl_kind), parameter, public :: & @@ -226,10 +225,6 @@ subroutine icepack_init_thermo(nilyr, sprofile) !autodocument_end - real (kind=dbl_kind), parameter :: & - nsal = 0.407_dbl_kind, & - msal = 0.573_dbl_kind - integer (kind=int_kind) :: k ! ice layer index real (kind=dbl_kind) :: zn ! normalized ice thickness @@ -254,7 +249,8 @@ subroutine icepack_init_thermo(nilyr, sprofile) do k = 1, nilyr zn = (real(k,kind=dbl_kind)-p5) / & real(nilyr,kind=dbl_kind) - sprofile(k)=(saltmax/c2)*(c1-cos(pi*zn**(nsal/(msal+zn)))) +! sprofile(k)=(saltmax/c2)*(c1-cos(pi*zn**(nsal/(msal+zn)))) + sprofile(k)=icepack_salinity_profile(zn) sprofile(k) = max(sprofile(k), min_salin) enddo ! k sprofile(nilyr+1) = saltmax @@ -267,6 +263,33 @@ subroutine icepack_init_thermo(nilyr, sprofile) end subroutine icepack_init_thermo +!======================================================================= +!autodocument_start icepack_salinity_profile +! Initial salinity profile +! +! authors: C. M. Bitz, UW +! William H. Lipscomb, LANL + + function icepack_salinity_profile(zn) result(salinity) + + real(kind=dbl_kind), intent(in) :: & + zn ! depth + + real(kind=dbl_kind) :: & + salinity ! initial salinity profile + +!autodocument end + + real (kind=dbl_kind), parameter :: & + nsal = 0.407_dbl_kind, & + msal = 0.573_dbl_kind + + character(len=*),parameter :: subname='(icepack_init_thermo)' + + salinity = (saltmax/c2)*(c1-cos(pi*zn**(nsal/(msal+zn)))) + + end function icepack_salinity_profile + !======================================================================= !autodocument_start icepack_init_trcr ! @@ -443,23 +466,6 @@ function icepack_snow_temperature(qin) result(Tsn) end function icepack_snow_temperature -!======================================================================= -!autodocument_start icepack_enthalpy_snow -! compute snow enthalpy - - function icepack_enthalpy_snow(zTsn) result(qsn) - - real(kind=dbl_kind), intent(in) :: zTsn - real(kind=dbl_kind) :: qsn - -!autodocument_end - - character(len=*),parameter :: subname='(icepack_enthalpy_snow)' - - qsn = enthalpy_snow(zTsn) - - end function icepack_enthalpy_snow - !======================================================================= ! ! Conserving energy, compute the new enthalpy of equal-thickness ice