[MITgcm-support] How to open and read '.bin' file?
Matthew Mazloff
mmazloff at ucsd.edu
Tue Jul 22 19:22:15 EDT 2014
Hi Yan
If you have matlab you can do:
fid = fopen('bathymetry.bin','r','b');
Q = fread(fid,inf,'double'); %unless its single precision…I don't know
fclose(fid)
Q = reshape(Q,[NX,NY]);
imagesc(Q');axis xy; colorbar
Matt
On Jul 22, 2014, at 7:41 AM, Xiaohui Yan <xyan044 at uottawa.ca> wrote:
> Hi,
>
> I'm a new learner of MITgcm, I'm studying example 3.12 <Global Ocean Simulation at 4 Resolution> now, but how can I open and have a look at the ".bin" file (such the "bathymetry.bin" file)?
>
> Thank you!
>
> Yan
> _______________________________________________
> 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/20140722/64bae385/attachment.htm>
More information about the MITgcm-support
mailing list