mom_generic_tracer module reference

Drives the generic version of tracers TOPAZ and CFC and other GFDL BGC components.

More…

Data Types

mom_generic_tracer_cs

Control structure for generic tracers.

Functions/Subroutines

register_mom_generic_tracer()

Pointer to the first element of the linked list of generic tracers.

register_mom_generic_tracer_segments()

Register OBC segments for generic tracers.

initialize_mom_generic_tracer()

Initialize phase II: Initialize required variables for generic tracers There are some steps of initialization that cannot be done in register_MOM_generic_tracer This is the place and time to do them: Set the grid mask and initial time for all generic tracers.

mom_generic_tracer_column_physics()

Column physics for generic tracers.

mom_generic_tracer_stock()

This subroutine calculates mass-weighted integral on the PE either of all available tracer concentrations, or of a tracer that is being requested specifically, returning the number of stocks it has calculated.

mom_generic_tracer_min_max()

This subroutine finds the global min and max of either of all available tracer concentrations, or of a tracer that is being requested specifically, returning the number of tracers it has evaluated.

mom_generic_tracer_surface_state()

This subroutine calculates the surface state and sets coupler values for those generic tracers that have flux exchange with atmosphere.

mom_generic_flux_init()

mom_generic_tracer_fluxes_accumulate()

mom_generic_tracer_get()

Copy the requested tracer into an array.

end_mom_generic_tracer()

This subroutine deallocates the memory owned by this module.

Detailed Description

Drives the generic version of tracers TOPAZ and CFC and other GFDL BGC components.

Type Documentation

type mom_generic_tracer/mom_generic_tracer_cs

Control structure for generic tracers.

Type fields:
  • % ic_file [character (len=200)] :: The file in which the generic tracer initial values can be found, or an empty string for internal initialization.

  • % z_ic_file [logical] :: If true, the generic_tracer IC_file is in Z-space. The default is false.

  • % tracer_ic_val [real] :: The initial value assigned to tracers, in concentration units [conc].

  • % tracer_land_val [real] :: The values of tracers used where land is masked out, in concentration units [conc].

  • % tracers_may_reinit [logical] :: If true, tracers may go through the initialization code if they are not found in the restart files.

  • % diag [type( diag_ctrl ),pointer] :: A structure that is used to regulate the timing of diagnostic output.

  • % restart_csp [type( mom_restart_cs ),pointer] :: Restart control structure.

  • % obc [type( ocean_obc_type ),pointer] :: open boundary condition type

Function/Subroutine Documentation

function mom_generic_tracer/register_mom_generic_tracer(HI, GV, param_file, CS, tr_Reg, restart_CS) [logical]

Pointer to the first element of the linked list of generic tracers.

Initializes the generic tracer packages and adds their tracers to the list Adds the tracers in the list of generic tracers to the set of MOM tracers (i.e., MOM-register them) Register these tracers for restart

Parameters:
  • hi :: [in] Horizontal index ranges

  • gv :: [in] The ocean’s vertical grid structure

  • param_file :: [in] A structure to parse for run-time parameters

  • cs :: Pointer to the control structure for this module

  • tr_reg :: Pointer to the control structure for the tracer advection and diffusion module.

  • restart_cs :: [inout] MOM restart control struct

Call to:

mom_error_handler::mom_error

subroutine mom_generic_tracer/register_mom_generic_tracer_segments(CS, GV, OBC, tr_Reg, param_file)

Register OBC segments for generic tracers.

Parameters:
  • cs :: Pointer to the control structure for this module.

  • gv :: [in] The ocean’s vertical grid structure

  • obc :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

  • tr_reg :: Pointer to the control structure for the tracer advection and diffusion module.

  • param_file :: [in] A structure to parse for run-time parameters

Called from:

mom_tracer_flow_control::call_tracer_register_obc_segments

subroutine mom_generic_tracer/initialize_mom_generic_tracer(restart, day, G, GV, US, h, tv, param_file, diag, OBC, CS, sponge_CSp, ALE_sponge_CSp)

Initialize phase II: Initialize required variables for generic tracers There are some steps of initialization that cannot be done in register_MOM_generic_tracer This is the place and time to do them: Set the grid mask and initial time for all generic tracers. Diag_register them. Z_diag_register them.

This subroutine initializes the NTR tracer fields in tr(:,:,:,:) and it 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 :: [inout] 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]

  • tv :: [in] A structure pointing to various thermodynamic variables

  • param_file :: [in] A structure to parse for run-time parameters

  • diag :: [in] Regulates diagnostic output.

  • obc :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

  • cs :: Pointer to the control structure for this module.

  • sponge_csp :: Pointer to the control structure for the sponges.

  • ale_sponge_csp :: Pointer to the control structure for the ALE sponges.

subroutine mom_generic_tracer/mom_generic_tracer_column_physics(h_old, h_new, ea, eb, fluxes, Hml, dt, G, GV, US, CS, tv, optics, evap_CFL_limit, minimum_forcing_depth)

Column physics for generic tracers. Get the coupler values for generic tracers that exchange with atmosphere Update generic tracer concentration fields from sources and sinks. Vertically diffuse generic tracer concentration fields. Update generic tracers from bottom and their bottom reservoir.

This subroutine applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this file. CFCs are relatively simple, as they are passive tracers. with only a surface flux as a source.

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] The amount of fluid entrained from the layer

  • eb :: [in] The amount of fluid entrained from the layer

  • fluxes :: [in] A structure containing pointers to thermodynamic and tracer forcing fields.

  • hml :: [in] Mixed layer depth [Z ~> m]

  • dt :: [in] The amount of time covered by this call [T ~> s]

  • us :: [in] A dimensional unit scaling type

  • cs :: Pointer to the control structure for this module.

  • tv :: [in] A structure pointing to various thermodynamic variables

  • optics :: [in] The structure containing optical properties.

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

function mom_generic_tracer/mom_generic_tracer_stock(h, stocks, G, GV, CS, names, units, stock_index) [integer]

This subroutine calculates mass-weighted integral on the PE either of all available tracer concentrations, or of a tracer that is being requested specifically, returning the number of stocks it has calculated. If the stock_index is present, only the stock corresponding to that coded index is returned.

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 :: Pointer to the control structure for this module.

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

Return:

undefined :: Return value, the number of stocks calculated here.

Call to:

mom_coms::real_to_efp

function mom_generic_tracer/mom_generic_tracer_min_max(ind_start, got_minmax, gmin, gmax, G, CS, names, units, xgmin, ygmin, zgmin, xgmax, ygmax, zgmax) [integer]

This subroutine finds the global min and max of either of all available tracer concentrations, or of a tracer that is being requested specifically, returning the number of tracers it has evaluated. It also optionally returns the locations of the extrema.

Parameters:
  • ind_start :: [in] The index of the tracer to start with

  • got_minmax :: [out] Indicates whether the global min and max are found for each tracer

  • gmin :: [out] Global minimum of each tracer [conc]

  • gmax :: [out] Global maximum of each tracer [conc]

  • g :: [in] The ocean’s grid structure

  • cs :: Pointer to the control structure for this module.

  • names :: [out] The names of the stocks calculated.

  • units :: [out] The units of the stocks calculated.

  • xgmin :: [out] The x-position of the global minimum in the units of GgeoLonT, often [degrees_E] or [km] or [m]

  • ygmin :: [out] The y-position of the global minimum in the units of GgeoLatT, often [degrees_N] or [km] or [m]

  • zgmin :: [out] The z-position of the global minimum [layer]

  • xgmax :: [out] The x-position of the global maximum in the units of GgeoLonT, often [degrees_E] or [km] or [m]

  • ygmax :: [out] The y-position of the global maximum in the units of GgeoLatT, often [degrees_N] or [km] or [m]

  • zgmax :: [out] The z-position of the global maximum [layer]

Return:

undefined :: Return value, the number of tracers done here.

subroutine mom_generic_tracer/mom_generic_tracer_surface_state(sfc_state, h, G, GV, CS)

This subroutine calculates the surface state and sets coupler values for those generic tracers that have flux exchange with atmosphere.

This subroutine sets up the fields that the coupler needs to calculate the CFC fluxes between the ocean and atmosphere.

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 thicknesses [H ~> m or kg m-2]

  • cs :: Pointer to the control structure for this module.

subroutine mom_generic_tracer/mom_generic_flux_init(verbosity)
Parameters:

verbosity :: [in] A 0-9 integer indicating a level of verbosity.

subroutine mom_generic_tracer/mom_generic_tracer_fluxes_accumulate(flux_tmp, weight)
Parameters:
  • flux_tmp :: [in] A structure containing pointers to thermodynamic and tracer forcing fields.

  • weight :: [in] A weight for accumulating this flux [nondim]

Called from:

ocean_model_mod::update_ocean_model

subroutine mom_generic_tracer/mom_generic_tracer_get(name, member, array, CS)

Copy the requested tracer into an array.

Parameters:
  • name :: [in] Name of requested tracer.

  • member :: [in] The tracer element to return.

  • array :: [out] Array filled by this routine, in arbitrary units [A]

  • cs :: Pointer to the control structure for this module.

subroutine mom_generic_tracer/end_mom_generic_tracer(CS)

This subroutine deallocates the memory owned by this module.

Parameters:

cs :: Pointer to the control structure for this module.