Versions Compared

Key

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

Imports XML data that follows the xmlns="http://dms.ec.gc.ca/schema/point-observation/2.1"  shema.

Example:

...

languagexml
linenumberstrue
collapsetrue

...

Files can be found in this directory: http://

...

dd.

...

meteo.gc.ca/

...

observations/xml/


 

Overview:

 

The first set of data (member) contains information that is not specific to one location,  it is not imported.

 

Data concerning record temperatures, record rain, record snow, since when temperature and precipitation data is available, present weather and tendency characteristic are ignored. (Thus fields that do not contain data measured at sampling time).

 

Measurements with no "value" are ignored.

 

Wind direction is calculated from code to degrees. For location ID climate station number is used.


Example:

Code Block
languagexml
linenumberstrue
collapsetrue
om:ObservationCollection xmlns:om="http://www.opengis.net/om/1.0" xmlns="http://dms.ec.gc.ca/schema/point-observation/2.1" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <om:member>
      <om:Observation>
         <om:metadata>
            <set>
               <general>
                  <author build="build.4083" name="MSC-DMS-PG-WXO-Summary" version="3.1"/>
                  <dataset name="mscobservation/atmospheric/surface_weather/wxo_dd_today_summary-1.0-ascii/"/>
                  <phase name="product-wxo_xml-1.0/"/>
                  <id xlink:href="/data/msc/observation/atmospheric/surface_weather/wxo_dd_today_summary-1.0-ascii/product-wxo_xml-1.0/20181012234500000/sk/intermediate/fr"/>
                  <parent xlink:href="/data/msc/observation/atmospheric/surface_weather/wxo_dd_today_summary-1.0-ascii/product-wxo_xml-1.0/20181012234500000/sk/intermediate/fr"/>
               </general>
               <identification-elements>
                  <element name="province" uom="unitless" value="SK"/>
                  <element name="creation_date_utc" uom="unitless" value="2018-10-12T23:50:00.000Z"/>
                  <element name="observation_date_utc" uom="unitless" value="2018-10-12T23:45:00.000Z"/>
                  <element name="license" uom="unitless" value="http://dd.weatheroffice.ec.gc.ca/doc/LICENCE_GENERAL.txt"/>
                  <element name="language" uom="unitless" value="FR"/>
               </identification-elements>
            </set>
         </om:metadata>
         <om:samplingTime>
            <gml:TimeInstant>
               <gml:timePosition>2018-10-12T23:00:00.000Z</gml:timePosition>
            </gml:TimeInstant>
         </om:samplingTime>
         <om:resultTime>
            <gml:TimeInstant>
               <gml:timePosition>2018-10-12T23:00:00.000Z</gml:timePosition>
            </gml:TimeInstant>
         </om:resultTime>
         <om:procedure xlink:href="msc/observation/atmospheric/surface_weather/wxo_dd_today_summary-1.0-ascii/product-wxo_xml-1.0/20181012234500000/sk/intermediate/fr"/>
         <om:observedProperty gml:remoteSchema="/schema/point-observation/2.0.xsd"/>
         <om:featureOfInterest>
            <gml:FeatureCollection>
               <gml:location>
                  <gml:Point>
       point-observation/2.1" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <om:member>
      <om:Observation>
         <om:metadata>
     <gml:pos/>
                <set>  </gml:Point>
               <general></gml:location>
            </gml:FeatureCollection>
      <author build="build.4083" name="MSC-DMS-PG-WXO-Summary" version="3.1"/>   </om:featureOfInterest>
         <om:result>
           <dataset name="mscobservation/atmospheric/surface_weather/wxo_dd_today_summary-1.0-ascii/"/> <elements>
               <element name="hot_spot_location_canada"  <phase name="product-wxo_xml-1.0/"/uom="unitless" value="Rolling Hills">
                  <id<qualifier xlink:hrefname="/data/msc/observation/atmospheric/surface_weather/wxo_dd_today_summary-1.0-ascii/product-wxo_xml-1.0/20181012234500000/sk/intermediate/frhot_spot_temperature_canada" uom="Celsius" value="20.0"/>
                  <parent<qualifier xlink:href="/data/msc/observation/atmospheric/surface_weather/wxo_dd_today_summary-1.0-ascii/product-wxo_xml-1.0/20181012234500000/sk/intermediate/fr"/>
               </general>name="province" uom="AB" value="unitless"/>
               <identification-elements>
   </element>
               <element name="provincecold_spot_location_canada" uom="unitless" value="SKEureka"/>
                  <element<qualifier name="creationcold_spot_datetemperature_utccanada" uom="unitlessCelsius" value="2018-10-12T23:50:00.000Z-21.8"/>
                  <element<qualifier name="observation_date_utcprovince" uom="unitlessNU" value="2018-10-12T23:45:00.000Z"/>
   "unitless"/>
               </element>
               <element name="licensehot_spot_location_province" uom="unitless" value="http://dd.weatheroffice.ec.gc.ca/doc/LICENCE_GENERAL.txt"/Maple Creek">
                  <element<qualifier name="languagehot_spot_temperature_province" uom="unitlessCelsius" value="FR18.4"/>
               </identification-elements>
               </set>element>
         </om:metadata>
      <element name="cold_spot_location_province"  <om:samplingTime>uom="unitless" value="Broadview">
            <gml:TimeInstant>
      <qualifier name="cold_spot_temperature_province"        <gml:timePosition>2018-10-12T23:00:00.000Z</gml:timePosition>
      uom="Celsius" value="-8.9"/>
      </gml:TimeInstant>
         </om:samplingTime>element>
         <om:resultTime>
   </elements>
         <gml</om:TimeInstant>result>
      </om:Observation>
         <gml:timePosition>2018-10-12T23:00:00.000Z</gml:timePosition></om:member>
   <om:member>
         </gml:TimeInstant><om:Observation>
         </om<om:resultTime>metadata>
          <om:procedure xlink:href="msc/observation/atmospheric/surface_weather/wxo_dd_today_summary-1.0-ascii/product-wxo_xml-1.0/20181012234500000/sk/intermediate/fr"/>  <set>
         <om:observedProperty gml:remoteSchema="/schema/point-observation/2.0.xsd"/>      <general>
         <om:featureOfInterest>
         <author build="build.4083"  <gml:FeatureCollection>
