Import HYPE Files"

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://hype.smhi.net/wiki/doku.php?id=start:hype_file_reference

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)


Try the HYPEtools package in your browser

Any scripts or data that you put into this service are public.

HYPEtools documentation built on Sept. 11, 2024, 8:34 p.m.