knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  warning = FALSE
)

Setup

# Load HYPEtools Package
library(HYPEtools)

# Get Path to HYPEtools Model Example Files
model_path <- system.file("demo_model", package = "HYPEtools")

# List HYPE Model Example Files
list.files(model_path)

More information on the different types of HYPE model files can be found on the HYPE Wiki: http://www.smhi.net/hype/wiki/doku.php?id=start:hype_file_reference#setup_files

Import Some Model Setup Files

# Import Files
gd <- ReadGeoData(file.path(model_path, "GeoData.txt"))
gc <- ReadGeoClass(file.path(model_path, "GeoClass.txt"))

# Some Import Checks
summary(gd)

str(gc)

class(gd)

Import Discharge Observations

# Import Discharge Observations
qobs <- ReadObs(file.path(model_path, "Qobs.txt"))

str(qobs)

# Get SUBIDs with observations from attribute
obsid(qobs)

Import Parameter File

# Import Parameter File
par <- ReadPar(file.path(model_path, "par.txt"))

str(par)


rcapell/RHYPE documentation built on Feb. 28, 2024, 3:11 p.m.