name="MSC-DMS-PG-WXO-Summary" version="3.1"/>
                   <gml:location>
<dataset name="mscobservation/atmospheric/surface_weather/wxo_dd_today_summary-1.0-ascii/"/>
                   <gml:Point><phase name="product-wxo_xml-1.0/"/>
                     <gml:pos<id xlink:href="/data/msc/observation/atmospheric/surface_weather/wxo_dd_today_summary-1.0-ascii/product-wxo_xml-1.0/20181012234500000/sk/intermediate/fr"/>
                   </gml:Point>
               </gml:location>
<parent xlink:href="/data/msc/observation/atmospheric/surface_weather/wxo_dd_today_summary-1.0-ascii/product-wxo_xml-1.0/20181012234500000/sk/intermediate/fr"/>
               </gml:FeatureCollection>
general>
               </om:featureOfInterest><identification-elements>
         <om:result>
         <element name="station_name" uom="unitless"  <elements>
value="Aéroport d'Assiniboia"/>
                  <element name="hot_spot_location_canadalatitude" uom="unitlessdegree" value="Rolling Hills"49.729192"/>
                  <qualifier<element name="hot_spot_temperature_canadalongitude" uom="Celsiusdegree" value="20-105.0946114"/>
                  <qualifier<element name="provincetransport_canada_id" uom="ABunitless" value="unitlessWJI"/>
               </element>
               <element name="coldobservation_spotdate_location_canadautc" uom="unitless" value="Eureka"2018-10-12T23:45:00.000Z"/>
                  <qualifier<element name="coldobservation_spotdate_temperaturelocal_canadatime" uom="Celsiusunitless" value="-21.82018-10-12T17:45:00.000 CST"/>
                  <qualifier<element name="provinceclimate_station_number" uom="NUunitless" value="unitless4020286"/>
               </element>
               <element name="hotwmo_spotstation_location_provincenumber" uom="unitless" value="Maple Creek71487"/>
                  <qualifier name="hot_spot_temperature_province" uom="Celsius" value="18.4"/>
  </identification-elements>
             </element>set>
         </om:metadata>
      <element name="cold_spot_location_province" uom="unitless" value="Broadview"> <om:samplingTime>
            <gml:TimeInstant>
      <qualifier name="cold_spot_temperature_province" uom="Celsius" value="-8.9"/>
         <gml:timePosition>2018-10-12T23:00:00.000Z</gml:timePosition>
            </gml:TimeInstant>
         </element>om:samplingTime>
         <om:resultTime>
   </elements>
         </om<gml:result>TimeInstant>
       </om:Observation>        <gml:timePosition>2018-10-12T23:00:00.000Z</gml:timePosition>
   </om:member>
   <om:member>
      <om</gml:Observation>TimeInstant>
         <om</om:metadata>resultTime>
            <set><om:procedure xlink:href="msc/observation/atmospheric/surface_weather/wxo_dd_today_summary-1.0-ascii/product-wxo_xml-1.0/20181012234500000/sk/intermediate/fr"/>
               <general><om:observedProperty gml:remoteSchema="/schema/point-observation/2.0.xsd"/>
         <om:featureOfInterest>
         <author build="build.4083" name="MSC-DMS-PG-WXO-Summary" version="3.1"/> <gml:FeatureCollection>
                  <dataset name="mscobservation/atmospheric/surface_weather/wxo_dd_today_summary-1.0-ascii/"/>
