ndpyramid
A small utility for generating ND array pyramids using Xarray and Zarr.
installation
Ndpyramid can be installed in three ways:
Using the conda package manager that comes with the Anaconda/Miniconda distribution:
conda install ndpyramid --channel conda-forge
Using the pip package manager:
python -m pip install ndpyramid
To install a development version from source:
git clone https://github.com/carbonplan/ndpyramid
cd ndpyramid
python -m pip install -e .
optional dependencies
Depending on your use case you can specify optional dependencies on install.
python -m pip install "ndpyramid[xesmf]" # Install optional dependencies for regridding with ESMF
python -m pip install "ndpyramid[dask]" # Install optional dependencies for resampling with pyresample and Dask
python -m pip install "ndpyramid[complete]" # Install all optional dependencies
usage
Ndpyramid provides a set of utilities for creating pyramids with standardized metadata.
The example below demonstrates the usage of the pyramid_coarsen and pyramid_reproject
utilities. Check out the examples gallery
for more complete demonstrations.
import xarray as xr
import rioxarray
from ndpyramid import pyramid_coarsen, pyramid_reproject
# make a reprojected (EPSG:3857) pyramid
ds = ds.rio.write_crs('EPSG:4326')
pyramid = pyramid_reproject(ds, levels=2)
# write the pyramid to zarr
pyramid.to_zarr('./path/to/write')
See the docstrings and API documentation for more details about input parameters and options.
license
All the code in this repository is MIT-licensed, but we request that you please provide attribution if reusing any of our digital content (graphics, logo, articles, etc.).
about us
CarbonPlan is a nonprofit organization that uses data and science for climate action. We aim to improve the transparency and scientific integrity of climate solutions with open data and tools. Find out more at carbonplan.org or get in touch by opening an issue or sending us an email.
Metadata
Release files for ndpyramid 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ndpyramid-0.4.0.tar.gz | 1.2 MB | Without provenance | Details for ndpyramid-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ndpyramid-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for ndpyramid-0.4.0-py3-none-any.whl |
Total release size: 1.2 MB
Release files / ndpyramid-0.4.0.tar.gz
| Download URL | ndpyramid-0.4.0.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
674b004706e69c6f459035617e361fa11c9fdd90dd0f28bc8c3fb92a93ae20d1
|
|
BLAKE2b-256 checksum How to use checksums |
3ad2ad4a6308cd2412263bb935b0628da9218d37b64c2a11e8ae7d6d36ea640b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / ndpyramid-0.4.0-py3-none-any.whl
| Download URL | ndpyramid-0.4.0-py3-none-any.whl |
|---|---|
| Size | 17.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
85236921f5af8b6e4d78b8583d05a8a92b4aa2066edd228fc5e13bc4da0b830a
|
|
BLAKE2b-256 checksum How to use checksums |
045639f30314dc39fe3637ac5f092785cef0bb613da6d5d268b85059eadce0b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for ndpyramid 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.