Python resources for Earth sciences

Table of Content

Python resources for Earth sciences

Python Resources for Earth Sciences

This repository contains information about python libraries broadly relevant to Earth Sciences (Hydrology, Meteorology, Geospatial, Climatology, Oceanography etc.). The libraries are broadly grouped according to their function; however, many have functionality that spans multiple categories.

If you have any comments or suggestions for additions or improvements for this repository, submit an issue or a pull request. If you can't contribute on GitHub, send me an email.

If you find these resources useful, please give a star ⭐.

Geospatial Analysis and Mapping

  • Geopandas: GeoPandas is an open source project to make working with geospatial data in python easier. GeoPandas extends the datatypes used by pandas to allow spatial operations on geometric types.

  • whitebox: The whitebox Python package is built on WhiteboxTools, an advanced geospatial data analysis platform. WhiteboxTools can be used to perform common geographical information systems (GIS) analysis operations, such as cost-distance analysis, distance buffering, and raster reclassification.

  • PySal: A python spatial analysis library for open source and crossed platform Geospatial Data Science

  • MovingPandas: MovingPandas implements a Trajectory class and corresponding methods based on GeoPandas. It provides trajectory data structures and functions for analysis and visualization.

  • Shapely: Shapely is a Python package for manipulation and analysis of planar geometric objects. It is based on the widely deployed GEOS (the engine of PostGIS) and JTS libraries.

  • Rasterio: Rasterio is a GDAL and Numpy-based Python library designed to make your work with geospatial raster data more productive, more fun --- more Zen. It is a highly useful module for raster processing which you can use for reading and writing several different raster formats in Python. Python automatically registers all known GDAL drivers for reading supported formats when importing the module.

  • Georasters: The GeoRasters package is a python module that provides a fast and flexible tool to work with GIS raster files. It provides the GeoRaster class, which makes working with rasters quite transparent and easy

  • Fiona: It reads and writes geographic data files and thereby helps Python programmers integrate geographic information systems with other computer systems.

  • geemap: A Python package for interactive mapping with Google Earth Engine, ipyleaflet, and ipywidgets.

  • Awesome Earth Engine: A curated list of Google Earth Engine resources includng many python libraries

  • geonotebook: Jupyter notebook extension for geospatial visualization and analysis developed by NASA

  • Verde: It is a Python library for processing spatial data (bathymetry, geophysics surveys, etc) and interpolating it on regular grids (i.e., gridding).

  • PcRaster: It is a collection of software targeted at the development and deployment of spatio-temporal environmental models.

  • PyGeoprocessing: A Python/Cython based library that provides a set of commonly used raster, vector, and hydrological operations for GIS processing.

  • Pysheds: Simple and fast watershed delineation in python.

  • GeoDjango: GeoDjango is an included contrib module for Django that turns it into a world-class geographic Web framework. GeoDjango strives to make it as simple as possible to create geographic Web applications, like location-based services.

  • Lidar: Terrain and hydrological analysis based on LiDAR-derived digital elevation models (DEM).

  • PYWR: Spatial allocation tool

  • ParTerra-Python: The Participatory Terrain model deploys an algorithm to fuse together data from OpenStreetMap (OSM) and any base elevation dataset to create a high-resolution digital terrain model for any area in the world.

  • salem: Adds geolocalised subsetting, masking, and plotting operations to xarray's data structures via accessors

  • Regionmask: Plotting and creation of masks of spatial regions

  • xshape: Tools for working with shapefiles, topographies, and polygons in xarray

  • hydro-osm: Hydro-osm is a toolbox to convert OpenStreetMap data into data layers that can be readily used for hydrological and hydraulic modelling.

  • Collocate: Collocate xarray trajectories in arbitrary physical dimensions

  • HoloViews: Library designed to make data analysis and visualization seamless and simple

  • GeoViews: Library that makes it easy to explore and visualize geographical, meteorological, and oceanographic datasets, such as those used in weather, climate, and remote sensing research

  • Datashader: Graphics pipeline system for creating meaningful representations of large datasets quickly and flexibly

  • Panel: Create custom interactive web apps and dashboards by connecting user-defined widgets to plots, images, tables, or text

  • hvPlot: A high-level plotting API for the PyData ecosystem built on HoloViews

  • EarthSim: Tools for working with and visualizing environmental simulations

  • Cartopy: Easy cartographic (maps) data visualization.

  • Geoviews: Explore and visualize geographic data using HoloViews.

  • xESMF: Universal regridder for geospatial data.

  • gridded: A single way to work with results from any hydrodynamic/oceanographic model regardless of what type of grid it was computed on.

  • pyResample: Resampling geospatial image data.

  • ESMPy: Interface to the Earth System Modeling Framework (ESMF) regridding utility.

  • pyproj: Interface to PROJ (cartographic projections and coordinate transformations library).