<gml:location>
                  <gml:Point>
 <phase name="product-wxo_xml-1.0/"/>
                  <id xlink:href="/data/msc/observation/atmospheric/surface_weather/wxo_dd_today_summary-1.0-ascii/product-wxo_xml-1.0/20181012234500000/sk/intermediate/fr"/>
    <gml:pos>49.729192 -105.946114</gml:pos>
                  </gml:Point>
              <parent xlink:href="/data/msc/observation/atmospheric/surface_weather/wxo_dd_today_summary-1.0-ascii/product-wxo_xml-1.0/20181012234500000/sk/intermediate/fr"/>
</gml:location>
            </gml:FeatureCollection>
         </general>
om:featureOfInterest>
         <om:result>
         <identification-elements>
   <elements>
               <element name="station_nameair_temperature_today_high" uom="unitlessCelsius" value="Aéroport d'Assiniboia11.9"/>
                  <element name="latitudeair_temperature_today_low" uom="degreeCelsius" value="49-5.7291925"/>
                  <element name="longitudewind_gust_speed" uom="degreekm/h" value="-105.946114"/>
                  <element name="transportwind_canada_iddirection" uom="unitlesscode" value="WJIWSW"/>
                  <element name="observationrecord_datehigh_utctemperature" uom="unitlessCelsius" value="2018-10-12T23:45:00.000Z"/17.4">
                  <element<qualifier name="observationrecord_datehigh_localtemperature_timeyear" uom="unitless" value="2018-10-12T17:45:00.000 CST"/>
   2012"/>
               </element>
               <element name="climaterecord_stationlow_numbertemperature" uom="unitlessCelsius" value="4020286-9.2"/>
                  <element<qualifier name="wmorecord_low_stationtemperature_numberyear" uom="unitless" value="714872006"/>
               </identification-elements>element>
               <element name="record_rain_amount" uom="mm" value="6.8">
            </set>
      <qualifier name="record_rain_year"  </om:metadata>uom="unitless" value="1997"/>
         <om:samplingTime>
      </element>
      <gml:TimeInstant>
         <element name="record_snow_amount"     <gml:timePosition>2018-10-12T23:00:00.000Z</gml:timePosition>uom="cm" value="0.0">
            </gml:TimeInstant>
      <qualifier name="record_snow_year"  </om:samplingTime>uom="unitless" value="1996"/>
         <om:resultTime>
            <gml:TimeInstant>
    </element>
           <gml:timePosition>2018-10-12T23:00:00.000Z</gml:timePosition>
         <element name="temperature_data_since_year"  </gml:TimeInstant>uom="unitless" value="1993"/>
         </om:resultTime>
         <om:procedure xlink:href="msc/observation/atmospheric/surface_weather/wxo_dd_today_summary-1.0-ascii/product-wxo_xml-1.0/20181012234500000/sk/intermediate/fr<element name="precipitation_data_since_year" uom="unitless" value="1993"/>
           <om:observedProperty gml:remoteSchema="/schema/point-observation/2.0.xsd"/>
    </elements>
         </om:result>
      <om</om:featureOfInterest>Observation>
   </om:member>
