Python "xweights" contains functions to calculate grid weighted area means from predefined regions or from an user-given shapefile. This tool is a wrapper around the python package xESMF.
- Free software: MIT license
- Documentation: https://xweights.readthedocs.io
- Calculate grid-weighted-means and save the output as CSV file
- As input you need a dataset dictionary. Values are xarray.Datasets and keys correspondin strings.
Note: Before building xweights from source, firstly you need to install cartopy by using conda:
conda install -c conda-forge cartopy
You can install the package directly with pip:
pip install xweights
If you want to contribute, I recommend cloning the repository and installing the package in development mode, e.g.
git clone https://github.com/ludwiglierhammer/xweights.git
cd xweights
pip install -e .
In additon you have to install xESMF using _Conda:
conda install -c conda-forge xesmf
This will install the package but you can still edit it and you don't need the package in your PYTHONPATH
- python3.6 or higher
- numpy
- pandas
- geopandas
- xarray
- py-cordex
- xesmf
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.