<div style="line-height:1.7;color:#000000;font-size:10px;font-family:Arial"><br><br><br><div>hi all,</div><div>&nbsp; &nbsp;I am ploting r-theta data. Theta is from 0 to 355 at an interval of 5. However, the there is blank at the angular of 355-0. Do anybody know why. My script is attached bellow.&nbsp;</div><div><div>;***********************************************</div><div>; radar_1.ncl</div><div>;</div><div>; Concepts illustrated:</div><div>; &nbsp; - Plotting radar (r,theta) data</div><div>; &nbsp; - Adding shading or color fill to areas on a contour plot with missing data</div><div>; &nbsp; - Drawing raster contours</div><div>; &nbsp; - Drawing cell-filled contours</div><div>; &nbsp; - Using triangular meshes to create contours</div><div>;***********************************************</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</div><div><br></div><div>begin</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>pi &nbsp; &nbsp; &nbsp; = &nbsp;4.0*atan(1.)</div><div>&nbsp; deg2rad &nbsp;= &nbsp;pi/180.</div><div>&nbsp; rad2deg &nbsp;= &nbsp;45./atan(1.)</div><div><br></div><div>&nbsp; &nbsp;</div><div>&nbsp; a = 6371.</div><div>&nbsp;</div><div>&nbsp; r = ispan(0,500,10)&nbsp;</div><div>&nbsp; theta &nbsp;= ispan(0,355,5)</div><div><br></div><div>&nbsp; y = conform_dims((/dimsizes(r),dimsizes(theta)/),r,0)*cos(conform_dims((/dimsizes(r),dimsizes(theta)/),theta,1)*deg2rad)</div><div>&nbsp; x = conform_dims((/dimsizes(r),dimsizes(theta)/),r,0)*sin(conform_dims((/dimsizes(r),dimsizes(theta)/),theta,1)*deg2rad)</div><div><br></div><div>; &nbsp;x = r*sin(theta*deg2rad)</div><div>&nbsp;&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div>;print(lat+" "+lon )</div><div>&nbsp;</div><div>&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>tcnum = systemfunc("cut -d ' ' -f 1 land_tcnum_time.dat")</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>ltime = systemfunc("cut -d ' ' -f 2 land_tcnum_time.dat")</div><div><br></div><div>&nbsp;i = 3</div><div><br></div><div>&nbsp;tcdir = "land_gd_tc/"</div><div>&nbsp;tcfile = tcnum(i)+".dat"</div><div>&nbsp;tmp = asciiread(tcdir+tcfile,-1,"integer")</div><div>&nbsp;ntime = dimsizes(tmp)/6</div><div>&nbsp;data = onedtond(tmp,(/ntime,6/))</div><div>&nbsp;</div><div>&nbsp;index = ind(ltime(i).eq.data(:,0))</div><div>&nbsp;lat0 = data(index,2)*0.01</div><div>&nbsp;lon0 = data(index,3)*0.01</div><div>&nbsp;</div><div>&nbsp;a0 = a*cos(lat0*deg2rad)</div><div>&nbsp;&nbsp;</div><div>&nbsp;</div><div>&nbsp; lat = y/(a*deg2rad)+lat0</div><div>&nbsp; lon = x/(a0*deg2rad)+lon0</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;fd = "/gza/g3/wengh/TC/TRMM/"+tcnum(i)+"/"</div><div>&nbsp;fn = systemfunc("ls "+fd+"3B42."+str_get_cols(ltime(i),0,7)+"."+str_get_cols(ltime(i),8,9)+"*.HDF")</div><div>&nbsp;f = addfile(fn,"r")&nbsp;</div><div>&nbsp;pre = f-&gt;precipitation</div><div>&nbsp;</div><div>&nbsp;latgrid = fspan(-49.875,49.875,400)</div><div>&nbsp;longrid = fspan(-179.875,179.875,1440)</div><div>&nbsp;</div><div>&nbsp;pre!0 = "lon"</div><div>&nbsp;pre!1 = "lat"</div><div>&nbsp;</div><div>&nbsp;pre&amp;lon = longrid</div><div>&nbsp;pre&amp;lat = latgrid</div><div>&nbsp;</div><div><br></div><div>pr = new((/dimsizes(r),dimsizes(theta)/),typeof(pre))</div><div><br></div><div>do i=0,dimsizes(r)-1</div><div>&nbsp;do j=0,dimsizes(theta)-1</div><div>&nbsp; nlat = ind_nearest_coord(lat(i,j),latgrid,0)</div><div>&nbsp; nlon = ind_nearest_coord(lon(i,j),longrid,0)</div><div>&nbsp; pr(i,j) = (/pre(nlon,nlat)/)</div><div>&nbsp;end do</div><div>end do</div><div>&nbsp;</div><div>&nbsp;</div><div>;print(pr(0,0)+" "+x(0,0)+" "+y(0,0))</div><div><br></div><div>;exit</div><div>&nbsp;</div><div><br></div><div>graphicname = get_script_prefix_name() &nbsp;</div><div>wks = gsn_open_wks("eps" ,graphicname) &nbsp;</div><div>;gsn_define_colormap(wks,"gui_default")</div><div>gsn_define_colormap(wks,"precip2_15lev")</div><div>;gsn_define_colormap(wks,"radar")</div><div>;gsn_define_colormap(wks,"precip2_17lev")</div><div>colors = ispan(4,17,1)</div><div>;colors(0) = 2</div><div><br></div><div><br></div><div>&nbsp; cnres &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = True</div><div>; &nbsp;cnres@gsnMaximize &nbsp; &nbsp; &nbsp; = True</div><div><br></div><div>&nbsp; cnres@sfXArray &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= x&nbsp;</div><div>&nbsp; cnres@sfYArray &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= y</div><div>&nbsp; cnres@cnFillOn &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= True</div><div>&nbsp; cnres@cnLinesOn &nbsp; &nbsp; &nbsp; &nbsp; = False</div><div>; &nbsp;cnres@cnFillMode &nbsp; &nbsp; &nbsp; &nbsp;= "RasterFill" &nbsp; &nbsp; &nbsp;; this mode is fastest</div><div>&nbsp; cnres@trGridType &nbsp; &nbsp; &nbsp; &nbsp;= "TriangularMesh"</div><div>&nbsp; cnres@lbLabelAutoStride = True</div><div>; &nbsp;contour = gsn_csm_contour(wks,pr,cnres)</div><div><br></div><div>; The CellFill mode is slower but draws more outlying data</div><div>; and lets you fill in the missing value arrays, giving a good</div><div>; sense of the circular extent of the plot.</div><div><br></div><div>&nbsp; cnres@cnFillMode &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp;"CellFill"</div><div>&nbsp; cnres@cnMissingValFillColor = NhlNewColor(wks,.7,.7,.7)</div><div>&nbsp; cnres@cnLevelSelectionMode = "ExplicitLevels" &nbsp; &nbsp; ; set manual contour levels</div><div>&nbsp; cnres@cnLevels &nbsp; &nbsp; &nbsp; = ispan(1,13,1) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; set min contour level</div><div>&nbsp; cnres@cnFillColors &nbsp; = colors</div><div><br></div><div><br></div><div>&nbsp; contour = gsn_csm_contour(wks,pr,cnres)</div><div>end</div><div><br></div></div><img src="cid:427c9e42$1$15b9f239410$Coremail$wenguanhuan$163.com" orgwidth="978" orgheight="1265" data-image="1" style="width: 780px; height: 1008px; border: none;"><br><div style="position:relative;zoom:1">--<br><div>Best regards,</div><div>Guanhuan Wen</div><div style="clear:both"></div></div></div><br><br><span title="neteasefooter"><p>&nbsp;</p></span>