<om:member>
   <om:Observation>
      <gml<om:FeatureCollection>metadata>
         <set>
      <gml:location>
      <general>
            <gml:Point>
   <author build="build.4083" name="MSC-DMS-PG-WXO-Summary" version="3.1"/>
               <gml:pos>49.729192 -105.946114</gml:pos><dataset name="mscobservation/atmospheric/surface_weather/wxo_dd_hour_summary-1.0-ascii/"/>
                  </gml:Point>
<phase name="product-wxo_xml-1.0/"/>
                </gml:location>
            </gml:FeatureCollection>
  <id xlink:href="/data/msc/observation/atmospheric/surface_weather/wxo_dd_hour_summary-1.0-ascii/product-wxo_xml-1.0/20180921014500000/ns/intermediate/en"/>
       </om:featureOfInterest>
        <parent <om:result>xlink:href="/data/msc/observation/atmospheric/surface_weather/wxo_dd_hour_summary-1.0-ascii/product-wxo_xml-1.0/20180921014500000/ns/intermediate/en"/>
            <elements></general>
               <element name="air_temperature_today_high" uom="Celsius" value="11.9"/><identification-elements>
               <element name="air_temperature_today_lowstation_name" uom="Celsiusunitless" value="-5.5Bedford Range"/>
               <element name="wind_gust_speedlatitude" uom="km/hdegree" value="44.745858"/>
               <element name="wind_directionlongitude" uom="codedegree" value="WSW-63.661689"/>
               <element name="recordtransport_highcanada_temperatureid" uom="Celsiusunitless" value="17.4ABR"/>
                  <qualifier<element name="recordobservation_highdate_temperature_yearutc" uom="unitless" value="20122018-09-21T01:30:00.000Z"/>
               </element>
               <element name="recordobservation_date_lowlocal_temperaturetime" uom="Celsiusunitless" value="-9.2"2018-09-20T22:30:00.000 ADT"/>
                <element  <qualifier name="recordclimate_lowstation_temperature_yearnumber" uom="unitless" value="20068200574"/>
               </element>
               <element name="recordwmo_rainstation_amountnumber" uom="mmunitless" value="6.871325"/>
                  <qualifier name="record_rain_year" uom="unitless" value="1997"/> </identification-elements>
         </set>
      </element>om:metadata>
      <om:samplingTime>
         <element name="record_snow_amount" uom="cm" value="0.0">
