Map only plots
maponly_1.ncl:
A cylindrical equidistant global map.
gsn_csm_map_ce is the plot templates that draws a cylindrical equidistant map.
Note that the default behavior is gray filled continents.
maponly_2.ncl:
A subregion map with a few modifications
A few resources were added to this example:
mpFillOn = False, turns off gray
continental fill.
mpOutlineBoundarySets = "National",
turns on country boundaries. mpGeophysicalLineColor = "Navy", changes the
outline line color. mpGeophysicalLineThicknessF = 1.5, changes
the thickness of continental outlines.
maponly_3.ncl:
Demonstrates changing the colors of the various regions.
mpOceanFillColor = 8, selects the
light blue color from the colormap.
mpLandFillColor = 164, selects the dark
orange color from the colormap.
mpInlandWaterFillColor = 54, selects the dark
blue color from the colormap.
There are numerous color tables to choose from.
maponly_5.ncl:
An example of a satellite projection map.
gsn_csm_map is the plot templates
that draws map, where you specify the projection.
mpProjection = satellite, selects projection.
maponly_6.ncl:
An example of drawing the U.S. and filling each state with a data value.
GetFillColorIndex will assign a color to a polygon based on an array of color indices.
maponly_7.ncl:
Demonstrates how to remove portions of a map. The first plot shows the
default mapfill, and the second plot has had all "SmallIslands"
removed. These include the Lesser Antilles, Hawaii, the Phillipine
Islands etc.
mpAreaMaskingOn turns on the area masking so that the regions specified in mpMaskAreaSpecifiers will not be filled. Note that if we did not turn off the map outline with mpOutlineOn, we would still see the outline, but it would not be filled.
maponly_8.ncl:
Demonstrates how to draw only certain portions of map when there is no
map fill.
This technique differs lightly from that demonstrated in example 7. In that example we exclude only the desired features. In this method we only draw the desired features.
mpOutlineBoundarySets ="NoBoundaries", indicates not to draw any boundary other than what is set by mpOutlineSpecifiers
maponly_9.ncl:
Demonstrates how to draw both US States and Mexican States. This
method requires that the plot be drawn first an then the values for
the Mexican States retrieved and added to the plot.
maponly_10.ncl:
Demonstrates how to draw all of the counties in the US, how to draw
just the counties with the name "Adams", and then how to draw only the
counties in Florida by listing them by name.
The resource mpDataSetName needs to be set to "Earth..2" in order to have access to the US counties.
maponly_11.ncl:
Demonstrates the difference in resolution between the three available
map databases in NCL. mpDataBaseVersion is used to set the database
that NCL uses to draw the basemap. By default, mpDataBaseVersion is set to "LowRes". The
upper left panel shows the country of Greece with this setting. The
upper right panel shows the same area with a database setting of
"MediumRes". The bottom panel is drawn with a database setting of
"HighRes".
Note that if you wish to use the "HighRes" setting, you will have to download the RANGS database. Details on this process can be found in the mpDataBaseVersion documentation.
maponly_12.ncl:
This script demonstrates the use of the resource mpProjection, which sets the map
projection. There are 13 map projections available; each is shown
here. Resources are not set to limit the map area, and thus the
default area (whole globe) is shown.
The resources mpGridAndLimbOn and mpPerimOn are turned on and off throughout the program depending on whether the projection looks best with the perimeter drawn or with the earth's outline drawn.
By default, NCL does not draw a line outlining the earth for the Orthographic, Satellite, Mollweide, and Robinson projections. To trick NCL into drawing the outline for these projections, the following resources should be set:
mpGridAndLimbOn = True ; turn on lat/lon
lines.
mpGridLatSpacingF = 90; change latitude line spacing
mpGridLonSpacingF = 180. ; change longitude line spacing
mpGridLineColor = "transparent"
; trick ncl into drawing earth's outline
maponly_13.ncl:
Similar to Example 12 above, except this script uses
mpLimitMode and
mpMinLatF /
mpMaxLatF /
mpMinLonF /
mpMaxLonF to zoom in on Europe.
As in Example 12, this example doesn't always highlight the best use of each projection.
maponly_14.ncl:
Demonstrates how to draw continental outlines without any inland
water, lakes, or islands drawn, using a relatively new
map resource mpMaskOutlineSpecifiers.
You use mpOutlineSpecifiers and/or
mpOutlineBoundarySets to indicate
what outlines you want, and then you use this new resource to indicate
which outlines you want to mask.
mpMaskOutlineSpecifiers was added in version a034.
maponly_15.ncl:
The first frame demonstrates how to draw climate divisions, by
setting the resources mpDataSetName
to "Earth..3", mpDataBaseVersion
to "Ncarg4_1", and mpOutlineBoundarySets
to "AllBoundaries".The second frame shows how to color the climate divisions by a third field. The climate divisions already have their own default color indexes (called "group ids") that you can use to color the climate areas such that adjacent areas will not have the same color. These default values are retrieved (via the mpDynamicAreaGroups resource) so that you can replace them with new color indexes based on this third field. Note: this second plot can only be created if you have version 5.0.0 or later.
