get_temp | R Documentation |
Creates a data.frame with DateTime and temperatures (in deg C).
Temperatures that are sampled out of the GLM output are taken relative
to the surface (reference = 'surface'
) or the bottom of the lake
(reference = 'bottom'
).
get_temp(
file = "output.nc",
reference = "bottom",
z_out = NULL,
t_out = NULL,
...
)
file |
a string with the path to the netcdf output from GLM |
reference |
a string which specifies the vertical reference ('surface' or 'bottom') |
z_out |
an optional vector of depths for temperature output (in meters). 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 temperature at depth
Jordan S. Read, Luke A. Winslow
resample_sim
sim_folder <- run_example_sim(verbose = FALSE)
nc_file <- file.path(sim_folder, 'output/output.nc')
temp_surf <- get_temp(nc_file, reference = 'surface', z_out = c(0,1,2))
temp_bot <- get_temp(nc_file, reference = 'bottom', z_out = c(0,1,2))
temp_bot <- get_temp(nc_file)
#-- get temporal subset--
t_out <- seq(as.POSIXct("2015-04-15"), as.POSIXct("2015-06-01"), by = 86400)
temp_surf <- get_temp(nc_file, reference = 'surface', z_out = 0, t_out = t_out)
plot(temp_surf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.