Initialize the ocean_tracer_diag module containing subroutines
diagnosing tracer related properties of the simulation. These are
not terms in the equations, but rather they are diagnosed from
terms.
ocean_tracer_diagnostics
DESCRIPTION
Call diagnostics related to the tracer fields.
mixed_layer_depth
DESCRIPTION
Diagnose mixed layer depth (m), which is defined as the depth ( > 0 )
where the buoyancy difference with respect to the surface level is
equal to sfchmxl (=0.0003) (m/s2). Use dbsfc, which is defined on zt levels.
Note that the diagnosed mixed layer depth is only used for diagnostics.
tracer_change
DESCRIPTION
Compute change in tracer over a time step. Compate global change
in tracer to global integral of boundary forcing. Compute error
due to any mis-match. This routine is very useful for detecting
bugs in tracer routines.
total_tracer
DESCRIPTION
Compute integrated tracer in model.
total_volume
DESCRIPTION
Compute total ocean tracer cell volume.
tracer_integrals
DESCRIPTION
Compute some integrated tracer diagnostics.
tracer_land_cell_check
DESCRIPTION
Check to be sure ocean tracer is zero over land
volume_conservation
DESCRIPTION
Compute change in volume over many time steps, and compare to the
input of volume through surface to check for volume conservation.
itts_volume=1 through itte_volume=4 for accumulating fluxes
itt=itts_volume=1=tau we use taum1=1/2 to get starting volume
itt=itte_volume=4=tau we use taup1=9/2 to get the final volume
tracer_conservation
DESCRIPTION
Compute change in global integrated tracer over many time steps,
and compare to the input of tracer through the boundaries to
check for total tracer conservation.
Accumulate fluxes as in the volume_conservation diagnostic.
diagnose_kappa_sort
DESCRIPTION
Routine to diagnose the amount of mixing between classes of a
particular tracer. Temperature is used as default.
Method follows that used in the paper
Spurious diapycnal mixing associated with advection in a
z-coordinate ocean model, 2000: S.M. Griffies, R.C.
Pacanowski, and R.W. Hallberg. Monthly Weather Review, vol 128, 538--564.
This diagnostic is most useful when computing the levels of
effective dia-tracer mixing occuring in a model.
Algorithm notes:
-assumes flat ocean bottom--non-flat bottoms loose the precise relation
between sorted depth and true ocean depth. This is a minor inconvenience.
-defines some global arrays, so requires large memory.
this restriction can be removed if parallel sort is
implemented. so far, such has not been done.
volunteers are welcome to contribute a parallel sort.
-Effective kappa is set to zero at bottom of bottom-most cell
and top of top-most cell in order to ensure zero flux
conditions at the column boundaries. This is not appropriate
when running with surface and/or bottom no-flux conditions.
-Robust effective kappas require > 4 time steps--steps 1-4 corrupted.
-Uncomment the !!$ lines when link to the proper NAG routines.
diagnose_kappa_simple
DESCRIPTION
Routine to diagnose the amount of mixing between classes of a
particular tracer. Temperature is used as default.
Compute horizontal average of temp to define a stable profile.
Evolution of this profile defines an effective diffusity.
This diffusivity is different than the one diagnosed
from the adiabatic sorting approach. The sorting approach is
more relevant. The two approaches agree when there
is zero baroclinicity, and the present simple scheme is
useful ONLY for debugging the more complex sorting routine.
diagnose_depth_of_potrho
DESCRIPTION
Diagnose depth (m) of a potential density surface. Method uses linear
interpolation to find the depth of a potential rho surface.
Scheme currently does not forward (backwards) interpolate if
rho surface lies within lowest (uppermost) grid cell. Nor does
it account for partial bottom cells or free surface. Hence, depths
for isopycnals near surface or bottom boundaries may be corrupted.
Diagnostic only makes sense when potrho is monotonically
increasing with depth.
Diagnose depth (m) of a potential temperature surface. Method uses
linear interpolation to find the depth of a potential temp surface.
Scheme currently does not forward (backwards) interpolate if
theta surface lies within lowest (uppermost) grid cell. Nor does
it account for partial bottom cells or free surface. Hence, depths
for theta surfaces near ocean surface or bottom boundaries may be
corrupted. Diagnostic only makes sense when theta is monotonically
decreasing with depth.
Author: Stephen.Griffies@noaa.gov
Zhi.Liang@noaa.gov
based on "diagnose_depth_of_potrho" by Harper.Simmons@noaa.gov
potrho_mixed_layer
DESCRIPTION
Determine mixed layer depth and potential density at mixed layer base
according to depth at which buoyancy is greater than buoyancy_crit
relative to the surface. Compute the buoyancy using potential
density, rather than the insitu density, since we aim for this
diagnostic to be comparable to diagnostics from isopcynal models.
send_total_tracer
DESCRIPTION
Send total tracer to diagnostic manager.
NAMELIST
&ocean_tracer_diag_nml
tracer_conserve_days
Number of days between which compute the tracer conservation diagnostics. [real, units: days]
diag_freq
Number of time steps between which compute the diagnostics. [integer, units: dimensionless]
diagnose_mixing_simple
Set true for using diagnose_mixing_simple. [logical]
diagnose_mixing_sort
Set true for using diagnose_mixing_sort. [logical]
debug_diagnose_mixingA
Set true for help with debugging the diagnostic for mixing. [logical]
debug_diagnose_mixingB
Set true for more help with debugging the diagnostic for mixing. [logical]
smooth_kappa_sort
Set true to smooth the diagnosed mixing from the sorted approach. [logical]
rho_grad_min
min vertical density gradient (kg/m^3/m) used in computing kappa sorted
in the diagnostic mixing sorted. [real, units: kg/m^3/m]
rho_grad_max
max vertical density gradient (kg/m^3/m) used in computing kappa sorted [real, units: kg/m^3/m]
buoyancy_crit
Critical buoyancy difference relative to surface for computing mixed layer depth. [real, units: m^2/sec]
psu2ppt
The realistic EOS used in mom4 requires salinity to
use the Practical Salinity Scale (pss). This scale is
also known as the Practical Salinity Unit (psu).
Additionally, ocean measurements use the psu scale
Hence, mom4 interprets its salinity as psu.
However, salinity as an absolute concentration in
parts per thousand is more convenient to use when
performing budget analyses such as in this module.
Conversion between pss and ppt depends on the precise
ratio of ions in the seawater. Hence, the conversion
is not constant. However, it is close to a constant,
as reported in Jackett etal (2004). For purposes of
budgets, we take this conversion as a constant.
The conversion is
s(ppt) = psu2ppt * s(psu)
where again s(psu) is what mom4 carries as its
prognostic salinity field.
Jackett etal (2004), correcting a type in equation (53)
of Feistel (2003), report that
s(ppt) = 1.004867 * s(psu)
[real]
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.
The default value is false. [logical]