MOM6
mom_eos_teos10 Module Reference

Detailed Description

The equation of state using the TEOS10 expressions.

Data Types

interface  calculate_density_derivs_teos10
 For a given thermodynamic state, return the derivatives of density with conservative temperature and absolute salinity, using the TEOS10 expressions. More...
 
interface  calculate_density_second_derivs_teos10
 For a given thermodynamic state, return the second derivatives of density with various combinations of conservative temperature, absolute salinity, and pressure, using the TEOS10 expressions. More...
 
interface  calculate_density_teos10
 Compute the in situ density of sea water ([kg m-3]), or its anomaly with respect to a reference density, from absolute salinity (g/kg), conservative temperature (in deg C), and pressure [Pa], using the TEOS10 expressions. More...
 
interface  calculate_spec_vol_teos10
 Compute the in situ specific volume of sea water (in [m3 kg-1]), or an anomaly with respect to a reference specific volume, from absolute salinity (in g/kg), conservative temperature (in deg C), and pressure [Pa], using the TEOS10 expressions. More...
 

Functions/Subroutines

subroutine calculate_density_scalar_teos10 (T, S, pressure, rho, rho_ref)
 This subroutine computes the in situ density of sea water (rho in [kg m-3]) from absolute salinity (S [g kg-1]), conservative temperature (T [degC]), and pressure [Pa]. It uses the expression from the TEOS10 website. More...
 
subroutine calculate_density_array_teos10 (T, S, pressure, rho, start, npts, rho_ref)
 This subroutine computes the in situ density of sea water (rho in [kg m-3]) from absolute salinity (S [g kg-1]), conservative temperature (T [degC]), and pressure [Pa]. It uses the expression from the TEOS10 website. More...
 
subroutine calculate_spec_vol_scalar_teos10 (T, S, pressure, specvol, spv_ref)
 This subroutine computes the in situ specific volume of sea water (specvol in [m3 kg-1]) from absolute salinity (S [g kg-1]), conservative temperature (T [degC]) and pressure [Pa], using the TEOS10 equation of state. If spv_ref is present, specvol is an anomaly from spv_ref. More...
 
subroutine calculate_spec_vol_array_teos10 (T, S, pressure, specvol, start, npts, spv_ref)
 This subroutine computes the in situ specific volume of sea water (specvol in [m3 kg-1]) from absolute salinity (S [g kg-1]), conservative temperature (T [degC]) and pressure [Pa], using the TEOS10 equation of state. If spv_ref is present, specvol is an anomaly from spv_ref. More...
 
subroutine calculate_density_derivs_array_teos10 (T, S, pressure, drho_dT, drho_dS, start, npts)
 For a given thermodynamic state, calculate the derivatives of density with conservative temperature and absolute salinity, using the TEOS10 expressions. More...
 
subroutine calculate_density_derivs_scalar_teos10 (T, S, pressure, drho_dT, drho_dS)
 For a given thermodynamic state, calculate the derivatives of density with conservative temperature and absolute salinity, using the TEOS10 expressions. More...
 
subroutine, public calculate_specvol_derivs_teos10 (T, S, pressure, dSV_dT, dSV_dS, start, npts)
 For a given thermodynamic state, calculate the derivatives of specific volume with conservative temperature and absolute salinity, using the TEOS10 expressions. More...
 
subroutine calculate_density_second_derivs_scalar_teos10 (T, S, pressure, drho_dS_dS, drho_dS_dT, drho_dT_dT, drho_dS_dP, drho_dT_dP)
 Calculate the 5 second derivatives of the equation of state for scalar inputs. More...
 
subroutine calculate_density_second_derivs_array_teos10 (T, S, pressure, drho_dS_dS, drho_dS_dT, drho_dT_dT, drho_dS_dP, drho_dT_dP, start, npts)
 Calculate the 5 second derivatives of the equation of state for scalar inputs. More...
 
subroutine, public calculate_compress_teos10 (T, S, pressure, rho, drho_dp, start, npts)
 This subroutine computes the in situ density of sea water (rho in [kg m-3]) and the compressibility (drho/dp = C_sound^-2) (drho_dp [s2 m-2]) from absolute salinity (sal in g/kg), conservative temperature (T [degC]), and pressure [Pa]. It uses the subroutines from TEOS10 website. More...
 

