[ncl-talk] Changing forecast time iteration for GFS
tschonholz
tschonholz at smn.gov.ar
Tue Feb 19 10:54:58 MST 2019
On 2019-02-19 17:15, Barry Lynn wrote:
> Hi:
>
> Please copy ncl-talk on these e-mails.
>
> 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.
>
> https://www.ncl.ucar.edu/Document/Functions/Built-in/sprinti.shtml [1]
>
> Barry
>
> On Tue, Feb 19, 2019 at 5:39 PM tschonholz <tschonholz at smn.gov.ar> wrote:
>
> On 2019-02-19 15:35, Barry Lynn wrote:
> 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 [2]
>
> --
>
> 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 [3]
> 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 [3]
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 [3]
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
the problem is that my script reads the name of the file, which contains
the forecast time, which I read in my script
sprinti("%0.2i.t00z.pgrb2f", dd) + \
it is dd
--
--
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 [3]
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
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).
Can you please help?
--
Links:
------
[1] https://www.ncl.ucar.edu/Document/Functions/Built-in/sprinti.shtml
[2] http://mailman.ucar.edu/mailman/listinfo/ncl-talk
[3] http://weather-it-is.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190219/99f3a184/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/99f3a184/attachment.jpeg>
-------------- 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/99f3a184/attachment-0001.jpeg>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lib_ensambleGFS.ncl
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190219/99f3a184/attachment.ksh>
More information about the ncl-talk
mailing list