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 (tr_ptr, Reg, param_file, HI, GV, name, longname, units, cmor_name, cmor_units, cmor_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, flux_nameroot, flux_longname, flux_units, flux_scale, convergence_units, convergence_scale, cmor_tendprefix, diag_form, restart_CS, mandatory) |
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 | register_tracer_diagnostics (Reg, h, Time, diag, G, GV, US, 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. More... | |
subroutine, public | preale_tracer_diagnostics (Reg, G, GV) |
subroutine, public | postale_tracer_diagnostics (Reg, G, GV, diag, dt) |
subroutine, public | post_tracer_diagnostics (Reg, h, diag_prev, diag, G, GV, dt) |
post_tracer_diagnostics does post_data calls for any diagnostics that are being handled via the tracer registry. More... | |
subroutine, public | post_tracer_transport_diagnostics (G, GV, Reg, h_diag, diag) |
Post the advective and diffusive tendencies. 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_name_lookup (Reg, tr_ptr, name) |
Find a tracer in the tracer registry by name. More... | |
subroutine, public | tracer_registry_init (param_file, Reg) |
Initialize the tracer registry. More... | |
subroutine, public | tracer_registry_end (Reg) |
This routine closes the tracer registry module. More... | |
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 332 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 821 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(), mom_offline_main::offline_diabatic_ale(), mom_offline_main::offline_fw_fluxes_into_ocean(), mom_offline_main::offline_fw_fluxes_out_ocean(), 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 804 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::post_tracer_diagnostics | ( | type(tracer_registry_type), pointer | Reg, |
real, dimension( g %isd: g %ied, g %jsd: g %jed, gv %ke), intent(in) | h, | ||
type(diag_grid_storage), intent(in) | diag_prev, | ||
type(diag_ctrl), intent(inout) | diag, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
real, intent(in) | dt | ||
) |
post_tracer_diagnostics does post_data calls for any diagnostics that are being handled via the tracer registry.
[in] | g | The ocean's grid structure |
[in] | gv | The ocean's vertical grid structure |
reg | pointer to the tracer registry | |
[in] | h | Layer thicknesses |
[in] | diag_prev | Contains diagnostic grids from previous timestep |
[in,out] | diag | structure to regulate diagnostic output |
[in] | dt | total time step for tracer updates [T ~> s] |
Definition at line 714 of file MOM_tracer_registry.F90.
References mom_diag_mediator::diag_copy_storage_to_diag(), mom_diag_mediator::diag_restore_grids(), and mom_diag_mediator::diag_save_grids().
subroutine, public mom_tracer_registry::post_tracer_transport_diagnostics | ( | type(ocean_grid_type), intent(in) | G, |
type(verticalgrid_type), intent(in) | GV, | ||
type(tracer_registry_type), pointer | Reg, | ||
real, dimension( g %isd: g %ied, g %jsd: g %jed, gv %ke), intent(in) | h_diag, | ||
type(diag_ctrl), intent(in) | diag | ||
) |
Post the advective and diffusive tendencies.
[in] | g | The ocean's grid structure |
[in] | gv | The ocean's vertical grid structure |
reg | pointer to the tracer registry | |
[in] | h_diag | Layer thicknesses on which to post fields |
[in] | diag | structure to regulate diagnostic output |
Definition at line 766 of file MOM_tracer_registry.F90.
Referenced by mom_diagnostics::post_transport_diagnostics().
subroutine, public mom_tracer_registry::postale_tracer_diagnostics | ( | type(tracer_registry_type), pointer | Reg, |
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(diag_ctrl), intent(in) | diag, | ||
real, intent(in) | dt | ||
) |
reg | pointer to the tracer registry | |
[in] | g | The ocean's grid structure |
[in] | gv | ocean vertical grid structure |
[in] | diag | regulates diagnostic output |
[in] | dt | total time interval for these diagnostics [T ~> s] |
Definition at line 685 of file MOM_tracer_registry.F90.
References mom_error_handler::mom_error().
subroutine, public mom_tracer_registry::preale_tracer_diagnostics | ( | type(tracer_registry_type), pointer | Reg, |
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV | ||
) |
reg | pointer to the tracer registry | |
[in] | g | The ocean's grid structure |
[in] | gv | ocean vertical grid structure |
Definition at line 667 of file MOM_tracer_registry.F90.
subroutine, public mom_tracer_registry::register_tracer | ( | real, dimension( hi %isd: hi %ied, hi %jsd: hi %jed, gv %ke), target | tr_ptr, |
type(tracer_registry_type), pointer | Reg, | ||
type(param_file_type), intent(in) | param_file, | ||
type(hor_index_type), intent(in) | HI, | ||
type(verticalgrid_type), intent(in) | GV, | ||
character(len=*), intent(in), optional | name, | ||
character(len=*), intent(in), optional | longname, | ||
character(len=*), intent(in), optional | units, | ||
character(len=*), intent(in), optional | cmor_name, | ||
character(len=*), intent(in), optional | cmor_units, | ||
character(len=*), intent(in), optional | cmor_longname, | ||
type(vardesc), intent(in), optional | tr_desc, | ||
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_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, | ||
logical, intent(in), optional | registry_diags, | ||
character(len=*), intent(in), optional | flux_nameroot, | ||
character(len=*), intent(in), optional | flux_longname, | ||
character(len=*), intent(in), optional | flux_units, | ||
real, intent(in), optional | flux_scale, | ||
character(len=*), intent(in), optional | convergence_units, | ||
real, intent(in), optional | convergence_scale, | ||
character(len=*), intent(in), optional | cmor_tendprefix, | ||
integer, intent(in), optional | diag_form, | ||
type(mom_restart_cs), optional, pointer | restart_CS, | ||
logical, intent(in), optional | mandatory | ||
) |
This subroutine registers a tracer to be advected and laterally diffused.
[in] | hi | horizontal index type |
[in] | gv | ocean vertical grid structure |
reg | pointer to the tracer registry | |
tr_ptr | target or pointer to the tracer array | |
[in] | param_file | file to parse for model parameter values |
[in] | name | Short tracer name |
[in] | longname | The long tracer name |
[in] | units | The units of this tracer |
[in] | cmor_name | CMOR name |
[in] | cmor_units | CMOR physical dimensions of variable |
[in] | cmor_longname | CMOR long name |
[in] | tr_desc | A structure with metadata about the tracer |
[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_x | diagnostic x-advective flux [conc H L2 T-1 ~> CONC m3 s-1 or CONC kg s-1] | |
ad_y | diagnostic y-advective flux [conc H L2 T-1 ~> CONC m3 s-1 or CONC kg s-1] | |
df_x | diagnostic x-diffusive flux [conc H L2 T-1 ~> CONC m3 s-1 or CONC kg s-1] | |
df_y | diagnostic y-diffusive flux [conc H L2 T-1 ~> CONC m3 s-1 or CONC kg s-1] | |
ad_2d_x | vert sum of diagnostic x-advect flux [conc H L2 T-1 ~> CONC m3 s-1 or CONC kg s-1] | |
ad_2d_y | vert sum of diagnostic y-advect flux [conc H L2 T-1 ~> CONC m3 s-1 or CONC kg s-1] | |
df_2d_x | vert sum of diagnostic x-diffuse flux [conc H L2 T-1 ~> CONC m3 s-1 or CONC kg s-1] | |
df_2d_y | vert sum of diagnostic y-diffuse flux [conc H L2 T-1 ~> CONC m3 s-1 or CONC kg s-1] | |
advection_xy | convergence of lateral advective tracer fluxes | |
[in] | registry_diags | If present and true, use the registry for the diagnostics of this tracer. |
[in] | flux_nameroot | Short tracer name snippet used construct the names of flux diagnostics. |
[in] | flux_longname | A word or phrase used construct the long names of flux diagnostics. |
[in] | flux_units | The units for the fluxes of this tracer. |
[in] | flux_scale | A scaling factor used to convert the fluxes of this tracer to its desired units. |
[in] | convergence_units | The units for the flux convergence of this tracer. |
[in] | convergence_scale | A scaling factor used to convert the flux convergence of this tracer to its desired units. |
[in] | cmor_tendprefix | The CMOR name for the layer-integrated tendencies of this tracer. |
[in] | 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 | |
[in] | mandatory | If true, this tracer must be read from a restart file. |
Definition at line 158 of file MOM_tracer_registry.F90.
References mom_error_handler::mom_error(), mom_io::query_vardesc(), and tracer_registry_init().
Referenced by advection_test_tracer::register_advection_test_tracer(), boundary_impulse_tracer::register_boundary_impulse_tracer(), 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_ocmip2_cfc::register_ocmip2_cfc(), oil_tracer::register_oil_tracer(), pseudo_salt_tracer::register_pseudo_salt_tracer(), rgc_tracer::register_rgc_tracer(), and user_tracer_example::user_register_tracer_example().
subroutine, public mom_tracer_registry::register_tracer_diagnostics | ( | type(tracer_registry_type), pointer | Reg, |
real, dimension( g %isd: g %ied, g %jsd: g %jed, gv %ke), intent(in) | h, | ||
type(time_type), intent(in) | Time, | ||
type(diag_ctrl), intent(in) | diag, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
logical, intent(in) | 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.
[in] | g | The ocean's grid structure |
[in] | gv | The ocean's vertical grid structure |
[in] | us | A dimensional unit scaling type |
reg | pointer to the tracer registry | |
[in] | h | Layer thicknesses |
[in] | time | current model time |
[in] | diag | structure to regulate diagnostic output |
[in] | use_ale | If true active diagnostics that only apply to ALE configurations |
Definition at line 344 of file MOM_tracer_registry.F90.
References mom_io::cmor_long_std(), mom_string_functions::lowercase(), and mom_error_handler::mom_error().
subroutine, public mom_tracer_registry::tracer_name_lookup | ( | type(tracer_registry_type), pointer | Reg, |
type(tracer_type), pointer | tr_ptr, | ||
character(len=32), intent(in) | name | ||
) |
Find a tracer in the tracer registry by name.
reg | pointer to tracer registry | |
tr_ptr | target or pointer to the tracer array | |
[in] | name | tracer name |
Definition at line 845 of file MOM_tracer_registry.F90.
References mom_string_functions::lowercase().
Referenced by dome_initialization::dome_set_obc_data().
subroutine, public mom_tracer_registry::tracer_registry_end | ( | type(tracer_registry_type), pointer | Reg | ) |
This routine closes the tracer registry module.
reg | The tracer registry that will be deallocated |
Definition at line 886 of file MOM_tracer_registry.F90.
Referenced by mom::mom_end().
subroutine, public mom_tracer_registry::tracer_registry_init | ( | type(param_file_type), intent(in) | param_file, |
type(tracer_registry_type), pointer | Reg | ||
) |
Initialize the tracer registry.
[in] | param_file | open file to parse for model parameters |
reg | pointer to tracer registry |
Definition at line 858 of file MOM_tracer_registry.F90.
References mom_error_handler::is_root_pe(), and mom_error_handler::mom_error().
Referenced by register_tracer().