Skip to main content

CF Python

The Python cf package is an Earth science data analysis library that is built on a complete implementation of the CF data model.

Documentation

http://ncas-cms.github.io/cf-python

Dask

From version 3.14.0, the cf package uses Dask for all of its data manipulations.

Recipes

https://ncas-cms.github.io/cf-python/recipes

Tutorial

https://ncas-cms.github.io/cf-python/tutorial

Installation

http://ncas-cms.github.io/cf-python/installation

Command line utilities

During installation the cfa command line utility is also installed, which

  • generates text descriptions of field constructs contained in files, and

  • creates new datasets aggregated from existing files.

Visualization

Powerful, flexible, and very simple to produce visualizations of field constructs are available with the cf-plot package, that needs to be installed separately to the cf package.

Training

https://github.com/NCAS-CMS/cf-tools-training

Functionality

The cf package 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 cf package can:

  • read field and domain constructs from netCDF, CDL, Zarr, Kerchunk, PP and UM datasets with a choice of netCDF backends, including from local, HTTP, OPeNDAP and S3 locations,

  • be fully flexible with respect to dataset storage chunking,

  • create new field and domain constructs in memory,

  • write and append field and domain constructs to netCDF and Zarr v3 datasets on disk, with control over HDF5 internal file metadata,

  • read, write, and manipulate UGRID mesh topologies,

  • read, write, and manipulate HEALPix grids,

  • 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,

  • 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 data that are quantized to eliminate false precision,

  • convert field and domain constructs to xarray datasets in memory,

  • inspect field constructs,

  • test whether two field constructs are the same,

  • modify field construct metadata and data,

  • create subspaces of field constructs,

  • incorporate, and create, metadata stored in external files,

  • combine field constructs arithmetically,

  • manipulate field construct data by arithmetical and trigonometrical operations,

  • perform weighted statistical collapses on field constructs, including those with geometry cells, UGRID mesh topologies, and HEALPix grids,

  • perform histogram, percentile and binning operations on field constructs,

  • regrid structured grid, UGRID, HEALPix, and DSG field constructs with (multi-)linear, nearest neighbour, first- and second-order conservative and higher order patch recovery methods, including 3-d regridding, and large-grid support,

  • apply convolution filters to field constructs,

  • create running means from field constructs,

  • apply differential operators to field constructs, and

  • create derived quantities (such as relative vorticity).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cf_python-3.21.0.tar.gz (5.4 MB view details)

Uploaded Source

File details

Details for the file cf_python-3.21.0.tar.gz.

File metadata

  • Download URL: cf_python-3.21.0.tar.gz
  • Upload date:
  • Size: 5.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for cf_python-3.21.0.tar.gz
Algorithm Hash digest
SHA256 792143b989d7ec91819746fa001389dcbd33aa6be2632fc839db0dbddbed6d80
MD5 96f6c11737cc399c5c1c4533527bfde3
BLAKE2b-256 2cf2ea1924b28b7714c95c01a9441c81308842dbb278cd4dfb21ecf4e1622d38

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

3.21.0 This release

1 file

3.20.1

1 file

3.20.0

1 file

3.19.0

1 file

3.18.2

1 file

3.18.1

1 file

3.18.0

1 file

3.17.0

1 file

3.16.3

1 file

3.16.2

1 file

3.16.1

1 file

3.16.0

1 file

3.15.4

1 file

3.15.3

1 file

3.15.2

1 file

3.15.1

1 file

3.15.0

1 file

3.14.1

1 file

3.14.0

1 file

3.13.1

1 file

3.13.0

1 file

3.12.0

1 file

3.11.0

1 file

3.10.0

1 file

3.9.0

1 file

3.8.0

1 file

3.7.0

1 file

3.6.0

1 file

3.5.1

1 file

3.5.0

1 file

3.4.0

1 file

3.3.0

1 file

3.2.0

1 file

3.1.0

1 file

3.0.6

1 file

3.0.5

1 file

3.0.4

1 file

3.0.3

1 file

3.0.2

1 file

3.0.1

1 file

3.0.0

1 file

2.3.8

1 file

2.3.6

1 file

2.3.5

1 file

2.3.4

1 file

2.3.3

1 file

2.3.2

1 file

2.3.1

1 file

2.3.0

1 file

2.2.7

1 file

2.2.6

1 file

2.2.5

1 file

2.2.4

1 file

2.2.3

1 file

2.2.1

1 file

2.2.0

1 file

2.1.9

1 file

2.1.6

1 file

2.1.3

1 file

2.1.2

1 file

2.1.1

1 file

2.1

1 file

2.0.6

1 file

2.0.5

1 file

2.0.4

1 file

2.0.3

1 file

2.0.2

1 file

2.0.1.post2

1 file

2.0.1.post1

1 file

2.0.1

1 file

2.0

1 file

1.5.4.post6

1 file

1.5.4.post5

1 file

1.5.4.post4

1 file

1.5.4.post3

1 file

1.5.4.post1

1 file

1.5.4

1 file

1.5.3.post1

1 file

1.5.3

1 file

1.5.2

1 file

1.5.1

1 file

1.5

1 file

1.4

1 file

1.3.3

1 file

1.3.2

1 file

1.3.1

1 file

1.2.3

1 file

1.2.2

1 file

1.2.1

1 file

1.2

1 file

1.1.13

1 file

1.1.11

1.1.10

1 file

1.1.9

1 file

1.1.8

1 file

1.1.7

1 file

1.1.6

1 file

1.1.5

1 file

1.1.4

1 file

1.1.3

1 file

1.1.2

1 file

1.1.1

1 file

1.1

1 file

1.0.3

1 file

1.0.2

1 file

1.0.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page