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.
- The weather forecast data by city are available according to this hierarchy :
https://dd.weather.gc.ca/citypage_weather/xml/{XX}
where XX is a 2 letter provincial or territorial code indicating the area covered by the forecasts.
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)
- The high elevation forecasts, for seasonal text bulletin forecasts issued only for British Columbia, are available at the following address :
https://dd.weather.gc.ca/citypage_weather/xml/HEF
File name nomenclature
NOTE: ALL HOURS ARE IN UTC.
The file names have the following nomenclature :
SiteNameCode_L.xml
where:
- SiteNameCode: code corresponding to the site codes used in the city site list
- L: single letter indicating the language of the file. Can be either: f (French) or e (English)
Examples of filenames :
- s0000001_e.xml - English citypage weather XML for Athabasca.
- s0000001_f.xml - French citypage weather XML for Athabasca.
A list with location names and SiteNameCodes is available in GeoJSON format.
Tags and XML schemas
-
A table describing each of the city page weather XML element tags and their associated attributes is available.
-
The XML schemas for citypage weather data are found in this directory :
https://dd.weather.gc.ca/citypage_weather/schema/
Icons of the XML product
-
City page weather XML files contain coded current conditions and forecast conditions. These codes are used to determine the icon displayed on the weather office web site's city pages. Tables describing the meteorological conditions for each code are available at:
-
These icons are covered by the standard Environment Canada Terms and Conditions: https://www.canada.ca/en/transparency/terms.html. To make a commercial usage of these icons, you must obtain prior explicit consent.
-
You can download all ECCC weather icons from the following URL: https://meteo.gc.ca/weathericons/NN.gif, where NN is a number between 00 and 48.
-
You can also create your own icons using WMO World Weather Symbols. See A complete set of WMO weather symbols in SVG with full metadata and fallback PNGs at this address: https://github.com/OGCMetOceanDWG/WorldWeatherSymbols
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.