Jim,<br><br> Thank you very much. I wrote it as direct access rather than sequential and that seemed to solve the issue. Thanks again.<br><br>-Jim<br><br><div class="gmail_quote">On Wed, Jun 8, 2011 at 12:59 PM, James T. Potemra <span dir="ltr"><<a href="mailto:jimp@hawaii.edu">jimp@hawaii.edu</a>></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;">
<div bgcolor="#ffffff" text="#000000">
Jim:<br>
<br>
I think you are getting an extra return after each record that is
written.<br>
Instead, you need to either write as direct access and specify the <br>
record length (access=direct, recl= 180*360*4), or sequential
(access=<br>
sequential). It will depend on your compiler the specifics on
these.<br>
<br>
Jim<div><div></div><div class="h5"><br>
<br>
On 6/8/11 9:39 AM, <a href="mailto:jimbo32886@gmail.com" target="_blank">jimbo32886@gmail.com</a> wrote:
</div></div><blockquote type="cite"><div><div></div><div class="h5">Hello All,<br>
<br>
I am attempting to plot data on a single surface using GrADS
v1.9b4, however, when I plot different times the data seems to
shift eastward by a degree or two. The data is on a 1x1 grid
(89.5S-89.5N,.5E-359.5E). I wrote the data out to GrADS binary
format using this FORTRAN code:<br>
<br>
***I cut out only the relevant piece of code, data variable fv was
set-up previously***<br>
<br>
open(10,file='oclgradsfrwatvol0_700.bin',<br>
* status='unknown',form='unformatted')<br>
c open(10,file='oclgradsfrwatvol0_300.bin',<br>
c * status='unknown',form='unformatted')<br>
c open(10,file='oclgradsfrwatvol0_100.bin',<br>
c * status='unknown',form='unformatted')<br>
<br>
do iii = 1,tdim<br>
<br>
write(10) ((fv(iii,i,j), i=1,idim),j=1,jdim) <br>
<br>
write(99,*)
((fv(iii,i,j),ri(iii,i,j),rj(iii,i,j),i=1,idim),j=1,jdim)<br>
<br>
enddo<br>
close(10)<br>
end <br>
<br>
As you can see by looking at the code, I also write out the data
to a fort.99 file. The data is written correctly to the fort.99
file, thus I am assuming it was written correctly to the *.bin
file. Just for your information tdim is time dimension, in this
case it is set to 60 for 60 months, idim is longitude dimension,
set to 360, and jdim is latitude dimension set to 180. My control
file is as follows: <br>
<br>
DSET oclgradsfrwatvol0_700.bin<br>
TITLE FW<br>
OPTIONS sequential<br>
UNDEF -9999.000<br>
XDEF 360 linear 0.5 1.0<br>
YDEF 180 linear -89.5 1.0<br>
ZDEF 1 levels 0<br>
TDEF 60 linear 01JAN2006 1mo<br>
VARS 1<br>
frwvol 1 0 fwvol<br>
ENDVARS <br clear="all">
<br>
<br>
Now, when I do run the control file and set time to 1, I get 0 for
the value at gridpoint .5E,89.5S, where in reality I should be
getting -9999 (undefined). I'm sure I am just missing something
minor, but I can't figure out what it is. It's just weird that it
is writing out the data correctly, but when GrADS is ran, it seems
to shift the data to the east as I increase the time. <br>
<br>
Thanks,<br>
Jim<br>
<br>
</div></div><pre><fieldset></fieldset>
_______________________________________________
gradsusr mailing list
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
</blockquote>
</div>
<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></blockquote></div><br>