Skip to main content

CF conventions multi-dimensional array storage on top of Booklet

Project description

cfdb

CF conventions multi-dimensional array storage on top of Booklet

build codecov PyPI version


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


Download files

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

Source Distribution

cfdb-0.5.2.tar.gz (58.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cfdb-0.5.2-py3-none-any.whl (65.1 kB view details)

Uploaded Python 3

File details

Details for the file cfdb-0.5.2.tar.gz.

File metadata

  • Download URL: cfdb-0.5.2.tar.gz
  • Upload date:
  • Size: 58.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.7

File hashes

Hashes for cfdb-0.5.2.tar.gz
Algorithm Hash digest
SHA256 7bd789c89b2adc47cdbe78e027496e36658058229d12464358ea413d2f536efa
MD5 95ed170df817e398d72b2fa494e283b7
BLAKE2b-256 b26c02d66fe3f92a3e56e68d545046a00bdefc63c6f9f13955c0a7c5054961bd

See more details on using hashes here.

File details

Details for the file cfdb-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: cfdb-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 65.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.7

File hashes

Hashes for cfdb-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 42404a6f3c0a93b8914935a605aae315b4c8d2325ff8160d8e04c822b2d8fda3
MD5 4c9ce79db753bd2484c80653cbca9a94
BLAKE2b-256 20a00aa7e04a938d573b82bc0028283c6ecdb130d519850bae3a9ed615869596

See more details on using hashes here.

Supported by

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