Skip to contents

Create a SIC input for a PAR file

Usage

SicInput(x, ...)

# S3 method for numeric
SicInput(x, values = NULL, locations, interpolated = TRUE, ...)

# S3 method for POSIXt
SicInput(x, values, start = NULL, ...)

# S3 method for data.frame
SicInput(x, ...)

# S3 method for matrix
SicInput(x, ...)

Arguments

x

either a fixed input, a numeric vector of time in seconds, a POSIXt vector of time, a matrix or a data.frame with 2 columns (time and value)

...

used for S3 method compatibility

values

a numeric vector used if x is a vector of numeric or POSIXt

locations

input locations created with SicLocation or SicLocations

interpolated

Interpolation mode TRUE for "ramp" mode and FALSE for "step" mode

start

a POSIXt indicating the start time to use as time zero in the simulation

Value

A SicInput object which is a list with the following items:

See also

Other SicInput: SicLocations(), SicLocation()

Examples

# How to impose 5 m3/s in the upstream offtake of the model?
# Define location of the boundary condition to set
locations <- SicLocations(list(Nd = 1, Pr = 1, car = "Q"))
# Define its value
sicInputs <- SicInput(5, locations = locations)

# How to impose an hydrograph at the upstream offtake of the model?
sicInputs <- SicInput(data.frame(t = c(0, 3600, 7200), # time in seconds
                                v = c(5, 20, 5)),     # flows
                      locations = locations)