Preprocessing of the emissions for the online emission module of cosmo. Produces gridded annual emissions as well as temporal and vertical profiles.
To use the code, just download or clone the repository. The package can be installed with
$ python setup.py install
The following requirements on third-party packages:
- Python (>= 3.6)
- cartopy
- netCDF4
- numpy
- shapely
Please note emission inventories are not included in the repository, but have to be obtained separately.
-
Take one of the configuration files in the cases folder and adjust it to your case.
-
Generate the emission files:
$ python -m epro grid --case config_{tno|ch}
- Generate the profiles:
$ python -m epro tp # for temporal profiles
$ python -m epro vp # for vertical profiles
Emissions are read from the inventory inventory and projected onto the COSMO grid.
The necessary information, such as grid characterstics and species, are supplied via a config file. Since emission inventories can be structured quite differently, it may also be necessary to adapt the main script. The provided examples are a good starting point.
In the file grids.py
you can find definitions for classes handling common gridtypes
(COSMO, TNO, swiss). Use them in your configuration file to specify your grid.
If your grid can not be represented by an existing one, implement your own grid class
by inheriting from the Grid
baseclass and implementing the required methods.
The temporal and vertical profiles are generated by the scripts in the profiles/
directory.
This repository is a merge of
https://gitlab.empa.ch/abt503/users/hjm/online-emission-processing
https://gitlab.empa.ch/abt503/users/jae/online-emission-processing
https://gitlab.empa.ch/abt503/users/muq/online_emission_cosmoart
and will be hosted at
https://github.com/C2SM-RCM/cosmo-emission-processing.
It deliberately is not a fork of any of the existing repositories since that would introduce an unwanted dependency. However, the commit history will be kept intact as much as possible.
This code is formatted using black.
Run find . -name '*.py' -exec black -l 80 --target-version py36 {} +
before commiting
to reformat the files.
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.