Variables

real, parameter pa2db = 1.e-4
 The conversion factor from Pa to dbar. More...
 

Function/Subroutine Documentation

◆ calculate_compress_teos10()

subroutine, public mom_eos_teos10::calculate_compress_teos10 ( real, dimension(:), intent(in)  T,
real, dimension(:), intent(in)  S,
real, dimension(:), intent(in)  pressure,
real, dimension(:), intent(out)  rho,
real, dimension(:), intent(out)  drho_dp,
integer, intent(in)  start,
integer, intent(in)  npts 
)

This subroutine computes the in situ density of sea water (rho in [kg m-3]) and the compressibility (drho/dp = C_sound^-2) (drho_dp [s2 m-2]) from absolute salinity (sal in g/kg), conservative temperature (T [degC]), and pressure [Pa]. It uses the subroutines from TEOS10 website.

Parameters
[in]tConservative temperature [degC].
[in]sAbsolute salinity [g kg-1].
[in]pressurePressure [Pa].
[out]rhoIn situ density [kg m-3].
[out]drho_dpThe partial derivative of density with pressure (also the inverse of the square of sound speed) [s2 m-2].
[in]startThe starting point in the arrays.
[in]nptsThe number of values to calculate.

Definition at line 314 of file MOM_EOS_TEOS10.F90.

314  real, intent(in), dimension(:) :: T !< Conservative temperature [degC].
315  real, intent(in), dimension(:) :: S !< Absolute salinity [g kg-1].
316  real, intent(in), dimension(:) :: pressure !< Pressure [Pa].
317  real, intent(out), dimension(:) :: rho !< In situ density [kg m-3].
318  real, intent(out), dimension(:) :: drho_dp !< The partial derivative of density with pressure
319  !! (also the inverse of the square of sound speed)
320  !! [s2 m-2].
321  integer, intent(in) :: start !< The starting point in the arrays.
322  integer, intent(in) :: npts !< The number of values to calculate.
323 
324  ! Local variables
325  real :: zs,zt,zp
326  integer :: j
327 
328  do j=start,start+npts-1
329  !Conversions
330  zs = s(j) !gsw_sr_from_sp(S(j)) !Convert practical salinity to absolute salinity
331  zt = t(j) !gsw_ct_from_pt(S(j),T(j)) !Convert potantial temp to conservative temp
332  zp = pressure(j)* pa2db !Convert pressure from Pascal to decibar
333  if (s(j) < -1.0e-10) then ; !Can we assume safely that this is a missing value?
334  rho(j) = 1000.0 ; drho_dp(j) = 0.0
335  else
336  rho(j) = gsw_rho(zs,zt,zp)
337  call gsw_rho_first_derivatives(zs,zt,zp, drho_dp=drho_dp(j))
338  endif
339  enddo

References pa2db.

◆ calculate_density_array_teos10()

subroutine mom_eos_teos10::calculate_density_array_teos10 ( real, dimension(:), intent(in)  T,
real, dimension(:), intent(in)  S,
real, dimension(:), intent(in)  pressure,
real, dimension(:), intent(out)  rho,
integer, intent(in)  start,
integer, intent(in)  npts,
real, intent(in), optional  rho_ref 
)
private

This subroutine computes the in situ density of sea water (rho in [kg m-3]) from absolute salinity (S [g kg-1]), conservative temperature (T [degC]), and pressure [Pa]. It uses the expression from the TEOS10 website.

Parameters
[in]tConservative temperature [degC].
[in]sAbsolute salinity [g kg-1]
[in]pressurepressure [Pa].
[out]rhoin situ density [kg m-3].
[in]startthe starting point in the arrays.
[in]nptsthe number of values to calculate.
[in]rho_refA reference density [kg m-3].

Definition at line 84 of file MOM_EOS_TEOS10.F90.

