Ice specific enthalpy (J/kg) from temperature + bulk salinity —
SIS2 enth_from_TS (SIS2_ice_thm.F90:1647). NOTE: here (and
only here) the freezing point uses max(0, s), per SIS2.
The SIS2 else branch at :1667-1671 (Cp_brine /= Cp_ice, the
T_fr*log(T_fr/T) form) is deliberately NOT ported — with
ICE_CP_BRINE == ICE_CP_ICE it is unreachable, and dropping it
keeps the map closed-form-invertible (see module docstring).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | t |
Ice temperature (degC). |
||
| real(kind=wp), | intent(in) | :: | s |
Ice bulk salinity (PSU). |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private | :: | t_fr |
pure elemental function ice_enth_from_ts(t, s) result(enth) !! Ice specific enthalpy (J/kg) from temperature + bulk salinity — !! SIS2 `enth_from_TS` (SIS2_ice_thm.F90:1647). NOTE: here (and !! only here) the freezing point uses max(0, s), per SIS2. !! The SIS2 `else` branch at :1667-1671 (Cp_brine /= Cp_ice, the !! T_fr*log(T_fr/T) form) is deliberately NOT ported — with !! ICE_CP_BRINE == ICE_CP_ICE it is unreachable, and dropping it !! keeps the map closed-form-invertible (see module docstring). !$acc routine seq real(wp), intent(in) :: t !! Ice temperature (degC). real(wp), intent(in) :: s !! Ice bulk salinity (PSU). real(wp) :: enth real(wp) :: t_fr t_fr = ICE_DTF_DS*max(0.0_wp, s) if (s == 0.0_wp .and. t <= 0.0_wp) then ! Fresh water at/below freezing is assumed all ice, due to the ! degeneracy in inverting temperature for enthalpy (SIS2 note). enth = (ICE_ENTH_LIQ_0 - ICE_LAT_FUS) + ICE_CP_ICE*t else if (t >= t_fr) then ! Already melted: just the sensible heat relative to 0 degC. enth = ICE_ENTH_LIQ_0 + ICE_CP_WATER*t else ! Cp_ice == Cp_brine closed form (SIS2 :1664-1666). enth = (ICE_ENTH_LIQ_0 - ICE_LAT_FUS*(1.0_wp - t_fr/t)) + & (ICE_CP_ICE*t + (ICE_CP_WATER - ICE_CP_ICE)*t_fr) end if end function ice_enth_from_ts