FORCES
FORtran lib for Comp. Env. Sys.
|
File reading routines. More...
Data Types | |
interface | loadtxt |
Read a file into a 2D array containing reals. More... | |
Functions/Subroutines | |
subroutine | loadtxt_dp (filename, d, skiprows, max_rows) |
Read a file into a 2D array containing reals. | |
subroutine | loadtxt_sp (filename, d, skiprows, max_rows) |
Read a file into a 2D array containing reals. | |
integer function, public | number_of_columns (u) |
Determine number of columns in a file. The columns are assumed to be separated by spaces or tabs. | |
integer function, public | number_of_rows (u) |
Determine number of rows in a file. | |
File reading routines.
This module provides routines to load a file into an array. This is mainly taken from the Fortran stdlib: https://github.com/fortran-lang/stdlib
COPYING
and COPYING.LESSER
provided with this software. The complete GNU license text can also be found at http://www.gnu.org/licenses/.
|
private |
Read a file into a 2D array containing reals.
[in] | filename | Filename to load the array from |
[out] | d | The array 'd' will be automatically allocated with the correct dimensions |
[in] | skiprows | lines to skip at the begining |
[in] | max_rows | Read max_rows lines of content after skiprows lines. The default is to read all the lines (negative values). |
|
private |
Read a file into a 2D array containing reals.
[in] | filename | Filename to load the array from |
[out] | d | The array 'd' will be automatically allocated with the correct dimensions |
[in] | skiprows | lines to skip at the begining |
[in] | max_rows | Read max_rows lines of content after skiprows lines. The default is to read all the lines (negative values). |
integer function, public mo_io::number_of_columns | ( | integer(i4), intent(in) | u | ) |
Determine number of columns in a file. The columns are assumed to be separated by spaces or tabs.
[in] | u | unit of the open file |
Definition at line 118 of file mo_io.f90.
References mo_string_utils::is_blank(), and number_of_columns().
Referenced by mo_io::loadtxt::loadtxt_dp(), mo_io::loadtxt::loadtxt_sp(), and number_of_columns().
integer function, public mo_io::number_of_rows | ( | integer(i4), intent(in) | u | ) |
Determine number of rows in a file.
[in] | u | unit of the open file |
Definition at line 140 of file mo_io.f90.
References number_of_rows().
Referenced by mo_io::loadtxt::loadtxt_dp(), mo_io::loadtxt::loadtxt_sp(), and number_of_rows().