Re: Date and time from file name

From: Paulo Henrique <paulohsm_at_nyahnyahspammersnyahnyah>
Date: Mon, 3 Mar 2008 20:36:34 -0300

Hi Adams,

It's exactly what I was looking for. Thank you very much for the attention!

Cheers,

Paulo Henrique.

2008/3/3, Adam Phillips <asphilli_at_cgd.ucar.edu>:
>
> Welcome to NCL! You can use the systemfunc function to retrieve names of
> files so you don't manually have to type them in:
> http://www.ncl.ucar.edu/Document/Functions/Built-in/systemfunc.shtml
> Specifically, take a look at Example #4.
>
> If you then wish to store part of the filename for use in a title, you
> can use the stringtochar function:
> http://www.ncl.ucar.edu/Document/Functions/Built-in/stringtochar.shtml
>
> Continuing with Example #4:
> print(fils) ; full path to files
> temp = stringtochar(fils(0))
> file1yr = temp(34:37) ; file1yr will contain "1974"
>
> Good luck!
> Adam
>
>
> Paulo Henrique wrote:
> > Hi
> >
> > I'm absolutely new to NCL. I have GRIB1 data files named with date and
> > time. I would like to know how can get these dates and times to use it
> > within my script.
> >
> > Thanks in advance.
> >
> > --
> > Ms. Paulo Henrique Santiago de Maria
> > Grupo de Modelagem Atmosférica
> > Departamento de Meteorologia e Oceanografia
> > Fundação Cearense de Meteorologia e Recursos Hídricos
> > Av. Rui Barbosa 1246 - CEP 60115-221
> > Fortaleza, Ceará
> > Fone: (85) 3101-1106 / 3101-1126
> >
> >
>
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > ncl-talk mailing list
> > ncl-talk_at_ucar.edu
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> --
> --------------------------------------------------------------
> Adam Phillips asphilli_at_ucar.edu
> National Center for Atmospheric Research tel: (303) 497-1726
> ESSL/CGD/CAS fax: (303) 497-1333
> P.O. Box 3000
> Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli
>

-- 
Ms. Paulo Henrique Santiago de Maria
Grupo de Modelagem Atmosférica
Departamento de Meteorologia e Oceanografia
Fundação Cearense de Meteorologia e Recursos Hídricos
Av. Rui Barbosa 1246 - CEP 60115-221
Fortaleza, Ceará
Fone: (85) 3101-1106 / 3101-1126

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 03 2008 - 16:36:34 MST

This archive was generated by hypermail 2.2.0 : Wed Mar 05 2008 - 00:45:46 MST