<div dir="ltr">Hi,<div><br></div><div>Using GrADS script is there a way (perhaps using substr) of returning part of the open filename to a variable? </div><div><br></div><div>For example, I have opened the .ctl file which relates to this file:</div>
<div><br><div>pgbf.01.2013092406.201309.avrg.grib.06Z.grb2<br></div></div><div><br></div><div>I would like to extract the '201309' and '06Z' parts of the string to variables. </div><div><br></div><div>I'm familiar with using something like:</div>
<div><br></div><div>q time</div><div>res=subwrd(result,3)<br></div><div>....etc</div><div><br></div><div>but can't see how to do something similar querying the filename of the grb2 file rather than time.</div><div><br>
</div><div>Thanks</div><div><br></div><div>Brian </div></div>