Upload
ami-robertson
View
221
Download
0
Tags:
Embed Size (px)
Citation preview
An OpenMI Model Interface Implementation for Hydrologic Modeling in an Open Source GISDaniel P. Ames, PhD PETed Dunsford, PhD Candidate
Idaho State UniversityDepartment of GeosciencesGeospatial Software Lab
04/21/23
AWRA Spring Specialty Conferenceon GIS and Water Resources
OpenMI Intro/Review• Open standard and set of tools
for connecting models and performing integrated/holistic watershed modeling.
• Initially focused on hydrologic models but applicable to other modeling application areas.
• Developed by a consortium of industry and academic partners under the EU Water Framework Directive.
• Intended to be first, a standard and second, a toolkit and sample implementation…
04/21/232 of 33http://www.openmi.org/reloaded/about/using-openmi.php
OpenMI Developers• The HarmoniT project (2002-2005)
consortium includes– CEH, RIZA– DHI, DHI Hydroinfom– Delft Hydraulics– Wallingford Software– University of Dortmund– Instituto di Ricerca Sulle Acque– National Technical University of Athens– WRc– Povodi Labe– Hydroprojekt CZ– Alterra BV– Cemagref
3 of 33http://www.openmi.org/reloaded/about/using-openmi.php
Active development community with all source code posted on sourceforge.net:
98.76% activity, 3,489 downloads since 2005-4-19
Active development community with all source code posted on sourceforge.net:
98.76% activity, 3,489 downloads since 2005-4-19
4 of 33
OpenMI Compliant Models
Integrated Modeling
5 of 33
Combining all elements in 1 model may not be practical, but linking models is an achievable goal.
Figure by Susan Anderson and Wiktoria Daniels, Wallingford Software
Watershed/River Example…
6 of 33
Here we have a distributed watershed model and a stream routing model in 2 different code bases… How to link them together?
Runoff Model
River Model
GetValues(time, LinkID)
Return Runoff Values
Needs input from the runoff model
The OpenMI Document Series: Part B - Guidelines
7 of 33
Figure by Susan Anderson and Wiktoria Daniels, Wallingford Software
Input/Output Exchange Items…
Element Set Element Set
“Quantities”Or
the “What”
“Elements”Or
the “Where”
Linkable Components…• void Initialize(IArgument[] properties)• string ComponentID• string ComponentDescription• string ModelID• string ModelDescription• ITimeSpan TimeHorizon• int InputExchangeItemCount• IInputExchangeItem GetInputExchangeItem(int inputExchangeItemIndex)• int OutputExchangeItemCount• IOutputExchangeItem GetOutputExchangeItem(int
outputExchangeItemIndex)• void AddLink (ILink link)• void RemoveLink(string linkID)• string Validate()• void Prepare()• IValueSet GetValues(ITime time, string linkID)• ITimeStamp EarliestInputTime• void Finish()• void Dispose()
8 of 33
ILinkableComponent<<Interface>>
ILinkableComponent
PULL COMMAND
CREATE A LINK
INPUT EXCHANGE ITEMS
OUTPUT EXCHANGE ITEMS
Data
Model run logic…
9 of 33
Model A
Model B
Model C
For each time step…
GetValues
GetValues
Data
Data
The OpenMI Document Series: Part B - Guidelines
OPEN SOURCE GIS IMPLEMENTATION
So what are we doing with it…?
10 of 33
MapWindow GIS in One Slide
11 of 22
• Open source standards based end user GIS and GIS software developer components for Windows.
http://www.mapwindow.org/
MapWindow GIS in One Slide
12 of 22
• Open source standards based end user GIS and GIS software developer components for Windows.
http://www.mapwindow.org/
Conference spike?
~6000 downloads per month, international development team
Creating a MapWindow/BASINS Project
13 of 22
Creating a MapWindow/BASINS Project
14 of 22
OpenMI Model Manager
15 of 22
OpenMI Model Manager
16 of 22
OpenMI Model Manager
17 of 22
OpenMI Model Manager
18 of 22
OpenMI Model Manager
19 of 22
OpenMI Model Manager
20 of 22
Currently this “element viewer” is not connected to the GIS… but gets its data points from the OMI file… We need to change that!
Currently this “element viewer” is not connected to the GIS… but gets its data points from the OMI file… We need to change that!
OpenMI Model Manager
21 of 22
OpenMI Model Manager
22 of 22
OpenMI Model Manager
23 of 22
OpenMI Model Manager
24 of 22
Output as text file… Instead we should be displaying the output directly in the map…
Output as text file… Instead we should be displaying the output directly in the map…
Linkage to GIS
25 of 22
Implement both the OpenMI LinkableComponent and MapWindow plug-in interfaces
Implement both the OpenMI LinkableComponent and MapWindow plug-in interfaces
Now the model can interact with the map directly (through MapWindow.iPlugin), as well as with other models (through OpenMI.iLinkable Component).
Now the model can interact with the map directly (through MapWindow.iPlugin), as well as with other models (through OpenMI.iLinkable Component).
This approach serves as a design pattern that could be used to integrate OpenMI more tightly with ArcMap, for example.
This approach serves as a design pattern that could be used to integrate OpenMI more tightly with ArcMap, for example.
Linkage to GIS
Next steps include:• Build a better OpenMI Configuration Editor “Model Manager”.
Next steps include:• Build a better OpenMI Configuration Editor “Model Manager”.
• Integrate geospatial data processing at time zero – and subsequent steps as needed.
• Integrate geospatial data processing at time zero – and subsequent steps as needed.
• Building a true temporal geospatial GIS.
• Building a true temporal geospatial GIS.
An Integrated Time Series Modeling + GIS Scenario
27 of 33
An Integrated Time Series Modeling + GIS Scenario
28 of 29NOAA Coastal Services Center
An Integrated Time Series Modeling + GIS Scenario
29 of 29NOAA Coastal Services Center
Summary: Integrating OpenMI with GIS Goals…• Provide seamless integration of OpenMI
compliant hydrologic models within an open source GIS framework.
• Provide an ESRI ModelBuilder–like modeling interface for geoprocessing – but take it further by integrating with complex hydro models.
• Provide opportunities improving integrated environmental modeling systems in MapWindow GIS (i.e. BASINS, D4EM, WaterBase, etc.)
30 of 33
Summary: Integrating OpenMI with GIS • Current OpenMI Standard will work – all initial
geoprocessing takes place during time step zero.
• Time varying geoprocessing occurs at each time step (could be time consuming!)
• Existing caching mechanism for model outputs should alleviate potential problem of repetetive geoprocessing calls.
31 of 33
Summary: OpenMI with GIS – changes I’d like to see…• Each Model or Component needs to be able to
be added to the composition or layout multiple times… (i.e. you may want to run Reprojection on multiple data sets.)
• Composition editor needs to explicitly show input and output data sets on the diagram to aid readability, interpretability.
• Compositions should be nestable.• Models should be runtime discoverable (i.e.
rather than opening an omi file)
32 of 33
04/21/2333 of 33
Daniel P. Ames, PhD, PEIdaho State University
www.hydromap.comwww.mapwindow.org