[ncl-talk] Possible bug in plots of unstructured grids

David Brown dbrown at ucar.edu
Tue Dec 16 18:15:06 MST 2014


I agree that something odd is happening when you try to plot this data
using the 'ele' array in the file to define the triangulation.
However, I was able to plot it quite easily using NCL's built-in
triangulation code. The only change I needed to make from your
original code is to comment out the lines:

  ; res2 at sfElementNodes      = f->ele
 ; res2 at sfFirstNodeIndex    = 0

For the plot I am attaching I also changed

res2 at mpDataBaseVersion      = "MediumRes"

because the high res data does not work well for global plots.

We will need to investigate why the explicit triangulation in your
data set causes a problem. But you can get a better plot faster by not
setting
sfElementNodes and letting NCL compute the triangulation.

Hope this helps.
 -dave


On Tue, Dec 16, 2014 at 10:24 AM, Mathieu Dutour
<mathieu.dutour at gmail.com> wrote:
> Dear all,
>
> I would like to plot some unstructured grid that encompass all
> the oceans of the world.
>
> There are two obstacles to that. One is the periodicity in longitude
> and the other is the singularity at the south and north pole. The
> singularity can be avoided by removing points with latitude not
> in acceptable range. The periodicity can be treated by removing
> the points of longitude +-180.
>
> A priori, the drawing should then proceed correctly, but it does not.
> The grid I put as input passes all the sanity checks I can think of.
> What makes me think that there is a bug is that if I restrict to
> positive latitudes (0<lat<90) or negative latitude (-90 < lat < 0) then
> the drawings are ok but it is not when I put everything together.
>
> All relevant files for debugging are available in
> http://mathieudutour.altervista.org/Sending/PLOT_globunstruc.tar.gz
> The reduction technique from WholeWorld ---> UpperLatitude, LowerLatitude
> is to remove the points of noncorrect latitude and any triangle that
> contain them.
>
> The three pictures are
> http://mathieudutour.altervista.org/Sending/LowerLatitude.png (good)
> http://mathieudutour.altervista.org/Sending/UpperLatitude.png (good)
> http://mathieudutour.altervista.org/Sending/WholeWorld.png (bad)
>
> Thank you in advance for any help in the debugging and please ask
> if I can help you.
>
> Best,
>
>   Mathieu
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WholeWorld.png
Type: image/png
Size: 615575 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141216/adb75838/attachment-0001.png 


More information about the ncl-talk mailing list