Skip to content

pmlmodelling/nctoolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4b84b59 · Feb 26, 2025
Feb 10, 2025
Feb 10, 2025
Jul 18, 2023
Sep 25, 2020
Jul 15, 2024
Jun 13, 2022
Jul 28, 2020
Jun 8, 2023
Dec 6, 2024
Feb 26, 2025
Jun 21, 2023
Dec 6, 2024
Aug 25, 2023
Oct 10, 2022
Sep 10, 2020
Sep 28, 2023
Sep 28, 2023
Aug 9, 2023
Jun 1, 2020
Nov 13, 2024
May 28, 2020
Aug 24, 2020
Aug 10, 2023
Jun 7, 2023
Jun 5, 2023
Feb 10, 2025

Repository files navigation

pypi Conda Latest Release contributions welcome codecov GitHub Testing GitHub Testing Documentation Status DOI

nctoolkit - A Python package for netCDF analysis and post-processing

nctoolkit is a comprehensive Python (3.8 and above) package for analyzing netCDF data on Linux and macOS.

Core abilities include:

  • Clipping to spatial regions
  • Calculating climatologies
  • Subsetting to specific time periods
  • Calculating spatial statistics
  • Creating new variables using arithmetic operations
  • Calculating anomalies
  • Calculating rolling and cumulative statistics
  • Horizontally and vertically remapping data
  • Calculating time averages
  • Interactive plotting of data
  • Calculating the correlations between variables
  • Calculating vertical statistics for the likes of oceanic data
  • Calculating ensemble statistics
  • Calculating phenological metrics

PML logo

Installation

The easiest way to install the package is using conda or mamba. This will install nctoolkit and all system dependencies.

conda install -c conda-forge nctoolkit
mamba install -c conda-forge nctoolkit

If you install using conda, please be aware that conda can install a very old version of nctoolkit. Consider setting it to a more recent version.

Install through PyPI using pip:

pip install nctoolkit 

Install the development version using using pip:

pip install git+https://github.com/pmlmodelling/nctoolkit.git

This package requires the installation of Climate Data Operators. The conda installation will handle this for you. Otherwise, you will have to install it. The easiest way is using conda:

conda install -c conda-forge cdo 

A couple of methods give users the option of using NetCDF Operators instead of CDO as the computational backend. Again, the easiest way to install is using conda:

conda install -c conda-forge nco 

If you want to install CDO from source, bash scripts are available here.

nctoolkit is tested with continuous integration using Circle CI (for Linux) and GitHub actions (for Mac OS). It will not work on Windows platforms today or in future, because of system dependency limitations.

Reference and tutorials

A full API reference, in depth tutorials and a how-to guide are available at readthedocs.

Contributing

If you are interesting in contributing to nctoolkit feel free to read the Contributing page.

Got questions about nctoolkit?

  • If you have a question about how to use nctoolkit, please ask on GitHub Discussions.
  • Report any bugs, suggest new features or view the source code on GitHub.

About

A Python package for netCDF analysis and post-processing

Topics

Resources

License

Code of conduct

Citation

Stars

Watchers

Forks

Packages

No packages published

Languages