The interface is indeed intended to be operated an on-line operational system. It's prime communication with external forecasting modules is through dynamic data such as time series, model states and diagnostics (see below). The published interface formats have been defined to cover a wider range of data types, but these need not be used in all cases - i.e. there is no requirement to allow communication of all data types. Indeed there is currently no module that caters for the full range of formats. Although the EA is to decide to what extent data should be passed, the practical approach followed with e.g. ISIS and the CEH modules is to pass only time series, module states and diagnostics information.
In exchanging data between a module and NFFS, a prioritisation of data types can be identified.
Priority |
Data Type |
Comment |
1 |
Time Series |
sufficient to cover most modules used in flood forecasting systems, including e.g. Mike-11 and NAM |
1 (a) |
Time series of grid data |
additionaly required for modules with 2D I/O formats (e.g inundation codes) |
2 |
Parameters |
Module parameters may be passed where the module allows calibration through the NFFS calibration facilities |
2 (a) |
Longitudinal profile data |
For hydrodynamic modules longitudinal data types may be passed - not a strict requirement. |
3 |
Static data (cross sections, branches, etc) |
This data is not required for operational forecasting. In exceptional cases data such as on branches may be required (for display purposes), but this need not be passed through the adapter and can be configured as appropriate. |
Unfortunately, the OpenMI standard is not (yet) strict enough to provide a 100% guarantee that any OpenMI modelcomponent can work within a FEWS forecasting environment. However, with an additional agreement between the OpenMI component supplier and FEWS this can be achieved. In a few sentences, we will try to explain this in more detail
Within a forecasting system, model states are updated on a regular basis, such that you run a new forecast with a recent 'warm' state. Within FEWS, models (model adapters) have to be able to dump their state to file, which is handed back to FEWS. When conducting a new forecast, this state is then put back to the model to be used for its run. Crucial aspect is however, that this forecast may be conducted on a different machine. Hence a persistent state needs to be handled.
Within the OpenMI, a callable interface has been defined which asks a component to keep (save) or restore its state. Unfortunately, the current version of OpenMI leaves it up to the component if it keeps the state in memory or saves it persistently on disk. In other words, OpenMI by itself does not guarantee that a state can be persistently handled.
To apply an OpenMI modelcomponent within a FEWS forecasting system, an additional agreement is needed in which the result of a 'OpenMI.KeepCurrentState'-call is a persistent file, with the file reference available to be handed back to FEWS. Furthermore, an agreement is needed to exchange relevant logging/diagnostics as OpenMi is also not very strong on this aspect.
To conclude: currently, FEWS can exchange data with OpenMI components on a scalar (point) data set. Grid support has not been implemented yet. Although we do have a preferred and simple data exchange format for state exchange, this has not been implemented yet, since we haven't had a real case where this support is required.
A outstanding change request for persistent state management is recognized and accepted by the OpenMI Association Technical Committee as a required change for version 2 of the OpenMI Standard...
This assumption is correct - see also G.1.1
The DELFT-FEWS system has been developed in JAVA and is platform independent. However, in the configuration of NFFS, all runs of forecasting modules are executed on dedicated servers. Presently, we have only used this on Windows and Linux systems.
There is no specific requirement for the module adapter. The only requirement is that it can communicate through the XML file formats. The use of standard methods for reading and writing XML files, based on the schemas provided is highly recommended. This not only reduces implementation efforts but also guarantees compatibility. The general adapter currently allows the external module to be run either as an executable, or as a Java method. A minor extension will allow running of DLL's. Batch files are not recommended as the General Adapters monitors return codes from the external module. These are not always correctly passed in Batch files, and as such ungraceful failure of a module is not easily identified.
The general adapter initiates the executable, Java method (or DLL) through the system/Java calls. Arguments may be passed when required, though these must be static. The general adapter may also be used to set environment variables for the module where required.
The module normally runs in a dedicated directory (tree). A working directory can be configured to act as the root of the module run.
This is correct. The most specific requirement is that the module must not have any manual interaction. This would preclude running the module in a distributed system.
This is a sole choice of the module adapter. There is a slight preference to ASCII formats as this eases debugging. However, if this has implications as to module performance (additional pre-processing requirements) then the binary format is advocated.
The general adapter has full state management facilities. This means the module is provided with an initial state for the start of run. The module should also provide a resulting state at the end of run, or at an intermediate time. When required this resulting state is administered and stored in the NFFS database for later use.
It is important to note that the actual module state file is handled blindly - ie it is not interpreted. NFFS takes the state and time-stamps it for storage in the database. NFFS will not change the content of the state, though renaming of files/directories on import/export is possible.
For cold start runs a default state is provided to the module.
Module results are generally passed back through the Published Interface XML format and stored in the database. Obviously only the required locations need be passed.
DELFT-FEWS provides a full set of generic tools for these derived data, including all of the above. Generally DELFT-FEWS is configured to pre-process all data and provide the module directly with required inputs. The module need not do any additional processing.
DELFT-FEWS provides an internal ARMA error modelling tool. This is module independent and is run in sequence to the module when required.
Sequences of modules and data handling functions are run in sequence by so-called workflows. This means that a workflow may be configured to first run a rainfall-runoff model (e.g. NAM, PDM) through the General adapter, then run an error correction routine to the output and subsequently run a hydrodynamic module (e.g. ISIS, MIKE11, SOBEK)
There is no difference to the module if it is on or off line. This layer is managed by DELFT-FEWS.
In its current form the diagnostics file to each external module run should be one file. The general adapter does, however, allow for executing a sequence of modules, with a diagnostics file for each.
The diagnostics passed back should be relatively limited - there is no strict requirement on the length of the message, but to the point messaging is advocated. The message should provide the level of knowledge to the operational forecaster to monitor the system. Different levels of messages should be used, with information useful in debugging being labelled appropriately.
For more detailed messaging - native module formats can be used, but this is only for specialist analysis. It should be noted that when a module fails, a zipped dump files is made of all module files and I/O. This is set aside for later, detailed, analysis.
It is good practice for a module to clean up redundant files after use. The general adapter does allow configuration of a purge activity either before the module run or after the module run (or both).
In the general adapter configuration (XML) the location of the PI-XML files to pass to the module is given, as well as the location where PI-XML files are expected. The location of diagnostics files and work directories can also be configured. The structure is dictated by the Published Interface. All files passed to the module will be in the same directory and all files passed back are expected in the same directory (with the exception of the diagnostics file).
To ensure simplicity, the length of the module run is dictated by the length of the time series passed. When a distinction is to be made between forecast and historic run, these will be passed as separate time series. The module adapter should identify run times from these.
Indeed. The module state returned will be administered by DELFT-FEWS. Depending on the status of the run it will be administered as a state to be used in ensuing forecasts, or disregarded.
Indeed. The General Adapter is configured to provide the module with the required data. Data may be provided at equidistant or non-equidistant intervals.
Yes. A state represents the state of a module at a single point in time.
The following quality checks can be made within DELFT-FEWS (when configured by the user)
Several levels are possible.