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 expressions derived for use with NEMO.
Definition at line 28 of file MOM_EOS_NEMO.F90.
|
| subroutine | calculate_density_scalar_nemo (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 expressions derived for use with NEMO. More...
|
| |
| subroutine | calculate_density_array_nemo (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 expressions derived for use with NEMO. More...
|
| |
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 expressions derived for use with NEMO.
Definition at line 28 of file MOM_EOS_NEMO.F90.
◆ calculate_density_array_nemo()
| subroutine mom_eos_nemo::calculate_density_nemo::calculate_density_array_nemo |
( |
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 expressions derived for use with NEMO.
- Parameters
-
| [in] | t | Conservative temperature [degC]. |
| [in] | s | Absolute salinity [g kg-1]. |
| [in] | pressure | pressure [Pa]. |
| [out] | rho | in situ density [kg m-3]. |
| [in] | start | the starting point in the arrays. |
| [in] | npts | the number of values to calculate. |
| [in] | rho_ref | A reference density [kg m-3]. |
Definition at line 205 of file MOM_EOS_NEMO.F90.
206 real,
dimension(:),
intent(in) :: T
207 real,
dimension(:),
intent(in) :: S
208 real,
dimension(:),
intent(in) :: pressure
209 real,
dimension(:),
intent(out) :: rho
210 integer,
intent(in) :: start
211 integer,
intent(in) :: npts
212 real,
optional,
intent(in) :: rho_ref
215 real :: zp, zt, zh, zs, zr0, zn, zn0, zn1, zn2, zn3, zs0
218 do j=start,start+npts-1
222 zp = pressure(j)* pa2db
228 zs = sqrt( abs( zs + rdeltas ) * r1_s0 )
234 & + eos112*zs+eos012)*zt &
235 & + (eos202*zs+eos102)*zs+eos002
238 & + eos131*zs+eos031)*zt &
239 & + (eos221*zs+eos121)*zs+eos021)*zt &
240 & + ((eos311*zs+eos211)*zs+eos111)*zs+eos011)*zt &
241 & + (((eos401*zs+eos301)*zs+eos201)*zs+eos101)*zs+eos001
243 zn0 = (((((eos060*zt &
244 & + eos150*zs+eos050)*zt &
245 & + (eos240*zs+eos140)*zs+eos040)*zt &
246 & + ((eos330*zs+eos230)*zs+eos130)*zs+eos030)*zt &
247 & + (((eos420*zs+eos320)*zs+eos220)*zs+eos120)*zs+eos020)*zt &
248 & + ((((eos510*zs+eos410)*zs+eos310)*zs+eos210)*zs+eos110)*zs+eos010)*zt
250 zs0 = (((((eos600*zs+eos500)*zs+eos400)*zs+eos300)*zs+eos200)*zs+eos100)*zs + eos000
252 zr0 = (((((r05 * zp+r04) * zp+r03 ) * zp+r02 ) * zp+r01) * zp+r00) * zp
254 if (
present(rho_ref))
then
255 zn = ( ( zn3 * zp + zn2 ) * zp + zn1 ) * zp + (zn0 + (zs0 - rho_ref))
256 rho(j) = ( zn + zr0 )
258 zn = ( ( zn3 * zp + zn2 ) * zp + zn1 ) * zp + (zn0 + zs0)
259 rho(j) = ( zn + zr0 )
◆ calculate_density_scalar_nemo()
| subroutine mom_eos_nemo::calculate_density_nemo::calculate_density_scalar_nemo |
( |
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 expressions derived for use with NEMO.
- Parameters
-
| [in] | t | Conservative temperature [degC]. |
| [in] | s | Absolute salinity [g kg-1]. |
| [in] | pressure | pressure [Pa]. |
| [out] | rho | In situ density [kg m-3]. |
| [in] | rho_ref | A reference density [kg m-3]. |
Definition at line 180 of file MOM_EOS_NEMO.F90.
181 real,
intent(in) :: T
182 real,
intent(in) :: S
183 real,
intent(in) :: pressure
184 real,
intent(out) :: rho
185 real,
optional,
intent(in) :: rho_ref
187 real :: al0, p0, lambda
189 real,
dimension(1) :: T0, S0, pressure0
190 real,
dimension(1) :: rho0
194 pressure0(1) = pressure
196 call calculate_density_array_nemo(t0, s0, pressure0, rho0, 1, 1, rho_ref)
The documentation for this interface was generated from the following file: