MOM6
mom_tfreeze Module Reference

Data Types

interface  calculate_tfreeze_linear
 
interface  calculate_tfreeze_millero
 
interface  calculate_tfreeze_teos10
 

Functions/Subroutines

subroutine calculate_tfreeze_linear_scalar (S, pres, T_Fr, TFr_S0_P0, dTFr_dS, dTFr_dp)
 
subroutine calculate_tfreeze_linear_array (S, pres, T_Fr, start, npts, TFr_S0_P0, dTFr_dS, dTFr_dp)
 This subroutine computes the freezing point potential temparature (in deg C) from salinity (in psu), and pressure (in Pa) using a simple linear expression, with coefficients passed in as arguments. More...
 
subroutine calculate_tfreeze_millero_scalar (S, pres, T_Fr)
 This subroutine computes the freezing point potential temparature (in deg C) from salinity (in psu), and pressure (in Pa) using the expression from Millero (1978) (and in appendix A of Gill 1982), but with the of the pressure dependence changed from 7.53e-8 to 7.75e-8 to make this an expression for potential temperature (not in situ temperature), using a value that is correct at the freezing point at 35 PSU and 5e6 Pa (500 dbar). More...
 
subroutine calculate_tfreeze_millero_array (S, pres, T_Fr, start, npts)
 This subroutine computes the freezing point potential temparature (in deg C) from salinity (in psu), and pressure (in Pa) using the expression from Millero (1978) (and in appendix A of Gill 1982), but with the of the pressure dependence changed from 7.53e-8 to 7.75e-8 to make this an expression for potential temperature (not in situ temperature), using a value that is correct at the freezing point at 35 PSU and 5e6 Pa (500 dbar). More...
 
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...
 

Function/Subroutine Documentation

◆ calculate_tfreeze_linear_array()

subroutine mom_tfreeze::calculate_tfreeze_linear_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,
real, intent(in)  TFr_S0_P0,
real, intent(in)  dTFr_dS,
real, intent(in)  dTFr_dp 
)
private

This subroutine computes the freezing point potential temparature (in deg C) from salinity (in psu), and pressure (in Pa) using a simple linear expression, with coefficients passed in as arguments.

Parameters
[in]ssalinity in PSU.
[in]prespressure in Pa.
[out]t_frFreezing point potential temperature in deg C.
[in]startthe starting point in the arrays.
[in]nptsthe number of values to calculate.
[in]tfr_s0_p0The freezing point at S=0, p=0, in deg C.
[in]dtfr_dsThe derivative of freezing point with salinity, in deg C PSU-1.
[in]dtfr_dpThe derivative of freezing point with pressure, in deg C Pa-1.

Definition at line 74 of file MOM_TFreeze.F90.

74  real, dimension(:), intent(in) :: s !< salinity in PSU.
75  real, dimension(:), intent(in) :: pres !< pressure in Pa.
76  real, dimension(:), intent(out) :: t_fr !< Freezing point potential temperature in deg C.
77  integer, intent(in) :: start !< the starting point in the arrays.
78  integer, intent(in) :: npts !< the number of values to calculate.
79  real, intent(in) :: tfr_s0_p0 !< The freezing point at S=0, p=0, in deg C.
80  real, intent(in) :: dtfr_ds !< The derivative of freezing point with salinity,
81  !! in deg C PSU-1.
82  real, intent(in) :: dtfr_dp !< The derivative of freezing point with pressure,
83  !! in deg C Pa-1.
84 
85 ! This subroutine computes the freezing point potential temparature
86 ! (in deg C) from salinity (in psu), and pressure (in Pa) using a simple
87 ! linear expression, with coefficients passed in as arguments.
88 !
89 ! Arguments: S - salinity in PSU.
90 ! (in) pres - pressure in Pa.
91 ! (out) T_Fr - Freezing point potential temperature in deg C.
92 ! (in) start - the starting point in the arrays.
93 ! (in) npts - the number of values to calculate.
94 ! (in) TFr_S0_P0 - The freezing point at S=0, p=0, in deg C.
95 ! (in) dTFr_dS - The derivative of freezing point with salinity, in
96 ! deg C PSU-1.
97 ! (in) dTFr_dp - The derivative of freezing point with pressure, in
98 ! deg C Pa-1.
99  integer :: j
100 
101  do j=start,start+npts-1
102  t_fr(j) = (tfr_s0_p0 + dtfr_ds*s(j)) + dtfr_dp*pres(j)
103  enddo
104 

◆ calculate_tfreeze_linear_scalar()

subroutine mom_tfreeze::calculate_tfreeze_linear_scalar ( real, intent(in)  S,
real, intent(in)  pres,
real, intent(out)  T_Fr,
real, intent(in)  TFr_S0_P0,
real, intent(in)  dTFr_dS,
real, intent(in)  dTFr_dp 
)
private

Definition at line 49 of file MOM_TFreeze.F90.

49  real, intent(in) :: s, pres
50  real, intent(out) :: t_fr
51  real, intent(in) :: tfr_s0_p0, dtfr_ds, dtfr_dp
52 ! This subroutine computes the freezing point potential temparature
53 ! (in deg C) from salinity (in psu), and pressure (in Pa) using a simple
54 ! linear expression, with coefficients passed in as arguments.
55 !
56 ! Arguments: S - salinity in PSU.
57 ! (in) pres - pressure in Pa.
58 ! (out) T_Fr - Freezing point potential temperature in deg C.
59 ! (in) TFr_S0_P0 - The freezing point at S=0, p=0, in deg C.
60 ! (in) dTFr_dS - The derivatives of freezing point with salinity, in
61 ! deg C PSU-1.
62 ! (in) dTFr_dp - The derivatives of freezing point with pressure, in
63 ! deg C Pa-1.
64 
65  t_fr = (tfr_s0_p0 + dtfr_ds*s) + dtfr_dp*pres
66 

◆ calculate_tfreeze_millero_array()

subroutine mom_tfreeze::calculate_tfreeze_millero_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 potential temparature (in deg C) from salinity (in psu), and pressure (in Pa) using the expression from Millero (1978) (and in appendix A of Gill 1982), but with the of the pressure dependence changed from 7.53e-8 to 7.75e-8 to make this an expression for potential temperature (not in situ temperature), using a value that is correct at the freezing point at 35 PSU and 5e6 Pa (500 dbar).

Parameters
[in]sSalinity in PSU.
[in]presPressure in Pa.
[out]t_frFreezing point potential temperature in deg C.
[in]startThe starting point in the arrays.
[in]nptsThe number of values to calculate.

Definition at line 142 of file MOM_TFreeze.F90.

142  real, dimension(:), intent(in) :: s !< Salinity in PSU.
143  real, dimension(:), intent(in) :: pres !< Pressure in Pa.
144  real, dimension(:), intent(out) :: t_fr !< Freezing point potential temperature in deg C.
145  integer, intent(in) :: start !< The starting point in the arrays.
146  integer, intent(in) :: npts !< The number of values to calculate.
147 ! This subroutine computes the freezing point potential temparature
148 ! (in deg C) from salinity (in psu), and pressure (in Pa) using the expression
149 ! from Millero (1978) (and in appendix A of Gill 1982), but with the of the
150 ! pressure dependence changed from 7.53e-8 to 7.75e-8 to make this an
151 ! expression for potential temperature (not in situ temperature), using a
152 ! value that is correct at the freezing point at 35 PSU and 5e6 Pa (500 dbar).
153 !
154 ! Arguments: S - salinity in PSU.
155 ! (in) pres - pressure in Pa.
156 ! (out) T_Fr - Freezing point potential temperature in deg C.
157 ! (in) start - the starting point in the arrays.
158 ! (in) npts - the number of values to calculate.
159  real, parameter :: cs1 = -0.0575, cs3_2 = 1.710523e-3, cs2 = -2.154996e-4
160  real, parameter :: dtfr_dp = -7.75e-8
161  integer :: j
162 
163  do j=start,start+npts-1
164  t_fr(j) = s(j)*(cs1 + (cs3_2 * sqrt(max(s(j),0.0)) + cs2 * s(j))) + &
165  dtfr_dp*pres(j)
166  enddo
167 

◆ calculate_tfreeze_millero_scalar()

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

This subroutine computes the freezing point potential temparature (in deg C) from salinity (in psu), and pressure (in Pa) using the expression from Millero (1978) (and in appendix A of Gill 1982), but with the of the pressure dependence changed from 7.53e-8 to 7.75e-8 to make this an expression for potential temperature (not in situ temperature), using a value that is correct at the freezing point at 35 PSU and 5e6 Pa (500 dbar).

Parameters
[in]sSalinity in PSU.
[in]presPressure in Pa.
[out]t_frFreezing point potential temperature in deg C.

Definition at line 114 of file MOM_TFreeze.F90.

114  real, intent(in) :: s !< Salinity in PSU.
115  real, intent(in) :: pres !< Pressure in Pa.
116  real, intent(out) :: t_fr !< Freezing point potential temperature in deg C.
117 
118 ! This subroutine computes the freezing point potential temparature
119 ! (in deg C) from salinity (in psu), and pressure (in Pa) using the expression
120 ! from Millero (1978) (and in appendix A of Gill 1982), but with the of the
121 ! pressure dependence changed from 7.53e-8 to 7.75e-8 to make this an
122 ! expression for potential temperature (not in situ temperature), using a
123 ! value that is correct at the freezing point at 35 PSU and 5e6 Pa (500 dbar).
124 !
125 ! Arguments: S - salinity in PSU.
126 ! (in) pres - pressure in Pa.
127 ! (out) T_Fr - Freezing point potential temperature in deg C.
128  real, parameter :: cs1 = -0.0575, cs3_2 = 1.710523e-3, cs2 = -2.154996e-4
129  real, parameter :: dtfr_dp = -7.75e-8
130 
131  t_fr = s*(cs1 + (cs3_2 * sqrt(max(s,0.0)) + cs2 * s)) + dtfr_dp*pres
132 

◆ calculate_tfreeze_teos10_array()

subroutine mom_tfreeze::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.

Referenced by calculate_tfreeze_teos10_scalar().

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 
Here is the caller graph for this function:

◆ calculate_tfreeze_teos10_scalar()

subroutine mom_tfreeze::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.

References calculate_tfreeze_teos10_array().

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 
Here is the call graph for this function: