Skip to main content

Retrieve information content and compress accordingly.

Project description


xbitinfo: Retrieve information content and compress accordingly

Binder CI pre-commit.ci status Documentation Status pypi Conda (channel only)

This is an xarray-wrapper around BitInformation.jl to retrieve and apply bitrounding from within python. The package intends to present an easy pipeline to compress (climate) datasets based on the real information content.

How the science works

Paper

Klöwer, M., Razinger, M., Dominguez, J. J., Düben, P. D., & Palmer, T. N. (2021). Compressing atmospheric data into its real information content. Nature Computational Science, 1(11), 713–724. doi: 10/gnm4jj

Video

Video

Julia Repository

BitInformation.jl

How to install

Preferred installation

conda install -c conda-forge xbitinfo

Alternative installation

pip install xbitinfo # ensure to install julia manually

How to use

import xarray as xr
import xbitinfo as xb
ds = xr.tutorial.load_dataset(inpath)
bitinfo = xb.get_bitinformation(ds, dim="lon")  # calling bitinformation.jl.bitinformation
keepbits = xb.get_keepbits(bitinfo, inflevel=0.99)  # get number of mantissa bits to keep for 99% real information
ds_bitrounded = xb.xr_bitround(ds, keepbits)  # bitrounding keeping only keepbits mantissa bits
ds_bitrounded.to_compressed_netcdf(outpath)  # save to netcdf with compression

Credits

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

xbitinfo-0.0.3.tar.gz (48.4 kB view details)

Uploaded Source

Built Distribution

xbitinfo-0.0.3-py2.py3-none-any.whl (22.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file xbitinfo-0.0.3.tar.gz.

File metadata

  • Download URL: xbitinfo-0.0.3.tar.gz
  • Upload date:
  • Size: 48.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for xbitinfo-0.0.3.tar.gz
Algorithm Hash digest
SHA256 31024abfbf0e6853531dc6315a250ef2e4509a6d846cc44ddff5c80f12a58ae9
MD5 cd8431e871f6e2829e1662f90bd75940
BLAKE2b-256 f927f7893d9edca12c34d1177f5eab10e5fc847139078ab57a167342e746ab2c

See more details on using hashes here.

File details

Details for the file xbitinfo-0.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: xbitinfo-0.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for xbitinfo-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3acd10d05495043f05b07280feb28ffd5a6832b644b3d01486aaba87dee021dd
MD5 3b6405ef3191fd14cc7ca16422c29cfe
BLAKE2b-256 82121ae1ce880a290b91c55c3570c42fe560b5c22bc2c227377d8dc764cca640

See more details on using hashes here.

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