(c_i_eff, kh) for the requested ice-conduction mode — the two
numbers through which every mode enters the quadratic.
CAVITY_ICE_ADV_DIFF is Holland & Jenkins (1999) eq. (31)
p. 1794: the heat-advection term is present for MELTING and
exactly zero for FREEZING, which is what the paper prescribes
rather than an approximation made here.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ocean_cavity_ice_t), | intent(in) | :: | ice |
Ice-conduction bundle. |
||
| logical, | intent(in) | :: | melting |
Melt/freeze branch, decided from the thermal driving. |
||
| type(ocean_cavity_const_t), | intent(in) | :: | const |
Constants bundle. |
||
| real(kind=wp), | intent(out) | :: | c_i_eff |
Effective ice heat capacity (J/kg/K) in |
||
| real(kind=wp), | intent(out) | :: | kh |
Conductance |
||
| integer, | intent(out) | :: | ierr |
|
pure subroutine cavity_ice_terms(ice, melting, const, c_i_eff, kh, ierr) !! `(c_i_eff, kh)` for the requested ice-conduction mode — the two !! numbers through which every mode enters the quadratic. !! !! `CAVITY_ICE_ADV_DIFF` is Holland & Jenkins (1999) eq. (31) !! p. 1794: the heat-advection term is present for MELTING and !! exactly zero for FREEZING, which is what the paper prescribes !! rather than an approximation made here. !$acc routine seq type(ocean_cavity_ice_t), intent(in) :: ice !! Ice-conduction bundle. logical, intent(in) :: melting !! Melt/freeze branch, decided from the thermal driving. type(ocean_cavity_const_t), intent(in) :: const !! Constants bundle. real(wp), intent(out) :: c_i_eff !! Effective ice heat capacity (J/kg/K) in `L_eff = L_f + !! c_i_eff*(T_b - T_ice)`. real(wp), intent(out) :: kh !! Conductance `k_ice/h_ice` (W/m^2/K). Exactly zero for both !! shipped modes; carried so the derivation above and the code !! stay the same expression when the reserved DIFFUSIVE mode !! lands. integer, intent(out) :: ierr !! `CAVITY_MELT_*` status. ierr = CAVITY_MELT_OK c_i_eff = 0.0_wp kh = 0.0_wp select case (ice%mode) case (CAVITY_ICE_INSULATING) ! q_ice == 0 identically. case (CAVITY_ICE_ADV_DIFF) if (melting) c_i_eff = const%c_i case (CAVITY_ICE_DIFFUSIVE) ierr = CAVITY_MELT_NOT_IMPLEMENTED case default ierr = CAVITY_MELT_LAW_INVALID end select end subroutine cavity_ice_terms