84  real, dimension(:), intent(in) :: T !< Conservative temperature [degC].
85  real, dimension(:), intent(in) :: S !< Absolute salinity [g kg-1]
86  real, dimension(:), intent(in) :: pressure !< pressure [Pa].
87  real, dimension(:), intent(out) :: rho !< in situ density [kg m-3].
88  integer, intent(in) :: start !< the starting point in the arrays.
89  integer, intent(in) :: npts !< the number of values to calculate.
90  real, optional, intent(in) :: rho_ref !< A reference density [kg m-3].
91 
92  ! Local variables
93  real :: zs, zt, zp
94  integer :: j
95 
96  do j=start,start+npts-1
97  !Conversions
98  zs = s(j) !gsw_sr_from_sp(S(j)) !Convert practical salinity to absolute salinity
99  zt = t(j) !gsw_ct_from_pt(S(j),T(j)) !Convert potantial temp to conservative temp
100  zp = pressure(j)* pa2db !Convert pressure from Pascal to decibar
101 
102  if (s(j) < -1.0e-10) then !Can we assume safely that this is a missing value?
103  rho(j) = 1000.0
104  else
105  rho(j) = gsw_rho(zs,zt,zp)
106  endif
107  if (present(rho_ref)) rho(j) = rho(j) - rho_ref
108  enddo

References pa2db.

Referenced by calculate_density_scalar_teos10().

Here is the caller graph for this function:

◆ calculate_density_derivs_array_teos10()

subroutine mom_eos_teos10::calculate_density_derivs_array_teos10 ( real, dimension(:), intent(in)  T,
real, dimension(:), intent(in)  S,
real, dimension(:), intent(in)  pressure,
real, dimension(:), intent(out)  drho_dT,
real, dimension(:), intent(out)  drho_dS,
integer, intent(in)  start,
integer, intent(in)  npts 
)
private

For a given thermodynamic state, calculate the derivatives of density with conservative temperature and absolute salinity, using the TEOS10 expressions.

Parameters
[in]tConservative temperature [degC].
[in]sAbsolute salinity [g kg-1].
[in]pressurepressure [Pa].
[out]drho_dtThe partial derivative of density with conservative temperature [kg m-3 degC-1].
[out]drho_dsThe partial derivative of density with absolute salinity, [kg m-3 (g/kg)-1].
[in]startThe starting point in the arrays.
[in]nptsThe number of values to calculate.

Definition at line 169 of file MOM_EOS_TEOS10.F90.

169  real, intent(in), dimension(:) :: T !< Conservative temperature [degC].
170  real, intent(in), dimension(:) :: S !< Absolute salinity [g kg-1].
171  real, intent(in), dimension(:) :: pressure !< pressure [Pa].
172  real, intent(out), dimension(:) :: drho_dT !< The partial derivative of density with conservative
173  !! temperature [kg m-3 degC-1].
174  real, intent(out), dimension(:) :: drho_dS !< The partial derivative of density with absolute salinity,
175  !! [kg m-3 (g/kg)-1].
176  integer, intent(in) :: start !< The starting point in the arrays.
177  integer, intent(in) :: npts !< The number of values to calculate.
178 
179  ! Local variables
180  real :: zs, zt, zp
181  integer :: j
182 
183  do j=start,start+npts-1
184  !Conversions
185  zs = s(j) !gsw_sr_from_sp(S(j)) !Convert practical salinity to absolute salinity
186  zt = t(j) !gsw_ct_from_pt(S(j),T(j)) !Convert potantial temp to conservative temp
187  zp = pressure(j)* pa2db !Convert pressure from Pascal to decibar
188  if (s(j) < -1.0e-10) then ; !Can we assume safely that this is a missing value?
189  drho_dt(j) = 0.0 ; drho_ds(j) = 0.0
190  else
191  call gsw_rho_first_derivatives(zs, zt, zp, drho_dsa=drho_ds(j), drho_dct=drho_dt(j))
192  endif
193  enddo
194 

References pa2db.

◆ calculate_density_derivs_scalar_teos10()

subroutine mom_eos_teos10::calculate_density_derivs_scalar_teos10 ( real, intent(in)  T,
real, intent(in)  S,
real, intent(in)  pressure,
real, intent(out)  drho_dT,
real, intent(out)  drho_dS 
)
private

