m_io_tools/close_unit [ Functions ]

close a Fortran unit
The main differences wrt the intrinsic close:
* Function statement that returns the value of iostat
* Emulate iomsg (F2003)
See Fortran intrinsic for a more detailed description of the variables

m_io_tools/delete_file [ Functions ]

ierr=Non-zero value indicates that a problem occured.
111 = To signal that the file does not exist.
112 = File exist, is open but no associated unit is found!
Other values are system-dependent as the value is returned by a open or close
instruction.

m_io_tools/get_unit [ Functions ]

Obtain a logical Fortran unit.
A free unit is reported if no argument is specified.
If the file name is supplied, the function reports the unit number
associated to the file
Note that GET_UNIT assumes that units 0, 5, 6 (stderr, stdin, std_out)
are special, and will never return those values.

TODO

One should define an abinit-specific function with a list of reserved units!

OUTPUT

The unit number (free unit or unit associated to the file)
Raises:
IO_NO_AVAILABLE_UNIT if no logical unit is free (!)
IO_FILE_NOT_ASSOCIATED if the file is not linked to a logical unit

m_io_tools/isncfile [ Functions ]

The idea is extremely simple: a NETCDF file terminates with ".nc".
Obviously this approach is not bulletproof but it will work
provided that we continue to append the ".nc" string to any NETCDF
file produced by abinit.

m_io_tools/open_file [ Functions ]

Open a file in sequential mode and associate it to the unit number number.
The main differences wrt the intrinsic open:
* Function statement that returns the value of iostat
* Emulate iomsg (F2003)
* Accepts either unit (user-specified unit number, input) or
newunit (free unit not associated to any file, output).
The two options are mutually exclusive.
See Fortran intrinsic for a more detailed description of the variables