--- id: cf-units version: "3.3.1" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # cf-units — Units of measure as required by the Climate and Forecast (CF) metadata conventions License: permissive · Maintenance: active · Downloads: 75.4K/mo ## 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 above — verify before relying. cf-units provides units of measure as defined by the Climate and Forecast (CF) Metadata Conventions, enabling standardized unit handling for scientific data in atmospheric science, oceanography, and climate research. 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 pip install cf-units uv add cf-units poetry add cf-units ## Installing cf-units 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. 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) 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. 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_current - Install friction: medium - Maintenance: active - Downloads: 75.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags CF metadata units, climate forecast units, scientific unit conversion, netcdf unit handling, earth science units, meteorology units library, climate-data, earth-science, metadata-standards [View on SkillFed](https://skillfed.io/packages/cf-units) · [View on PyPI](https://pypi.org/project/cf-units/)