[MITgcm-support] file runoff-360x180x12.bin

Martin Losch Martin.Losch at awi.de
Fri Jan 25 04:28:26 EST 2019


Hi Vincent,

any file that the MITgcm reads is an ieee-be unblocked binary file, that means that you can just read it without any information about the shape. In this case in matlab you would do this (assuming that it is single precision “real*4":

fid = fopen('runoff-360x180x12.bin’,’r’,’ieee-be’);
fld = fread(fid,inf,’real*4’);
fclose(fid);

then you need to reshape it to 360x180x12. I think in matlab it is like this: newfld=reshape(fld,[360,180,12]); 

Martin


> On 25. Jan 2019, at 09:05, Vincent Le Fouest <vincent.lefouest at gmail.com> wrote:
> 
> Dear all,
> 
> I am looking for some Matlab or Ferret code to read properly the binary file runoff-360x180x12.bin, or any netcdf version of the file.
> 
> Kind regards and thank you in advance for any tip you may provide,
> 
> Vincent
> 
> 
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support



More information about the MITgcm-support mailing list