dyed_obc_tracer module reference

This tracer package dyes flow through open boundaries

Data Types

dyed_obc_tracer_CS

The control structure for the dyed_obc tracer package

Functions/Subroutines

register_dyed_obc_tracer

Register tracer fields and subroutines to be used with MOM.

initialize_dyed_obc_tracer

Initializes the CS%ntr tracer fields in tr(:,:,:,:) and sets up the tracer output.

dyed_obc_tracer_column_physics

This subroutine applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this file. This is a simple example of a set of advected passive tracers.

dyed_obc_tracer_end

Clean up memory allocations, if any.

Detailed Description

By Kate Hedstrom, 2017, copied from DOME tracers and also dye_example.

This file contains an example of the code that is needed to set up and use a set of dynamically passive tracers. These tracers dye the inflowing water, one per open boundary segment.

A single subroutine is called from within each file to register each of the tracers for reinitialization and advection and to register the subroutine that initializes the tracers and set up their output and the subroutine that does any tracer physics or chemistry along with diapycnal mixing (included here because some tracers may float or swim vertically or dye diapycnal processes).

The advection scheme of these tracers can be set to be different to that used by active tracers.

Type Documentation

type, public :: dyed_obc_tracer_CS

The control structure for the dyed_obc tracer package

Parameters
  • ntr

    The number of tracers that are actually used.

  • coupled_tracers

    These tracers are not offered to the coupler.

  • tracer_IC_file

    The full path to the IC file, or " " to initialize internally.

  • Time

    A pointer to the ocean model's clock.

  • tr_Reg

    A pointer to the tracer registry

  • tr

    The array of tracers used in this subroutine in [conc]

  • tracers_may_reinit

    If true, these tracers be set up via the initialization code if they are not found in the restart files.

  • ind_tr

    Indices returned by atmos_ocn_coupler_flux if it is used and the surface tracer concentrations are to be provided to the coupler.

  • diag

    A structure that is used to regulate the timing of diagnostic output.

  • restart_CSp

    A pointer to the restart control structure

  • tr_desc

    Descriptions and metadata for the tracers

Functions/Subroutine Documentation

function register_dyed_obc_tracer(HI, GV, param_file, CS, tr_Reg, restart_CS)

Register tracer fields and subroutines to be used with MOM.

Parameters
  • HI [in]

    A horizontal index type structure.

  • GV [in]

    The ocean's vertical grid structure

  • param_file [in]

    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 to the tracer registry.

  • restart_CS [inout]

    MOM restart control struct

Callees call graph
Callees of dyed_obc_tracer::register_dyed_obc_tracer calls cluster_dyed_obc_tracer dyed_obc_tracer cluster_mom_couplertype_infra MOM_couplertype_infra cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_io MOM_io cluster_mom_string_functions MOM_string_functions cluster_mom_tracer_advect_schemes MOM_tracer_advect_schemes cluster_mom_tracer_registry MOM_tracer_registry dyed_obc_tracer::register_dyed_obc_tracer register_dyed_obc_tracer mom_couplertype_infra::atmos_ocn_coupler_flux atmos_ocn_coupler_flux dyed_obc_tracer::register_dyed_obc_tracer->mom_couplertype_infra::atmos_ocn_coupler_flux mom_error_handler::mom_error MOM_error dyed_obc_tracer::register_dyed_obc_tracer->mom_error_handler::mom_error mom_file_parser::interface::get_param get_param (interface) dyed_obc_tracer::register_dyed_obc_tracer->mom_file_parser::interface::get_param mom_file_parser::interface::log_param log_param (interface) dyed_obc_tracer::register_dyed_obc_tracer->mom_file_parser::interface::log_param mom_file_parser::interface::log_version log_version (interface) dyed_obc_tracer::register_dyed_obc_tracer->mom_file_parser::interface::log_version mom_io::var_desc var_desc dyed_obc_tracer::register_dyed_obc_tracer->mom_io::var_desc mom_string_functions::slasher slasher dyed_obc_tracer::register_dyed_obc_tracer->mom_string_functions::slasher mom_tracer_advect_schemes::set_tracer_advect_scheme set_tracer_advect_scheme dyed_obc_tracer::register_dyed_obc_tracer->mom_tracer_advect_schemes::set_tracer_advect_scheme mom_tracer_registry::register_tracer register_tracer dyed_obc_tracer::register_dyed_obc_tracer->mom_tracer_registry::register_tracer
Text view
Callers call graph
Callers of dyed_obc_tracer::register_dyed_obc_tracer calls cluster_dyed_obc_tracer dyed_obc_tracer cluster_mom_tracer_flow_control MOM_tracer_flow_control dyed_obc_tracer::register_dyed_obc_tracer register_dyed_obc_tracer mom_tracer_flow_control::call_tracer_register call_tracer_register mom_tracer_flow_control::call_tracer_register->dyed_obc_tracer::register_dyed_obc_tracer
Text view
subroutine initialize_dyed_obc_tracer(restart, day, G, GV, h, diag, OBC, CS)

Initializes the CS%ntr tracer fields in tr(:,:,:,:) and sets up the tracer output.