For a given thermodynamic state, calculate the derivatives of density with conservative temperature and absolute salinity, using the TEOS10 expressions.

Parameters
[in]tConservative temperature [degC]
[in]sAbsolute Salinity [g kg-1]
[in]pressurepressure [Pa].
[out]drho_dtThe partial derivative of density with conservative temperature [kg m-3 degC-1].
[out]drho_dsThe partial derivative of density with absolute salinity, [kg m-3 (g/kg)-1].

Definition at line 200 of file MOM_EOS_TEOS10.F90.

200  real, intent(in) :: T !< Conservative temperature [degC]
201  real, intent(in) :: S !< Absolute Salinity [g kg-1]
202  real, intent(in) :: pressure !< pressure [Pa].
203  real, intent(out) :: drho_dT !< The partial derivative of density with conservative
204  !! temperature [kg m-3 degC-1].
205  real, intent(out) :: drho_dS !< The partial derivative of density with absolute salinity,
206  !! [kg m-3 (g/kg)-1].
207 
208  ! Local variables
209  real :: zs, zt, zp
210  !Conversions
211  zs = s !gsw_sr_from_sp(S) !Convert practical salinity to absolute salinity
212  zt = t !gsw_ct_from_pt(S,T) !Convert potantial temp to conservative temp
213  zp = pressure* pa2db !Convert pressure from Pascal to decibar
214  if (s < -1.0e-10) return !Can we assume safely that this is a missing value?
215  call gsw_rho_first_derivatives(zs, zt, zp, drho_dsa=drho_ds, drho_dct=drho_dt)

References pa2db.

◆ calculate_density_scalar_teos10()

subroutine mom_eos_teos10::calculate_density_scalar_teos10 ( real, intent(in)  T,
real, intent(in)  S,
real, intent(in)  pressure,
real, intent(out)  rho,
real, intent(in), optional  rho_ref 
)
private

This subroutine computes the in situ density of sea water (rho in [kg m-3]) from absolute salinity (S [g kg-1]), conservative temperature (T [degC]), and pressure [Pa]. It uses the expression from the TEOS10 website.

Parameters
[in]tConservative temperature [degC].
[in]sAbsolute salinity [g kg-1].
[in]pressurepressure [Pa].
[out]rhoIn situ density [kg m-3].
[in]rho_refA reference density [kg m-3].

Definition at line 60 of file MOM_EOS_TEOS10.F90.

60  real, intent(in) :: T !< Conservative temperature [degC].
61  real, intent(in) :: S !< Absolute salinity [g kg-1].
62  real, intent(in) :: pressure !< pressure [Pa].
63  real, intent(out) :: rho !< In situ density [kg m-3].
64  real, optional, intent(in) :: rho_ref !< A reference density [kg m-3].
65 
66  ! Local variables
67  real, dimension(1) :: T0, S0, pressure0
68  real, dimension(1) :: rho0
69 
70  t0(1) = t
71  s0(1) = s
72  pressure0(1) = pressure
73 
74  call calculate_density_array_teos10(t0, s0, pressure0, rho0, 1, 1, rho_ref)
75  rho = rho0(1)
76 

References calculate_density_array_teos10().

Here is the call graph for this function:

◆ calculate_density_second_derivs_array_teos10()

subroutine mom_eos_teos10::calculate_density_second_derivs_array_teos10 ( real, dimension(:), intent(in)  T,
real, dimension(:), intent(in)  S,
real, dimension(:), intent(in)  pressure,
real, dimension(:), intent(out)  drho_dS_dS,
real, dimension(:), intent(out)  drho_dS_dT,
real, dimension(:), intent(out)  drho_dT_dT,
real, dimension(:), intent(out)  drho_dS_dP,
real, dimension(:), intent(out)  drho_dT_dP,
integer, intent(in)  start,
integer, intent(in)  npts 
)
private

Calculate the 5 second derivatives of the equation of state for scalar inputs.

