I really appreciate all of our help.  I&#39;m just going to post all of my code now.<br><br>Here is my FORTRAN code as it stands now.  <br>      PROGRAM avg_chi<br>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br>
!! This FORTRAN 77 program is used to calculate the daily mean values for the!!<br>!! entire data set.  This mean value can then be used to calculate the       !!<br>!! anomalies to be plotted.  First, the data are opened in their individual  !!<br>
!! files.  The full data set was divided into 30 files, so the parameter     !!<br>!! files=32 represents those files.  The numbers are converted to string by  !!<br>!! writing their values to the string.                                       !!<br>
<br>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br>!!!!!!!!!!!! Tom Robinson University of Hawaii 2012 <a href="mailto:ter@hawaii.edu">ter@hawaii.edu</a> !!!!!!!!!!!!<br>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br>
      PARAMETER (nx=144) !grid points in x<br>      PARAMETER (ny=73)  !grid points in y<br>      PARAMETER (tsy=1460) !Time Steps in a Year<br>      PARAMETER (nt=709) !Number of time steps in each file<br>      PARAMETER (nrec=709) !Number of records in each file<br>
      PARAMETER (files=68) !Number of input files<br>        Parameter (rearth=6378100) !radius of the earth in meters
<br>        parameter (rpi=3.1415926) !pi<br>    parameter(omega=7.292E-5) !Rotational speed of the earth<br>      PARAMETER (south=-90) !Southern most latitude<br>      PARAMETER (dy=111131)!change in y between a degree of lattitude at 45 deg<br>
      real chi (nx,ny,nt*files)         ! Velocity potential<br>      real chi_out(nx,ny)<br>      real a_chi(nx,ny,tsy) !Average Velocity Potential<br>      real clatrad (ny) !latitude in radians<br>      real dx(iy)       ! change in east-west direction (distance)<br>
    Integer x             !Place holder for the file number<br>    Character(2)  xstring !Input file number &gt; 9<br>    Character(1)  xstrLT1 !Input file number &lt; 10<br>        character(20) filename!Full input file name<br>
