Grads time format

Charles Seman Charles.Seman at NOAA.GOV
Mon Dec 3 17:15:47 EST 2007


Claudio,

Could you add code in your script to do something like:

if( mes = JAN )
  mes = '01'
endif
...
if( mes = DEC )
  mes = '12'
endif

I hope this helps,
Chuck


claudio cortes wrote:
> In GraDS is there any function to control de date format output?
>
> I have a script who extract values of a grib files and it's store in a
> text file, but que month is not numerical.
>
> 'q time'
> dat=subwrd(result,3)
> hor=substr(dat,1,2)
> dia=substr(dat,4,2)
> mes=substr(dat,6,3)
> ano=substr(dat,9,4)
>
> ..and my output is:
>
> 2007DEC0312 value value value ..etc...
>
> ..and I need the month in number (or the another option is postprocess
> the file using perl or python).
>
>
> Thanks...!
>
> --
> Claudio Cortes
> www.claudiomet.cl.nu
>
> Meteorologo
> Laboratorio de Meteorologia y Calidad de Aire
> Centro Nacional del Medio Ambiente (CENMA)
> --------------------------------------------------------------------------------------
>
> Claudio Cortes
> www.claudiomet.cl.nu
>
> Meteorologist
> Meteorology and Air Quality Labs
> National Enviroment Center, Chile (CENMA)
>

--

Please note that Charles.Seman at noaa.gov should be considered my NOAA
email address, not cjs at gfdl.noaa.gov.

********************************************************************
 Charles Seman                                Charles.Seman at noaa.gov
 U.S. Department of Commerce / NOAA / OAR
 Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
 201 Forrestal Road                              fax: (609) 987-5063
 Princeton, NJ  08540-6649            http://www.gfdl.noaa.gov/~cjs/
********************************************************************

"The contents of this message are mine personally and do not reflect
any position of the Government or NOAA."



More information about the gradsusr mailing list