https://github.com/ghiggi/gpm_api
A python package to download and analyze the Global Precipitation Measurement Mission (GPM) data archive
https://github.com/ghiggi/gpm_api
analysis-ready-data earth-observation eumetsat gpm jaxa nasa noaa open-data passive-microwave precipitation python radar rainfall reflectivity remote-sensing reproducible-research satellite-data snowfall trmm xarray
Last synced: 2 months ago
JSON representation
A python package to download and analyze the Global Precipitation Measurement Mission (GPM) data archive
- Host: GitHub
- URL: https://github.com/ghiggi/gpm_api
- Owner: ghiggi
- License: mit
- Created: 2020-08-11T06:30:57.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-06-23T21:06:52.000Z (8 months ago)
- Last Synced: 2025-06-29T22:05:40.895Z (8 months ago)
- Topics: analysis-ready-data, earth-observation, eumetsat, gpm, jaxa, nasa, noaa, open-data, passive-microwave, precipitation, python, radar, rainfall, reflectivity, remote-sensing, reproducible-research, satellite-data, snowfall, trmm, xarray
- Language: Jupyter Notebook
- Homepage: https://gpm-api.readthedocs.io
- Size: 135 MB
- Stars: 67
- Watchers: 1
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.rst
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.bib
- Authors: AUTHORS.md
Awesome Lists containing this project
- open-sustainable-technology - GPM-API - Provides an easy-to-use Python interface to download, read, process and visualize most of the products of the Global Precipitation Measurement Mission (GPM) data archive. (Hydrosphere / Ocean and Hydrology Data Access)
README

