[ncl-talk] Changing forecast time iteration for GFS

Barry Lynn barry.h.lynn at gmail.com
Tue Feb 19 08:35:23 MST 2019


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.

Barry

On Tue, Feb 19, 2019 at 5:29 PM tschonholz <tschonholz at smn.gov.ar> wrote:

> On 2019-02-19 15:14, Barry Lynn wrote:
>
> Do you mean that you want to download hourly data, or just read it?
>
> Barry
>
> On Tue, Feb 19, 2019 at 7:15 AM Barry Lynn <barry.h.lynn at gmail.com> wrote:
>
>> Hello:
>>
>> Could you please explain in greater detail what you would like to do.
>>
>> What do you mean by changing the forecast time iteration?
>>
>> Barry
>>
>> On Mon, Feb 18, 2019 at 10:15 PM tschonholz <tschonholz at smn.gov.ar>
>> wrote:
>>
>>> Hi Everybody, i have been looking for help but couldn´t find.
>>>
>>> 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.
>>>
>>> I have this part of my lib_ensambleGFS.ncl:
>>>
>>>
>>>
>>> function get_filelist_forecast(BASEDIR[1]:string, \
>>> nens:numeric, \
>>> y:numeric, \
>>> m:numeric, \
>>> d:numeric, \
>>> h:numeric, \
>>> hf:numeric)
>>> local files,path_in,fname_in,dd,fdate, \
>>> y_start,m_start,d_start,h_start, \
>>> y_end,m_end,d_end,h_end
>>> begin
>>> hf at units = sprinti("hours since %0.4i-", y) + \
>>> sprinti("%0.2i-", m) + \
>>> sprinti("%0.2i ", d) + \
>>> sprinti("%0.2i:00:00", h)
>>> dd = ispan(1,nens,1)
>>> if(hf.lt.0) then
>>> ;---Guess Case
>>> hf = -1
>>> fdate = ut_calendar(hf, 0)
>>> y_start = tointeger(fdate(:,0))
>>> m_start = tointeger(fdate(:,1))
>>> d_start = tointeger(fdate(:,2))
>>> h_start = tointeger(fdate(:,3))
>>> y_end = y
>>> m_end = m
>>> d_end = d
>>> h_end = h
>>> else
>>> ;---Forecast Case
>>> y_start = y
>>> m_start = m
>>> d_start = d
>>> h_start = h
>>> fdate = ut_calendar(hf, 0)
>>> y_end = tointeger(fdate(:,0))
>>> m_end = tointeger(fdate(:,1))
>>> d_end = tointeger(fdate(:,2))
>>> h_end = tointeger(fdate(:,3))
>>> end if
>>> path_in = sprinti("%0.4i", y_start) + \
>>> sprinti("%0.2i", m_start) + \
>>> sprinti("%0.2i", d_start) + \
>>> sprinti("%0.2i/", h_start)
>>> fname_in = "gep" + \
>>> sprinti("%0.2i.t00z.pgrb2f", dd) + \
>>> sprinti("%0.2i.grb2",h_end )
>>> files = BASEDIR + "/gfs/" + \
>>> path_in + \
>>> fname_in
>>> return files
>>> end
>>>
>>>
>>>
>>> -------------
>>>
>>> Can anyone please help me to change the way it reads? I have
>>> f06,12,18..and so on.
>>>
>>> Thanks a lot! I am new to the program and want to improve.
>>>
>>>
>>>
>>> Tamara.-
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>>
>> --
>> Barry H. Lynn, Ph.D
>> Senior Associate Scientist, Lecturer,
>> The Institute of the Earth Science,
>> The Hebrew University of Jerusalem,
>> Givat Ram, Jerusalem 91904, Israel
>> Tel: 972 547 231 170
>> Fax: (972)-25662581
>>
>> C.E.O, Weather It Is, LTD
>> Weather and Climate Focus
>> http://weather-it-is.com
>> Jerusalem, Israel
>> Local: 02 930 9525
>> Cell: 054 7 231 170
>> Int-IS: x972 2 930 9525
>>
>>
>
> --
> Barry H. Lynn, Ph.D
> Senior Associate Scientist, Lecturer,
> The Institute of the Earth Science,
> The Hebrew University of Jerusalem,
> Givat Ram, Jerusalem 91904, Israel
> Tel: 972 547 231 170
> Fax: (972)-25662581
>
> C.E.O, Weather It Is, LTD
> Weather and Climate Focus
> http://weather-it-is.com
> Jerusalem, Israel
> Local: 02 930 9525
> Cell: 054 7 231 170
> Int-IS: x972 2 930 9525
>
> just read, i have it on my server
> --
>
>

-- 
Barry H. Lynn, Ph.D
Senior Associate Scientist, Lecturer,
The Institute of the Earth Science,
The Hebrew University of Jerusalem,
Givat Ram, Jerusalem 91904, Israel
Tel: 972 547 231 170
Fax: (972)-25662581

C.E.O, Weather It Is, LTD
Weather and Climate Focus
http://weather-it-is.com
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190219/6670af4c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 35ae030d.jpeg
Type: image/jpeg
Size: 13273 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190219/6670af4c/attachment.jpeg>


More information about the ncl-talk mailing list