-
Notifications
You must be signed in to change notification settings - Fork 1
Notebook: Unit conversion
/notebooks/02_unit-conversion.ipynb
/notebooks/01_unit-conversion.py
CAMS air pollution foreacst data is provided in two different units:
- single-level pollutants (
$PM_{2.5}$ ,$PM_{10}$ ) are saved as mass concentrations (MC) in$kg\ m^{-3}$ - multi-level pollutants (
$O_3$ ,$NO_2$ and$SO_2$ ) are saved as mass mixing ratios (MMR) in kg of gas per kg of air
Air quality observations are mostly reported as mass concentrations, so we need to convert MMR to mass concentrations and check the results.
For the conversion, we can use equation from https://forum.ecmwf.int/t/convert-mass-mixing-ratio-mmr-to-mass-concentration-or-to-volume-mixing-ratio-vmr/1253 :
or
where
Air density is not directly available from the CAMS forecast, but we can get the pressure (p) and temperature (T) to calculate the density of the lowest model level. Temperature is available on model levels, pressure can be calculated from the surface pressure following these instruction:
The model half-level pressure (
where
The pressure on model levels (
We can therefore calculate the pressure on model level 137 as the mean value between the half levels 137 and 136 using this table for the coefficients a and b:
Multiplying the MMR with the calculated density should give us mass concentrations in
- test results are from one random day of forecast data (30-05-12 to 31-05-12), so 8 time steps for each city
- PM2.5 and PM10 (data from single layer already reported as mass concentrations) are identical to reference data -> correct variables and bilinear interpolation!
- O3 and NO2 (data from multi layer reported as MMR) are close to first order, but differences of up to +/- 2 microgram
- O3 and NO2 show deviations for all cities
- no systematic offset visible, rather normally distributed around 0
- deviations up to 2% of the reference value
- no clear geographical clustering
- 10 cities with largest diff are named -> related to surface elevation?
- e.g largest diff for high-altitude capital Bogota
- the same cities show up as outliers when the notebook is run with forecast for different days
- time series for TOP 5 cities with highest deviations
- time series show systematic offsets per location, no wiggling around the reference value
- temporal changes for each city visible
- single-level pollutants PM2.5 and PM10 are implemented correctly
- multi-level pollutants O3 and NO2 unit conversion is correct to first order
- local differences of up to 2% between our and the reference data seem to be higher in high elevation/low air density regions
Getting Started and Overview
- Product Description
- Roles and Responsibilities
- User Roles and Goals
- Architectural Design
- Iterations
- Decision Records
- Summary Page Explanation
- Deployment Guide
- Working Practices
- Q&A
Investigations and Notebooks
- CAMs Schema
- Exploratory Notebooks
- Forecast ETL Process
- In Situ air pollution data sources
- Notebook: OpenAQ data overview
- Notebook: Unit conversion
- Data Archive Considerations
Manual Test Charters
- Charter 1 (Comparing ECMWF forecast to database values)
- Charter 2 (Backend performance)
- Charter 3 (Forecast range implementation)
- Charter 4 (In situ bad data)
- Charter 5 (Filtering ppm units)
- Charter 7 (Forecast API input validation)
- Charter 8 (Forecast API database sizes)
- Charter 9 (Measurements summary API input validation)
- Charter 10 (Seeding bad data)
- Charter 11 ()Measurements API input validation
- Charter 12 (Validating echart plot accuracy)
- Charter 13 (Explore UI after data outage)
- Charter 14 (City page address)
- Charter 15 (BugFix diff 0 calculation)
- Charter 16 (City page chart data mocking)
- Charter 17 (Summary table logic)
- Charter 18 (AQI chart colour banding)
- Charter 19 (City page screen sizes)
- Charter 20 (Date picker)
- Charter 21 (Graph consistency)
- Charter 22 (High measurement values)
- Charter 23 (ppm -> µg m³)
- Charter 24 (Textures API input validation)
- Charter 25 (Graph line colours)
- Charter 26 (Fill in gaps in forecast)
- Charter 27 (Graph behaviour with mock data)
- Charter 28 (Summary table accuracy)
- Re‐execute: Charter 28
- Charter 29 (Fill in gaps in situ)
- Charter 30 (Forecast window)
- Charter 31 (UI screen sizes)