<div dir="ltr">Hi Jade,<div><br></div><div>Are you able to send me the two data files and your copy of the NCL script? I'm not seeing why this isn't working for you, or why it's failing where it's failing. Based on the script and the text in your original post, it's failing after it prints 2005-08-25_05:00:00, which would indicate it's still working on the first file, since it would have printed 2005-08-25_06:00:00 when it started the second file. </div><div><br></div><div><div style="font-size:12.8px">Here are the instructions for FTPing the files (taken from <a href="http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP" target="_blank">http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP</a>):</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><p style="margin:10px 0px 20px;padding:0px;color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px;line-height:16px"><b style="margin:0px;padding:0px">You can ftp larger datasets and files to:</b></p><p style="margin:10px 0px 20px;padding:0px;color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px;line-height:16px"></p><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px;padding:0px;font-size:13.3333px;line-height:16px;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent;color:rgb(0,0,0)">ftp <a href="http://ftp.cgd.ucar.edu/" target="_blank">ftp.cgd.ucar.edu</a>
anonymous
<use your email address for the password>
cd incoming
put ...
put ...
.
.
.
quit
</pre><p style="margin:10px 0px 20px;padding:0px;color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px;line-height:16px"><font color="red" style="margin:0px;padding:0px">Note that for security reasons, you cannot list the contents of this directory, and neither can we. We need to know the <i style="margin:0px;padding:0px">exact</i> names of the files in order to retrieve them.</font></p><p style="margin:10px 0px 20px;padding:0px;color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px;line-height:16px"><br></p><p style="margin:10px 0px 20px;padding:0px;font-size:13.3333px;line-height:16px"><font color="#000000" face="arial, helvetica, sans-serif">After the file is uploaded, you can send a message directly to me with the filename (or reply to ncl-talk if you wish). From there, we can try to get you a fix for your problem.</font></p><p style="margin:10px 0px 20px;padding:0px;font-size:13.3333px;line-height:16px">Thanks,</p><p style="margin:10px 0px 20px;padding:0px;font-size:13.3333px;line-height:16px">Bill</p></div></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 15, 2016 at 10:04 AM, Wang,Yu <span dir="ltr"><<a href="mailto:wangyu8722@ufl.edu" target="_blank">wangyu8722@ufl.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
Hi Bill,
<div><br>
</div>
<div>Thank you so much for your suggestion. Here are some of the screenshot of my file.</div>
<div>First I have addfiles of these two files:</div>
<div><img size="13336" style="max-width:99.9%" src="cid:37031a61-6b37-45b5-96d6-420ea4f1ab68"><br>
</div>
<div>Then I printed all times:</div>
<div><img size="17328" style="max-width:99.9%" src="cid:ef05eaba-261d-4e70-a95d-15d217a6633a"><br>
</div>
<div><img size="39207" style="max-width:99.9%" src="cid:403a76c4-5318-4235-84e0-0f48bd2cfde8"><br>
</div>
<div>My loop looks like below:</div>
<div><img size="42491" style="max-width:99.9%" src="cid:5ae5fc2d-46df-485c-a2a6-4fb1721a6fc5"><br>
</div>
<div>And here is the ncdump -h results:</div>
<div><img size="21984" style="max-width:99.9%" src="cid:bc85c89e-a66d-48f8-8fc8-f669a4d2c82e"><br>
</div>
<div>I think the error (out of range) I get is at line from the loop:</div>
<div>> <span>contour_psl = wrf_contour(a[it],wks,slp(it,:,:),opts_psl) when it = 12</span></div>
<div><span><br>
</span></div>
<div>Hope this information can help me better solve this problem. Thank you so much for all your help.</div>
<div><br>
</div>
<div>Best,</div>
<div><br>
</div>
<div>Jade</div>
<div><span><br>
</span></div>
<div><span><br>
</span></div>
<div><br>
</div>
</div>
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Bill Ladwig <<a href="mailto:ladwig@ucar.edu" target="_blank">ladwig@ucar.edu</a>><br>
<b>Sent:</b> Wednesday, June 15, 2016 11:36:37 AM<br>
<b>To:</b> Wang,Yu; NCL<div><div class="h5"><br>
<b>Subject:</b> Re: [ncl-talk] NCL wrf_contour use for multiple files</div></div></font>
<div> </div>
</div><div><div class="h5">
<div>
<div dir="ltr">Hi Jade,
<div><br>
</div>
<div>Please include ncl-talk in your replies so that it posts to the email list. The error you're getting is most likely due to 'it' being out of the bounds for your 'a' list variable. This leads me to believe there aren't actually 12 timesteps in that second
file. Have you looked at the file? Never assume it's what you think it is, always check. Please do an 'ncdump -h wrfout_d01_2005-08-25_06:00:00' and report back the result. Until I know what's really in that second file, it's hard to guess what might be
going wrong. Also, if you can print the 'times' result from 'times = wrf_user_getvar(a, "times", -1)', that would be helpful too.</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Bill</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jun 14, 2016 at 6:29 PM, Wang,Yu <span dir="ltr">
<<a href="mailto:wangyu8722@ufl.edu" target="_blank">wangyu8722@ufl.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Thank you so much for your help. </p>
<p><br>
</p>
<p>I think I will put my question in a different way maybe it is more clear.</p>
<p><br>
</p>
<p>I have two nc files wrfout_d01_<font face="Calibri, Arial, Helvetica, sans-serif">2005-08-25_00:00:00 and </font><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">wrfout_d01_</span><font face="Calibri, Arial, Helvetica, sans-serif">2005-08-25_06:00:00,
each of them have 12 time steps, whic means they have 30 minutes interval. I put them together using a addfiles command. And using a timestep of 2 to loop over to calculate the hourly precipitation tendency by using a later time minus an earlier one, for example,
using the 5th time step (<span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">2005-08-25_02:00:00</span>) of the first file minus the 3rd time step (<span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">2005-08-25_01:00:00</span>)
to calculate the tendency between 01Z to 02Z. </font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><br>
</font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif">When I was trying to plot the tendency from 2005-08-25_05:00:00 (which is the 11th time step of the first file as well as the 11th of the addfiles resulted list) to <span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">2005-08-25_06:00:00(which
is the 3rd time step of the second file, and the 13th time step of the addfiles list) using the line below: </span></font></p>
<pre style="word-wrap:break-word;white-space:pre-wrap">> contour_psl = wrf_contour(a[it],wks,slp(it,:,:),opts_psl)</pre>
And get the error of <span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">fatal:ListSelect: Index out of range.</span>
<p></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">If this still does not make any sense. Could you give
me some suggestion about how to use wrf_contour to plot the difference between the last time step of one wrf output file and the first time step of the second file? Can it be done or I have to use some other functions.</span></span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">Hope this explain better of my question. </span></span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">Thanks again for your help.</span></span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">Best,</span></span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</span></span></font></p>
<p><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">Jade</span></span></font></p>
</div>
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Bill Ladwig <<a href="mailto:ladwig@ucar.edu" target="_blank">ladwig@ucar.edu</a>><br>
<b>Sent:</b> Tuesday, June 14, 2016 6:21:11 PM<br>
<b>To:</b> Wang,Yu<br>
<b>Cc:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>;
<a href="mailto:wrfhelp@ucar.edu" target="_blank">wrfhelp@ucar.edu</a><br>
<b>Subject:</b> Re: [ncl-talk] NCL wrf_contour use for multiple files</font>
<div> </div>
</div>
<div>
<div>
<div>
<div dir="ltr">Hi Jade,<br>
<div><br>
</div>
<div>Can you do an "ncdump -h wrf_file" or an ncl_filedump and report back the number of times for each file? With WRF, sometimes the last file has less times than the other files. In this case, it might be only 1. With a tend_int greater than 1, you might
be jumping past the last time. Without seeing the data, it's hard to say.</div>
<div><br>
</div>
<div>Bill</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jun 14, 2016 at 2:53 PM, Wang,Yu <span dir="ltr">
<<a href="mailto:wangyu8722@ufl.edu" target="_blank">wangyu8722@ufl.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p></p>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
Dear ncl_talk and wrfhelp,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
Hope everything goes well with everyone.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
I am having a problem with ncl when I wanted to plot hourly precipitation tendencies multiple files. I used the example from the wrf website as below </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
<a href="http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/PRECIP/wrf_Precip_multi_files.ncl" title="http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/PRECIP/wrf_Precip_multi_files.ncl
Ctrl+Click or tap to follow the link" target="_blank">http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/PRECIP/wrf_Precip_multi_files.ncl</a>.
All I did is to change the input file. I have 2 domain 1 files, including 6 hours with 30 mins interval in each file. The script works perfectly when it was processing the first file as below:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">(0) Working on time: 2005-08-25_01:00:00</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">(0) Working on time: 2005-08-25_02:00:00</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">(0) Working on time: 2005-08-25_03:00:00</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">(0) Working on time: 2005-08-25_04:00:00</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">(0) Working on time: 2005-08-25_05:00:00</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">But when it get to calculate the next hour which should use both files, the script starts to have trouble and give me an error of
<div>fatal:ListSelect: Index out of range</div>
<div>fatal:["Execute.c":8575]:Execute: Error occurred at or near line 89 in file wrf_Precip_multi_files.ncl</div>
<div>Is this because of my output file or there is something I should change in the script?</div>
<div><br>
</div>
<div>Hope some one can provide some help. I would really appreciate any help. Thank you so much.</div>
<div><br>
</div>
<div>Best,</div>
<div><br>
</div>
<div>Jade</div>
</div>
<br>
<p></p>
</div>
</div>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>
</blockquote></div><br></div>