Aloha, <br><br>I used fwrite to write out a 2d variable that varies in time, so it has dimensions of x,y,t.<br clear="all"><br>nt=763<br>&#39;set fwrite -le -sq -cl CHI.2000.summer.dat&#39;<br>&#39;set gxout fwrite&#39;<br>

day = 360<br>while (day &lt;= nt)<br> &#39;set t &#39; day<br> &#39;d chi&#39;<br>  day=day+1<br>endwhile<br>&#39;disable fwrite&#39;<br><br>This seems to work fine.  When I go to try to open it using FORTRAN, I get an error.<br>

<br>       real chi (nx,ny,nt)<br>       open (29, file=&quot;CHI.2000.summer.dat&quot;, status=&quot;OLD&quot;, <br>     &amp;      access=&quot;sequential&quot;,form=&quot;unformatted&quot;)<br>        read(29)chi<br><br>
If I have my chi variable as (nx,ny) there is no problem.  If I just set nt=2, then there is a problem when I run the program:<br>PGFIO-F-219/unformatted read/unit=29/attempt to read/write past end of record.<br> File name = CHI.2000.summer.dat    unformatted, sequential access   record = 1<br>
 In source file avg_chi.f, at line number 25<br><br><br>I was feeling saucey and tried to change the code up adding <br>      real chi_temp(nx,ny)<br>and I tried this:<br>      do 50 it=1,nt<br>        write (6,*)it<br>        read (29)chi_temp<br>
           do 51 ix=1,nx<br>           do 52 iy=1,ny<br>              chi(ix,iy,it)=chi_temp(ix,iy)<br>52        continue<br>51        continue<br>50    continue<br><br>And this is what happened:<br>            1<br>            2<br>
            3<br>            4<br>PGFIO-F-217/unformatted read/unit=29/attempt to read past end of file.<br> File name = CHI.2000.summer.dat    unformatted, sequential access   record = 4<br> In source file avg_chi.f, at line number 29<br>
<br>I should have about 300 time steps.  Is there a limit or something?  Any help you could provide would be very much appreciated!<br><br>-- <br>Tom Robinson<br>At-Large Graduate Student Organization Representative<br>Student Caucus Representative for the Graduate Student Organization<br>
Graduate Student - Department of Meteorology<br>
<a href="tel:732-718-2323" value="+17327182323" target="_blank">732-718-2323</a><br><br>