get_var | R Documentation |
Creates a data.frame with DateTime and variable
Variable is sampled out of the GLM output and is taken relative
to the surface (reference = 'surface'
) or the bottom of the lake
(reference = 'bottom'
).
get_var(
file = "output.nc",
var_name,
reference = "bottom",
z_out = NULL,
t_out = NULL,
...
)
file |
a string with the path to the netcdf output from GLM |
var_name |
a name of a valid variable in the netcdf file specified with |
reference |
a string which specifies the vertical reference ('surface' or 'bottom'). (Only used for variables with multiple depths) |
z_out |
an optional vector of depths for value output (in meters). (Only used for variables with multiple depths). If NULL, depths will be determined based on the depth of the lake |
t_out |
a vector of POSIXct dates for temporal resampling (order is important) |
... |
additional arguments passed to |
a data.frame with DateTime and variable at depth
Jordan S. Read, Luke A. Winslow
get_temp
, plot_var
sim_folder <- run_example_sim(verbose = FALSE)
nc_file <- file.path(sim_folder, 'output/output.nc')
# list variables in the netcdf output from GLM:
print(sim_vars(nc_file))
evaporation <- get_var(nc_file, var_name = "evap")
plot(evaporation)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.