Polar contour on top of polar map ?? [message #44206] |
Mon, 30 May 2005 08:59  |
meek
Messages: 2 Registered: May 2005
|
Junior Member |
|
|
Please ! What is wrong with the the following program -
the polar map is fine, the contour is restricted by the
map limits, but is confined to less than half the
map area - a sector of about 60 degrees (terminated
at the pole, and with curved radii bondaries.)
I want the contour to overlay the map (or vice versa).
Thanks for any hint!
Chris
-----
;polarma1.pro - fiddle with polar grid / contour
pp=!pi/180.
print,' .ps (1) or screen(2)?'
read,isel
if isel eq 1 then set_plot,'ps'
if isel eq 2 then set_plot, 'win' ;screen
!P.font=0
if isel eq 1 then device,/color,/portrait,yoffset=3.,ysize=21.;,scale_factor=1 .0
nlats=16 ;make this even!
minlat=90-nlats*2.5
along=fltarr(144)
alat=fltarr(nlats)
zzz=fltarr(144,nlats)
for j=0,143 do along(j)=pp*(j*2.5); azim, radians
for i=0,nlats-1 do alat(i)=90-i*2.5 ;N lat
for i=0,nlats-1 do begin
for j=0,143 do begin
x= sin(2.*!pi*(i*2.5)/20.)
y= sin(2.*!pi*(j*2.5)/60. +4)
zzz(j,i)=100*(x+y)
endfor
endfor
map_set, /noerase,/isotropic,/continent,90.,/azimuthal,$
/grid, londel=30, latdel=5,$
pos=[0.01,0.01,.99,.99],$
limit=[minlat,-180.,90.,180.],$ latmin,lonmin,latmax,lonmax
xmargin=0.,ymargin=0.
rad=fltarr(nlats)
for i=0,nlats-1 do $
rad(i)=alat(i)
polar_contour,/overplot,zzz,along,rad,$
levels=[-100.,-50.,-0.,+50.,+100.]
if isel eq 1 then close ; so i can get idl.ps without exit idl
end
|
|
|
RE: Polar contour on top of polar map ?? [message #44307 is a reply to message #44206] |
Tue, 07 June 2005 00:19  |
meek
Messages: 2 Registered: May 2005
|
Junior Member |
|
|
To answer my own question, in case someone else is
interested ...
Using contour (not polar_contour) works; but to avoid
a small gap, the i/p matrix should go 1 azimuth bin beyond
360 deg. Also , for contour, the azimuths should be in degrees.
Chris
In a previous article, meek@skyway.usask.ca wrote:
> Please ! What is wrong with the the following program -
> the polar map is fine, the contour is restricted by the
> map limits, but is confined to less than half the
> map area - a sector of about 60 degrees (terminated
> at the pole, and with curved radii bondaries.)
>
> I want the contour to overlay the map (or vice versa).
>
> Thanks for any hint!
>
> Chris
> -----
> ;polarma1.pro - fiddle with polar grid / contour
> pp=!pi/180.
>
> print,' .ps (1) or screen(2)?'
> read,isel
> if isel eq 1 then set_plot,'ps'
> if isel eq 2 then set_plot, 'win' ;screen
>
> !P.font=0
> if isel eq 1 then device,/color,/portrait,yoffset=3.,ysize=21.;,scale_factor=1 .0
> nlats=16 ;make this even!
> minlat=90-nlats*2.5
> along=fltarr(144)
> alat=fltarr(nlats)
> zzz=fltarr(144,nlats)
> for j=0,143 do along(j)=pp*(j*2.5); azim, radians
> for i=0,nlats-1 do alat(i)=90-i*2.5 ;N lat
> for i=0,nlats-1 do begin
> for j=0,143 do begin
>
> x= sin(2.*!pi*(i*2.5)/20.)
> y= sin(2.*!pi*(j*2.5)/60. +4)
>
> zzz(j,i)=100*(x+y)
>
> endfor
> endfor
>
>
> map_set, /noerase,/isotropic,/continent,90.,/azimuthal,$
> /grid, londel=30, latdel=5,$
> pos=[0.01,0.01,.99,.99],$
> limit=[minlat,-180.,90.,180.],$ latmin,lonmin,latmax,lonmax
> xmargin=0.,ymargin=0.
> rad=fltarr(nlats)
> for i=0,nlats-1 do $
> rad(i)=alat(i)
>
> polar_contour,/overplot,zzz,along,rad,$
> levels=[-100.,-50.,-0.,+50.,+100.]
>
> if isel eq 1 then close ; so i can get idl.ps without exit idl
> end
|
|
|