utils Module


Used by

  • module~~utils~~UsedByGraph module~utils utils proc~basin_prm_default basin_prm_default proc~basin_prm_default->module~utils proc~mgt_tillfactor mgt_tillfactor proc~mgt_tillfactor->module~utils proc~nut_solp nut_solp proc~nut_solp->module~utils proc~pest_parm_read pest_parm_read proc~pest_parm_read->module~utils proc~pl_pup pl_pup proc~pl_pup->module~utils proc~sd_channel_sediment3 sd_channel_sediment3 proc~sd_channel_sediment3->module~utils proc~wq_k2m wq_k2m proc~wq_k2m->module~utils proc~wq_semianalyt wq_semianalyt proc~wq_semianalyt->module~utils

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: MAX_TABLE_COLS = 100
integer, public, parameter :: MAX_NAME_LEN = 50
integer, public, parameter :: MAX_LINE_LEN = 2500

Derived Types

type, public ::  table_reader

Components

Type Visibility Attributes Name Initial
character(len=MAX_NAME_LEN), public :: header_cols(MAX_TABLE_COLS) = ''
character(len=MAX_NAME_LEN), public :: row_field(MAX_TABLE_COLS) = ''
character(len=MAX_LINE_LEN), public :: line = ''
character(len=:), public, allocatable :: left_str
character(len=:), public, allocatable :: file_name
character(len=:), public, allocatable :: min_cols
character(len=80), public :: titldum = ""
integer, public :: nrow = 0
integer, public :: ncols = 0
integer, public :: nfields = 0
integer, public :: skipped_rows = 0
integer, public :: start_row_numbr = 1
integer, public :: unit = 0
logical, public :: found_header_row = .false.
logical, public, allocatable :: col_okay(:)
logical, public :: file_exists = .false.

Type-Bound Procedures

procedure, public :: init
procedure, public :: get_num_data_lines
procedure, public :: get_header_columns
procedure, public :: get_row_fields
procedure, public :: output_column_warning
procedure, public :: get_row_idx
procedure, public :: get_col_count
procedure, public :: min_header_cols
procedure, public :: min_req_cols

Functions

public function exp_w(y)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: y

Return Value real

public pure function to_lower(str) result(lower)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str

Return Value character(len=len)

public function get_row_idx(self) result(row)

Arguments

Type IntentOptional Attributes Name
class(table_reader), intent(inout) :: self

Return Value integer

public function get_col_count(self) result(col)

Arguments

Type IntentOptional Attributes Name
class(table_reader), intent(inout) :: self

Return Value integer

public function get_num_data_lines(self) result(imax)

Arguments

Type IntentOptional Attributes Name
class(table_reader), intent(inout) :: self

Count the number of valid data rows in the table file

Read more…

Return Value integer


Subroutines

public subroutine init(self, unit, file_name, start_row_numbr)

read all curve number data from cn.tbl

Arguments

Type IntentOptional Attributes Name
class(table_reader), intent(inout) :: self
integer, intent(in), optional :: unit
character(len=*), optional :: file_name
integer, intent(in), optional :: start_row_numbr

public subroutine left_of_delim(input, delim, result)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: input
character(len=1), intent(in) :: delim
character(len=:), intent(out), allocatable :: result

public subroutine split_line(line2, fields2, nfields, delim, maxsplit)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: line2
character(len=*), intent(out) :: fields2(:)
integer, intent(out) :: nfields
character(len=1), intent(in), optional :: delim
integer, intent(in), optional :: maxsplit

public subroutine min_req_cols(self, min_cols)

Arguments

Type IntentOptional Attributes Name
class(table_reader), intent(inout) :: self
character(len=*), intent(in) :: min_cols

public subroutine min_header_cols(self, min_cols)

Arguments

Type IntentOptional Attributes Name
class(table_reader), intent(inout) :: self
character(len=*), intent(in) :: min_cols

public subroutine get_header_columns(self, eof)

Arguments

Type IntentOptional Attributes Name
class(table_reader), intent(inout) :: self
integer :: eof

public subroutine get_row_fields(self, eof)

Arguments

Type IntentOptional Attributes Name
class(table_reader), intent(inout) :: self
integer, intent(out) :: eof

public subroutine output_column_warning(self, i)

Arguments

Type IntentOptional Attributes Name
class(table_reader), intent(inout) :: self
integer, intent(in) :: i