Module for storing file i/o related variables. More...
Functions/Subroutines | |
| subroutine | z_fileio (filename, qual, iufind, iunit, iostat) |
| Open file with name FILENAME and determine unit number IUNIT. More... | |
| subroutine | z_fclose (iunit) |
| Close file with unit number IUNIT, and set IUNIT=-1. More... | |
| subroutine | z_flunit (iunit, ierr) |
| Find a free unit number. More... | |
Variables | |
| integer, parameter | i_print =0 |
| (0/1/2) Test output printing off/on Output channel defined by i_out More... | |
| integer, parameter | i_out =6 |
| Output channel to screen ==1 screen output for Unix/Linux systems ==6 screen output for Windows. More... | |
| integer | i_log |
| (0/1) Logging off/on More... | |
| integer | i_prt |
| (0/1) Printing off/on More... | |
| integer | i_tst |
| (0,1,2...) Test level off/on More... | |
| integer | lu_err |
| standard error file More... | |
| integer | lu_inp |
| standard input file More... | |
| integer | lu_log |
| standard logging More... | |
| integer | lu_prt |
| standard print output More... | |
| integer | lu_tst |
| standard test output More... | |
Module for storing file i/o related variables.
The values for the parameter i_log, i_prt and iw_tst must be set in one of the routines of the host program or in subroutine sys_init.
| subroutine m_fileio::z_fclose | ( | integer, intent(inout) | iunit | ) |
Close file with unit number IUNIT, and set IUNIT=-1.
| [in,out] | iunit | Unit number. |
Definition at line 364 of file mod_fileio.f90.
Referenced by m_xnldata::q_ctrgrid().
| subroutine m_fileio::z_fileio | ( | character(len=*), intent(in) | filename, |
| character(len=2), intent(in) | qual, | ||
| integer, intent(in) | iufind, | ||
| integer, intent(inout) | iunit, | ||
| integer, intent(out) | iostat | ||
| ) |
Open file with name FILENAME and determine unit number IUNIT.
File type determined in QUAL. Depending on the value of IUFIND a search is performed for a free unit number.
| [in] | filename | File name. |
| [in] | qual | File qualifyer. |
| [in] | iufind | Indicator for search of unit number. |
| [in,out] | iunit | Unit number. |
| [out] | iostat | Error indicator. |
Definition at line 84 of file mod_fileio.f90.
References file(), constants::file_endian, i_out, i_print, and z_flunit().
Referenced by m_xnldata::q_ctrgrid(), m_xnldata::q_error(), m_xnldata::q_setconfig(), and m_xnldata::xnl_init().
| subroutine m_fileio::z_flunit | ( | integer, intent(out) | iunit, |
| integer, intent(out) | ierr | ||
| ) |
Find a free unit number.
Starting at LU_MIN till LU_MAX are investigated until a free (i.e. not connected to a file) is found. Use is made of the standard fortran INQUIRE function. The values of LU_MIN and LU_MAX should be specified in an initialisation routine
If no free unit number if found in the range lu_min - lu_high, then the function returns IUNIT = -1.
| [out] | iunit | Resulting unit number. |
| [out] | ierr | Error level. |
Definition at line 418 of file mod_fileio.f90.
References i_out, and i_print.
Referenced by z_fileio().
| integer m_fileio::i_log |
| integer, parameter m_fileio::i_out =6 |
Output channel to screen ==1 screen output for Unix/Linux systems ==6 screen output for Windows.
Definition at line 45 of file mod_fileio.f90.
Referenced by z_fileio(), and z_flunit().
| integer, parameter m_fileio::i_print =0 |
(0/1/2) Test output printing off/on Output channel defined by i_out
Definition at line 42 of file mod_fileio.f90.
Referenced by z_fileio(), and z_flunit().
| integer m_fileio::i_prt |
| integer m_fileio::i_tst |
| integer m_fileio::lu_err |
| integer m_fileio::lu_inp |
| integer m_fileio::lu_log |
| integer m_fileio::lu_prt |
| integer m_fileio::lu_tst |