ice_enth_from_ts Function

public 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).

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: t

Ice temperature (degC).

real(kind=wp), intent(in) :: s

Ice bulk salinity (PSU).

Return Value real(kind=wp)


Called by

proc~~ice_enth_from_ts~~CalledByGraph proc~ice_enth_from_ts ice_enth_from_ts proc~ice_column_step ice_column_step proc~ice_column_step->proc~ice_enth_from_ts proc~ice_temp_sis2 ice_temp_sis2 proc~ice_column_step->proc~ice_temp_sis2 proc~ice_frazil_uptake_column ice_frazil_uptake_column proc~ice_frazil_uptake_column->proc~ice_enth_from_ts proc~ice_init_apply_impl ice_init_apply_impl proc~ice_init_apply_impl->proc~ice_enth_from_ts proc~ice_temp_sis2->proc~ice_enth_from_ts proc~update_lay_enth update_lay_enth proc~ice_temp_sis2->proc~update_lay_enth proc~update_lay_enth->proc~ice_enth_from_ts proc~ice_frazil_uptake_impl ice_frazil_uptake_impl proc~ice_frazil_uptake_impl->proc~ice_frazil_uptake_column proc~ice_frazil_uptake_multicat_impl ice_frazil_uptake_multicat_impl proc~ice_frazil_uptake_multicat_impl->proc~ice_frazil_uptake_column proc~ice_init_apply ice_init_apply proc~ice_init_apply->proc~ice_init_apply_impl proc~ice_thermo_columns ice_thermo_columns proc~ice_thermo_columns->proc~ice_column_step proc~engine_setup engine_setup proc~engine_setup->proc~ice_init_apply proc~ice_frazil_uptake ice_frazil_uptake proc~ice_frazil_uptake->proc~ice_frazil_uptake_impl proc~ice_frazil_uptake->proc~ice_frazil_uptake_multicat_impl proc~ice_thermo_driver_step ice_thermo_driver_step proc~ice_thermo_driver_step->proc~ice_thermo_columns proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_setup proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_setup proc~engine_step_ice engine_step_ice proc~driver_run_ocean->proc~engine_step_ice proc~driver_validate driver_validate proc~driver_validate->proc~engine_setup proc~engine_step_ice->proc~ice_frazil_uptake proc~engine_step_ice->proc~ice_thermo_driver_step proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean proc~rdb_ocean_create_finalize rdb_ocean_create_finalize proc~rdb_ocean_create_finalize->proc~complete_ocean_create proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~complete_ocean_create proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step_ice

Variables

Type Visibility Attributes Name Initial
real(kind=wp), private :: t_fr

Source Code

   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