Data Collection

  • HKVFEWSPY: Connection to the DelftFEWS servers

  • HyRiver: HyRiver is a software stack consisting of six Python libraries that are designed to aid in watershed analysis through web services. This project includes hydrology and climatology data within the US.

  • Openradar: Library for processing a set of dutch, german and belgian precipitation radars into calibrated composites.

  • Ecohydrolib: Libraries and command-line scripts for performing ecohydrology data preparation workflows.

  • Ulmo: Clean, simple and fast access to public hydrology and climatology data.

  • PyHIS: It is a python library for querying CUAHSI*-HIS** web services

  • Wetterdienst: Python Toolset For Accessing Weather Data From German Weather Service

  • ERA5-tools: Python scripts to download and view ERA5 climatologic data, as well as to extract time series (hourly to monthly data on many atmospheric and land-surface parameters)

  • CAMELS-AUS: Python package to easily load and use the CAMELS-AUS dataset

  • BoM Water: This package has been developed to access to the BoM Water Data Sensor Observation Service (SOS). With a goal to easily and efficiently integrate data into scientific workflows.

  • Eco-Data Manage Toolkit: It is a Python toolkit to facilitate data management for hydrology/limnology applications.

Hydrological Modelling

  • CMF: Catchment Modelling Framework, a hydrologic modelling toolbox.

  • TopoFlow: Spatial hydrologic model (D8-based, fully BMI-compliant).

  • VIC: The Variable Infiltration Capacity (VIC) Macroscale Hydrologic Model.

  • Xanthos: Xanthos is an open-source hydrologic model, written in Python, designed to quantify and analyze global water availability.

  • WRF-Hydro: wrfhydrpy is a Python API for the WRF-Hydro modelling system.

  • pyDEM: PyDEM is a package for topographic (terrain) analysis. It takes in digital elevation model (DEM) rasters, and it outputs quantities like slope, aspect, upstream area, and topographic wetness index.

  • EXP-HYDRO: EXP-HYDRO is a catchment scale hydrological model that operates at a daily time-step. It takes as inputs the daily values of precipitation, air temperature, and potential evapotranspiration, and simulates daily streamflow at the catchment outlet.

  • RRMPG: Rainfall-Runoff modelling playground.

  • LHMP: Lumped Hydrological Models Playground.

  • SMARTPy: Python implementation of the rainfall-runoff model SMART

  • PyStream: Python implementation of the STREAM hydrological rainfall-runoff model.

  • HydrPy: A framework for the development and application of hydrological models based on Python.

  • Catchmod: CATCHMOD is widely used rainfall runoff model in the United Kingdom. It was introduced by Wilby (1994).

  • wflow: wflow consists of a set of Python programs that can be run on the command line and perform hydrological simulations. The models are based on the PCRaster Python framework

  • PyTOPKAPI: PyTOPKAPI is a BSD licensed Python library implementing the TOPKAPI Hydrological model (Liu and Todini, 2002).

  • mhmpy: A Python-API for the mesoscale Hydrological Model.

  • SuperflexPy: A new open source framework for building conceptual hydrological models

  • NeuralHydrology: Python library to train neural networks with a strong focus on hydrological applications

  • StreamStats: Python package for interfacing with the USGS StreamStats API.

  • hidrocomp: Python library for hydrological data analysis

  • PyFlo: It is an open-source Python library for performing hydraulic and hydrology stormwater analysis. Features include network hydraulic grade analysis and time/iteration based storage and flood routing simulations.

  • HydroFunctions: A suite of convenience functions for working with hydrology data in an interactive Python session.

  • pySTEPS: It is an open-source and community-driven Python library for probabilistic precipitation nowcasting, i.e. short-term ensemble prediction systems.

