MOM_CFC_cap module reference

Simulates CFCs using atmospheric pressure, wind speed and sea ice cover provided via cap (only NUOPC cap is implemented so far).

Data Types

CFC_tracer_data

the number of tracers in this module.

CFC_cap_CS

The control structure for the CFC_cap tracer package

Functions/Subroutines

register_CFC_cap

Register the CFCs to be used with MOM and read the parameters that are used with this tracer package

initialize_CFC_cap

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

init_tracer_CFC

This subroutine initializes a tracer array.

CFC_cap_column_physics

Applies diapycnal diffusion, souces and sinks and any other column tracer physics to the CFC cap tracers. CFCs are relatively simple, as they are passive tracers with only a surface flux as a source.

CFC_cap_stock

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.

CFC_cap_set_forcing

Orchestrates the calculation of the CFC fluxes [mol m-2 s-1], including getting the ATM concentration, and calculating the solubility, Schmidt number, and gas exchange.

get_solubility

Calculates the CFC's solubility function following Warner and Weiss (1985) DSR, vol 32.

comp_CFC_schmidt

Compute Schmidt numbers of CFCs following Wanninkhof (2014); doi:10.4319/lom.2014.12.351 Range of validity of fit is -2:40.

CFC_cap_end

Deallocate any memory associated with the CFC cap tracer package

CFC_cap_unit_tests

Unit tests for the CFC cap module.

compare_values

Test that ans and calc are approximately equal by computing the difference and comparing it against limit.

Detailed Description

This module contains the code that is needed to simulate CFC-11 and CFC-12 using atmospheric and sea ice variables provided via cap (only NUOPC cap is implemented so far).

Type Documentation

type, private :: CFC_tracer_data

the number of tracers in this module.

Contains the concentration array, surface flux, a pointer to Tr in Tr_reg, and some metadata for a single CFC tracer

Parameters
  • desc

    A set of metadata for the tracer

  • IC_val

    The initial value assigned to the tracer [mol kg-1].

  • land_val

    The value of the tracer used where land is masked out [mol kg-1].

  • name

    Tracer variable name

  • id_cmor

    Diagnostic id

  • id_sfc_flux

    Surface flux id

  • conc

    The tracer concentration [mol kg-1].

  • sfc_flux

    Surface flux [CU R Z T-1 ~> mol m-2 s-1]

  • tr_ptr

    pointer to tracer inside Tr_reg

type, public :: CFC_cap_CS

The control structure for the CFC_cap tracer package

Parameters
  • debug

    If true, write verbose checksums for debugging purposes.

  • IC_file

    The file in which the CFC initial values can be found, or an empty string for internal initilaization.

  • 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 MOM6 tracer registry

  • tracers_may_reinit

    If true, tracers may be reset via the initialization code if they are not found in the restart files.

  • diag

    A structure that is used to regulate the timing of diagnostic output.

  • restart_CSp

    Model restart control structure

  • CFC_data

    per-tracer parameters / metadata

  • CFC_BC_year_offset

    offset to add to model time to get time value used in CFC_BC_file

  • cfc11_atm_nh_handle

    Handle for time-interpolated CFC11 atm NH

  • cfc11_atm_sh_handle

    Handle for time-interpolated CFC11 atm SH

  • cfc12_atm_nh_handle

    Handle for time-interpolated CFC12 atm NH

  • cfc12_atm_sh_handle

    Handle for time-interpolated CFC12 atm SH

Functions/Subroutine Documentation

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

Register the CFCs to be used with MOM and read the parameters that are used with this tracer package

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

    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

Callees call graph
Callees of mom_cfc_cap::register_cfc_cap calls cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_interp_infra MOM_interp_infra cluster_mom_io MOM_io cluster_mom_string_functions MOM_string_functions cluster_mom_tracer_registry MOM_tracer_registry mom_cfc_cap::register_cfc_cap register_CFC_cap mom_error_handler::mom_error MOM_error mom_cfc_cap::register_cfc_cap->mom_error_handler::mom_error mom_file_parser::interface::get_param get_param (interface) mom_cfc_cap::register_cfc_cap->mom_file_parser::interface::get_param mom_file_parser::interface::log_param log_param (interface) mom_cfc_cap::register_cfc_cap->mom_file_parser::interface::log_param mom_file_parser::interface::log_version log_version (interface) mom_cfc_cap::register_cfc_cap->mom_file_parser::interface::log_version mom_interp_infra::init_extern_field init_extern_field mom_cfc_cap::register_cfc_cap->mom_interp_infra::init_extern_field mom_io::var_desc var_desc mom_cfc_cap::register_cfc_cap->mom_io::var_desc mom_string_functions::slasher slasher mom_cfc_cap::register_cfc_cap->mom_string_functions::slasher mom_tracer_registry::register_tracer register_tracer mom_cfc_cap::register_cfc_cap->mom_tracer_registry::register_tracer
Text view
Callers call graph
Callers of mom_cfc_cap::register_cfc_cap calls cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_tracer_flow_control MOM_tracer_flow_control mom_cfc_cap::register_cfc_cap register_CFC_cap mom_tracer_flow_control::call_tracer_register call_tracer_register mom_tracer_flow_control::call_tracer_register->mom_cfc_cap::register_cfc_cap
Text view
subroutine initialize_CFC_cap(restart, day, G, GV, US, h, diag, OBC, CS)

