Nothing
knitr::opts_chunk$set( collapse = TRUE, comment = "#>", warning = FALSE )
Load HYPEtools package and import HYPE model files.
# Load HYPEtools Package library(HYPEtools) # Get Path to HYPEtools Model Example Files model_path <- system.file("demo_model", package = "HYPEtools") # Import HYPE Model Files gd <- ReadGeoData(file.path(model_path, "GeoData.txt")) gcl <- ReadGeoClass(file.path(model_path, "GeoClass.txt")) bas <- ReadBasinOutput(file.path(model_path, "results/0003587.txt"))
# List HYPE Variable Names in Basin Ouptut File names(bas) # List subbasin SUBIDs in Basin Output File subid(bas) # Summarize Basin Output File Structure str(bas)
# Plot to screen # PlotBasinOutput(bas, gd = gd, driver = "screen") # Select variables # PlotBasinOutput(bas, gd = gd, driver = "screen", hype.vars = c("cout", "rout")) # Plot time series in R with a log scale for the flow (log.q = TRUE) # PlotBasinOutput(bas, gd = gd, driver = "screen", log.q = TRUE, start.mon = 10, name = paste0("Subid ", attr(bas, "subid")))
The PlotBasinSummary() function is useful mostly with water quality variables.
# PlotBasinSummary(bas, gd = gd, gcl = gcl, driver = "screen")
AnnualRegime(bas, ts.in = attr(bas, "timestep"), ts.out = "month", start.mon = 10)
regime <- AnnualRegime(bas[, c("DATE", "COUT", "ROUT")], ts.in = timestep(bas), ts.out = "month", start.mon = 10) PlotAnnualRegime(regime, band = "p25p75", add.legend = TRUE, col = c(4, 2))
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.