Python Package for the Global Precipitation Measurement (GPM) Mission Data Archive
Project description
📦 Welcome to GPM-API
Deployment | |
Activity | |
Python Versions | |
Supported Systems | |
Project Status | |
Build Status | |
Linting | |
Code Coverage | |
Code Quality | |
License | |
Community | |
Citation |
🚀 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:
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:
- your credentials to access the NASA Precipitation Processing System (PPS) servers
- 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:
import gpm
username_pps = "<your PPS username>" # likely your mail
password_pps = "<your PPS password>" # likely your mail
base_dir = "<path/to/directory/GPM" # path to the directory where to download the data
gpm.define_configs(
username_pps=username_pps, password_pps=password_pps, base_dir=base_dir
)
# You can check that the config file has been correctly created with:
configs = gpm.read_configs()
print(configs)
📥 Download GPM data
Now you can either start to download GPM data within 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)
gpm.download(
product=product,
product_type=product_type,
version=version,
n_threads=2,
start_time=start_time,
end_time=end_time,
)
or from the terminal using i.e. download_daily_gpm_data <product> <year> <month> <day>
:
download_daily_gpm_data 2A-DPR 2022 7 22
💫 Open GPM files into xarray
A GPM granule can be opened in python using:
import gpm
ds = gpm.open_granule(<path_to_granule>)
while multiple granules over a specific time period can be opened using:
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/.
If you are new to GPM-API, we recommend starting with the following pages:
- Introduction to GPM sensors, products, theoretical and practical aspects
- Software installation
- Configuration of GPM-API to start download GPM Data from NASA PPS and GES DISC servers
- Basic tutorials on how to read, manipulate and visualize radar, passive microwave sensors and IMERG products
All GPM-API tutorials are available as Jupyter Notebooks in the tutorial
directory.
🛠️ Installation
conda
GPM-API can be installed via conda on Linux, Mac, and Windows. Install the package by typing the following command in the terminal:
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.
pip
GPM-API can be installed also via pip on Linux, Mac, and Windows.
On Windows you can install WinPython 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 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:
pip install gpm-api
To install the latest development version via pip, see the documentation.
💭 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
Feel free to also open a GitHub Issue or a GitHub Discussion specific to your questions or ideas.
Citation
If you are using GPM-API in your publication please cite our Zenodo repository:
If you want to cite a specific software version, have a look at the Zenodo site.
License
The content of this repository is released under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gpm_api-0.3.1.tar.gz
.
File metadata
- Download URL: gpm_api-0.3.1.tar.gz
- Upload date:
- Size: 264.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4169c1fa56d380dea1e99155d4558b4fcc209c60bddb4d873da0252488f96d0 |
|
MD5 | 4a160a8ca1d6625d7ceec2d0a9760907 |
|
BLAKE2b-256 | daf9ba2533bdaf4139511465290ba0cb4c8dc80c8ca5bc97ff2827d3b24e8258 |
File details
Details for the file gpm_api-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: gpm_api-0.3.1-py3-none-any.whl
- Upload date:
- Size: 351.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a33654e850160f8f89c8d8ed2446a99e4e0c5779a19daa33c5ed837bee99612b |
|
MD5 | fadc79bf287e4e0d07693975def710b7 |
|
BLAKE2b-256 | 9e9d62823fc56e8965c354c58b2dfe5eafde6a8dc56dc05767d5020f4b98e6ba |