Parameters
  • G [in]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure

  • restart [in]

    .true. if the fields have already been read from a restart file.

  • day [in]

    Time of the start of the run.

  • h [in]

    Layer thicknesses [H ~> m or kg m-2]

  • diag [in]

    Structure used to regulate diagnostic output.

  • OBC

    Structure specifying open boundary options.

  • CS

    The control structure returned by a previous call to dyed_obc_register_tracer.

Callees call graph
Callees of dyed_obc_tracer::initialize_dyed_obc_tracer calls cluster_dyed_obc_tracer dyed_obc_tracer cluster_mom_error_handler MOM_error_handler cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra cluster_mom_restart MOM_restart dyed_obc_tracer::initialize_dyed_obc_tracer initialize_dyed_obc_tracer mom_error_handler::mom_error MOM_error dyed_obc_tracer::initialize_dyed_obc_tracer->mom_error_handler::mom_error mom_io::interface::mom_read_data MOM_read_data (interface) dyed_obc_tracer::initialize_dyed_obc_tracer->mom_io::interface::mom_read_data mom_io::query_vardesc query_vardesc dyed_obc_tracer::initialize_dyed_obc_tracer->mom_io::query_vardesc mom_io_infra::interface::file_exists file_exists (interface) dyed_obc_tracer::initialize_dyed_obc_tracer->mom_io_infra::interface::file_exists mom_restart::interface::query_initialized query_initialized (interface) dyed_obc_tracer::initialize_dyed_obc_tracer->mom_restart::interface::query_initialized mom_restart::interface::set_initialized set_initialized (interface) dyed_obc_tracer::initialize_dyed_obc_tracer->mom_restart::interface::set_initialized
Text view
Callers call graph
Callers of dyed_obc_tracer::initialize_dyed_obc_tracer calls cluster_dyed_obc_tracer dyed_obc_tracer cluster_mom_tracer_flow_control MOM_tracer_flow_control dyed_obc_tracer::initialize_dyed_obc_tracer initialize_dyed_obc_tracer mom_tracer_flow_control::tracer_flow_control_init tracer_flow_control_init mom_tracer_flow_control::tracer_flow_control_init->dyed_obc_tracer::initialize_dyed_obc_tracer
Text view
subroutine dyed_obc_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, G, GV, US, CS, evap_CFL_limit, minimum_forcing_depth)

This subroutine applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this file. This is a simple example of a set of advected passive tracers.

The arguments to this subroutine are redundant in that h_new(k) = h_old(k) + ea(k) - eb(k-1) + eb(k) - ea(k+1)

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]

    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].

  • eb [in]

    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].

  • fluxes [in]

    A structure containing pointers to thermodynamic and tracer forcing fields. Unused fields have NULL ptrs.

  • dt [in]

    The amount of time covered by this call [T ~> s]

  • US [in]

    A dimensional unit scaling type

  • CS

    The control structure returned by a previous call to dyed_obc_register_tracer.

  • evap_CFL_limit [in]

    Limit on the fraction of the water that can be fluxed out of the top layer in a timestep [nondim]

  • minimum_forcing_depth [in]

    The smallest depth over which fluxes can be applied [H ~> m or kg m-2]

Callees call graph
Callees of dyed_obc_tracer::dyed_obc_tracer_column_physics calls cluster_dyed_obc_tracer dyed_obc_tracer cluster_mom_tracer_diabatic MOM_tracer_diabatic dyed_obc_tracer::dyed_obc_tracer_column_physics dyed_obc_tracer_column_physics mom_tracer_diabatic::applytracerboundaryfluxesinout applyTracerBoundaryFluxesInOut dyed_obc_tracer::dyed_obc_tracer_column_physics->mom_tracer_diabatic::applytracerboundaryfluxesinout mom_tracer_diabatic::tracer_vertdiff tracer_vertdiff dyed_obc_tracer::dyed_obc_tracer_column_physics->mom_tracer_diabatic::tracer_vertdiff
Text view
Callers call graph
Callers of dyed_obc_tracer::dyed_obc_tracer_column_physics calls cluster_dyed_obc_tracer dyed_obc_tracer cluster_mom_tracer_flow_control MOM_tracer_flow_control dyed_obc_tracer::dyed_obc_tracer_column_physics dyed_obc_tracer_column_physics mom_tracer_flow_control::call_tracer_column_fns call_tracer_column_fns mom_tracer_flow_control::call_tracer_column_fns->dyed_obc_tracer::dyed_obc_tracer_column_physics
Text view
subroutine dyed_obc_tracer_end(CS)

Clean up memory allocations, if any.

Parameters
  • CS

    The control structure returned by a previous call to dyed_obc_register_tracer.

Callers call graph
Callers of dyed_obc_tracer::dyed_obc_tracer_end calls cluster_dyed_obc_tracer dyed_obc_tracer cluster_mom_tracer_flow_control MOM_tracer_flow_control dyed_obc_tracer::dyed_obc_tracer_end dyed_obc_tracer_end mom_tracer_flow_control::tracer_flow_control_end tracer_flow_control_end mom_tracer_flow_control::tracer_flow_control_end->dyed_obc_tracer::dyed_obc_tracer_end
Text view
API generated with Flint · Rendered from reStructuredText