You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Overview

The CEMIG import function (<importType>CEMIG</importType>) imports grid time series from a CEMIG specific binary format (4 bytes for a float value). The CEMIG binary format contains only values. The filename contains the observation or forecast date. To be able to configure the parser, the importer has to be configured with some properties.

Possible configuration properties are:

  • forecast (optional): Possible values are true or false. Default is false. If forecast is set to true, the forecast date will be registered as T0 and the first import value will be assumed to start at T0 + the configured timeStep.

  • vars (required): should contain one or more , separated list of parameter names. The parameters are expected to be present in the binary file in the specified order. Only one value per parameter is assumed.

  • fileNameDateTimePattern (required): pattern of the filename where the date is marked with single quotes ('). For example "prec_'yyyyMMdd'.bin". The date is used to determine T0 or the forecast date from the file name.

  • tdefUnit (optional): Required if more than one timestep is available in the binary format. Possible values are: second, minute, hour, day, month, year.

  • tdefValue (optional): Specifify the amount of units specified in the tdefUnit. 

  •  

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="ImportURA">
		<moduleId>TimeSeriesImportRun</moduleId>
	</moduleInstanceDescriptor>
...
</moduleInstanceDescriptors>

 

An example of the URA import configuration will be given here. The importType is named URA which should be configured in the general section of the import.
Special attention should be given to the timezone since URA data is stored in local time;

<?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>URA</importType>
			<folder>$IMPORT_FOLDER$/import/ura</folder>
			<idMapId>uraMapId</idMapId>
			<importTimeZone>
				<timeZoneName>CET</timeZoneName>
			</importTimeZone>
		</general>
		<timeSeriesSet>
			<moduleInstanceId>ImportURA</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>Q.m</parameterId>
			<locationId>FewsLocation</locationId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="minute" multiplier="5"/>
			<relativeViewPeriod unit="minute" start="0" end="100"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
	</import>
</timeSeriesImportRun>

The IdMapping configuration uraMapId.xml is very important because this maps the internal FEWS Id's to the URA Id's. An example IdMapping file for the URA 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="Q.m" external="QRIO1"/>
	<location internal="FewsLocation" external="1080"/>
	....
</idMap>

Example URA file

 

A074L17NRIO1; 10/12/13  06:00; 0000,410; BUENA
A074L65QRIO1; 10/12/13  06:00; 0006,680; BUENA
A074L85PQUIN; 10/12/13  06:00; 0000,000; BUENA
A075L17NRIO1; 10/12/13  06:00; 0000,520; BUENA
A075L65QRIO1; 10/12/13  06:00; 0002,230; BUENA
A165L17NRIO1; 10/12/13  06:00; 0000,430; BUENA
A165L65QRIO1; 10/12/13  06:00; 0002,360; BUENA

  • No labels