Please note: this information provider has very strict security rules, and data can only be accessed whileusing VPN and google authenticate. 


This import can download data from two different SOAP endpoints: PrecipitacaoObservada and Grandezas Hidrologicas. Both the request bodies and responses are very similar, but there are some differences, detailed bellow.

These fields in the request are filled in by FEWS automatically:

DataInicialMedicao --> start date, filled in by FEWS based on the relative view period

DataFinalMedicao --> end date, filled in by FEWS based on the relative view period

QualidadeDado --> data quality flag, coming from general property "QD" of Delft-FEWS. Obligatory field with three options COO, CON or both (COO,CON) for Grandezas Hidrologicas and for PrecipitacaoObservada it should be CD or CT.

AgregacaoTemporal --> temporal aggregation. Obligatory field with two options possible, DI=daily data HO=hourly.  Fews fills this field in based on the timeseries time step. If the time step is hourly, it will be HO, any other timestep will be DI.

 PrecipitacaoObservada 

FuroTemporal --> information on getting Furo Temporal, coming from general property furoTemporal  of Delft-FEWS. This field can be skipped and has two option S (yes) N (no). If it is not configured it will not be added to the URL.

IDEstacaoMeteo --> station ID, filled in by Fews automatically, using the external location IDs of the configured time series.  Several locations can be added to a single request.

 Grandezas Hidrologicas

IDPostReservatorio--> station ID, filled in by Fews automatically, using the external location IDs of the configured time series.  Several locations can be added to a single request.

Grandeza --> timeseries parameter, filled in by FEWS automatically, using the external parameter ID from the configured time series.   The following parameters are supported: "VMD","AFL","DFL","TUR","VER","VTR","VOE","NIV","NJS","VNA","VNM","VNS","VIA".  In one request only one parameter can be used, but FEWS will loop through all parameters one by one automatically.


Request body examples:

Headers:

SOAPAction : http://ons.org.br/Hidrologia/v1/PreciptacaoObservada

Content-Type: text/xml

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://ons.org.br/Hidrologia/v1">
   <soapenv:Header/>
   <soapenv:Body>
      <v1:PreciptacaoObservada>
         <v1:Pagina>1</v1:Pagina>
         <v1:Quantidade>100</v1:Quantidade>
         <v1:IdEstacaometeo> 
                <v1:string>A001</v1:string>     
         </v1:IdEstacaometeo>
         <v1:dataInicioMedicao>08/07/2020</v1:dataInicioMedicao>
         <v1:dataFimMedicao>16/10/2020</v1:dataFimMedicao>
         <v1:QualidadeDado>
            <v1:string>CD</v1:string>
         </v1:QualidadeDado>
         <v1:AgregacaoTemporal>DI</v1:AgregacaoTemporal>
         <v1:FuroTemporal>N</v1:FuroTemporal>
      </v1:PreciptacaoObservada>
   </soapenv:Body>
</soapenv:Envelope>


Headers:

SOAPAction : http://ons.org.br/Hidrologia/v1/GrandezasHidrologicas

Content-Type: text/xml

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://ons.org.br/Hidrologia/v1">
    <soapenv:Header/>
    <soapenv:Body>
              <v1:GrandezasHidrologicas>
            <v1:Pagina>1</v1:Pagina>
            <v1:Quantidade>1000</v1:Quantidade>
            <v1:IdPostoReservatorio>
                <v1:string>TOUHSA</v1:string>       
                <v1:string>AAFGO</v1:string>            
            </v1:IdPostoReservatorio>
            <v1:Grandeza>AFL</v1:Grandeza>
            <v1:DataInicioMedicao>01/01/2020</v1:DataInicioMedicao>
            <v1:DataFimMedicao>26/10/2020</v1:DataFimMedicao>
            <v1:QualidadeDado>
                <v1:string>CON</v1:string>
            </v1:QualidadeDado>
            <v1:AgregacaoTemporal>DI</v1:AgregacaoTemporal>
        </v1:GrandezasHidrologicas>
        </soapenv:Body>
    </soapenv:Envelope>



Config example:

Username and password are not used.

Properties:

QD - compulsory field.

furoTemporal- optional field, only supported with PrecipitacaoObservada .

addParamToRequest - optional field. As you can see above, only the Grandezas Hidrologicas endpoint needs a parameter in the URL. If this field is set to true, the import will assume you wish to import data from Grandezas Hidrologicas, and will try to parse the result accordingly.
As  you will see bellow, the structure of the responses differ, so it is important the field is set correctly. Default value is true.



