mom_tracer_registry module reference
This module contains subroutines that handle registration of tracers and related subroutines. The primary subroutine, register_tracer, is called to indicate the tracers advected and diffused. It also makes public the types defined in MOM_tracer_types.
Functions/Subroutines
This subroutine registers a tracer to be advected and laterally diffused. |
|
This subroutine locks the tracer registry to prevent the addition of more tracers. |
|
register_tracer_diagnostics does a set of register_diag_field calls for any previously registered in a tracer registry with a value of registry_diags set to .true. |
|
Post tracer diganostics when that should only be posted when MOM's state is self-consistent (also referred to as 'synchronized') |
|
Post the advective and diffusive tendencies. |
|
This subroutine writes out chksums for the first ntr registered tracers. |
|
This subroutine writes out chksums for all the registered tracers. |
|
Calculates and prints the global inventory of the first ntr tracers in the registry. |
|
Calculates and prints the global inventory of all tracers in the registry. |
|
Find a tracer in the tracer registry by name. |
|
Initialize the tracer registry. |
|
This routine closes the tracer registry module. |
Detailed Description
This module contains subroutines that handle registration of tracers and related subroutines. The primary subroutine, register_tracer, is called to indicate the tracers advected and diffused. It also makes public the types defined in MOM_tracer_types.
Function/Subroutine Documentation
- subroutine mom_tracer_registry/register_tracer(tr_ptr, Reg, param_file, HI, GV, name, longname, units, cmor_name, cmor_units, cmor_longname, net_surfflux_name, NLT_budget_name, net_surfflux_longname, tr_desc, OBC_inflow, OBC_in_u, OBC_in_v, ad_x, ad_y, df_x, df_y, ad_2d_x, ad_2d_y, df_2d_x, df_2d_y, advection_xy, registry_diags, conc_scale, flux_nameroot, flux_longname, flux_units, flux_scale, convergence_units, convergence_scale, cmor_tendprefix, diag_form, restart_CS, mandatory, underflow_conc, Tr_out, advect_scheme)
This subroutine registers a tracer to be advected and laterally diffused.
- Parameters:
hi :: [in] horizontal index type
gv :: [in] ocean vertical grid structure
reg :: pointer to the tracer registry
tr_ptr ::
tr_ptrtarget or pointer to the tracer array [CU ~> conc]param_file ::
param_file[in] file to parse for model parameter valuesname ::
name[in] Short tracer namelongname ::
longname[in] The long tracer nameunits ::
units[in] The units of this tracercmor_name ::
cmor_name[in] CMOR namecmor_units ::
cmor_units[in] CMOR physical dimensions of variablecmor_longname ::
cmor_longname[in] CMOR long namenet_surfflux_name ::
net_surfflux_name[in] Name for net_surfflux diagnlt_budget_name :: [in] Name for NLT_budget diag
net_surfflux_longname ::
net_surfflux_longname[in] Long name for net_surfflux diagtr_desc ::
tr_desc[in] A structure with metadata about the tracerobc_inflow :: [in] the tracer for all inflows via OBC for which OBC_in_u or OBC_in_v are not specified [CU ~> conc]
obc_in_u :: tracer at inflows through u-faces of tracer cells [CU ~> conc]
obc_in_v :: tracer at inflows through v-faces of tracer cells [CU ~> conc]
ad_x ::
ad_xdiagnostic x-advective flux [CU H L2 T-1 ~> conc m3 s-1 or conc kg s-1]ad_y ::
ad_ydiagnostic y-advective flux [CU H L2 T-1 ~> conc m3 s-1 or conc kg s-1]df_x ::
df_xdiagnostic x-diffusive flux [CU H L2 T-1 ~> conc m3 s-1 or conc kg s-1]df_y ::
df_ydiagnostic y-diffusive flux [CU H L2 T-1 ~> conc m3 s-1 or conc kg s-1]ad_2d_x ::
ad_2d_xvert sum of diagnostic x-advect flux [CU H L2 T-1 ~> conc m3 s-1 or conc kg s-1]ad_2d_y ::
ad_2d_yvert sum of diagnostic y-advect flux [CU H L2 T-1 ~> conc m3 s-1 or conc kg s-1]df_2d_x ::
df_2d_xvert sum of diagnostic x-diffuse flux [CU H L2 T-1 ~> conc m3 s-1 or conc kg s-1]df_2d_y ::
df_2d_yvert sum of diagnostic y-diffuse flux [CU H L2 T-1 ~> conc m3 s-1 or conc kg s-1]advection_xy ::
advection_xyconvergence of lateral advective tracer fluxes [CU H T-1 ~> conc m s-1 or conc kg m-2 s-1]registry_diags ::
registry_diags[in] If present and true, use the registry for the diagnostics of this tracer.conc_scale ::
conc_scale[in] A scaling factor used to convert the concentration of this tracer to its desired units [conc CU-1 ~> 1]flux_nameroot ::
flux_nameroot[in] Short tracer name snippet used construct the names of flux diagnostics.flux_longname ::
flux_longname[in] A word or phrase used construct the long names of flux diagnostics.flux_units ::
flux_units[in] The units for the fluxes of this tracer.flux_scale ::
flux_scale[in] A scaling factor used to convert the fluxes of this tracer to its desired units [conc m CU-1 H-1 ~> 1] or [conc kg m-2 CU-1 H-1 ~> 1]convergence_units ::
convergence_units[in] The units for the flux convergence of this tracer.convergence_scale ::
convergence_scale[in] A scaling factor used to convert the flux convergence of this tracer to its desired units. [conc m CU-1 H-1 ~> 1] or [conc kg m-2 CU-1 H-1 ~> 1]cmor_tendprefix ::
cmor_tendprefix[in] The CMOR name for the layer-integrated tendencies of this tracer.diag_form ::
diag_form[in] An integer (1 or 2, 1 by default) indicating the character string template to use in labeling diagnosticsrestart_cs :: [inout] MOM restart control struct
mandatory ::
mandatory[in] If true, this tracer must be read from a restart file.underflow_conc ::
underflow_conc[in] A tiny concentration, below which the tracer concentration underflows to 0 [CU ~> conc].tr_out :: If present, returns pointer into registry
advect_scheme ::
advect_scheme[in] Advection scheme for this tracer, the default is -1 indicating to use the scheme from MOM_tracer_advect
- Call to:
mom_string_functions::lowercasemom_error_handler::mom_errormom_io::query_vardesctracer_registry_init- Called from:
advection_test_tracer::register_advection_test_tracerboundary_impulse_tracer::register_boundary_impulse_tracermom_cfc_cap::register_cfc_capdome_tracer::register_dome_tracerregional_dyes::register_dye_tracerideal_age_example::register_ideal_age_tracerisomip_tracer::register_isomip_tracermarbl_tracers::register_marbl_tracersnw2_tracers::register_nw2_tracersmom_ocmip2_cfc::register_ocmip2_cfcoil_tracer::register_oil_tracerpseudo_salt_tracer::register_pseudo_salt_tracerrgc_tracer::register_rgc_traceruser_tracer_example::user_register_tracer_example
- subroutine mom_tracer_registry/lock_tracer_registry(Reg)
This subroutine locks the tracer registry to prevent the addition of more tracers. After locked=.true., can then register common diagnostics.
- Parameters:
reg :: pointer to the tracer registry
- Call to:
- Called from:
- subroutine mom_tracer_registry/register_tracer_diagnostics(Reg, h, Time, diag, G, GV, US, use_ALE, use_KPP)
register_tracer_diagnostics does a set of register_diag_field calls for any previously registered in a tracer registry with a value of registry_diags set to .true.
- Parameters:
g :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure
us :: [in] A dimensional unit scaling type
reg :: pointer to the tracer registry
h ::
h[in] Layer thicknesses [H ~> m or kg m-2]time :: [in] current model time
diag ::
diag[in] structure to regulate diagnostic outputuse_ale :: [in] If true active diagnostics that only apply to ALE configurations
use_kpp :: [in] If true active diagnostics that only apply to CVMix KPP mixings
- Call to:
mom_io::cmor_long_stdmom_string_functions::lowercasemom_error_handler::mom_error
- subroutine mom_tracer_registry/preale_tracer_diagnostics(Reg, G, GV)
- Parameters:
reg :: pointer to the tracer registry
g :: [in] The ocean’s grid structure
gv :: [in] ocean vertical grid structure
- subroutine mom_tracer_registry/postale_tracer_diagnostics(Reg, G, GV, diag, dt)
- Parameters:
reg :: pointer to the tracer registry
g :: [in] The ocean’s grid structure
gv :: [in] ocean vertical grid structure
diag ::
diag[in] regulates diagnostic outputdt ::
dt[in] total time interval for these diagnostics [T ~> s]
- Call to:
- subroutine mom_tracer_registry/post_tracer_diagnostics_at_sync(Reg, h, diag_prev, diag, G, GV, dt)
Post tracer diganostics when that should only be posted when MOM’s state is self-consistent (also referred to as ‘synchronized’)
- Parameters:
g :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure
reg :: pointer to the tracer registry
h ::
h[in] Layer thicknesses [H ~> m or kg m-2]diag_prev ::
diag_prev[in] Contains diagnostic grids from previous timestepdiag ::
diag[inout] structure to regulate diagnostic outputdt ::
dt[in] total time step for tracer updates [T ~> s]
- Call to:
mom_diag_mediator::diag_copy_storage_to_diagmom_diag_mediator::diag_restore_gridsmom_diag_mediator::diag_save_grids
- subroutine mom_tracer_registry/post_tracer_transport_diagnostics(G, GV, Reg, h_diag, diag)
Post the advective and diffusive tendencies.
- Parameters:
g :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure
reg :: pointer to the tracer registry
h_diag ::
h_diag[in] Layer thicknesses on which to post fields [H ~> m or kg m-2]diag ::
diag[in] structure to regulate diagnostic output
- Called from:
- subroutine mom_tracer_registry/tracer_array_chksum(mesg, Tr, ntr, G)
This subroutine writes out chksums for the first ntr registered tracers.
- Parameters:
mesg ::
mesg[in] message that appears on the chksum linestr :: [in] array of all of registered tracers
ntr ::
ntr[in] number of registered tracersg :: [in] ocean grid structure
- subroutine mom_tracer_registry/tracer_reg_chksum(mesg, Reg, G)
This subroutine writes out chksums for all the registered tracers.
- Parameters:
mesg ::
mesg[in] message that appears on the chksum linesreg :: pointer to the tracer registry
g :: [in] ocean grid structure
- subroutine mom_tracer_registry/tracer_array_chkinv(mesg, G, GV, h, Tr, ntr)
Calculates and prints the global inventory of the first ntr tracers in the registry.
- Parameters:
mesg ::
mesg[in] message that appears on the chksum linesg :: [in] ocean grid structure
gv :: [in] The ocean’s vertical grid structure
tr :: [in] array of all of registered tracers
h ::
h[in] Layer thicknesses [H ~> m or kg m-2]ntr ::
ntr[in] number of registered tracers
- subroutine mom_tracer_registry/tracer_reg_chkinv(mesg, G, GV, h, Reg)
Calculates and prints the global inventory of all tracers in the registry.
- Parameters:
mesg ::
mesg[in] message that appears on the chksum linesg :: [in] ocean grid structure
gv :: [in] The ocean’s vertical grid structure
reg :: pointer to the tracer registry
h ::
h[in] Layer thicknesses [H ~> m or kg m-2]
- subroutine mom_tracer_registry/tracer_name_lookup(Reg, n, tr_ptr, name)
Find a tracer in the tracer registry by name.
- Parameters:
reg :: pointer to tracer registry
tr_ptr ::
tr_ptrtarget or pointer to the tracer arrayname ::
name[in] tracer namen ::
n[out] index to tracer registery
- Call to:
mom_string_functions::lowercasemom_error_handler::mom_error- Called from:
- subroutine mom_tracer_registry/tracer_registry_init(param_file, Reg)
Initialize the tracer registry.
- Parameters:
param_file ::
param_file[in] open file to parse for model parametersreg :: pointer to tracer registry
- Call to:
- Called from:
- subroutine mom_tracer_registry/tracer_registry_end(Reg)
This routine closes the tracer registry module.
- Parameters:
reg :: The tracer registry that will be deallocated
- Called from: