<div>Hi, Dennis</div><div><br></div><div>Sorry to interrupt, I have checked this little problem out. I added a wrong resource gsnContourNegLineDashPattern.</div><div><br></div><div>Wind</div><div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ 原始邮件 ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>发件人:</b> "Dennis Shea";<shea@ucar.edu>;</div><div><b>发送时间:</b> 2016年9月27日(星期二) 晚上9:52</div><div><b>收件人:</b> "WIND"<954051157@qq.com>; <wbr></div><div><b>抄送:</b> "ncl-talk"<ncl-talk@ucar.edu>; <wbr></div><div><b>主题:</b> Re: [ncl-talk] irregular coordinate array sfXArray non-monotonic:defaulting sfXArray</div></div><div><br></div><div dir="ltr"><div><div><div><div><div><div><div>When posting to ncl-talk, it is best to always include a printVarSummary(...) of pertinent variables. EG:<br><br></div><div>printVarSummary(data)<br></div>printVarSummary(<span style="line-height:1.5">datareverse)<br><br>--<br></span></div><div><span style="line-height:1.5">This is wrong:<br> </span>data&month=(/6,7,8,9,10,11,12,<wbr>1,2,3,4,5/)<br><br></div><div>The & means a "coordinate variable" (CV). By definition, a CV is monotonic. Your assignment is not monotonic.<br><br></div><div>Given the way you have done things, I think the following should work<br><br><span style="line-height:1.5"> data!0="index"</span><br> data&index=ispan(1,12,1)<br></div><div> datareverse = data(la|:,index|:)<br></div><div><span style="line-height:1.5">--<br></span></div><span style="line-height:1.5">Why are you manually specifying the years?<br><br></span>year1=(/1980,1981,1982,1983,19<wbr>84,1985,1986,1987,1988,1989,19<wbr>90,1991,1992,1993,1994,1995,19<wbr>96,1997,1998,1999,2000/)<br><br></div><div>Use the ispan function<br></div><div><br></div>year1 = ispan(1980, 2000,1)<br><br></div>or, better programming practice<br><br></div>yrStrt = 1980<br></div>yrLast = 2000<br>year1 = ispan(yrStrt,yrLast,1)<br><br>===<br></div><div>Use a function to make your code cleaner. <br>Use _n and _n_Wrap, if possible.<br><br></div><div>undef("rc_month")<br></div><div>function rc_month(file_name[1]:string, var_name[1]:string, yrStrt[1]:integer, yrLast[1]:yrLast)<br></div><div>local f, t, year, t1new, rc<br></div><div>begin<br></div><div><div> f = addfile(file_name,"r")</div><div> t = short2flt( f1->$var_name$ )</div><div> year = ispan(yrStrt, yrLast,1)<br></div><div><br></div><div> tZon = dim_avg_n_Wrap(t,2)</div><div> rc = regCoef_n(year, tZon, 0, 0)<br></div><div> return(rc)<br></div><div>end<br><br></div><div>then use<br><br></div><div>rc1 = rc_month("JanTmon.nc", "t", yrStrt, yrLast)<br></div><div>rc2 = rc_month("FebTmon.nc", "t", yrStrt, yrLast)<br><br></div><div>Please read the NCL manuals about procedures and functions.<br><br><a href="http://www.ncl.ucar.edu/Document/Manuals/">http://www.ncl.ucar.edu/Document/Manuals/</a><br><br></div><div>In particular, the DKRZ tutorials<br></div></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">______________________________<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></div>