MOM6
mom_eos_teos10::calculate_density_teos10 Interface Reference

Detailed Description

Definition at line 39 of file MOM_EOS_TEOS10.F90.

Private functions

subroutine calculate_density_scalar_teos10 (T, S, pressure, rho)
 This subroutine computes the in situ density of sea water (rho in units of kg/m^3) from salinity (S in psu), potential temperature (T in deg C), and pressure in Pa. It uses the expression from TEOS10 website. More...
 
subroutine calculate_density_array_teos10 (T, S, pressure, rho, start, npts)
 

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 
)
private

Definition at line 83 of file MOM_EOS_TEOS10.F90.

83  real, intent(in), dimension(:) :: t, s, pressure
84  real, intent(out), dimension(:) :: rho
85  integer, intent(in) :: start, npts
86 ! * Arguments: T - conservative temperature in C. *
87 ! * (in) S - absolute salinity in g/kg. *
88 ! * (in) pressure - pressure in Pa. *
89 ! * (out) rho - in situ density in kg m-3. *
90 ! * (in) start - the starting point in the arrays. *
91 ! * (in) npts - the number of values to calculate. *
92 
93 ! *====================================================================*
94 ! * This subroutine computes the in situ density of sea water (rho in *
95 ! * units of kg/m^3) from absolute salinity (S in g/Kg), *
96 ! * conservative temperature (T in deg C), and pressure in Pa. *
97 ! * It uses the functions from TEOS10 website *
98 ! *====================================================================*
99  real :: zs,zt,zp
100  integer :: j
101 
102  do j=start,start+npts-1
103  !Conversions
104  zs = s(j) !gsw_sr_from_sp(S(j)) !Convert practical salinity to absolute salinity
105  zt = t(j) !gsw_ct_from_pt(S(j),T(j)) !Convert potantial temp to conservative temp
106  zp = pressure(j)* pa2db !Convert pressure from Pascal to decibar
107 
108  if(s(j).lt.-1.0e-10) cycle !Can we assume safely that this is a missing value?
109  rho(j) = gsw_rho(zs,zt,zp)
110  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 
)
private

This subroutine computes the in situ density of sea water (rho in units of kg/m^3) from salinity (S in psu), potential temperature (T in deg C), and pressure in Pa. It uses the expression from TEOS10 website.

Parameters
[in]tConservative temperature in C.
[in]sAbsolute salinity in g/kg.
[in]pressurePressure in Pa.
[out]rhoIn situ density in kg m-3.

Definition at line 52 of file MOM_EOS_TEOS10.F90.

52 real, intent(in) :: t !< Conservative temperature in C.
53 real, intent(in) :: s !< Absolute salinity in g/kg.
54 real, intent(in) :: pressure !< Pressure in Pa.
55 real, intent(out) :: rho !< In situ density in kg m-3.
56 ! * Arguments: T - conservative temperature in C. *
57 ! * (in) S - absolute salinity in g/kg. *
58 ! * (in) pressure - pressure in Pa. *
59 ! * (out) rho - in situ density in kg m-3. *
60 ! * (in) start - the starting point in the arrays. *
61 ! * (in) npts - the number of values to calculate. *
62 
63 ! *====================================================================*
64 ! * This subroutine computes the in situ density of sea water (rho in *
65 ! * units of kg/m^3) from salinity (S in psu), potential temperature *
66 ! * (T in deg C), and pressure in Pa. It uses the expression from *
67 ! * TEOS10 website. *
68 ! *====================================================================*
69 
70  real, dimension(1) :: t0, s0, pressure0
71  real, dimension(1) :: rho0
72 
73  t0(1) = t
74  s0(1) = s
75  pressure0(1) = pressure
76 
77  call calculate_density_array_teos10(t0, s0, pressure0, rho0, 1, 1)
78  rho = rho0(1)
79 

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