draw order for contour maps and polylines

From: John Kerfoot <johnkerfoot_at_nyahnyahspammersnyahnyah>
Date: Tue Apr 05 2011 - 05:24:31 MDT

As a follow up to a post I sent yesterday (read speed for ascii vs .nc), I'm
creating a contour map (gsn_csm_contour_map) of 25hr composited AVHRR
sea-surface temperatures with the ocean surface current field (vectors)
overlaid. I'm using the high-resolution map database GSHHS. I'd like to
add US state boundary lines to the map, but can't do it natively in NCL
while using the high-res map database; however I have found a shape file
that contains this information.

The script I'm using is
will display the image in an x11 window.

I have set the mpFillDrawOrder resource to "PostDraw" so that the land
overlays the SST contour map as in this example:


I then tried to draw the state boundaries as polylines without changing any
resource settings. Here's what I got::


which looks like the same thing. When I draw this in an x11 window, I can
see the state lines being drawn, but the land is then drawn over them, which
I think is because I have mpFillDrawOrder set to "PostDraw". So I changed
mpFillDrawOrder to Draw (the default) and got this result:


which is masking out the land once it has been plotted with the contour
map. I presume this is because cnMissingValFillColor defaults to
Background(0) which, in my case, is white.

I then set cnMissingValFillPattern to -1 (Hollow fill) which, from the
documentation says:

This resource sets the HLU index of the fill
to fill missing value areas. If
the value
HollowFill (-1), there will be no fill of the missing value area, regardless
of the setting of
Note that the resource
be set to True in order for
take effect.

Default: HollowFill
and I set cnMissingValFillColor = -1 (Transparent) which, from the
documentation says:
This resource sets the color to use for filling in missing value areas. If *
the value
Transparent (-1), there will be no fill of the missing value area,
regardless of the setting of
Note that the resource
be set to True, and
0 ("SolidFill") or higher (pattern fill) in order for
take effect.

You can use a color
(integer) or a named
color <http://www.ncl.ucar.edu/Document/glossary.shtml> (string).

Default: Background (0)

but got the same result:

I did specify tfPolyDrawOrder to "PostDraw" (the default) in the hopes this
would fix the issue, but no luck.

So I'm at a loss as to how to do the following:
1. Plot a contour map of SST values
2. Lay a land map, created from the high-resolution mapping database (GSHHS)
3. Plot the state boundaries on top of everything

Any suggestions?

I'm reading the state boundaries lat/lon file from a local directory, but
would be happy to push it to anyone who wants it.


ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Tue Apr 5 05:24:42 2011

This archive was generated by hypermail 2.1.8 : Tue Apr 05 2011 - 09:01:21 MDT