Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
scrollbar |
---|
Now that the model has run we can access the generated output. We start by getting the waterlevel timeseries for the observation point, by using the GetFlowFlexibleMeshTimeSeries function and passing the model, name of the output and the feature (observation point) to it.
Code Block | ||||
---|---|---|---|---|
| ||||
waterlevelSeries = GetFlowFlexibleMeshTimeSeries(fmModel, "Water level (waterlevel)", observationPoint) |
Now we have a list of [datetime, value] that we can plot. To create a chart we start by import the ChartFunctions library and creating an area series for our timeseries.
Code Block | ||||
---|---|---|---|---|
| ||||
from Libraries.ChartFunctions import * areaSeries = CreateAreaSeries(waterlevelSeries) |
Code Block | ||||
---|---|---|---|---|
| ||||
chart = CreateChart([areaSeries]) OpenView(chart) |
Code Block | ||
---|---|---|
| ||
areaSeries.Color = Color.CadetBlue areaSeries.Title = "Waterlevel at observation point" areaSeries.LineVisible = False areaSeries.PointerVisible = False chart.Legend.Visible = True chart.Legend.Alignment = LegendAlignment.Bottom chart.LeftAxis.Automatic = False chart.LeftAxis.Minimum = -0.05 chart.LeftAxis.Maximum = 0.66 chart.LeftAxis.Title = "Waterlevel (m)" |
Code Block | ||||
---|---|---|---|---|
| ||||
chart.ExportAsImage("D:\\testImage.jpg", 1000,1000) ExportListToCsvFile("D:\\test.csv", waterlevelSeries) |
Code Block | ||
---|---|---|
| ||
from Libraries.MapFunctions import *
map = Map()
outputLayer = CreateLayerForObject(waterlevelOutput)
satLayer = CreateSatelliteImageLayer()
map.Layers.AddRange([outputLayer, satLayer])
view = OpenView(map) |
scrollbar |
---|