Get variable from aeme
Usage
get_var(
aeme,
model,
var_sim,
depth = NULL,
depth_ref = c("surface", "bottom"),
return_df = TRUE,
ens_n = 1,
use_obs = FALSE,
remove_spin_up = TRUE,
cumulative = FALSE,
zone = NULL,
sed_layer = NULL
)Arguments
- aeme
Aeme object.
- model
character vector; models to use. One or more of
"dy_cd","glm_aed","gotm_wet","simstrat_aed2". Defaults to all models if not found inaeme.- var_sim
character; variable in the AEME format (e.g. "HYD_temp").
- depth
numeric; depth of the variable to extract, referenced to
depth_ref. Default is NULL. If NULL, the variable profiles are extracted.- depth_ref
character; what
depthis measured from when a single depth is extracted."surface"(default): metres below the water surface."bottom": metres above the lake bed, sodepth = 1is the water 1 m above the bottom. That islevel - depthmetres below the surface, withlevelthe modelled water level (LKE_lvlwtr) on each date, so it follows the surface as the level rises and falls. On a date when the level is belowdepth(the point would be above the surface) the value isNA. Ignored whendepthisNULL. (Before AEME 0.4.0"bottom"was measured from the basin's full depth, which only matches when the level equals that depth.)- return_df
logical; if TRUE, return a dataframe; if FALSE, return a list. Default is TRUE.
- ens_n
integer; ensemble number to plot. Default is 1.
- use_obs
logical; if TRUE, use observations to extract the variable at time and depth of observations. Default is FALSE. Use this option if you want to compare model output to observations. Observations recorded as a height above the lake bed (see
add_obs()) are compared with the model profile at (the model's water level - that height) on each date, so they follow the model's own level rather than the depth they were placed at when added.- remove_spin_up
logical; remove spin-up period from plot. Default is TRUE.
- cumulative
logical; if TRUE, return cumulative sum of variable
- zone
integer; for GLM-AED sediment-zone variables (those with an
nzonescolumn, e.g."SED_Fsed_oxy","SED_temp"), keep only these sediment zones (GLM zone order, 1 = deepest).NULL(default) keeps all.- sed_layer
integer; for variables with a sediment-layer dimension (
"SED_temp"), keep only these layers (1 = shallowest).NULL(default) keeps all. Sediment variables are returned in long format with one column per dimension (nzones,sed_layers);depth_ref/depthdo not apply.
