[gradsusr] Getting date and run from filename
Brian Gaze
brian.gaze at ntlworld.com
Wed Sep 25 15:06:09 EDT 2013
Hi,
Using GrADS script is there a way (perhaps using substr) of returning part
of the open filename to a variable?
For example, I have opened the .ctl file which relates to this file:
pgbf.01.2013092406.201309.avrg.grib.06Z.grb2
I would like to extract the '201309' and '06Z' parts of the string to
variables.
I'm familiar with using something like:
q time
res=subwrd(result,3)
....etc
but can't see how to do something similar querying the filename of the grb2
file rather than time.
Thanks
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130925/4e956b65/attachment.html
More information about the gradsusr
mailing list