comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: problem with TRIANGULATION option in CONTOUR
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: problem with TRIANGULATION option in CONTOUR [message #73049 is a reply to message #73048] Sat, 23 October 2010 15:52 Go to previous messageGo to previous message
ben.bighair is currently offline  ben.bighair
Messages: 221
Registered: April 2007
Senior Member
On 10/23/10 8:35 AM, Ardhuin wrote:
> Dear all,
> I have been having problems with plotting output of a numerical model
> that uses unstructured grids using IDL: this model computes wave
> heights in the ocean. If I use the set of triangles from the model, I
> get really funny errors:
> Out of range subscript encountered:<LONG Array[66453]>.
> although I only have 9626 points and about 16000 triangles.
>
> The command I use is
> CONTOUR,tablep,x,y,$
> xstyle=5,ystyle=5,/FOLLOW,/CELL_FILL, TRIANGULATION=tri,
> $
> C_COLOR=colorind(0:c_numlev-2+addmini+addmaxi), $
> LEVELS=lev,/
> NOERASE,TITLE=title,CLIP=[rangex(0),rangey(0),rangex(1),rang ey(1)], $
> XRANGE=rangex,YRANGE=rangey,MAX_VALUE=maxval, $
> POSITION=[blx*winx/mwinx,bly*winy/mwiny,trx*winx/
> mwinx,try*winy/mwiny]
>
> Where tablep , x and y
> If I first do TRIANGULATE,X,Y,tri then the contours comes out OK...
> but they cut out through land boundaries and islands.
>
> So I was thinking: my triangles must be wrong ...
> but if I do a TRIGRID with my triangles then I can plot nicely with
> TV ...
> array=trigrid(X,Y,tablep,tri,[dx,dy],
> [rangex(0),rangey(0),rangex(1),rangey(1)], $
> MAX_VALUE=maxval)
>
> So my triangles are OK for TRIGRID but not for CONTOUR... How is that
> possible ??
>

Hi,

You might consider running the points through GRID_INPUT first. I
really have no idea if that will help in this case, but it often comes
to the rescue when interpolating.

Cheers,
Ben
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Fragile IDL 8 Object Programs
Next Topic: Another Way IDL 8.0 is Fragile

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 09:34:10 PDT 2025

Total time taken to generate the page: 0.23746 seconds