|
hydrobricks
|
Public Member Functions | |
| TimeSeries (VariableType type) | |
| virtual bool | SetCursorToDate (double date)=0 |
| virtual bool | AdvanceOneTimeStep ()=0 |
| virtual bool | IsDistributed () const =0 |
| virtual double | GetTimeStepInDays () const =0 |
| virtual double | GetStart () const =0 |
| virtual double | GetEnd () const =0 |
| virtual double | GetTotal (const SettingsBasin *basinSettings)=0 |
| virtual TimeSeriesData * | GetDataPointer (int unitId)=0 |
| VariableType | GetVariableType () const |
| virtual bool | IsValid () const =0 |
| virtual void | Validate () const |
Static Public Member Functions | |
| static bool | Parse (const string &path, vector< std::unique_ptr< TimeSeries > > &vecTimeSeries) |
| static std::unique_ptr< TimeSeries > | Create (const string &varName, const axd &time, const axi &ids, const axxd &data) |
Protected Attributes | |
| VariableType | _type |
|
nodiscardpure virtual |
Advance the internal cursor to the next time step.
Implemented in TimeSeriesDistributed, and TimeSeriesUniform.
|
static |
Create a time series from the provided data.
| varName | name of the variable. |
| time | time data. |
| ids | unit IDs. |
| data | time series data. |
|
pure virtual |
Get the data pointer for the provided unit ID.
| unitId | ID of the unit. |
Implemented in TimeSeriesDistributed, and TimeSeriesUniform.
|
nodiscardpure virtual |
Get the time end of the time series.
Implemented in TimeSeriesDistributed, and TimeSeriesUniform.
|
nodiscardpure virtual |
Get the time start of the time series.
Implemented in TimeSeriesDistributed, and TimeSeriesUniform.
|
nodiscardpure virtual |
Get the spacing of the records, in days. Zero when the series carries no regular spacing. Compared against the computation time step, which it has to match: the forcing is advanced one record per step, so a mismatch would either run out of data or skip most of it.
Implemented in TimeSeriesDistributed, and TimeSeriesUniform.
|
nodiscardpure virtual |
Get the sum of the time series data for the provided basin settings.
| basinSettings | settings of the basin. |
Implemented in TimeSeriesDistributed, and TimeSeriesUniform.
|
inline |
Get the variable type of the time series.
|
nodiscardpure virtual |
Check if the time series is distributed.
Implemented in TimeSeriesDistributed, and TimeSeriesUniform.
|
nodiscardpure virtual |
Check if the time series is valid. Verifies that the time series has data and proper configuration.
Implemented in TimeSeriesDistributed, and TimeSeriesUniform.
|
staticnodiscard |
Parse the time series netCDF file.
| path | path to the netCDF file. |
| vecTimeSeries | vector to store the parsed time series. |
|
nodiscardpure virtual |
Set the internal cursor to the provided date.
| date | date to set the cursor to. |
Implemented in TimeSeriesDistributed, and TimeSeriesUniform.
|
virtual |
Validate the time series. Throws an exception if the time series is invalid.
| ModelConfigError | if validation fails. |
Reimplemented in TimeSeriesDistributed, and TimeSeriesUniform.