Overview

Starting with version 2002.04.24, plotl has the capability to read various data types from netCDF formatted files. The supported data types are: Scalars, vectors, arrays, and volumes can be; double (real*8), float (real*4), int (integer*4), short (integer*2), or byte (integer*1) values.

Opening the netCDF file

A netCDF file is opened for processing with the "netcdffile filename" command. Upon opening, plotl will list character variables, variables, vectors, arrays, and volumes as they are found in the file. For example, will yield the following information: Note that the dimensions of the vectors, arrays, and volumes are given with their names.

Loading character and numeric variables

Numeric and character variables are loaded from netCDF using the "netcdfvariable variable_name" command. For example, will result in the character variable %VERSION, and the numeric variables $YEAR and $DAY to be loaded and defined. Note that the variable name IS case sensitive in the netCDF system. However, variable names ARE NOT case sensitive once within plotl. So, the plotl commands: will result in the following output:

Loading and using vectors

Vectors are loaded with one or more of the commands: For example, the following plotl script: yields the following graphic:

Note that the "netcdftodata" command is required to move the Latitudes data from the netCDF into the plotl environment, and should follow one or more "netcdfto*vector" commands.

Loading and using an array

Arrays are loaded with the "netcdfarray array_name" command. For example, the following plotl script: yeilds the following graphic:

This graphic has Latitude as the x-axis, and Longitude as the y-axes--the same order as that found in the netCDF file. This can be changed with the "3dtransposexy" command, as in: which yields:

Using volumes

Plotl does not generate graphical representations of volumes. However, volume data can be sliced and diced into arrays or vectors that can be plotted.

Converting volumes to arrays

Various planes of a netCDF volume can be loaded into a plotl array using the "netcdfxytoarray", "netcdfxztoarray", and "netcdfyztoarray" commands. For example, the command instructs plotl to use the 50th Y-Z plane of netCDF volume Edensity as a plotl array. A complete script like: produces a graphic like this:

Frequently one doesn't know the actual index number of the desired plane (which was 50 in the preceding example). The math operators nxai, nyai, and nzai are useful in this case. Note that nxai is an acronym for "nearest x array index". A slight modification to the previous script: will use the plane nearest to the element in Altitudes with value of 300. In this case that is plane number 34. Note that the volume x, y, and z vectors were defined prior to using the nxai operator. Multiple planes can be displayed as a stack, like this:
which yields

Converting volumes to vectors