Climatrix is a flexible toolbox for sampling and reconstructing climate datasets.
It provides utilities and an xarray accessor that simplifies the workflow of working with climate data arrays — from preprocessing to statistical sampling.
- Name: Jakub Walczak
- GitHub: @jamesWalczak
- Email: [email protected]
- Name: Wojciech Żyndul
- GitHub: @wzyndul
- Email: [email protected]
Caution
This is an alpha release – features are still evolving, and breaking changes may occur.
These instructions will get you a copy of the project up and running on your local machine.
git clone https://github.com/jamesWalczak/climatrix/
cd climatrix
Important
The project is now available via PyPI (pip install climatrix
)
Getting started and API reference are available in the official documentation.
🔍 Click to expand example: Accessing `climatrix` features
import climatrix as cm
import xarray as xr
my_dataset = "/file/to/netcdf.nc
cm_dset = xr.open_dataset(my_dataset).cm
📊 Click to expand example: Getting values of coordinate
import climatrix as cm
import xarray as xr
my_dataset = "/file/to/netcdf.nc"
cm_dset = xr.open_dataset(my_dataset).cm
print("Latitude values: ", cm_dset.latitude)
print("Time values: ", cm_dset.time)
📊 Subsetting by bounding box
import climatrix as cm
import xarray as xr
my_dataset = "/file/to/netcdf.nc"
cm_dset = xr.open_dataset(my_dataset).cm
europe = cm_dset.cm.subset(north=71, south=36, west=-24, east=35)
- 🧭 Easy access to coordinate data (similar to MetPy), using regex to locate lat/lon
- 📊 Sampling of climate data, both uniformly and using normal-like distributions
- 🔁 Reconstruction via:
- IDW (Inverse Distance Weighting)
- Ordinary Kriging
- SIREN (Sinusoidal INR)
- 🧪 Tools to compare reconstruction results
- 📈 Plotting utilities for visualizing inputs and outputs
This project is licensed under the MIT License - see the LICENSE file for details.
The rules for contributing on the project are described in CONTRIBUTING file in details.
If you are using this software in scientific work, cite us:
@misc{climatrix,
author = {Walczak, J., Żyndul, W.},
title = {climatrix: Climate data reconstruction made simple },
year = {2025},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/jamesWalczak/climatrix}},
}