<div dir="ltr"><div class="gmail_default" style="font-size:small">Grace,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I'm confused by what you are asking for. You said the observed data didn't have a time dimension, but then you said it had "one data per hour". This sounds like you have some kind of time data.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In order to use gsn_csm_xy2, you need to have both sets of Y values be the same length, and be at the same X (in this case "time") values. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you have two different sets of X and Y axes values, then look at the gsn_csm_x2y2 function. There's an example at:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/xy.shtml#ex20">http://www.ncl.ucar.edu/Applications/xy.shtml#ex20</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">--Mary</div><div class="gmail_default"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 15, 2015 at 7:07 PM, 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"><span style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:24px"><font size="4" style="line-height:30px">Hi,all:</font></span><span style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:23px"></span><div><font size="4"><font face="lucida Grande, Verdana, Microsoft YaHei"><span style="line-height:30px"> I am wondering how to plot xy2 plot with 1D data?</span></font></font></div><div style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:23px"><span style="line-height:24px"><font size="4" style="line-height:30px"> I want to compare wrfout data with observed data in a xy2 plot with time as the X axis,</font></span></div><div style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:23px"><span style="line-height:24px"><font size="4" style="line-height:30px">but the observed data are 1D without time demension in a .txt file, a data per hour .</font></span></div><div style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:23px"><span style="line-height:24px"><font size="4" style="line-height:30px"> I have extract the wrfout data as 1D data in a .txt file :</font></span></div><div style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:23px"><span style="line-height:24px"><font size="4" style="line-height:30px">;;;;;;;;;;;;;;;;;;;;;</font></span></div><div><font face="lucida Grande, Verdana, Microsoft YaHei" size="4"><span style="line-height:30px"><div>ascii_file = "temp.txt"</div><div>str = new(ntimes, "string")</div><div> do it =0, ntimes-1,1 ; TIME LOOP</div></span></font></div><div><font face="lucida Grande, Verdana, Microsoft YaHei" size="4"><span style="line-height:30px"><div>t2= wrf_user_getvar(a,"T2",it)</div><div> t2= t2-273.15</div><div> t2@units = "c" </div><div><span style="white-space:pre-wrap">        </span>tt2=t2(it,98, 98)</div><div> end if</div><div> str(it) = sprintf("%12.8f", tt2)</div><div>end do </div></span></font></div><div><span style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:24px"><font size="4" style="line-height:30px"> </font></span><font face="lucida Grande, Verdana, Microsoft YaHei" size="4"><span style="line-height:30px">asciiwrite(ascii_file, str)</span></font></div><div><font face="lucida Grande, Verdana, Microsoft YaHei" size="4"><span style="line-height:30px">;;;;;;;;;;;;;;;;;;;;;;;</span></font></div><div><font face="lucida Grande, Verdana, Microsoft YaHei" size="4"><span style="line-height:30px"><br></span></font></div><div><font face="lucida Grande, Verdana, Microsoft YaHei" size="4"><span style="line-height:30px">How can I plot the xyplot </span></font><span style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';font-size:large;line-height:30px">with time as the X axis while data do not have time demension with the "</span><span style="white-space:pre-wrap;line-height:normal">plot = gsn_csm_xy2(wks,time,t2,tob,resL,resR)</span><span style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';font-size:large;line-height:30px">"</span></div><div style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:23px"><br></div><div style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:23px"><span style="line-height:24px"><font size="4" style="line-height:30px"> Or do you guys have some advice?</font></span></div><div style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:23px"><span style="line-height:24px"><font size="4" style="line-height:30px"> any information will be appreciated</font></span></div><br>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>