Parameters
[in]tConservative temperature [degC]
[in]sAbsolute Salinity [g kg-1]
[in]pressurepressure [Pa].
[out]drho_ds_dsPartial derivative of beta with respect to S
[out]drho_ds_dtPartial derivative of beta with resepct to T
[out]drho_dt_dtPartial derivative of alpha with respect to T
[out]drho_ds_dpPartial derivative of beta with respect to pressure
[out]drho_dt_dpPartial derivative of alpha with respect to pressure
[in]startThe starting point in the arrays.
[in]nptsThe number of values to calculate.

Definition at line 277 of file MOM_EOS_TEOS10.F90.

277  real, dimension(:), intent(in) :: T !< Conservative temperature [degC]
278  real, dimension(:), intent(in) :: S !< Absolute Salinity [g kg-1]
279  real, dimension(:), intent(in) :: pressure !< pressure [Pa].
280  real, dimension(:), intent(out) :: drho_dS_dS !< Partial derivative of beta with respect to S
281  real, dimension(:), intent(out) :: drho_dS_dT !< Partial derivative of beta with resepct to T
282  real, dimension(:), intent(out) :: drho_dT_dT !< Partial derivative of alpha with respect to T
283  real, dimension(:), intent(out) :: drho_dS_dP !< Partial derivative of beta with respect to pressure
284  real, dimension(:), intent(out) :: drho_dT_dP !< Partial derivative of alpha with respect to pressure
285  integer, intent(in) :: start !< The starting point in the arrays.
286  integer, intent(in) :: npts !< The number of values to calculate.
287 
288  ! Local variables
289  real :: zs, zt, zp
290  integer :: j
291 
292  do j=start,start+npts-1
293  !Conversions
294  zs = s(j) !gsw_sr_from_sp(S) !Convert practical salinity to absolute salinity
295  zt = t(j) !gsw_ct_from_pt(S,T) !Convert potantial temp to conservative temp
296  zp = pressure(j)* pa2db !Convert pressure from Pascal to decibar
297  if (s(j) < -1.0e-10) then ; !Can we assume safely that this is a missing value?
298  drho_ds_ds(j) = 0.0 ; drho_ds_dt(j) = 0.0 ; drho_dt_dt(j) = 0.0
299  drho_ds_dp(j) = 0.0 ; drho_dt_dp(j) = 0.0
300  else
301  call gsw_rho_second_derivatives(zs, zt, zp, rho_sa_sa=drho_ds_ds(j), rho_sa_ct=drho_ds_dt(j), &
302  rho_ct_ct=drho_dt_dt(j), rho_sa_p=drho_ds_dp(j), rho_ct_p=drho_dt_dp(j))
303  endif
304  enddo
305 

References pa2db.

◆ calculate_density_second_derivs_scalar_teos10()

subroutine mom_eos_teos10::calculate_density_second_derivs_scalar_teos10 ( real, intent(in)  T,
real, intent(in)  S,
real, intent(in)  pressure,
real, intent(out)  drho_dS_dS,
real, intent(out)  drho_dS_dT,
real, intent(out)  drho_dT_dT,
real, intent(out)  drho_dS_dP,
real, intent(out)  drho_dT_dP 
)
private

Calculate the 5 second derivatives of the equation of state for scalar inputs.

Parameters
[in]tConservative temperature [degC]
[in]sAbsolute Salinity [g kg-1]
[in]pressurepressure [Pa].
[out]drho_ds_dsPartial derivative of beta with respect to S
[out]drho_ds_dtPartial derivative of beta with resepct to T
[out]drho_dt_dtPartial derivative of alpha with respect to T
[out]drho_ds_dpPartial derivative of beta with respect to pressure
[out]drho_dt_dpPartial derivative of alpha with respect to pressure

Definition at line 252 of file MOM_EOS_TEOS10.F90.

