DMI Executable
The DMI executable is invoked by RiverWare, which then waits for it to exit. For an import DMI, the executable creates data files from an external data source. For an export DMI, the executable populates an external data sink from data files.
Nearly any programming language can be used to write the DMI executable. Often the choice of tools will be based on user experience and existing tools that can communicate with the database.
Note: A Windows batch (.bat) script could work as a DMI executable. It does need to include an exit statement: exit /b 0 The convention for a DMI executable is a zero exit status indicates success, a non-zero exit status indicates an error. Without the exit statement the bat script would return the “DMI executable failed: Exited with 1." error.
The DMI executable is passed the following command line arguments:
Meta-control File
The path to the meta-control file. The meta-control file is a copy of the control file described above, with wildcards resolved. Each line is of the form:
object.slot: file=<file name> [optional keyword=value pairs]
The DMI executable should use the object.slot specification to determine for which objects and slots it must provide data (import DMI), or for which objects and slots data is being provided (export DMI). The executable should use the file specification to determine to where to write the data to be read by RiverWare (import DMI), or from where to read the data exported by RiverWare (export DMI).
If the start_timestep and/or end_timestep are supplied in the control file, the meta-control file will contain start_date, start_time, end_date and end_time information.
Working Directory
The working directory is the DMI's working directory, as described above. It is an artifact of an earlier implementation and can safely be ignored by the DMI executable.
Start Data (YYYY-MM-DD)
The start date of the data the executable must provide (import DMI), or of the data which is being provided (export DMI).
Start Time (HH:MM)
The start time of the data the executable must provide (import DMI), or of the data which is being provided (export DMI).
End Data (YYYY-MM-DD)
The end date of the data the executable must provide (import DMI), or of the data which is being provided (export DMI).
End Time (HH:MM)
The end time of the data the executable must provide (import DMI), or of the data which is being provided (export DMI).
Timestep (6HOUR)
The timestep of the data the executable must provide (import DMI), or of the data which is being provided (export DMI).
System Parameters
Not implemented.
User Parameters
The user parameters, in the form: -Ukeyword=value The intention of the user parameters is described above.