Ncplot
Interactivate plotting of NetCDF data in Python
Install / Use
/learn @pmlmodelling/NcplotREADME
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.
Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