| | |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Deployment | [](https://pypi.org/project/gpm_api/) [](https://anaconda.org/conda-forge/gpm-api) |
| Activity | [](https://pypi.org/project/gpm_api/) [](https://anaconda.org/conda-forge/gpm-api) |
| Python Versions | [](https://www.python.org/downloads/) |
| Supported Systems | [](https://github.com/ghiggi/gpm_api/actions/workflows/tests.yaml) [](https://github.com/ghiggi/gpm_api/actions/workflows/tests.yaml) [](https://github.com/ghiggi/gpm_api/actions/workflows/tests_windows.yaml) |
| Project Status | [](https://www.repostatus.org/#active) |
| Build Status | [](https://github.com/ghiggi/gpm_api/actions/workflows/tests.yaml) [](https://github.com/ghiggi/gpm_api/actions/workflows/lint.yaml) [](https://gpm-api.readthedocs.io/en/latest/) |
| Linting | [](https://github.com/psf/black) [](https://github.com/astral-sh/ruff) [](https://github.com/codespell-project/codespell) |
| Code Coverage | [](https://coveralls.io/github/ghiggi/gpm_api?branch=main) [](https://codecov.io/gh/ghiggi/gpm_api) |
| Code Quality | [](https://www.codefactor.io/repository/github/ghiggi/gpm_api) [](https://codebeat.co/projects/github-com-ghiggi-gpm_api-main) [](https://app.codacy.com/gh/ghiggi/gpm_api/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [](https://codescene.io/projects/36767) |
| License | [](https://github.com/ghiggi/gpm_api/blob/main/LICENSE) |
| Community | [](https://join.slack.com/t/gpmapi/shared_invite/zt-28vkxzjs1-~cIYci2o3G0qEEoQJVMQRg) [](https://github.com/ghiggi/gpm_api/discussions) |
| Citation | [](https://doi.org/10.5281/zenodo.7753488) |
[**Slack**](https://join.slack.com/t/gpmapi/shared_invite/zt-28vkxzjs1-~cIYci2o3G0qEEoQJVMQRg) | [**Documentation**](https://gpm-api.readthedocs.io/en/latest/)
## 🚀 Quick start
GPM-API provides an easy-to-use python interface to download, read, process and visualize most
of the products of the Global Precipitation Measurement Mission (GPM) data archive.
The list of available products can be retrieved using:
```python
import gpm
gpm.available_products(product_types="RS") # research products
gpm.available_products(product_types="NRT") # near-real-time products
```
Before starting using GPM-API, we highly suggest to save into a configuration file:
1. your credentials to access the [NASA Precipitation Processing System (PPS) servers](https://gpm.nasa.gov/data/sources/pps-research)
1. the directory on the local disk where to save the GPM dataset of interest.
To facilitate the creation of the configuration file, you can run the following script:
```python
import gpm
username_pps = "" # likely your mail
password_pps = "" # likely your mail
base_dir = " `:
```bash
download_daily_gpm_data 2A-DPR 2022 7 22
```
______________________________________________________________________
### 💫 Open GPM files into xarray
A GPM granule can be opened in python using:
```python
import gpm
ds = gpm.open_granule_dataset()
# or
dt = gpm.open_granule_datatree()
```
while multiple granules over a specific time period can be opened using:
```python
import gpm
import datetime
product = "2A-DPR"
product_type = "RS"
version = 7
start_time = datetime.datetime(2020,7, 22, 0, 1, 11)
end_time = datetime.datetime(2020,7, 22, 0, 23, 5)
ds = gpm.open_dataset(product=product,
product_type=product_type,
version=version
start_time=start_time,
end_time=end_time)
```
______________________________________________________________________
### 📖 Explore the GPM-API documentation
To discover all GPM-API download, manipulation, analysis and plotting features,
please read the software documentation available at [https://gpm-api.readthedocs.io/en/latest/](https://gpm-api.readthedocs.io/en/latest/).
If you are new to GPM-API, we recommend starting with the following pages:
- [Introduction to GPM sensors, products, theoretical and practical aspects](https://gpm-api.readthedocs.io/en/latest/00_introduction.html)
- [Software installation](https://gpm-api.readthedocs.io/en/latest/02_installation.html)
- [Configuration of GPM-API to start download GPM Data from NASA PPS and GES DISC servers](https://gpm-api.readthedocs.io/en/latest/03_quickstart.html)
- [Basic tutorials on how to read, manipulate and visualize radar, passive microwave sensors and IMERG products](https://gpm-api.readthedocs.io/en/latest/04_tutorials.html)
All GPM-API tutorials are available as Jupyter Notebooks in the [`tutorial`](https://github.com/ghiggi/gpm_api/tree/main/tutorials) directory.
______________________________________________________________________
## 🛠️ Installation
### conda
GPM-API can be installed via [conda][conda_link] on Linux, Mac, and Windows.
Install the package by typing the following command in the terminal:
```bash
conda install gpm-api
```
In case conda-forge is not set up for your system yet, see the easy to follow instructions on [conda-forge][conda_forge_link].
### pip
GPM-API can be installed also via [pip][pip_link] on Linux, Mac, and Windows.
On Windows you can install [WinPython][winpy_link] to get Python and pip running.
Prior installation of GPM-API, try to install to `cartopy>=0.21.0` package to ensure there are not [GEOS](https://libgeos.org/) library version incompatibilities.
If you can't solve the problems and install cartopy with pip, you should install at least cartopy with conda using `conda install cartopy>=0.21.0`.
Then, install the GPM-API package by typing the following command in the terminal:
```bash
pip install gpm-api
```
To install the latest development version via pip, see the [documentation][dev_install_link].
## 💭 Feedback and Contributing Guidelines
If you aim to contribute your data or discuss the future development of GPM-API,
we highly suggest to join the [**GPM-API Slack Workspace**](https://join.slack.com/t/gpmapi/shared_invite/zt-28vkxzjs1-~cIYci2o3G0qEEoQJVMQRg)
Feel free to also open a [GitHub Issue](https://github.com/ghiggi/gpm_api/issues) or a [GitHub Discussion](https://github.com/ghiggi/gpm_api/discussions) specific to your questions or ideas.
## Citation
If you are using GPM-API in your publication please cite our Zenodo repository:
> Ghiggi Gionata. ghiggi/gpm_api. Zenodo. [](https://doi.org/10.5281/zenodo.7753488)
If you want to cite a specific software version, have a look at the [Zenodo site](https://doi.org/10.5281/zenodo.7753488).
## License
The content of this repository is released under the terms of the [MIT license](LICENSE).
[conda_forge_link]: https://github.com/conda-forge/gpm-api-feedstock#installing-gpm-api
[conda_link]: https://docs.conda.io/en/latest/miniconda.html
[dev_install_link]: https://gpm-api.readthedocs.io/en/latest/02_installation.html#installation-for-contributors
[pip_link]: https://pypi.org/project/gpm-api
[winpy_link]: https://winpython.github.io/