<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2006 rel. 3 sp1 (http://www.altova.com) by Computer Services (WL | Delft Hydraulics) -->
<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>ONSSoap</importType>
         <serverUrl>http://tst-appdmz-113.ons.org.br/hidrologia/hidrologia.asmx</serverUrl>
<!--         this field is not used, but it is necessary to be able to configure connection timout-->
         <backupServerUrl>http://tst-appdmz-113.ons.org.br/hidrologia/hidrologia.asmx</backupServerUrl>
<!--         if this field is not configured, it will be set at 2000 automatically. -->
         <connectionTimeOutMillis>100000</connectionTimeOutMillis>
         <user>dummy_username</user>
         <password>dummy_password</password>
         <relativeViewPeriod unit="day" start="-3" end="0" startOverrulable="true" endOverrulable="true"/>
         <idMapId>ONSSoapMap</idMapId>
      </general>
      <properties>
         <string key="QD" value="CON"></string>
<!--         This determined if we are importing PrecipitacaoObservada (false), or Grandezas Hidrologicas(true). Default is true-->
         <bool key="addParamToRequest" value="true"></bool>
      </properties>
      <timeSeriesSet>
         <moduleInstanceId>ONSSoap</moduleInstanceId>
         <valueType>scalar</valueType>
         <parameterId>param1</parameterId>
         <locationId>LocB</locationId>
         <timeSeriesType>external historical</timeSeriesType>
         <timeStep unit="hour" multiplier="24"/>
         <readWriteMode>add originals</readWriteMode>
      </timeSeriesSet>
      <timeSeriesSet>
         <moduleInstanceId>ONSSoap</moduleInstanceId>
         <valueType>scalar</valueType>
         <parameterId>param1</parameterId>
         <locationId>LocA</locationId>
         <timeSeriesType>external historical</timeSeriesType>
         <timeStep unit="hour" multiplier="24"/>
         <readWriteMode>add originals</readWriteMode>
      </timeSeriesSet>
   </import>
   <import>
      <general>
         <importType>ONSSoap</importType>
         <serverUrl>http://tst-appdmz-113.ons.org.br/hidrologia/hidrologia.asmx</serverUrl>
         <!--         this field is not used, but it is necessary to be able to configure connection timout-->
         <backupServerUrl>http://tst-appdmz-113.ons.org.br/hidrologia/hidrologia.asmx</backupServerUrl>
         <!--         if this field is not configured, it will be set at 2000 automatically. -->
         <connectionTimeOutMillis>100000</connectionTimeOutMillis>
         <user>dummy_username</user>
         <password>dummy_password</password>
         <relativeViewPeriod unit="day" start="-100" end="0" startOverrulable="true" endOverrulable="true"/>
         <idMapId>ONSSoapMap</idMapId>
      </general>
      <properties>
         <string key="QD" value="CD"></string>
<!--         This determined if we are importing PrecipitacaoObservada (false), or Grandezas Hidrologicas(true). Default is true-->
         <bool key="addParamToRequest" value="false"></bool>
         <string key="furoTemporal" value="N"></string>
      </properties>
      <timeSeriesSet>
         <moduleInstanceId>ONSSoap</moduleInstanceId>
         <valueType>scalar</valueType>
         <parameterId>param2</parameterId>
         <locationId>LocC</locationId>
         <timeSeriesType>external historical</timeSeriesType>
         <timeStep id="day12"/>
         <readWriteMode>add originals</readWriteMode>
      </timeSeriesSet>
   </import>
</timeSeriesImportRun> 


Example response:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <GrandezasHidrologicasResponse xmlns="http://ons.org.br/Hidrologia/v1">
            <GrandezasHidrologicasResult>
                <Pagina>1</Pagina>
                <Quantidade>8</Quantidade>
                <Resultados>
                    <GrandezaHidrologica>
                        <Identificador>AAFGO </Identificador>
                        <DataHoraMedicao>23/10/2020</DataHoraMedicao>
                        <ValorMedicao>199</ValorMedicao>
                        <StatusMedicao>CON</StatusMedicao>
                    </GrandezaHidrologica>
                    <GrandezaHidrologica>
                        <Identificador>AAFGO </Identificador>
                        <DataHoraMedicao>24/10/2020</DataHoraMedicao>
                        <ValorMedicao>175</ValorMedicao>
                        <StatusMedicao>CON</StatusMedicao>
                    </GrandezaHidrologica>
                    <GrandezaHidrologica>
                        <Identificador>AAFGO </Identificador>
                        <DataHoraMedicao>25/10/2020</DataHoraMedicao>
                        <ValorMedicao>210</ValorMedicao>
                        <StatusMedicao>CON</StatusMedicao>
                    </GrandezaHidrologica>
                    <GrandezaHidrologica>
                        <Identificador>AAFGO </Identificador>
                        <DataHoraMedicao>26/10/2020</DataHoraMedicao>
                        <ValorMedicao>213</ValorMedicao>
                        <StatusMedicao>CON</StatusMedicao>
                    </GrandezaHidrologica>
                    <GrandezaHidrologica>
                        <Identificador>TOUHSA</Identificador>
                        <DataHoraMedicao>23/10/2020</DataHoraMedicao>
                        <ValorMedicao>939</ValorMedicao>
                        <StatusMedicao>CON</StatusMedicao>
                    </GrandezaHidrologica>
                    <GrandezaHidrologica>
                        <Identificador>TOUHSA</Identificador>
                        <DataHoraMedicao>24/10/2020</DataHoraMedicao>
                        <ValorMedicao>827</ValorMedicao>
                        <StatusMedicao>CON</StatusMedicao>
                    </GrandezaHidrologica>
                    <GrandezaHidrologica>
                        <Identificador>TOUHSA</Identificador>
                        <DataHoraMedicao>25/10/2020</DataHoraMedicao>
                        <ValorMedicao>995</ValorMedicao>
                        <StatusMedicao>CON</StatusMedicao>
                    </GrandezaHidrologica>
                    <GrandezaHidrologica>
                        <Identificador>TOUHSA</Identificador>
                        <DataHoraMedicao>26/10/2020</DataHoraMedicao>
                        <ValorMedicao>1064</ValorMedicao>
                        <StatusMedicao>CON</StatusMedicao>
                    </GrandezaHidrologica>
                </Resultados>
            </GrandezasHidrologicasResult>
        </GrandezasHidrologicasResponse>
    </soap:Body>
</soap:Envelope>


<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <PreciptacaoObservadaResponse xmlns="http://ons.org.br/Hidrologia/v1">
            <PreciptacaoObservadaResult>
                <Pagina>1</Pagina>
                <Quantidade>4</Quantidade>
                <Resultados>
                    <Precipitacao>
                        <IdentificadorEstacaoMeteo>A001</IdentificadorEstacaoMeteo>
                        <DataHoraMedicao>13/10/2020 12:00:00</DataHoraMedicao>
                        <ValorMedicao>0</ValorMedicao>
                        <StatusMedicao>CD</StatusMedicao>
                        <FuroTemporal>N</FuroTemporal>
                        <Estimado>N</Estimado>
                    </Precipitacao>
                    <Precipitacao>
                        <IdentificadorEstacaoMeteo>A001</IdentificadorEstacaoMeteo>
                        <DataHoraMedicao>14/10/2020 12:00:00</DataHoraMedicao>
                        <ValorMedicao>5</ValorMedicao>
                        <StatusMedicao>CD</StatusMedicao>
                        <FuroTemporal>N</FuroTemporal>
                        <Estimado>N</Estimado>
                    </Precipitacao>
                    <Precipitacao>
                        <IdentificadorEstacaoMeteo>A001</IdentificadorEstacaoMeteo>
                        <DataHoraMedicao>15/10/2020 12:00:00</DataHoraMedicao>
                        <ValorMedicao>0</ValorMedicao>
                        <StatusMedicao>CD</StatusMedicao>
                        <FuroTemporal>N</FuroTemporal>
                        <Estimado>N</Estimado>
                    </Precipitacao>
                    <Precipitacao>
                        <IdentificadorEstacaoMeteo>A001</IdentificadorEstacaoMeteo>
                        <DataHoraMedicao>16/10/2020 12:00:00</DataHoraMedicao>
                        <ValorMedicao>0</ValorMedicao>
                        <StatusMedicao>CD</StatusMedicao>
                        <FuroTemporal>N</FuroTemporal>
                        <Estimado>N</Estimado>
                    </Precipitacao>
                </Resultados>
            </PreciptacaoObservadaResult>
        </PreciptacaoObservadaResponse>
    </soap:Body>
</soap:Envelope>
  • No labels