cf-units
Units of measure as required by the Climate and Forecast (CF) metadata conventions
Decision gist · record as of 2026-08-14
Yes. cf-units is production-stable, actively maintained, has no known vulnerabilities, and carries a permissive license. Install friction is moderate but manageable via pre-built wheels. Install it if you work with CF-compliant earth science data (climate, oceanography, meteorology) and need standardized unit handling; otherwise it is not necessary.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11 or later; compiled wheels are available for macOS (arm64, x86_64), Linux (x86_64), and Windows (amd64)—other platforms may require building from source.
- Medium install friction due to compiled wheels for specific platforms (macOS arm64/x86_64, Linux x86_64, Windows amd64).
- Actively maintained with recent releases; last commit 2026-08-10 and production-stable status indicate reliable upkeep.
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause (permissive) allows commercial and private use with minimal restrictions, requiring only license and copyright notice retention.
last release 2026-01-16 (210 days) · last repo commit 2026-08-10 · 80 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 75,415 downloads/mo, #14,718 on PyPI
Alternatives
Verify before relying
pip install cf-units
import cf_units
# Create a unit object following CF conventions
temperature_unit = cf_units.Unit('K') # Kelvin
print(temperature_unit)- Whether the package handles unit conversion between different CF-compliant systems or only validates/represents units.
- Performance characteristics when working with large arrays or high-frequency unit operations.
What it is and what it does
cf-units is a Python library that implements units of measure as specified by the Climate and Forecast Metadata Conventions, a standard used across earth science data formats like NetCDF. It depends on numpy for array operations, cftime for time-related units, and jinja2 for template rendering. The package is designed for scientists and researchers working with atmospheric, oceanographic, and climate data who need to ensure their measurements conform to CF standards.
The library handles unit representation, validation, and operations within the CF framework. It is actively maintained, supports Python 3.11–3.14, and provides pre-built wheels for common platforms (macOS, Linux, Windows), reducing installation complexity for most users. With no known security vulnerabilities and a permissive BSD-3-Clause license, it is suitable for both academic and commercial projects.
Use it for
- Validate and standardize units in NetCDF climate datasets to ensure CF metadata compliance.
- Convert between equivalent unit representations in atmospheric and oceanographic data pipelines.
- Build data processing workflows that require consistent unit handling across multiple earth science sources.
- Integrate CF-compliant unit metadata into scientific data analysis and visualization tools.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
cf-units is production-stable, actively maintained, has no known vulnerabilities, and carries a permissive license. Install friction is moderate but manageable via pre-built wheels. Install it if you work with CF-compliant earth science data (climate, oceanography, meteorology) and need standardized unit handling; otherwise it is not necessary.
Install
cf-units on PyPI
Before you install
Medium install friction due to compiled wheels for specific platforms (macOS arm64/x86_64, Linux x86_64, Windows amd64). Actively maintained with recent releases; last commit 2026-08-10 and production-stable status indicate reliable upkeep.
Requires Python 3.11 or later; compiled wheels are available for macOS (arm64, x86_64), Linux (x86_64), and Windows (amd64)—other platforms may require building from source.
License in practice
BSD-3-Clause (permissive) allows commercial and private use with minimal restrictions, requiring only license and copyright notice retention.
Quickstart
pip install cf-units
import cf_units
# Create a unit object following CF conventions
temperature_unit = cf_units.Unit('K') # Kelvin
print(temperature_unit)
Verify before relying
- Whether the package handles unit conversion between different CF-compliant systems or only validates/represents units.
- Performance characteristics when working with large arrays or high-frequency unit operations.
Package facts
| License | BSD-3-Clause permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 3 packagescftimejinja2numpy |
| Maintenance | Actively maintained 210 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 75,415 / month, #14,718 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTopic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Atmospheric ScienceTopic :: Scientific/Engineering :: Oceanography |
Evidence: cf_units-3.3.1-cp311-abi3-macosx_15_0_arm64.whl; cf_units-3.3.1-cp311-abi3-macosx_15_0_x86_64.whl; cf_units-3.3.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; cf_units-3.3.1-cp311-abi3-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “CF metadata units”
- cf-unitscf-units provides units of measure as defined by the Climate and…
- cf-xarraycf-xarray adds a `.cf` accessor to xarray objects that lets you…
- cfenvParses Cloud Foundry environment variables and service credentials…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also cf-xarray · nc-time-axis · cftime · earthkit-data · cfgrib · gsw · scikit-base · meteostat · unyt · conda-pack