With use_bgc = TRUE, build_aeme() configures AED for GLM-AED in several
steps. aed_options() lets you choose which of these run. The defaults
reproduce the usual build, so only set what you want to change. Every step
is also available on its own once the model is built:
set_glm_aed_models(), set_aed_sed_const2d() and set_aed_totals().
Usage
aed_options(
modules = NULL,
resolve_deps = TRUE,
initialise = TRUE,
sed_zones = TRUE,
totals = TRUE
)Arguments
- modules
character or
NULL; the AED modules to activate, from"aed_sedflux","aed_noncohesive","aed_oxygen","aed_silica","aed_nitrogen","aed_phosphorus","aed_alum","aed_organic_matter","aed_phytoplankton","aed_zooplankton","aed_macrophyte"and"aed_totals".NULL(default) activates the modules needed for the variables set to simulate inmodel_controls.- resolve_deps
logical; when
modulesis supplied, also activate the modules they depend on (e.g.aed_nitrogenneedsaed_oxygenandaed_sedflux), as themodel_controls-driven default does. IfFALSE,modulesis used exactly as given, and GLM aborts at runtime if a module's prerequisites are missing. DefaultTRUE.- initialise
logical; write the initial concentrations and active modules to
aed.nmlfrommodel_controls. IfFALSE,aed.nmlis left as it is (the shipped template for a new lake, or your own file for an existing one). DefaultTRUE.- sed_zones
logical; estimate and set the per-zone sediment fluxes (
aed_sed_const2d) withset_aed_sed_const2d(). DefaultTRUE.- totals
logical; derive the
aed_totals(TN, TP, TOC and TSS) variable lists withset_aed_totals(). DefaultTRUE.
Value
An aed_options object, to pass as the aed argument of
build_aeme().
Examples
# Default: everything as usual
aed_options()
#> <aed_options>
#> • Modules: from `model_controls`
#> • Write initial concentrations to aed.nml: TRUE
#> • Estimate sediment zone fluxes: TRUE
#> • Derive aed_totals: TRUE
# Only oxygen and nutrient cycling, and leave the sediment fluxes alone
aed_options(
modules = c("aed_sedflux", "aed_oxygen", "aed_nitrogen", "aed_phosphorus"),
sed_zones = FALSE
)
#> <aed_options>
#> • Modules: "aed_sedflux", "aed_oxygen", "aed_nitrogen", and "aed_phosphorus"
#> plus their dependencies
#> • Write initial concentrations to aed.nml: TRUE
#> • Estimate sediment zone fluxes: FALSE
#> • Derive aed_totals: TRUE
