{"id":13948871,"url":"https://github.com/NCAS-CMS/cf-python","last_synced_at":"2025-07-20T11:30:23.773Z","repository":{"id":37470564,"uuid":"208229281","full_name":"NCAS-CMS/cf-python","owner":"NCAS-CMS","description":"A CF-compliant Earth Science data analysis library","archived":false,"fork":false,"pushed_at":"2025-07-09T13:45:50.000Z","size":142761,"stargazers_count":139,"open_issues_count":115,"forks_count":22,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-14T06:02:31.536Z","etag":null,"topics":["cf","cfdm","cfunits","data-analysis","earth-science","metadata","netcdf","pp","python","um"],"latest_commit_sha":null,"homepage":"http://ncas-cms.github.io/cf-python","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NCAS-CMS.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.rst","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-09-13T08:57:37.000Z","updated_at":"2025-07-09T13:45:58.000Z","dependencies_parsed_at":"2023-09-21T20:03:28.618Z","dependency_job_id":"4d1e9cbf-b6be-4e87-b76e-ea15f2a77d49","html_url":"https://github.com/NCAS-CMS/cf-python","commit_stats":{"total_commits":3961,"total_committers":13,"mean_commits":304.6923076923077,"dds":0.4127745518808382,"last_synced_commit":"e123a8e42dddef4835d857e2a02c36d64e4c29b9"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/NCAS-CMS/cf-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCAS-CMS%2Fcf-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCAS-CMS%2Fcf-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCAS-CMS%2Fcf-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCAS-CMS%2Fcf-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NCAS-CMS","download_url":"https://codeload.github.com/NCAS-CMS/cf-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCAS-CMS%2Fcf-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265510399,"owners_count":23779543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cf","cfdm","cfunits","data-analysis","earth-science","metadata","netcdf","pp","python","um"],"created_at":"2024-08-08T05:01:33.048Z","updated_at":"2025-07-20T11:30:23.768Z","avatar_url":"https://github.com/NCAS-CMS.png","language":"Python","funding_links":[],"categories":["Climate Change"],"sub_categories":["Climate Data Standards"],"readme":"cf-python\n=========\n\nThe Python `cf` package is an Earth Science data analysis library that\nis built on a complete implementation of the CF data model.\n\n[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/NCAS-CMS/cf-python?color=000000\u0026label=latest%20version)](https://ncas-cms.github.io/cf-python/Changelog.html)\n[![PyPI](https://img.shields.io/pypi/v/cf-python?color=000000)](https://pypi.org/project/cf-python/)\n[![Conda](https://img.shields.io/conda/v/conda-forge/cf-python?color=000000)](https://anaconda.org/conda-forge/cf-python)\n\n[![Conda](https://img.shields.io/conda/pn/conda-forge/cf-python?color=2d8659)](https://ncas-cms.github.io/cf-python/installation.html#operating-systems)\n[![Website](https://img.shields.io/website?color=2d8659\u0026down_message=online\u0026label=documentation\u0026up_message=online\u0026url=https%3A%2F%2Fncas-cms.github.io%2Fcf-python%2F)](https://ncas-cms.github.io/cf-python/index.html)\n[![GitHub](https://img.shields.io/github/license/NCAS-CMS/cf-python?color=2d8659)](https://github.com/NCAS-CMS/cf-python/blob/main/LICENSE)\n\n[![Codecov](https://img.shields.io/codecov/c/github/NCAS-CMS/cfdm?color=006666)](https://codecov.io/gh/NCAS-CMS/cfdm)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/NCAS-CMS/cfdm/run-test-suite.yml?branch=main?color=006666\u0026label=test%20suite%20workflow)](https://github.com/NCAS-CMS/cfdm/actions)\n\n[![fair-software.eu](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8B-yellow)](https://fair-software.eu)\n\n#### References\n\n[![Website](https://img.shields.io/website?down_color=264d73\u0026down_message=10.5281%2Fzenodo.3894533\u0026label=DOI\u0026up_color=264d73\u0026up_message=10.5281%2Fzenodo.3894533\u0026url=https%3A%2F%2Fdoi.org%2F10.5281%2Fzenodo.3894533)](https://doi.org/10.5281/zenodo.3894533)\n[![Website](https://img.shields.io/website?down_color=264d73\u0026down_message=10.5194%2Fgmd-10-4619-2017\u0026label=GMD\u0026up_color=264d73\u0026up_message=10.5194%2Fgmd-10-4619-2017\u0026url=https%3A%2F%2Fwww.geosci-model-dev.net%2F10%2F4619%2F2017%2F)](https://www.geosci-model-dev.net/10/4619/2017/)\n[![Website](https://img.shields.io/website?down_color=264d73\u0026down_message=10.21105%2Fjoss.02717\u0026label=JOSS\u0026up_color=264d73\u0026up_message=10.21105%2Fjoss.02717\u0026url=https:%2F%2Fjoss.theoj.org%2Fpapers%2F10.21105%2Fjoss.02717%2Fstatus.svg)](https://doi.org/10.21105/joss.02717)\n\nDask\n====\n\nFrom version 3.14.0 the `cf` package uses\n[Dask](https://docs.dask.org) for all of its data manipulations.\n\nDocumentation\n=============\n\nhttp://ncas-cms.github.io/cf-python\n\nInstallation\n============\n\nhttp://ncas-cms.github.io/cf-python/installation.html\n\nCheat Sheet\n===========\n\nhttps://ncas-cms.github.io/cf-python/cheat_sheet.html\n\nRecipes\n=======\n\nhttps://ncas-cms.github.io/cf-python/recipes\n\nTutorial\n========\n\nhttps://ncas-cms.github.io/cf-python/tutorial.html\n\nFunctionality\n=============\n\nThe `cf` package implements the [CF data\nmodel](https://cfconventions.org/cf-conventions/cf-conventions.html#appendix-CF-data-model)\nfor its internal data structures and so is able to process any\nCF-compliant dataset. It is not strict about CF-compliance, however,\nso that partially conformant datasets may be ingested from existing\ndatasets and written to new datasets. This is so that datasets which\nare partially conformant may nonetheless be modified in memory.\n\nA simple example of reading a field construct from a file and\ninspecting it:\n\n    \u003e\u003e\u003e import cf\n    \u003e\u003e\u003e f = cf.read('file.nc')\n    \u003e\u003e\u003e print(f[0])\n    Field: air_temperature (ncvar%tas)\n    ----------------------------------\n    Data            : air_temperature(time(12), latitude(64), longitude(128)) K\n    Cell methods    : time(12): mean (interval: 1.0 month)\n    Dimension coords: time(12) = [1991-11-16 00:00:00, ..., 1991-10-16 12:00:00] noleap\n                    : latitude(64) = [-87.8638, ..., 87.8638] degrees_north\n                    : longitude(128) = [0.0, ..., 357.1875] degrees_east\n                    : height(1) = [2.0] m\n\nThe `cf` package uses\n[Dask](https://ncas-cms.github.io/cf-python/performance.html) for all\nof its array manipulation and can:\n\n* read field constructs from netCDF, CDL, Zarr, PP and UM datasets with a\n  choice of netCDF backends,and in local, http, and s3 locations,\n* create new field constructs in memory,\n* write and append field and domain constructs to netCDF datasets on disk,\n* read, create, and manipulate UGRID mesh topologies,\n* read, write, and create coordinates defined by geometry cells,\n* read netCDF and CDL datasets containing hierarchical groups,\n* inspect field constructs,\n* test whether two field constructs are the same,\n* modify field construct metadata and data,\n* create subspaces of field constructs,\n* write field constructs to netCDF datasets on disk,\n* incorporate, and create, metadata stored in external files,\n* read, write, and create data that have been compressed by convention\n  (i.e. ragged or gathered arrays, or coordinate arrays compressed by\n  subsampling), whilst presenting a view of the data in its\n  uncompressed form,\n* combine field constructs arithmetically,\n* manipulate field construct data by arithmetical and trigonometrical\n  operations,\n* perform weighted statistical collapses on field constructs,\n  including those with geometry cells and UGRID mesh topologies,\n* perform histogram, percentile and binning operations on field\n  constructs,\n* regrid structured grid, mesh and DSG field constructs with\n  (multi-)linear, nearest neighbour, first- and second-order\n  conservative and higher order patch recovery methods, including 3-d\n  regridding,\n* apply convolution filters to field constructs,\n* create running means from field constructs,\n* apply differential operators to field constructs,\n* create derived quantities (such as relative vorticity).\n* read and write that data that are quantized to eliminate false\n  precision.\n\nVisualization\n=============\n\nPowerful and flexible visualizations of `cf` field constructs,\ndesigned to be produced and configured in as few lines of code as\npossible, are available with the [cf-plot\npackage](https://ncas-cms.github.io/cf-plot/build/index.html), which\nneeds to be installed separately to the `cf` package.\n\nSee the [cf-plot\ngallery](https://ncas-cms.github.io/cf-plot/build/gallery.html) for a\nrange of plotting possibilities with example code.\n\n![Example outputs of cf-plot displaying selected aspects of `cf` field constructs](https://raw.githubusercontent.com/NCAS-CMS/cf-plot/master/docs/source/images/cf_gallery_image.png)\n\nCommand line utilities\n======================\n\nDuring installation the ``cfa`` command line utility is also\ninstalled, which\n\n* generates text descriptions of field constructs contained in files,\n  and\n\n* creates new datasets aggregated from existing files.\n\n\nTests\n=====\n\nTests are run from within the ``cf/test`` directory:\n\n    python run_tests.py\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNCAS-CMS%2Fcf-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNCAS-CMS%2Fcf-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNCAS-CMS%2Fcf-python/lists"}