namespace mom_ocmip2_cfc

Overview

Simulates CFCs using the OCMIP2 protocols. More…

namespace mom_ocmip2_cfc {

// global functions

logical function, public register_ocmip2_cfc(
    HI HI,
    GV GV,
    param_file param_file,
    CS CS,
    tr_Reg tr_Reg,
    restart_CS restart_CS
    );

subroutine, public flux_init_ocmip2_cfc(CS CS, verbosity verbosity);

subroutine, public initialize_ocmip2_cfc(
    restart restart,
    day day,
    G G,
    GV GV,
    US US,
    h h,
    diag diag,
    OBC OBC,
    CS CS,
    sponge_CSp sponge_CSp
    );

subroutine, public ocmip2_cfc_column_physics(
    h_old h_old,
    h_new h_new,
    ea ea,
    eb eb,
    fluxes fluxes,
    dt dt,
    G G,
    GV GV,
    CS CS,
    evap_CFL_limit evap_CFL_limit,
    minimum_forcing_depth minimum_forcing_depth
    );

integer function, public ocmip2_cfc_stock(
    h h,
    stocks stocks,
    G G,
    GV GV,
    CS CS,
    names names,
    units units,
    stock_index stock_index
    );

subroutine, public ocmip2_cfc_surface_state(state state, h h, G G, CS CS);
subroutine, public ocmip2_cfc_end(CS CS);

} // namespace mom_ocmip2_cfc

Detailed Documentation

Simulates CFCs using the OCMIP2 protocols.

By Robert Hallberg, 2007

This module contains the code that is needed to set up and use CFC-11 and CFC-12 in a fully coupled or ice-ocean model context using the OCMIP2 protocols

Global Functions

logical function, public register_ocmip2_cfc(
    HI HI,
    GV GV,
    param_file param_file,
    CS CS,
    tr_Reg tr_Reg,
    restart_CS restart_CS
    )

Register the OCMIP2 CFC tracers to be used with MOM and read the parameters that are used with this tracer package.

Parameters:

hi

A horizontal index type structure.

gv

The ocean’s vertical grid structure.

param_file

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

A pointer to the restart control structure.

subroutine, public flux_init_ocmip2_cfc(CS CS, verbosity verbosity)

This subroutine initializes the air-sea CFC fluxes, and optionally returns the indicies of these fluxes. It can safely be called multiple times.

Parameters:

cs

An optional pointer to the control structure for this module; if not present, the flux indicies are not stored.

verbosity

A 0-9 integer indicating a level of verbosity.

subroutine, public initialize_ocmip2_cfc(
    restart restart,
    day day,
    G G,
    GV GV,
    US US,
    h h,
    diag diag,
    OBC OBC,
    CS CS,
    sponge_CSp sponge_CSp
    )

Initialize the OCMP2 CFC tracer fields and set up the tracer output.

Parameters:

restart

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

day

Time of the start of the run.

g

The ocean’s grid structure.

gv

The ocean’s vertical grid structure.

us

A dimensional unit scaling type

h

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

diag

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

sponge_csp

A pointer to the control structure for the sponges, if they are in use. Otherwise this may be unassociated.

subroutine, public ocmip2_cfc_column_physics(
    h_old h_old,
    h_new h_new,
    ea ea,
    eb eb,
    fluxes fluxes,
    dt dt,
    G G,
    GV GV,
    CS CS,
    evap_CFL_limit evap_CFL_limit,
    minimum_forcing_depth minimum_forcing_depth
    )

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

Parameters:

g

The ocean’s grid structure

gv

The ocean’s vertical grid structure

h_old

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

h_new

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

ea

an array to which the amount of fluid entrained

eb

an array to which the amount of fluid entrained

fluxes

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

dt

The amount of time covered by this call [s]

cs

The control structure returned by a previous call to register_OCMIP2_CFC.

evap_cfl_limit

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

minimum_forcing_depth

The smallest depth over which fluxes can be applied [m]

integer function, public ocmip2_cfc_stock(
    h h,
    stocks stocks,
    G G,
    GV GV,
    CS CS,
    names names,
    units units,
    stock_index stock_index
    )

This function calculates 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

The ocean’s grid structure.

gv

The ocean’s vertical grid structure.

h

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

stocks

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

names

The names of the stocks calculated.

units

The units of the stocks calculated.

stock_index

The coded index of a specific stock being sought.

Returns:

The number of stocks calculated here.

subroutine, public ocmip2_cfc_surface_state(state state, h h, G G, CS CS)

This subroutine extracts the surface CFC concentrations and other fields that are shared with the atmosphere to calculate CFC fluxes.

Parameters:

g

The ocean’s grid structure.

state

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

h

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

cs

The control structure returned by a previous call to register_OCMIP2_CFC.

subroutine, public ocmip2_cfc_end(CS CS)

Deallocate any memory associated with the OCMIP2 CFC tracer package.

Parameters:

cs

The control structure returned by a previous call to register_OCMIP2_CFC.