PUBLIC INTERFACE ~ PUBLIC ROUTINES ~ NAMELIST

Module ocean_tracer_diag_mod

Contact:  S.M. Griffies
Reviewers: 
Change History: WebCVS Log


OVERVIEW

Routines for tracer diagnostics

Routines for tracer diagnostics. Some are printed to ascii output, some are sent to diagnostic manager.


OTHER MODULES USED

        constants_mod
diag_manager_mod
fms_mod
mpp_domains_mod
mpp_mod
time_manager_mod
ocean_density_mod
ocean_domains_mod
ocean_obc_mod
ocean_operators_mod
ocean_parameters_mod
ocean_tracer_util_mod
ocean_types_mod
ocean_util_mod
ocean_workspace_mod

PUBLIC INTERFACE

ocean_tracer_diag_init:
ocean_tracer_diagnostics:
calc_mixed_layer_depth:
mixed_layer_depth:
mixed_layer_depth_dtheta:
compute_subduction:
tracer_change:
total_tracer:
klevel_total_tracer:
total_mass:
total_volume:
klevel_total_mass:
tracer_integrals:
tracer_land_cell_check:
mass_conservation:
tracer_conservation:
diagnose_kappa_sort:
diagnose_kappa_simple:
diagnose_depth_of_potrho:
diagnose_depth_of_theta:
diagnose_tracer_on_rho:
diagnose_tracer_zrho_on_rho:
calc_potrho_mixed_layer:
potrho_mixed_layer:
send_total_mass:
send_total_volume:
send_total_tracer:
send_global_ave_tracer:
send_global_ave_pressure:
send_surface_ave_tracer:
send_surface_area_ave_tracer:
send_tracer_variance:
diagnose_eta_tend_3dflux:


PUBLIC ROUTINES

  1. ocean_tracer_diag_init

    DESCRIPTION
    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.


  2. ocean_tracer_diagnostics

    DESCRIPTION
    Call diagnostics related to the tracer fields.


  3. calc_mixed_layer_depth

    DESCRIPTION
    Calculate the mixed layer depth (m), which is defined as the depth ( > 0 ) where the buoyancy difference with respect to the surface level is equal to buoyancy_crit (m/s^2). Note that the mixed layer depth is taken with respect to the ocean surface at z=eta_t, so the mixed layer depth is always positive. That is, the mld is here defined as a thickness of water.


  4. mixed_layer_depth

    DESCRIPTION
    Diagnose mixed layer depth (m). Call calc_mixed_layer_depth to determine the mixed layer depth. Also compute neutral density at depth of the mixed layer.


  5. mixed_layer_depth_dtheta

    DESCRIPTION
    Calculate the depth required to reach a temperature that is dtheta cooler than the surface temperature. Note: 1/ mixed_layer_depth_dtheta is taken with respect to the ocean surface at z=eta_t. 2/ mixed_layer_depth_dtheta is no greater than the ocean depth + eta_t. Coded March 2010 by Stephen.Griffies


  6. compute_subduction

    DESCRIPTION
    Diagnose subduction rate (kg/sec) based on kinematic method to compute mass transport through base of mixed layer. Some approximations made for convenience: 1/ use velocity at time tau use tracer at time tau use thickness at time taup1, since all pieces of Thickness have already been updated to taup1. 2/ horizontally interpolate B-grid to C-grid velocity components, but then vertically interpolate using mld computed at T-points. Stephen.Griffies March 2012


  7. tracer_change

    DESCRIPTION
    Compute change in tracer over a time step and difference between this change and the boundary forcing. This routine is very useful for detecting bugs in tracer routines.


  8. total_tracer

    DESCRIPTION
    Compute integrated tracer in model.


  9. klevel_total_tracer

    DESCRIPTION
    Compute integrated tracer on a k-level.


  10. total_mass

    DESCRIPTION
    Compute total ocean tracer cell mass. For Boussinesq fluid, mass is determined using rho0 for density.


  11. total_volume

    DESCRIPTION
    Compute total ocean tracer cell volume.


  12. klevel_total_mass

    DESCRIPTION
    Compute ocean tracer cell mass in a k-level. For Boussinesq fluid, mass is determined using rho0 for density.


  13. tracer_integrals

    DESCRIPTION
    Compute some integrated tracer diagnostics.


  14. tracer_land_cell_check

    DESCRIPTION
    Check to be sure ocean tracer is zero over land


  15. mass_conservation

    DESCRIPTION
    Compute change in mass over many time steps, and compare to the input of mass through surface to check for mass conservation. ============================================================ threelevel scheme Here is the logic for the accumulation of the fluxes and comparisons between mass/volumes at the start and the end. Consider accumulation over four leap-frog time steps. Ignore time filtering. mass(2) = mass(0) + 2dt*F(1) taup1=2, taum1=0, tau=1 mass(3) = mass(1) + 2dt*F(2) taup1=3, taum1=1, tau=2 mass(4) = mass(2) + 2dt*F(3) taup1=4, taum1=2, tau=3 mass(5) = mass(3) + 2dt*F(4) taup1=5, taum1=3, tau=4 Hence, [mass(4) + mass(5)] = [mass(0) + mass(1)] + 2dt*[F(1)+F(2)+F(3)+F(4)] For this example, we have itts_mass=1 through itte_mass=4 for accumulating fluxes itt=itts_mass=1=tau we use taum1=0 and tau=1 to get starting mass itt=itte_mass=4=tau we use tau=4 and taup1=5 to get the final mass ============================================================ twolevel scheme Here is the logic for the accumulation of the fluxes and comparisons between mass/volumes at the start and the end. Consider accumulation over four time steps. mass(3/2) = mass(1/2) + dt*F(1) taup1=3/2, taum1=1/2, tau=1 mass(5/2) = mass(3/2) + dt*F(2) taup1=5/2, taum1=3/2, tau=2 mass(7/2) = mass(5/2) + dt*F(3) taup1=7/2, taum1=5/2, tau=3 mass(9/2) = mass(7/2) + dt*F(4) taup1=9/2, taum1=7/2, tau=4 Hence, mass(9/2) = mass(1/2) + dt*[F(1)+F(2)+F(3)+F(4)] For this example, we have itts_mass=1 through itte_mass=4 for accumulating fluxes itt=itts_mass=1=tau we use taum1=1/2 to get starting mass itt=itte_mass=4=tau we use taup1=9/2 to get the final mass


  16. 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 mass_conservation diagnostic.


  17. 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 run with zero buoyancy forcing at the boundaries. 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. The code is actually written so that the horizontal area of each layer can be different. This will allow for this diagnostic to be used, say, for simple topography, such as bowl or bump. -assumes Boussinesq fluid so that consider volume instead of mass of a cell. Also his means that dzt = rho0r*rho_dzt -assumes area integrated eta_t is zero, so domain volume is static. This is the case when there are no water boundary fluxes. -Results are meaningful only when dxt*dyt*dst of each grid cell is the same. This is best realized with a beta-plane or f-plane geometry, and with zstar vertical coordinate. My best understanding of this limitation is related to systematic biases in roundoff errors that result when the grid cells have varying volumes. If choose to use geopotential vertical coordinate, it is best to set linear_free_surface=.true. in ocean_thickness_nml, so that Thickness%rho_dzt = rho0%Grd%dzt. The sorting model of mixing has not been generalized to evolving layer thicknesses with geopotential. With zstar, the dst is constant in time, and the sorting method will sort to a depth in zstar space rather than geopotential space. This is a trivial distinction in principle, but should help with some roundoff issues in practice. -assumes tendency=TWO_LEVEL, which is exploited here to save memory. Numerical roundoff is a real issue with this diagnostic. It is critical that full double precision be used to garner sensible results. -defines some global arrays, so requires large memory. This feature can be removed if parallel sort is implemented. So far, such has not been done. -Effective kappa is set to zero at top of top-most cell. It is then diagnosed as zero (or roundoff) at bottom of the column if there are zero boundary buoyancy fluxes. -when computing density, we do rho=-alpha*theta. We drop the rho0 factor in order to reduce roundoff. Likewise, we assume alpha=1.0 rather than alpha=alpha_linear_eos We use alpha=1.0 to improve precision. With alpha=1.0 and rho=-alpha*theta, the rho variable is then just minus theta. -minimum vertical density gradient rho_grad_min is necessary to avoid errors with truncation in the division by drho/dz when compute kappa. rho_grad_min corresponds roughly to the precision of the computation. Physically, with N^2 = -(g/rho0)(drho/dz) then rho_grad_min sets a minimum N^2 resolved. This corresponds to a frequency f=N/2pi. The typical period of inertial oscillations in the deep ocean is 6hrs (Pickard and Emery, page 55-56). In the upper ocean, it is 10-30 minutes, in pycnocline it is smaller still. So to cover the majority of the ocean's stratification, we will want to set rho_grad_min to something smaller than 9e-6. To bin the effective diffusivity, it is also useful to have a max vertical density gradient. -versions: mom4p0 method assumed rigid lid, or zero surface height undulations. Fit the following equation to the model data \partial_{t}(rho_sort) = (F_{k}-F_{k-1})/dzw mom4p1 method fits the following equation to model data \partial_{t}(dzt_sort*theta_sort) = F_{k} - F_{k-1} Fits this equation assuming two-time level tendency revision: 05/2005 revision: 07/2007 Stephen.Griffies


  18. 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 to help debug the sorting routine.


  19. diagnose_depth_of_potrho

    DESCRIPTION
    Diagnose depth (m) of a potential density surface surface relative to the ocean surface at z=eta (not relative to z=0). 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. Diagnostic only makes sense when rho is monotonically increasing as go deeper in water column. Author: Harper.Simmons Zhi.Liang


  20. diagnose_depth_of_theta

    DESCRIPTION
    Diagnose depth (m) of a potential temperature surface relative to the ocean surface at z=eta (not relative to z=0). 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. Diagnostic only makes sense when theta is monotonically decreasing as go deeper in water column. Based on "diagnose_depth_of_potrho" by Harper.Simmons Author: Stephen.Griffies Zhi.Liang


  21. diagnose_tracer_on_rho

    DESCRIPTION
    Diagnose tracer concentration on potential density surface. Method based on diagnose_depth_of_potrho diagnostic. Author: Stephen.Griffies Updated Oct 2009 to be more vectorized


  22. diagnose_tracer_zrho_on_rho

    DESCRIPTION
    Diagnose tracer concentration * dz/drho on potential density surface. This product, when integrated over dx*dy*drho, will yield the same total tracer (to within roundoff) as the usual tracer concentration integrated over dx*dy*dz. compute abs(dz/drho)==dz/drho in order to have tracer_zrho_on_rho with same sign as tracer. Method based on diagnose_tracer_on_rho diagnostic. Author: Stephen.Griffies Updated Oct 2009 to be more vectorized


  23. calc_potrho_mixed_layer

    DESCRIPTION
    Calculate the 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. Note that the mixed layer depth is taken with respect to the ocean surface, and so the mixed layer depth is always positive. That is, the mld is here defined as a thickness of water.


  24. 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. Call calc_potrho_mixed_layer to calculate the quantities.


  25. send_total_mass

    DESCRIPTION
    Send total liquid seawater mass to diagnostic manager.


  26. send_total_volume

    DESCRIPTION
    Send total liquid seawater mass to diagnostic manager.


  27. send_total_tracer

    DESCRIPTION
    Send total tracer to diagnostic manager.


  28. send_global_ave_tracer

    DESCRIPTION
    Send global averaged tracer to diagnostic manager.


  29. send_global_ave_pressure

    DESCRIPTION
    Send global averaged pressure to diagnostic manager.


  30. send_surface_ave_tracer

    DESCRIPTION
    Send global averaged surface tracer to diagnostic manager. Note the presence of a rho_dzt weighting here...


  31. send_surface_area_ave_tracer

    DESCRIPTION
    Send global area averaged surface tracer to diagnostic manager. Note the weigthing is just area, with no thickness nor density.


  32. send_tracer_variance

    DESCRIPTION
    Compute the global and k-level tracer variance.


  33. diagnose_eta_tend_3dflux

    DESCRIPTION
    Diagnose contribution to global mean sea level evolution arising from a 3d MOM flux computed from a parameterization. fluxes are assumed to have the following dimensions: flux_x = (dy*dz)*diffusivity*rho*tracer_derivative_x flux_y = (dx*dz)*diffusivity*rho*tracer_derivative_y flux_z = diffusivity*rho*tracer_derivative_z Subroutine history: Jan2012 version 1.0: Stephen.Griffies



