Selecting Data
Every plot in CDFViewer is defined by three choices. You pick which variable to show, which dimensions go on the plot axes, and at which index the remaining dimensions are fixed. This page covers the commands for all three, plus the commands for inspecting what the dataset contains.
Inspecting the dataset
vars lists the variables, dims shows the dimensions of the current variable together with their currently selected values, and varinfo prints the full metadata of a variable.
CDFViewer> vars
┌ Info: Available variables:
└ temperature, humidity, pressure, u, v
CDFViewer> v temperature
[ Info: Selected: temperature
CDFViewer> dims
┌ Info: List of Dimensions:
│ → lon: -180 degrees_east
│ → lat: -87.5 degrees_north
│ → height: 0 km
└ → time: 2000-01-01 00:00:00CDFViewer> varinfo humidity
┌ Info: humidity (72 × 36 × 24)
│ Datatype: Float64 (Float64)
│ Dimensions: lon × lat × time
│ Attributes:
│ units = %
└ long_name = Relative humidityThe overview command reprints the dataset summary that was shown when the file was opened.
Choosing the plot axes
x, y, and z assign dimensions to the plot axes. How many axes you assign determines which plot types are available. One axis allows line and scatter plots, two allow heatmaps and contours, and three allow volume rendering (see Plot Types).
CDFViewer> x lon
[ Info: Selected: lon
CDFViewer> y lat
[ Info: Selected: latSelecting a new variable keeps the axis assignments when they are compatible with the new variable's dimensions.
Two variables at once
The vector plot types (quiver and streamplot) draw two components of one field, so v also takes a pair, comma-separated and without a space.
CDFViewer> v u,v
┌ Info: Selected: u
└ Selected: v
CDFViewer> p quiver
[ Info: Selected: quiverThe second name is the partner component. It has to span the same dimensions as the first, and leaving it out lets CDFViewer guess it from the name (see Plot Types). Every other plot type ignores the second variable.
CDFViewer> p heatmap
[ Info: Selected: heatmap
CDFViewer> v temperature
[ Info: Selected: temperatureFixing the remaining dimensions
Dimensions that are not on an axis are fixed at one index, which you move either by index or by coordinate value.
isel <dim> <index>selects by integer index (1-based).sel <dim> <value>selects by coordinate value and snaps to the nearest grid point.
CDFViewer> isel time 6
[ Info: → time: 2000-01-06 00:00:00
CDFViewer> sel lev 8.0
[ Info: → height: 8 kmIn the menu window, the same selection is available as the Fixed Coordinates sliders.