Some points to pay attention during RTC-Tools intergration into FEWS.

Forecast date

For RTC-Tools, the startDate is the earliest timestamp present in a timeseries. This is possibly historical data. The forecastDate is the point from which the optimization/simulation starts. In most cases the startDate and the forecastDate are equal. However, we have to leave the flexibility for the existence of historical information; say, for example, that the decision that you take now depends on what happened in the last 4 hours. In Delft-FEWS the users have a different concept for forecast date; the forecast date of a historical simulation typically is the end time of the simulation. In order to be able to use RTC-Tools for historical data too (i.e. data before the forecast date), without confusing the Delft-FEWS user, one can adapt usage of the forecastDate in the Python script of the model by overwriting the forecastDate with the startDate (therefore, bypassing the forecast date information from Delft-FEWS). That can be done as follows in the pre() method:


def pre(self):
    super().pre()
    self.io.reference_datetime = self.timeseries_import.start_datetime
    ...


Pickle

RTC-Tools is creating a pickle at the first run to store the data about the model. (You can find it in the  model folder). During the following runs the pickle is first compared to the model, and if the model has not changed the pickle is used. It makes the runs faster. However, if the pickle is created from another machine,  it is not compatible with the current version. For this reason it is better not to zip it in the model folder. In order to keep it it can be created an exception when purging.


Ensembles

RTC-Tools does not run if the ensemble id is in the timeseries_import.xml file. Therefore "<ensembleMemberFormat>hide</ensembleMemberFormat>" should be used in the general adapter.


Simulation mode side notes