dynatop {dynatop} R Documentation

## R6 Class for Dynamic TOPMODEL

### Description

R6 Class for Dynamic TOPMODEL

R6 Class for Dynamic TOPMODEL

### Methods

#### Method new()

Creates a dynatop class object from the a list based model description as generated by dynatopGIS.

##### Arguments
obs_data

an xts object of observed data

##### Details

This function makes some basic consistency checks on the observations to ensure they have uniform timestep and all required series are present.

##### Returns

invisible(self) suitable for chaining

#### Method clear_data()

Clears all forcing and simulation data except current states

##### Returns

invisible(self) suitable for chaining

#### Method sim_hillslope()

Simulate the hillslope output of a dynatop object

##### Usage
dynatop$sim_hillslope( keep_states = NULL, sub_step = NULL, tol = 2 * .Machine$double.eps,
max_it = 1000,
ftol = Inf
)
##### Arguments
keep_states

a vector of POSIXct objects (e.g. from xts) giving the time stamp at which the states should be kept

sub_step

simulation timestep in seconds, default value of NULL results in data time step

tol

tolerance on width of bounds in the solution for the saturated zone

max_it

maximum number of iterations to use in the solution of the saturated zone

ftol

tolerance in closeness to 0 in the solution for the saturated zone

##### Details

Both saving the states at every timestep and keeping the mass balance can generate very large data sets!! While ftol is implemented it is currently set to Inf to mimic the behaviour of previous versions. This will change in the future.

##### Returns

invisible(self) for chaining

#### Method sim_channel()

Simulate the channel output of a dynatop object

dynatop$sim_channel() ##### Returns invisible(self) for chaining #### Method sim() Simulate the hillslope and channel components of a dynatop object ##### Usage dynatop$sim(
keep_states = NULL,
sub_step = NULL,
##### Arguments
total

logical if plot total inflow is to be plotted

separate

logical if the surface and saturated zone inflows should be returned separately

#### Method plot_channel_inflow()

Plot the channel inflow

##### Arguments
gauge

names of gauges to return (default is all gauges)

#### Method plot_gauge_flow()

Get the flow at gauges

Return the model

#### Method get_states()

Return states

##### Arguments
state

the name of the state to be plotted

add_channel

Logical indicating if the channel should be added to the plot

#### Method clone()

The objects of this class are cloneable with this method.

dynatop$clone(deep = FALSE) ##### Arguments deep Whether to make a deep clone. ### Examples ## the vignettes contains further details of the method calls. data("Swindale") ## example data ctch_mdl <- dynatop$new(Swindale$model) ## create with model ctch_mdl$add_data(Swindale$obs) ## add observations ctch_mdl$initialise() ## initialise model
ctch_mdl\$sim() ## simulate model


[Package dynatop version 0.2.3 Index]