Skip to contents

Get the variables that are both in the observation and model output

Usage

list_mod_obs_vars(aeme, model, ens_n = 1)

Arguments

aeme

aeme; object.

model

vector; of models to be used. Can be `dy_cd`, `glm_aed`, `gotm_wet`.

ens_n

numeric; ensemble number to allocate to model output which is loaded. Defaults to 1.

Value

A character vector of variables that are in both the observation and model output

Examples

aeme_file <- system.file("extdata/aeme.rds", package = "AEME")
aeme <- readRDS(aeme_file)
path <- tempdir()
model_controls <- get_model_controls(use_bgc = TRUE)
model <- c("glm_aed")
aeme <- build_aeme(path = path, aeme = aeme, model = model,
                   model_controls = model_controls,
                   ext_elev = 5, use_bgc = TRUE)
#> ! Missing state variables in inflows:
#> ! ZOO_zoo1
#>  Added default values for missing variables.
#>  Using observed water level
#>  No missing values in observed water level. Using observed water level
#>  Correcting water balance using estimated outflows (method = 2).
#>  Calculating lake level using lake depth and a sinisoidal function.
#>  Building GLM-AED2 for lake wainamu
#>  41.6285 replaced with 41.6285
#>  Using default pH initialisation
#>  16.6514 replaced with 16.6514
#>  312.5 replaced with 312.5
#>  1.4279 replaced with 1.4279
#>  21.4183 replaced with 21.4183
#>  1.0709 replaced with 1.0709
#>  7.1394 replaced with 7.1394
#>  0.3229 replaced with 0.3229
#>  0.3229 replaced with 0.3229
#>  0.3229 replaced with 0.3229
#>  PHY_cyano 0.24022 replaced with 0.24022
#>  PHY_diatom 0.300275 replaced with 0.300275
#>  PHY_green 0.300275 replaced with 0.300275
#>  1 replaced with 1
#>  Using default zooplankton initialisation
#>  GLM nml validation completed - no issues detected.
# Run models
aeme <- run_aeme(aeme = aeme, model = model, verbose = FALSE,
path = path, model_controls = model_controls,
parallel = TRUE, ncores = 2L)
#>  Running models in parallel... [2026-02-04 23:59:38]
#>  Model run complete! [2026-02-04 23:59:41]
#>  Reading models in parallel...[2026-02-04 23:59:41]
#>  Model reading complete! [2026-02-04 23:59:42]
list_mod_obs_vars(aeme = aeme, model = model)
#>              Cyanobacteria           Dissolved oxygen 
#>                "PHY_cyano"                  "CHM_oxy" 
#>                   Salinity          Water temperature 
#>                 "CHM_salt"                 "HYD_temp" 
#>        Total chlorophyll a   Dissolved organic carbon 
#>                "PHY_tchla"                  "CAR_doc" 
#>                  Phosphate        Ammoniacal nitrogen 
#>                  "PHS_frp"                  "NIT_amm" 
#>                    Nitrate             Total nitrogen 
#>                  "NIT_nit"                   "NIT_tn" 
#>           Total phosphorus          Thermocline depth 
#>                   "PHS_tp"               "HYD_thmcln" 
#>                 Stratified         Centre of buoyancy 
#>                "HYD_strat"               "HYD_ctrbuy" 
#>           Epilimnion depth          Hypolimnion depth 
#>               "HYD_epidep"               "HYD_hypdep" 
#>          Schmidt stability             Oxycline depth 
#>               "HYD_schstb"               "CHM_oxycln" 
#>         Epilimnetic oxygen         Metalimnetic oygen 
#>               "CHM_oxyepi"               "CHM_oxymet" 
#> Metalimnetic oxygen minima    Number of anoxic layers 
#>               "CHM_oxymom"               "CHM_oxynal" 
#>      Trophic Level Index 3      Trophic Level Index 4 
#>                 "LKE_tli3"                 "LKE_tli4"