SMART

class smartpy.SMART(catchment, catchment_area_m2, start, end, time_delta_simu, time_delta_save, warm_up_days, in_format, out_format, root, gauged_area_m2=None)

SMART is the core object to set up and use to run an experiment.

Instantiation

Parameters
catchment: str

A name to identify the catchment of interest in the inputs and outputs directories.

catchment_area_m2: float

The drainage area for the catchment of interest in square metres.

start, end: datetime.datetime

The start and end of the simulation period, respectively.

time_delta_simu: datetime.timedelta

The simulation time step, i.e. the temporal resolution for the model integration.

time_delta_save: datetime.timedelta

The reporting time step, i.e. the temporal resolution for the model outputs.

Warning

This must be an integer multiple of time_delta_simu.

warm_up_days: int

The number of simulation days to use in the simulation period to warm up/spin up the model.

in_format: str

The input file format. It can either be 'csv' or 'netcdf'.

Warning

In either case, a specific file format must be followed.

out_format: str

The output file format. It can either be 'csv' or 'netcdf'.

root: str

The file path to the directory containing the model inputs and outputs. Note that a specific internal structure for this directory must be followed:

root
├── in
│   └── catchment
│       ├── catchment.rain
│       ├── catchment.peva
│       ├── catchment.flow
│       └── catchment.parameters
└── out

Note

While these input files feature custom filename extensions (e.g. .rain, .peva, etc.), these are no more than CSV files that can be opened with any basic text editor.

gauged_area_m2: float, optional

The gauged drainage area for the catchment of interest in square metres. If provided, this value is used to proportionally rescale the river discharge observations in view to evaluate the model simulations against these. If not provided, set to default value None (i.e. the observations are not read in by the model).

Methods

simulate

Run model simulation over period configuration at instantiation.

write_output_files

Record the discharge time series in output file(s).

get_simulation_array

Retrieve the simulated discharge time series as an array.

get_evaluation_array

Retrieve the observed discharge time series as an array.

Attributes

parameters

Return the set of SMART model parameters as a parameters.Parameters object.