Interactive viewing of NetCDF data
Project description
ncplot - Easy interactive viewing of NetCDF files in Python
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ncplot-0.3.10.tar.gz
.
File metadata
- Download URL: ncplot-0.3.10.tar.gz
- Upload date:
- Size: 22.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74fbc17aa3a238451c1689797cf0e859f27ef994000a43ddb5240f1a5ef78634 |
|
MD5 | 28398339d90f5f061fb8714a443f5852 |
|
BLAKE2b-256 | 5a7b4a54bebbc8d43e6ec8a9c9091b1b17bc7e9c209a7490084a4aab3c9024db |
File details
Details for the file ncplot-0.3.10-py3-none-any.whl
.
File metadata
- Download URL: ncplot-0.3.10-py3-none-any.whl
- Upload date:
- Size: 23.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a87d28be7329fec1b066508983ef84c02974bdd70ab3783460f3007a7ef550c5 |
|
MD5 | 1e53e7cec2eeb18781d375492529afe5 |
|
BLAKE2b-256 | 3f9cf5f355bef7ad76e3505d198bf7591e8ca29eb29bd1193f0780e3f0a7c0a7 |