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)¶ 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 :: target or pointer to the tracer array [CU ~> conc]
param_file :: [in] file to parse for model parameter values
name :: [in] Short tracer name
longname :: [in] The long tracer name
units :: [in] The units of this tracer
cmor_name :: [in] CMOR name
cmor_units :: [in] CMOR physical dimensions of variable
cmor_longname :: [in] CMOR long name
net_surfflux_name :: [in] Name for net_surfflux diag
nlt_budget_name :: [in] Name for NLT_budget diag
net_surfflux_longname :: [in] Long name for net_surfflux diag
tr_desc :: [in] A structure with metadata about the tracer
obc_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 :: diagnostic x-advective flux [CU H L2 T-1 ~> conc m3 s-1 or conc kg s-1]
ad_y :: diagnostic y-advective flux [CU H L2 T-1 ~> conc m3 s-1 or conc kg s-1]
df_x :: diagnostic x-diffusive flux [CU H L2 T-1 ~> conc m3 s-1 or conc kg s-1]
df_y :: diagnostic y-diffusive flux [CU H L2 T-1 ~> conc m3 s-1 or conc kg s-1]
ad_2d_x :: vert sum of diagnostic x-advect flux [CU H L2 T-1 ~> conc m3 s-1 or conc kg s-1]
ad_2d_y :: vert sum of diagnostic y-advect flux [CU H L2 T-1 ~> conc m3 s-1 or conc kg s-1]
df_2d_x :: vert sum of diagnostic x-diffuse flux [CU H L2 T-1 ~> conc m3 s-1 or conc kg s-1]
df_2d_y :: vert sum of diagnostic y-diffuse flux [CU H L2 T-1 ~> conc m3 s-1 or conc kg s-1]
advection_xy :: convergence of lateral advective tracer fluxes [CU H T-1 ~> conc m s-1 or conc kg m-2 s-1]
registry_diags :: [in] If present and true, use the registry for the diagnostics of this tracer.
conc_scale :: [in] A scaling factor used to convert the concentration of this tracer to its desired units [conc CU-1 ~> 1]
flux_nameroot :: [in] Short tracer name snippet used construct the names of flux diagnostics.
flux_longname :: [in] A word or phrase used construct the long names of flux diagnostics.
flux_units :: [in] The units for the fluxes of this tracer.
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 :: [in] The units for the flux convergence of this tracer.
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 :: [in] The CMOR name for the layer-integrated tendencies of this tracer.
diag_form :: [in] An integer (1 or 2, 1 by default) indicating the character string template to use in labeling diagnostics
restart_cs :: [inout] MOM restart control struct
mandatory :: [in] If true, this tracer must be read from a restart file.
underflow_conc :: [in] A tiny concentration, below which the tracer concentration underflows to 0 [CU ~> conc].
tr_out :: If present, returns pointer into registry
- Call to:
mom_string_functions::lowercase
mom_error_handler::mom_error
mom_io::query_vardesc
tracer_registry_init
- Called from:
advection_test_tracer::register_advection_test_tracer
boundary_impulse_tracer::register_boundary_impulse_tracer
mom_cfc_cap::register_cfc_cap
dome_tracer::register_dome_tracer
regional_dyes::register_dye_tracer
dyed_obc_tracer::register_dyed_obc_tracer
ideal_age_example::register_ideal_age_tracer
isomip_tracer::register_isomip_tracer
mom_generic_tracer::register_mom_generic_tracer
nw2_tracers::register_nw2_tracers
mom_ocmip2_cfc::register_ocmip2_cfc
oil_tracer::register_oil_tracer
pseudo_salt_tracer::register_pseudo_salt_tracer
rgc_tracer::register_rgc_tracer
user_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 :: [in] Layer thicknesses [H ~> m or kg m-2]
time :: [in] current model time
diag :: [in] structure to regulate diagnostic output
use_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_std
mom_string_functions::lowercase
mom_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 :: [in] regulates diagnostic output
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 :: [in] Layer thicknesses [H ~> m or kg m-2]
diag_prev :: [in] Contains diagnostic grids from previous timestep
diag :: [inout] structure to regulate diagnostic output
dt :: [in] total time step for tracer updates [T ~> s]
- Call to:
mom_diag_mediator::diag_copy_storage_to_diag
mom_diag_mediator::diag_restore_grids
mom_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 :: [in] Layer thicknesses on which to post fields [H ~> m or kg m-2]
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 :: [in] message that appears on the chksum lines
tr :: [in] array of all of registered tracers
ntr :: [in] number of registered tracers
g :: [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 :: [in] message that appears on the chksum lines
reg :: 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 :: [in] message that appears on the chksum lines
g :: [in] ocean grid structure
gv :: [in] The ocean’s vertical grid structure
tr :: [in] array of all of registered tracers
h :: [in] Layer thicknesses [H ~> m or kg m-2]
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 :: [in] message that appears on the chksum lines
g :: [in] ocean grid structure
gv :: [in] The ocean’s vertical grid structure
reg :: pointer to the tracer registry
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 :: target or pointer to the tracer array
name :: [in] tracer name
n :: [out] index to tracer registery
- Call to:
mom_string_functions::lowercase
mom_error_handler::mom_error
- Called from:
-
subroutine
mom_tracer_registry/
tracer_registry_init
(param_file, Reg)¶ Initialize the tracer registry.
- Parameters:
param_file :: [in] open file to parse for model parameters
reg :: 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: