<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Emily,<br>
<br>
The short answer is <br>
<br>
<br>
t = 1<br>
while ( t <= 62 )<br>
<br>
sdfopen filename(t)<br>
set dfile t<br>
* do whatever with file t data *<br>
<br>
t = t + 1<br>
endwhile<br>
<br>
<br>
Download this document: <br>
<a class="moz-txt-link-freetext" href="http://www.iges.org/grads/gadoc/reference_card_scl.pdf">http://www.iges.org/grads/gadoc/reference_card_scl.pdf</a><br>
it has lots of good info, including the code above. You should<br>
also become familiar with the grads webpage.<br>
<br>
As a note, I think there is a limit to how many files you can<br>
have open at once, and 62 is quite possibly to many.<br>
If you don't need multiple files open at once, close them<br>
once you finish with them---add close t to the <br>
loop above. That should give you a good head start.<br>
<br>
Matt<br>
<br>
<br>
<br>
On 07/12/2013 08:18 AM, Emily Wilson wrote:<br>
</div>
<blockquote
cite="mid:CAGCDMAmv1jCR7Re3_B=T=c_uEGQRPTEp5BT+Qd+Uuhb8R2SwYg@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr">
<div>
<div>Hello,<br>
</div>
I am trying to write a simple loop but I cannot figure out the
GrADS code. I have 62 netCDF files that I want to be read.
Therefore I want to code a loop so that for i in 1948-2010
sdfopen air.sig995.*.nc. The * is where the year goes in the
file name. How should I script this loop?<br>
</div>
Thanks in advance,<br clear="all">
<div>
<div>
<div>
<div>
<div dir="ltr"><span style="color:rgb(106,168,79)"><b>Emily
P. Wilson, Intern</b></span><br>
<span style="color:rgb(61,133,198)">Research and
Conservation Department<br>
Denver Botanic Gardens<br>
1007 York St.<br>
Denver, CO 80206<br>
720-865-3593</span></div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gradsusr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>
<a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
</blockquote>
<br>
</body>
</html>