NCM Logo

Weather Station Data

Station Observations

The NCM Weather API provides a wide selection of weather station data around the globe. This also includes buoy measurement data.
In order to query data from weather stations, the source has to be set to mix-obs.

api-mm.ncm.gov.sa/validdatetime/parameters/station_id/format?source=mix-obs&optionals
 

Weather Station Identifiers

There are two possibilities to specify the desired station_id. Either coordinates or specific NCM station codes can be used. If you choose coordinates, the data from the nearest station is retrieved. You can also combine multiple stations from the same or different origin with each other using the + sign. Some station query examples can be found below in the Example queries section.
Identifier Description Example
Station ID id_<sation_id> id_164 is the Al Dariyah station in Riyadh
 

Find Station

It is possible to get a list of available weather stations from which you can select the desired station identifiers. Several conditions can be specified in order to filter the list of stations. The output is a sorted list of stations matching the specified conditions. The output format is CSV.

api-mm.ncm.gov.sa/find_station?<conditions>
Available conditions:
Identifier Description Example
location Coordinates: location=<lat>,<lon>, or bounding box location=<lat_max>,<lon_min>_<lat_min>,<lon_max> location=47.3,9.3, location=47.3,9.3_40,10, location=germany
elevation in meters ASL: elevation=<elevation> elevation=2500
parameters specify all parameters of interest: parameters=<comma separated parameter list> parameters=t_2m:C,wind_speed_10m:ms
startdate find all stations that record data at least since this date: startdate=<iso timestamp> startdate=2017-10-01T00Z (find all stations that are active since this date or before)
enddate find all stations that record data at least until this date: enddate=<iso timestamp> enddate=2017-11-01T00Z (find all stations that are active until this date or later)
Examples Response example:
Station Category;Station Type;ID Hash;WMO ID;Alternative IDs;Name;Location Lat,Lon;Elevation;Start Date;End Date;Horizontal Distance;Vertical Distance;Effective Distance
SYNOP;SYNA;21627491;;345;Raqei -  Border Guard;29.0667,46.6272;290m;2023-12-13T09:23:00Z;2025-03-22T10:58:00Z;-999;-999;-999
SYNOP;SYNA;22914726;;48;Wadi Alfora;23.4246,39.7118;699m;2023-12-11T15:40:00Z;2025-06-23T06:24:00Z;-999;-999;-999
SYNOP;SYNA;74084147;;36;Mataar Municipality;21.5994,39.2544;21m;2023-12-11T15:40:00Z;2025-06-23T06:24:00Z;-999;-999;-999
SYNOP;SYNA;78979023;;244;Tabuk AirPort;28.3731,36.6006;767.11m;2023-12-11T15:40:00Z;2025-06-23T06:27:00Z;-999;-999;-999
SYNOP;SYNA;83134259;;328;Alwoul;23.3087,46.471;662m;2024-02-13T11:26:00Z;2025-06-23T06:24:00Z;-999;-999;-999
SYNOP;SYNA;85066812;;99;Wadi Ben Hishbl;18.604,42.6677;2012m;2023-12-11T15:40:00Z;2025-06-23T06:24:00Z;-999;-999;-999
SYNOP;SYNA;96830676;;195;Al Neriah;27.4553,48.4712;70m;2023-12-11T15:40:00Z;2025-06-23T06:24:00Z;-999;-999;-999
SYNOP;SYNA;101055195;;155;Al Namas;19.1699,42.2335;2181m;2023-12-11T15:40:00Z;2025-06-23T06:24:00Z;-999;-999;-999
    ...
Alternative IDs corresponds to the NCM Station IDs.  

Missing Data/Data Gaps

It is possible to specify the treatment of missing station values. Therefore, the option on_invalid has to be added to the query.
Identifier Description
fail Send an error message as soon as data is missing (default)
fill_with_invalid Replace invalid and missing data by -999.
Example

Available weather station parameters

The weather parameters that can be queried, depend on the parameters that are recorded at the desired weather station. For a general overview of available weather station parameters, please see: available weather station parameters.

Example queries

Stations across an area

By using a GetFeature-Request, it is possible to query station data within a specified bounding box. The request is constructed as follows:

https://api-mm.ncm.gov.sa/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=<feature_type>&TIME=<validdatetime>&BBOX=<min_lon,min_lat,max_lon,max_lat>&PARAMETERS=<parameters>

Currently, only one station feature type is available: stations_mix-obs, which contains most of our combined observational data.

ParameterDescriptionExample
TIMEA single point in time (UTC) as specified in the section Date/Time Description. TIME always refers to validdatetime. The response depends on the feature type, see the examples below.TIME=2018-04-12T12:45Z
BBOXA bounding box specified by maximal and minimal latitude and longitude formatted according to BBOX=<min_lon,min_lat,max_lon,max_lat> (please note the order). The response will only contain features that are located within this area. If left unspecified, all available features will be returned.BBOX=5.8,47.9,10.7,45.7
PARAMETERSThe parameters that you wish to query formatted as a comma-separated list as specified here. The DescribeFeatureType contains all the relevant parameters provided by the station type. For technical reasons the name of the XML node will have the colons (:) replaced with an underscore (_), e.g. t_2m:C will end up as t_2m_C. For WFS purposes only you may also use this format in the queries.t_2m:C,dew_point_2m:C or t_2m_C,dew_point_2m_C

The response will be XML. More details on GetFeature-Requests can be found here.

Example