Skip to main content
FluidEarth Portal Header version 3

FluidEarth Portal

Go Search
  
FluidEarth Portal > FluidEarth Discussions > Design of Wrapped PointTimeSeries Component  

FluidEarth Discussions

Modify settings and columns
Discussions board for FluidEarth Users
  
View: 
Post
Started: 07/10/2008 09:41
Picture: Quillon Harpham
Quillon Harpham
Design of Wrapped PointTimeSeries Component
I would like comments and confirmation that this design for a wrapped PointTimeSeries component is consistent with the current (0.5.0.0) version of the SDK, please.
 
Set Up
Set the following: StationID, ParameterID, WFS Call, Start Timestamp, End Timestamp in xml configuration file.
 
On Initialise
Get a full array of [Timestamp, Parameter Value] between the start and end timestamps from the Web Feature Service.
Return the first timestamp for which there is data.
 
Perform Timestep
Return current timestamp and data.
Increment to next timestamp which has data.
Edited: 07/10/2008 10:39
Picture Placeholder: JMauz
JMauz
Set Up and On Initialise as described above should be combined and coded in the Initialise() method.  As stated the return value will be the first timestamp (converted to a double).
 
In PerformTimestep() return a timestamp as a double and  populate the double array dataOut with the value for that timestamp.  In your code you will need to keep track of which timestamp you last returned so that you can increment to the next timestamp in the next call of PerformTimestep().
Posted: 07/10/2008 10:49
Picture: Quillon Harpham
Quillon Harpham
Okay.
 
By set up I really mean "prepare configuration file". Certainly, Initialise() will read all of this data.
 
So with this example, where all of the data is retrieved from a live source, there is no indicative time-step. The timestepping function merely goes to the next array item for which there is data.
 
Q.
Posted: 07/10/2008 11:08
Picture Placeholder: JMauz
JMauz
Yes, you are using PerformTimestep() to feed out your data one timestamp at a time even though you actually hold data for the whole time horizon within an array.
 
It is worth noting that a future development of the SDK will make this implementation even more simple.  It will allow you to populate the array and pass that array out to the SDK in one go rather than having to use PerformTimestep.
Another issue to bear in mind is that the SDK will use linear interpolation to calculate a value at the time required by the requesting component.  The requesting component is the model that has an input exchange item linked to the output exchange item of your component (yellow box in Configuration Editor).  The result of connecting your component to a model running on a much finer timestep could be an undesired smoothing of the data.
Posted: 07/10/2008 11:46
Picture: Quillon Harpham
Quillon Harpham
I see. It is useful not to have to write the interpolation. I look forward to the next version of the SDK with bated breath.
 
I guess the difference between the timestep in the calling model and the timestamps in the supplied data will be a matter for the person setting up the model. So for example, if data is supplied every 2 hours and the model is running every hour then all should be okay, but if the model is running once per second then this effect should be taken into account.
 
Thanks,
Q.