Initialize the CFC tracer fields and set 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_CFC_cap.

Callees call graph
Callees of mom_cfc_cap::initialize_cfc_cap calls cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_restart MOM_restart mom_cfc_cap::init_tracer_cfc init_tracer_CFC [private/internal] mom_cfc_cap::initialize_cfc_cap initialize_CFC_cap mom_cfc_cap::initialize_cfc_cap->mom_cfc_cap::init_tracer_cfc mom_diag_mediator::register_diag_field register_diag_field mom_cfc_cap::initialize_cfc_cap->mom_diag_mediator::register_diag_field mom_restart::interface::query_initialized query_initialized (interface) mom_cfc_cap::initialize_cfc_cap->mom_restart::interface::query_initialized mom_restart::interface::set_initialized set_initialized (interface) mom_cfc_cap::initialize_cfc_cap->mom_restart::interface::set_initialized
Text view
Callers call graph
Callers of mom_cfc_cap::initialize_cfc_cap calls cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_tracer_flow_control MOM_tracer_flow_control mom_cfc_cap::initialize_cfc_cap initialize_CFC_cap mom_tracer_flow_control::tracer_flow_control_init tracer_flow_control_init mom_tracer_flow_control::tracer_flow_control_init->mom_cfc_cap::initialize_cfc_cap
Text view
subroutine init_tracer_CFC(h, tr, name, land_val, IC_val, G, GV, US, CS)

This subroutine initializes a tracer array.

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

  • tr [out]

    The tracer concentration array [mol kg-1]

  • name [in]

    The tracer name

  • land_val [in]

    A value the tracer takes over land [mol kg-1]

  • IC_val [in]

    The initial condition value for the tracer [mol kg-1]

  • CS

    The control structure returned by a previous call to register_CFC_cap.

Callees call graph
Callees of mom_cfc_cap::init_tracer_cfc calls cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_error_handler MOM_error_handler cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra cluster_mom_tracer_z_init MOM_tracer_Z_init mom_cfc_cap::init_tracer_cfc init_tracer_CFC [private/internal] mom_error_handler::mom_error MOM_error mom_cfc_cap::init_tracer_cfc->mom_error_handler::mom_error mom_io::interface::mom_read_data MOM_read_data (interface) mom_cfc_cap::init_tracer_cfc->mom_io::interface::mom_read_data mom_io_infra::interface::file_exists file_exists (interface) mom_cfc_cap::init_tracer_cfc->mom_io_infra::interface::file_exists mom_tracer_z_init::tracer_z_init tracer_Z_init mom_cfc_cap::init_tracer_cfc->mom_tracer_z_init::tracer_z_init
Text view
Callers call graph
Callers of mom_cfc_cap::init_tracer_cfc calls cluster_mom_cfc_cap MOM_CFC_cap mom_cfc_cap::init_tracer_cfc init_tracer_CFC [private/internal] mom_cfc_cap::initialize_cfc_cap initialize_CFC_cap mom_cfc_cap::initialize_cfc_cap->mom_cfc_cap::init_tracer_cfc
Text view
subroutine CFC_cap_column_physics(h_old, h_new, ea, eb, fluxes, dt, G, GV, US, CS, KPP_CSp, nonLocalTrans, evap_CFL_limit, minimum_forcing_depth)

Applies diapycnal diffusion, souces and sinks and any other column tracer physics to the CFC cap tracers. 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]

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

  • KPP_CSp

    KPP control structure

  • nonLocalTrans [in]

    Non-local transport [nondim]

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

