Module ocean_density_mod
OVERVIEW
Compute density and related quantities.
This module computes the in-situ density and its partial derivatives with
respect to conservative temperature or potential temperature, and with
respect to salinity.
There are three basic means for performing this calculation.
A/ Linear equation for use in idealized studies
This equation renders density a linear function of potential
temperature and salinity. All nonlinearities are ignored, as are
pressure effects.
The valid range for theta and salinity arbitrary for the
linear equation of state.
B/ pre-TEOS10 method: this method uses density as a rational
polynomial function of potential temperature, practical salinity,
and gauge pressure. There is also an implementation that computes
density as a function of conservative temperature rather than
potential temperature. The equation of state is based on that
documented in Jackett, McDougall, Feistel, Wright, and Griffies(2006).
This equation of state is valid over a "cone-shaped" range
corresponding to
0psu <= salinity <= 40 psu
-3C <= theta <= 40C "theta" = either conservative or potential temp
0dbar <= pressure <= 8000dbar
with the cone getting smaller in the deeper ocean where
theta and salinity vary over a smaller range.
Input variables are the following:
--salinity in psu or g/kg
--conservative temperature or potential temperature (theta) in deg C
--pressure in dbars (1bar = 10dbar = 10^5 Newton/m^2 = 10^5 Pascals).
Note that in the ocean, pressure increases roughly by 1dbar for each meter depth.
Also note that pressure is the "sea pressure", which is the absolute pressure
minus the pressure of a standard atmosphere, which is 10.1325 dbars.
check values
for "theta" = conservative temperature
rho(s=20psu,theta=20C,p=1000dbar) = 1017.842890411975 (kg/m^3)
alpha(s=20psu,theta=20C,p=1000dbar) = 2.436057013634649e-4 (1/C)
beta(s=20psu,theta=20C,p=1000dbar) = 7.314818108935248e-4 (1/psu)
for "theta" = potential temperature
rho(s=20psu,theta=20C,p=1000dbar) = 1017.728868019642 (kg/m^3)
alpha(s=20psu,theta=20C,p=1000dbar) = 2.525481286927133e-4 (1/C)
beta(s=20psu,theta=20C,p=1000dbar) = 7.379638527217575e-4 (1/psu)
This equation of state should be suitable for purposes of realistic
global ocean climate modeling.
C/ TEOS10 method: this method makes use of the recommendations from
the SCOR working group on seawater thermodynamics, 2010. Here, density
is a function of conservative temperature and absolute salinity.
The equation is valid from 0 g/kg salinty to a very large value.
OTHER MODULES USED
constants_mod
diag_manager_mod
fms_mod
fms_io_mod
mpp_domains_mod
mpp_mod
platform_mod
time_manager_mod
field_manager_mod
ocean_domains_mod
ocean_operators_mod
ocean_parameters_mod
ocean_pressure_mod
ocean_types_mod
ocean_util_mod
ocean_workspace_mod
PUBLIC INTERFACE
PUBLIC ROUTINES
-
ocean_density_init
-
DESCRIPTION
-
Initialize the density module
-
density_diagnostics_init
-
DESCRIPTION
-
Register the diagnostic fields.
-
density_coeffs_init
-
DESCRIPTION
-
Initialize the EOS coefficients, and write some test values.
-
ocean_density_diag
-
DESCRIPTION
-
Diagnostic ocean density fields: neutral density and potential density.
Also send some diagnostics to diagnostic manager.
-
update_ocean_density_salinity
-
DESCRIPTION
-
If TEOS-10 is being used then we need to multiply Preformed Salinity and the
Salinity factor to obtain absolute salinity for use in the TEOS10 EOS.
If not using TEOS10 EOS, then copy the practical salinity into the
density_salinity field for use in the preTEOS10 EOS or the linear EOS.
Note that halo values are not generally valid for taup1 until the halos
for index_salt and index_Fdelta have been updated inside of ocean_model.F90.
-
update_ocean_density
-
DESCRIPTION
-
Diagnose pressure_at_depth and ocean density.
Also send some diagnostics to diagnostic manager.
-
density_field
-
DESCRIPTION
-
Compute density for all grid points.
Note that pressure here is
sea pressure = absolute pressure - press_standard (dbars)
and salinity is in model units (psu or g/kg).
-
density_level
-
DESCRIPTION
-
Compute density at a particular k-level.
Note that pressure here is
sea pressure = absolute pressure - press_standard (dbars)
-
density_line
-
DESCRIPTION
-
Compute density at a particular k-level and j index. This scheme
is used in the vectorized version of the full convection scheme.
Note that pressure here is
sea pressure = absolute pressure - press_standard
-
neutral_density_field
-
DESCRIPTION
-
Compute neutral density for use in various layer diagnostics.
Two options are presently available:
A/ use rational polynomial (to be done)
B/ use potential density referenced to pressure potrho_press
McDougall recommends potential density referenced to 2000dbar,
since the rational polynomial is not too good.
Note that presently, the rational polynomial method defaults to
potential density referenced to 2000dbar.
The polynomial approximation from McDougall and Jackett (2005)
is not recommended (as per Trevor McDougall, 2011). A new polynomial
is being constructed and should be ready end of 2011.
-
neutral_density_point
-
DESCRIPTION
-
Compute neutral density for use in various layer diagnostics.
Only test here the rational polynomial
approximation given by McDougall and Jackett (2005).
This test needs to be updated.
-
potential_density
-
DESCRIPTION
-
Compute potential density referenced to some given sea pressure.
Note that potential density referenced to the surface (i.e., sigma_0)
has a zero sea pressure, so pressure=0.0 should be the argument
to the function.
Note that pressure here is
sea pressure = absolute pressure - press_standard (dbars)
input pressure < 0 is an error, and model is brought down.
-
compute_density_diagnostics
-
DESCRIPTION
-
Diagnostics related to density.
-
compute_diagnostic_factors
-
DESCRIPTION
-
1/ Compute ratio |grad neutral rho| / |grad local ref pot rho|
for use in tform water mass analysis as per Iudicone et al. (2008).
2/ Compute rho*Area(h)/gamma_h, where "h" is the direction where
gamma has the largest stratification, and where gamma is the
locally referenced potential density.
-
density_sfc
-
DESCRIPTION
-
Compute density as a function of surface salinity, surface theta,
and in situ sea pressure.
Note that pressure here is
sea pressure = absolute pressure - press_standard (dbars)
For use in KPP mixed layer scheme
-
density_point
-
DESCRIPTION
-
Compute density at a single model grid point.
Note that pressure here is
sea pressure = absolute pressure - press_standard (dbars)
-
density_derivs_field
-
DESCRIPTION
-
Compute partial derivative of density with respect to
temperature and with respect to salinity. Hold pressure constant.
Pressure here is
sea pressure = absolute press - press_standard (dbars)
-
density_derivs_level
-
DESCRIPTION
-
Compute partial derivative of density with respect to
temperature and with respect to salinity. Hold pressure constant.
Pressure here is sea pressure = absolute press - press_standard
-
density_derivs_point
-
DESCRIPTION
-
Compute partial derivative of density with respect to
temperature and with respect to salinity. Do so here for a point.
Pressure here is
sea pressure = absolute pressure - press_standard (dbars)
-
cabbeling_thermobaricity
-
DESCRIPTION
-
Diagnostic sends for cabbeling and thermobaricity parameters.
Pressure here is
sea pressure = absolute press - press_standard (dbars)
-
calc_cabbeling_thermobaricity
-
DESCRIPTION
-
Compute cabbeling and thermobaricity parameters, as defined in
McDougall (1987).
Pressure here is
sea pressure = absolute press - press_standard (dbars)
-
density_delta_z
-
DESCRIPTION
-
rho(k)-rho(k+1) for all i,j with both temperatures referenced to the
deeper pressure depth.
Of use for KPP scheme.
-
density_delta_sfc
-
DESCRIPTION
-
rho(1)-rho(k+1) for all i,j.
Of use for KPP scheme.
-
ocean_density_end
-
DESCRIPTION
-
Write density and pressure_at_depth to a restart.
-
ocean_density_restart
-
DESCRIPTION
-
Write out restart files registered through register_restart_file
-
ocean_density_chksum
-
DESCRIPTION
-
Compute checksums for density.
-
compute_buoyfreq
-
DESCRIPTION
-
Diagnose the buoyancy frequency, both at T-points and at
vertical interfaces of T-cells.
Author: Stephen.Griffies
-
buoyfreq2
-
DESCRIPTION
-
Diagnose the square of the buoyancy frequency at the bottom of
T-cells, NOT at T-points.
The algorithm follows that used by the private function
compute_buoyfreq in the density module.
We take the square of the buoyancy frequency as is, we do not
smooth or force it to be positive. This allows us to search for
instabilities.
Authors: m.bates
NAMELIST
&ocean_density_nml
-
write_a_restart
Set true to write a restart. False setting only for rare
cases where wish to benchmark model without measuring the cost
of writing restarts and associated chksums.
Default is write_a_restart=.true.
[logical]
-
press_standard
Standard atmospheric pressure (dbar). The realistic
EOS used in MOM requires "sea pressure" as an argument
rather than absolute pressure. Sea pressure is
absolute pressure minus a standard atmospheric pressure
of 10.1325dbar.
For models that do have a realistic atmospheric loading, then it
is appropriate to remove 10.1325dbar prior to computing the EOS.
For those cases with zero atmospheric pressure, then it is not
necessary to remove the standard atmosphere. The default for the
press_standard is 0.0dbar.
[real, units: dbar]
-
t_test
Conservative temperature or potential temperature for
testing the EOS.
[real, units: C]
-
s_test
Salinity for testing the EOS.
[real, units: psu or g/kg]
-
p_test
Sea pressure for testing the EOS.
[real, units: dbar]
-
tn_test
Conservative temperature or potential temperature for
testing the equation for neutral density.
[real, units: C]
-
sn_test
Salinity the equation for neutral density.
[real, units: psu or g/kg]
-
eos_teos10
Set to true to use TEOS-10 equation of state, which
is a function of conservative temperature and absolute
salinity.
Default eos_teos10=.false.
[logical]
-
eos_preteos10
Set to true to use pre-TEOS-10 equation of state, which
is a function of potential temperature and practical salinity,
or conservative temperature and practical salinity.
Default eos_preteos10=.false.
[logical]
-
eos_linear
Set to true to use an idealized linear equation of state, which
has no pressure dependence, and is a linear function of salinity
and temperature.
Default eos_linear=.false.
[logical]
-
alpha_linear_eos
Constant "thermal expansion coefficient" for linear EOS
rho = rho0 - alpha_linear_eos*theta + beta_linear_eos*salinity
[real]
-
beta_linear_eos
Constant "saline contraction coefficient" for linear EOS
rho = rho0 - alpha_linear_eos*theta + beta_linear_eos*salinity
[real]
-
potrho_press
Reference sea pressure for computing diagnostic potential density
of use for computing diagnostics with potential density.
Default potrho_press=2000.0
[real, units: dbar]
-
potrho_min
Minimum potential density used to partition vertical according
to potential density.
[real, units: kg/m^3]
-
potrho_max
Maximum potential density used to partition vertical according
to potential density.
[real, units: kg/m^3]
-
neutral_density_omega
Set to true to compute the neutral density according to
the omega method based on Klocker and McDougall.
This approach has not yet been coded. Presently as a
placeholder we use potential density referenced to 2000dbar.
Default neutral_density_omega=.false.
[logical]
-
neutral_density_potrho
Set to true to compute the neutral density as just
a selected potential density, set according to potrho_press.
Since the neutral_density_omega approach has yet to be coded,
we only have the neutral_density_potrho option to choose from
at this time.
Default neutral_density_potrho=.true.
[logical]
-
neutralrho_min
Minimum neutral density used to partition vertical according
to rational polynomial approximation to neutral density.
[real, units: kg/m^3]
-
neutralrho_max
Maximum neutral density used to partition vertical according
to rational polynomial approximation to neutral density.
[real, units: kg/m^3]
-
theta_min
Minimum conservative temperature or potential temperature used to
partition vertical according to temperature.
[real, units: C]
-
theta_max
Maximum conservative temperature or potential temperature used to
partition vertical according to temperature.
[real, units: C]
-
layer_nk
Number of classes used to partition vertical according to potential density,
conservative temperature, or potential temperature. Used for diagnostics.
[integer]
-
buoyfreq_smooth_vert
To smooth the vertical temp and salt derivative for diagnosing
the buoyancy frequency. Default buoyfreq_smooth_vert=.true.
[logical]
-
epsln_drhodz
To normalize the inverse vertical derivative of neutral density
for computing the buoyancy frequency. Default epsln_drhodz=1e-10.
[real, units: kg/m4]
-
epsln_drhodz_diag
To normalize the inverse vertical derivative of neutral density
for computing neutral_rho and wdian diagnostics.
Default epsln_drhodz_diag=1e-10.
[real, units: kg/m4]
-
smax_diag
A diagnostic maximum neutral slope for use in computing which direction
is deemed the most stratified. For use in computing the stratification_factor
which is then used to diagnose the dianeutral mass transport.
smax_diag should corresond to the choice used in neutral diffusion scheme.
Should have 0 <= smax_diag <= 1.0.
Default smax_diag=-1.0, in which case we compute the smax according to
the vertical to horizontal grid aspect ratio. This method ensures that
the slope is adequately "resolved" by the grid.
[real, units: dimensionless]
-
smax_min_in_column
To compute the diagnostic maximum neutral slope within a column as the minimum
vertical to horizontal grid aspect ratio. This method ensures that
the slope is adequately "resolved" by the grid, and that all depths use the
same definition of "resolved", even if presumably thicker grid cells can
"resolve" larger neutral slopes. This approach is not very useful generally,
so it is retained only for testing purposes.
Default smax_min_in_column=.false.
[logical]
-
mask_domain_restart
For cases where use the domain masking, it is necessary to initialize the field
denominator_r to nonzero in order to avoid NaNs in the case when change processor
layout in between restarts. Note that when use solid wall boundary conditions,
this logical should remain false in order to bitwise reproduce across restarts.
Default mask_domain_restart=.false.
[logical]
-
drhodz_diag_stable
When computing drhodz_diag, we can enforce that it is negative,
thus reflecting a stable stratification. The field drhodz_diag
is used for many water mass transformation diagnostics, such as
wdian_rho. Allowing for unstable profiles can bias the wdian_rho
calculation in an improper way, since the magnitude of drhodz_diag
is very small when it is positive, whereas it is larger magnitude when
negative. Default drhodz_diag_stable=.true.
[logical]
-
grad_nrho_lrpotrho_compute
To perform the diagnostic calculation of grad_nrho_lrpotrho
for analysis diagnostics. This factor is not well constrained,
and can be problematic in certain regions. So presently we do
not recommend computing it, so that the default
is grad_nrho_lrpotrho_compute=.false.
[logical]
-
grad_nrho_lrpotrho_max
Maximum value used for grad_nrho_lrpotrho.
Default grad_nrho_lrpotrho_max=10.
[real, units: dimensionless]
-
grad_nrho_lrpotrho_min
Minimum value used for grad_nrho_lrpotrho.
Default grad_nrho_lrpotrho_min=1.
[real, units: dimensionless]
-
smooth_stratification_factor
For doing an S2D smoothing of the stratification factor used
for diagnostic purposes. Requires an extra call to mpp update.
Default smooth_stratification_factor=.false. since the smoothing
incurs a cost that should be borne only when desired.
[logical]
-
update_diagnostic_factors
To update the watermass_factor and stratification_factor
for use in the water mass transformation diagnostics.
Default update_diagnostic_factors=.false.
[logical]
-
debug_this_module
For debugging nonlinear equation of state
[logical]
-
rho0_density
For debugging, it is often useful to have rho=rho0 uniform.
[logical]
-
density_equal_potrho
For idealized tests, set the in situ density equal to the
potential density referenced to potrho_press. All density
derivatives will also be computed with respect to constant
potrho_press pressure.
Default density_equal_potrho=.false.
[logical]
-
do_bitwise_exact_sum
Set true to do bitwise exact global sum. When it is false, the global
sum will be non-bitwise_exact, but will significantly increase
efficiency.
default: do_bitwise_exact_sum=.false.
[logical]
REFERENCES
-
McDougall T.J., P.M. Barker, R. Feistel and D.R. Jackett, 2011: A
computationally efficient 48-term expression for the density of
seawater in terms of Conservative Temperature, and related properties
of seawater. To be submitted to Ocean Science.
-
IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
seawater 2010: Calculation and use of thermodynamic properties.
Intergovernmental Oceanographic Commission, Manuals and Guides No.
56, UNESCO (English), 196 pp.
-
D. Iudicone, G. Madec, and T.J. McDougall (2008)
Water-mass transformations in a neutral density framework and the
key role of light penetration. JPO vol 38, pages 1357-1376.
-
Jackett, McDougall, Feistel, Wright, and Griffies (2006)
Algorithms for density, potential temperature, conservative
temperature, and freezing temperature of seawater.
Journal of Atmospheric and Oceanic Technology, 2006,
volume 23, pages 1709-1728.
-
McDougall and Jackett (2005)
The material derivative of neutral density
Journal of Marine Research, vol 63, pages 159-185.
-
Feistel (2003), A new extended Gibbs thermodynamic potential
of seawater. Progress in Oceanography. vol 58, pages 43-114.
-
S.M. Griffies, M.J. Harrison, R.C. Pacanowski, and A. Rosati
A Technical Guide to MOM4 (2003)
-
S.M. Griffies, R.C. Pacanowski, R.M. Schmidt, and V. Balaji
Tracer Conservation with an Explicit Free Surface Method for
Z-coordinate Ocean Models
Monthly Weather Review (2001) vol 129 pages 1081--1098
-
T. McDougall (1987)
Cabbeling, Thermobaricity, and water mass conversion
JGR vol 92, pages 5448-5464
NOTES
Density is computed as a function of conservative temperature (degC)
or potential temperature (degC), salinity (psu or g/kg), and pressure (dbar).
The pressure contribution includes that from the free surface height
and the applied atmospheric and/or sea ice pressure. However, it is referenced
to standard atmosphere, so that we use the "gauge" pressure rather than the
full in-situ pressure.
For vert_coordinate==GEOPOTENTIAL, ZSTAR, or ZSIGMA, baroclinic component of
hydrostatic pressure is not known until density is known. In this case,
the baroclinic pressure contribution to density is lagged by a time step.
rho(tau) = rho[theta(tau),s(tau), p_atm(tau) + p_fs(tau) + p_baroclinic(tau-1)].
This issue does not arise when using vert_coordinate=PRESSURE, PSTAR, or PSIGMA.