cfdb
CF conventions multi-dimensional array storage on top of Booklet
Documentation: https://mullenkamp.github.io/cfdb/
Source Code: https://github.com/mullenkamp/cfdb
cfdb is a pure Python database for managing labeled multi-dimensional arrays following the CF conventions. It is an alternative to netCDF4/xarray, built on Booklet for local file storage and EBooklet for S3 sync. Thread-safe and multiprocessing-safe via locks.
Installation
pip install cfdb
Quick Example
import cfdb
import numpy as np
with cfdb.open_dataset('example.cfdb', flag='n') as ds:
lat = ds.create.coord.lat(data=np.linspace(-90, 90, 181, dtype='float32'))
lon = ds.create.coord.lon(data=np.linspace(-180, 180, 361, dtype='float32'))
temp = ds.create.data_var.generic('temperature', ('latitude', 'longitude'), dtype='float32')
temp[:] = np.random.rand(181, 361).astype('float32') * 40 - 10
with cfdb.open_dataset('example.cfdb') as ds:
for slices, data in ds['temperature'].iter_chunks(include_data=True):
print(slices, data.shape)
Multivariable Rechunking
Efficiently iterate over multiple variables with synchronized chunks:
with cfdb.open_dataset('data.cfdb') as ds:
# Synchronized iteration over temperature and pressure
for target_chunk, var_data in ds.iter_chunks({'latitude': 50, 'longitude': 50}):
temp = var_data['temperature']
pres = var_data['pressure']
# Perform calculations on aligned blocks
See the full documentation for user guides, concepts, and API reference.
License
This project is licensed under the terms of the Apache Software License 2.0.
Metadata
Release files for cfdb 0.11.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 |
|---|---|---|---|---|
| cfdb-0.11.0.tar.gz | 78.7 kB | Without provenance | Details for cfdb-0.11.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cfdb-0.11.0-py3-none-any.whl | Python 3 | none | any | Details for cfdb-0.11.0-py3-none-any.whl |
Total release size: 164.1 kB
Release files / cfdb-0.11.0.tar.gz
| Download URL | cfdb-0.11.0.tar.gz |
|---|---|
| Size | 78.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fc686bc87af360528f1b743e287b504b4f12e0c6036015c2a61c8a589b54f0d
|
|
BLAKE2b-256 checksum How to use checksums |
3e9ba10848012c121cfb9043252e39506c9916a4c04eba54ea6c8fbe85d28d10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.7
|
Release files / cfdb-0.11.0-py3-none-any.whl
| Download URL | cfdb-0.11.0-py3-none-any.whl |
|---|---|
| Size | 85.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fbb37b6f3a302e10307f10904e2c3f49751f71a87d3e95c090206483d143621d
|
|
BLAKE2b-256 checksum How to use checksums |
e0ae2b0c731503aad863b37b091a42767dc5b2c62606bef3fe9c2f143f3d659f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.7
|
Security for cfdb 0.11.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.