Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The header of the files contains all relevant information. Se See 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:

Code Block
xml
xml
<?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="ImportCEMIG-anna25GridImportDxonline">
		<moduleId>TimeSeriesImportRun</moduleId>
	</moduleInstanceDescriptor>
...
</moduleInstanceDescriptors>

An example of the CEMIG DxOnline import (filename: ImportCEMIG-anna25GridImportDxonline.xml) configuration for the anna25 files will be given here. The importType is named CEMIG which DXONLINE which should be configured in the general section of the import.An optional gridStartPoint can be specified. Currently only NW and SW are supported. Default is NW.

Code Block
xml
xml
<?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>CEMIG<<importType>DXONLINE</importType>
			<folder>$IMPORT_CEMIG_FOLDER$/anna<<folder>$DXONLINE_IMPORT$</folder>
			<idMapId>cemigMapId<<idMapId>dxMapId</idMapId>
			<missingValue>-999</missingValue>
			<gridStartPoint>SW</gridStartPoint>

 		</general>
		<properties>
			<bool key="forecast" value="false"/> <!-- default is false -->
			<string key="vars" value="prec"/> <!-- comma (,) separated list of variabeles. If more than one variable is specified, only one timestep is assumed. Specifying a tdefUnit and tdefValue is considered an error in this case. -->
			<string key="fileNameDateTimePattern" value="prec_'ddMMyyyy'.bin"/> <!-- define the date format to determine T0 or the forecast date  from the file name. -->
			<string key="tdefUnit" value="hour"/> <!-- define the timestep unit: second, minute, hour, day, month, year -->
			<string key="tdefValue" value="3"/> <!-- specifify the value related to the tdefUnit. -->
		</properties>
		<timeSeriesSet>
			<moduleInstanceId>ImportCEMIG-anna25<<moduleInstanceId>GridImportDxonline</moduleInstanceId>
			<valueType>grid</valueType>
			<parameterId>H.observed</parameterId>
			<locationId>CMEG-anna25-location<<locationId>cxLocation</locationId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="hour" multiplier="3nonequidistant"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
	</import>

</timeSeriesImportRun>

The IdMapping configuration cemigMapIddxMapId.xml is needed to maps the internal FEWS Id's to the CEMIG DxOnline Id's. An example IdMapping file importer is shown below. As an example the H.observed parameter is used to map the RATE parameter and a location cxLocation has been defined in the Locations.xml that the COMP location will be mapped to:

Code Block
xml
xml
<?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 external="RATE" internal="H.observed" />
	<location external="COMP" internal="preccxLocation" />
	....
</idMap>

The actual grid definition (grids.xml) looks as follows:

noformat
Code Block
xml
xml
<?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-locationcxLocation">
		<description>CMEG ANA25 Import</description>
		<rows>160<<rows>280</rows>
		<columns>176<<columns>280</columns>
		<geoDatum>WGS 1984</geoDatum>
		<firstCellCenter>
			<x>-76<x>0.25<0</x>
			<y>5<y>0.50<0</y>
		</firstCellCenter>
		<xCellSize>0.25<1</xCellSize>
		<yCellSize>0.25<1</yCellSize>
	</regular>
</grids>