MOM6
mom_tfreeze::calculate_tfreeze_teos10 Interface Reference

Detailed Description

Definition at line 41 of file MOM_TFreeze.F90.

Private functions

subroutine calculate_tfreeze_teos10_scalar (S, pres, T_Fr)
 This subroutine computes the freezing point conservative temparature (in deg C) from absolute salinity (in g/kg), and pressure (in Pa) using the TEOS10 package. More...
 
subroutine calculate_tfreeze_teos10_array (S, pres, T_Fr, start, npts)
 This subroutine computes the freezing point conservative temparature (in deg C) from absolute salinity (in g/kg), and pressure (in Pa) using the TEOS10 package. More...
 

Functions and subroutines

◆ calculate_tfreeze_teos10_array()

subroutine mom_tfreeze::calculate_tfreeze_teos10::calculate_tfreeze_teos10_array ( real, dimension(:), intent(in)  S,
real, dimension(:), intent(in)  pres,
real, dimension(:), intent(out)  T_Fr,
integer, intent(in)  start,
integer, intent(in)  npts 
)
private

This subroutine computes the freezing point conservative temparature (in deg C) from absolute salinity (in g/kg), and pressure (in Pa) using the TEOS10 package.

Parameters
[in]sabsolute salinity in g/kg.
[in]prespressure in Pa.
[out]t_frFreezing point conservative temperature in deg C.
[in]startthe starting point in the arrays.
[in]nptsthe number of values to calculate.

Definition at line 199 of file MOM_TFreeze.F90.

199  real, dimension(:), intent(in) :: s !< absolute salinity in g/kg.
200  real, dimension(:), intent(in) :: pres !< pressure in Pa.
201  real, dimension(:), intent(out) :: t_fr !< Freezing point conservative temperature in deg C.
202  integer, intent(in) :: start !< the starting point in the arrays.
203  integer, intent(in) :: npts !< the number of values to calculate.
204 ! This subroutine computes the freezing point conservative temparature
205 ! (in deg C) from absolute salinity (in g/kg), and pressure (in Pa) using the
206 ! TEOS10 package.
207 !
208 ! Arguments: S - absolute salinity in g/kg.
209 ! (in) pres - pressure in Pa.
210 ! (out) T_Fr - Freezing point conservative temperature in deg C.
211 ! * (in) start - the starting point in the arrays. *
212 ! * (in) npts - the number of values to calculate. *
213 
214  real, parameter :: pa2db = 1.e-4 ! The conversion factor from Pa to dbar.
215 
216  real :: zs,zp
217  integer :: j
218  ! Assume sea-water contains no dissolved air.
219  real, parameter :: saturation_fraction = 0.0
220 
221  do j=start,start+npts-1
222  !Conversions
223  zs = s(j)
224  zp = pres(j)* pa2db !Convert pressure from Pascal to decibar
225 
226  if(s(j).lt.-1.0e-10) cycle !Can we assume safely that this is a missing value?
227  t_fr(j) = gsw_ct_freezing_exact(zs,zp,saturation_fraction)
228  enddo
229 
230 

◆ calculate_tfreeze_teos10_scalar()

subroutine mom_tfreeze::calculate_tfreeze_teos10::calculate_tfreeze_teos10_scalar ( real, intent(in)  S,
real, intent(in)  pres,
real, intent(out)  T_Fr 
)
private

This subroutine computes the freezing point conservative temparature (in deg C) from absolute salinity (in g/kg), and pressure (in Pa) using the TEOS10 package.

Parameters
[in]sAbsolute salinity in g/kg.
[in]presPressure in Pa.
[out]t_frFreezing point conservative temperature in deg C.

Definition at line 174 of file MOM_TFreeze.F90.

174  real, intent(in) :: s !< Absolute salinity in g/kg.
175  real, intent(in) :: pres !< Pressure in Pa.
176  real, intent(out) :: t_fr !< Freezing point conservative temperature in deg C.
177 ! This subroutine computes the freezing point conservative temparature
178 ! (in deg C) from absolute salinity (in g/kg), and pressure (in Pa) using the
179 ! TEOS10 package.
180 !
181 ! Arguments: S - absolute salinity in g/kg.
182 ! (in) pres - pressure in Pa.
183 ! (out) T_Fr - Freezing point conservative temperature in deg C.
184  real, dimension(1) :: s0, pres0
185  real, dimension(1) :: tfr0
186 
187  s0(1) = s
188  pres0(1) = pres
189 
190  call calculate_tfreeze_teos10_array(s0, pres0, tfr0, 1, 1)
191  t_fr = tfr0(1)
192 

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