Skip to contents

Get the output variables from an AEME object

Usage

get_output_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 the output variables

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", "gotm_wet")
aeme <- build_aeme(path = path, aeme = aeme, model = model,
                   model_controls = model_controls,
                   ext_elev = 5, use_bgc = TRUE)
#> Building simulation for Wainamu [2024-11-18 05:19:13]
#> Missing state variables in inflows: PHY_crypt
#> Added default values for missing variables.
#> Using observed water level
#> Missing values in observed water level
#> Using constant water level
#> Correcting water balance using estimated outflows (method = 2).
#> Calculating lake level using lake depth and a sinisoidal function.
#> Warning: 'C:\Users\RUNNER~1\AppData\Local\Temp\RtmpmaQu5E\45819_wainamu' already exists
#> Building GLM3-AED2 model for lake wainamu
#> Copied in AED nml file
#>    oxy_initial   = 312.5 replaced with 312.5
#>    frp_initial = 0.3229 replaced with 0.3229
#>      dop_initial  = 0.3229 replaced with 0.3229
#>      pop_initial  = 0.3229 replaced with 0.3229
#>    amm_initial = 1.4279 replaced with 1.4279
#>    nit_initial = 1.0709 replaced with 1.0709
#>      don_initial  = 21.4183 replaced with 21.4183
#>      pon_initial  = 7.1394 replaced with 7.1394
#>      doc_initial  = 41.6285 replaced with 41.6285
#>      poc_initial  = 16.6514 replaced with 16.6514
#>    rsi_initial = 1 replaced with 1
#> PHY_cyano 0.24022 replaced with 0.24022
#> PHY_green 0.300275 replaced with 0.300275
#> PHY_crypt  replaced with 
#> PHY_diatom 0.300275 replaced with 0.300275
#>     ss_initial   = 3, replaced with 3,
#> Building GOTM-WET for lake wainamu
#> instances/abiotic_water/initialization/sO2W 10 replaced with 10
#> instances/abiotic_water/initialization/sPO4W 0.01 replaced with 0.01
#> instances/abiotic_water/initialization/sPDOMW 0.01 replaced with 0.01
#> instances/abiotic_water/initialization/sPPOMW 0.01 replaced with 0.01
#> instances/abiotic_water/initialization/sNH4W 0.02 replaced with 0.02
#> instances/abiotic_water/initialization/sNO3W 0.015 replaced with 0.015
#> instances/abiotic_water/initialization/sNDOMW 0.3 replaced with 0.3
#> instances/abiotic_water/initialization/sNPOMW 0.1 replaced with 0.1
#> instances/abiotic_water/initialization/sDDOMW 0.5 replaced with 0.5
#> instances/abiotic_water/initialization/sDPOMW 0.2 replaced with 0.2
#> instances/abiotic_water/initialization/sSiO2W 1 replaced with 1
#> instances/cyanobacteria/initialization/sDW 0.2 replaced with 0.2
#> instances/cyanobacteria/initialization/sNW 0.03 replaced with 0.03
#> instances/cyanobacteria/initialization/sPW 0.0019 replaced with 0.0019
#> instances/greens/initialization/sDW 0.1 replaced with 0.1
#> instances/greens/initialization/sNW 0.015 replaced with 0.015
#> instances/greens/initialization/sPW 0.00094 replaced with 0.00094
#> instances/diatoms/initialization/sDW 0.25 replaced with 0.25
#> instances/diatoms/initialization/sNW 0.038 replaced with 0.038
#> instances/diatoms/initialization/sPW 0.0024 replaced with 0.0024
#> instances/abiotic_water/initialization/sDIMW 3 replaced with 3
# 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... [2024-11-18 05:19:17]
#> Model run complete![2024-11-18 05:19:22]
#> Reading models in parallel... [2024-11-18 05:19:22]
#> Model reading complete![2024-11-18 05:19:24]
get_output_vars(aeme, model)
#>                    Water temperature                    Thermocline depth 
#>                           "HYD_temp"                         "HYD_thmcln" 
#>                     Dissolved oxygen                  Total chlorophyll a 
#>                            "CHM_oxy"                          "PHY_tchla" 
#>                       Total nitrogen                     Total phosphorus 
#>                             "NIT_tn"                             "PHS_tp" 
#>                          Water level                               Volume 
#>                         "LKE_lvlwtr"                              "LKE_V" 
#>                     Change in volume                         Surface area 
#>                             "LKE_dV"                             "LKE_A0" 
#>                          Evaporation                          Evaporation 
#>                         "LKE_evprte"                         "LKE_evpflx" 
#>                Evaporative heat flux                   Sensible heat flux 
#>                             "LKE_Qe"                             "LKE_Qh" 
#>                   Longwave radiation                  Shortwave radiation 
#>                            "LKE_Qlw"                            "LKE_Qsw" 
#>                Net surface heat flux                          Evaporation 
#>                           "LKE_Qnet"                         "LKE_evpvol" 
#>                        Precipitation                        Precipitation 
#>                         "LKE_precip"                         "LKE_pcpvol" 
#>                               Inflow                              Outflow 
#>                         "LKE_inflow"                        "LKE_outflow" 
#>                    Net water balance                           Lake layer 
#>                         "LKE_netwbl"                         "LKE_layers" 
#>                           Lake depth                      e-folding depth 
#>                         "LKE_depths"                          "LKE_efold" 
#>                      e-folding depth                       Euphotic depth 
#>                         "LKE_efoldh"                         "LKE_photic" 
#>                       Euphotic depth       Remote sensed skin temperature 
#>                        "LKE_photich"                          "HYD_surft" 
#>                      Air temperature     Water-air temperature difference 
#>                         "MET_tmpair"                         "HYD_atdiff" 
#>                             Salinity                            Phosphate 
#>                           "CHM_salt"                            "PHS_frp" 
#>                  Dissolved organic P                Particulate organic P 
#>                            "PHS_dop"                            "PHS_pop" 
#>              Particulate inorganic P                  Ammoniacal nitrogen 
#>                            "PHS_pip"                            "NIT_amm" 
#>                              Nitrate                  Dissolved organic N 
#>                            "NIT_nit"                            "NIT_don" 
#>                Particulate organic N             Dissolved organic carbon 
#>                            "NIT_pon"                            "CAR_doc" 
#>           Particulate organic carbon                        Cyanobacteria 
#>                            "CAR_poc"                          "PHY_cyano" 
#>                          Green algae                   Diatoms freshwater 
#>                          "PHY_green"                         "PHY_diatom" 
#>                     Suspended solids  Remotely sensed total chlorophyll a 
#>                            "NCS_ss1"                        "PHY_rstchla" 
#>                   Centre of buoyancy                     Epilimnion depth 
#>                         "HYD_ctrbuy"                         "HYD_epidep" 
#>                    Hypolimnion depth                    Schmidt stability 
#>                         "HYD_hypdep"                         "HYD_schstb" 
#>                       Oxycline depth                   Epilimnetic oxygen 
#>                         "CHM_oxycln"                         "CHM_oxyepi" 
#>                  Hypolimnetic oxygen                   Metalimnetic oygen 
#>                         "CHM_oxyhyp"                         "CHM_oxymet" 
#>           Metalimnetic oxygen minima              Number of anoxic layers 
#>                         "CHM_oxymom"                         "CHM_oxynal" 
#>    Trophic Level Index Chlorophyll-a   Trophic Level Index Total Nitrogen 
#>                           "LKE_tlic"                           "LKE_tlin" 
#> Trophic Level Index Total Phosphorus     Trophic Level Index Secchi depth 
#>                           "LKE_tlip"                          "LKE_tlise" 
#>                Trophic Level Index 3                Trophic Level Index 4 
#>                           "LKE_tli3"                           "LKE_tli4"