Data read via the CDMS Python interface can be plotted using the vcs module. This module, part of the Climate Data Analysis Tool (CDAT) is documented in the CDAT reference manual. The vcs module provides access to the functionality of the VCS visualization program.
Examples of plotting data accessed from CDMS are given below, as well as documentation for the plot routine keywords.
In the following examples, it is assumed that variable psl is dimensioned (time, latitude, longitude). psl is contained in the dataset named `sample.xml' .
That's it! The axis coordinates, variable name, description, units, etc. are obtained from variable sample .
What if the units are not explicitly defined for psl , or a different description is desired? plot has a number of other keywords which `fill in' the extra plot information.
w.plot(array, xaxis=lon, yaxis=lat, units='mm/day', file_comment='High-frequency reanalysis', long_name="Sea level pressure", comment1="Sample plot", hms="18:00:00", ymd="1978/01/01")
Assuming that variable psl has domain (time,latitude,longitude), this example selects and plots a time-latitude slice:
3 w.plot(samp, name='sea level pressure')
The plot method is documented in the CDAT Reference Manual. This section augments the documentation with a description of the optional keyword arguments.
The general form of the plot command is:
canvas.plot(array [, args] [,key=value [, key=value [, ...]]])
args := template_name, graphics_method, graphics_name
template_name: the name of the VCS template (e.g., `AMIP')
graphics_method : the VCS graphics method (`boxfill')
graphics_name: the name of the specific graphics method (`default')
See the CDAT Reference Manual and VCS Reference Manual for a detailed description of these arguments.