xweights
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
Features
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.
Installation
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
Requirements
python3.6 or higher
numpy
pandas
geopandas
xarray
py-cordex
xesmf
Contact
In cases of any problems, needs or wishes do not hesitate to contact:
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.