Callees call graph
Callees of mom_cfc_cap::cfc_cap_column_physics calls cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_cvmix_kpp MOM_CVMix_KPP cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_tracer_diabatic MOM_tracer_diabatic mom_cfc_cap::cfc_cap_column_physics CFC_cap_column_physics mom_cvmix_kpp::kpp_nonlocaltransport KPP_NonLocalTransport mom_cfc_cap::cfc_cap_column_physics->mom_cvmix_kpp::kpp_nonlocaltransport mom_diag_mediator::interface::post_data post_data (interface) mom_cfc_cap::cfc_cap_column_physics->mom_diag_mediator::interface::post_data mom_tracer_diabatic::applytracerboundaryfluxesinout applyTracerBoundaryFluxesInOut mom_cfc_cap::cfc_cap_column_physics->mom_tracer_diabatic::applytracerboundaryfluxesinout mom_tracer_diabatic::tracer_vertdiff tracer_vertdiff mom_cfc_cap::cfc_cap_column_physics->mom_tracer_diabatic::tracer_vertdiff
Text view
Callers call graph
Callers of mom_cfc_cap::cfc_cap_column_physics calls cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_tracer_flow_control MOM_tracer_flow_control mom_cfc_cap::cfc_cap_column_physics CFC_cap_column_physics mom_tracer_flow_control::call_tracer_column_fns call_tracer_column_fns mom_tracer_flow_control::call_tracer_column_fns->mom_cfc_cap::cfc_cap_column_physics
Text view
function CFC_cap_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 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_CFC_cap.

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

  • CFC_cap_stock

    The number of stocks calculated here.

Callees call graph
Callees of mom_cfc_cap::cfc_cap_stock calls cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_io MOM_io cluster_mom_spatial_means MOM_spatial_means mom_cfc_cap::cfc_cap_stock CFC_cap_stock mom_io::query_vardesc query_vardesc mom_cfc_cap::cfc_cap_stock->mom_io::query_vardesc mom_spatial_means::global_mass_int_efp global_mass_int_EFP mom_cfc_cap::cfc_cap_stock->mom_spatial_means::global_mass_int_efp
Text view
Callers call graph
Callers of mom_cfc_cap::cfc_cap_stock calls cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_tracer_flow_control MOM_tracer_flow_control mom_cfc_cap::cfc_cap_stock CFC_cap_stock mom_tracer_flow_control::call_tracer_stocks call_tracer_stocks mom_tracer_flow_control::call_tracer_stocks->mom_cfc_cap::cfc_cap_stock
Text view
subroutine CFC_cap_set_forcing(sfc_state, fluxes, day_start, day_interval, G, US, Rho0, CS)

Orchestrates the calculation of the CFC fluxes [mol m-2 s-1], including getting the ATM concentration, and calculating the solubility, Schmidt number, and gas exchange.

Parameters
  • sfc_state [in]

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

  • fluxes [inout]

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

  • day_start [in]

    Start time of the fluxes.

  • day_interval [in]

    Length of time over which these fluxes will be applied.

  • G [in]

    The ocean's grid structure.

  • US [in]

    A dimensional unit scaling type

  • Rho0 [in]

    The mean ocean density [R ~> kg m-3]

  • CS

    The control structure returned by a previous call to register_CFC_cap.

Callees call graph
Callees of mom_cfc_cap::cfc_cap_set_forcing calls cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_checksums MOM_checksums cluster_mom_interpolate MOM_interpolate mom_cfc_cap::cfc_cap_set_forcing CFC_cap_set_forcing mom_cfc_cap::comp_cfc_schmidt comp_CFC_schmidt [private/internal] mom_cfc_cap::cfc_cap_set_forcing->mom_cfc_cap::comp_cfc_schmidt mom_cfc_cap::get_solubility get_solubility [private/internal] mom_cfc_cap::cfc_cap_set_forcing->mom_cfc_cap::get_solubility mom_checksums::interface::hchksum hchksum (interface) mom_cfc_cap::cfc_cap_set_forcing->mom_checksums::interface::hchksum mom_interpolate::interface::time_interp_external time_interp_external (interface) mom_cfc_cap::cfc_cap_set_forcing->mom_interpolate::interface::time_interp_external
Text view
Callers call graph
Callers of mom_cfc_cap::cfc_cap_set_forcing calls cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_tracer_flow_control MOM_tracer_flow_control mom_cfc_cap::cfc_cap_set_forcing CFC_cap_set_forcing mom_tracer_flow_control::call_tracer_set_forcing call_tracer_set_forcing mom_tracer_flow_control::call_tracer_set_forcing->mom_cfc_cap::cfc_cap_set_forcing
Text view

External calls

time_manager_mod
  • increment_date (time_manager_mod::increment_date)

subroutine get_solubility(alpha_11, alpha_12, ta, sal, mask)

Calculates the CFC's solubility function following Warner and Weiss (1985) DSR, vol 32.