Groundwater Modelling

  • Flopy: The Python interface to MODFLOW.

  • imod-python: Make massive MODFLOW models.

  • Idfpy: A simple module for reading and writing iMOD IDF files. IDF is a simple binary format used by the iMOD groundwater modelling software.

  • WellApplication: Set of tools for groundwater level and water chemistry analysis.

  • TIMML: A Multi-Layer, Analytic Element Model.

  • TTim: A Multi-Layer, Transient, Analytic Element Model.

  • PyHELP: A Python library for the assessment of spatially distributed groundwater recharge and hydrological components with HELP.

  • PyRecharge: Spatially distributed groundwater recharge and depletion modeling framework in Python

  • Anaflow: A python-package containing analytical solutions for the groundwater flow equation

  • WellTestPy: A python-package for handling well based field campaigns.

  • HydroGeoSines: Signal In the Noise Exploration Software for Hydrogeological Datasets.

  • Pytesmo: Python Toolbox for the Evaluation of Soil Moisture Observations.

  • Phydrus: Python implementation of the HYDRUS-1D unsaturated zone model

Time Series Analysis

  • Hydropy: Analysis of hydrological oriented time series.

  • Pastas: Analysis of hydrological time series using time series models.

  • Hydrostats: Tools for use in comparison studies, specifically for use in the field of hydrology.

  • htimeseries| This module provides the HTimeseries class, which is a layer on top of pandas, offering a little more functionality.

  • efts-python: A python library for reading and writing Ensemble Forecast Time Series in netCDF files.