<br><br>          it=1 !Initialize it<br><br>         do 51 x=1,files!files !Loop through all of the file numbers<br><br>             if (x.lt.10)then  !Check to see if the number is below 10.  If it<br>                               ! is you have to use a single bit string<br>
               Write( xstrLT1, &#39;(i1)&#39; )  x !COnvert the integer to a string<br>               write (6,*)&quot;CHI_200hPa_&quot;,xstrLT1,&#39;.dat&#39; <br>               filename=&quot;CHI_200hPa_&quot;//xstrLT1//&quot;.dat&quot; !Concatenate strings to <br>
                                                       ! get the file name<br>               write (6,*)filename<br>               !To open the file from a GrADS fwrite, you have to use direct <br>               ! access and specify the record length which is four times the<br>
               ! dimensions <br>               open (29, file=filename, <br>     &amp;         status=&quot;OLD&quot;, access=&quot;direct&quot;,form=&quot;unformatted&quot;,<br>     &amp;         recl=4*nx*ny)<br>               do 52 irec=1,nrec !Go through each record of the input file   <br>
                  read(29,rec=irec)((chi(ix,iy,it),<br>     &amp;            ix=1,nx),iy=1,ny)! Read in the data<br>                  it=it+1 !Update it<br>           if (mod(it,100).eq.0)then<br>             write(6,*)it<br>
           endif<br>52             continue<br>               close (unit=29)<br>             elseif (x.ge.10 .AND. x.lt.100)then !If the number of the file is <br>                                                 !GT 10, no 0 needs to be added<br>
               Write( xstring, &#39;(i2)&#39; )  x<br>               write (6,*)&quot;CHI_200hPa_&quot;,xstring,&#39;.dat&#39;<br>               filename=&quot;CHI_200hPa_&quot;//xstring//&quot;.dat&quot; !Concatenate strings to <br>
                                                       ! get the file name<br>               open (29, file=filename, <br>     &amp;         status=&quot;OLD&quot;, access=&quot;direct&quot;,form=&quot;unformatted&quot;,<br>
     &amp;         recl=4*nx*ny)<br>               do 53 irec=1,nrec<br>                  itime=it*x<br>                  read(29,rec=irec)((chi(ix,iy,it),<br>     &amp;            ix=1,nx),iy=1,ny)<br>                  it=it+1<br>
53             continue<br>               close (unit=29)<br>             endif<br>51       continue<br>!! Write out some numbers to see if they make sense<br>      write (6,500)(chi(73,35,it)/1e6,it=5430,5436)<br>500    FORMAT(f7.3,1x,f7.3,1x,f7.3,1x,f7.3,1x,f7.3,1x,f7.3,1x,f7.3,1x,)<br>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br>!! <br>!! Open the output data file<br>      open (unit=291,file=&quot;chi_33yr.dat&quot;, access=&quot;direct&quot;,<br>     &amp;      status=&quot;unknown&quot;,recl=4*nx*ny)<br>
!! Use chi_out to write each time step out as a record.<br>            DO 70 itt=1,files*nt<br>               do ix=1,nx<br>               do iy=1,ny<br>                 chi_out(ix,iy)=chi(ix,iy,itt) <br>               enddo<br>
               enddo<br>              write (291, rec=itt) chi_out !Write each time step as a record<br>70          CONTINUE<br><br>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br>!! Get the average values using the daily_ave subroutine<br>
             do it=1,tsy !Loop through all 1464 6 hour times in the year (leap year)<br>               CALL daily_ave(chi,a_chi,it,nx,ny,nt,tsy)<br>        if (mod(it,100).eq.0)then<br>            write(6,*)it,a_chi(55,55,it)/1e6<br>
        endif<br>             enddo<br>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br>!! Write the data out to a file<br>      open (unit=290,file=&quot;mean_chi_33yr.dat&quot;, access=&quot;direct&quot;,<br>
     &amp;      status=&quot;unknown&quot;,recl=4*nx*ny*tsy)<br>          write (290, rec=1) a_chi<br>!      open (unit=291,file=&quot;chi_33yr.dat&quot;, access=&quot;direct&quot;,<br>!     &amp;      status=&quot;unknown&quot;,recl=4*nx*ny*nt*files)<br>
!          write (291, rec=1) chi<br><br>                        stop<br>                        end<br>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<br>I left out the subroutines because I think they are working correctly and don&#39;t have anything to do with the problem I&#39;m having since they are used below where the data is written out.  <br>
<br>Here is the list of input files I have:<br>CHI_200hPa_10.dat  CHI_200hPa_26.dat  CHI_200hPa_41.dat  CHI_200hPa_57.dat<br>CHI_200hPa_11.dat  CHI_200hPa_27.dat  CHI_200hPa_42.dat  CHI_200hPa_58.dat<br>CHI_200hPa_12.dat  CHI_200hPa_28.dat  CHI_200hPa_43.dat  CHI_200hPa_59.dat<br>
CHI_200hPa_13.dat  CHI_200hPa_29.dat  CHI_200hPa_44.dat  CHI_200hPa_5.dat<br>CHI_200hPa_14.dat  CHI_200hPa_2.dat   CHI_200hPa_45.dat  CHI_200hPa_60.dat<br>CHI_200hPa_15.dat  CHI_200hPa_30.dat  CHI_200hPa_46.dat  CHI_200hPa_61.dat<br>
CHI_200hPa_16.dat  CHI_200hPa_31.dat  CHI_200hPa_47.dat  CHI_200hPa_62.dat<br>CHI_200hPa_17.dat  CHI_200hPa_32.dat  CHI_200hPa_48.dat  CHI_200hPa_63.dat<br>CHI_200hPa_18.dat  CHI_200hPa_33.dat  CHI_200hPa_49.dat  CHI_200hPa_64.dat<br>
CHI_200hPa_19.dat  CHI_200hPa_34.dat  CHI_200hPa_4.dat   CHI_200hPa_65.dat<br>CHI_200hPa_1.dat   CHI_200hPa_35.dat  CHI_200hPa_50.dat  CHI_200hPa_66.dat<br>CHI_200hPa_20.dat  CHI_200hPa_36.dat  CHI_200hPa_51.dat  CHI_200hPa_67.dat<br>
CHI_200hPa_21.dat  CHI_200hPa_37.dat  CHI_200hPa_52.dat  CHI_200hPa_68.dat<br>CHI_200hPa_22.dat  CHI_200hPa_38.dat  CHI_200hPa_53.dat  CHI_200hPa_6.dat<br>CHI_200hPa_23.dat  CHI_200hPa_39.dat  CHI_200hPa_54.dat  CHI_200hPa_7.dat<br>
CHI_200hPa_24.dat  CHI_200hPa_3.dat   CHI_200hPa_55.dat  CHI_200hPa_8.dat<br>CHI_200hPa_25.dat  CHI_200hPa_40.dat  CHI_200hPa_56.dat  CHI_200hPa_9.dat<br><br>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<br>Here is my GrADS script that I use to calculate the velocity potential and then write it out using fwrite:<br>
function full_data(args)<br>*##############################################################################<br>*# Oh boy the fun stuff.  This script opens a DODS file to get renalaysis    ##<br>*# data that goes all the way back to 1979.  It looks like it updates every  ##<br>
*# day (e&#39;ryday e&#39;ryday) so it should make thing interesting.  The begin time##<br>*# is 00Z01JAN1979 and the time step is 360mn (6 hours).  That&#39;s going to    ##<br>*# complicate things.  I suggest cutting it off at 18Z31DEC2011, that makes  ##<br>
*# the final time 48212.  This is divisible by 68, 48212/68=709.  We should  ##<br>*# be able to do that many calculations (hopefully).  We can!                ##<br>*#                                                                           ##<br>
*# I took out the top 7 layers because the 200mb level is level 10.  This    ##<br>*# will make it run a little more efficient in theory.  What I should do is  ##<br>*# have it just do level 10.  That would probably cut the time down a lot but##<br>
*# I am a masocist.                                                          ##<br><br>*# This takes FOR-EV-ER!                                                     ##<br>*##############################################################################<br>
*########### Tom Robinson University of Hawaii 2012 <a href="mailto:ter@hawaii.edu">ter@hawaii.edu</a> ############<br>*##############################################################################<br>*# Number of times divided - SHOULD BE 68 !!!<br>
divnum=subwrd(args,1)<br>*# Number of file<br>filenum=subwrd(args,2)<br>say divnum &#39; &#39; filenum<br>*# Reinitialize everything, including the gxout<br>&#39;reinit&#39;<br>&#39;set gxout contour&#39;<br>&#39;set looping off&#39;<br>
*# Open the internet file<br>&#39;sdfopen <a href="http://nomad2.ncep.noaa.gov:9090/dods/reanalyses/reanalysis-2/6hr/pgb/pgb">http://nomad2.ncep.noaa.gov:9090/dods/reanalyses/reanalysis-2/6hr/pgb/pgb</a>&#39;<br>*#*****************************************************************************<br>
*# SET UP GLOBAL VARIABLES AND MAP                                           **<br>*#*****************************************************************************<br>*# get nt from the descriptor file<br>&#39;q ctlinfo&#39;<br>
*tdef=sublin(result,9)<br>*nt=subwrd(tdef,2)<br>nt=48212<br>say nt<br>*# make sure looping is off.  Who knows why it comes on sometimes :-(<br>&#39;set looping off&#39;<br>*# Set up the dimensions of the data.  Values starting with n indicate the <br>
*#  number of data for the dimension that follows (x,y,z,t)<br>*dx=2.5<br>*dy=2.5<br>*#<br>nx=144<br>ny=73<br>nz=10<br>nt=nt<br>it=(((filenum-1)*nt)/divnum)+1<br>nt=filenum*nt/divnum<br><br>*# Set background to white                                                   <br>
       &#39;set background 1&#39;<br>*# Clear to get the white background                                         <br>&#39;clear&#39;<br>       &#39;set grads off&#39;<br>       &#39;set mpdset hires&#39;<br>       &#39;set string 0&#39;<br>
*#* Set the map to black<br>       &#39;set map 0&#39;<br>*#* Set the labels and title to black<br>       &#39;set annot 0&#39;<br>*#radius on the earth in m<br>&#39;define Re=6378100&#39;<br>*# pi<br>&#39;define pi=3.14159265&#39;<br>
*# ytom is the conversion of 1 degree to meters at 30N<br>&#39;define ytom=110852.4248&#39;<br>*# SET UP FOR ALL LEVELS AND TIMES                                           **<br>*# set to full domain to define variables<br>
&#39;set t &#39; it &#39; &#39; nt<br>say &#39;set t &#39; it &#39; &#39; nt<br><br>&#39;set lon 0 360&#39;<br>&#39;set lat -90 90&#39;<br>*######## Z is set up for 200mb ONLY!<br>&#39;set lev 200&#39;<br>*#*****************************************************************************<br>
*# CALCULATE VELOCITY POTENTIAL (chi)                                        **<br>*#*****************************************************************************<br>*#** VELOCITY POTENTIAL FOR OPENGRADS ONLY ****<br>*# Calculate the velocity potential using the opengrads function fish_chi<br>
&#39;define chi = fish_chi(UGRDprs,VGRDprs)&#39;<br>*******************************************************************************<br>** DISPLAY CHI AND DIV                                                       **<br>*#*****************************************************************************<br>
*# Set up colors 16-20 are green, 21-25 are blue<br>gnum = 16<br>bnum = 21<br>count = 1<br>cnum = 25<br>while (count&lt;=5)<br>*# Put the rgb colors in using gnum as gree and bnum as blue<br>&#39;set rgb &#39;gnum&#39; 0 &#39; cnum &#39; 0&#39;<br>
&#39;set rgb &#39;bnum&#39; 0 0 &#39; cnum<br>*# Increment the counter and color numbers<br>count=count+1<br>gnum=gnum+1<br>bnum=bnum+1<br>*# Increase the rgb number by 55<br>cnum=cnum+55<br>endwhile<br>&#39;set gxout shaded&#39;<br>
*# Set up the levels and colors using blue for negative and green for positive<br>&#39;set clevs   -20 -15 -10 -5 0   5 10 15  20&#39;<br>&#39;set ccols  22  23  24 25 1 1 20 19 18 17 &#39;<br>*# Change to a tropical latitude domain for display purposes<br>
&#39;set lat -30 30&#39;<br>&#39;set lon 0 360&#39;<br>&#39;set t &#39;it<br>&#39;set lev 200 200&#39;<br>*# Display the velocity potential and divide by a million<br>&#39;d (chi/1e6)&#39;<br>*# Display the color bar<br>&#39;cbarn_black&#39;<br>
*# Draw the title with the date<br>&#39;q time&#39;<br>date=subwrd(result,3)<br>&#39;q dim&#39;<br>rec=sublin(result,4)<br>level=subwrd(rec,6)<br>&#39;draw title &#39;level&#39;hPa Velocity Potential &#39;date<br>** get the month<br>
month=substr(date,6,3)<br>** get the year<br>year=substr(date,9,4)<br>** get the day<br>day=substr(date,4,2)<br>** get the hour<br>hour=substr(date,1,3)<br>say month &#39; &#39; year<br>&#39;printim &#39;year&#39;&#39;month&#39;&#39;day&#39;&#39;hour&#39;_&#39;level&#39;hPa.jpg&#39;<br>
&#39;printim &#39;year&#39;_&#39;filenum&#39;.jpg&#39;<br>*#*****************************************************************************<br>*# WRITE VOLOCITY POTENTIAL OUT TO A BINARY FILE                             **<br>
*#*****************************************************************************<br>*# set up global domain once again<br>&#39;set looping off&#39;<br>&#39;set lev 200 &#39;<br>&#39;set lat -90 90&#39;<br>&#39;set lon 0 360&#39;<br>
*#**************************************************************<br>say &#39;write data out to binary file called CHI.200hPa&#39;filenum&#39;.dat&#39;<br>&#39;set fwrite -le -sq -cl CHI_200hPa_&#39;filenum&#39;.dat&#39;<br>
&#39;set gxout fwrite&#39;<br>while (it &lt;= nt)<br>     &#39;set t &#39;it<br>     &#39;display chi&#39;<br>it=it+1<br>endwhile<br>&#39;disable fwrite&#39;<br>*******************************************************************************<br>
*set fwrite &lt;-be or -le&gt; &lt;-sq or -st&gt; &lt;-ap or -cl&gt; fname<br>*Sets the filename for data output as well as byte ordering and data format.<br><br>*      fname   output filename (default = grads.fwrite)<br>
*      -be     output data byte ordering is big endian<br>*      -le     output data byte ordering is little endian<br>*      -sq     output data format is sequential<br>*      -st     output data format is stream (default)<br>
*      -ap     output data is appended to existing file<br>*      -cl     output data replaces existing file if it exists (default)<br>*******************************************************************************<br>&#39;set looping off&#39;<br>
** Looping should be turned off<br>&#39;set gxout contour&#39;<br>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<br><br><div class="gmail_quote">On Thu, May 10, 2012 at 10:56 AM, Eric Altshuler <span dir="ltr">&lt;<a href="mailto:ela@cola.iges.org" target="_blank">ela@cola.iges.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Tom,<br>
<br>
There are three things I&#39;ll point out here:<br>
<br>
1. You seem to be trying to write out all the data at once, in a huge array dimensioned (144,73,48212). This array may require more memory than your computer has. Instead, try declaring your array as (144,73) and set up a DO loop in your fortran program to write out each time step individually. You&#39;ll need to substantially modify how your program reads the input data, too. If you send your complete fortran code, I might be able to modify it to implement my suggested method (no guarantees, though). This will eliminate the need to break up the 48212 time steps into 68*709.<br>

<br>
2. What is the size of the input files to your fortran program (i.e. the files written by fwrite)? This information will indicate if you have a wraparound problem.<br>
<br>
3. Your ctl file has the line:<br>
<div class="im"><br>
chi 0 x,y,t 1 ** velocity potential<br>
<br>
</div>Since your data is binary, I think this line should be:<br>
<br>
chi 0 99 ** velocity potential<br>
<div class="im"><br>
Eric<br>
<br>
----- Original Message -----<br>
From: &quot;Thomas Robinson&quot; &lt;<a href="mailto:ter@hawaii.edu">ter@hawaii.edu</a>&gt;<br>
To: &quot;GrADS Users Forum&quot; &lt;<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>&gt;<br>
</div><div class="im">Sent: Thursday, May 10, 2012 2:03:09 PM<br>
Subject: Re: [gradsusr] fwrite gridding issue<br>
<br>
<br>
</div><div><div class="h5">The file is the correct size. 144*73*48212*4=<a href="tel:2027218176" value="+12027218176">2027218176</a><br>
<br>
-rw-r--r-- 1 ter businger <a href="tel:2027218176" value="+12027218176">2027218176</a> May 9 15:57 chi_33yr.dat<br>
<br>
My computer crashes if I try to do all 48212, so I had to break it up in 68 separate files each with 709 time steps. So:<br>
PARAMETER (nt=709) !Number of time steps in each file<br>
PARAMETER (nrec=709) !Number of records in each file<br>
PARAMETER (files=68) !Number of input files<br>
The FORTRAN program reads in all of the files and stores the data in one variable chi, then it goes written out to the file chi_33yr.dat.<br>
<br>
My FORTRAN program also calculates a 33 year 6-hourly mean, but the variable chi isn&#39;t affected by that and that is written to a separate file which is also having the same problem.<br>
<br>
-Tom<br>
<br>
<br>
<br>
On Thu, May 10, 2012 at 7:51 AM, Jennifer Adams &lt; <a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a> &gt; wrote:<br>
<br>
<br>
<br>
I&#39;m no fortran expert, but I think &quot;direct&quot; means the 4-byte headers and footers for each record are not written, so you should remove &#39;options sequential&#39;. According to your descriptor, your data file (chi_33yr.dat) should be 144*73*48212*4 bytes large. Is it? What is &#39;files&#39;?<br>

--Jennifer<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On May 10, 2012, at 1:44 PM, Thomas Robinson wrote:<br>
<br>
<br>
Here is my code that opens and writes out the data:<br>
<br>
open (unit=291,file=&quot;chi_33yr.dat&quot;, access=&quot;direct&quot;,<br>
&amp; status=&quot;unknown&quot;,recl=4*nx*ny*nt*files)<br>
write (291, rec=1) chi<br>
<br>
The variable chi has dimensions nx,ny,nt*files .<br>
<br>
I added options sequential to the descriptor file and the same thing is happening. Here is my descriptor file:<br>
<br>
dset ^chi_33yr.dat<br>
title Velocity Potential<br>
options sequential<br>
undef 9.999e+20<br>
xdef 144 linear 0 2.5<br>
ydef 73 linear -90 2.5<br>
zdef 1 levels 200<br>
tdef 48212 linear 00Z01JAN1979 360mn<br>
vars 1<br>
chi 0 x,y,t 1 ** velocity potential<br>
endvars<br>
<br>
All of your input is very much appreciated.<br>
<br>
-Tom<br>
<br>
<br>
<br>
On Fri, May 11, 2012 at 3:16 AM, Jennifer Adams &lt; <a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a> &gt; wrote:<br>
<br>
<br>
<br>
Tom, Did you include &#39;options sequential&#39; in your descriptor file for your new binary file? --Jennifer<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On May 10, 2012, at 8:49 AM, Raghu Reddy wrote:<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
I am not a grads user, just responding to the FORTRAN/C issue.<br>
<br>
</div></div>If you do a normal sequential FORTRAN write, it writes an end-of-record marker at the beginning * and * at the end of * every * write. Since you mentioned that the data is skewed, I assume you wrote all the 48,000 values with one write statement, and that would result in one EOR marker at the beginning and one EOR marker at the end.<br>

<div class="HOEnZb"><div class="h5"><br>
If you don’t want these EOR markers you could write the file out as direct access files in Fortran.<br>
<br>
Hope this helps.<br>
<br>
Thanks,<br>
<br>
--Raghu<br>
<br>
<br>
<br>
From: <a href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@gradsusr.org</a> [mailto: <a href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@gradsusr.org</a> ] On Behalf Of Thomas Robinson<br>
Sent: Wednesday, May 09, 2012 11:36 PM<br>
To: GrADS Users Forum<br>
Subject: [gradsusr] fwrite gridding issue<br>
<br>
<br>
Aloha,<br>
<br>
I used fwrite to write out to a binary file in order to create a large file with about 48000 time steps for global data (because I am crazy). I noticed that when I use fortran to create a new data file that has all 48000, it doesn&#39;t match with what the original data plotted, instead it seems skewed. No manipulations were done to the data, it was just read it all in and write it out. When I tried to loop the data, I further noticed that the northern border looped around the south and then moved upwards back to the north. It just keeps looping around and it&#39;s odd because the top boundary of the map isn&#39;t continuous with the bottom boundary (unlike the side boundaries which are continuous). Anyways, I am wondering why this happened and what I can do to make it work out correctly.<br>

<br>
Here is my fwrite code. it is the first time step, nt is the last time step, chi is the velocity potential that was calculated using &#39;define chi = fish_chi(UGRDprs,VGRDprs)&#39; :<br>
*# set up global domain<br>
&#39;set lev 200 &#39;<br>
&#39;set lat -90 90&#39;<br>
&#39;set lon 0 360&#39;<br>
*#**************************************************************<br>
say &#39;write data out to binary file called CHI.200hPa&#39;filenum&#39;.dat&#39;<br>
&#39;set fwrite -le -sq -cl CHI_200hPa_&#39;filenum&#39;.dat&#39;<br>
&#39;set gxout fwrite&#39;<br>
while (it &lt;= nt)<br>
&#39;set t &#39;it<br>
&#39;display chi&#39;<br>
it=it+1<br>
endwhile<br>
&#39;disable fwrite&#39;<br>
<br>
Mahalo for your help!<br>
-Tom<br>
<br>
--<br>
Tom Robinson<br>
President Graduate Student Organization<br>
Student Caucus Representative for the Graduate Student Organization<br>
Graduate Student - Department of Meteorology<br>
<a href="tel:732-718-2323" value="+17327182323">732-718-2323</a> _______________________________________________<br>
<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
<br>
<br>
--<br>
Jennifer M. Adams<br>
IGES/COLA<br>
<br>
4041 Powder Mill Road, Suite 302<br>
Calverton, MD 20705<br>
<a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
<br>
<br>
<br>
--<br>
Tom Robinson<br>
President Graduate Student Organization<br>
Student Caucus Representative for the Graduate Student Organization<br>
Graduate Student - Department of Meteorology<br>
<a href="tel:732-718-2323" value="+17327182323">732-718-2323</a><br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
<br>
<br>
--<br>
Jennifer M. Adams<br>
IGES/COLA<br>
4041 Powder Mill Road, Suite 302<br>
Calverton, MD 20705<br>
<a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
<br>
<br>
<br>
--<br>
Tom Robinson<br>
President Graduate Student Organization<br>
Student Caucus Representative for the Graduate Student Organization<br>
Graduate Student - Department of Meteorology<br>
<a href="tel:732-718-2323" value="+17327182323">732-718-2323</a><br>
<br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Tom Robinson<br>President Graduate Student Organization <br>Student Caucus Representative for the Graduate Student Organization<br>Graduate Student - Department of Meteorology<br>
732-718-2323<br><br>