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¶
Contains the concentration array, surface flux, a pointer to Tr in Tr_reg, and some metadata for a single CFC tracer. |
|
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. |
|
Calculates the mass-weighted integral of all tracer stocks, returning the number of stocks it has calculated. |
|
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¶
Simulates CFCs using atmospheric pressure, wind speed and sea ice cover provided via cap (only NUOPC cap is implemented so far).
Type Documentation¶
-
type
mom_cfc_cap/
cfc_tracer_data
¶ Contains the concentration array, surface flux, a pointer to Tr in Tr_reg, and some metadata for a single CFC tracer.
- Type fields:
%
desc
[type( vardesc ),private] :: A set of metadata for the tracer.%
ic_val
[real,private] :: The initial value assigned to the tracer [mol kg-1].%
land_val
[real,private] :: The value of the tracer used where land is masked out [mol kg-1].%
name
[character (len=32),private] :: Tracer variable name.%
id_cmor
[integer,private] :: Diagnostic id.%
id_sfc_flux
[integer,private] :: Surface flux id.%
conc
[real(:,:,:),pointer, private] :: The tracer concentration [mol kg-1].%
sfc_flux
[real(:,:),pointer, private] :: Surface flux [CU R Z T-1 ~> mol m-2 s-1].%
tr_ptr
[type(tracer_type),pointer, private] :: pointer to tracer inside Tr_reg
-
type
mom_cfc_cap/
cfc_cap_cs
¶ The control structure for the CFC_cap tracer package.
- Type fields:
%
debug
[logical] :: If true, write verbose checksums for debugging purposes.%
ic_file
[character (len=200)] :: The file in which the CFC initial values can be found, or an empty string for internal initilaization.%
z_ic_file
[logical] :: If true, the IC_file is in Z-space. The default is false.%
time
[type(time_type),pointer] :: A pointer to the ocean model’s clock.%
tr_reg
[type( tracer_registry_type ),pointer] :: A pointer to the MOM6 tracer registry.%
tracers_may_reinit
[logical] :: If true, tracers may be reset via the initialization code if they are not found in the restart files.%
diag
[type( diag_ctrl ),pointer] :: A structure that is used to regulate the timing of diagnostic output.%
restart_csp
[type( mom_restart_cs ),pointer] :: Model restart control structure.%
cfc_data
[type( cfc_tracer_data )( ntr )] :: per-tracer parameters / metadata%
cfc_bc_year_offset
[integer] :: offset to add to model time to get time value used in CFC_BC_file%
cfc11_atm_nh_handle
[type(external_field)] :: Handle for time-interpolated CFC11 atm NH.%
cfc11_atm_sh_handle
[type(external_field)] :: Handle for time-interpolated CFC11 atm SH.%
cfc12_atm_nh_handle
[type(external_field)] :: Handle for time-interpolated CFC12 atm NH.%
cfc12_atm_sh_handle
[type(external_field)] :: Handle for time-interpolated CFC12 atm SH.
Function/Subroutine Documentation¶
-
function
mom_cfc_cap/
register_cfc_cap
(HI, GV, param_file, CS, tr_Reg, restart_CS) [logical]¶ 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
- Call to:
mom_error_handler::mom_error
ntr
mom_tracer_registry::register_tracer
mom_io::var_desc
-
subroutine
mom_cfc_cap/
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.
- Call to:
-
subroutine
mom_cfc_cap/
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.
- Call to:
mom_error_handler::mom_error
mom_tracer_z_init::tracer_z_init
- Called from:
-
subroutine
mom_cfc_cap/
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
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_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]
- Call to:
mom_tracer_diabatic::applytracerboundaryfluxesinout
mom_cvmix_kpp::kpp_nonlocaltransport
ntr
mom_tracer_diabatic::tracer_vertdiff
-
function
mom_cfc_cap/
cfc_cap_stock
(h, stocks, G, GV, CS, names, units, stock_index) [integer]¶ 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.
- Return:
undefined :: The number of stocks calculated here.
- Call to:
mom_spatial_means::global_mass_int_efp
ntr
mom_io::query_vardesc
- Called from:
-
subroutine
mom_cfc_cap/
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.
- Call to:
-
subroutine
mom_cfc_cap/
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]
- Called from:
-
subroutine
mom_cfc_cap/
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].
- Called from:
-
subroutine
mom_cfc_cap/
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.
- Call to:
ntr
- Called from:
-
function
mom_cfc_cap/
cfc_cap_unit_tests
(verbose) [logical]¶ Unit tests for the CFC cap module.
- Parameters:
verbose :: [in] If true, output additional information for debugging unit tests
- Call to:
comp_cfc_schmidt
compare_values
get_solubility
mom_io::stdout
- Called from:
-
function
mom_cfc_cap/
compare_values
(verbose, test_name, calc, ans, limit) [logical]¶ 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 abitrary units [A]
ans :: [in] correct value [A]
limit :: [in] value above which test fails [A]
- Call to:
mom_io::stdout
- Called from: