[MITgcm-support] CS Grid Generator and Convertor Matlab Scripts
Yuan Lian
lian at ashimaresearch.com
Wed Feb 15 16:46:07 EST 2012
Hi Chris,
OK, if I understand correctly, the "rdda" gave you the error message
"Not enough data was available to be read: off EOF?". Can you try to
read some .bin files using the fopen function directly?
For example:
fid=fopen('LONG.bin','r','b'); long=fread(fid,'real*8'); nrec=length(long);
"nrec" is the number of records you have in "LONG.bin", which should be
exactly nx*6*nx. For instance, if you generated C16, then
nrec=1536=16*6*16. If nrec gives a different number then there is
something wrong with the grid generation routines (as far as I can tell,
they should work).
Please let me know what you find.
Best,
Yuan
On 2/15/12 12:49 PM, Chris Watkins wrote:
> Hi Yuan,
>
> I don't think this is it. I have given it a go but it still
> has the same errors. I am convinced it is seeing the DXC.bin etc files
> as convertMITgrid.m gives the error "Not enough data was available to
> be read: off EOF?" which means that it opened the file but its size is
> smaller than prod(sz).
>
> Regards,
>
> Chris
>
>
>
> On 15 February 2012 19:41, Yuan Lian <lian at ashimaresearch.com
> <mailto:lian at ashimaresearch.com>> wrote:
>
> Hi Chris,
>
> It appears that you didn't define the path that contains the .bin
> file correctly. What worked for me is to use the following
>
> sz=[nx nx 6];
> prm=[1 2 3];
>
> chdatapath=input('full path to load data /~/ : ','s');
> path(chdatapath,path);
>
> Once you set the path correctly you can load the .bin files
> regardless where they are. Hope this helps.
>
> Best,
> Yuan
>
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20120215/6965b82c/attachment.htm>
More information about the MITgcm-support
mailing list