[an error occurred while processing this directive]
Last modified: Wednesday, 09-Feb-2011 16:24:56 MST

Do it yourself script examples

Latitude vs. Time

latut_1.ncl: Default black and white plot. Explicitly creates ut axis in DAYS.

cnLineLabelPlacementMode = "constant", is one of the three methods for controlling contour labels. the constant method is the only one in which the label becames part of the line.

I only have TN data to demo in these scripts. For data that has both positive and negative values, there are numerous contour effects you can use to enhance your plot.

There are four title strings you can use to label a plot. The gsnLeftString is automatically labeled with the long_name of the data, and gsnRightString is labeled with the units of the data. These can both be overwritten, or turned off (by setting them to ""). There is also gsnCenterString and the plot title tiMainString.
latut_2.ncl: Adds color and a local time axis. Explicitly creates ut axis in HOURS.

cnFillOn = True, turns on a color plot.
gsnSpreadColors is a special resource that tell the plot template to use the full range of the colormap.

There are many built-in colormaps to choose from and many ways of specifying the color of a plot.

axis.ncl contains all the functions used to put local time axis on the HAO master scripts. We have used one of those functions here (set_lt_axis_utplot). To use this function, you need to load axis.ncl at the top of your script. Note that this function turns off gsnLeftString and gsnRightString.

We add the extra text on this plot using gsn_text_ndc. You can learn more about adding text to a plot from the CCSM text example page.
latut_3.ncl: Demonstrates limiting the y-axis, calculating a zonal mean. Explicitly creates ut axis in MONTHS.

trYMinF will limit the lower bounds of the y-axis. There is also a trYMaxF

The NCL built-in function dim_avg is useful for calculating zonal averages. You should be aware, however of the consequences on meta data of any computation. Because of this we have chosen to use the wrapper version of the function.
latut_4.ncl: Demonstrates a panel plot. There are too many nuances associated with panelling. Please review the CCSM panel example page for details.

cnLevelSelectionMode = "ManualLevels"
are the resources that manually sets the contour levels.
latut_5.ncl: How to add the min/max to a plot and stretch its aspect ratio.

vpWidthF and vpHeightF will allow you to stretch a plot.

The NCL built-in functions min and max allow you to take the min and max of the data.