Definition at line 35 of file MOM_EOS_UNESCO.F90.
|
subroutine | calculate_density_scalar_unesco (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_unesco (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. More...
|
|
◆ calculate_density_array_unesco()
subroutine mom_eos_unesco::calculate_density_unesco::calculate_density_array_unesco |
( |
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.
- Parameters
-
[in] | t | Potential temperature relative to the surface in C. |
[in] | s | Salinity in PSU. |
[in] | pressure | Pressure in Pa. |
[out] | rho | In situ density in kg m-3. |
[in] | start | The starting point in the arrays. |
[in] | npts | The number of values to calculate. |
Definition at line 103 of file MOM_EOS_UNESCO.F90.
103 real,
intent(in),
dimension(:) :: t
105 real,
intent(in),
dimension(:) :: s
106 real,
intent(in),
dimension(:) :: pressure
107 real,
intent(out),
dimension(:) :: rho
108 integer,
intent(in) :: start
109 integer,
intent(in) :: npts
122 real :: t_local, t2, t3, t4, t5;
123 real :: s_local, s32, s2;
129 do j=start,start+npts-1
130 p1 = pressure(j)*1.0e-5; p2 = p1*p1;
131 t_local = t(j); t2 = t_local*t_local; t3 = t_local*t2; t4 = t2*t2; t5 = t3*t2;
132 s_local = s(j); s2 = s_local*s_local; s32 = s_local*sqrt(s_local);
136 rho0 = r00 + r10*t_local + r20*t2 + r30*t3 + r40*t4 + r50*t5 + &
137 s_local*(r01 + r11*t_local + r21*t2 + r31*t3 + r41*t4) + &
138 s32*(r032 + r132*t_local + r232*t2) + r02*s2;
142 ks = s00 + s10*t_local + s20*t2 + s30*t3 + s40*t4 + s_local*(s01 + s11*t_local + s21*t2 + s31*t3) + &
143 s32*(s032 + s132*t_local + s232*t2) + &
144 p1*(sp00 + sp10*t_local + sp20*t2 + sp30*t3 + &
145 s_local*(sp01 + sp11*t_local + sp21*t2) + sp032*s32) + &
146 p2*(sp000 + sp010*t_local + sp020*t2 + s_local*(sp001 + sp011*t_local + sp021*t2));
148 rho(j) = rho0*ks / (ks - p1);
◆ calculate_density_scalar_unesco()
subroutine mom_eos_unesco::calculate_density_unesco::calculate_density_scalar_unesco |
( |
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] | t | Potential temperature relative to the surface in C. |
[in] | s | Salinity in PSU. |
[in] | pressure | Pressure in Pa. |
[out] | rho | In situ density in kg m-3. |
Definition at line 67 of file MOM_EOS_UNESCO.F90.
69 real,
intent(in) :: pressure
70 real,
intent(out) :: rho
87 real,
dimension(1) :: t0, s0, pressure0
88 real,
dimension(1) :: rho0
92 pressure0(1) = pressure
94 call calculate_density_array_unesco(t0, s0, pressure0, rho0, 1, 1)
The documentation for this interface was generated from the following file:
- /home/adcroft/GitHub/workspace/Gaea-stats-MOM6-examples/MOM6-examples/src/MOM6/src/equation_of_state/MOM_EOS_UNESCO.F90