Hi,
I got a problem for filled contour. Some areas are filled by light blue
which should be blue (see 1.ps).
I tried to plot it in lower resolution (every three points, see 2.ps)
and the problem is gone.
Does anyone have the same problem or know how to fix it?
Thanks a lot.
Chia-chi
Here is my script.
;*************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
;************************************************
begin
dir = "/home/ccwang/stan/"
fig_name = "test"
nlat = 720
nlon = 1440
lon = new((/nlon/),float)
lat = new((/nlat/),float)
do ilon=0,nlon-1
lon(ilon)=0.25*(ilon+1)-0.125
end do
lon!0="lon"
lon&lon=lon
lon@units = "degrees_east"
do ilat=0,nlat-1
lat(ilat)=0.25*(ilat-1)-90.125
end do
lat!0="lat"
lat&lat=lat
lat@units = "degrees_north"
;------------
; read the background cloud liquid water
;------------
slab = new((/nlat,nlon/),float)
slab = fbinrecread(dir+"12Jun00.clw.bin",0,(/nlat,nlon/),"float")
slab!0 = "lat"
slab&lat = lat
slab!1 = "lon"
slab&lon = lon
;------------
; read the ship points
;------------
pnt = new((/24,2/),float)
pnt = asciiread(dir+"12Jun00.ascii",(/24,2/),"float")
do i = 0,23
if (-pnt(i,1) .lt. 0) then
pnt(i,1) = 360-pnt(i,1)
else
pnt(i,1) = -pnt(i,1)
end if
end do
;------------
wks = gsn_open_wks("ps",fig_name)
colors = (/"white","black","white", "blue","green", \
"yellow","orange", "orange red","red",\
"brown","red4","gray"/)
gsn_define_colormap(wks,colors)
res = True
res@gsnDraw = False
res@gsnFrame = False
res@mpMinLatF = -40
res@mpMaxLatF = 40
res@mpMinLonF = 160
res@mpMaxLonF = 260
res@mpCenterLonF = 180
res@cnFillOn = True
res@cnLinesOn = False
res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
res@cnMinLevelValF = 0.1
res@cnLevelSpacingF = .1
res@cnMaxLevelValF = 0.9
res@gsnMajorLatSpacing = 10 ; change maj lat tm spacing
res@gsnMajorLonSpacing = 20 ; change maj lon tm spacing
res@tiMainString = "06-20 Jun 2000 cloud liquid water content"
plot=gsn_csm_contour_map(wks,slab(::2,::2),res)
resm = True
resm@gsMarkerIndex = 16 ; marker style (circle)
resm@gsMarkerSizeF = 8.0 ; marker size
resm@gsMarkerColor = "black" ; maker color
dum1=gsn_add_polymarker(wks,plot,pnt(:,1),pnt(:,0),resm)
resm@gsLineThicknessF = 2.0
resm@gsLineColor = "black"
dum2=gsn_add_polyline(wks,plot,pnt(:,1),pnt(:,0),resm) ; draw the
traj
draw(wks)
frame(wks)
;====================================================================
end
-- Chia-chi Wang chiachw@uci.edu (O)949-824-2997, (Fax)949-824-3256 Department of Earth System Science University of California, Irvine Irvine, CA 92697-3100 http://essgrad.ps.uci.edu/~ccwang/
_______________________________________________ ncl-talk mailing list ncl-talk@ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Mon Aug 23 2004 - 14:42:08 MDT