Skip to main content

Python xweights contains functionsto create grid weighted area means

Project description

xweights

https://github.com/ludwiglierhammer/xweights/actions/workflows/ci.yml/badge.svg https://codecov.io/gh/ludwiglierhammer/xweights/branch/main/graph/badge.svg https://img.shields.io/pypi/v/xweights.svg Documentation Status pre-commit.ci status

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 https://xesmf.readthedocs.io

Features

  • Calculate grid-weighted-means and save the output as CSV file

  • As input you can choose between files on disk and intake-esm catalogues. Xarray dataset input is under development.

  • Use all these features as an command-line tool too

Installation

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

  • intake-esm

  • xarray

  • py-cordex

  • xesmf

Contact

In cases of any problems, needs or wishes do not hesitate to contact:

ludwig.lierhammer@hereon.de

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2022-03-04)

  • First release on PyPI.

0.1.1 (2022-07-01)

  • adjusted to pre-commit

  • use functions from pyhomogenize

0.1.2 (2022-07-08)

  • change pyhomogenize version requirements

0.2.0 (2022-07-11)

  • rename spatial_averager

  • kepp geometry attributes

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xweights-0.2.0.tar.gz (30.0 kB view details)

Uploaded Source

Built Distribution

xweights-0.2.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file xweights-0.2.0.tar.gz.

File metadata

  • Download URL: xweights-0.2.0.tar.gz
  • Upload date:
  • Size: 30.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for xweights-0.2.0.tar.gz
Algorithm Hash digest
SHA256 72210049edcfe0feaf1e6ff91ec69cf554a067295799c10d72dd99dc905fc6d7
MD5 a9358814d412c3e9cc06be80ec4adb46
BLAKE2b-256 f6d854f63090b0c21457e1f5a569da2fb4bae9b5c390667036d0a713cd899323

See more details on using hashes here.

Provenance

File details

Details for the file xweights-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: xweights-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for xweights-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5757654095963b6883f208f3c14b53bc25c3a61c85add2601d064913bb496b59
MD5 fab15c38918fb1862a2a6753ce7aabbf
BLAKE2b-256 d3725138b79d56e497839d421347bf50dcee055d7ebe5cec19c1b99e15766ea1

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page