<div dir="ltr">Hi:<div><br></div><div>Could you please show us what happens when you run the program.  What the output is.</div><div><br></div><div>Are you able to print("fname_in " + fname_in)<br></div><div><br></div><div>Are  you able to print("files = " + files)</div><div><br></div><div>This might help in the debugging.</div><div><br></div><div>Thank you</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 19, 2019 at 7:55 PM tschonholz <<a href="mailto:tschonholz@smn.gov.ar">tschonholz@smn.gov.ar</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p>On 2019-02-19 17:15, Barry Lynn wrote:</p>
<blockquote type="cite" style="padding:0px 0.4em;border-left:2px solid rgb(16,16,255);margin:0px">
<div dir="ltr">
<div dir="ltr">Hi:
<div> </div>
<div>Please copy ncl-talk on these e-mails.</div>
<div> </div>
<div>I am not sure that you are using the sprinti command correctly.  I think you need a comma before the gfs name.  However, it would be best if you provided context for what you are trying to do.  For instance, a complete sample script that tries to read the filename.  Also, you could include a file for reference.</div>
<div> </div>
<div><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/sprinti.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/sprinti.shtml</a></div>
<div> </div>
<div>Barry</div>
<div> </div>
</div>
</div>
<br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Tue, Feb 19, 2019 at 5:39 PM tschonholz <<a href="mailto:tschonholz@smn.gov.ar" target="_blank">tschonholz@smn.gov.ar</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p>On 2019-02-19 15:35, Barry Lynn wrote:</p>
<blockquote style="padding:0px 0.4em;border-left:2px solid rgb(16,16,255);margin:0px">
<div dir="ltr">So, you want to read a string of files on your computer? In this case, it doesn't matter the actual time step, just that you want to read named files.
<div> </div>
<div>Barry</div>
</div>
<br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Tue, Feb 19, 2019 at 5:29 PM tschonholz <<a href="mailto:tschonholz@smn.gov.ar" target="_blank">tschonholz@smn.gov.ar</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p>On 2019-02-19 15:14, Barry Lynn wrote:</p>
<blockquote style="padding:0px 0.4em;border-left:2px solid rgb(16,16,255);margin:0px">
<div dir="ltr">Do you mean that you want to download hourly data, or just read it?
<div> </div>
<div>Barry</div>
</div>
<br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Tue, Feb 19, 2019 at 7:15 AM Barry Lynn <<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hello:
<div> </div>
<div>Could you please explain in greater detail what you would like to do. </div>
<div> </div>
<div>What do you mean by changing the forecast time iteration?</div>
<div> </div>
<div>Barry</div>
</div>
<br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Mon, Feb 18, 2019 at 10:15 PM tschonholz <<a href="mailto:tschonholz@smn.gov.ar" target="_blank">tschonholz@smn.gov.ar</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p>Hi Everybody, i have been looking for help but couldn´t find. </p>
<p>My gfs grib2 have forecast every 6 hs, so the name of the files are (for example): gep19.t00z.pgrb2f384.grb2 in which 384 is the time of forecast which comes by 6 hs. </p>
<p>I have this part of my lib_ensambleGFS.ncl: </p>
<p> </p>
<p>function get_filelist_forecast(BASEDIR[1]:string, \<br> nens:numeric, \<br> y:numeric, \<br> m:numeric, \<br> d:numeric, \<br> h:numeric, \<br> hf:numeric)<br>local files,path_in,fname_in,dd,fdate, \<br> y_start,m_start,d_start,h_start, \<br> y_end,m_end,d_end,h_end<br>begin<br> hf@units = sprinti("hours since %0.4i-", y) + \<br> sprinti("%0.2i-", m) + \<br> sprinti("%0.2i ", d) + \<br> sprinti("%0.2i:00:00", h)<br> dd = ispan(1,nens,1)<br> if(hf.lt.0) then<br> ;---Guess Case<br> hf = -1<br> fdate = ut_calendar(hf, 0)<br> y_start = tointeger(fdate(:,0))<br> m_start = tointeger(fdate(:,1))<br> d_start = tointeger(fdate(:,2))<br> h_start = tointeger(fdate(:,3))<br> y_end = y<br> m_end = m<br> d_end = d<br> h_end = h<br> else<br> ;---Forecast Case<br> y_start = y<br> m_start = m<br> d_start = d<br> h_start = h<br> fdate = ut_calendar(hf, 0)<br> y_end = tointeger(fdate(:,0))<br> m_end = tointeger(fdate(:,1))<br> d_end = tointeger(fdate(:,2))<br> h_end = tointeger(fdate(:,3))<br> end if<br> path_in = sprinti("%0.4i", y_start) + \<br> sprinti("%0.2i", m_start) + \<br> sprinti("%0.2i", d_start) + \<br> sprinti("%0.2i/", h_start)<br> fname_in = "gep" + \<br> sprinti("%0.2i.t00z.pgrb2f", dd) + \<br> sprinti("%0.2i.grb2",h_end )<br> files = BASEDIR + "/gfs/" + \<br> path_in + \<br> fname_in<br> return files<br>end</p>
<p> </p>
<p>-------------</p>
<p>Can anyone please help me to change the way it reads? I have f06,12,18..and so on. </p>
<p>Thanks a lot! I am new to the program and want to improve.</p>
<p> </p>
<p>Tamara.-<br> </p>
<p> </p>
<div> </div>
</div>
_______________________________________________<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" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote>
</div>
<br clear="all">
<div> </div>
-- <br>
<div class="gmail-m_10994533335002510gmail-m_-5762017397164504388gmail-m_-1704859497712806860gmail-m_-4189570069883805748gmail_signature" dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">Barry H. Lynn, Ph.D
<div>
<div>Senior Associate Scientist, Lecturer,</div>
<div>
<div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span></div>
<span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div>
</div>
<div><span style="color:rgb(136,136,136)"> </span></div>
<div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br><br></div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div> </div>
-- <br>
<div class="gmail-m_10994533335002510gmail-m_-5762017397164504388gmail-m_-1704859497712806860gmail_signature" dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">Barry H. Lynn, Ph.D
<div>
<div>Senior Associate Scientist, Lecturer,</div>
<div>
<div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span></div>
<span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div>
</div>
<div><span style="color:rgb(136,136,136)"> </span></div>
<div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br><br></div>
</div>
</div>
</div>
</div>
</blockquote>
<p>just read, i have it on my server </p>
<div>-- <br>
<p><img alt="" width="453" height="215"></p>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div> </div>
-- <br>
<div class="gmail-m_10994533335002510gmail-m_-5762017397164504388gmail_signature" dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">Barry H. Lynn, Ph.D
<div>
<div>Senior Associate Scientist, Lecturer,</div>
<div>
<div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span></div>
<span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div>
</div>
<div><span style="color:rgb(136,136,136)"> </span></div>
<div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br><br></div>
</div>
</div>
</div>
</div>
</blockquote>
<p>the problem is that my script reads the name of the file, which contains the forecast time, which I read in my script </p>
<p><span>sprinti("%0.2i.t00z.pgrb2f", dd) + \</span></p>
<p> </p>
<p><span>it is dd</span></p>
<div>-- <br>
<p><img src="cid:15505988985c6c42f2411a9804851460@smn.gov.ar" alt="" width="453" height="215"></p>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div> </div>
-- <br>
<div class="gmail-m_10994533335002510gmail_signature" dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">Barry H. Lynn, Ph.D
<div>
<div>Senior Associate Scientist, Lecturer,</div>
<div>
<div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span></div>
<span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div>
</div>
<div><span style="color:rgb(136,136,136)"> </span></div>
<div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br><br></div>
</div>
</div>
</div>
</div>
</blockquote>
<p> This is my file. I need the file to read my GFS ensemble forecast (every 6 hours) to be read and the program is set so that it reads every hour, so it won´t do anything at all (it keeps telling me there are missing files).</p>
<p>Can you please help?</p>
<div>-- <br>
<p><img src="cid:16907574d42febd79391" alt="" width="453" height="215"></p>
</div>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Associate Scientist, Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br><br></div></div></div></div></div>