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, 180, dtype='float32'))
    lon = ds.create.coord.lon(data=np.linspace(-180, 180, 360, dtype='float32'))
    temp = ds.create.data_var.generic('temperature', ('latitude', 'longitude'), dtype='float32')
    temp[:] = np.random.rand(180, 360).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.4.0.tar.gz (52.9 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.4.0-py3-none-any.whl (59.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cfdb-0.4.0.tar.gz
Algorithm Hash digest
SHA256 d9f6f37519ce42b4eb11b6c99172e9f7cbb57afff7078a5db8a2c2c851e4ea43
MD5 b19e242d0c767b3caa55203caeaef57b
BLAKE2b-256 5b46563670b88af276241697e1542304b2b54743cf8934b188d34aa39fc1762c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cfdb-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1fed89462385c79bd2d9820a1b6246fe16ef0c80f02f47fec6f56ff4c90c380e
MD5 355fd0ce88f98a823370a014721d212b
BLAKE2b-256 01e87b677975a66c7f4973cc2fa30026169654061346dc391bf0ea6c0041e928

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