Skip to content

Notebook: Unit conversion

Sebastian Steinig edited this page May 31, 2024 · 4 revisions

File names

  • /notebooks/02_unit-conversion.ipynb
  • /notebooks/01_unit-conversion.py

Motivation

CAMS air pollution foreacst data is provided in two different units:

  1. single-level pollutants ($PM_{2.5}$, $PM_{10}$) are saved as mass concentrations (MC) in $kg\ m^{-3}$
  2. 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.

Method

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 :

$$ MC = MMR \times \frac{p}{RT} $$

or

$$ MC = MMR \times \rho $$

where $p (Pa)$, $T (K)$ and $\rho (kg/m^3)$ are ambient pressure, temperature and density, and $R$ is the specific gas constant (for dry air 287.058 $\frac{J}{kgK}$).

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 ($p_{half}$), illustrated in Figure 2, is given by:

$$ p_{half} = a + b \times sp $$

where $sp \left( sp = e^{lnsp} \right)$ is the surface pressure (and $lnsp$ is its natural logarithm).

The pressure on model levels ($p_{ml}$) is given by the mean of the pressures on the model half levels immediately above and below:

$$ p_{ml} = \frac{(p_{half-above} + p_{half-below})}{2} $$

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:

image

Multiplying the MMR with the calculated density should give us mass concentrations in $kg\ m^{-3}$ and we can compare the results of this unit conversion with the those reported at https://myftp.ecmwf.int/files/public/cams/products/cams_global_forecast/surface_concentrations/ as a sanity check.

Results

Overall scatter

  • 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
image

City-level deviations

  • 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
image

Spatial distribution

  • 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
image image

City-level time series

  • 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
image

Conclusions

  • 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

vAirify Wiki

Home

Getting Started and Overview

Investigations and Notebooks

Testing

Manual Test Charters

Clone this wiki locally