Concave boundary fill problem in contour of transect

From: Carmen St. Jean <carmen.stjean_at_nyahnyahspammersnyahnyah>
Date: Fri Mar 30 2012 - 09:11:40 MDT

Hello everyone,

I'm attempting to use PyNGL create a transect of water temperatures in
the Northern Gulf of Mexico using a NetCDF file of NOAA/NOS' Northern
Gulf of Mexico Operational Forecast System (NGOFS). However, the
contour plot seems to be bleeding into the concave boundary areas of
the mesh and I'm not sure how to prevent this.

My strategy has been:
1. Given two lat/lon coordinates, draw a transect line between them.
2. For each sigma layer, interpolate the water temperature at the
points on the transect line (using natgrid).
3. For each sigma layer, interpolate the depths at the points on the
transect line (using natgrid).
4. Plot the interpolated water temperatures as a contour with the
interpolated depths as the y-axis and the lat/lon of the points on the
transect line as the x-axis.

(Unfortunately, natgrid takes an extremely long time to run because
the NGOFS grid is a triangular mesh of over 90,000 nodes. So before
step 1, I'm drawing a bounding box around the transect line and
subsetting the data from the NGOFS NetCDF file to only the nodes the
fall within that bounding box.)

I've played around with various resources, but nothing seems to stop
the contour from filling in areas erroneously when I try to plot the
temperature by depth (see attachment "ngofs-transect-z.png"). I
plotted the interpolated water temperatures against sigma layer rather
than z (see attachment "ngofs-transect-siglay.png") and showed it to
an oceanographer familiar with NGOFS. He said the plot seemed to be
correct, so I'm confident the interpolation is working correctly.

Are there any resources I should be setting to fix this problem? Or
perhaps is there an easier method to creating a transect that I have

Here is the file I'm using for input:

Thank you,


pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:

ngofs-transect-siglay.png ngofs-transect-z.png
Received on Fri Mar 30 09:12:03 2012

This archive was generated by hypermail 2.1.8 : Wed Apr 11 2012 - 14:41:42 MDT