dyed_obc_tracer module reference
This tracer package dyes flow through open boundaries.
Data Types
The control structure for the dyed_obc tracer package. |
Functions/Subroutines
Register tracer fields and subroutines to be used with MOM. |
|
Initializes the CSntr tracer fields in tr(:,:,:,:) and sets up the tracer output. |
|
This subroutine applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this file. |
|
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 dyed_obc_tracer/dyed_obc_tracer_cs
The control structure for the dyed_obc tracer package.
- Type fields:
% ntr ::
integerThe number of tracers that are actually used.% coupled_tracers ::
logicalThese tracers are not offered to the coupler.% tracer_ic_file ::
character(len=200)The full path to the IC file, or “ “ to initialize internally.% time ::
type(time_type), pointerA pointer to the ocean model’s clock.% tr_reg ::
type(tracer_registry_type), pointerA pointer to the tracer registry.% tr ::
real, dimension(:,:,:,:), pointerThe array of tracers used in this subroutine in [conc].% tracers_may_reinit ::
logicalIf true, these tracers be set up via the initialization code if they are not found in the restart files.% ind_tr ::
integer, dimension(:), allocatableIndices returned by atmos_ocn_coupler_flux if it is used and the surface tracer concentrations are to be provided to the coupler.% diag ::
type(diag_ctrl), pointerA structure that is used to regulate the timing of diagnostic output.% restart_csp ::
type(mom_restart_cs), pointerA pointer to the restart control structure.% tr_desc ::
type(vardesc), dimension(:), allocatableDescriptions and metadata for the tracers.
Function/Subroutine Documentation
- function dyed_obc_tracer/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 ::
param_file[in] A structure to parse for run-time parameterscs :: 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
- Call to:
mom_error_handler::mom_errormom_tracer_advect_schemes::set_tracer_advect_schememom_tracer_advect_schemes::traceradvectionschemedocmom_io::var_desc
- subroutine dyed_obc_tracer/initialize_dyed_obc_tracer(restart, day, G, GV, h, diag, OBC, CS)
Initializes the CSntr 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 ::
restart[in] .true. if the fields have already been read from a restart file.day ::
day[in] Time of the start of the run.h ::
h[in] Layer thicknesses [H ~> m or kg m-2]diag ::
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.
- Call to:
- subroutine dyed_obc_tracer/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 ::
h_old[in] Layer thickness before entrainment [H ~> m or kg m-2].h_new ::
h_new[in] Layer thickness after entrainment [H ~> m or kg m-2].ea ::
ea[in] an array to which the amount of fluid entrainedeb ::
eb[in] an array to which the amount of fluid entrainedfluxes ::
fluxes[in] A structure containing pointers to thermodynamic and tracer forcing fields. Unused fields have NULL ptrs.dt ::
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 ::
minimum_forcing_depth[in] The smallest depth over which fluxes can be applied [H ~> m or kg m-2]
- Call to:
mom_tracer_diabatic::applytracerboundaryfluxesinoutmom_tracer_diabatic::tracer_vertdiff
- subroutine dyed_obc_tracer/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.
- Called from: