Skip to main content

Interactive viewing of NetCDF data

Project description

ncplot - Easy interactive viewing of NetCDF files in Python

pypi Documentation Status

An easy to use Python (3.6 and above) package for quickly plotting the contents of NetCDF files or xarray datasets in Python or on the command line.

This package is designed to work with CF compliant NetCDF data.

Installation

To install from conda:

conda install -c conda-forge ncplot

To install from pypi:

pip install ncplot 

Install the development version using using pip:

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

How to use in Python

The package is made up of a simple and easy to use function: view. To visualize everything in a file:

from ncplot import view

view("example.nc")

or to visualize a specific variable or list of variables:

from ncplot import view

view("example.nc", vars)

where vars is either a string representing a variable or a list of variables.

If you want to plot xarray datasets dataarrays, first import the xarray accessor, then plot in a similar way to xarray's built in plotting method:

import ncplot.xarray
import xarray as xr

ds = xr.open_dataset("example.nc") 
ds.ncplot.view()

How to use on the command line

Command line usage is as simple as:

ncplot example.nc

Reference and tutorials

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

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

ncplot-0.3.13.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ncplot-0.3.13-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file ncplot-0.3.13.tar.gz.

File metadata

  • Download URL: ncplot-0.3.13.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for ncplot-0.3.13.tar.gz
Algorithm Hash digest
SHA256 8e81681478a0d5e9f178be3053af3426b00350cee97af3b89bb8543b7f8276e7
MD5 32cef1960c831660dd4bd5acadb05ac6
BLAKE2b-256 62651879f87a19f5d73c1d2e5f5d1907df75dea623703cc60edb145013844b9f

See more details on using hashes here.

File details

Details for the file ncplot-0.3.13-py3-none-any.whl.

File metadata

  • Download URL: ncplot-0.3.13-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for ncplot-0.3.13-py3-none-any.whl
Algorithm Hash digest
SHA256 6661ae69d9bf0d238ee21a9847a3147608c71c92ce795b1afa3f796f859f3651
MD5 b2dd912fcee9faa5aa3948df9d4e19cf
BLAKE2b-256 6132744aa60290874f5528817601b486db3418dab05e17566b4707931c0f5dc1

See more details on using hashes here.

Supported by

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