When adding boundary conditions to the model you must first declare the type of the boundary you want to add. This is done as follows for a waterlevel timeseries:
We go through the list call "GetTidalPredictForLineString" on the wps library. This will give us a timeseries for every support point on the boundary with the provided start time, stop time and frequency. This may take some time depending on the number of support points, length of the timeseries and the speed of your internet connection.
Next we add the these timeseries to the model by using the "AddTimeSeriesToSupportPoint" call. This will add the timeseries to the provided boundary condition at the support point index (this may take some time).
Add WPS boundary conditions
import Libraries.Wps as wps
for boundaryConditionSet in boundaryConditionSets:
# get timeseries for each support point using wps service
timeSeries = wps.GetTidalPredictForLineString(boundaryConditionSet[0].Geometry, EPSGCode, startTime, endTime, wps.Frequency.Hourly)
# add resultTimeSeries to support points
for supportPointIndex in range(len(timeSeries)):
resultTimeSeries = timeSeries[supportPointIndex]
AddTimeSeriesToSupportPoint(fmModel, boundaryConditionSet[1], supportPointIndex, resultTimeSeries)
The result can be viewed double clicking the boundary on the map and looking at the boundary conditions editor :
Here you can see that for the left boundary there is a waterlevel timeseries declared on all the support points.