MOM6
mom_eos::calculate_density_derivs Interface Reference

Detailed Description

Calculate the derivatives of density with temperature and salinity from T, S, and P.

Definition at line 70 of file MOM_EOS.F90.

Private functions

subroutine calculate_density_derivs_scalar (T, S, pressure, drho_dT, drho_dS, EOS)
 Calls the appropriate subroutines to calculate density derivatives by promoting a scalar to a one-element array. More...
 
subroutine calculate_density_derivs_array (T, S, pressure, drho_dT, drho_dS, start, npts, EOS)
 Calls the appropriate subroutine to calculate density derivatives for 1-D array inputs. More...
 

Functions and subroutines

◆ calculate_density_derivs_array()

subroutine mom_eos::calculate_density_derivs::calculate_density_derivs_array ( 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,
type(eos_type), pointer  EOS 
)
private

Calls the appropriate subroutine to calculate density derivatives for 1-D array inputs.

Parameters
[in]tPotential temperature referenced to the surface [degC]
[in]sSalinity [ppt]
[in]pressurePressure [Pa]
[out]drho_dtThe partial derivative of density with potential temperature [kg m-3 degC-1].
[out]drho_dsThe partial derivative of density with salinity, in [kg m-3 ppt-1].
[in]startStarting index within the array
[in]nptsThe number of values to calculate
eosEquation of state structure

Definition at line 337 of file MOM_EOS.F90.

337  real, dimension(:), intent(in) :: T !< Potential temperature referenced to the surface [degC]
338  real, dimension(:), intent(in) :: S !< Salinity [ppt]
339  real, dimension(:), intent(in) :: pressure !< Pressure [Pa]
340  real, dimension(:), intent(out) :: drho_dT !< The partial derivative of density with potential
341  !! temperature [kg m-3 degC-1].
342  real, dimension(:), intent(out) :: drho_dS !< The partial derivative of density with salinity,
343  !! in [kg m-3 ppt-1].
344  integer, intent(in) :: start !< Starting index within the array
345  integer, intent(in) :: npts !< The number of values to calculate
346  type(EOS_type), pointer :: EOS !< Equation of state structure
347 
348  if (.not.associated(eos)) call mom_error(fatal, &
349  "calculate_density_derivs called with an unassociated EOS_type EOS.")
350 
351  select case (eos%form_of_EOS)
352  case (eos_linear)
353  call calculate_density_derivs_linear(t, s, pressure, drho_dt, drho_ds, eos%Rho_T0_S0, &
354  eos%dRho_dT, eos%dRho_dS, start, npts)
355  case (eos_unesco)
356  call calculate_density_derivs_unesco(t, s, pressure, drho_dt, drho_ds, start, npts)
357  case (eos_wright)
358  call calculate_density_derivs_wright(t, s, pressure, drho_dt, drho_ds, start, npts)
359  case (eos_teos10)
360  call calculate_density_derivs_teos10(t, s, pressure, drho_dt, drho_ds, start, npts)
361  case (eos_nemo)
362  call calculate_density_derivs_nemo(t, s, pressure, drho_dt, drho_ds, start, npts)
363  case default
364  call mom_error(fatal, &
365  "calculate_density_derivs_array: EOS%form_of_EOS is not valid.")
366  end select
367 

◆ calculate_density_derivs_scalar()

subroutine mom_eos::calculate_density_derivs::calculate_density_derivs_scalar ( real, intent(in)  T,
real, intent(in)  S,
real, intent(in)  pressure,
real, intent(out)  drho_dT,
real, intent(out)  drho_dS,
type(eos_type), pointer  EOS 
)
private

Calls the appropriate subroutines to calculate density derivatives by promoting a scalar to a one-element array.

Parameters
[in]tPotential temperature referenced to the surface [degC]
[in]sSalinity [ppt]
[in]pressurePressure [Pa]
[out]drho_dtThe partial derivative of density with potential temperature [kg m-3 degC-1].
[out]drho_dsThe partial derivative of density with salinity, in [kg m-3 ppt-1].
eosEquation of state structure

Definition at line 373 of file MOM_EOS.F90.

373  real, intent(in) :: T !< Potential temperature referenced to the surface [degC]
374  real, intent(in) :: S !< Salinity [ppt]
375  real, intent(in) :: pressure !< Pressure [Pa]
376  real, intent(out) :: drho_dT !< The partial derivative of density with potential
377  !! temperature [kg m-3 degC-1].
378  real, intent(out) :: drho_dS !< The partial derivative of density with salinity,
379  !! in [kg m-3 ppt-1].
380  type(EOS_type), pointer :: EOS !< Equation of state structure
381  if (.not.associated(eos)) call mom_error(fatal, &
382  "calculate_density_derivs called with an unassociated EOS_type EOS.")
383 
384  select case (eos%form_of_EOS)
385  case (eos_linear)
386  call calculate_density_derivs_linear(t, s, pressure, drho_dt, drho_ds, &
387  eos%Rho_T0_S0, eos%dRho_dT, eos%dRho_dS)
388  case (eos_wright)
389  call calculate_density_derivs_wright(t, s, pressure, drho_dt, drho_ds)
390  case (eos_teos10)
391  call calculate_density_derivs_teos10(t, s, pressure, drho_dt, drho_ds)
392  case default
393  call mom_error(fatal, &
394  "calculate_density_derivs_scalar: EOS%form_of_EOS is not valid.")
395  end select
396 

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