advection_test_tracer module reference¶
This tracer package is used to test advection schemes.
Data Types¶
The control structure for the advect_test_tracer module. |
Functions/Subroutines¶
Register tracer fields and subroutines to be used with MOM. |
|
Initializes the NTR tracer fields in tr(:,:,:,:) and it sets up the tracer output. |
|
Applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this package. |
|
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations. |
|
Calculate the mass-weighted integral of all tracer stocks, returning the number of stocks it has calculated. |
|
Deallocate memory associated with this module. |
Detailed Description¶
This tracer package is used to test advection schemes.
Type Documentation¶
-
type
advection_test_tracer/
advection_test_tracer_cs
¶ The control structure for the advect_test_tracer module.
- Type fields:
%
ntr
[integer] :: Number of tracers in this module.%
coupled_tracers
[logical] :: These 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),pointer] :: A pointer to the ocean model’s clock.%
tr_reg
[type(tracer_registry_type),pointer] :: A pointer to the MOM tracer registry.%
tr
[real(:,:,:,:),pointer] :: The array of tracers used in this subroutine [conc].%
land_val
[real( ntr )] :: The value of tr used where land is masked out [conc].%
use_sponge
[logical] :: If true, sponges may be applied somewhere in the domain.%
tracers_may_reinit
[logical] :: If true, the tracers may be set up via the initialization code if they are not found in the restart files. Otherwise it is a fatal error if the tracers are not found in the restart files of a restarted run.%
x_origin
[real] :: Starting x-position of the tracer [m] or [km] or [degrees_E].%
x_width
[real] :: Initial size in the x-direction of the tracer patch [m] or [km] or [degrees_E].%
y_origin
[real] :: Starting y-position of the tracer [m] or [km] or [degrees_N].%
y_width
[real] :: Initial size in the y-direction of the tracer patch [m] or [km] or [degrees_N].%
ind_tr
[integer( ntr )] :: Indices 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 ),pointer] :: A structure that is used to regulate the timing of diagnostic output.%
restart_csp
[type( mom_restart_cs ),pointer] :: A pointer to the restart control structure.%
tr_desc
[type( vardesc )( ntr )] :: Descriptions and metadata for the tracers.
Function/Subroutine Documentation¶
-
function
advection_test_tracer/
register_advection_test_tracer
(G, GV, param_file, CS, tr_Reg, restart_CS) [logical]¶ Register tracer fields and subroutines to be used with MOM.
- Parameters:
g :: [in] The ocean’s grid 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_advection_test_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
- Call to:
mom_error_handler::mom_error
ntr
mom_tracer_registry::register_tracer
mom_io::var_desc
-
subroutine
advection_test_tracer/
initialize_advection_test_tracer
(restart, day, G, GV, h, diag, OBC, CS, sponge_CSp)¶ 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 :: [in] The ocean’s grid structure
gv :: [in] The ocean’s vertical grid structure
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_advection_test_tracer.
sponge_csp :: Pointer to the control structure for the sponges.
- Call to:
-
subroutine
advection_test_tracer/
advection_test_tracer_column_physics
(h_old, h_new, ea, eb, fluxes, dt, G, GV, US, CS, evap_CFL_limit, minimum_forcing_depth)¶ Applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this package. This is a simple example of a set of advected passive 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
eb :: [in] an array to which the amount of fluid entrained
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_advection_test_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]
- Call to:
mom_tracer_diabatic::applytracerboundaryfluxesinout
ntr
mom_tracer_diabatic::tracer_vertdiff
-
subroutine
advection_test_tracer/
advection_test_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_advection_test_tracer.
- Call to:
-
function
advection_test_tracer/
advection_test_stock
(h, stocks, G, GV, CS, names, units, stock_index) [integer]¶ Calculate the mass-weighted integral of all tracer stocks, 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 :: The control structure returned by a previous call to register_advection_test_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.
- Return:
undefined :: the number of stocks calculated here.
- Call to:
mom_spatial_means::global_mass_int_efp
mom_io::query_vardesc
- Called from:
-
subroutine
advection_test_tracer/
advection_test_tracer_end
(CS)¶ Deallocate memory associated with this module.
- Parameters:
cs :: The control structure returned by a previous call to register_advection_test_tracer.
- Called from: