cfdm
cfdm: A Python reference implementation of the CF data model - Published in JOSS (2020)
Science Score: 98.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 10 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org, zenodo.org -
✓Committers with academic emails
2 of 4 committers (50.0%) from academic institutions -
✓Institutional organization owner
Organization ncas-cms has institutional domain (cms.ncas.ac.uk) -
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Scientific Fields
Repository
A Python reference implementation of the CF data model
Basic Info
- Host: GitHub
- Owner: NCAS-CMS
- License: mit
- Language: Python
- Default Branch: main
- Homepage: http://ncas-cms.github.io/cfdm
- Size: 73.8 MB
Statistics
- Stars: 31
- Watchers: 4
- Forks: 12
- Open Issues: 34
- Releases: 22
Topics
Metadata Files
README.md
cfdm
A Python reference implementation of the CF data model.
References
Documentation
https://ncas-cms.github.io/cfdm
Dask
From version 1.11.2.0 the cfdm package uses
Dask for all of its data manipulations.
Installation
https://ncas-cms.github.io/cfdm/installation
Tutorial
https://ncas-cms.github.io/cfdm/tutorial
Functionality
The cfdm package fully implements the CF data
model
for its internal data structures and so is able to process any
CF-compliant dataset. It is not strict about CF-compliance, however,
so that partially conformant datasets may be ingested from existing
datasets and written to new datasets. This is so that datasets which
are partially conformant may nonetheless be modified in memory.
The central elements defined by the CF data model are the field construct, which corresponds to CF-netCDF data variable with all of its metadata; and the domain contruct, which may be the domain of a field construct or corresponds to a CF-netCDF domain variable with all of its metadata.
A simple example of reading a field construct from a file and inspecting it:
>>> import cfdm
>>> f = cfdm.read('file.nc')
>>> f
[<Field: air_temperature(time(12), latitude(64), longitude(128)) K>]
>>> print(f[0])
Field: air_temperature (ncvar%tas)
----------------------------------
Data : air_temperature(time(12), latitude(64), longitude(128)) K
Cell methods : time(12): mean (interval: 1.0 month)
Dimension coords: time(12) = [0450-11-16 00:00:00, ..., 0451-10-16 12:00:00] noleap
: latitude(64) = [-87.8638, ..., 87.8638] degrees_north
: longitude(128) = [0.0, ..., 357.1875] degrees_east
: height(1) = [2.0] m
The cfdm package can:
- read field and domain constructs from netCDF, CDL, and Zarr datasets with a choice of netCDF backends, and in local, http, and s3 locations,
- be fully flexible with respect to HDF5 chunking,
- create new field and domain constructs in memory,
- write and append field and domain constructs to netCDF datasets on disk,
- read, write, and manipulate UGRID mesh topologies,
- read, write, and create coordinates defined by geometry cells,
- read and write netCDF4 string data-type variables,
- read, write, and create netCDF and CDL datasets containing hierarchical groups,
- inspect field and domain constructs,
- test whether two constructs are the same,
- modify field and domain construct metadata and data,
- create subspaces of field and domain constructs, from indices or metadata values,
- incorporate, and create, metadata stored in external files, and
- read, write, and create data that have been compressed by convention (i.e. ragged or gathered arrays, or coordinate arrays compressed by subsampling), whilst presenting a view of the data in its uncompressed form,
- read and write that data that are quantized to eliminate false precision.
Command line utility
During installation the cfdump command line tool is also installed,
which generates text descriptions of the field constructs contained in
a netCDF dataset:
$ cfdump file.nc
Field: air_temperature (ncvar%tas)
----------------------------------
Data : air_temperature(time(12), latitude(64), longitude(128)) K
Cell methods : time(12): mean (interval: 1.0 month)
Dimension coords: time(12) = [0450-11-16 00:00:00, ..., 0451-10-16 12:00:00] noleap
: latitude(64) = [-87.8638, ..., 87.8638] degrees_north
: longitude(128) = [0.0, ..., 357.1875] degrees_east
: height(1) = [2.0] m
Tests
Tests are run from within the cfdm/test directory:
$ python run_tests.py
Citation
If you use cfdm, either as a stand-alone application or to provide a CF data model implementation to another software library, please consider including the reference:
Hassell et al., (2020). cfdm: A Python reference implementation of the CF data model. Journal of Open Source Software, 5(54), 2717, https://doi.org/10.21105/joss.02717
@article{Hassell2020,
doi = {10.21105/joss.02717},
url = {https://doi.org/10.21105/joss.02717},
year = {2020},
publisher = {The Open Journal},
volume = {5},
number = {54},
pages = {2717},
author = {David Hassell and Sadie L. Bartholomew},
title = {cfdm: A Python reference implementation of the CF data model},
journal = {Journal of Open Source Software}
}
Owner
- Name: NCAS CMS
- Login: NCAS-CMS
- Kind: organization
- Location: UK
- Website: http://cms.ncas.ac.uk/
- Repositories: 10
- Profile: https://github.com/NCAS-CMS
Useful tools to support NERC weather and climate research
JOSS Publication
cfdm: A Python reference implementation of the CF data model
Authors
Tags
CF metadata climate meteorology oceanographyCodeMeta (codemeta.json)
{
"@context": "https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld",
"@type": "Code",
"author": [
{
"@id": "https://orcid.org/0000-0001-5106-7502",
"@type": "Person",
"email": "david.hassell@ncas.ac.uk",
"name": "David Hassell",
"affiliation": "NCAS"
},
{
"@id": "https://orcid.org/0000-0002-6180-3603",
"@type": "Person",
"email": "sadie.bartholomew@ncas.ac.uk",
"name": "Sadie L. Bartholomew",
"affiliation": "NCAS"
}
],
"identifier": "",
"codeRepository": "https://github.com/NCAS-CMS/cfdm",
"datePublished": "2025-10-15",
"dateModified": "2025-10-15",
"dateCreated": "2025-10-15",
"description": "A Python reference implementation of the CF data model.",
"keywords": "cf, metadata, netcdf, python",
"license": "MIT",
"title": "cfdm",
"version": "1.12.3.1"
}
GitHub Events
Total
- Create event: 6
- Release event: 4
- Issues event: 30
- Watch event: 2
- Issue comment event: 33
- Push event: 26
- Pull request review comment event: 58
- Pull request review event: 62
- Pull request event: 29
- Fork event: 1
Last Year
- Create event: 6
- Release event: 4
- Issues event: 30
- Watch event: 2
- Issue comment event: 33
- Push event: 26
- Pull request review comment event: 58
- Pull request review event: 62
- Pull request event: 29
- Fork event: 1
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| David Hassell | d****l@n****k | 2,547 |
| Sadie Louise Bartholomew | s****w@n****k | 524 |
| Ankit Bhandekar | 8****t | 6 |
| William McGinty | 3****S | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 101
- Total pull requests: 154
- Average time to close issues: about 1 month
- Average time to close pull requests: 13 days
- Total issue authors: 4
- Total pull request authors: 3
- Average comments per issue: 0.93
- Average comments per pull request: 1.47
- Merged pull requests: 140
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 22
- Pull requests: 29
- Average time to close issues: 16 days
- Average time to close pull requests: 11 days
- Issue authors: 2
- Pull request authors: 2
- Average comments per issue: 0.77
- Average comments per pull request: 0.45
- Merged pull requests: 22
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- davidhassell (75)
- sadielbartholomew (23)
- martinjuckes (2)
- JonathanGregory (1)
Pull Request Authors
- davidhassell (134)
- sadielbartholomew (18)
- bewithankit (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 1,258 last-month
-
Total dependent packages: 1
(may contain duplicates) -
Total dependent repositories: 4
(may contain duplicates) - Total versions: 69
- Total maintainers: 2
pypi.org: cfdm
A Python reference implementation of the CF data model
- Homepage: https://ncas-cms.github.io/cfdm
- Documentation: https://cfdm.readthedocs.io/
- License: MIT
-
Latest release: 1.8.5
published over 5 years ago
Rankings
Maintainers (2)
conda-forge.org: cfdm
- Homepage: https://ncas-cms.github.io/cfdm
- License: MIT
-
Latest release: 1.8.5
published over 5 years ago
Rankings
Dependencies
- actions/checkout v2 composite
- actions/setup-python v2 composite
- pre-commit/action v2.0.0 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
- codecov/codecov-action v1 composite
- conda-incubator/setup-miniconda v2 composite
- cftime >=1.6.0
- netCDF4 >=1.5.4
- netcdf-flattener >=1.2.0
- numpy >=1.15
- packaging >=20.0
