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
the number of tracers in this module. |
|
The control structure for the CFC_cap tracer package |
Functions/Subroutines
Register the CFCs to be used with MOM and read the parameters that are used with this tracer package |
|
Initialize the CFC tracer fields and set up the tracer output. |
|
This subroutine initializes a tracer array. |
|
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. |
|
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. |
|
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. |
|
Calculates the CFC's solubility function following Warner and Weiss (1985) DSR, vol 32. |
|
Compute Schmidt numbers of CFCs following Wanninkhof (2014); doi:10.4319/lom.2014.12.351 Range of validity of fit is -2:40. |
|
Deallocate any memory associated with the CFC cap tracer package |
|
Unit tests for the CFC cap module. |
|
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
Text view
mom_cfc_cap::register_cfc_cap → mom_error_handler::mom_error
mom_cfc_cap::register_cfc_cap → mom_file_parser::interface::get_param
mom_cfc_cap::register_cfc_cap → mom_file_parser::interface::log_param
mom_cfc_cap::register_cfc_cap → mom_file_parser::interface::log_version
mom_cfc_cap::register_cfc_cap → mom_interp_infra::init_extern_field
mom_cfc_cap::register_cfc_cap → mom_string_functions::slasher
mom_cfc_cap::register_cfc_cap → mom_tracer_registry::register_tracer
Callers call graph
- 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
Callers call graph
- 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
- 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
Text view
mom_cfc_cap::cfc_cap_column_physics → mom_cvmix_kpp::kpp_nonlocaltransport
mom_cfc_cap::cfc_cap_column_physics → mom_diag_mediator::interface::post_data
mom_cfc_cap::cfc_cap_column_physics → mom_tracer_diabatic::applytracerboundaryfluxesinout
mom_cfc_cap::cfc_cap_column_physics → mom_tracer_diabatic::tracer_vertdiff
Callers call graph
- 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
Callers call graph
- 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
Callers call graph
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
- 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
- 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
- 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
- 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]