NAMELIST

&ocean_tracer_diag_nml

tracer_conserve_days
Number of days between which compute the tracer conservation diagnostics.
[real, units: days]
diag_step
Number of time steps between which compute the diagnostics.
[integer, units: dimensionless]
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. Lots of output.
[logical]
debug_diagnose_mixingC
Set true for more help with debugging the diagnostic for mixing. Lots of output.
[logical]
debug_diagnose_mixingD
Set true for more help with debugging the diagnostic for mixing. Lots of output.
[logical]
smooth_kappa_sort
Number of 1-2-1 smooths applied to kappa_sort
[integer]
smooth_dzt_rho_sort
Number of 1-2-1 smooths applied to rho_sort
[integer]
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. Default buoyancy_crit=0.0003.
[real, units: m/s^2]
dtheta_crit
Critical temperature difference relative to surface for computing mixed_layer_depth_dtheta . Default dtheta_crit=2.0.
[real, units: degC]
diagnose_mixing_days
Days over which time average the thickness weighted density before taking its time tendency for use in computing the effective diapycnal diffusivity.
[real, units: day]
psu2ppt
The preTEOS10 EOS used in MOM requires salinity to use the Practical Salinity Scale (pss). This scale is also known as the Practical Salinity Unit (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 MOM carries as its prognostic salinity field when preTEOS10 EOS is used. Jackett etal (2004), correcting a type in equation (53) of Feistel (2003), report that s(ppt) = 1.004867 * s(psu)
[real]
smooth_mld
Smooth the diagnosed mixed layer depth. Default smooth_mld=.false.
[integer]
smooth_mld_for_subduction
Smooth the diagnosed mixed layer depth to be used for subduction diagnostics. Default smooth_mld_for_subduction=.true.
[integer]
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]


top