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

Home » Public Forums » archive » Re: IDL contour
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: IDL contour [message #690] Tue, 12 January 1993 13:02
turet is currently offline  turet
Messages: 7
Registered: January 1993
Junior Member
In article <1993Jan12.165204.29186@nsisrv.gsfc.nasa.gov> pat@gsfc.nasa.gov (patrick m. ryan) writes:
> Mirko Vukovic (at913@cleveland.Freenet.Edu) wrote:
>
>> In a previous article, apwang@waikato.ac.nz () says:
>>> Does anyone know how to draw a contour graph in polar
>>> coordinate system without changing to cartician coordinate
>>> by using IDL? Any help will be appreciated very much!
>> I second the request for polar grid contour/surface routine
>
> you can't do it directly. what i do is interpolate
> my polar grid to a cartesian grid and then contour it. i use
> trigrid and triangulate to do the interpolation.
> the problem i still have is that polycontour bites.
> if anyone has a color contouring routine which knows how
> to handle unclosed contours, please post it. if i'm
> feeling inspired one of these days, i translate the NCAR
> CONPACK routines into IDL. they're ugly but they do
> the job.
>

What I've done is use Map_Set using a polar
stereographic projection and then contouring some
data on top of it. In the following example
`matrix1' is a 380 x 15 floating array consisting
of monthly measured heat fluxes at latitudes 50 to
85 deg. N. (see Oort). My data is available on
request. If you just want to try this out, create
an array that varies from about -400 to +400 or so:

restore,'fwall_matrix.dat'
x = seqa(-180,30,13)
y = seqa(50.,2.5,15)
xx = [min(x),x,max(x)]
yy = [min(y),y,max(y)]
mostr = ['JAN','FEB','MAR','APR','MAY','JUN',$
[A'JUL','AUG','SEP','OCT','NOV','DEC']
lat = 50.5 lon = seqa(-180,30,12)
latstr = ['55','60','65','70','75','80','85']
lev = seqa(-400,50,19)
for iyr=0,25 do begin
yrstr = '19'+strtrim(iyr+64,2)
m1 = fltarr(13,15)
m1(0,0) = matrix1(iyr*12:iyr*12+11,*)
m1(12,*) = m1(0,*)
m2 = make_array(15,17,/float,value=min(m1))
m2(1,1) = m1
map_set,/stere,90,-180,lim=[50,-180,85,180]
xyouts,.5,.98,/norm,align=.5,'F!IWALL!N ('+yrstr+') -Wm!E-2!N',chars=1.3
contour,m2,xx,yy,/follow,lev=lev,/overplot,path='path.dat'
polycontour,'path.dat'
contour,m1,x,y,/follow,lev=lev,/overplot
map_grid,latdel=5,londel=30
for i=0,11 do xyouts,lon(i),lat,/data,mostr(i),align=.5,$
orient=i*30,chars=1.3
for i=0,6 do xyouts,-180,i*5+55,/data,latstr(i)+'!9%!3N'
endfor
end


Good Luck

Phil Turet
turet@noaapmel.gov
NOAA/PMEL - Seattle, WA
(206) 526-6804
~
Re: IDL contour [message #691 is a reply to message #690] Tue, 12 January 1993 09:54 Go to previous message
peba1231 is currently offline  peba1231
Messages: 12
Registered: February 1992
Junior Member
In article <1993Jan12.165204.29186@nsisrv.gsfc.nasa.gov>,
pat@gsfc.nasa.gov (patrick m. ryan) writes:

|> the problem i still have is that polycontour bites.
|> if anyone has a color contouring routine which knows how
|> to handle unclosed contours, please post it. if i'm
|> feeling inspired one of these days, i translate the NCAR
|> CONPACK routines into IDL. they're ugly but they do
|> the job.
|>
|> pat
|>

Could you please send me your routine as soon as you wrote it :-)

Peter

--
------------------------------------------------------------ ----------
Peter Bartsch | Tel. +49 (0)30 314 23093
TU Berlin, Sekr. F2 | FAX: +49 (0)30 314 22866
Marchstr. 14 |
1000 Berlin 10 | e-mail: peba1231@camillo.fb12.tu-berlin.de
------------------------------------------------------------ ----------
Re: IDL contour [message #692 is a reply to message #691] Tue, 12 January 1993 08:52 Go to previous message
pat is currently offline  pat
Messages: 25
Registered: June 1992
Junior Member
Mirko Vukovic (at913@cleveland.Freenet.Edu) wrote:

> In a previous article, apwang@waikato.ac.nz () says:
>> Does anyone know how to draw a contour graph in polar
>> coordinate system without changing to cartician coordinate
>> by using IDL? Any help will be appreciated very much!
> I second the request for polar grid contour/surface routine

you can't do it directly. what i do is interpolate
my polar grid to a cartesian grid and then contour it. i use
trigrid and triangulate to do the interpolation.
the problem i still have is that polycontour bites.
if anyone has a color contouring routine which knows how
to handle unclosed contours, please post it. if i'm
feeling inspired one of these days, i translate the NCAR
CONPACK routines into IDL. they're ugly but they do
the job.

pat

--
"I have a cunning plan." -- Baldric
patrick m. ryan
nasa / goddard space flight center / oceans and ice branch / hughes stx
pat@jaameri.gsfc.nasa.gov / zmpmr@charney.gsfc.nasa.gov
Re: IDL contour [message #693 is a reply to message #692] Tue, 12 January 1993 06:39 Go to previous message
at913 is currently offline  at913
Messages: 9
Registered: January 1993
Junior Member
In a previous article, apwang@waikato.ac.nz () says:

> Hi,
> Does anyone know how to draw a contour graph in polar
> coordinate system without changing to cartician coordinate
> by using IDL? Any help will be appreciated very much!
>
> Thanx!
>
> Anping Wang
> Email apwang@waikato.ac.nz
>
>
I second the request for polar grid contour/surface routine
--
Mirko Vukovic
University of Wisconsin -- Madison
VUKOVIC@UWMFE.NEEP.WISC.EDU
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: incorporating graphics into PC files
Next Topic: HDF/CDF support from PV-Wave when?

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

Current Time: Wed Oct 08 13:42:55 PDT 2025

Total time taken to generate the page: 0.00673 seconds