NGen
|
Forcing class that returns no variables to the simulation–use this e.g. More...
#include <NullForcingProvider.hpp>
Public Types | |
using | data_type = DataType |
This class provides a generic interface to data services. | |
using | selection_type = SelectionType |
Public Member Functions | |
NullForcingProvider () | |
long | get_data_start_time () const override |
Return the first valid time for which data from the request variable can be requested. | |
long | get_data_stop_time () const override |
Return the last valid time for which data from the requested variable can be requested. | |
long | record_duration () const override |
Return the stride in the time dimension. | |
size_t | get_ts_index_for_time (const time_t &epoch_time) const override |
Get the index of the data time step that contains the given point in time. | |
double | get_value (const CatchmentAggrDataSelector &selector, data_access::ReSampleMethod m) override |
std::vector< double > | get_values (const CatchmentAggrDataSelector &selector, data_access::ReSampleMethod m) override |
bool | is_property_sum_over_time_step (const std::string &name) const override |
boost::span< const std::string > | get_available_variable_names () const override |
Return the variables that are accessable by this data provider. | |
virtual void | finalize () |
Release any resources that should not be held as the run is shutting down. | |
virtual data_type | get_value (const selection_type &selector, ReSampleMethod m=SUM)=0 |
Get the value of a forcing property for an arbitrary time period, converting units if needed. | |
virtual std::vector< data_type > | get_values (const selection_type &selector, ReSampleMethod m=SUM)=0 |
Get the values of a forcing property for an arbitrary time period, converting units if needed. | |
Forcing class that returns no variables to the simulation–use this e.g.
if a BMI model provides forcing data.
|
inherited |
This class provides a generic interface to data services.
|
inherited |
|
default |
|
inlinevirtualinherited |
Release any resources that should not be held as the run is shutting down.
In particular, this should be called before MPI_Finalize()
Reimplemented in data_access::WrappedDataProvider.
|
overridevirtual |
Return the variables that are accessable by this data provider.
Implements data_access::DataProvider< DataType, SelectionType >.
|
overridevirtual |
Return the first valid time for which data from the request variable can be requested.
Implements data_access::DataProvider< DataType, SelectionType >.
|
overridevirtual |
Return the last valid time for which data from the requested variable can be requested.
Implements data_access::DataProvider< DataType, SelectionType >.
|
overridevirtual |
Get the index of the data time step that contains the given point in time.
An std::out_of_range exception should be thrown if the time is not in any time step.
epoch_time | The point in time, as a seconds-based epoch time. |
std::out_of_range | If the given point is not in any time step. |
Implements data_access::DataProvider< DataType, SelectionType >.
|
pure virtualinherited |
Get the value of a forcing property for an arbitrary time period, converting units if needed.
An std::out_of_range exception should be thrown if the data for the time period is not available.
selector | Data required to establish what subset of the stored data should be accessed |
m | How data is to be resampled if there is a mismatch in data alignment or repeat rate |
std::out_of_range | If data for the time period is not available. |
Referenced by data_access::WrappedDataProvider::get_value(), and realization::Bmi_Module_Formulation::set_model_inputs_prior_to_update().
|
override |
|
pure virtualinherited |
Get the values of a forcing property for an arbitrary time period, converting units if needed.
An std::out_of_range exception should be thrown if the data for the time period is not available.
If a provider doesn't implement this function, then by default, get_values will be a simple proxy to get_value with the result wrapped in a std::vector<double>
output_name | The name of the forcing property of interest. |
init_time_epoch | The epoch time (in seconds) of the start of the time period. |
duration_seconds | The length of the time period, in seconds. |
output_units | The expected units of the desired output value. |
std::out_of_range | If data for the time period is not available. |
Referenced by data_access::WrappedDataProvider::get_values(), and realization::Bmi_Module_Formulation::set_model_inputs_prior_to_update().
|
override |
|
inlineoverridevirtual |
Reimplemented from data_access::DataProvider< DataType, SelectionType >.
|
overridevirtual |
Return the stride in the time dimension.
Implements data_access::DataProvider< DataType, SelectionType >.