This commit includes three distinct changes to the generic_tracer code to
regulate output verbosity, increase robustness, and make available for a module
use a variable size that is required to use the generic_tracer_utilities.
Specifically these changes are:
Added optional verbosity arguments to g_tracer_print_info, g_tracer_flux_init
and generic_tracer_register, to allow for the run-time specification of the
volume of diagnostic output. Some are directly implemented in the generic
tracer code, while others pass through to an existing optional argument in
aof_set_coupler_flux.
Added a generic_tracer_register_called module variable to generic_tracer.F90.
Because of the way generic_tracer_register is structured and allocates data,
there will be problems if it is executed more than once. This new module
variable allows it to be called multiple times without the damaging effects
of executing it more than once. This regulation is more appropriate to occur
in the generic_tracer module, because the coding conventions for this module
make extensive use of module data, whereas MOM6 does not do this.
Make the variable fm_string_len publicly available from the g_tracer_utils
module. Several routines in g_tracer_utils specify that this is the required
length of their character array arguments, so this variable should be shared
from this module, rather than requiring calling modules to reference another
infrastructure module.
This commit includes three distinct changes to the generic_tracer code to regulate output verbosity, increase robustness, and make available for a module use a variable size that is required to use the generic_tracer_utilities. Specifically these changes are:
Added optional verbosity arguments to g_tracer_print_info, g_tracer_flux_init and generic_tracer_register, to allow for the run-time specification of the volume of diagnostic output. Some are directly implemented in the generic tracer code, while others pass through to an existing optional argument in aof_set_coupler_flux.
Added a generic_tracer_register_called module variable to generic_tracer.F90. Because of the way generic_tracer_register is structured and allocates data, there will be problems if it is executed more than once. This new module variable allows it to be called multiple times without the damaging effects of executing it more than once. This regulation is more appropriate to occur in the generic_tracer module, because the coding conventions for this module make extensive use of module data, whereas MOM6 does not do this.
Make the variable fm_string_len publicly available from the g_tracer_utils module. Several routines in g_tracer_utils specify that this is the required length of their character array arguments, so this variable should be shared from this module, rather than requiring calling modules to reference another infrastructure module.