Package: gpm-api
📦 Welcome to GPM-APIDeploymentActivityPython VersionsSupported SystemsProject StatusBuild StatusLintingCode CoverageCode QualityCode ReviewLicenseCommunityCitationSlack|DocsThe GPM-API is still in development. Feel free to try it out and to report issues or to suggest changes.🚀 Quick startGPM-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:importgpm_apigpm_api.available_products(product_types="RS")# research productsgpm_api.available_products(product_types="NRT")# near-real-time productsBefore starting using GPM-API, we highly suggest to save into a configuration file:your credentials to access theNASA Precipitation Processing System (PPS) serversthe 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:importgpm_apiusername="<your PPS username>"# likely your mailpassword="<your PPS password>"# likely your mailgpm_base_dir="<path/to/directory/GPM"# path to the directory where to download the datagpm_api.define_configs(username_pps=username,password_pps=password,gpm_base_dir=gpm_base_dir)# You can check that the config file has been correctly created with:configs=gpm_api.read_configs()print(configs)📥 Download GPM dataNow you can either start to download GPM data within python:importgpm_apiimportdatetimeproduct="2A-DPR"product_type="RS"version=7start_time=datetime.datetime(2020,7,22,0,1,11)end_time=datetime.datetime(2020,7,22,0,23,5)gpm_api.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_data2A-DPR2022722💫 Open GPM files into xarrayA GPM granule can be opened in python using:importgpm_apids=gpm_api.open_granule(<path_to_granule>)while multiple granules over a specific time period can be opened using:importgpm_apiimportdatetimeproduct="2A-DPR"product_type="RS"version=7start_time=datetime.datetime(2020,7,22,0,1,11)end_time=datetime.datetime(2020,7,22,0,23,5)ds=gpm_api.open_dataset(product=product,product_type=product_type,version=versionstart_time=start_time,end_time=end_time)📖 Explore the GPM-API documentationTo discover all GPM-API download, manipulation, analysis and plotting utilities, or how to contribute your custom retrieval to GPM-API:please read the software documentation available at [https://disdrodb.readthedocs.io/en/latest/].dive into the Jupyter NotebooksTutorialstutorials.🛠️ InstallationpipGPM-API can be installed viapipon Linux, Mac, and Windows.
On Windows you can installWinPythonto get Python and pip
running.
Prior installation of GPM-API, to avoidGEOSlibrary version incompatibilities when
installing the Cartopy package, we highly suggest to install first Cartopy usingconda install cartopy>=0.21.0.Then, install the GPM-API package by typing the following command in the command terminal:pip install gpm_apiTo install the latest development version via pip, see thedocumentation.conda [NOT YET AVAILABLE]GPM-API can be installed viacondaon Linux, Mac, and Windows.
Install the package by typing the following command in a command terminal:conda install gpm_apiIn case conda forge is not set up for your system yet, see the easy to follow
instructions onconda forge.💭 Feedback and Contributing GuidelinesIf you aim to contribute your data or discuss the future development of GPM-API,
we highly suggest to join theGPM-API Slack WorkspaceFeel free to also open aGitHub Issueor aGitHub Discussionspecific to your questions or ideas.CitationYou can cite the GPM-API software by:Ghiggi Gionata & XXXX . ghiggi/gpm_api. Zenodo.https://doi.org/10.5281/zenodo.7753488If you want to cite a specific software version, have a look at theZenodo site.LicenseThe content of this repository is released under the terms of theMIT license.TutorialsThe documentation also includes some [tutorials][tut_link], showing the most important use cases of GPM-API.
These tutorial are also available as Jupyter Notebooks and in Google Colab:Download the GPM products [Notebook][Colab]Introduction to the IMERG products [Notebook][Colab]Introduction to the PMW 1B and 1C products [Notebook][Colab]Introduction to the PMW 2A products [Notebook][Colab]Introduction to the RADAR 2A products [Notebook][Colab]Introduction to the CORRA 2B products [Notebook][Colab]Introduction to the Latent Heating products [Notebook][Colab]Introduction to the ENVironment products [Notebook][Colab]Introduction to image labeling and patch extraction [Notebook][Colab]Introduction to image patch extraction [Notebook][Colab]The associated python scripts are also provided in thetutorialfolder.Requirements:xarraydaskcartopypyresampleh5pycurlwgetOptionalzarrdask_imageskimage