252  real, intent(in) :: T !< Conservative temperature [degC]
253  real, intent(in) :: S !< Absolute Salinity [g kg-1]
254  real, intent(in) :: pressure !< pressure [Pa].
255  real, intent(out) :: drho_dS_dS !< Partial derivative of beta with respect to S
256  real, intent(out) :: drho_dS_dT !< Partial derivative of beta with resepct to T
257  real, intent(out) :: drho_dT_dT !< Partial derivative of alpha with respect to T
258  real, intent(out) :: drho_dS_dP !< Partial derivative of beta with respect to pressure
259  real, intent(out) :: drho_dT_dP !< Partial derivative of alpha with respect to pressure
260 
261  ! Local variables
262  real :: zs, zt, zp
263 
264  !Conversions
265  zs = s !gsw_sr_from_sp(S) !Convert practical salinity to absolute salinity
266  zt = t !gsw_ct_from_pt(S,T) !Convert potantial temp to conservative temp
267  zp = pressure* pa2db !Convert pressure from Pascal to decibar
268  if (s < -1.0e-10) return !Can we assume safely that this is a missing value?
269  call gsw_rho_second_derivatives(zs, zt, zp, rho_sa_sa=drho_ds_ds, rho_sa_ct=drho_ds_dt, &
270  rho_ct_ct=drho_dt_dt, rho_sa_p=drho_ds_dp, rho_ct_p=drho_dt_dp)
271 

References pa2db.

◆ calculate_spec_vol_array_teos10()

subroutine mom_eos_teos10::calculate_spec_vol_array_teos10 ( real, dimension(:), intent(in)  T,
real, dimension(:), intent(in)  S,
real, dimension(:), intent(in)  pressure,
real, dimension(:), intent(out)  specvol,
integer, intent(in)  start,
integer, intent(in)  npts,
real, intent(in), optional  spv_ref 
)
private

This subroutine computes the in situ specific volume of sea water (specvol in [m3 kg-1]) from absolute salinity (S [g kg-1]), conservative temperature (T [degC]) and pressure [Pa], using the TEOS10 equation of state. If spv_ref is present, specvol is an anomaly from spv_ref.

Parameters
[in]tConservative temperature relative to the surface [degC].
[in]ssalinity [g kg-1].
[in]pressurepressure [Pa].
[out]specvolin situ specific volume [m3 kg-1].
[in]startthe starting point in the arrays.
[in]nptsthe number of values to calculate.
[in]spv_refA reference specific volume [m3 kg-1].

Definition at line 137 of file MOM_EOS_TEOS10.F90.

137  real, dimension(:), intent(in) :: T !< Conservative temperature relative to the surface
138  !! [degC].
139  real, dimension(:), intent(in) :: S !< salinity [g kg-1].
140  real, dimension(:), intent(in) :: pressure !< pressure [Pa].
141  real, dimension(:), intent(out) :: specvol !< in situ specific volume [m3 kg-1].
142  integer, intent(in) :: start !< the starting point in the arrays.
143  integer, intent(in) :: npts !< the number of values to calculate.
144  real, optional, intent(in) :: spv_ref !< A reference specific volume [m3 kg-1].
145 
146  ! Local variables
147  real :: zs, zt, zp
148  integer :: j
149 
150  do j=start,start+npts-1
151  !Conversions
152  zs = s(j) !gsw_sr_from_sp(S(j)) !Convert practical salinity to absolute salinity
153  zt = t(j) !gsw_ct_from_pt(S(j),T(j)) !Convert potantial temp to conservative temp
154  zp = pressure(j)* pa2db !Convert pressure from Pascal to decibar
155 
156  if (s(j) < -1.0e-10) then
157  specvol(j) = 0.001 !Can we assume safely that this is a missing value?
158  else
159  specvol(j) = gsw_specvol(zs,zt,zp)
160  endif
161  if (present(spv_ref)) specvol(j) = specvol(j) - spv_ref
162  enddo
163 

References pa2db.

Referenced by calculate_spec_vol_scalar_teos10().

Here is the caller graph for this function:

◆ calculate_spec_vol_scalar_teos10()

subroutine mom_eos_teos10::calculate_spec_vol_scalar_teos10 ( real, intent(in)  T,
real, intent(in)  S,
real, intent(in)  pressure,
real, intent(out)  specvol,
real, intent(in), optional  spv_ref 
)
private

