En français

ECCC logo

TOC > MSC data > Weather forecast files by city > Weather forecast files by city on MSC Datamart

Weather forecast data by city in XML format

This page describes the XML data of the weather forecasts by city available in the MSC Datamart.

The XML files are updated hourly at a minimum, but can be updated earlier with issue of special weather warnings, watches and amendments.

Data location

MSC Datamart data can be automatically retrieved with the Advanced Message Queuing Protocol (AMQP) as soon as they become available. An overview and examples to access and use the Meteorological Service of Canada's open data is also available.

The data is available via the HTTPS protocol. It is possible to access it with a standard browser. In this case, we obtain a list of links giving access to a XML file.

  • Weather forecast data by city, disseminated in dated files (single files) are available according to this hierarchy :

https://dd.weather.gc.ca/citypage_weather/{PROV}/{HH}

where:

* __PROV__ : Two letter provincial or territorial code indicating the area covered by the forecasts
* __HH__ : Hour (UTC) of forecast data emission

The code is one of the 13 following values :

* AB (Alberta)
* BC (British Columbia)
* MB (Manitoba)
* NB (New Brunswick)
* NL (Newfoundland and Labrador)
* NS (Nova Scotia)
* NT (Northwest Territories)
* NU (Nunavut)
* ON (Ontario)
* PE (Prince Edward Island)
* QC (Québec)
* SK (Saskatchewan)
* YT (Yukon)

Note: the HEF directory contains high elevation forecasts for seasonal forecast bulletins published only for British Columbia.

  • Weather forecast data by city, distributed in undated files (data overwritten with each update) are available at this address:

https://dd.weather.gc.ca/citypage_weather/xml/{PROV}

where:

* __PROV__ : Two letter provincial or territorial code indicating the area covered by the forecasts (see the list aboce)

Note: the HEF directory contains high elevation forecasts for seasonal forecast bulletins published only for British Columbia.

File name nomenclature

  • Dated, unique files:

{YYYYMMDD}T{HHmmss.sss}Z_MSC_CitypageWeather_{SiteCode}_{L}.xml

where :

* __SiteCode__ : City code (see below)
* __L__ : Letter indicating file language: fr (French) or en (English)

Examples of file names:

* 20240815T154059.89Z_MSC_CitypageWeather_s0000011_fr.xml
* 20240815T154059.89Z_MSC_CitypageWeather_s0000011_en.xml
  • Undated files, overwritten with each update:

{SiteCode}_{L}.xml

where :

* __SiteCode__ : City code (see below)
* __L__ : Letter indicating file language: f (French) or e (English)

Examples of file names:

* s0000011_e.xml 
* s0000011_f.xml

A list with location names and SiteNameCodes is available in GeoJSON format.

NOTE: Unique dated files should replace undated files within the next few months, in order to avoid any file corruption issues.

Tags and XML schemas

https://dd.weather.gc.ca/citypage_weather/schema/

Icons of the XML product

Support

If you have any questions about this data, please contact us.

Announcements from the dd_info mailing list

Announcements related to this dataset are available in the dd_info list.