Skip to content

ADC Toolbox: Comparing Atmospheric Composition Datasets

License

Notifications You must be signed in to change notification settings

stewartchrisecmwf/adc-toolbox

 
 

Repository files navigation

ADC Toolbox

Comparing Atmospheric Composition Datasets


2021 ESoWC Project Image - ADC Toolbox

-----------------------------------------------------

Contents

Contents
  1. Description
  2. Requirements
  3. Organization
  4. References
  5. Author
  6. Support

-----------------------------------------------------

1. Description

Atmospheric Datasets Comparison (ADC) Toolbox is aimed to have a set of tools that allows users to compare atmospheric composition datasets from different sources. Currently, it is possible to compare:

  • Forecast data from CAMS model and L2 NRT data from TROPOMI (NO2, CO, O3, SO2), IASI (O3) and GOME-2 (NO2, O3, HCHO) sensors.
  • Reanalysis monthly data from CAMS model and L3 monthly data from IASI (CO, O3) and GOME-2 (NO2) sensors.

-----------------------------------------------------

2. Requirements

2.1. General

The main packages that must be downloaded to be able to run this software can be found in the requirements.txt file.

!pip install -r requirements.txt

It is important to know that this code only runs in Linux operative systems due to the fact that CAMS model data must be downloaded in GRIB format. This can only be done using ecCodes, a package developed by ECMWF that is only available for Linux. In order to install this library, refer to this installation guide for clear instructions.

2.2. Maps visualization

Another relevant aspect of the installation is that the library cartopy (maps visualization) requires the following modules, that can be installed via the command line with:

$ sudo apt-get install libproj-dev proj-data proj-bin
$ sudo apt-get install libgeos-dev
$ sudo pip install cython

Lately, there have been problems retrieving the data from NACIS Natural Earth to generate the maps. It has also been found out that there are compatibility issues between the libraries Cartopy and Shapely. It is recommended that Shapely is reinstalled after installing Cartopy and that the maps data are downloaded manually with the following commands:

!pip install cartopy
!pip uninstall -y shapely
!pip install shapely --no-binary shapely
!wget https://raw.githubusercontent.com/SciTools/cartopy/master/tools/cartopy_feature_download.py
!python cartopy_feature_download.py physical
!python cartopy_feature_download.py cultural

2.3. Scatter plots by country

In case you want to see the distribution of the components by countries, you will need a Google API Key, Client User ID and Secret. The library Geocoder is used to get the data from Google, but it also allows the users of the ADC-Toolbox to use other APIs to do reverse geocoding (retrieving location information by coordinates). In the function scatter_plot, you will find the following line. You can rewrite as you wish. The list of providers can be found in Geocoder's Github repository.

>>> merge['Country'] = merge.apply(lambda row: geocoder.google([row['latitude'], row['longitude']], 
                                   method='reverse', key = google_api_key).country_long, axis = 1)

If you do not want to edit anything and prefer to run the code using Google API, then you should create a file with the name keys.txt under the folder data, and write three lines. They should contain, in this order, the Google API Key, Client User ID and Secret.

-----------------------------------------------------

3. Organization

├── README.md                   <- Details about the project
├── LICENSE                     <- Details about the license
├── requirements.txt            <- Details about the requirements
├── data                        <- Folder where the datasets are stored
│   │
│   └── cams                    <- Folder for CAMS datasets
│       └── 137-levels.csv      <- Details about CAMS model levels
│
├── functions                   <- Folder that contains functions
│   │
│   ├── functions_general.ipynb <- Functions that apply to all datasets
│   ├── functions_cams.ipynb    <- Functions that apply to the datasets from CAMS model
│   ├── functions_iasi.ipynb    <- Functions that apply to the datasets from IASI sensor
│   ├── functions_tropomi.ipynb <- Functions that apply to the datasets from TROPOMI sensor
│   └── functions_gome.ipynb    <- Functions that apply to the datasets from GOME-2 sensor
│
├── main_cams_gome_L2.ipynb     <- Example of how to use the functions to compare CAMS and GOME-2 L2 datasets
├── main_cams_gome_L3.ipynb     <- Example of how to use the functions to compare CAMS and GOME-2 L3 datasets
├── main_cams_iasi_L2.ipynb     <- Example of how to use the functions to compare CAMS and IASI L2 datasets
├── main_cams_iasi_L3.ipynb     <- Example of how to use the functions to compare CAMS and IASI L3 datasets
└── main_cams_tropomi_L2.ipynb  <- Example of how to use the functions to compare CAMS and TROPOMI L2 datasets

-----------------------------------------------------

4. References

4.1. Data sources

4.2. Important documentation

4.3. Other useful sources

-----------------------------------------------------

5. Author

Alba Vilanova Cortezón
Alba Vilanova Cortezón
Software developer intern at Meteomatics AG
BEng in Mechanical Engineering at University of Lleida and Inha University
MSc in Geospatial Technologies at NOVA University of Lisbon, WWU Münster and UJI
GitHub: @albavilanova
LinkedIn: @albavilanova
Website: https://albavilanova.es/

-----------------------------------------------------

6. Support

ADC-Toolbox has been developed under the framework set by ECMWF Summer of Weather Code:

Logo of ESoWC

A special thanks to my mentors Federico Fierli, Antje Inness and Miha Razinger for their support and guidance.

About

ADC Toolbox: Comparing Atmospheric Composition Datasets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%