<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 &#39;201309&#39; and &#39;06Z&#39; parts of the string to variables. </div><div><br></div><div>I&#39;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&#39;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>