LmwTimeSeriesServerParser.java

Overview

This import is available in DELFT-FEWS versions after 28-10-2009 (FEWS version 2009.02)

Since FEWS 2016.01 the import requires a client.truststore. The SSLv3 SIP server is no longer supported. The serverUrl should be set to the modern tls v1.2 sip server.

Imports time series data directly from the Dutch Water Authorities' data centre (Landelijk Meetnet Water). The FEWS LMW import function uses the SIP protocol to import the data directly from a remote database, it is therefore required to have an internet connection. In the FEWS import configuration file a username and password have to be entered, these can be requested from the LMW data centre directly and not through Deltares. Without an appropriat username/password combination it is not possible to import data. Currently the import only works on Windows computers as there is no LINUX library available to access the LMW database. Since FEWS 2017.01 the LMW import can be used on both Windows and Linux. 

Client truststore

Since FEWS 2017.01 the tls v1.2 SIP server of LMW has to be used. This server uses a so called PKI Overheid certificate for secure communication. To make this certificate known to FEWS, a so called client.truststore is required. Since FEWS 2017.02 it is reccomended to configure the truststore in the clientConfig.xml. For instruction see: How to configure secure https connection to Matroos

Configuration (Example)

A complete import module configuration consists of an ID Mapping file, a Flag Mapping file, a Unit Mapping file, and an Import Module Instance file. See the attached example configuration files.

ModuleConfigFiles

The following example of an Import Module Instance will import the time series as equidistant 10 minute series for timezone GMT+1 hour for a period of 24 hour before the current system time.

ImportLMW.xml
<import>
	<general>
		<importType>LMW</importType>
		<serverUrl>https://sip-lmw.rws.nl/</serverUrl>
		<user>dummy_username</user>
		<password>dummy_password</password>
		<relativeViewPeriod unit="hour" start="-24" end="1" startOverrulable="true" endOverrulable="true"/>
		<idMapId>IdImportLMW</idMapId>
		<unitConversionsId>ImportUnitConversions</unitConversionsId>
		<flagConversionsId>ImportMSWFlagConversions</flagConversionsId>
		<missingValue>-1000000000</missingValue>
		<missingValue>99999</missingValue>
		<importTimeZone>
			<timeZoneOffset>+01:00</timeZoneOffset>
		</importTimeZone>
		<dataFeedId>LMW</dataFeedId>
	</general>
	<timeSeriesSet>
		<moduleInstanceId>ImportLMW</moduleInstanceId>
		<valueType>scalar</valueType>
		<parameterId>H.meting</parameterId>
		<locationSetId>LMW_h</locationSetId>
		<timeSeriesType>external historical</timeSeriesType>
		<timeStep unit="minute" multiplier="10"/>
		<readWriteMode>add originals</readWriteMode>
		<synchLevel>1</synchLevel>
	</timeSeriesSet>
    ....
    <externUnit parameterId="H.meting" unit="cm"/>
    <externUnit parameterId="Q.meting" unit="0.01 m3/s"/>
 </import>

IDMapping

The ID Mapping configuration is very important because this is used by the import function to make requests to the LMW database. In this example two locations have been included, Almen (externalLocation="ALME") and Lobith (externalLocation="LOBI"). Both these locations have an external parameter "H10", imported in FEWS as "H.m" waterlevels. Both these series are observations and need therefore a qualifier "WN". A complete list of the location and parameter ID's of all series can be requested from LMW.

IdImportLMW.xml
<!--Observed water levels Rhine-->
<map internalParameter="H.m" internalLocation="H-RN-ALME" externalParameter="H10" externalLocation="ALME" externalParameterQualifier="WN"/>
<map internalParameter="H.m" internalLocation="H-RN-0001" externalParameter="H10" externalLocation="LOBI" externalParameterQualifier="WN"/>

FlagConversion

The LMW database has a data quality flags for each value in the database, a complete list of quality flags can be requested from LMW.

UnitConversion

Important in the above configuration is that a unitconversion is forced to convert the waterlevels from cm to m NAP. In LMW all water levels are stored in cm.

Some Issues

  • Most parameters will be observation data, but some, like the astronomic tide or forecast data, are predictions. If the data are not observation data, you must use the qualifier to the parameter to indicate the SIP command to be used.
    • For observation data the external qualifier is "WN"
    • For forecast data the external qualifier is "VW"
    • For astronomical data the external qualifier is "AS"
  • The data in the LMW database cover a period of one month only and the data are retrieved per day.


The JAVA source code from the LMW parser can be found here

  • No labels