Skip to main content

Units of measure as required by the Climate and Forecast (CF) metadata conventions

Project description

cf-units

Units of measure as defined by the Climate and Forecast (CF) metadata conventions.

v2.1.5 branch - not to be merged back as-is

This branch enforces legacy behaviour for uses of cftime.num2date(). master branch already wraps the latest cftime.num2date() default behaviour, which now returns a cftime.datetime object instead of a datetime.datetime; all future releases should include this as the default behaviour.

conda-forge downloads Latest version Commits since last release # contributors Travis-CI Coverage Status


Table of contents

Overview

Units of measure as required by the Climate and Forecast (CF) metadata conventions.

Provision of a wrapper class to support Unidata/UCAR UDUNITS-2 library, and the cftime calendar functionality.

Documentation can be found at https://scitools.org.uk/cf-units/docs/latest/.

Example

>>> from cf_units import Unit
>>> km = Unit('kilometers')
>>> m = Unit('meters')
>>> m.convert(1500, km)
1.5

Get in touch

  • Questions, ideas, general discussion or announcements of related projects use the Google Group.
  • Report bugs, suggest features or view the source code on GitHub.

License and copyright

cf-units is licensed under GNU Lesser General Public License (LGPLv3).

Development occurs on GitHub at https://github.com/SciTools/cf-units, with a contributor's license agreement (CLA) that can be found at https://scitools.org.uk/governance.html.

(C) British Crown Copyright, Met Office

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

cf-units-2.1.5.tar.gz (177.4 kB view details)

Uploaded Source

File details

Details for the file cf-units-2.1.5.tar.gz.

File metadata

  • Download URL: cf-units-2.1.5.tar.gz
  • Upload date:
  • Size: 177.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for cf-units-2.1.5.tar.gz
Algorithm Hash digest
SHA256 d43381d3ee4e3b01ceb29050ea9b5e1bba3bb28d9d5846dff71870162cbc5c33
MD5 97aa1d6d7627a0435e19b7a491c3b8fe
BLAKE2b-256 088c0d7ea91115eac1933449443f306a794d83b74841ecc0868c2a83db20ec3d

See more details on using hashes here.

Provenance

Supported by

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