Overview
The DxOnline import function (<importType>DXONLINE</importType>) imports grid time series from a HDF5 file format.
The DxOnline HDF5 file contains radar data, time step 5 minutes covering a regular grid.
The header of the files contains all relevant information. Se the following screenshot of a sample file displayed using a HDF5 viewer.
Every file contains one dataset. The datagroup inside the dataset contains attributes. The following attributes are used by the importer:
- location extern = <product>; value = COMP in the example
- parameter extern = <quantity>; value = RATE in the example
- time date = <enddate>; value = 20140506
- time hour/minute = <endtime>; value = 223000
Configuring the Import
To make the importer known to FEWS, the import module has to be declared in the moduleInstanceDescriptors.xml in the RegionConfigFiles directory of the FEWS configuration:
<?xml version="1.0" encoding="UTF-8"?> <moduleInstanceDescriptors 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/moduleInstanceDescriptors.xsd" version="1.0"> ... <moduleInstanceDescriptor id="GridImportDxonline"> <moduleId>TimeSeriesImportRun</moduleId> </moduleInstanceDescriptor> ... </moduleInstanceDescriptors>
An example of the DxOnline import (filename: GridImportDxonline.xml) configuration will be given here. The importType is named DXONLINE which should be configured in the general section of the import.
<?xml version="1.0" encoding="UTF-8"?> <timeSeriesImportRun 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/timeSeriesImportRun.xsd"> <import> <general> <importType>DXONLINE</importType> <folder>$DXONLINE_IMPORT$\</folder> <idMapId>dxMapId</idMapId> </general> <timeSeriesSet> <moduleInstanceId>GridImportDxonline</moduleInstanceId> <valueType>grid</valueType> <parameterId>H.observed</parameterId> <locationId>cxLocation</locationId> <timeSeriesType>external historical</timeSeriesType> <timeStep unit="nonequidistant"/> <readWriteMode>add originals</readWriteMode> </timeSeriesSet> </import> </timeSeriesImportRun>
The IdMapping configuration cemigMapId.xml is needed to maps the internal FEWS Id's to the CEMIG Id's. An example IdMapping file importer is shown below.:
<?xml version="1.0" encoding="UTF-8"?> <idMap version="1.1" 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/idMap.xsd"> .... <parameter internal="H.observed" external="prec"/> .... </idMap>
The actual grid definition (grids.xml) looks as follows:
<?xml version="1.0" encoding="UTF-8"?> <grids 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/grids.xsd"> <regular locationId="CMEG-anna25-location"> <description>CMEG ANA25 Import</description> <rows>160</rows> <columns>176</columns> <geoDatum>WGS 1984</geoDatum> <firstCellCenter> <x>-76.25</x> <y>5.50</y> </firstCellCenter> <xCellSize>0.25</xCellSize> <yCellSize>0.25</yCellSize> </regular> </grids>