mom_generic_tracer module reference¶
Drives the generic version of tracers TOPAZ and CFC and other GFDL BGC components.
Data Types¶
Control structure for generic tracers. |
Functions/Subroutines¶
Initializes the generic tracer packages and adds their tracers to the list Adds the tracers in the list of generic tracers to the set of MOM tracers (i.e., MOM-register them) Register these tracers for restart. |
|
Initialize phase II: Initialize required variables for generic tracers There are some steps of initialization that cannot be done in register_MOM_generic_tracer This is the place and time to do them: Set the grid mask and initial time for all generic tracers. |
|
Column physics for generic tracers. |
|
This subroutine calculates mass-weighted integral on the PE either of all available tracer concentrations, or of a tracer that is being requested specifically, returning the number of stocks it has calculated. |
|
This subroutine find the global min and max of either of all available tracer concentrations, or of a tracer that is being requested specifically, returning the number of tracers it has gone through. |
|
This subroutine calculates the surface state and sets coupler values for those generic tracers that have flux exchange with atmosphere. |
|
Copy the requested tracer into an array. |
|
This subroutine deallocates the memory owned by this module. |
Detailed Description¶
Drives the generic version of tracers TOPAZ and CFC and other GFDL BGC components.
Type Documentation¶
-
type
mom_generic_tracer/
mom_generic_tracer_cs
¶ Control structure for generic tracers.
- Type fields
%
ic_file
[character (len=200)] :: The file in which the generic tracer initial values can be found, or an empty string for internal initialization.%
z_ic_file
[logical] :: If true, the%
tracer_ic_val
[real] :: The initial value assigned to tracers.%
tracer_land_val
[real] :: The values of tracers used where land is masked out.%
tracers_may_reinit
[logical] :: If true, tracers may go through the initialization code if they are not found in the restart files.%
diag
[type(diag_ctrl),pointer] :: A structure that is used to regulate the timing of diagnostic output.%
restart_csp
[type(mom_restart_cs),pointer] :: Restart control structure.%
g_tracer_list
[type( g_tracer_type ),pointer] :: Pointer to the first element of the linked list of generic tracers.%
h_to_m
[integer] :: Auxiliary to access GVH_to_m in routines that do not have access to GV.
Function/Subroutine Documentation¶
-
function
mom_generic_tracer/
register_mom_generic_tracer
(HI, GV, param_file, CS, tr_Reg, restart_CS) [logical]¶ Initializes the generic tracer packages and adds their tracers to the list Adds the tracers in the list of generic tracers to the set of MOM tracers (i.e., MOM-register them) Register these tracers for restart.
- Parameters
hi :: [in] Horizontal index ranges
gv :: [in] The ocean’s vertical grid structure
param_file :: [in] A structure to parse for run-time parameters
cs :: Pointer to the control structure for this module
tr_reg :: Pointer to the control structure for the tracer advection and diffusion module.
restart_cs :: Pointer to the restart control structure.
- Call to
g_registered
g_tracer_utils::g_tracer_get_alias
mom_error_handler::mom_error
mom_tracer_registry::register_tracer
-
subroutine
mom_generic_tracer/
initialize_mom_generic_tracer
(restart, day, G, GV, US, h, param_file, diag, OBC, CS, sponge_CSp, ALE_sponge_CSp)¶ Initialize phase II: Initialize required variables for generic tracers There are some steps of initialization that cannot be done in register_MOM_generic_tracer This is the place and time to do them: Set the grid mask and initial time for all generic tracers. Diag_register them. Z_diag_register them.
This subroutine initializes the NTR tracer fields in tr(:,:,:,:) and it sets up the tracer output.
- Parameters
restart :: [in] .true. if the fields have already been read from a restart file.
day :: [in] Time of the start of the run.
g :: [inout] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure
us :: [in] A dimensional unit scaling type
h :: [in] Layer thicknesses [H ~> m or kg m-2]
param_file :: [in] A structure to parse for run-time parameters
diag :: [in] Regulates diagnostic output.
obc :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.
cs :: Pointer to the control structure for this module.
sponge_csp :: Pointer to the control structure for the sponges.
ale_sponge_csp :: Pointer to the control structure for the ALE sponges.
- Call to
g_tracer_utils::g_tracer_get_alias
g_tracer_utils::g_tracer_set_csdiag
mom_error_handler::mom_error
mom_tracer_initialization_from_z::mom_initialize_tracer_from_z
mom_tracer_z_init::tracer_z_init
-
subroutine
mom_generic_tracer/
mom_generic_tracer_column_physics
(h_old, h_new, ea, eb, fluxes, Hml, dt, G, GV, CS, tv, optics, evap_CFL_limit, minimum_forcing_depth)¶ Column physics for generic tracers. Get the coupler values for generic tracers that exchange with atmosphere Update generic tracer concentration fields from sources and sinks. Vertically diffuse generic tracer concentration fields. Update generic tracers from bottom and their bottom reservoir.
This subroutine applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this file. CFCs are relatively simple, as they are passive tracers. with only a surface flux as a source.
- Parameters
g :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure
h_old :: [in] Layer thickness before entrainment [H ~> m or kg m-2].
h_new :: [in] Layer thickness after entrainment [H ~> m or kg m-2].
ea :: [in] The amount of fluid entrained from the layer
eb :: [in] The amount of fluid entrained from the layer
fluxes :: [in] A structure containing pointers to thermodynamic and tracer forcing fields.
hml :: [in] Mixed layer depth [Z ~> m]
dt :: [in] The amount of time covered by this call [s]
cs :: Pointer to the control structure for this module.
tv :: [in] A structure pointing to various thermodynamic variables
optics :: [in] The structure containing optical properties.
evap_cfl_limit :: [in] Limits how much water can be fluxed out of the top layer Stored previously in diabatic CS.
minimum_forcing_depth :: [in] The smallest depth over which fluxes can be applied [H ~> m or kg m-2]
- Call to
mom_tracer_diabatic::applytracerboundaryfluxesinout
g_tracer_utils::g_tracer_get_alias
g_tracer_utils::g_tracer_set_csdiag
mom_diag_mediator::get_diag_time_end
mom_spatial_means::global_area_mean
mom_error_handler::mom_error
-
function
mom_generic_tracer/
mom_generic_tracer_stock
(h, stocks, G, GV, CS, names, units, stock_index) [integer]¶ This subroutine calculates mass-weighted integral on the PE either of all available tracer concentrations, or of a tracer that is being requested specifically, returning the number of stocks it has calculated. If the stock_index is present, only the stock corresponding to that coded index is returned.
- Parameters
g :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure
h :: [in] Layer thicknesses [H ~> m or kg m-2]
stocks :: [out] The mass-weighted integrated amount of each tracer, in kg times concentration units [kg conc].
cs :: Pointer to the control structure for this module.
names :: [out] The names of the stocks calculated.
units :: [out] The units of the stocks calculated.
stock_index :: [in] The coded index of a specific stock being sought.
- Return
undefined :: Return value, the number of stocks calculated here.
- Call to
- Called from
-
function
mom_generic_tracer/
mom_generic_tracer_min_max
(ind_start, got_minmax, gmin, gmax, xgmin, ygmin, zgmin, xgmax, ygmax, zgmax, G, CS, names, units) [integer]¶ This subroutine find the global min and max of either of all available tracer concentrations, or of a tracer that is being requested specifically, returning the number of tracers it has gone through.
- Parameters
ind_start :: [in] The index of the tracer to start with
got_minmax :: [out] Indicates whether the global min and max are found for each tracer
gmin :: [out] Global minimum of each tracer, in kg times concentration units.
gmax :: [out] Global maximum of each tracer, in kg times concentration units.
xgmin :: [out] The x-position of the global minimum
ygmin :: [out] The y-position of the global minimum
zgmin :: [out] The z-position of the global minimum
xgmax :: [out] The x-position of the global maximum
ygmax :: [out] The y-position of the global maximum
zgmax :: [out] The z-position of the global maximum
g :: [in] The ocean’s grid structure
cs :: Pointer to the control structure for this module.
names :: [out] The names of the stocks calculated.
units :: [out] The units of the stocks calculated.
- Return
undefined :: Return value, the number of tracers done here.
- Call to
- Called from
-
subroutine
mom_generic_tracer/
mom_generic_tracer_surface_state
(sfc_state, h, G, CS)¶ This subroutine calculates the surface state and sets coupler values for those generic tracers that have flux exchange with atmosphere.
This subroutine sets up the fields that the coupler needs to calculate the CFC fluxes between the ocean and atmosphere.
- Parameters
g :: [in] The ocean’s grid structure
sfc_state :: [inout] A structure containing fields that describe the surface state of the ocean.
h :: [in] Layer thicknesses [H ~> m or kg m-2]
cs :: Pointer to the control structure for this module.
- Call to
mom_diag_mediator::get_diag_time_end
mom_spatial_means::global_area_mean
-
subroutine
mom_generic_tracer/
mom_generic_flux_init
(verbosity)¶ - Parameters
verbosity :: [in] A 0-9 integer indicating a level of verbosity.
- Call to
g_registered
mom_error_handler::mom_error
-
subroutine
mom_generic_tracer/
mom_generic_tracer_fluxes_accumulate
(flux_tmp, weight)¶ - Parameters
flux_tmp :: [in] A structure containing pointers to thermodynamic and tracer forcing fields.
weight :: [in] A weight for accumulating this flux
- Call to
- Called from
-
subroutine
mom_generic_tracer/
mom_generic_tracer_get
(name, member, array, CS)¶ Copy the requested tracer into an array.
- Parameters
name :: [in] Name of requested tracer.
member :: [in] The tracer element to return.
array :: [out] Array filled by this routine.
cs :: Pointer to the control structure for this module.
-
subroutine
mom_generic_tracer/
end_mom_generic_tracer
(CS)¶ This subroutine deallocates the memory owned by this module.
- Parameters
cs :: Pointer to the control structure for this module.