MOM6
|
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.
Data Types | |
type | tracer_registry_type |
Type to carry basic tracer information. More... | |
type | tracer_type |
The tracer type. More... | |
Functions/Subroutines | |
subroutine, public | register_tracer (tr1, tr_desc, param_file, HI, GV, Reg, tr_desc_ptr, ad_x, ad_y, df_x, df_y, OBC_inflow, OBC_in_u, OBC_in_v, ad_2d_x, ad_2d_y, df_2d_x, df_2d_y, advection_xy) |
This subroutine registers a tracer to be advected and laterally diffused. More... | |
subroutine, public | 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. More... | |
subroutine, public | add_tracer_obc_values (name, Reg, OBC_inflow, OBC_in_u, OBC_in_v) |
This subroutine adds open boundary condition concentrations for a tracer that has previously been registered by a call to register_tracer. More... | |
subroutine, public | add_tracer_diagnostics (name, Reg, ad_x, ad_y, df_x, df_y, ad_2d_x, ad_2d_y, df_2d_x, df_2d_y, advection_xy) |
This subroutine adds diagnostic arrays for a tracer that has previously been registered by a call to register_tracer. More... | |
subroutine, public | mom_tracer_chksum (mesg, Tr, ntr, G) |
This subroutine writes out chksums for tracers. More... | |
subroutine, public | mom_tracer_chkinv (mesg, G, h, Tr, ntr) |
Calculates and prints the global inventory of all tracers in the registry. More... | |
subroutine, public | tracer_registry_init (param_file, Reg) |
This routine include declares and sets the variable "version". More... | |
subroutine, public | tracer_registry_end (Reg) |
This routine closes the tracer registry module. More... | |
subroutine, public mom_tracer_registry::add_tracer_diagnostics | ( | character(len=*), intent(in) | name, |
type(tracer_registry_type), pointer | Reg, | ||
real, dimension(:,:,:), optional, pointer | ad_x, | ||
real, dimension(:,:,:), optional, pointer | ad_y, | ||
real, dimension(:,:,:), optional, pointer | df_x, | ||
real, dimension(:,:,:), optional, pointer | df_y, | ||
real, dimension(:,:), optional, pointer | ad_2d_x, | ||
real, dimension(:,:), optional, pointer | ad_2d_y, | ||
real, dimension(:,:), optional, pointer | df_2d_x, | ||
real, dimension(:,:), optional, pointer | df_2d_y, | ||
real, dimension(:,:,:), optional, pointer | advection_xy | ||
) |
This subroutine adds diagnostic arrays for a tracer that has previously been registered by a call to register_tracer.
[in] | name | name of the tracer for which the diagnostic points |
reg | pointer to the tracer registry | |
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 |
Definition at line 210 of file MOM_tracer_registry.F90.
References mom_error_handler::mom_error().
Referenced by advection_test_tracer::initialize_advection_test_tracer(), boundary_impulse_tracer::initialize_boundary_impulse_tracer(), dome_tracer::initialize_dome_tracer(), regional_dyes::initialize_dye_tracer(), ideal_age_example::initialize_ideal_age_tracer(), isomip_tracer::initialize_isomip_tracer(), mom_ocmip2_cfc::initialize_ocmip2_cfc(), oil_tracer::initialize_oil_tracer(), pseudo_salt_tracer::initialize_pseudo_salt_tracer(), and user_tracer_example::user_initialize_tracer().
subroutine, public mom_tracer_registry::add_tracer_obc_values | ( | character(len=*), intent(in) | name, |
type(tracer_registry_type), pointer | Reg, | ||
real, intent(in), optional | OBC_inflow, | ||
real, dimension(:,:,:), optional, pointer | OBC_in_u, | ||
real, dimension(:,:,:), optional, pointer | OBC_in_v | ||
) |
This subroutine adds open boundary condition concentrations for a tracer that has previously been registered by a call to register_tracer.
[in] | name | tracer name for which the diagnostic points |
reg | pointer to the tracer registry | |
[in] | obc_inflow | tracer value for all inflows via the OBC for which OBC_in_u or OBC_in_v are not specified (same units as tracer CONC) |
obc_in_u | tracer at inflows through u-face of tracer cells (same units as tracer CONC) | |
obc_in_v | tracer at inflows through v-face of tracer cells (same units as tracer CONC) |
Definition at line 174 of file MOM_tracer_registry.F90.
References mom_error_handler::mom_error().
Referenced by dome_initialization::dome_set_obc_data(), dome_tracer::initialize_dome_tracer(), and user_tracer_example::user_initialize_tracer().
subroutine, public mom_tracer_registry::lock_tracer_registry | ( | type(tracer_registry_type), pointer | Reg | ) |
This subroutine locks the tracer registry to prevent the addition of more tracers. After locked=.true., can then register common diagnostics.
reg | pointer to the tracer registry |
Definition at line 161 of file MOM_tracer_registry.F90.
References mom_error_handler::mom_error().
Referenced by mom::initialize_mom().
subroutine, public mom_tracer_registry::mom_tracer_chkinv | ( | character(len=*), intent(in) | mesg, |
type(ocean_grid_type), intent(in) | G, | ||
real, dimension( g %isd: g %ied, g %jsd: g %jed, g %ke), intent(in) | h, | ||
type(tracer_type), dimension(:), intent(in) | Tr, | ||
integer, intent(in) | ntr | ||
) |
Calculates and prints the global inventory of all tracers in the registry.
[in] | mesg | message that appears on the chksum lines |
[in] | g | ocean grid structure |
[in] | tr | array of all of registered tracers |
[in] | h | Layer thicknesses |
[in] | ntr | number of registered tracers |
Definition at line 270 of file MOM_tracer_registry.F90.
References mom_error_handler::is_root_pe().
Referenced by mom_ale::ale_offline_inputs(), mom_offline_main::offline_advection_ale(), and mom_offline_main::offline_redistribute_residual().
subroutine, public mom_tracer_registry::mom_tracer_chksum | ( | character(len=*), intent(in) | mesg, |
type(tracer_type), dimension(:), intent(in) | Tr, | ||
integer, intent(in) | ntr, | ||
type(ocean_grid_type), intent(in) | G | ||
) |
This subroutine writes out chksums for tracers.
[in] | mesg | message that appears on the chksum lines |
[in] | tr | array of all of registered tracers |
[in] | ntr | number of registered tracers |
[in] | g | ocean grid structure |
Definition at line 253 of file MOM_tracer_registry.F90.
Referenced by mom_offline_main::offline_redistribute_residual(), and mom_tracer_hor_diff::tracer_hordiff().
subroutine, public mom_tracer_registry::register_tracer | ( | real, dimension( hi %isd: hi %ied, hi %jsd: hi %jed, gv %ke), target | tr1, |
type(vardesc), intent(in) | tr_desc, | ||
type(param_file_type), intent(in) | param_file, | ||
type(hor_index_type), intent(in) | HI, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(tracer_registry_type), pointer | Reg, | ||
type(vardesc), optional, target | tr_desc_ptr, | ||
real, dimension(:,:,:), optional, pointer | ad_x, | ||
real, dimension(:,:,:), optional, pointer | ad_y, | ||
real, dimension(:,:,:), optional, pointer | df_x, | ||
real, dimension(:,:,:), optional, pointer | df_y, | ||
real, intent(in), optional | OBC_inflow, | ||
real, dimension(:,:,:), optional, pointer | OBC_in_u, | ||
real, dimension(:,:,:), optional, pointer | OBC_in_v, | ||
real, dimension(:,:), optional, pointer | ad_2d_x, | ||
real, dimension(:,:), optional, pointer | ad_2d_y, | ||
real, dimension(:,:), optional, pointer | df_2d_x, | ||
real, dimension(:,:), optional, pointer | df_2d_y, | ||
real, dimension(:,:,:), optional, pointer | advection_xy | ||
) |
This subroutine registers a tracer to be advected and laterally diffused.
[in] | hi | horizontal index type |
[in] | gv | ocean vertical grid structure |
tr1 | pointer to the tracer (concentration units) | |
[in] | tr_desc | metadata about the tracer |
[in] | param_file | file to parse for model parameter values |
reg | pointer to the tracer registry | |
tr_desc_ptr | A target that can be used to set a pointer to the stored value of trtr_desc. This target must be an enduring part of the control structure, because the tracer registry will use this memory, but it also means that any updates to this structure in the calling module will be available subsequently to the tracer registry. | |
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) | |
[in] | 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_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 |
Definition at line 81 of file MOM_tracer_registry.F90.
References mom_error_handler::mom_error(), mom_io::query_vardesc(), and tracer_registry_init().
subroutine, public mom_tracer_registry::tracer_registry_end | ( | type(tracer_registry_type), pointer | Reg | ) |
This routine closes the tracer registry module.
Definition at line 321 of file MOM_tracer_registry.F90.
subroutine, public mom_tracer_registry::tracer_registry_init | ( | type(param_file_type), intent(in) | param_file, |
type(tracer_registry_type), pointer | Reg | ||
) |
This routine include declares and sets the variable "version".
[in] | param_file | open file to parse for model parameters |
reg | pointer to tracer registry |
Definition at line 294 of file MOM_tracer_registry.F90.
References mom_error_handler::is_root_pe(), and mom_error_handler::mom_error().
Referenced by register_tracer().