<gml:TimeInstant>
            <gml:timePosition>2018-09-21T01:00:00.000Z</gml:timePosition>
         <qualifier name="record_snow_year" uom="unitless" value="1996"/></gml:TimeInstant>
      </om:samplingTime>
      <om:resultTime>
         </element><gml:TimeInstant>
            <gml:timePosition>2018-09-21T01:00:00.000Z</gml:timePosition>
     <element name="temperature_data_since_year" uom="unitless" value="1993"/>    </gml:TimeInstant>
      </om:resultTime>
         <element name="precipitation_data_since_year" uom="unitless" value="1993"/>
   <om:procedure xlink:href="msc/observation/atmospheric/surface_weather/wxo_dd_hour_summary-1.0-ascii/product-wxo_xml-1.0/20180921014500000/ns/intermediate/en"/>
      <om:observedProperty gml:remoteSchema="/schema/point-observation/2.0.xsd"/>
      <om:featureOfInterest>
         </elements><gml:FeatureCollection>
         </om:result>
   <gml:location>
       </om:Observation>
     </om:member>
<om:member>
   <om<gml:Observation>Point>
      <om:metadata>
           <set>
 <gml:pos>44.745858 -63.661689</gml:pos>
          <general>
     </gml:Point>
          <author build="build.4083" name="MSC-DMS-PG-WXO-Summary" version="3.1"/> </gml:location>
         </gml:FeatureCollection>
      <dataset name="mscobservation/atmospheric/surface_weather/wxo_dd_hour_summary-1.0-ascii/"/></om:featureOfInterest>
      <om:result>
         <phase name="product-wxo_xml-1.0/"/><elements>
               <id xlink:href="/data/msc/observation/atmospheric/surface_weather/wxo_dd_hour_summary-1.0-ascii/product-wxo_xml-1.0/20180921014500000/ns/intermediate/en<element name="present_weather" uom="code" value="Partly Cloudy"/>
            <element name="mean_sea_level"  <parent xlink:href="/data/msc/observation/atmospheric/surface_weather/wxo_dd_hour_summary-1.0-ascii/product-wxo_xml-1.0/20180921014500000/ns/intermediate/enuom="kPa" value="102.6"/>
            <element name="tendency_amount"  </general>uom="kPa" value="0.20"/>
            <identification-elements>
   <element name="tendency_characteristic" uom="code" value="rising"/>
            <element name="stationhorizontal_namevisibility" uom="unitlesskm" value="Bedford Range24.1"/>
               <element name="latitudeair_temperature" uom="degreeCelsius" value="4410.7458587"/>
               <element name="longitudedew_point" uom="degreeCelsius" value="-638.6616897"/>
               <element name="transportrelative_canada_idhumidity" uom="unitlesspercent" value="ABR87"/>
               <element name="observationwind_date_utcspeed" uom="unitlesskm/h" value="2018-09-21T01:30:00.000Z6"/>
               <element name="observation_date_local_timewind_direction" uom="unitlesscode" value="2018-09-20T22:30:00.000 ADTNW"/>
  
             <element name="climatewind_stationgust_numberspeed" uom="unitlesskm/h" value="820057415"/>
               <element name="wmototal_stationcloud_numbercover" uom="unitlesscode" value="713255"/>
            </identification-elements>
         </set>
      </om:metadata>
      <om:samplingTime>
         <gml:TimeInstant>
   <element name="wind_chill"        <gml:timePosition>2018-09-21T01:00:00.000Z</gml:timePosition>uom="unitless" value=""/>
         </gml:TimeInstant>
   <element name="humidex"  </om:samplingTime>
      <om:resultTime>uom="unitless" value=""/>
         <gml:TimeInstant></elements>
      </om:result>
      <gml:timePosition>2018-09-21T01:00:00.000Z</gml:timePosition>
         </gml:TimeInstant>
      </om:resultTime>
      <om:procedure xlink:href="msc/observation/atmospheric/surface_weather/wxo_dd_hour_summary-1.0-ascii/product-wxo_xml-1.0/20180921014500000/ns/intermediate/en"/>
      <om:observedProperty gml:remoteSchema="/schema/point-observation/2.0.xsd"/>
      <om:featureOfInterest>
         <gml:FeatureCollection>
