Versions Compared

Key

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

...

The Brazil Ana import function (<importType>BrazilAna</importType>) imports telemetry data from a custom XML format. Timezone is assumed to be GMT. The importer can be configured to read the data using another timeZone configuration. For example to read the data in the Brazilian Standard Time, the following can be specified: 

 

No Format
<importTimeZone>
<timeZoneName>BRT</timeZoneName>
</importTimeZone>

 

From the BrazilAna data format the following is imported:

  • Observation time in the format yyyy-MM-dd HH:mm:ss (DataHora)
  • Station code (CodEstacao)
  • Discharge (Vazao)
  • Level (Nivel)
  • Rainfall (Chuva)

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

...

An example of the BrazilAna import configuration will be is given here. The importType is named BrazilAna which should be configured in the general section of the import. 

...

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 internal="H.observed" external="Nivel"/>
	<parameter internal="Q.observed" external="Vazao"/>
	<parameter internal="H.simulated" external="Chuva"/>
        
	<location external="40450001" internal="Brasilia" />	
....
</idMap>

Example BrazilAna import file

 

No Format
<?xml version="1.0" encoding="utf-8"?>
<DataTable xmlns="http://MRCS/">
  <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="DadosHidrometereologicos" msdata:UseCurrentLocale="true">
      <xs:complexType>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element name="DadosHidrometereologicos">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="CodEstacao" type="xs:string" minOccurs="0" />
                <xs:element name="DataHora" type="xs:string" minOccurs="0" />
                <xs:element name="Vazao" type="xs:string" minOccurs="0" />
                <xs:element name="Nivel" type="xs:string" minOccurs="0" />
                <xs:element name="Chuva" type="xs:string" minOccurs="0" />
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:choice>
      </xs:complexType>
    </xs:element>
  </xs:schema>
  <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
    <DocumentElement xmlns="">
      <DadosHidrometereologicos diffgr:id="DadosHidrometereologicos1" msdata:rowOrder="0">
        <CodEstacao>40450001</CodEstacao>
        <DataHora>2015-03-02 17:00:00 </DataHora>
        <Vazao>64.10</Vazao>
        <Nivel>113.00</Nivel>
        <Chuva />
      </DadosHidrometereologicos>