<div dir="ltr"><div>As noted in the warning message:<br> You may want to set gsnAddCyclic to False to avoid a warning<br><br>---<br>[1]<br></div> res@gsnAddCyclic= False<br><div><div> <br></div><div>Generally, always include a: printVarSummary( PCP)<br><br></div><div>I speculate the variable is: PCP(LAT,LON1_1441) ; (400,1441)<br><br></div><div>The 1441 would indicate that the cyclic data value has *been included* on the file.<br> 3B42 data have dimension sizes TRMM_3B42(400,1440).<br><br></div><div>[2] Why are you doing the following?<br><br><div>pcp_sum=dim_sum_n(pcp(0:8,:,:)<wbr>,0)</div><div>pcp_sum!0="lat"</div><div>pcp_sum!1="lon"</div><div>pcp_sum&lat=lat(0:399)</div><div>pcp_sum&lon=lon(0:1440)</div><div>printVarSummary(pcp_sum)<br><br></div><div>You should use the _Wrap version for cleaner code.<br><br> pcp_sum=dim_sum_n_Wrap(pcp(0:8,:,:)<wbr>,0)</div><div> printVarSummary(pcp_sum)<br></div><br></div><div>The named dimension 'lat,lon' are *not* necessary.<br><br></div><div>[3] <br>NCL 6.2.0 was released over 3 years ago. There have been many new features and improvements. I suggest you upgrade to 6.4.0<br><br>[4]<br></div><div>The current release of NCL 6.4.0<br> <a href="http://www.ncl.ucar.edu/current_release.shtml">http://www.ncl.ucar.edu/current_release.shtml</a><br><br></div><div>has an associated User Guide with many examples. I suggest that you look at it.<br></div><div><br><a href="http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/">http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/</a><br><br></div><div>Good Luck <br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 8, 2017 at 4:45 AM, grace <span dir="ltr"><<a href="mailto:313695096@qq.com" target="_blank">313695096@qq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi:</div><div> All,I have write a script to read and trmm 3B42 data <span style="line-height:1.5">,but it appears warning :</span></div><div><br></div><div> (0) gsn_add_cyclic: Warning: The range of your longitude coordinate array is at least 360.</div><div>(0) You may want to set gsnAddCyclic to False to avoid a warning</div><div>(0) message from the spline function.</div><div>warning:_<wbr>NhlCreateSplineCoordApprox: Attempt to create spline approximation for X axis failed: consider adjusting trXTensionF value</div><div>warning:IrTransInitialize: error creating spline approximation for trXCoordPoints; defaulting to linear</div><div><br></div><div>And there is no <span style="line-height:1.5">contour appeared on the plot</span></div><div><img src="cid:9BAF46A4@EB530F0A.37BFE858.jpg" style="width:466px;height:404px"></div><div><br></div><div>This is my script:</div><div> ;</div><div><div>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/wrf/WRFUserARW.ncl"</div><div><br></div><div>begin</div><div><br></div><div> a = addfile("/backup/hl/z_20min/<a href="http://2010.nc" target="_blank">20<wbr>10.nc</a>","r")</div><div><br></div><div><br></div><div>; We generate plots, but what kind do we prefer?</div><div>; type = "x11"</div><div> type = "pdf"</div><div>; type = "ps"</div><div>; type = "ncgm"</div><div> wks = gsn_open_wks(type,"<wbr>trmmPrecip2010_0808")</div><div>; get data</div><div>pcp = a->PCP</div><div>lat = a->LAT</div><div>lon = a->LON1_1441</div><div>pcp_sum=dim_sum_n(pcp(0:8,:,:)<wbr>,0)</div><div><br></div><div>pcp_sum!0="lat"</div><div>pcp_sum!1="lon"</div><div>pcp_sum&lat=lat(0:399)</div><div>pcp_sum&lon=lon(0:1440)</div><div>printVarSummary(pcp_sum)</div><div><br></div><div>;printVarSummary(pcp1)</div><div><br></div><div>; Set some basic resources</div></div><div><div>res = True</div><div> res@gsnDraw = False</div><div> res@gsnFrame = False</div><div> res@cnLinesOn = False</div><div>res@lbLabelBarOn = False</div><div>res@cnInfoLabelOn = False</div><div>res@cnLineLabelsOn = False</div><div>res@mpPerimOn = True</div><div>res@gsnMaximize=True</div><div>res@pmTickMarkDisplayMode = "Always"</div><div>res@gsnDraw = False ; don't draw yet</div><div>res@gsnFrame = False</div><div><br></div><div>res@mpGeophysicalLineColor = "Black"</div><div>res@mpNationalLineColor = "Black"</div><div>res@mpDataSetName = "Earth..4"</div><div>res@mpDataBaseVersion = "MediumRes"</div><div>res@mpOutlineSpecifiers = ("China:states")</div><div>res@mpNationalLineThicknessF= 0.1</div><div>res@mpOutlineDrawOrder = "PostDraw"</div><div>res@mpLimitMode = "LatLon" ; Limit the map view.</div><div>res@mpMinLonF = 104.8</div><div>res@mpMaxLonF = 112</div><div>res@mpMinLatF = 31.9</div><div>res@mpMaxLatF = 39.3</div><div><br></div></div><div><div> plot=gsn_csm_contour_map(wks,<wbr>pcp_sum,res)</div><div> shp_name = "/public/home/huanglei/map/<wbr>shaanxi_city_l.shp"</div><div> lnres = True</div><div> lnres@gsLineColor = "black"</div><div> lnres@gsLineThicknessF = 1.5</div><div> id = gsn_add_shapefile_polylines(<wbr>wks,plot,shp_name,lnres)</div><div><br></div><div> txres2 = True</div><div> txres2@txFont = 10</div><div> txres2@txFontHeightF =0.01</div><div> txres2@txFontColor = "Blue"</div><div> txdum1 =gsn_add_text(wks, plot, "Xian", 108.93,34.27, txres2)</div><div> draw(plot)</div><div> frame(wks)</div><div> delete(res)</div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;</div><div><br></div><div><br></div><div>end</div></div><div><br></div><div><br></div><div><div style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:23.7999992370605px">My NCL version is 6.2.0.</div><div style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:23.7999992370605px"> How can I slove the problem?</div></div><div></div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>