MOM6
mom_eos_linear::calculate_density_linear Interface Reference

Detailed Description

Compute the density of sea water (in kg/m^3), or its anomaly from a reference density, using a simple linear equation of state from salinity (in psu), potential temperature (in deg C) and pressure [Pa].

Definition at line 27 of file MOM_EOS_linear.F90.

Private functions

subroutine calculate_density_scalar_linear (T, S, pressure, rho, Rho_T0_S0, dRho_dT, dRho_dS, rho_ref)
 This subroutine computes the density of sea water with a trivial linear equation of state (in [kg m-3]) from salinity (sal [PSU]), potential temperature (T [degC]), and pressure [Pa]. More...
 
subroutine calculate_density_array_linear (T, S, pressure, rho, start, npts, Rho_T0_S0, dRho_dT, dRho_dS, rho_ref)
 This subroutine computes the density of sea water with a trivial linear equation of state (in kg/m^3) from salinity (sal in psu), potential temperature (T [degC]), and pressure [Pa]. More...
 

Functions and subroutines

◆ calculate_density_array_linear()

subroutine mom_eos_linear::calculate_density_linear::calculate_density_array_linear ( 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)  Rho_T0_S0,
real, intent(in)  dRho_dT,
real, intent(in)  dRho_dS,
real, intent(in), optional  rho_ref 
)
private

This subroutine computes the density of sea water with a trivial linear equation of state (in kg/m^3) from salinity (sal in psu), potential temperature (T [degC]), and pressure [Pa].

Parameters
[in]tpotential temperature relative to the surface [degC].
[in]ssalinity [PSU].
[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_t0_s0The density at T=0, S=0 [kg m-3].
[in]drho_dtThe derivatives of density with temperature [kg m-3 degC-1].
[in]drho_dsThe derivatives of density with salinity in [kg m-3 ppt-1].
[in]rho_refA reference density [kg m-3].

Definition at line 82 of file MOM_EOS_linear.F90.

82  real, dimension(:), intent(in) :: T !< potential temperature relative to the surface [degC].
83  real, dimension(:), intent(in) :: S !< salinity [PSU].
84  real, dimension(:), intent(in) :: pressure !< pressure [Pa].
85  real, dimension(:), intent(out) :: rho !< in situ density [kg m-3].
86  integer, intent(in) :: start !< the starting point in the arrays.
87  integer, intent(in) :: npts !< the number of values to calculate.
88  real, intent(in) :: Rho_T0_S0 !< The density at T=0, S=0 [kg m-3].
89  real, intent(in) :: dRho_dT !< The derivatives of density with temperature
90  !! [kg m-3 degC-1].
91  real, intent(in) :: dRho_dS !< The derivatives of density with salinity
92  !! in [kg m-3 ppt-1].
93  real, optional, intent(in) :: rho_ref !< A reference density [kg m-3].
94  ! Local variables
95  integer :: j
96 
97  if (present(rho_ref)) then ; do j=start,start+npts-1
98  rho(j) = (rho_t0_s0 - rho_ref) + (drho_dt*t(j) + drho_ds*s(j))
99  enddo ; else ; do j=start,start+npts-1
100  rho(j) = rho_t0_s0 + drho_dt*t(j) + drho_ds*s(j)
101  enddo ; endif
102 

◆ calculate_density_scalar_linear()

subroutine mom_eos_linear::calculate_density_linear::calculate_density_scalar_linear ( real, intent(in)  T,
real, intent(in)  S,
real, intent(in)  pressure,
real, intent(out)  rho,
real, intent(in)  Rho_T0_S0,
real, intent(in)  dRho_dT,
real, intent(in)  dRho_dS,
real, intent(in), optional  rho_ref 
)
private

This subroutine computes the density of sea water with a trivial linear equation of state (in [kg m-3]) from salinity (sal [PSU]), potential temperature (T [degC]), and pressure [Pa].

Parameters
[in]tPotential temperature relative to the surface [degC].
[in]sSalinity [PSU].
[in]pressurepressure [Pa].
[out]rhoIn situ density [kg m-3].
[in]rho_t0_s0The density at T=0, S=0 [kg m-3].
[in]drho_dtThe derivatives of density with temperature [kg m-3 degC-1].
[in]drho_dsThe derivatives of density with salinity in [kg m-3 ppt-1].
[in]rho_refA reference density [kg m-3].

Definition at line 58 of file MOM_EOS_linear.F90.

58  real, intent(in) :: T !< Potential temperature relative to the surface [degC].
59  real, intent(in) :: S !< Salinity [PSU].
60  real, intent(in) :: pressure !< pressure [Pa].
61  real, intent(out) :: rho !< In situ density [kg m-3].
62  real, intent(in) :: Rho_T0_S0 !< The density at T=0, S=0 [kg m-3].
63  real, intent(in) :: dRho_dT !< The derivatives of density with temperature
64  !! [kg m-3 degC-1].
65  real, intent(in) :: dRho_dS !< The derivatives of density with salinity
66  !! in [kg m-3 ppt-1].
67  real, optional, intent(in) :: rho_ref !< A reference density [kg m-3].
68 
69  if (present(rho_ref)) then
70  rho = (rho_t0_s0 - rho_ref) + (drho_dt*t + drho_ds*s)
71  else
72  rho = rho_t0_s0 + drho_dt*t + drho_ds*s
73  endif
74 

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