MOM6
mom_eos::calculate_tfreeze Interface Reference

Detailed Description

Calculates the freezing point of sea water from T, S and P.

Definition at line 98 of file MOM_EOS.F90.

Private functions

subroutine calculate_tfreeze_scalar (S, pressure, T_fr, EOS, pres_scale)
 Calls the appropriate subroutine to calculate the freezing point for scalar inputs. More...
 
subroutine calculate_tfreeze_array (S, pressure, T_fr, start, npts, EOS, pres_scale)
 Calls the appropriate subroutine to calculate the freezing point for a 1-D array. More...
 

Detailed Description

Calculates the freezing point of sea water from T, S and P.

Definition at line 98 of file MOM_EOS.F90.

Functions and subroutines

◆ calculate_tfreeze_array()

subroutine mom_eos::calculate_tfreeze::calculate_tfreeze_array ( real, dimension(:), intent(in)  S,
real, dimension(:), intent(in)  pressure,
real, dimension(:), intent(inout)  T_fr,
integer, intent(in)  start,
integer, intent(in)  npts,
type(eos_type), pointer  EOS,
real, intent(in), optional  pres_scale 
)
private

Calls the appropriate subroutine to calculate the freezing point for a 1-D array.

Parameters
[in]sSalinity [ppt]
[in]pressurePressure [Pa] or [other]
[in,out]t_frFreezing point potential temperature referenced to the surface [degC]
[in]startStarting index within the array
[in]nptsThe number of values to calculate
eosEquation of state structure
[in]pres_scaleA multiplicative factor to convert pressure into Pa.

Definition at line 656 of file MOM_EOS.F90.

656  real, dimension(:), intent(in) :: s !< Salinity [ppt]
657  real, dimension(:), intent(in) :: pressure !< Pressure [Pa] or [other]
658  real, dimension(:), intent(inout) :: t_fr !< Freezing point potential temperature referenced
659  !! to the surface [degC]
660  integer, intent(in) :: start !< Starting index within the array
661  integer, intent(in) :: npts !< The number of values to calculate
662  type(eos_type), pointer :: eos !< Equation of state structure
663  real, optional, intent(in) :: pres_scale !< A multiplicative factor to convert pressure into Pa.
664 
665  ! Local variables
666  real, dimension(size(pressure)) :: pres ! Pressure converted to [Pa]
667  real :: p_scale ! A factor to convert pressure to units of Pa.
668  integer :: j
669 
670  if (.not.associated(eos)) call mom_error(fatal, &
671  "calculate_TFreeze_scalar called with an unassociated EOS_type EOS.")
672 
673  p_scale = 1.0 ; if (present(pres_scale)) p_scale = pres_scale
674 
675  if (p_scale == 1.0) then
676  select case (eos%form_of_TFreeze)
677  case (tfreeze_linear)
678  call calculate_tfreeze_linear(s, pressure, t_fr, start, npts, &
679  eos%TFr_S0_P0, eos%dTFr_dS, eos%dTFr_dp)
680  case (tfreeze_millero)
681  call calculate_tfreeze_millero(s, pressure, t_fr, start, npts)
682  case (tfreeze_teos10)
683  call calculate_tfreeze_teos10(s, pressure, t_fr, start, npts)
684  case default
685  call mom_error(fatal, "calculate_TFreeze_scalar: form_of_TFreeze is not valid.")
686  end select
687  else
688  do j=start,start+npts-1 ; pres(j) = p_scale * pressure(j) ; enddo
689  select case (eos%form_of_TFreeze)
690  case (tfreeze_linear)
691  call calculate_tfreeze_linear(s, pres, t_fr, start, npts, &
692  eos%TFr_S0_P0, eos%dTFr_dS, eos%dTFr_dp)
693  case (tfreeze_millero)
694  call calculate_tfreeze_millero(s, pres, t_fr, start, npts)
695  case (tfreeze_teos10)
696  call calculate_tfreeze_teos10(s, pres, t_fr, start, npts)
697  case default
698  call mom_error(fatal, "calculate_TFreeze_scalar: form_of_TFreeze is not valid.")
699  end select
700  endif
701 

◆ calculate_tfreeze_scalar()

subroutine mom_eos::calculate_tfreeze::calculate_tfreeze_scalar ( real, intent(in)  S,
real, intent(in)  pressure,
real, intent(out)  T_fr,
type(eos_type), pointer  EOS,
real, intent(in), optional  pres_scale 
)
private

Calls the appropriate subroutine to calculate the freezing point for scalar inputs.

Parameters
[in]sSalinity [ppt]
[in]pressurePressure [Pa] or [other]
[out]t_frFreezing point potential temperature referenced to the surface [degC]
eosEquation of state structure
[in]pres_scaleA multiplicative factor to convert pressure into Pa

Definition at line 625 of file MOM_EOS.F90.

625  real, intent(in) :: s !< Salinity [ppt]
626  real, intent(in) :: pressure !< Pressure [Pa] or [other]
627  real, intent(out) :: t_fr !< Freezing point potential temperature referenced
628  !! to the surface [degC]
629  type(eos_type), pointer :: eos !< Equation of state structure
630  real, optional, intent(in) :: pres_scale !< A multiplicative factor to convert pressure into Pa
631 
632  ! Local variables
633  real :: p_scale ! A factor to convert pressure to units of Pa.
634 
635  if (.not.associated(eos)) call mom_error(fatal, &
636  "calculate_TFreeze_scalar called with an unassociated EOS_type EOS.")
637 
638  p_scale = 1.0 ; if (present(pres_scale)) p_scale = pres_scale
639 
640  select case (eos%form_of_TFreeze)
641  case (tfreeze_linear)
642  call calculate_tfreeze_linear(s, p_scale*pressure, t_fr, eos%TFr_S0_P0, &
643  eos%dTFr_dS, eos%dTFr_dp)
644  case (tfreeze_millero)
645  call calculate_tfreeze_millero(s, p_scale*pressure, t_fr)
646  case (tfreeze_teos10)
647  call calculate_tfreeze_teos10(s, p_scale*pressure, t_fr)
648  case default
649  call mom_error(fatal, "calculate_TFreeze_scalar: form_of_TFreeze is not valid.")
650  end select
651 

The documentation for this interface was generated from the following file: