# PyMIPAS_NOxy
**MIPAS NOx/NOy calculator tools**
Some tools to handle MIPAS level-2 netCDF files,
and to combine trace gas species to calculate
NOx (= NO + NO2) and NOy (= NO + NO2 + ClONO2 + N2O5 + HNO3 + HNO4)
from the single species.
:warning: This package is in **alpha** stage, that is, it works mostly,
but the interface might still be subject to change.
## Install
### Requirements
- `numpy` - required
- `xarray` - required for reading netCDF files
- `h5netcdf` - required for reading netCDF files
- `scipy` - required for the interpolation interface
- `click` - required for the command line interface
- `toml` - required to read the configuration files
- `pytest` - optional, for testing
### mipas_noxy
An installable `pip` package called `mipas_noxy` will soon be available
from the main package repository, it can then be installed with:
```sh
$ pip install mipas_noxy
```
The latest development version can be installed
with [`pip`](https://pip.pypa.io) directly from github
(see <https://pip.pypa.io/en/stable/reference/pip_install/#vcs-support>
and <https://pip.pypa.io/en/stable/reference/pip_install/#git>):
```sh
$ pip install [-e] git+https://github.com/st-bender/pymipas_noxy.git
```
The other option is to use a local clone:
```sh
$ git clone https://github.com/st-bender/pymipas_noxy.git
$ cd pymipas_noxy
```
and then using `pip` (optionally using `-e`, see
<https://pip.pypa.io/en/stable/reference/pip_install/#install-editable>):
```sh
$ pip install [-e] .
```
or using `setup.py`:
```sh
$ python setup.py install
```
Optionally, test the correct function of the module with
```sh
$ py.test [-v]
```
or even including the [doctests](https://docs.python.org/library/doctest.html)
in this document:
```sh
$ py.test [-v] --doctest-glob='*.md'
```
## Usage
The python module itself is named `mipas_noxy` and is imported as usual.
All functions should be `numpy`-compatible and work with scalars
and appropriately shaped arrays.
```python
>>> import mipas_noxy as moxy
```
### Opening MIPAS level-2 netcdf files
The MIPAS level-2 netcdf files contain 2-D altitude coordinates which
`xarray` can currently not deal with nicely. This module provide a convenience
function to read those files:
```python
>>> from mipas_noxy import open_mipas_l2
>>> open_mipas_l2("/path/to/mipas-level2-file.nc")
```
It also contains one that can combine multiple files into one data set,
taking a glob-string or list of files:
```python
>>> from mipas_noxy import open_mfmipas_l2
>>> open_mfmipas_l2("/path/to/mipas-level2-files*.nc")
```
### Command line interface
A command line interface to combine different species to "NOx" or "NOy"
(and possibly others)
is available as `mipas_noxy <args>`, or using python's `-m` switch as
`python -m mipas_noxy <args>`.
The argument is basically the configuration file for processing,
more command line options are listed by passing
`-h` or `--help`: `mipas_noxy -h`.
The processing is configured through a [toml](https://toml.io/en/) file,
currently available options are described in the
[example configuration file](./examples/example_NOxy_config.toml).
Basic class and method documentation is accessible via `pydoc`:
```sh
$ pydoc mipas_noxy
```
## License
This python interface is free software: you can redistribute it or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 2 (GPLv2), see [local copy](./LICENSE)
or [online version](http://www.gnu.org/licenses/gpl-2.0.html).
Raw data
{
"_id": null,
"home_page": "https://github.com/st-bender/pymipas_noxy",
"name": "mipas-noxy",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Stefan Bender",
"author_email": "sbender@iaa.es",
"download_url": "https://files.pythonhosted.org/packages/6c/ec/7056b98bc358abd8571faf5b43f5c1a2ce5192128c68223a8aca5913279a/mipas_noxy-0.0.1.tar.gz",
"platform": null,
"description": "# PyMIPAS_NOxy\n\n**MIPAS NOx/NOy calculator tools**\n\nSome tools to handle MIPAS level-2 netCDF files,\nand to combine trace gas species to calculate\nNOx (= NO + NO2) and NOy (= NO + NO2 + ClONO2 + N2O5 + HNO3 + HNO4)\nfrom the single species.\n\n:warning: This package is in **alpha** stage, that is, it works mostly,\nbut the interface might still be subject to change.\n\n## Install\n\n### Requirements\n\n- `numpy` - required\n- `xarray` - required for reading netCDF files\n- `h5netcdf` - required for reading netCDF files\n- `scipy` - required for the interpolation interface\n- `click` - required for the command line interface\n- `toml` - required to read the configuration files\n- `pytest` - optional, for testing\n\n### mipas_noxy\n\nAn installable `pip` package called `mipas_noxy` will soon be available\nfrom the main package repository, it can then be installed with:\n```sh\n$ pip install mipas_noxy\n```\nThe latest development version can be installed\nwith [`pip`](https://pip.pypa.io) directly from github\n(see <https://pip.pypa.io/en/stable/reference/pip_install/#vcs-support>\nand <https://pip.pypa.io/en/stable/reference/pip_install/#git>):\n\n```sh\n$ pip install [-e] git+https://github.com/st-bender/pymipas_noxy.git\n```\n\nThe other option is to use a local clone:\n\n```sh\n$ git clone https://github.com/st-bender/pymipas_noxy.git\n$ cd pymipas_noxy\n```\nand then using `pip` (optionally using `-e`, see\n<https://pip.pypa.io/en/stable/reference/pip_install/#install-editable>):\n\n```sh\n$ pip install [-e] .\n```\n\nor using `setup.py`:\n\n```sh\n$ python setup.py install\n```\n\nOptionally, test the correct function of the module with\n\n```sh\n$ py.test [-v]\n```\n\nor even including the [doctests](https://docs.python.org/library/doctest.html)\nin this document:\n\n```sh\n$ py.test [-v] --doctest-glob='*.md'\n```\n\n## Usage\n\nThe python module itself is named `mipas_noxy` and is imported as usual.\n\nAll functions should be `numpy`-compatible and work with scalars\nand appropriately shaped arrays.\n\n```python\n>>> import mipas_noxy as moxy\n\n```\n\n### Opening MIPAS level-2 netcdf files\n\nThe MIPAS level-2 netcdf files contain 2-D altitude coordinates which\n`xarray` can currently not deal with nicely. This module provide a convenience\nfunction to read those files:\n\n```python\n>>> from mipas_noxy import open_mipas_l2\n>>> open_mipas_l2(\"/path/to/mipas-level2-file.nc\")\n\n```\n\nIt also contains one that can combine multiple files into one data set,\ntaking a glob-string or list of files:\n\n```python\n>>> from mipas_noxy import open_mfmipas_l2\n>>> open_mfmipas_l2(\"/path/to/mipas-level2-files*.nc\")\n\n```\n\n### Command line interface\n\nA command line interface to combine different species to \"NOx\" or \"NOy\"\n(and possibly others)\nis available as `mipas_noxy <args>`, or using python's `-m` switch as\n`python -m mipas_noxy <args>`.\nThe argument is basically the configuration file for processing,\nmore command line options are listed by passing\n`-h` or `--help`: `mipas_noxy -h`.\nThe processing is configured through a [toml](https://toml.io/en/) file,\ncurrently available options are described in the\n[example configuration file](./examples/example_NOxy_config.toml).\n\n\nBasic class and method documentation is accessible via `pydoc`:\n\n```sh\n$ pydoc mipas_noxy\n```\n\n## License\n\nThis python interface is free software: you can redistribute it or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, version 2 (GPLv2), see [local copy](./LICENSE)\nor [online version](http://www.gnu.org/licenses/gpl-2.0.html).\n",
"bugtrack_url": null,
"license": "GPLv2",
"summary": "MIPAS level-2 NOx/NOy calculater",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/st-bender/pymipas_noxy"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1ba9add8fbd7f48e8260dd090422804c57df81bdd7fb661da1702153f2bfddae",
"md5": "0245add95b9e85a7229733c2c78bad52",
"sha256": "1ca266e67dd2743d8028e120662457aeb3bef828181d97cf3539a8ae355345ea"
},
"downloads": -1,
"filename": "mipas_noxy-0.0.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "0245add95b9e85a7229733c2c78bad52",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 19993,
"upload_time": "2024-02-10T10:58:57",
"upload_time_iso_8601": "2024-02-10T10:58:57.754169Z",
"url": "https://files.pythonhosted.org/packages/1b/a9/add8fbd7f48e8260dd090422804c57df81bdd7fb661da1702153f2bfddae/mipas_noxy-0.0.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6cec7056b98bc358abd8571faf5b43f5c1a2ce5192128c68223a8aca5913279a",
"md5": "e8c528cc7ebc4b69e047f7750f46c9b6",
"sha256": "e8dac354ca1c00e22788bbfdaa81df91a304cdc5ed9eae08dec0e377062b2b4a"
},
"downloads": -1,
"filename": "mipas_noxy-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "e8c528cc7ebc4b69e047f7750f46c9b6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21512,
"upload_time": "2024-02-10T10:58:59",
"upload_time_iso_8601": "2024-02-10T10:58:59.857430Z",
"url": "https://files.pythonhosted.org/packages/6c/ec/7056b98bc358abd8571faf5b43f5c1a2ce5192128c68223a8aca5913279a/mipas_noxy-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-10 10:58:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "st-bender",
"github_project": "pymipas_noxy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mipas-noxy"
}