<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body 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>
</body></html>