namespace mom_tracer_registry¶
Overview¶
This module contains the tracer_registry_type and the subroutines that handle registration of tracers and related subroutines. The primary subroutine, register_tracer, is called to indicate the tracers advected and diffused. More…
namespace mom_tracer_registry { // global functions subroutine, public register_tracer( tr_ptr tr_ptr, Reg Reg, param_file param_file, HI HI, GV GV, name name, longname longname, units units, cmor_name cmor_name, cmor_units cmor_units, cmor_longname cmor_longname, tr_desc tr_desc, OBC_inflow OBC_inflow, OBC_in_u OBC_in_u, OBC_in_v OBC_in_v, ad_x ad_x, ad_y ad_y, df_x df_x, df_y df_y, ad_2d_x ad_2d_x, ad_2d_y ad_2d_y, df_2d_x df_2d_x, df_2d_y df_2d_y, advection_xy advection_xy, registry_diags registry_diags, flux_nameroot flux_nameroot, flux_longname flux_longname, flux_units flux_units, flux_scale flux_scale, convergence_units convergence_units, convergence_scale convergence_scale, cmor_tendprefix cmor_tendprefix, diag_form diag_form, restart_CS restart_CS, mandatory mandatory ); subroutine, public lock_tracer_registry(Reg Reg); subroutine, public register_tracer_diagnostics( Reg Reg, h h, Time Time, diag diag, G G, GV GV, use_ALE use_ALE ); subroutine, public preale_tracer_diagnostics(Reg Reg, G G, GV GV); subroutine, public postale_tracer_diagnostics(Reg Reg, G G, GV GV, diag diag, dt dt); subroutine, public post_tracer_diagnostics( Reg Reg, h h, diag_prev diag_prev, diag diag, G G, GV GV, dt dt ); subroutine, public post_tracer_transport_diagnostics(G G, GV GV, Reg Reg, h_diag h_diag, diag diag); subroutine, public mom_tracer_chksum(mesg mesg, Tr Tr, ntr ntr, G G); subroutine, public mom_tracer_chkinv(mesg mesg, G G, h h, Tr Tr, ntr ntr); subroutine, public tracer_name_lookup(Reg Reg, tr_ptr tr_ptr, name name); subroutine, public tracer_registry_init(param_file param_file, Reg Reg); subroutine, public tracer_registry_end(Reg Reg); } // namespace mom_tracer_registry
Detailed Documentation¶
This module contains the tracer_registry_type and the subroutines that handle registration of tracers and related subroutines. The primary subroutine, register_tracer, is called to indicate the tracers advected and diffused.
Global Functions¶
subroutine, public register_tracer( tr_ptr tr_ptr, Reg Reg, param_file param_file, HI HI, GV GV, name name, longname longname, units units, cmor_name cmor_name, cmor_units cmor_units, cmor_longname cmor_longname, tr_desc tr_desc, OBC_inflow OBC_inflow, OBC_in_u OBC_in_u, OBC_in_v OBC_in_v, ad_x ad_x, ad_y ad_y, df_x df_x, df_y df_y, ad_2d_x ad_2d_x, ad_2d_y ad_2d_y, df_2d_x df_2d_x, df_2d_y df_2d_y, advection_xy advection_xy, registry_diags registry_diags, flux_nameroot flux_nameroot, flux_longname flux_longname, flux_units flux_units, flux_scale flux_scale, convergence_units convergence_units, convergence_scale convergence_scale, cmor_tendprefix cmor_tendprefix, diag_form diag_form, restart_CS restart_CS, mandatory mandatory )
This subroutine registers a tracer to be advected and laterally diffused.
Parameters:
hi |
horizontal index type |
gv |
ocean vertical grid structure |
reg |
pointer to the tracer registry |
tr_ptr |
target or pointer to the tracer array |
param_file |
file to parse for model parameter values |
name |
Short tracer name |
longname |
The long tracer name |
units |
The units of this tracer |
cmor_name |
CMOR name |
cmor_units |
CMOR physical dimensions of variable |
cmor_longname |
CMOR long name |
tr_desc |
A structure with metadata about the tracer |
obc_inflow |
the tracer for all inflows via OBC for which OBC_in_u or OBC_in_v are not specified (units of tracer CONC) |
obc_in_u |
tracer at inflows through u-faces of tracer cells (units of tracer CONC) |
obc_in_v |
tracer at inflows through v-faces of tracer cells (units of tracer CONC) |
ad_x |
diagnostic x-advective flux (CONC m3/s or CONC*kg/s) |
ad_y |
diagnostic y-advective flux (CONC m3/s or CONC*kg/s) |
df_x |
diagnostic x-diffusive flux (CONC m3/s or CONC*kg/s) |
df_y |
diagnostic y-diffusive flux (CONC m3/s or CONC*kg/s) |
ad_2d_x |
vert sum of diagnostic x-advect flux (CONC m3/s or CONC*kg/s) |
ad_2d_y |
vert sum of diagnostic y-advect flux (CONC m3/s or CONC*kg/s) |
df_2d_x |
vert sum of diagnostic x-diffuse flux (CONC m3/s or CONC*kg/s) |
df_2d_y |
vert sum of diagnostic y-diffuse flux (CONC m3/s or CONC*kg/s) |
advection_xy |
convergence of lateral advective tracer fluxes |
registry_diags |
If present and true, use the registry for the diagnostics of this tracer. |
flux_nameroot |
Short tracer name snippet used construct the names of flux diagnostics. |
flux_longname |
A word or phrase used construct the long names of flux diagnostics. |
flux_units |
The units for the fluxes of this tracer. |
flux_scale |
A scaling factor used to convert the fluxes of this tracer to its desired units. |
convergence_units |
The units for the flux convergence of this tracer. |
convergence_scale |
A scaling factor used to convert the flux convergence of this tracer to its desired units. |
cmor_tendprefix |
The CMOR name for the layer-integrated tendencies of this tracer. |
diag_form |
An integer (1 or 2, 1 by default) indicating the character string template to use in labeling diagnostics |
restart_cs |
A pointer to the restart control structure this tracer will be registered for restarts if this argument is present |
mandatory |
If true, this tracer must be read from a restart file. |
subroutine, public lock_tracer_registry(Reg 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 |
subroutine, public register_tracer_diagnostics( Reg Reg, h h, Time Time, diag diag, G G, GV GV, use_ALE use_ALE )
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 |
The ocean’s grid structure |
gv |
The ocean’s vertical grid structure |
reg |
pointer to the tracer registry |
h |
Layer thicknesses |
time |
current model time |
diag |
structure to regulate diagnostic output |
use_ale |
If true active diagnostics that only apply to ALE configurations |
subroutine, public preale_tracer_diagnostics(Reg Reg, G G, GV GV)
Parameters:
reg |
pointer to the tracer registry |
g |
The ocean’s grid structure |
gv |
ocean vertical grid structure |
subroutine, public postale_tracer_diagnostics( Reg Reg, G G, GV GV, diag diag, dt dt )
Parameters:
reg |
pointer to the tracer registry |
g |
The ocean’s grid structure |
gv |
ocean vertical grid structure |
diag |
regulates diagnostic output |
dt |
total time interval for these diagnostics |
subroutine, public post_tracer_diagnostics( Reg Reg, h h, diag_prev diag_prev, diag diag, G G, GV GV, dt dt )
post_tracer_diagnostics does post_data calls for any diagnostics that are being handled via the tracer registry.
Parameters:
g |
The ocean’s grid structure |
gv |
The ocean’s vertical grid structure |
reg |
pointer to the tracer registry |
h |
Layer thicknesses |
diag_prev |
Contains diagnostic grids from previous timestep |
diag |
structure to regulate diagnostic output |
dt |
total time step for tracer updates |
subroutine, public post_tracer_transport_diagnostics( G G, GV GV, Reg Reg, h_diag h_diag, diag diag )
Post the advective and diffusive tendencies.
Parameters:
g |
The ocean’s grid structure |
gv |
The ocean’s vertical grid structure |
reg |
pointer to the tracer registry |
h_diag |
Layer thicknesses on which to post fields |
diag |
structure to regulate diagnostic output |
subroutine, public mom_tracer_chksum(mesg mesg, Tr Tr, ntr ntr, G G)
This subroutine writes out chksums for tracers.
Parameters:
mesg |
message that appears on the chksum lines |
tr |
array of all of registered tracers |
ntr |
number of registered tracers |
g |
ocean grid structure |
subroutine, public mom_tracer_chkinv(mesg mesg, G G, h h, Tr Tr, ntr ntr)
Calculates and prints the global inventory of all tracers in the registry.
Parameters:
mesg |
message that appears on the chksum lines |
g |
ocean grid structure |
tr |
array of all of registered tracers |
h |
Layer thicknesses |
ntr |
number of registered tracers |
subroutine, public tracer_name_lookup(Reg Reg, tr_ptr tr_ptr, name 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 |
tracer name |
subroutine, public tracer_registry_init(param_file param_file, Reg Reg)
Initialize the tracer registry.
Parameters:
param_file |
open file to parse for model parameters |
reg |
pointer to tracer registry |
subroutine, public tracer_registry_end(Reg Reg)
This routine closes the tracer registry module.
Parameters:
reg |
The tracer registry that will be deallocated |