Parameters
  • alpha_11 [inout]

    The solubility of CFC 11 [mol kg-1 atm-1]

  • alpha_12 [inout]

    The solubility of CFC 12 [mol kg-1 atm-1]

  • ta [in]

    Absolute sea surface temperature [hectoKelvin]

  • sal [in]

    Surface salinity [PSU].

  • mask [in]

    ocean mask [nondim]

Callers call graph
Callers of mom_cfc_cap::get_solubility calls cluster_mom_cfc_cap MOM_CFC_cap mom_cfc_cap::cfc_cap_set_forcing CFC_cap_set_forcing mom_cfc_cap::get_solubility get_solubility [private/internal] mom_cfc_cap::cfc_cap_set_forcing->mom_cfc_cap::get_solubility mom_cfc_cap::cfc_cap_unit_tests CFC_cap_unit_tests mom_cfc_cap::cfc_cap_unit_tests->mom_cfc_cap::get_solubility
Text view
subroutine comp_CFC_schmidt(sst_in, cfc11_sc, cfc12_sc)

Compute Schmidt numbers of CFCs following Wanninkhof (2014); doi:10.4319/lom.2014.12.351 Range of validity of fit is -2:40.

Parameters
  • sst_in [in]

    The sea surface temperature [degC].

  • cfc11_sc [inout]

    Schmidt number of CFC11 [nondim].

  • cfc12_sc [inout]

    Schmidt number of CFC12 [nondim].

Callers call graph
Callers of mom_cfc_cap::comp_cfc_schmidt calls cluster_mom_cfc_cap MOM_CFC_cap mom_cfc_cap::cfc_cap_set_forcing CFC_cap_set_forcing mom_cfc_cap::comp_cfc_schmidt comp_CFC_schmidt [private/internal] mom_cfc_cap::cfc_cap_set_forcing->mom_cfc_cap::comp_cfc_schmidt mom_cfc_cap::cfc_cap_unit_tests CFC_cap_unit_tests mom_cfc_cap::cfc_cap_unit_tests->mom_cfc_cap::comp_cfc_schmidt
Text view
subroutine CFC_cap_end(CS)

Deallocate any memory associated with the CFC cap tracer package

Parameters
  • CS

    The control structure returned by a previous call to register_CFC_cap.

Callers call graph
Callers of mom_cfc_cap::cfc_cap_end calls cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_tracer_flow_control MOM_tracer_flow_control mom_cfc_cap::cfc_cap_end CFC_cap_end mom_tracer_flow_control::tracer_flow_control_end tracer_flow_control_end mom_tracer_flow_control::tracer_flow_control_end->mom_cfc_cap::cfc_cap_end
Text view
logical function CFC_cap_unit_tests(verbose)

Unit tests for the CFC cap module.

Parameters
  • verbose [in]

    If true, output additional information for debugging unit tests

Callees call graph
Callees of mom_cfc_cap::cfc_cap_unit_tests calls cluster_mom_cfc_cap MOM_CFC_cap mom_cfc_cap::cfc_cap_unit_tests CFC_cap_unit_tests mom_cfc_cap::comp_cfc_schmidt comp_CFC_schmidt [private/internal] mom_cfc_cap::cfc_cap_unit_tests->mom_cfc_cap::comp_cfc_schmidt mom_cfc_cap::compare_values compare_values [private/internal] mom_cfc_cap::cfc_cap_unit_tests->mom_cfc_cap::compare_values mom_cfc_cap::get_solubility get_solubility [private/internal] mom_cfc_cap::cfc_cap_unit_tests->mom_cfc_cap::get_solubility
Text view
Callers call graph
Callers of mom_cfc_cap::cfc_cap_unit_tests calls cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_unit_tests MOM_unit_tests mom_cfc_cap::cfc_cap_unit_tests CFC_cap_unit_tests mom_unit_tests::unit_tests unit_tests mom_unit_tests::unit_tests->mom_cfc_cap::cfc_cap_unit_tests
Text view
logical function compare_values(verbose, test_name, calc, ans, limit)

Test that ans and calc are approximately equal by computing the difference and comparing it against limit.

Parameters
  • verbose [in]

    If true, write results to stdout

  • test_name [in]

    Brief description of the unit test

  • calc [in]

    computed value in arbitrary units [A]

  • ans [in]

    correct value [A]

  • limit [in]

    value above which test fails [A]

Callers call graph
Callers of mom_cfc_cap::compare_values calls cluster_mom_cfc_cap MOM_CFC_cap mom_cfc_cap::cfc_cap_unit_tests CFC_cap_unit_tests mom_cfc_cap::compare_values compare_values [private/internal] mom_cfc_cap::cfc_cap_unit_tests->mom_cfc_cap::compare_values
Text view
API generated with Flint · Rendered from reStructuredText