MOM6
mom_eos_teos10::calculate_density_teos10 Interface Reference

Detailed Description

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.

Definition at line 28 of file MOM_EOS_TEOS10.F90.

Private functions

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

Functions and subroutines

◆ calculate_density_array_teos10()

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

◆ calculate_density_scalar_teos10()

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

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