NCL Website header
NCL Home> Application examples> Plot techniques || Data files for some examples

Example pages containing: tips | resources | functions/procedures

Tropical Strip Plots

This page demonstrates plotting data across the tropics. It shows how to deal with font size issues when you create plots that are much wider than they are high.
sol_1.ncl: This code comes from Joel Norris of the GFDL. He wanted a global plot of the tropics and encountered some problems with label sizes. Here is his solution.

tmXBMajorLengthF = 0.014
tmXBMinorLengthF = 0.007
tmYLMajorLengthF= 0.014
tmYLMinorLengthF = 0.007
Resizes the tickmarks

tmXBLabelFontHeightF = 0.014
tmYLLabelFontHeightF = 0.014, Resizes the tickmarks labels

tiMainFontHeightF = 0.022, Resizes the title

gsnMajorLatSpacing= 30
gsnMinorLatSpacing = 10, Limit the latitudinal labeling.

txFontHeightF = 0.017
amOrthogonalPosF = 0.15, Increases the text size and move text up.
sol_2.ncl: This examples takes the code from example one and demonstrates its use in a panel plot. It also calculates psi and chi.

The example uses the NCL procedure uv2sfvpg to calculate psi and chi on a gaussian grid. This requires the user to explicitly allocate space for psi and chi via NCL's "new" function.

An alternate way of calculating psi and chi, would be to use uv2vrG to calculate vorticity and uv2dvG to calculate divergence and then perform an inverse laplacian ilapsG. This approach does not require the user to explicitly allocate memory for psi and chi.
        psi = ilapsG ( uv2vrG(u,v), 0)
        chi = ilapsG ( uv2dvG(u,v), 0)
sol_3.ncl: A color version of the tropical plot.

pmLabelBarOrthogonalPosF = .35, Moves the label bar down.
sol_4.ncl: A stretched tropical plot.

mpShapeMode = "FreeAspect"
vpWidthF = 0.8
vpHeightF = 0.4

Allows the user to change the aspect ratio of a map plot. For plain contour plots, the ShapeMode resource is not required. For maps, unless ShapeMode is included, the plot manager will try to maintain the aspect ratio of the plot regardless of the values you input for Height and Width.