[MITgcm-support] reshape grid_cs32.face001.bin

Krishnakumar Rajagopalan krishna_raj_2010 at yahoo.com
Thu Feb 21 22:40:01 EST 2013


Hi All,

I am trying to read and reshape grid_cs32.face001.bin just to see the variables inside. The file is read by the solver in 64bit precision and the contents of this binary file as printed out by the solver in the output is

(PID.TID 0000.0001) tile:   1 ; Read from file grid_cs32.face001.bin
(PID.TID 0000.0001)   => xC yC dxF dyF rA xG yG dxV dyU rAz dxC dyC rAw rAs dxG dyG AngleCS AngleSN

Assuming the 18 variables are 32x32 ( I am not very sure about AngleCS & AngleSN) .  The size of the total data that I read should be 32*32*18=18432

But when I read in the following way,

fid=fopen('grid_cs32.face001.bin','r','b'); data=fread(fid,'real*8');

The size of data is 19602 ( different from 18432, so I am unable to reshape)


Thanks a lot in advance

Kumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20130221/2db8b180/attachment.htm>


More information about the MITgcm-support mailing list