[gradsusr] fwrite gridding issue

Thomas Robinson ter at hawaii.edu
Wed May 9 23:35:59 EDT 2012


Aloha,

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'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's odd because the
top boundary of the map isn'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.

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 'define chi =
fish_chi(UGRDprs,VGRDprs)' :
*# set up global domain
'set lev 200 '
'set lat -90 90'
'set lon 0 360'
*#**************************************************************
say 'write data out to binary file called CHI.200hPa'filenum'.dat'
'set fwrite -le -sq -cl CHI_200hPa_'filenum'.dat'
'set gxout fwrite'
while (it <= nt)
     'set t 'it
     'display chi'
it=it+1
endwhile
'disable fwrite'

Mahalo for your help!
-Tom

-- 
Tom Robinson
President Graduate Student Organization
Student Caucus Representative for the Graduate Student Organization
Graduate Student - Department of Meteorology
732-718-2323
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120509/e577bba0/attachment-0003.html 


More information about the gradsusr mailing list