MOM6
mom_eos_wright::calculate_density_wright Interface Reference

Detailed Description

Definition at line 39 of file MOM_EOS_Wright.F90.

Private functions

subroutine calculate_density_scalar_wright (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 Wright, 1997, J. Atmos. Ocean. Tech., 14, 735-740. Coded by R. Hallberg, 7/00. More...
 
subroutine calculate_density_array_wright (T, S, pressure, rho, start, npts)
 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 Wright, 1997, J. Atmos. Ocean. Tech., 14, 735-740. Coded by R. Hallberg, 7/00. More...
 

Functions and subroutines

◆ calculate_density_array_wright()

subroutine mom_eos_wright::calculate_density_wright::calculate_density_array_wright ( 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

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 Wright, 1997, J. Atmos. Ocean. Tech., 14, 735-740. Coded by R. Hallberg, 7/00.

Parameters
[in]tpotential temperature relative to the surface in C.
[in]ssalinity in PSU.
[in]pressurepressure in Pa.
[out]rhoin situ density in kg m-3.
[in]startthe starting point in the arrays.
[in]nptsthe number of values to calculate.

Definition at line 109 of file MOM_EOS_Wright.F90.

109  real, intent(in), dimension(:) :: t !< potential temperature relative to the surface
110  !! in C.
111  real, intent(in), dimension(:) :: s !< salinity in PSU.
112  real, intent(in), dimension(:) :: pressure !< pressure in Pa.
113  real, intent(out), dimension(:) :: rho !< in situ density in kg m-3.
114  integer, intent(in) :: start !< the starting point in the arrays.
115  integer, intent(in) :: npts !< the number of values to calculate.
116 
117 ! * Arguments: T - potential temperature relative to the surface in C. *
118 ! * (in) S - salinity in PSU. *
119 ! * (in) pressure - pressure in Pa. *
120 ! * (out) rho - in situ density in kg m-3. *
121 ! * (in) start - the starting point in the arrays. *
122 ! * (in) npts - the number of values to calculate. *
123 
124 ! *====================================================================*
125 ! * This subroutine computes the in situ density of sea water (rho in *
126 ! * units of kg/m^3) from salinity (S in psu), potential temperature *
127 ! * (T in deg C), and pressure in Pa. It uses the expression from *
128 ! * Wright, 1997, J. Atmos. Ocean. Tech., 14, 735-740. *
129 ! * Coded by R. Hallberg, 7/00 *
130 ! *====================================================================*
131  real :: al0, p0, lambda
132  integer :: j
133 
134  do j=start,start+npts-1
135  al0 = (a0 + a1*t(j)) +a2*s(j)
136  p0 = (b0 + b4*s(j)) + t(j) * (b1 + t(j)*((b2 + b3*t(j))) + b5*s(j))
137  lambda = (c0 +c4*s(j)) + t(j) * (c1 + t(j)*((c2 + c3*t(j))) + c5*s(j))
138 
139  rho(j) = (pressure(j) + p0) / (lambda + al0*(pressure(j) + p0))
140  enddo

◆ calculate_density_scalar_wright()

subroutine mom_eos_wright::calculate_density_wright::calculate_density_scalar_wright ( 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 Wright, 1997, J. Atmos. Ocean. Tech., 14, 735-740. Coded by R. Hallberg, 7/00.

Parameters
[in]tPotential temperature relative to the surface in C.
[in]sSalinity in PSU.
[in]pressurePressure in Pa.
[out]rhoIn situ density in kg m-3.

Definition at line 69 of file MOM_EOS_Wright.F90.

69 real, intent(in) :: t !< Potential temperature relative to the surface in C.
70 real, intent(in) :: s !< Salinity in PSU.
71 real, intent(in) :: pressure !< Pressure in Pa.
72 real, intent(out) :: rho !< In situ density in kg m-3.
73 
74 ! * Arguments: T - potential temperature relative to the surface in C. *
75 ! * (in) S - salinity in PSU. *
76 ! * (in) pressure - pressure in Pa. *
77 ! * (out) rho - in situ density in kg m-3. *
78 ! * (in) start - the starting point in the arrays. *
79 ! * (in) npts - the number of values to calculate. *
80 
81 ! *====================================================================*
82 ! * This subroutine computes the in situ density of sea water (rho in *
83 ! * units of kg/m^3) from salinity (S in psu), potential temperature *
84 ! * (T in deg C), and pressure in Pa. It uses the expression from *
85 ! * Wright, 1997, J. Atmos. Ocean. Tech., 14, 735-740. *
86 ! * Coded by R. Hallberg, 7/00 *
87 ! *====================================================================*
88 
89  real :: al0, p0, lambda
90  integer :: j
91  real, dimension(1) :: t0, s0, pressure0
92  real, dimension(1) :: rho0
93 
94  t0(1) = t
95  s0(1) = s
96  pressure0(1) = pressure
97 
98  call calculate_density_array_wright(t0, s0, pressure0, rho0, 1, 1)
99  rho = rho0(1)
100 

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