Import Module Configuration

The import module allows data from external source to be imported into DELFT-FEWS. Data may be provided to FEWS in a variety of formats. The approach taken in the import module is that a class is defined for each of the file formats that can be imported.

Data is imported from specified directories. An attempt is made to import all files in the directories configured. If a file conforms to the expected format then the data will be imported. If the file does not conform to the expected format, it will not be imported, but will be moved to a configurable directory with failed import files.

Two main groups of import can be defined;

On importing data, the approach to be used for converting flags, units, locations and parameters can be defined. These conversions are identified by referring to the appropriate configuration files (see Regional Configuration). When data is imported to an equidistant time series, a time tolerance may also be defined. If the time recorded is within this tolerance it will be snapped to the cardinal time step in the imported series.

When available as configuration on the file system, the name of the XML file for configuring an instance of the import module called for example ImportRTS may be:

ImportRTS 1.00 default.xml

ImportRTS File name for the ImportRTS configuration.
1.00 Version number
default Flag to indicate the version is the default configuration (otherwise omitted).


Time Series Import Module

The time series import class can be applied to import data from a variety of external formats. The formats are included in an enumeration of supported import types. Each of these enumerations is used for a specifically formatted file.


Figure 62 Elements of the TimeSeriesImport configuration

import

Root element for the definition of an import run task. Each task defined will import data in a specified format from a specified directory. For defining multiple formats, different import tasks reading from different directories must be defined.

general

Root element for general definitions used in the import runs.

description

Optional description for the import run. Used for reference purposes only.

importType

Specification of the format of the data to be imported. The enumeration of options includes;


folder

Folder to import data from. This may be a UNC path (ie located on the network).

failedFolder

Folder to move badly formatted files to. This may be a UNC path (ie located on the network).

idMapId

ID of the IdMap used to convert external parameterId's and locationId's to internal parameter and location Id's. Each of the formats specified will have a unique method of identifying the id in the external format. See section on configuration for Mapping Id's units and flags.

unitConversionsId

ID of the UnitConversions used to convert external units to internal units. Each of the formats specified will have a unique method of identifying the unit in the external format. See section on configuration for Mapping Id's units and flags.

flagConversionsId

ID of the FlagConversions used to convert external data quality flags to internal data quality flags. Each of the formats specified will have a unique method of identifying the flag in the external format. See section on configuration for Mapping Id's units and flags.

missingValue

Optional specification of missing value identifier in external data format.

importTimeZone

Time zone the external data is provided in if this is not specified in the data format itself. This may be specified as a timeZoneOffset, or as a specific timeZoneName.

timeZoneOffset

The offset of the time zone with reference to UTC (equivalent to GMT). Entries should define the number of hours (or fraction of hours) offset. (e.g. +01:00)

timeZoneName

Enumeration of supported time zones. See appendix B for list of supported time zones.

gridStartPoint

Identification of the cell considered as the first cell of the grid. This may be in the upper left corner or in the lower left corner. Enumeration of options include;

Attributes;

For non-equidistant time series the time values imported will be taken as is. For equidistant time series values are only returned on the cardinal time steps. For cardinal time steps where no value is available, no data is returned.

externUnit

For some data formats an external unit is not defined in the file to be imported. This elements allows the unit to be specified explicitly. This unit is then used in possible unit conversions.

Attributes;


Example: Import of Meteosat images as time-series

Meteosat Images are generally imported as images in _\[filename\].png_ format. The Meteosat images constitute a time series of png images, that are geo-referenced by means of a specific world file. Each image needs its own world file, which in case of PNG carries the extension _\[filename\].pgw_ . 
Import of images in another format, such as JPEG is also possible. The corresponding world file for a JPEG file has the extension _\[filename\].jpg_ .
The images are imported via a common time series import, for which a specific image parameter needs to be specified in a _parameterGroup_ via the parameter id _image_ .

_\[parameterGroup id="image"\]_ 
_		  \[parameterType\]instantaneous\[/parameterType\]_ 
_		  \[unit\]-\[/unit\]_ 
_		  \[valueResolution\]8\[/valueResolution\]_ 
_		  \[parameter id="image"\]_ 
_		   \[shortName\]image\[/shortName\]_ 
_		  \[/parameter\]_ 
_\[/parameterGroup\]_ 

The value resolution indicates the resolution of the values of the pixels (grey tones) in the Meteosat images. In this case 8 grey tones are resampled into a single grey tone for storage space reductions. In the module for the timemeseries import run for a Meteosat image the import is then configured as follows:

_\[import\]_ 
_  \[general\]_ 
_   \[importType\]GrayScaleImage\[/importType\]_ 
_   \[folder\]$REGION_HOME$/Import/MeteoSat\[/folder\]_ 
_            \[idMapId\]IdImportMeteosat\[/idMapId\]_ 
_   \[/general\]_ 
__ 
_  \[timeSeriesSet\]_ 
_   \[moduleInstanceId\]ImportMeteosat\[/moduleInstanceId\]_ 
_   \[valueType\]grid\[/valueType\]_ 
_   \[parameterId\]image\[/parameterId\]_ 
_   \[locationId\]meteosat\[/locationId\]_ 
_   \[timeSeriesType\]external historical\[/timeSeriesType\]_ 
_   \[timeStep unit="minute" multiplier="15"/\]_ 
_   \[readWriteMode\]add originals\[/readWriteMode\]_ 
_   \[synchLevel\]4\[/synchLevel\]_ 
_   \[expiryTime unit="day" multiplier="750"/\]_ 
_  \[/timeSeriesSet\]_ 
_ \[/import\]_ 


Figure 63 Elements of the EAImport configuration.