Optimization, Uncertainty, Statistics

  • LMFIT: Non-Linear Least Squares Minimization, with flexible Parameter settings, based on scipy.optimize.leastsq, and with many additional classes and methods for curve fitting.

  • SPOTpy: A Statistical Parameter Optimization Tool for Python.

  • PyGLUE: Generalised Likelihood Uncertainty Estimation (GLUE) Framework.

  • Pyemu: A python modules for model-independent uncertainty analyses, data-worth analyses, and interfacing with PEST(++).

  • HPGL: High Performance Geostatistics Library.

  • HydroErr: Goodness of Fit metrics for use in comparison studies, specifically in the field of hydrology.

  • Climate-indices: Climate indices for drought monitoring, community reference implementations in Python.

  • HydroLM: The HydroLM package contains a class and functions for automating linear regressions OLS for hydrologists.

  • PySDI: It is a set of open source scripts that compute non-parametric standardized drought indices (SDI) using raster data sets as input data.

  • PyForecast: It is a statistical modeling tool useful in predicting monthly and seasonal inflows and streamflows. The tool collects meterological and hydrologic datasets, analyzes hundreds to thousands of predictor subsets, and returns statistical regressions between predictors and streamflows.

  • scikit-extremes: It is a python library to perform univariate extreme value calculations.


  • ESMPY: Earth System Modeling Framework (ESMF) Python interface

  • PyHSPF: Python extensions to the Hydrological Simulation Program in Fortran (HSPF).

  • SPHY: Spatial Processes in HYdrology (SPHY) model

  • xsboringen: (In Dutch) A python library for processing and plotting borehole and CPT data, developed for open data formats in the Netherlands.

  • PyMT: It is an Open Source Python package that provides the necessary tools used for the coupling of models that expose the Basic Model Interface (BMI).

  • Landlab: The Landlab project creates an environment in which scientists can build a numerical landscape model without having to code all of the individual components.

  • EFlowCalc: Calculator of Streamflow Characteristics.

  • IRIS: A powerful, format-agnostic, and community-driven Python library for analysing and visualising Earth science data.

  • Hydrointerp: A Python package for interpolating hydrologic data.

  • EFlowCalc: EFlowCalc is an open-source calculator of ecological streamflow characteristics in Python.

  • Hydrofunctions: A suite of convenience functions for working with hydrology data in an interactive Python session.

  • Shyft: It is the open-source toolbox for the energy-market domain, funded and supported by Statkraft.

  • Hydroshare: HydroShare is a collaborative website for better access to data and models in the hydrologic sciences.

  • Hydrobox: Hydrological preprocessing and analysis toolbox build upon pandas and numpy

  • Wetland: It is a toolset for mapping surface water and wetland hydrological dynamics using fine-resolution aerial imagery within Google Earth Engine (GEE).

  • iRONS: iRONS (interactive Reservoir Operation Notebooks and Software) is a python package that enables the simulation, forecasting and optimisation of reservoir systems.


  • MetPy: It is a collection of tools in Python for reading, visualizing and performing calculations with weather data.

  • PyEto: It is a Python library for calculating reference crop evapotranspiration (ETo), sometimes referred to as potential evapotranspiration (PET). The library provides numerous functions for estimating missing meteorological data.

  • Improver: It is a library of algorithms for meteorological post-processing and verification.

  • MetSim: It is a meteorological simulator and forcing disaggregator for hydrologic modeling and climate applications.

  • MELODIST: It is an open-source toolbox written in Python for disaggregating daily meteorological time series to hourly time steps.

  • PyCat: Climate Analysis Tool written in python

  • PySteps: It is a community-driven initiative for developing and maintaining an easy to use, modular, free and open source Python framework for short-term ensemble prediction systems.

  • Evaporation: Calculation of evaporation and transpiration.

  • rainymotion: Python library for radar-based precipitation nowcasting based on optical flow techniques.

  • Metview: Python interface to Metview, a meteorological workstation and batch system for accessing, examining, manipulating and visualising meteorological data.

  • IMPROVER: It is a library of algorithms for meteorological post-processing.

  • JAMS: It is a general Python package offering miscellaneous functions in different categories, such as reading different file formats, julian date routines, or meteorological functions.

  • windspharm: Python Spherical harmonic wind analysis

  • wrf-python: Python A collection of diagnostic and interpolation routines for use with output of the Weather Research and Forecasting (WRF-ARW) Model

  • scikit-downscale: Statistical downscaling and postprocessing models for climate and weather model simulations.

  • Awesome-EarthObservation-Code: A curated list of awesome tools, tutorials, code, helpful projects, links, stuff about Earth Observation and Geospatial stuff!

  • Satpy: Reading, manipulating, and writing data from remote-sensing earth-observing meteorological satellite instruments.

  • Py-ART: Weather radar algorithms and utilities.

  • ACT: Toolkit for working with atmospheric time-series datasets of varying dimensions.

  • PyDSD: Utilities for working with disdrometer data.

  • pyPI: Tropical cyclone potential intensity calculations.


  • climlab: Process-oriented climate modeling

  • aospy: Automated analysis and management of gridded climate data

  • Oocgcm: Analysis of large gridded geophysical datasets

  • Pangaea: xarray extension for gridded land surface & weather model output

  • xgcm: Extends the xarray data model to understand finite volume grid cells (common in General Circulation Models) and provides interpolation and difference operations for such grids

  • OpenClimateGIS: Geospatial manipulation, subsetting, computation, and translation of spatiotemporal climate data

  • climpred: xarray wrapper for analysis of ensemble forecast models for climate prediction

  • pyOWM: PyOWM is a client Python wrapper library for OpenWeatherMap (OWM) web APIs

  • climpred: Verification of weather and climate forecasts.

  • climtas: Climtas is a package for working with large climate analyses. It focuses on the time domain with custom functions for Xarray and Dask data.

  • climate-indices: Various climate index algorithms relating to precipitation and temperature.

  • wrf-python: A collection of diagnostic and interpolation routines for use with output from the Weather Research and Forecasting (WRF-ARW) Model.

  • climt: Climate modelling and diagnostics toolkit.

  • pyrcel: Adiabatic cloud parcel model for studying aerosol activation.

  • PyCLES: Atmospheric large eddy simulation infrastructure designed to simulate boundary layer clouds and deep convection.


  • oceanwaves-python: This toolbox provides a generic data storage object for ocean waves data (OceanWaves).

  • UTide: Python re-implementation of the Matlab package UTide.

  • PyFerret: Quick exploration of oceanographic data.

  • windspharm: Computations on global wind fields in spherical geometry.

  • cmocean: Beautiful colormaps for oceanography.

  • GSW-Python: Python implementation of the Thermodynamic Equation of Seawater 2010 (TEOS-10).

  • argopy: Argo data access, visualisation and manipulation.

  • mixsea: Turbulence parameter estimation from fine scale oceanographic data.


  • Madagascar: Multi-dimensional data processing suite

  • ObsPy: Framework for reading, writing and processing seismic and seismological data

  • Bruges: Various geophysical equations and tools

  • Segyio: Fast library for seismic SEGY files

  • Pyrocko: Seismology toolkit

  • rsudp: Continuous ObsPy-based visual display, sudden motion monitoring, and historical replay of Raspberry Shake data

  • SeismicZFP: Convert SEG-Y/ZGY files to compressed SGZ files & retrieve arbitrary sub-volumes from these, fast

Leave a Reply

Your email address will not be published.