This subroutine computes the in situ specific volume of sea water (specvol in [m3 kg-1]) from absolute salinity (S [g kg-1]), conservative temperature (T [degC]) and pressure [Pa], using the TEOS10 equation of state. If spv_ref is present, specvol is an anomaly from spv_ref.

Parameters
[in]tConservative temperature [degC].
[in]sAbsolute salinity [g kg-1]
[in]pressurepressure [Pa].
[out]specvolin situ specific volume [m3 kg-1].
[in]spv_refA reference specific volume [m3 kg-1].

Definition at line 116 of file MOM_EOS_TEOS10.F90.

116  real, intent(in) :: T !< Conservative temperature [degC].
117  real, intent(in) :: S !< Absolute salinity [g kg-1]
118  real, intent(in) :: pressure !< pressure [Pa].
119  real, intent(out) :: specvol !< in situ specific volume [m3 kg-1].
120  real, optional, intent(in) :: spv_ref !< A reference specific volume [m3 kg-1].
121 
122  ! Local variables
123  real, dimension(1) :: T0, S0, pressure0, spv0
124 
125  t0(1) = t ; s0(1) = s ; pressure0(1) = pressure
126 
127  call calculate_spec_vol_array_teos10(t0, s0, pressure0, spv0, 1, 1, spv_ref)
128  specvol = spv0(1)

References calculate_spec_vol_array_teos10().

Here is the call graph for this function:

◆ calculate_specvol_derivs_teos10()

subroutine, public mom_eos_teos10::calculate_specvol_derivs_teos10 ( real, dimension(:), intent(in)  T,
real, dimension(:), intent(in)  S,
real, dimension(:), intent(in)  pressure,
real, dimension(:), intent(out)  dSV_dT,
real, dimension(:), intent(out)  dSV_dS,
integer, intent(in)  start,
integer, intent(in)  npts 
)

For a given thermodynamic state, calculate the derivatives of specific volume with conservative temperature and absolute salinity, using the TEOS10 expressions.

Parameters
[in]tConservative temperature [degC].
[in]sAbsolute salinity [g kg-1].
[in]pressurepressure [Pa].
[out]dsv_dtThe partial derivative of specific volume with conservative temperature [m3 kg-1 degC-1].
[out]dsv_dsThe partial derivative of specific volume with absolute salinity [m3 kg-1 (g/kg)-1].
[in]startThe starting point in the arrays.
[in]nptsThe number of values to calculate.

Definition at line 221 of file MOM_EOS_TEOS10.F90.

221  real, intent(in), dimension(:) :: T !< Conservative temperature [degC].
222  real, intent(in), dimension(:) :: S !< Absolute salinity [g kg-1].
223  real, intent(in), dimension(:) :: pressure !< pressure [Pa].
224  real, intent(out), dimension(:) :: dSV_dT !< The partial derivative of specific volume with
225  !! conservative temperature [m3 kg-1 degC-1].
226  real, intent(out), dimension(:) :: dSV_dS !< The partial derivative of specific volume with
227  !! absolute salinity [m3 kg-1 (g/kg)-1].
228  integer, intent(in) :: start !< The starting point in the arrays.
229  integer, intent(in) :: npts !< The number of values to calculate.
230 
231  ! Local variables
232  real :: zs, zt, zp
233  integer :: j
234 
235  do j=start,start+npts-1
236  !Conversions
237  zs = s(j) !gsw_sr_from_sp(S(j)) !Convert practical salinity to absolute salinity
238  zt = t(j) !gsw_ct_from_pt(S(j),T(j)) !Convert potantial temp to conservative temp
239  zp = pressure(j)* pa2db !Convert pressure from Pascal to decibar
240  if (s(j) < -1.0e-10) then ; !Can we assume safely that this is a missing value?
241  dsv_dt(j) = 0.0 ; dsv_ds(j) = 0.0
242  else
243  call gsw_specvol_first_derivatives(zs,zt,zp, v_sa=dsv_ds(j), v_ct=dsv_dt(j))
244  endif
245  enddo
246 

References pa2db.

Variable Documentation

◆ pa2db

real, parameter mom_eos_teos10::pa2db = 1.e-4
private