CF conventions multi-dimensional array storage on top of Booklet
Project description
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)
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cfdb-0.5.10.tar.gz.
File metadata
- Download URL: cfdb-0.5.10.tar.gz
- Upload date:
- Size: 61.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ef35a1adde29c2ca81c6ca2c1a97a86c8665d6505147f4aeb6ef9bfe7fc29cc
|
|
| MD5 |
a76639c787a0521c3cc01b0bfe199692
|
|
| BLAKE2b-256 |
cdbb99aa4d6950bd790adf02bf3e717ccb5de0fdb5ee77249af8583298960bae
|
File details
Details for the file cfdb-0.5.10-py3-none-any.whl.
File metadata
- Download URL: cfdb-0.5.10-py3-none-any.whl
- Upload date:
- Size: 68.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07e065ce9d3efb2615a96fcd4ead5d65beba94b2fe137dfdad0a23da4601da95
|
|
| MD5 |
dff43181d3927d6c89897e6e21f97deb
|
|
| BLAKE2b-256 |
f29e3be98eaf7d19ae2a2b9130ad4aa6324b28c1e963cbb76a370dea5780e742
|