Skip to content

A python library designed for downloading and managing hydro-meteorological data sourced from satellites and global models.

License

Notifications You must be signed in to change notification settings

jusethCS/meteosatpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MeteoSatPy

PyPI Latest Release PyPI Downloads Conda Latest Release Conda Downloads

What is it?

MeteoSatPy is a Python library designed for downloading and managing hydro-meteorological data sourced from satellites and global models. It offers users efficient access to near-real-time and historical weather conditions globally. With features for data acquisition, processing, and analysis. MeteoSatPy is a versatile tool for meteorological research, forecasting, and decision-making across various sectors.

Where to get it?

The source code is currently hosted on GitHub at: https://github.com/jusethCS/meteosatpy

Binary installers for the latest released version are available at the Python Package Index (PyPI) and on Conda

# PyPI
pip install meteosatpy
# Conda
conda install juseth.chancay::meteosatpy

Dependencies

  • rasterio: Reads and writes raster formats based on Numpy N-dimensional arrays.
  • xarray: Works with labelled multi-dimensional arrays simple and efficient.
  • geopandas: Analysis and manipulation of geographical data.
  • request: HTTP library for making requests and working with web APIs.

Prior to installing MeteoSatPy using PyPi, we recommend creating a new conda environment with dependencies:

# Conda
conda create -n [env_name] geopandas rasterio xarray requests

If you need to download MSWEP data, you'll need to install Rclone.

# Conda
conda install conda-forge::rclone

To set up Rclone with a Google Drive account, we recommend watching this tutorial. Note the MSWEP data are store on this Google Drive repository.

Examples

import datetime as dt
import meteosatpy

# Target date
date = dt.datetime(2010, 1, 1) # year, month, day

# Download CHIRPS data
ch = meteosatpy.CHIRPS()
ch.download(
    date=date, 
    timestep="daily", 
    outpath=date.strftime("chirps_%Y-%m-%d.tif")
)

# Download CMORPH data
cm = meteosatpy.CMORPH()
cm.download(
    date=date, 
    timestep="daily", 
    outpath=date.strftime("cmorph_%Y-%m-%d.tif")
)

# Download MSWEP data
mw = meteosatpy.MSWEP()
mw.download(
    date=date, 
    timestep="daily", 
    dataset="Past",
    outpath=date.strftime("mswep_%Y-%m-%d.tif"))

# Download IMERG v07 final run
im = meteosatpy.IMERG(user="username", pw="pass")
im.download(
    date=date, 
    version="v07", 
    run="final", 
    timestep="daily", 
    outpath=date.strftime("imerg_%Y-%m-%d.tif")
)

About

A python library designed for downloading and managing hydro-meteorological data sourced from satellites and global models.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages