Calculates density of sea water from T, S and P.
Definition at line 60 of file MOM_EOS.F90.
|
subroutine | calculate_density_scalar (T, S, pressure, rho, EOS, rho_ref, scale) |
| Calls the appropriate subroutine to calculate density of sea water for scalar inputs. If rho_ref is present, the anomaly with respect to rho_ref is returned. More...
|
|
subroutine | calculate_density_array (T, S, pressure, rho, start, npts, EOS, rho_ref, scale) |
| Calls the appropriate subroutine to calculate the density of sea water for 1-D array inputs. If rho_ref is present, the anomaly with respect to rho_ref is returned. More...
|
|
◆ calculate_density_array()
subroutine mom_eos::calculate_density::calculate_density_array |
( |
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, |
|
|
type(eos_type), pointer |
EOS, |
|
|
real, intent(in), optional |
rho_ref, |
|
|
real, intent(in), optional |
scale |
|
) |
| |
|
private |
Calls the appropriate subroutine to calculate the density of sea water for 1-D array inputs. If rho_ref is present, the anomaly with respect to rho_ref is returned.
- Parameters
-
[in] | t | Potential temperature referenced to the surface [degC] |
[in] | s | Salinity [ppt] |
[in] | pressure | Pressure [Pa] |
[out] | rho | Density (in-situ if pressure is local) [kg m-3] or [R ~> kg m-3] |
[in] | start | Start index for computation |
[in] | npts | Number of point to compute |
| eos | Equation of state structure |
[in] | rho_ref | A reference density [kg m-3]. |
[in] | scale | A multiplicative factor by which to scale density from kg m-3 to the desired units [R m3 kg-1] |
Definition at line 177 of file MOM_EOS.F90.
177 real,
dimension(:),
intent(in) :: T
178 real,
dimension(:),
intent(in) :: S
179 real,
dimension(:),
intent(in) :: pressure
180 real,
dimension(:),
intent(out) :: rho
181 integer,
intent(in) :: start
182 integer,
intent(in) :: npts
183 type(EOS_type),
pointer :: EOS
184 real,
optional,
intent(in) :: rho_ref
185 real,
optional,
intent(in) :: scale
189 if (.not.
associated(eos))
call mom_error(fatal, &
190 "calculate_density_array called with an unassociated EOS_type EOS.")
192 select case (eos%form_of_EOS)
194 call calculate_density_linear(t, s, pressure, rho, start, npts, &
195 eos%Rho_T0_S0, eos%dRho_dT, eos%dRho_dS, rho_ref)
197 call calculate_density_unesco(t, s, pressure, rho, start, npts, rho_ref)
199 call calculate_density_wright(t, s, pressure, rho, start, npts, rho_ref)
201 call calculate_density_teos10(t, s, pressure, rho, start, npts, rho_ref)
203 call calculate_density_nemo (t, s, pressure, rho, start, npts, rho_ref)
205 call mom_error(fatal, &
206 "calculate_density_array: EOS%form_of_EOS is not valid.")
209 if (
present(scale))
then ;
if (scale /= 1.0)
then
210 do j=start,start+npts-1 ; rho(j) = scale * rho(j) ;
enddo
◆ calculate_density_scalar()
subroutine mom_eos::calculate_density::calculate_density_scalar |
( |
real, intent(in) |
T, |
|
|
real, intent(in) |
S, |
|
|
real, intent(in) |
pressure, |
|
|
real, intent(out) |
rho, |
|
|
type(eos_type), pointer |
EOS, |
|
|
real, intent(in), optional |
rho_ref, |
|
|
real, intent(in), optional |
scale |
|
) |
| |
|
private |
Calls the appropriate subroutine to calculate density of sea water for scalar inputs. If rho_ref is present, the anomaly with respect to rho_ref is returned.
- Parameters
-
[in] | t | Potential temperature referenced to the surface [degC] |
[in] | s | Salinity [ppt] |
[in] | pressure | Pressure [Pa] |
[out] | rho | Density (in-situ if pressure is local) [kg m-3] or [R ~> kg m-3] |
| eos | Equation of state structure |
[in] | rho_ref | A reference density [kg m-3]. |
[in] | scale | A multiplicative factor by which to scale density from kg m-3 to the desired units [R m3 kg-1] |
Definition at line 139 of file MOM_EOS.F90.
139 real,
intent(in) :: T
140 real,
intent(in) :: S
141 real,
intent(in) :: pressure
142 real,
intent(out) :: rho
143 type(EOS_type),
pointer :: EOS
144 real,
optional,
intent(in) :: rho_ref
145 real,
optional,
intent(in) :: scale
148 if (.not.
associated(eos))
call mom_error(fatal, &
149 "calculate_density_scalar called with an unassociated EOS_type EOS.")
151 select case (eos%form_of_EOS)
153 call calculate_density_linear(t, s, pressure, rho, &
154 eos%Rho_T0_S0, eos%dRho_dT, eos%dRho_dS, rho_ref)
156 call calculate_density_unesco(t, s, pressure, rho, rho_ref)
158 call calculate_density_wright(t, s, pressure, rho, rho_ref)
160 call calculate_density_teos10(t, s, pressure, rho, rho_ref)
162 call calculate_density_nemo(t, s, pressure, rho, rho_ref)
164 call mom_error(fatal, &
165 "calculate_density_scalar: EOS is not valid.")
168 if (
present(scale))
then ;
if (scale /= 1.0)
then
The documentation for this interface was generated from the following file:
- /glade/work/altuntas/cesm.sandboxes/cesm2_2_alpha_X_mom/components/mom/MOM6/src/equation_of_state/MOM_EOS.F90