[MITgcm-support] How to open and read '.bin' file?

Xiaohui Yan xyan044 at uottawa.ca
Wed Jul 23 21:05:36 EDT 2014


Thank you Michael!

Regards,
Yan



On Wed, Jul 23, 2014 at 12:26 PM, michael schaferkotter <
schaferk at bellsouth.net> wrote:

> in fortran90 code
>
> real, dimension(nx,ny) :: data
>
> topoFile = "topoFile.bin"
> iunit         = 99
>
> WORDLENGTH    = 4
> nnn                          = size(data)
> length_of_rec        = nnn*WORDLENGTH
> irec                           = 1
>
> open(unit=iunit,file=topoFile, status="old", access="direct",
> recl=length_of_rec ,action="read")
> read(unit=iunit,rec=irec) data
>
>
> i use this routine as a method in a generic subroutine to handle various
> array sizes and data types.
>
> the assumption here is the data is real*4.
>
> michael
>
> On Jul 22, 2014, at 9:41 AM, Xiaohui Yan 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
>
>
>
> _______________________________________________
> 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/20140723/2010b0cf/attachment.htm>


More information about the MITgcm-support mailing list