MOM6
|
Orchestrates the registration and calling of tracer packages.
Data Types | |
type | tracer_flow_control_cs |
The control structure for orchestrating the calling of tracer packages. More... | |
Functions/Subroutines | |
subroutine, public | call_tracer_flux_init (verbosity) |
This subroutine carries out a series of calls to initialize the air-sea tracer fluxes, but it does not record the generated indicies, and it may be called before the ocean model has been initialized and may be called on non-ocean PEs. It is not necessary to call this routine for ocean-only runs, because the same calls are made again inside of the routines called by call_tracer_register. More... | |
subroutine, public | call_tracer_register (HI, GV, US, param_file, CS, tr_Reg, restart_CS) |
This subroutine determines which tracer packages are to be used and does the calls to register their tracers to be advected, diffused, and read from restarts. More... | |
subroutine, public | tracer_flow_control_init (restart, day, G, GV, US, h, param_file, diag, OBC, CS, sponge_CSp, ALE_sponge_CSp, tv) |
This subroutine calls all registered tracer initialization subroutines. More... | |
subroutine, public | get_chl_from_model (Chl_array, G, CS) |
This subroutine extracts the chlorophyll concentrations from the model state, if possible. More... | |
subroutine, public | call_tracer_set_forcing (state, fluxes, day_start, day_interval, G, CS) |
This subroutine calls the individual tracer modules' subroutines to specify or read quantities related to their surface forcing. More... | |
subroutine, public | call_tracer_column_fns (h_old, h_new, ea, eb, fluxes, Hml, dt, G, GV, US, tv, optics, CS, debug, evap_CFL_limit, minimum_forcing_depth) |
This subroutine calls all registered tracer column physics subroutines. More... | |
subroutine, public | call_tracer_stocks (h, stock_values, G, GV, CS, stock_names, stock_units, num_stocks, stock_index, got_min_max, global_min, global_max, xgmin, ygmin, zgmin, xgmax, ygmax, zgmax) |
This subroutine calls all registered tracer packages to enable them to add to the surface state returned to the coupler. These routines are optional. More... | |
subroutine | store_stocks (pkg_name, ns, names, units, values, index, stock_values, set_pkg_name, max_ns, ns_tot, stock_names, stock_units) |
This routine stores the stocks and does error handling for call_tracer_stocks. More... | |
subroutine, public | call_tracer_surface_state (state, h, G, CS) |
This subroutine calls all registered tracer packages to enable them to add to the surface state returned to the coupler. These routines are optional. More... | |
subroutine, public | tracer_flow_control_end (CS) |
subroutine, public mom_tracer_flow_control::call_tracer_column_fns | ( | real, dimension(nimem_,njmem_,nkmem_), intent(in) | h_old, |
real, dimension(nimem_,njmem_,nkmem_), intent(in) | h_new, | ||
real, dimension(nimem_,njmem_,nkmem_), intent(in) | ea, | ||
real, dimension(nimem_,njmem_,nkmem_), intent(in) | eb, | ||
type(forcing), intent(in) | fluxes, | ||
real, dimension(nimem_,njmem_), intent(in) | Hml, | ||
real, intent(in) | dt, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(thermo_var_ptrs), intent(in) | tv, | ||
type(optics_type), pointer | optics, | ||
type(tracer_flow_control_cs), pointer | CS, | ||
logical, intent(in) | debug, | ||
real, intent(in), optional | evap_CFL_limit, | ||
real, intent(in), optional | minimum_forcing_depth | ||
) |
This subroutine calls all registered tracer column physics subroutines.
[in] | h_old | Layer thickness before entrainment [H ~> m or kg m-2]. |
[in] | h_new | Layer thickness after entrainment [H ~> m or kg m-2]. |
[in] | ea | an array to which the amount of fluid entrained from the layer above during this call will be added [H ~> m or kg m-2]. |
[in] | eb | an array to which the amount of fluid entrained from the layer below during this call will be added [H ~> m or kg m-2]. |
[in] | fluxes | A structure containing pointers to any possible forcing fields. Unused fields have NULL ptrs. |
[in] | hml | Mixed layer depth [H ~> m or kg m-2] |
[in] | dt | The amount of time covered by this call [T ~> s] |
[in] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | tv | A structure pointing to various thermodynamic variables. |
optics | The structure containing optical properties. | |
cs | The control structure returned by a previous call to call_tracer_register. | |
[in] | debug | If true calculate checksums |
[in] | evap_cfl_limit | Limit on the fraction of the water that can be fluxed out of the top layer in a timestep [nondim] |
[in] | minimum_forcing_depth | The smallest depth over which fluxes can be applied [H ~> m or kg m-2] |
Definition at line 407 of file MOM_tracer_flow_control.F90.
References mom_error_handler::mom_error().
Referenced by mom_diabatic_driver::adiabatic(), mom_diabatic_driver::diabatic_ale(), mom_diabatic_driver::diabatic_ale_legacy(), mom_diabatic_driver::layered_diabatic(), mom_offline_main::offline_advection_layer(), and mom_offline_main::offline_diabatic_ale().
subroutine, public mom_tracer_flow_control::call_tracer_flux_init | ( | integer, intent(in), optional | verbosity | ) |
This subroutine carries out a series of calls to initialize the air-sea tracer fluxes, but it does not record the generated indicies, and it may be called before the ocean model has been initialized and may be called on non-ocean PEs. It is not necessary to call this routine for ocean-only runs, because the same calls are made again inside of the routines called by call_tracer_register.
[in] | verbosity | A 0-9 integer indicating a level of verbosity. |
Definition at line 117 of file MOM_tracer_flow_control.F90.
References mom_file_parser::close_param_file(), mom_get_input::get_mom_input(), and mom_error_handler::mom_error().
Referenced by mom_ocean_model_nuopc::ocean_model_flux_init(), and mom_ocean_model_mct::ocean_model_flux_init().
subroutine, public mom_tracer_flow_control::call_tracer_register | ( | type(hor_index_type), intent(in) | HI, |
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
type(param_file_type), intent(in) | param_file, | ||
type(tracer_flow_control_cs), pointer | CS, | ||
type(tracer_registry_type), pointer | tr_Reg, | ||
type(mom_restart_cs), pointer | restart_CS | ||
) |
This subroutine determines which tracer packages are to be used and does the calls to register their tracers to be advected, diffused, and read from restarts.
[in] | hi | A horizontal index type structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | param_file | A structure to parse for run-time parameters. |
cs | A pointer that is set to point to the control structure for this module. | |
tr_reg | A pointer that is set to point to the control structure for the tracer advection and diffusion module. | |
restart_cs | A pointer to the restart control structure. |
Definition at line 152 of file MOM_tracer_flow_control.F90.
References mom_error_handler::mom_error().
subroutine, public mom_tracer_flow_control::call_tracer_set_forcing | ( | type(surface), intent(inout) | state, |
type(forcing), intent(inout) | fluxes, | ||
type(time_type), intent(in) | day_start, | ||
type(time_type), intent(in) | day_interval, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(tracer_flow_control_cs), pointer | CS | ||
) |
This subroutine calls the individual tracer modules' subroutines to specify or read quantities related to their surface forcing.
[in,out] | state | A structure containing fields that describe the surface state of the ocean. |
[in,out] | fluxes | A structure containing pointers to any possible forcing fields. Unused fields have NULL ptrs. |
[in] | day_start | Start time of the fluxes. |
[in] | day_interval | Length of time over which these fluxes will be applied. |
[in] | g | The ocean's grid structure. |
cs | The control structure returned by a previous call to call_tracer_register. |
Definition at line 382 of file MOM_tracer_flow_control.F90.
References mom_error_handler::mom_error().
subroutine, public mom_tracer_flow_control::call_tracer_stocks | ( | real, dimension(nimem_,njmem_,nkmem_), intent(in) | h, |
real, dimension(:), intent(out) | stock_values, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(tracer_flow_control_cs), pointer | CS, | ||
character(len=*), dimension(:), intent(out), optional | stock_names, | ||
character(len=*), dimension(:), intent(out), optional | stock_units, | ||
integer, intent(out), optional | num_stocks, | ||
integer, intent(in), optional | stock_index, | ||
logical, dimension(:), intent(inout), optional | got_min_max, | ||
real, dimension(:), intent(out), optional | global_min, | ||
real, dimension(:), intent(out), optional | global_max, | ||
real, dimension(:), intent(out), optional | xgmin, | ||
real, dimension(:), intent(out), optional | ygmin, | ||
real, dimension(:), intent(out), optional | zgmin, | ||
real, dimension(:), intent(out), optional | xgmax, | ||
real, dimension(:), intent(out), optional | ygmax, | ||
real, dimension(:), intent(out), optional | zgmax | ||
) |
This subroutine calls all registered tracer packages to enable them to add to the surface state returned to the coupler. These routines are optional.
[in] | h | Layer thicknesses [H ~> m or kg m-2] |
[out] | stock_values | The integrated amounts of a tracer on the current PE, usually in kg x concentration [kg conc]. |
[in] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
cs | The control structure returned by a previous call to call_tracer_register. | |
[out] | stock_names | Diagnostic names to use for each stock. |
[out] | stock_units | Units to use in the metadata for each stock. |
[out] | num_stocks | The number of tracer stocks being returned. |
[in] | stock_index | The integer stock index from stocks_constants_mod of the stock to be returned. If this is present and greater than 0, only a single stock can be returned. |
[in,out] | got_min_max | Indicates whether the global min and |
[out] | global_min | The global minimum of each tracer |
[out] | global_max | The global maximum of each tracer |
[out] | xgmin | The x-position of the global minimum |
[out] | ygmin | The y-position of the global minimum |
[out] | zgmin | The z-position of the global minimum |
[out] | xgmax | The x-position of the global maximum |
[out] | ygmax | The y-position of the global maximum |
[out] | zgmax | The z-position of the global maximum |
Definition at line 568 of file MOM_tracer_flow_control.F90.
References advection_test_tracer::advection_test_stock(), regional_dyes::dye_stock(), ideal_age_example::ideal_age_stock(), mom_error_handler::mom_error(), mom_ocmip2_cfc::ocmip2_cfc_stock(), oil_tracer::oil_stock(), pseudo_salt_tracer::pseudo_salt_stock(), and store_stocks().
Referenced by mom_sum_output::write_energy().
subroutine, public mom_tracer_flow_control::call_tracer_surface_state | ( | type(surface), intent(inout) | state, |
real, dimension(nimem_,njmem_,nkmem_), intent(in) | h, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(tracer_flow_control_cs), pointer | CS | ||
) |
This subroutine calls all registered tracer packages to enable them to add to the surface state returned to the coupler. These routines are optional.
[in,out] | state | A structure containing fields that describe the surface state of the ocean. |
[in] | h | Layer thicknesses [H ~> m or kg m-2] |
[in] | g | The ocean's grid structure. |
cs | The control structure returned by a previous call to call_tracer_register. |
Definition at line 751 of file MOM_tracer_flow_control.F90.
References mom_error_handler::mom_error().
subroutine, public mom_tracer_flow_control::get_chl_from_model | ( | real, dimension(nimem_,njmem_,nkmem_), intent(out) | Chl_array, |
type(ocean_grid_type), intent(in) | G, | ||
type(tracer_flow_control_cs), pointer | CS | ||
) |
This subroutine extracts the chlorophyll concentrations from the model state, if possible.
[out] | chl_array | The array in which to store the model's |
[in] | g | The ocean's grid structure. |
cs | The control structure returned by a previous call to call_tracer_register. |
Definition at line 355 of file MOM_tracer_flow_control.F90.
References mom_error_handler::mom_error().
Referenced by mom_diabatic_aux::set_pen_shortwave().
|
private |
This routine stores the stocks and does error handling for call_tracer_stocks.
[in] | pkg_name | The tracer package name |
[in] | ns | The number of stocks associated with this tracer package |
[in] | names | Diagnostic names to use for each stock. |
[in] | units | Units to use in the metadata for each stock. |
[in] | values | The values of the tracer stocks |
[in] | index | The integer stock index from stocks_constants_mod of the stock to be returned. If this is present and greater than 0, only a single stock can be returned. |
[in,out] | stock_values | The master list of stock values |
[in,out] | set_pkg_name | The name of the last tracer package whose stocks were stored for a specific index. This is used to trigger an error if there are redundant stocks. |
[in] | max_ns | The maximum size of the master stock list |
[in,out] | ns_tot | The total number of stocks in the master list |
[in,out] | stock_names | Diagnostic names to use for each stock in the master list |
[in,out] | stock_units | Units to use in the metadata for each stock in the master list |
Definition at line 692 of file MOM_tracer_flow_control.F90.
References mom_error_handler::mom_error().
Referenced by call_tracer_stocks().
subroutine, public mom_tracer_flow_control::tracer_flow_control_end | ( | type(tracer_flow_control_cs), pointer | CS | ) |
cs | The control structure returned by a previous call to call_tracer_register. |
Definition at line 787 of file MOM_tracer_flow_control.F90.
Referenced by mom::mom_end().
subroutine, public mom_tracer_flow_control::tracer_flow_control_init | ( | logical, intent(in) | restart, |
type(time_type), intent(in), target | day, | ||
type(ocean_grid_type), intent(inout) | G, | ||
type(verticalgrid_type), intent(in) | GV, | ||
type(unit_scale_type), intent(in) | US, | ||
real, dimension(nimem_,njmem_,nkmem_), intent(in) | h, | ||
type(param_file_type), intent(in) | param_file, | ||
type(diag_ctrl), intent(in), target | diag, | ||
type(ocean_obc_type), pointer | OBC, | ||
type(tracer_flow_control_cs), pointer | CS, | ||
type(sponge_cs), pointer | sponge_CSp, | ||
type(ale_sponge_cs), pointer | ALE_sponge_CSp, | ||
type(thermo_var_ptrs), intent(in) | tv | ||
) |
This subroutine calls all registered tracer initialization subroutines.
[in] | restart | 1 if the fields have already been read from a restart file. |
[in] | day | Time of the start of the run. |
[in,out] | g | The ocean's grid structure. |
[in] | gv | The ocean's vertical grid structure. |
[in] | us | A dimensional unit scaling type |
[in] | h | Layer thicknesses [H ~> m or kg m-2] |
[in] | param_file | A structure to parse for run-time parameters |
[in] | diag | A structure that is used to regulate diagnostic output. |
obc | This open boundary condition type specifies whether, where, and what open boundary conditions are used. | |
cs | The control structure returned by a previous call to call_tracer_register. | |
sponge_csp | A pointer to the control structure for the sponges, if they are in use. Otherwise this may be unassociated. | |
ale_sponge_csp | A pointer to the control structure for the ALE sponges, if they are in use. Otherwise this may be unassociated. | |
[in] | tv | A structure pointing to various thermodynamic variables |
Definition at line 278 of file MOM_tracer_flow_control.F90.
References mom_error_handler::mom_error().