[gradsusr] Eastward shift in data with time

James T. Potemra jimp at hawaii.edu
Wed Jun 8 12:59:55 EDT 2011


Jim:

I think you are getting an extra return after each record that is written.
Instead, you need to either write as direct access and specify the
record length (access=direct, recl= 180*360*4), or sequential (access=
sequential).  It will depend on your compiler the specifics on these.

Jim

On 6/8/11 9:39 AM, jimbo32886 at gmail.com wrote:
> Hello All,
>
>   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:
>
> ***I cut out only the relevant piece of code, data variable fv was 
> set-up previously***
>
>     open(10,file='oclgradsfrwatvol0_700.bin',
>      *    status='unknown',form='unformatted')
> c    open(10,file='oclgradsfrwatvol0_300.bin',
> c     *    status='unknown',form='unformatted')
> c    open(10,file='oclgradsfrwatvol0_100.bin',
> c     *    status='unknown',form='unformatted')
>
>     do iii = 1,tdim
>
>       write(10) ((fv(iii,i,j), i=1,idim),j=1,jdim)
>
>       write(99,*) 
> ((fv(iii,i,j),ri(iii,i,j),rj(iii,i,j),i=1,idim),j=1,jdim)
>
>       enddo
>       close(10)
>       end
>
> 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:
>
> DSET    oclgradsfrwatvol0_700.bin
> TITLE   FW
> OPTIONS sequential
> UNDEF   -9999.000
> XDEF 360 linear 0.5 1.0
> YDEF 180 linear -89.5  1.0
> ZDEF 1  levels 0
> TDEF 60  linear 01JAN2006 1mo
> VARS 1
> frwvol 1 0 fwvol
> ENDVARS
>
>
> 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.
>
> Thanks,
> Jim
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110608/d1a1c77a/attachment-0003.html 


More information about the gradsusr mailing list