ideal_age_example module reference

A tracer package of ideal age tracers

Data Types

ideal_age_tracer_CS

the maximum number of tracers in this module.

Functions/Subroutines

register_ideal_age_tracer

Register the ideal age tracer fields to be used with MOM.

initialize_ideal_age_tracer

Sets the ideal age traces to their initial values and sets up the tracer output

ideal_age_tracer_column_physics

Applies diapycnal diffusion, aging and regeneration at the surface to the ideal age tracers

ideal_age_stock

Calculates the mass-weighted integral of all tracer stocks, returning the number of stocks it has calculated. If stock_index is present, only the stock corresponding to that coded index is found.

ideal_age_tracer_surface_state

This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations. This particular tracer package does not report anything back to the coupler.

ideal_age_example_end

Deallocate any memory associated with this tracer package

count_BL_layers

Detailed Description

Originally by Robert Hallberg, 2002

This file contains an example of the code that is needed to set up and use a set (in this case two) of dynamically passive tracers for diagnostic purposes. The tracers here are an ideal age tracer that ages at a rate of 1/year once it is isolated from the surface, and a vintage tracer, whose surface concentration grows exponen- with time with a 30-year timescale (similar to CFCs).

Type Documentation

type, public :: ideal_age_tracer_CS

the maximum number of tracers in this module.

The control structure for the ideal_age_tracer package

Parameters
  • ntr

    The number of tracers that are actually used.

  • coupled_tracers

    These tracers are not offered to the coupler.

  • nkbl

    The number of layers in the boundary layer. The ideal

  • IC_file

    The file in which the age-tracer initial values can be found, or an empty string for internal initialization.

  • Z_IC_file

    If true, the IC_file is in Z-space. The default is false.

  • 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 package [years] or other units

  • IC_val

    The (uniform) initial condition value [years] or other units

  • young_val

    The value assigned to tr at the surface [years] or other units

  • land_val

    The value of tr used where land is masked out [years] or other units

  • growth_rate

    The exponential growth rate for the young value [year-1]

  • tracer_start_year

    The year in which tracers start aging, or at which the surface value equals young_val [years].

  • use_real_BL_depth

    If true, uses the BL scheme to determine the number of layers above the BL depth instead of the fixed nkbl value.

  • BL_residence_num

    The tracer number assigned to the BL residence tracer in this module

  • tracers_may_reinit

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

  • tracer_ages

    Indicates whether each tracer ages.

  • 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 controls structure

  • tr_desc

    Descriptions and metadata for the tracers

Functions/Subroutine Documentation

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

Register the ideal age tracer fields 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

    The control structure returned by a previous call to register_ideal_age_tracer.

  • tr_Reg

    A pointer that is set to point to the control structure for the tracer advection and diffusion module

  • restart_CS [inout]

    MOM restart control struct

Callees call graph
Callees of ideal_age_example::register_ideal_age_tracer calls cluster_ideal_age_example ideal_age_example 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_registry MOM_tracer_registry ideal_age_example::register_ideal_age_tracer register_ideal_age_tracer mom_couplertype_infra::atmos_ocn_coupler_flux atmos_ocn_coupler_flux ideal_age_example::register_ideal_age_tracer->mom_couplertype_infra::atmos_ocn_coupler_flux mom_error_handler::mom_error MOM_error ideal_age_example::register_ideal_age_tracer->mom_error_handler::mom_error mom_file_parser::interface::get_param get_param (interface) ideal_age_example::register_ideal_age_tracer->mom_file_parser::interface::get_param mom_file_parser::interface::log_param log_param (interface) ideal_age_example::register_ideal_age_tracer->mom_file_parser::interface::log_param mom_file_parser::interface::log_version log_version (interface) ideal_age_example::register_ideal_age_tracer->mom_file_parser::interface::log_version mom_io::query_vardesc query_vardesc ideal_age_example::register_ideal_age_tracer->mom_io::query_vardesc mom_io::var_desc var_desc ideal_age_example::register_ideal_age_tracer->mom_io::var_desc mom_string_functions::slasher slasher ideal_age_example::register_ideal_age_tracer->mom_string_functions::slasher mom_tracer_registry::register_tracer register_tracer ideal_age_example::register_ideal_age_tracer->mom_tracer_registry::register_tracer
Text view
Callers call graph
Callers of ideal_age_example::register_ideal_age_tracer calls cluster_ideal_age_example ideal_age_example cluster_mom_tracer_flow_control MOM_tracer_flow_control ideal_age_example::register_ideal_age_tracer register_ideal_age_tracer mom_tracer_flow_control::call_tracer_register call_tracer_register mom_tracer_flow_control::call_tracer_register->ideal_age_example::register_ideal_age_tracer
Text view
subroutine initialize_ideal_age_tracer(restart, day, G, GV, US, h, diag, OBC, CS, sponge_CSp)

