Skip to content

jamesWalczak/climatrix

Repository files navigation

🌍 climatrix


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.


👤 Author


👥 Contributors


📌 Version

Caution

This is an alpha release – features are still evolving, and breaking changes may occur.


📚 Table of Contents


🚀 Getting Started

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)


⚙️ Usage

Getting started and API reference are available in the official documentation.


🧪 Examples

🔍 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)

🛠️ Features

  • 🧭 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

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👥 Contributing

The rules for contributing on the project are described in CONTRIBUTING file in details.


🙏 Citation

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}},
}

About

Climate data reconstruction made simple

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5