<div dir="ltr"><div class="gmail_quote"><br><div dir="ltr"><div><div>Hi Ncl users,<br><br></div>This is the code i use to produce attached plots . I didn&#39;t get any error. But there is a skewed parts here and there in the plots. I don&#39;t understand where is the problem. I think problem is choosing the rscan array. Could someone help me to pick right one? Figure shows unsmoothened values. <br><br></div><div>I would appreciate any help and suggestions. <br></div><div>Thank you,<br></div><div>Adv<br></div><div><br></div><div><div>;****************************************************<br>;****************************************************<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;<br>;***************************************************<br><br>;***************************************************<br>begin<br>;***************************************************<br>strll  = asciiread(&quot;stationmac.txt&quot;, -1, &quot;string&quot;) ;<br>  print(strll)   ; STATION&quot;,&quot;STATION_NAME&quot;, &quot;LAT&quot;, &quot;LON&quot;<br>  print(&quot;=====&quot;)<br><br>sloc = str_get_field(strll , 2, &quot;,&quot;)<br>  lat  = tofloat( str_get_field(strll , 3, &quot;,&quot;)  )<br>  lon  = tofloat( str_get_field(strll , 4, &quot;,&quot;)  )<br>  print(sloc +&quot; : &quot;+lat+&quot; &quot;+lon)<br>mnlat=(min(lat))<br>mxlat=(max(lat))<br>mnlon=(min(lon))<br>mxlon=(max(lon))<br>;print(lon)<br>print(mnlon)<br>print(mxlon)<br>print(mnlat)<br>print(mxlat)<br>mlon = 390<br>dlon = -90.35 / mlon<br>lonn  = fspan (-116, (mlon - 1) * dlon, mlon)<br>print(lonn)<br>mlat = 390<br>dlon = -90.35 / mlon<br>lonn  = fspan (-116, (mlon - 1) * dlon, mlon)<br>print(lonn)<br>mlat = 390<br>dlat = 49.0 / mlat<br>latt  = fspan (40.01, (mlat - 1) * dlat, mlat)<br>print(latt)<br>diri=&quot;/home/dailysimms/prec-obs/&quot;<br>z1 = asciiread(diri+&quot;t_avg_Jan-Dec1965-2005&quot;,-1,&quot;float&quot;)<br>print(z1)<br>printVarSummary(z1)<br>;a = (/1,2,3,4,5,6,7,8/)<br>;Dimensions and sizes:  [192372]<br>;390 rows by 50 columns<br>a0 = onedtond(z1,(/390,492/))<br>printVarSummary(a0)<br>v = ispan (0,390,1)<br>print(v)<br>;tenth of mm<br>x=(regCoef(v,z1))*492<br>print(x)<br>set_default_fillvalue(&quot;string&quot;,  &quot;&quot;)<br>  opt    = True<br>  rscan  = (/5,3,1 /)<br>grid   = obj_anal_ic_deprecated(lon, lat, z1, lonn, latt, rscan, True)<br>printVarSummary(grid)<br>;return<br>;print(grid)<br>print(min(grid))<br>print(max(grid))<br>;return<br>grid&amp;lat@units=&quot;degrees_north&quot;<br>grid&amp;lon@units=&quot;degrees_east&quot;<br>printVarSummary(grid)<br>;return<br>;**************************************************<br>; plot parameters<br>;**************************************************<br><br>  wks = gsn_open_wks(&quot;x11&quot;,&quot;Climatemn_Temp_1965-2005&quot;)                  ; Open ps file<br> gsn_define_colormap(wks,&quot;testcmap&quot;)<br>  plot = new(1,graphic)<br><br> res                       = True<br>res@gsnDraw             = False           ; don&#39;t draw<br>res@gsnFrame            = False           ; don&#39;t advance frame<br>res@cnInfoLabelOn       = False           ; turn off cn info label<br> res@cnLinesOn       = False                   ; turn off contour lines<br>   res@cnFillOn        = True               ; color plot desired<br>   res@cnLineLabelsOn  = False<br> res@lbLabelBarOn        = False           ; turn off individual cb&#39;s<br>;res@txFontHeightF = 0.015                   ; adjust font height of gsnLeftString/gsnRightString titles<br>;res@cnLevelSelectionMode = &quot;ExplicitLevels&quot;                     ; set explicit contour levels<br>;res@cnLevels    = (/-2,-1,0,1,2,3,4/)<br> res@vpWidthF              = 0.90                ; change aspect ratio of plot<br>  res@vpHeightF             = 0.90<br>  res@vpXF                  = 0.05<br>  res@vpYF                  = 0.95<br><br>; map resources for projection<br>res@mpGridAndLimbOn       = False<br>res@gsnTickMarksOn = False<br>;***************************************************<br>res@mpLimitMode           = &quot;LatLon&quot;<br>  res@mpMinLatF             =   40.<br>  res@mpMaxLatF             =   49.<br>  res@mpMinLonF             = -116<br>  res@mpMaxLonF             =  -90.1<br><br>   res@mpPerimOn              = True                    ; draw box around map<br>res@mpGeophysicalLineThicknessF = 3.0<br>res@mpGeophysicalLineColor = &quot;Black&quot;; (/22/)<br>;res@mpNationalLineThicknessF  = 3.0<br>res@mpOutlineBoundarySets = &quot;GeophysicalAndUSStates&quot; ; add state boundaries<br>res@mpNationalLineColor  = res@mpGeophysicalLineColor<br>res@mpUSStateLineThicknessF = 3.0<br>res@mpUSStateLineColor  = res@mpGeophysicalLineColor<br><br>res@gsnAddCyclic            = False<br><br>res@gsnCenterStringFontHeightF     = 0.02<br>res@gsnCenterString     = &quot;Obs&quot;<br>plot(0) = gsn_csm_contour_map_ce(wks,grid,res)<br>;************************************************<br>; create panel<br>;************************************************<br>  resP                  = True                   ; modify the panel plot<br>  resP@gsnFrame         = False                  ; don&#39;t advance the frame, so we can use gsn_text_ndc<br>  resP@gsnPanelLabelBar = True                   ; add common colorbar<br>  resP@lbLabelFontHeightF = 0.015                ; set font height of Label Bar labels<br>resP@gsnPanelBottom   = 0.2                    ; shrink panel plot by setting bottom edge of plot<br>  resP@gsnPanelTop      = 0.9                    ; shrink panel plot by setting top edge of plot<br> resP@pmLabelBarWidthF  = 0.3                 ; make thinner<br>  resP@pmLabelBarHeightF = 0.05<br>  resP@gsnPanelYWhiteSpacePercent = 5.           ; increase spacing along Y-axis between panel plots<br> resP@cnLinesOn       = False                   ; turn off contour lines<br>;   resP@cnFillOn        = True               ; color plot desired<br>;  resP@lbTitleOn        = True                  ; turn on title<br>  resP@lbTitleString    = &quot;degC&quot;<br>  resP@lbTitleFontHeightF= .012                 ; make title smaller<br>   resP@cnLineLabelsOn  = False<br>  resP@txString    = &quot;Climatemn_Temp_1965-2005&quot;<br>resP@txFontHeightF   = 0.019<br>  gsn_panel(wks,plot,(/1,1/),resP)               ; now draw as one plot<br><br><br>;  txres               = True<br>;  txres@txFontHeightF = 0.015<br>;  gsn_text_ndc(wks,&quot;Figure 16: A smaller panel plot&quot;,0.5,0.16,txres)<br>  frame(wks)<br><br>end<br><br></div></div></div>
</div><br></div>