Skip to content

feng045/ncvis

This branch is 12 commits behind SEATStandards/ncvis:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a2919d7 · Jan 5, 2023

History

96 Commits
Jul 12, 2022
Jan 5, 2023
Jun 27, 2022
Aug 17, 2022
Aug 19, 2022
Aug 19, 2022
Aug 23, 2022
Jun 27, 2022
Aug 29, 2022
Aug 27, 2022

Repository files navigation

ncvis

NetCDF Visualizer

Developed by Paul A. Ullrich

Significant Contributions by Travis O'Brien and Vijay Mahadevan

Funding for the development of ncvis is provided by the United States Department of Energy Office of Science under the Regional and Global Model Analysis project "SEATS: Simplifying ESM Analysis Through Standards."

ncvis is inspired by David Pierce's most excellent ncview utility (http://meteora.ucsd.edu/~pierce/ncview_home_page.html)

Configuration

In order for ncvis to run the resources directory must be in the same folder as ncvis or the NCVIS_RESOURCE_DIR environment variable must be set to the path of the ncvis resources folder. This directory is where ncvis stores fonts, colormaps and shapefiles.

On Unix of Linux-based systems, ncvis uses GDK (via wxWidgets) for rendering of the interface. The font size displayed in GDK can be adjusted by setting the GDK_DPI_SCALE environment variable, e.g. via export GDK_DPI_SCALE=0.5.

Note for Cheyenne users: On Cheyenne GLIBCXX is not available by default. To run ncvis you will need to first run module load gnu/12.1.0.

Colormaps

Some default colormaps from the cmocean library are pre-installed in the resources subdirectory: files with the .rgb extension. Additional colormaps can be added by adding new .rgb files to this directory. The files must have 256 lines and three columns (separated by a single space) with each column corresponding to integer RGB values between 0-255. The python code used to generate the maps follows:

import numpy as np
import cmocean
import matplotlib as mpl

# loop over colormaps
N = 256
for cmap in cmocean.cm.cmapnames:
    # get the colormap object
    cm = mpl.cm.get_cmap(f"cmo.{cmap}", N)
    # convert the colormap to an integer numpy array with values from 0-255
    color_table = np.around(cm.colors * 255,0).astype(int)[:,:3]
    # save the file to disk
    np.savetxt(f"{cmap}.rgb", color_table, fmt = "%i")

Screenshot (v2022.08.28)

ncvis_2022_08_28_era5_topo

Screenshot (v2022.08.18)

ncvis_screenshot_2022-08-18

About

NetCDF File Viewer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.8%
  • C 2.2%
  • Other 1.0%