MOM6
mom_eos_teos10::calculate_density_second_derivs_teos10 Interface Reference

Detailed Description

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.

Definition at line 47 of file MOM_EOS_TEOS10.F90.

Private functions

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

Functions and subroutines

◆ calculate_density_second_derivs_array_teos10()

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

◆ calculate_density_second_derivs_scalar_teos10()

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

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