PB3D
[2.45]
Ideal linear high-n MHD stability in 3-D
|
Numerical utilities related to files. More...
Functions/Subroutines | |
integer function, public | nextunit (unit) |
Search for available new unit. More... | |
integer function, public | skip_comment (file_i, file_name) |
Skips comment when reading a file. More... | |
subroutine, public | get_file_info (file_name, file_size, acc_time, mod_time) |
Gets file information. More... | |
character(len=max_str_ln) function, public | get_full_pb3d_name (rich_lvl) |
Returns the name of the PB3D output file. More... | |
integer function, public | delete_file (file_name) |
Removes a file. More... | |
integer function, public | count_lines (file_i) |
Count non-comment lines in a file. More... | |
Numerical utilities related to files.
integer function, public files_utilities::count_lines | ( | integer, intent(in) | file_i | ) |
Count non-comment lines in a file.
[in] | file_i | file identifier |
Definition at line 170 of file files_utilities.f90.
integer function, public files_utilities::delete_file | ( | character(len=*), intent(inout) | file_name | ) |
Removes a file.
[in,out] | file_name | the name that is deleted |
Definition at line 144 of file files_utilities.f90.
subroutine, public files_utilities::get_file_info | ( | character(len=*), intent(in) | file_name, |
integer, intent(inout), optional | file_size, | ||
integer, intent(inout), optional | acc_time, | ||
integer, intent(inout), optional | mod_time | ||
) |
Gets file information.
The time informations can be converted to strings using the intrinsic function "ctime".
[in] | file_name | name of file |
[in,out] | file_size | file size |
[in,out] | acc_time | file access time |
[in,out] | mod_time | file modification time |
Definition at line 86 of file files_utilities.f90.
character(len=max_str_ln) function, public files_utilities::get_full_pb3d_name | ( | integer, intent(in), optional | rich_lvl | ) |
Returns the name of the PB3D output file.
Optionally, the Richardson level can be appended as _R_[lvl]
.
If not positive, it is ignored.
Definition at line 119 of file files_utilities.f90.
integer function, public files_utilities::nextunit | ( | integer, intent(out), optional | unit | ) |
Search for available new unit.
lun_min
and lun_max
define the range of possible luns to check.
The unit value is returned by the function, and also by the optional argument. This allows the function to be used directly in an open statement, and optionally save the result in a local variable.
If no units are available, -1 is returned.
Definition at line 27 of file files_utilities.f90.
integer function, public files_utilities::skip_comment | ( | integer, intent(in) | file_i, |
character(len=*), intent(in), optional | file_name | ||
) |
Skips comment when reading a file.
By comment, a line is meant that starts with the character #
.
Definition at line 55 of file files_utilities.f90.