MOM6
mom_eos_teos10::calculate_density_derivs_teos10 Interface Reference

Detailed Description

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

Definition at line 41 of file MOM_EOS_TEOS10.F90.

Private functions

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

Functions and subroutines

◆ calculate_density_derivs_array_teos10()

subroutine mom_eos_teos10::calculate_density_derivs_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 

◆ calculate_density_derivs_scalar_teos10()

subroutine mom_eos_teos10::calculate_density_derivs_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)

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