</om:Observation>
</om:member>
</om:ObservationCollection> 

Configuration example:

Code Block
languagexml
<?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"
                  <gml:location>xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd">
   <import>
            <gml:Point><general>
         <importType>CanadaMeteo</importType>
         <gml:pos>44.745858 -63.661689</gml:pos>
<serverUrl>http://dd.meteo.gc.ca/observations/xml</serverUrl>
         <user>user</user>
         <<password>password</gml:Point>
            </gml:location>
password>
		 <!-- Time period has to be configured for the importer to work -->
         <relativeViewPeriod unit="hour"  </gml:FeatureCollection>start="-5" end="0" startOverrulable="true" endOverrulable="true"/>
      </om:featureOfInterest>general>
      <om:result><properties>
         <elements>
            <element name="present_weather" uom="code" value="Partly Cloudy"/<!--Optional configuration field. Value is a comma separated string of the region folder to be included.-->
         <!--If it is not configured, data will be fetched from all folders for the <element name="mean_sea_level" uom="kPa" value="102.6"/specified time. Case sensitive.-->
         <!--Possible choices: AB, BC, MB, NB, <element name="tendency_amount" uom="kPa" value="0.20"/>
    NL, NS, NT, NU, ON, PE, QC, SK, YT-->
        <element name="tendency_characteristic" uom <string key="codeRegionDirectory" value="risingAB, BC"/>
         <!--Optional configuration field. Value is a <element name="horizontal_visibility" uom="km" value="24.1"/>
      comma separated string of the time folders to be included.-->
      <element name="air_temperature" uom="Celsius" value="10.7"/>
            <element name="dew_point" uom="Celsius" value="8.7"/>
   <!--If it is not configured, data will be fetched from all folders for the specified time.-->
          <element name="relative_humidity" uom="percent" value="87"/<!--Possible choices: "hourly", "today", "yesterday"-->
         <string   <element namekey="wind_speedTimeDirectory" uomvalue="km/h" value="6hourly, today"/>
            <element name="wind_direction" uom="code" value="NW"/></properties>
      <timeSeriesSet>
      <element name="wind_gust_speed" uom="km/h" value="15"/> <moduleInstanceId>CanadaMeteo</moduleInstanceId>
         <valueType>scalar</valueType>
   <element name="total_cloud_cover" uom="code" value="5"/>
     <parameterId>mean_sea_level</parameterId>
       <element name="wind_chill" uom="unitless" value=""/>
 <locationId>3025481</locationId>
         <timeSeriesType>external historical</timeSeriesType>
       <element name="humidex" uom="unitless" value <timeStep unit="nonequidistant"/>
         <readWriteMode>add <originals</elements>readWriteMode>
      </om:result>
   </om:Observation>
</om:member>
</om:ObservationCollection> 

Overview:

The first set of data (member) contains information that is not specific to one location,  it is not imported.

Data concerning record temperatures, record rain, record snow, since when temperature and precipitation data is available, present weather and tendency characteristic are ignored. (Thus fields that do not contain data measured at sampling time).

Measurements with no "value" are ignored.

Sampling Time is used for the time of the time series. data with missing value is ignored. If no dateTime format is defined, the standard is  "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" GMT.

timeSeriesSet>
   </import>
</timeSeriesImportRun> 

If region directory is configured, special attention should be payed to make sure that the wanted locations are found in the directory specified. 

If data is not available for the chosen times, en empty time series set is returned.

It is practical to configure either a short time period, or other restrictions to prevent running out of local memory.

 

The importer should be registered in FEWS  Config/RegionConfigFiles/ModuleInstanceDescriptors.xml. Locations of the wanted time series should be registered in Config/RegionConfigFiles/Locations.xml.  Parameters (such as mean sea level) should be registered in  Config/RegionConfigFiles/Parameter.xml.

 Wind direction is calculated from code to degrees. For location ID climate station number is used.