NCL Home>
Application examples>
gsn_csm graphical interfaces ||
Data files for examples
Polar Stereographic Projections (high-level plot interface)
polar_5.ncl: Demonstrates how to
block out part of the plot by creating a polygon and filling it. This
technique only works in plot coordinates, so we can not mask out the
lat/lon labels around the edge, or the edge itself when white is used
as the polyfill.
gsn_add_polygon (available since NCL version 4.2.0.a012) is
the plot interface that draws polygons as part of a plot. This
means the plots can be paneled.
gsFillColor="white", Changes the color of the polygon
fill.
polar_6.ncl: Same concept as example
5, but in this case, we wanted to mask out the polar plot in a
semi-circle. This is more complicated b/c we don't know a priori what
the values are along the straight line. This technique draws a line
in NDC coordinates and then converts them to lat/lon coordinates.
polar_7.ncl: Example of a polar
vector plot.
gsn_csm_vector_map_polar is the plot template that creates basic
polar vector plots.
vcMonoLineArrowColor = False, Turns on color
vectors.
vcMinDistanceF = 0.02, Sets a minimum distance between
the vectors. This is useful near the poles where the number of vectors
increases. The value is in NDC coordinates.
polar_8.ncl: Example of a polar
vector plot.
gsn_csm_vector_scalar_map_polar is the plot
template that draws a polar vector plot over a contour plot.
vcLineArrowColor = "white", Changes the color of the
vectors.
vcGlyphStyle = "CurlyVector", turns on curly vectors
available since NCL version 4.2.0.a019).
gsnScalarContour = True, Draws the contour plot under the
vectors rather than have the vectors be colored by the contour plot.
polar_9.ncl: Example of a polar
streamline plot.
gsn_csm_streamline_map_polar (available since NCL version
4.2.0.a015) is the plot template that draws a polar streamline plot.
stArrowLengthF = 0.008, controls the length of the
directional arrows. The default is dynamic.
stLengthCheckCount = 15, controls how frequently
a new streamline is started. The value is in terms of an internal NCL
loop that calculates new starts. The default is 35.
stArrowStride = 1, Controls in which grid cells an
arrow head is draw. The default is every other grid cell.
stLineStartStride = 1, Controls which grid
points are allowed to start new streamlines. The default is 2, which
is every other grid cell.
stMinArrowSpacingF = 0.035, controls the distance
between drawn arrows. The default is 0.0, which could draw arrows right
on top of each other.
stStepSizeF= 0.001, Controls the basic step size used
to create the streamline. The default is dynamic.
The following two resources on the ones that you will really have to
tweak depending upon the field you are plotting.
stMinDistanceF = 0.03
stMinLineSpacingF = 0.007,Controls the minimum
distance between drawn streamlines. The default is dynamic.
polar_10.ncl: Demonstrates how to
blow up the lat/lon labels. Unlike other plot templates, the lat/long
labels on a polar plot are not part of a tickmark object, but instead
they are text features that have been manually added to the plot.
Note, that at present you need to load gsn*test for this feature to
work.
As of NCL version 4.2.0.a029,
gsnPolarLabelFontHeightF= .025, will changes the font height of the
lat/long labels w/o changing the gsn* string text.
gsnPolarLabelDistance = 1.08, Controls how far away from the circle
the polar labels will be drawn. These labels are not a tick mark object.
They are are text that has been manually added. A determination was
made as to how far away from the edge to place this text. When the
ability to blow the text up was added, it ran the 0 and 180 text into
the circle. Note that this resource moves all the text out, and not
just the 0 and 180.
polar_11.ncl:
The simplest. Reads in data and then creates a default plot.
gsnPolarLabelSpacing = 90, controls how frequently to label the
lat,lon lines. This is different from a tick mark resource b/c polar
tickmark labels are actually added text.
polar_12.ncl:
Shows how to rotate a polar plot so that 0.0 is not facing
south.
mpCenterLonF controls what longitude is at the center of the plot.
This resource can be used adjust what longitude is facing south.