Skip to content

SciTools/cf-units

Folders and files

NameName
Last commit message
Last commit date
May 11, 2021
Jun 2, 2018
Jan 29, 2019
Jan 6, 2016
Jan 17, 2019
Jan 29, 2019
May 10, 2021
Sep 14, 2015
Mar 12, 2015
Mar 12, 2015
Nov 24, 2018
May 22, 2018
May 11, 2021
Feb 19, 2020
Feb 19, 2020
Jan 29, 2019
May 10, 2021
Jan 6, 2016

Repository files navigation

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