Skip to content

Forecast Data API Details

Benjamin Ell-Jones edited this page Oct 8, 2024 · 4 revisions

The API to retrieve Global Forecast data can be found here: https://ads.atmosphere.copernicus.eu/how-to-api

API Request Parameters

Variable

These are split into Single Level, Multi level and Slow access categories. We’ll need to get clarification that what we are using is correct (i.e. do we require multi level data meaning different pressure/atmosphere height levels). Until then we are assuming that single level is fine and using the following options:

  • Particulate matter d < 2.5 µm (PM2.5)

  • Particulate matter d < 10 µm (PM10)

  • Total column sulphur dioxide

  • Total column nitrogen dioxide

  • Total column ozone

Using only the Single Level category means we are not required to supply a pressure level or a model level.

Date

The date supplied will always be todays date - 1 day as we always want to query 5 days ahead and this is the maximum date value permitted in this field.

Time

We will use 00:00 unless told otherwise.

Leadtime hour

Each of these refers to a time in hours ahead of the selected Date. To retrieve 5 days worth we will need 5 values in an array:

[ 24, 48, 72, 96, 120]

Format

The response format specified is GRIB. This is a file that will contain the response data.

Sample Python Code for above

import cdsapi

c = cdsapi.Client()

c.retrieve(
    'cams-global-atmospheric-composition-forecasts',
    {
        'date': '2024-04-18/2024-04-18',
        'type': 'forecast',
        'format': 'grib',
        'variable': [
            'particulate_matter_10um', 'particulate_matter_2.5um', 'total_column_nitrogen_dioxide',
            'total_column_ozone', 'total_column_sulphur_dioxide',
        ],
        'time': '00:00',
        'leadtime_hour': [
            '24', '48', '72',
            '96', '120',
        ],
    },
    'download.grib')

Issues / Limitations

  • Response data is structured as a table with dimensions for latitude and longitude, with the corresponding values for each variable.
  • We would need to perform another step to associate these values with cities
  • In associating the results with a city, an algorithm needs to be thought of to derive the value for a city from many potentially numerous sources

vAirify Wiki

Home

Getting Started and Overview

Investigations and Notebooks

Testing

Manual Test Charters

Clone this wiki locally