This is an import module that allows importing data from the Canadian Ministry of Fisheries and Oceans. The data supplier's web address is https://www.dfo-mpo.gc.ca/index-eng.htm

Find here the identifiers (ID) of your stations of interest :https://api-iwls.dfo-mpo.gc.ca/api/v1/stations
The following variables are offered (depends per station)

  • wlo - Observed water level
  • wlf or wlf-spine - predicted water levels (at operational stations only)
  • wlp - Predicted water levels
  • wlp-hilo - High and low sea predictions (Tide tables)

Please note that this import needs to use flag convertion.  Flag convertion files should be in the region home/Config/FlagConversionsFiles folder.

Currently, the max requests per minute per IP is roughly 60, depending on the load balancing at the given time. This is in place to avoid overloading their system. To ensure that all data is imported, property key pauseForMillisecondsBetweenCalls can be used. If configured, FEWS will pause between two call to make sure it does not exceed the limit.

There is no need to enter a password.

Config example:

<?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>CanadaDFO</importType>
			<serverUrl>https://api-iwls.dfo-mpo.gc.ca/api/v1/stations/</serverUrl>
			<user>dummy_username</user>
			<password>dummy_password</password>
			<relativeViewPeriod unit="hour" start="-5" end="0" startOverrulable="true" endOverrulable="true"/>
			<idMapId>CanadaDFO</idMapId>
			<flagConversionsId>FlagConversion</flagConversionsId>
		</general>
		<properties>
			<int key="pauseForMillisecondsBetweenCalls" value="1000"></int>
		</properties>
		<timeSeriesSet>
			<moduleInstanceId>CanadaDFO</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>mean_sea_level</parameterId>
			<locationId>LocA</locationId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="nonequidistant"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
		<timeSeriesSet>
			<moduleInstanceId>CanadaDFO</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>waterlevel_model</parameterId>
			<locationId>LocB</locationId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="nonequidistant"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
	</import>
</timeSeriesImportRun> 



Id mapping example:

<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2009 sp1 (http://www.altova.com) by Environment Agency (Capgemini Uk Plc) -->
<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">

	<map externalLocation="5cebf1e23d0f4a073c4bc0f6" externalParameter="wlo" internalLocation="LocA" internalParameter="mean_sea_level"/>
	<map externalLocation="5cebf1dd3d0f4a073c4bb8ed" externalParameter="wlp" internalLocation="LocB" internalParameter="waterlevel_model"/>

</idMap>



Flag conversion example:

<?xml version="1.0" encoding="UTF-8"?>
<!-- édité avec XMLSpy v2017 rel. 3 (http://www.altova.com) par Dominic Roussel (MIN. DU DEV. DURABLE, DE L'ENV) -->
<flagConversions 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/flagConversions.xsd">
	<!--
FEWS flag options:
0 (original/reliable) - black numbers/grey background
1 (corrected/reliable) - blue numbers/grey background
2 (completed/reliable) - pink numbers/grey background
3 (original/doubtful) - black numbers/yellowish background
4 (corrected/doubtful) - blue numbers/yellowish background
5 (completed/doubtful) - pink numbers/yellowish background
6 (original/unreliable) - black numbers/yellow background
7 (corrected/unreliable) - blue numbers/yellow background
8 (completed/unreliable) - pink numbers/yellow background
9 missing
-->
	<flagConversion>
		<inputFlag>
			<name>Correct</name>
			<value>1</value>
		</inputFlag>
		<outputFlag>
			<value>0</value>
		</outputFlag>
	</flagConversion>
	<flagConversion>
		<inputFlag>
			<name>Douteux</name>
			<value>2</value>
		</inputFlag>
		<outputFlag>
			<value>3</value>
		</outputFlag>
	</flagConversion>
	<flagConversion>
		<inputFlag>
			<name>Estime</name>
			<value>3</value>
		</inputFlag>
		<outputFlag>
			<value>2</value>
		</outputFlag>
	</flagConversion>
	<flagConversion>
		<inputFlag>
			<name>Incomplet</name>
			<value>4</value>
		</inputFlag>
		<outputFlag>
			<value>6</value>
		</outputFlag>
	</flagConversion>
	<flagConversion>
		<inputFlag>
			<name>Force</name>
			<value>5</value>
		</inputFlag>
		<outputFlag>
			<value>2</value>
		</outputFlag>
	</flagConversion>
	<flagConversion>
		<inputFlag>
			<name>Cumule</name>
			<value>6</value>
		</inputFlag>
		<outputFlag>
			<value>6</value>
		</outputFlag>
	</flagConversion>
	<flagConversion>
		<inputFlag>
			<name>Trace</name>
			<value>7</value>
		</inputFlag>
		<outputFlag>
			<value>6</value>
		</outputFlag>
	</flagConversion>
	<flagConversion>
		<inputFlag>
			<name>Inconnu</name>
			<value>8</value>
		</inputFlag>
		<outputFlag>
			<value>6</value>
		</outputFlag>
	</flagConversion>
	<flagConversion>
		<inputFlag>
			<name>Missing</name>
			<value>-999</value>
		</inputFlag>
		<outputFlag>
			<value>9</value>
		</outputFlag>
	</flagConversion>
	<defaultOuputFlag>
		<value>0</value>
	</defaultOuputFlag>
	<missingValueFlag>
		<value>9</value>
	</missingValueFlag>
</flagConversions>

  • No labels