<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Valeria,<br>
<br>
Can you show how time is defined in these four descriptor files
(TDEF)? I think the issue might be that time is being defined in
the first file, and t=1 in the first file is not the same date as
t=1 in the second. If you add "set dfile 1", "set dfile 2", etc.
before each while loop, it shoudl work (dfile 1 before the first
loop, dfile 2 before the second, and so on).<br>
<br>
Another way to do this is to use the template option. In this way
you have a single data descriptor file that accesses each of the
monthly files. Details are at
<a class="moz-txt-link-freetext" href="http://www.iges.org/grads/gadoc/gadocindex.html">http://www.iges.org/grads/gadoc/gadocindex.html</a> under "templates".<br>
<br>
Jim<br>
<br>
<div class="moz-cite-prefix">On 1/23/15 7:41 PM, Valeria Benson-Lira
wrote:<br>
</div>
<blockquote
cite="mid:CAN6ZvvJLiVG295ktKzFHUawW+SnOcYgrfTA3oAGJ15HLmQncNQ@mail.gmail.com"
type="cite">
<div dir="ltr">Dear Grads users,
<div><br>
</div>
<div>Can someone please help me with my script? I am trying to
write a binary file that contains all the values recorded in
four different control files. My new binary file will have the
hourly precipitation records from April through July. So far,
the script works for the first month but not for the following
months.</div>
<div><br>
</div>
<div>
<div style="font-size:13px">This is the script:</div>
<div style="font-size:13px">
<p
style="margin:0px;font-size:11px;font-family:Menlo;min-height:13px"><br>
</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)">'reinit'</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)">'open
ENCB1_precip_apr2008.ctl'</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)">'open
ENCB1_precip_may2008.ct'</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)">'open
ENCB1_precip_jun2008.ctl'</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)">'open
ENCB1_precip_july2008.ctl'</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;min-height:13px"><br>
</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)">'set
gxout fwrite'</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)">'set
fwrite ENCB1_AMJJ_precip.dat '</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;min-height:13px"><br>
</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)">*****Write
April data First. </p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)">*****Recall
that April has 720 hours (30 days)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)"><b>index</b><span
style="color:rgb(255,221,221)">_t</span><span
style="color:rgb(0,0,0)"> = </span><span
style="color:rgb(255,64,255)">1</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(236,236,21)">while<span
style="color:rgb(0,0,0)">(</span><span
style="color:rgb(40,239,239)"><b>index</b></span><span
style="color:rgb(255,221,221)">_t</span><span
style="color:rgb(0,0,0)"><=</span><span
style="color:rgb(255,64,255)">720</span><span
style="color:rgb(0,0,0)">)</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)"><span
style="color:rgb(0,0,0)"> </span>'set t '<span
style="color:rgb(40,239,239)"><b>index</b></span><span
style="color:rgb(255,221,221)">_t</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)"><span
style="color:rgb(0,0,0)"> </span><span
style="color:rgb(236,236,21)">say</span><span
style="color:rgb(0,0,0)"> </span><b>index</b><span
style="color:rgb(255,221,221)">_t</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)"><span
style="color:rgb(0,0,0)"> </span>'d precip.1 '</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)"><span
style="color:rgb(0,0,0)"> </span><b>index</b><span
style="color:rgb(255,221,221)">_t</span><span
style="color:rgb(0,0,0)"> = </span><b>index</b><span
style="color:rgb(255,221,221)">_t</span><span
style="color:rgb(0,0,0)"> + </span><span
style="color:rgb(255,64,255)">1</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(236,236,21)">endwhile</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;min-height:13px"><br>
</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)">*****Write
May data Next. </p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)">*****Recall
that May has 744 hours (31 days)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)"><b>index</b><span
style="color:rgb(255,221,221)">_t</span><span
style="color:rgb(0,0,0)"> = </span><span
style="color:rgb(255,64,255)">1</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(236,236,21)">while<span
style="color:rgb(0,0,0)">(</span><span
style="color:rgb(40,239,239)"><b>index</b></span><span
style="color:rgb(255,221,221)">_t</span><span
style="color:rgb(0,0,0)"><=</span><span
style="color:rgb(255,64,255)">744</span><span
style="color:rgb(0,0,0)">)</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)"><span
style="color:rgb(0,0,0)"> </span>'set t '<span
style="color:rgb(40,239,239)"><b>index</b></span><span
style="color:rgb(255,221,221)">_t</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)"><span
style="color:rgb(0,0,0)"> </span><span
style="color:rgb(236,236,21)">say</span><span
style="color:rgb(0,0,0)"> </span><b>index</b><span
style="color:rgb(255,221,221)">_t</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)"><span
style="color:rgb(0,0,0)"> </span>'d precip.2 '</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)"><span
style="color:rgb(0,0,0)"> </span><b>index</b><span
style="color:rgb(255,221,221)">_t</span><span
style="color:rgb(0,0,0)"> = </span><b>index</b><span
style="color:rgb(255,221,221)">_t</span><span
style="color:rgb(0,0,0)"> + </span><span
style="color:rgb(255,64,255)">1</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(236,236,21)">endwhile</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;min-height:13px"><br>
</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)">*****Write
June data Next. </p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)">*****Recall
that June has 720 hours (30 days)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)"><b>index</b><span
style="color:rgb(255,221,221)">_t</span><span
style="color:rgb(0,0,0)"> = </span><span
style="color:rgb(255,64,255)">1</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(236,236,21)">while<span
style="color:rgb(0,0,0)">(</span><span
style="color:rgb(40,239,239)"><b>index</b></span><span
style="color:rgb(255,221,221)">_t</span><span
style="color:rgb(0,0,0)"><=</span><span
style="color:rgb(255,64,255)">720</span><span
style="color:rgb(0,0,0)">)</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)"><span
style="color:rgb(0,0,0)"> </span>'set t '<span
style="color:rgb(40,239,239)"><b>index</b></span><span
style="color:rgb(255,221,221)">_t</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)"><span
style="color:rgb(0,0,0)"> </span><span
style="color:rgb(236,236,21)">say</span><span
style="color:rgb(0,0,0)"> </span><b>index</b><span
style="color:rgb(255,221,221)">_t</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)"><span
style="color:rgb(0,0,0)"> </span>'d precip.3 '</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)"><span
style="color:rgb(0,0,0)"> </span><b>index</b><span
style="color:rgb(255,221,221)">_t</span><span
style="color:rgb(0,0,0)"> = </span><b>index</b><span
style="color:rgb(255,221,221)">_t</span><span
style="color:rgb(0,0,0)"> + </span><span
style="color:rgb(255,64,255)">1</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(236,236,21)">endwhile</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;min-height:13px"><br>
</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)">*****Write
July data Next. </p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)">*****Recall
that July has 744 hours (31 days)</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)"><b>index</b><span
style="color:rgb(255,221,221)">_t</span><span
style="color:rgb(0,0,0)"> = </span><span
style="color:rgb(255,64,255)">1</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(236,236,21)">while<span
style="color:rgb(0,0,0)">(</span><span
style="color:rgb(40,239,239)"><b>index</b></span><span
style="color:rgb(255,221,221)">_t</span><span
style="color:rgb(0,0,0)"><=</span><span
style="color:rgb(255,64,255)">744</span><span
style="color:rgb(0,0,0)">)</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)"><span
style="color:rgb(0,0,0)"> </span>'set t '<span
style="color:rgb(40,239,239)"><b>index</b></span><span
style="color:rgb(255,221,221)">_t</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)"><span
style="color:rgb(0,0,0)"> </span><span
style="color:rgb(236,236,21)">say</span><span
style="color:rgb(0,0,0)"> </span><b>index</b><span
style="color:rgb(255,221,221)">_t</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)"><span
style="color:rgb(0,0,0)"> </span>'d precip.4 '</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)"><span
style="color:rgb(0,0,0)"> </span><b>index</b><span
style="color:rgb(255,221,221)">_t</span><span
style="color:rgb(0,0,0)"> = </span><b>index</b><span
style="color:rgb(255,221,221)">_t</span><span
style="color:rgb(0,0,0)"> + </span><span
style="color:rgb(255,64,255)">1</span></p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(236,236,21)">endwhile</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;min-height:13px"><br>
</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)">*************************</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)">'disable
fwrite'</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)">*************************</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)">*****Always
reinitialize when finished, </p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)">*****to
avoid mistakingly writing extraneous data</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,64,255)">'reinit'</p>
<p
style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(40,239,239)"><span
style="color:rgb(255,64,255)"><br>
</span></p>
<p style="margin:0px;font-size:11px;font-family:Menlo"><font
color="#000000">Do you have a suggestion of how I can
fix it?</font></p>
<p style="margin:0px;font-size:11px;font-family:Menlo"><font
color="#000000">Thanks,</font></p>
</div>
</div>
<div><br clear="all">
<div>
<div class="gmail_signature">
<div dir="ltr"><font color="#444444" face="verdana,
sans-serif"><b>Valeria Benson-Lira</b></font>
<div><font color="#444444" face="verdana, sans-serif"><b>Graduate
Teaching Assistant, Geography M.A.</b></font></div>
<div><font color="#444444" face="verdana, sans-serif"><b>e-mail:
<a moz-do-not-send="true"
href="mailto:vbensonl@asu.edu" target="_blank">vbensonl@asu.edu</a></b></font></div>
<div>
<div>
<div
style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium;text-align:-webkit-auto"><img
moz-do-not-send="true"
src="http://www.asu.edu/asuthemes/4.0/images/logos/sgsup_logo2.png"><br>
</div>
<div
style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium;text-align:-webkit-auto"><br>
</div>
</div>
</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>