Anchor |
---|
| _Toc154574463 |
---|
| _Toc154574463 |
---|
|
Archive Forecast Module
...
Delft-FEWS contains five modules that can create or restore archives. These modules need to be registered in the ModuleDescriptors file located in the system configuration files.
Code Block |
---|
| xml | xml |
---|
title | ModuleDescriptors 1.00 default.xml |
---|
| xml |
---|
|
<moduleDescriptor id="ForecastArchiver">
<description>Forecast archiver</description>
<className>nl.wldelft.fews.system.plugin.archive.ForecastArchiver</className>
</moduleDescriptor>
<moduleDescriptor id="TimeSeriesArchiver">
<description>Time Series archiver</description>
<className>nl.wldelft.fews.system.plugin.archive.TimeSeriesArchiver</className>
</moduleDescriptor>
<moduleDescriptor id="ThresholdEventsArchiver">
<description>Threshold Events archiver</description>
<className>nl.wldelft.fews.system.plugin.archive.ThresholdEventsArchiver</className>
</moduleDescriptor>
<moduleDescriptor id="ConfigurationArchiver">
<description>Configuration archiver</description>
<className>nl.wldelft.fews.system.plugin.archive.ConfigurationArchiver</className>
</moduleDescriptor>
<moduleDescriptor id="LogEntriesArchiver">
<description>LogEntries archiver</description>
<className>nl.wldelft.fews.system.plugin.archive.LogEntriesArchiver</className>
</moduleDescriptor>
|
...
The ConfigurationArchiver can be used to make archives of configuration changes in the FEWS database. In the example below, the ConfigurationArchiver is scheduled to run once every 24 hours. The ConfigurationArchiver checks if there have been any configuration changes in the last 24 hours. If so, it stores the configuration changes in a zip file and stores these in the folder configured in the global.properties file with the Tag ARCHIVE_EXPORT_PATH.
Code Block |
xml |
---|
| xml |
---|
title | Archive_Configuration 1.00 default.xml |
---|
| xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<archiveRun xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/archiveRun.xsd">
<importDirectory>$ARCHIVE_IMPORT_PATH$</importDirectory>
<exportDirectory>$ARCHIVE_EXPORT_PATH$</exportDirectory>
<exportArchiveRun>
<archivePeriod start="-24" end="0" unit="hour"/>
<archiveType>ConfigurationArchive</archiveType>
</exportArchiveRun>
</archiveRun>
|
...
The ThresholdEventsArchiver can be used to make archives of threshold crossings that have been stored in the FEWS database. Threshold events are created by the FEWS Threshold module, and stored in the FEWS ThresholdEvents table. The threshold events can be used by the FEWS Performance module to analyse the performance of the Forecasting System.
An example of the ThresholdEventsArchiver is shown in the example below. As with the ConfigurationArchiver, the ThresholdEventsArchiver is scheduled to run once every 24 hours. The ThresholdEventsArchiver checks if there have been any threshold events in the last 24 hours. If so, it stores the threshold events in a zip file and stores these in the folder configured in the global.properties file with the Tag ARCHIVE_EXPORT_PATH.
Code Block |
---|
| xml | xml |
---|
title | Archive_Thresholds 1.00 default.xml |
---|
| xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<archiveRun xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/archiveRun.xsd">
<importDirectory>$ARCHIVE_IMPORT_PATH$</importDirectory>
<exportDirectory>$ARCHIVE_EXPORT_PATH$</exportDirectory>
<exportArchiveRun>
<archivePeriod start="-24" end="0" unit="hour"/>
<archiveType>ThresholdEventsArchive</archiveType>
</exportArchiveRun>
</archiveRun>
|
...
The ForecastArchiver can be used to make archives of forecasts that have been stored in the FEWS database. All forecasts that have been made, together with the data that has been used to make the forecasts will be stored in the forecast archive. An example of the ForecastArchiver is shown in the example below, the ForecastArchiver is scheduled to run once every 24 hours. The ForecastArchiver stores all forecasts in a zip file and stores these in the folder configured in the global.properties file with the Tag ARCHIVE_EXPORT_PATH.
Code Block |
xml |
---|
| xml |
---|
title | Archive_Forecast 1.00 default.xml |
---|
| xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<archiveRun xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/archiveRun.xsd">
<importDirectory>$ARCHIVE_IMPORT_PATH$</importDirectory>
<exportDirectory>$ARCHIVE_EXPORT_PATH$</exportDirectory>
<exportArchiveRun>
<archivePeriod start="-24" end="0" unit="hour"/>
<exportToFile>true</exportToFile>
</exportArchiveRun>
</archiveRun>
|
...
The TimeSeriesArchiver can be used to make archives of timeseries from selected module instances that will not be stored in a normal forecast archive. These time series can be performance indicators or imported data that is not used by any forecast run. All timeseries that have been stored in the database with the selected module instances will be stored in the forecast archive. An example of the TimeSeriesArchiver is shown in the example below, the TimeSeriesArchiver is scheduled to run once every 24 hours. The TimeSeriesArchiver stores all forecasts in a zip file and stores these in the folder configured in the global.properties file with the Tag ARCHIVE_EXPORT_PATH.
Code Block |
---|
| xml | xml |
---|
title | Archive_TimeSeries 1.00 default.xml |
---|
| xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<archiveRun xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/archiveRun.xsd">
<importDirectory>$ARCHIVE_IMPORT_PATH$</importDirectory>
<exportDirectory>$ARCHIVE_EXPORT_PATH$</exportDirectory>
<exportArchiveRun>
<archivePeriod start="-24" end="0" unit="hour"/>
<archiveType>TimeSeriesArchive</archiveType>
<includeModuleInstanceId>Import_Telemetry</includeModuleInstanceId>
<includeModuleInstanceId>Import_CWB_Database</includeModuleInstanceId>
<includeModuleInstanceId>Import_CWB_Grid</includeModuleInstanceId>
<includeModuleInstanceId>Import_Qpesums</includeModuleInstanceId>
<includeModuleInstanceId>Import_GFS</includeModuleInstanceId>
<includeModuleInstanceId>Import_TRMM</includeModuleInstanceId>
<includeModuleInstanceId>Import_WRF</includeModuleInstanceId>
</exportArchiveRun>
</archiveRun>
|
...
The standard procedure is to run a scheduled archive workflow every 24 hours. The Archive workflow can also be started from the Manual Forecast Display. An example of the Archive Workflow is shown below.
Code Block |
---|
| xml | xml |
---|
title | Archive_Scheduled 1.00 default.xml |
---|
| xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<workflow xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/workflow.xsd" version="1.1">
<activity>
<runIndependent>true</runIndependent>
<moduleInstanceId>Archive_Forecast</moduleInstanceId>
</activity>
<activity>
<runIndependent>true</runIndependent>
<moduleInstanceId>Archive_Thresholds</moduleInstanceId>
</activity>
<activity>
<runIndependent>true</runIndependent>
<moduleInstanceId>Archive_TimeSeries</moduleInstanceId>
</activity>
<activity>
<runIndependent>true</runIndependent>
<moduleInstanceId>Archive_Configuration</moduleInstanceId>
</activity>
</workflow>
|
...
Archives can only be imported in a FEWS database from a Stand Alone System, it is not possible to import archives in a FEWS Operator Client. To import an archive workflow must be configured that runs the archive modules again, this time to import the archives from an import folder.
Code Block |
---|
| xml | xml |
---|
title | Import_Archive 1.00 default.xml |
---|
| xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<workflow xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/workflow.xsd" version="1.1">
<!-- Run Import Archive Files on Stand Alone -->
<activity>
<moduleInstanceId>Import_Archive_Forecast</moduleInstanceId>
</activity>
<activity>
<moduleInstanceId>Import_Archive_Thresholds</moduleInstanceId>
</activity>
<activity>
<moduleInstanceId>Import_Archive_TimeSeries</moduleInstanceId>
</activity>
</workflow>
|
The module instances for importing forecasts, timeseries and threshold events are almost similar. Instead of configuring an exportArchiveRun, an importArchiveRun must be configured. The following example shows a configuration of an import archive module instance to import forecasts.
Code Block |
---|
| xml | xml |
---|
title | Import_Archive_Forecast 1.00 default.xml |
---|
| xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<archiveRun xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/archiveRun.xsd">
<importDirectory>$ARCHIVE_IMPORT_PATH$</importDirectory>
<exportDirectory>$ARCHIVE_EXPORT_PATH$</exportDirectory>
<importArchiveRun>
<archiveType>ForecastArchive</archiveType>
</importArchiveRun>
</archiveRun>
|
...