! The integer parameters to be passed as flags (MPP_RDONLY,
! etc) are all made available by use association. The unit
! returned by mpp_open is guaranteed unique. For non-netCDF I/O
! it is a valid fortran unit number and fortran I/O can be directly called
! on the file.
!
! MPP_WRONLY will guarantee that existing files named
! file will not be clobbered. MPP_OVERWR
! allows overwriting of files.
!
! Files opened read-only by many processors will give each processor
! an independent pointer into the file, i.e:
!
!
! namelist / nml / ...
! ...
! call mpp_open( unit, 'input.nml', action=MPP_RDONLY )
! read(unit,nml)
!
!
! will result in each PE independently reading the same namelist.
!
! Metadata identifying the file and the version of
! mpp_io_mod are written to a file that is opened
! MPP_WRONLY or MPP_OVERWR. If this is a
! multi-file set, and an additional global attribute
! NumFilesInSet is written to be used by post-processing
! software.
!
! If nohdrs=.TRUE. all calls to write attributes will
! return successfully without performing any writes to the
! file. The default is .FALSE..
!
! For netCDF files, headers are always written even if
! nohdrs=.TRUE.
!
! The string iospec is passed to the OS to
! characterize the I/O to be performed on the file opened on
! unit. This is typically used for I/O optimization. For
! example, the FFIO layer on SGI/Cray systems can be used for
! controlling synchronicity of reads and writes, buffering of data
! between user space and disk for I/O optimization, striping across
! multiple disk partitions, automatic data conversion and the like
! (man intro_ffio). All these actions are controlled through
! the assign command. For example, to specify asynchronous
! caching of data going to a file open on unit, one would do:
!
!
! call mpp_open( unit, ... iospec='-F cachea' )
!
!
! on an SGI/Cray system, which would pass the supplied
! iospec to the assign(3F) system call.
!
! Currently iospec performs no action on non-SGI/Cray
! systems. The interface is still provided, however: users are cordially
! invited to add the requisite system calls for other systems.
!
!