Skip to contents

Set the biogeochemical models to be used in a GLM-AED configuration file. When the file is located from aeme, the GLM nml is also updated so that the &init_profiles initial conditions, &inflow inflow_vars and &mass_balance balance_vars only include variables whose AED module is in aed_models. When nml is supplied only that aed.nml object is modified.

Usage

set_glm_aed_models(
  aeme,
  path,
  aed_models = c("aed_sedflux", "aed_noncohesive", "aed_oxygen", "aed_silica",
    "aed_nitrogen", "aed_phosphorus", "aed_organic_matter", "aed_phytoplankton",
    "aed_zooplankton", "aed_macrophyte", "aed_totals"),
  file = NULL,
  nml = NULL
)

Arguments

aeme

Aeme object.

path

character; directory where input files are located. Defaults to the path stored in aeme, or the current working directory if not set.

aed_models

Character vector of GLM-AED models to include. Default includes all available AED models: "aed_sedflux", "aed_noncohesive", "aed_oxygen", "aed_silica", "aed_nitrogen", "aed_phosphorus", "aed_organic_matter", "aed_phytoplankton", "aed_zooplankton", "aed_macrophyte", and "aed_totals".

file

Path to the GLM-AED configuration file. If NULL, the function will attempt to locate the file based on the provided Aeme object and path.

nml

GLM-AED nml object. If provided, the function will modify this object directly instead of reading from a file.

Value

If nml is provided, returns the modified nml object. Otherwise, returns the input Aeme object with the updated GLM-AED configuration file.