Sets the ideal age traces to their initial values and sets up the tracer output

Parameters
  • restart [in]

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

  • day [in]

    Time of the start of the run.

  • G [in]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure

  • US [in]

    A dimensional unit scaling type

  • h [in]

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

  • diag [in]

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

  • sponge_CSp

    Pointer to the control structure for the sponges.

Callees call graph
Callees of ideal_age_example::initialize_ideal_age_tracer calls cluster_ideal_age_example ideal_age_example cluster_mom_error_handler MOM_error_handler cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra cluster_mom_restart MOM_restart cluster_mom_tracer_z_init MOM_tracer_Z_init ideal_age_example::initialize_ideal_age_tracer initialize_ideal_age_tracer mom_error_handler::mom_error MOM_error ideal_age_example::initialize_ideal_age_tracer->mom_error_handler::mom_error mom_io::interface::mom_read_data MOM_read_data (interface) ideal_age_example::initialize_ideal_age_tracer->mom_io::interface::mom_read_data mom_io::query_vardesc query_vardesc ideal_age_example::initialize_ideal_age_tracer->mom_io::query_vardesc mom_io_infra::interface::file_exists file_exists (interface) ideal_age_example::initialize_ideal_age_tracer->mom_io_infra::interface::file_exists mom_restart::interface::query_initialized query_initialized (interface) ideal_age_example::initialize_ideal_age_tracer->mom_restart::interface::query_initialized mom_restart::interface::set_initialized set_initialized (interface) ideal_age_example::initialize_ideal_age_tracer->mom_restart::interface::set_initialized mom_tracer_z_init::tracer_z_init tracer_Z_init ideal_age_example::initialize_ideal_age_tracer->mom_tracer_z_init::tracer_z_init
Text view
Callers call graph
Callers of ideal_age_example::initialize_ideal_age_tracer calls cluster_ideal_age_example ideal_age_example cluster_mom_tracer_flow_control MOM_tracer_flow_control ideal_age_example::initialize_ideal_age_tracer initialize_ideal_age_tracer mom_tracer_flow_control::tracer_flow_control_init tracer_flow_control_init mom_tracer_flow_control::tracer_flow_control_init->ideal_age_example::initialize_ideal_age_tracer
Text view
subroutine ideal_age_tracer_column_physics(h_old, h_new, ea, eb, fluxes, dt, G, GV, US, CS, evap_CFL_limit, minimum_forcing_depth, Hbl)

Applies diapycnal diffusion, aging and regeneration at the surface to the ideal age tracers

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

  • Hbl [in]

    Boundary layer thickness [H ~> m or kg m-2]

Callees call graph
Callees of ideal_age_example::ideal_age_tracer_column_physics calls cluster_ideal_age_example ideal_age_example cluster_mom_error_handler MOM_error_handler cluster_mom_time_manager MOM_time_manager cluster_mom_tracer_diabatic MOM_tracer_diabatic ideal_age_example::count_bl_layers count_BL_layers ideal_age_example::ideal_age_tracer_column_physics ideal_age_tracer_column_physics ideal_age_example::ideal_age_tracer_column_physics->ideal_age_example::count_bl_layers mom_error_handler::mom_error MOM_error ideal_age_example::ideal_age_tracer_column_physics->mom_error_handler::mom_error mom_time_manager::time_to_real time_to_real ideal_age_example::ideal_age_tracer_column_physics->mom_time_manager::time_to_real mom_tracer_diabatic::applytracerboundaryfluxesinout applyTracerBoundaryFluxesInOut ideal_age_example::ideal_age_tracer_column_physics->mom_tracer_diabatic::applytracerboundaryfluxesinout mom_tracer_diabatic::tracer_vertdiff tracer_vertdiff ideal_age_example::ideal_age_tracer_column_physics->mom_tracer_diabatic::tracer_vertdiff
Text view
Callers call graph
Callers of ideal_age_example::ideal_age_tracer_column_physics calls cluster_ideal_age_example ideal_age_example cluster_mom_tracer_flow_control MOM_tracer_flow_control ideal_age_example::ideal_age_tracer_column_physics ideal_age_tracer_column_physics mom_tracer_flow_control::call_tracer_column_fns call_tracer_column_fns mom_tracer_flow_control::call_tracer_column_fns->ideal_age_example::ideal_age_tracer_column_physics
Text view
function ideal_age_stock(h, stocks, G, GV, CS, names, units, stock_index)

Calculates the mass-weighted integral of all tracer stocks, returning the number of stocks it has calculated. If stock_index is present, only the stock corresponding to that coded index is found.

Parameters
  • G [in]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure

  • h [in]

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

  • stocks [out]

    the mass-weighted integrated amount of each tracer, in kg times concentration units [kg conc].

  • CS

    The control structure returned by a previous call to register_ideal_age_tracer.

  • names [out]

    the names of the stocks calculated.

  • units [out]

    the units of the stocks calculated.

  • stock_index [in]

    the coded index of a specific stock being sought.

  • ideal_age_stock

    The number of stocks calculated here.

Callees call graph
Callees of ideal_age_example::ideal_age_stock calls cluster_ideal_age_example ideal_age_example cluster_mom_io MOM_io cluster_mom_spatial_means MOM_spatial_means ideal_age_example::ideal_age_stock ideal_age_stock mom_io::query_vardesc query_vardesc ideal_age_example::ideal_age_stock->mom_io::query_vardesc mom_spatial_means::global_mass_int_efp global_mass_int_EFP ideal_age_example::ideal_age_stock->mom_spatial_means::global_mass_int_efp
Text view
Callers call graph
Callers of ideal_age_example::ideal_age_stock calls cluster_ideal_age_example ideal_age_example cluster_mom_tracer_flow_control MOM_tracer_flow_control ideal_age_example::ideal_age_stock ideal_age_stock mom_tracer_flow_control::call_tracer_stocks call_tracer_stocks mom_tracer_flow_control::call_tracer_stocks->ideal_age_example::ideal_age_stock
Text view
subroutine ideal_age_tracer_surface_state(sfc_state, h, G, GV, CS)

This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations. This particular tracer package does not report anything back to the coupler.

Parameters
  • G [in]

    The ocean's grid structure.

  • GV [in]

    The ocean's vertical grid structure

  • sfc_state [inout]

    A structure containing fields that describe the surface state of the ocean.

  • h [in]

    Layer thickness [H ~> m or kg m-2].

  • CS

    The control structure returned by a previous call to register_ideal_age_tracer.

Callees call graph
Callees of ideal_age_example::ideal_age_tracer_surface_state calls cluster_ideal_age_example ideal_age_example cluster_mom_coupler_types MOM_coupler_types ideal_age_example::ideal_age_tracer_surface_state ideal_age_tracer_surface_state mom_coupler_types::set_coupler_type_data set_coupler_type_data ideal_age_example::ideal_age_tracer_surface_state->mom_coupler_types::set_coupler_type_data
Text view
Callers call graph
Callers of ideal_age_example::ideal_age_tracer_surface_state calls cluster_ideal_age_example ideal_age_example cluster_mom_tracer_flow_control MOM_tracer_flow_control ideal_age_example::ideal_age_tracer_surface_state ideal_age_tracer_surface_state mom_tracer_flow_control::call_tracer_surface_state call_tracer_surface_state mom_tracer_flow_control::call_tracer_surface_state->ideal_age_example::ideal_age_tracer_surface_state
Text view
subroutine ideal_age_example_end(CS)

Deallocate any memory associated with this tracer package

Parameters
  • CS

    The control structure returned by a previous call to register_ideal_age_tracer.

Callers call graph
Callers of ideal_age_example::ideal_age_example_end calls cluster_ideal_age_example ideal_age_example cluster_mom_tracer_flow_control MOM_tracer_flow_control ideal_age_example::ideal_age_example_end ideal_age_example_end mom_tracer_flow_control::tracer_flow_control_end tracer_flow_control_end mom_tracer_flow_control::tracer_flow_control_end->ideal_age_example::ideal_age_example_end
Text view

subroutine count_BL_layers(G, GV, h, Hbl, BL_layers)

Parameters
  • G [in]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure

  • h [in]

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

  • Hbl [in]

    Boundary layer thickness [H ~> m or kg m-2]

  • BL_layers [out]

    Number of model layers in the boundary layer [nondim]

Callers call graph
Callers of ideal_age_example::count_bl_layers calls cluster_ideal_age_example ideal_age_example ideal_age_example::count_bl_layers count_BL_layers ideal_age_example::ideal_age_tracer_column_physics ideal_age_tracer_column_physics ideal_age_example::ideal_age_tracer_column_physics->ideal_age_example::count_bl_layers
Text view
API generated with Flint · Rendered from reStructuredText