hydrobricks
Loading...
Searching...
No Matches
ModelHydro Class Reference
Inheritance diagram for ModelHydro:

Public Member Functions

 ModelHydro (SubBasin *subBasin=nullptr)
 
bool InitializeWithBasin (SettingsModel &modelSettings, SettingsBasin &basinSettings)
 
bool Initialize (SettingsModel &modelSettings, SettingsBasin &basinSettings)
 
void UpdateParameters (SettingsModel &modelSettings)
 
bool IsOk ()
 
bool ForcingLoaded ()
 
bool Run ()
 
void Reset ()
 
void SaveAsInitialState ()
 
bool DumpOutputs (const string &path)
 
axd GetOutletDischarge ()
 
double GetTotalOutletDischarge ()
 
double GetTotalET ()
 
double GetTotalWaterStorageChanges ()
 
double GetTotalSnowStorageChanges ()
 
double GetTotalGlacierStorageChanges ()
 
bool AddTimeSeries (TimeSeries *timeSeries)
 
bool AddAction (Action *action)
 
int GetActionsNb ()
 
int GetSporadicActionItemsNb ()
 
bool CreateTimeSeries (const string &varName, const axd &time, const axi &ids, const axxd &data)
 
void ClearTimeSeries ()
 
bool AttachTimeSeriesToHydroUnits ()
 
SubBasinGetSubBasin ()
 
void SetSubBasin (SubBasin *subBasin)
 
TimeMachineGetTimeMachine ()
 
ProcessorGetProcessor ()
 
LoggerGetLogger ()
 
ActionsManagerGetActionsManager ()
 

Protected Attributes

Processor m_processor
 
SubBasinm_subBasin
 
TimeMachine m_timer
 
Logger m_logger
 
ActionsManager m_actionsManager
 
ParametersUpdater m_parametersUpdater
 
vector< TimeSeries * > m_timeSeries
 

Member Function Documentation

◆ AddAction()

bool ModelHydro::AddAction ( Action * action)

Add an action to the model.

Parameters
actionaction to add.
Returns
true if the action was added successfully.

◆ AddTimeSeries()

bool ModelHydro::AddTimeSeries ( TimeSeries * timeSeries)

Add a time series to the model.

Parameters
timeSeriestime series to add.
Returns
true if the time series was added successfully.

◆ AttachTimeSeriesToHydroUnits()

bool ModelHydro::AttachTimeSeriesToHydroUnits ( )

Attach the time series to the hydro units.

Returns
true if the time series were attached successfully.

◆ ClearTimeSeries()

void ModelHydro::ClearTimeSeries ( )

Clear the time series.

◆ CreateTimeSeries()

bool ModelHydro::CreateTimeSeries ( const string & varName,
const axd & time,
const axi & ids,
const axxd & data )

Create a time series and add it to the model.

Parameters
varNamename of the variable.
timetime series data.
idsids of the data.
datadata to add.
Returns
true if the time series was created and added successfully.

◆ DumpOutputs()

bool ModelHydro::DumpOutputs ( const string & path)

Dump the outputs as betCDF file to the specified path.

Parameters
pathpath to dump the outputs.
Returns
true if the dump was successful.

◆ ForcingLoaded()

bool ModelHydro::ForcingLoaded ( )

Check if the forcing data were loaded.

Returns
true if the forcing data were loaded.

◆ GetActionsManager()

ActionsManager * ModelHydro::GetActionsManager ( )
inline

Get the actions manager.

Returns
pointer to the actions manager.

◆ GetActionsNb()

int ModelHydro::GetActionsNb ( )

Get the number of actions in the model.

Returns
number of actions.

◆ GetLogger()

Logger * ModelHydro::GetLogger ( )
inline

Get the logger.

Returns
pointer to the logger.

◆ GetOutletDischarge()

axd ModelHydro::GetOutletDischarge ( )

Get the outlet discharge series.

Returns
outlet discharge.

◆ GetProcessor()

Processor * ModelHydro::GetProcessor ( )
inline

Get the processor.

Returns
pointer to the processor.

◆ GetSporadicActionItemsNb()

int ModelHydro::GetSporadicActionItemsNb ( )

Get the number of sporadic action items in the model (i.e., actions that are not recursive).

Returns
number of sporadic action items.

◆ GetSubBasin()

SubBasin * ModelHydro::GetSubBasin ( )
inline

Get the sub basin.

Returns
pointer to the sub basin.

◆ GetTimeMachine()

TimeMachine * ModelHydro::GetTimeMachine ( )
inline

Get the time machine (timer).

Returns
pointer to the timer.

◆ GetTotalET()

double ModelHydro::GetTotalET ( )

Get the total amount of water lost by evapotranspiration.

Returns
total amount of water lost by evapotranspiration.

◆ GetTotalOutletDischarge()

double ModelHydro::GetTotalOutletDischarge ( )

Get the total outlet discharge.

Returns
total outlet discharge.

◆ GetTotalSnowStorageChanges()

double ModelHydro::GetTotalSnowStorageChanges ( )

Get the total change in snow storage.

Returns
total change in snow storage.

◆ GetTotalWaterStorageChanges()

double ModelHydro::GetTotalWaterStorageChanges ( )

Get the total change in water storage.

Returns
total change in water storage.

◆ Initialize()

bool ModelHydro::Initialize ( SettingsModel & modelSettings,
SettingsBasin & basinSettings )

Initialize the model.

Parameters
modelSettingssettings of the model.
basinSettingssettings of the basin.
Returns
true if the initialization was successful.

◆ InitializeWithBasin()

bool ModelHydro::InitializeWithBasin ( SettingsModel & modelSettings,
SettingsBasin & basinSettings )

Initialize the model along with the basin.

Parameters
modelSettingssettings of the model.
basinSettingssettings of the basin.
Returns
true if the initialization was successful.

◆ IsOk()

bool ModelHydro::IsOk ( )

Check if the model is well-defined.

Returns
true if the model is well-defined.

◆ Reset()

void ModelHydro::Reset ( )

Reset the model.

◆ Run()

bool ModelHydro::Run ( )

Run the model.

Returns
true if the model run was successful.

◆ SaveAsInitialState()

void ModelHydro::SaveAsInitialState ( )

Save the model state as initial conditions.

◆ SetSubBasin()

void ModelHydro::SetSubBasin ( SubBasin * subBasin)
inline

Set the sub basin.

Parameters
subBasinpointer to the sub basin.

◆ UpdateParameters()

void ModelHydro::UpdateParameters ( SettingsModel & modelSettings)

Update the model parameters.

Parameters
modelSettingssettings of the model.

The documentation for this class was generated from the following files: