input Module


Uses

  • module~~input~~UsesGraph module~input input module~utilities utilities module~input->module~utilities

Used by


Contents


Variables

TypeVisibility AttributesNameInitial
logical, public :: NC_DEBUG =.true.
character(len=path_max_length), public :: NC_FNAMES(6)
character(len=path_max_length), public :: NC_GRID ="subbasin_climate_grid.csv"
character(len=100), public :: NC_LAT_VNAME ="lat"
character(len=100), public :: NC_LON_VNAME ="lon"
integer, public :: NC_OFFSET_DAYS =0
integer, public :: NC_REF_YEAR =-1
character(len=100), public :: NC_TIME_VNAME ="time"
character(len=path_max_length), public :: NC_VNAMES(6)
integer, public, parameter:: SEEK_CUR =1
integer, public, parameter:: SEEK_END =2
integer, public, parameter:: SEEK_SET =0
character(len=path_max_length), public :: config_file_path =""
integer, public :: discharge_offset =1
character(len=path_max_length), public, save:: input_dir ="input/"
character(len=14), public :: nc_attr_names(4) =(/'scale_factor ', 'add_offset   ', '_FillValue   ', 'missing_value'/)
real(kind=dp), public :: nc_attr_vals(6,4) =0
integer, public :: nc_ids(6)
real(kind=dp), public, dimension(:, :), allocatable:: nc_lat_sb
real(kind=dp), public, dimension(:), allocatable:: nc_lats
real(kind=dp), public, dimension(:, :), allocatable:: nc_lon_sb
real(kind=dp), public, dimension(:), allocatable:: nc_lons
integer, public :: nc_mxc =0
integer, public, dimension(:), allocatable:: nc_ncells_sb
integer, public :: nc_nday =1
integer, public :: nc_nlats
integer, public :: nc_nlons
integer, public :: nc_nrecs
integer, public :: nc_nrows =0
integer, public :: nc_nx
integer, public :: nc_ny
integer, public, dimension(:), allocatable:: nc_time_ix
integer, public :: nc_var_ids(6)
real(kind=dp), public, dimension(:, :), allocatable:: nc_var_in
real(kind=dp), public, dimension(:, :), allocatable:: nc_weight_sb
real(kind=dp), public, dimension(:), allocatable:: nc_wsum_sb
integer, public, dimension(:, :), allocatable:: nc_x_sb
integer, public :: nc_xmax =0
integer, public :: nc_xmin =10000000
integer, public, dimension(:, :), allocatable:: nc_y_sb
integer, public :: nc_ymax =0
integer, public :: nc_ymin =10000000
integer, public :: read_line_buffer_size =128

Functions

public function get_config_fid()

Arguments

None

Return Value integer

public function has_column(column, file_id)

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: column
integer, intent(in) :: file_id

Return Value logical

public function header_column_index(column, file_id, required)

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: column
integer, intent(in) :: file_id
logical, intent(in), optional :: required

Return Value integer

public function input_count_rows(funit, header) result(nlines)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: funit
logical, intent(in) :: header

Return Value integer

public function input_open_file(file_name) result(file_id)

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: file_name

Return Value integer

public function read_csv_item(index, file_id) result(column)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: index
integer, intent(in) :: file_id

Return Value character(len=read_line_buffer_size)


Subroutines

public subroutine input_error_column_not_found(column, file_id)

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: column
integer, intent(in) :: file_id

public subroutine input_initialise()

Arguments

None

public subroutine input_nc_check_attr(ivar)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: ivar

public subroutine input_nc_check_dims(ncid, icheck, vname)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: ncid
logical, intent(in) :: icheck
character(len=*), intent(in) :: vname

public subroutine input_nc_check_error(status)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: status

public subroutine input_nc_check_grid(mb)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: mb

public subroutine input_nc_check_missing(mb)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: mb

public subroutine input_nc_close()

Arguments

None

public subroutine input_nc_convert_coordinates(mb)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: mb

public subroutine input_nc_find_time(iyr)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: iyr

public subroutine input_nc_initialise(iyr, mb)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: iyr
integer, intent(in) :: mb

public subroutine input_nc_offset_time()

Arguments

None

public subroutine input_nc_read_climate(flu, humi, mb, ra, subp, tmn, tmx, tx)

Arguments

Type IntentOptional AttributesName
real(kind=dp), intent(in), dimension(:):: flu
real(kind=dp), intent(out), dimension(:):: humi
integer, intent(in) :: mb
real(kind=dp), intent(out), dimension(:):: ra
real(kind=dp), intent(out), dimension(:):: subp
real(kind=dp), intent(out), dimension(:):: tmn
real(kind=dp), intent(out), dimension(:):: tmx
real(kind=dp), intent(out), dimension(:):: tx

public subroutine input_nc_read_grid(mb)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: mb

public subroutine input_nc_weighted_mean(ivar, v_sb, mb)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: ivar
real(kind=dp), intent(out) :: v_sb(:)
integer, intent(in) :: mb

public subroutine input_type_conversion_error(file_id, str, type, line_index, column_index)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file_id
character(len=*), intent(in) :: str
character(len=*), intent(in) :: type
integer, intent(in) :: line_index
integer, intent(in) :: column_index

public subroutine move_lines(file_id, n)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file_id
integer, intent(in) :: n

public subroutine parse_commandline_arguments(version, print_output_variables, print_defaults)

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: version
logical, intent(out) :: print_output_variables
character(len=*), intent(out) :: print_defaults

public subroutine print_help(errormsg)

Arguments

Type IntentOptional AttributesName
character(len=*), optional :: errormsg

public subroutine print_splash(version)

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: version

public subroutine read_integer_column(file_id, column, array, default, index, skip, range)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file_id
character(len=*), intent(in), optional :: column
integer, intent(out), dimension(:):: array
integer, intent(in), optional :: default
integer, intent(in), optional :: index
integer, intent(in), optional :: skip
integer, intent(in), optional :: range(2)

public subroutine read_logical_column(file_id, column, array, default, index, skip)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file_id
character(len=*), intent(in), optional :: column
logical, intent(out), dimension(:):: array
logical, intent(in), optional :: default
integer, intent(in), optional :: index
integer, intent(in), optional :: skip

public subroutine read_real_column(file_id, column, array, default, index, skip, range, closed)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file_id
character(len=*), intent(in), optional :: column
real(kind=dp), intent(out), dimension(:):: array
real(kind=dp), intent(in), optional :: default
integer, intent(in), optional :: index
integer, intent(in), optional :: skip
real(kind=dp), intent(in), optional :: range(2)
character(len=1), intent(in), optional :: closed

public subroutine read_string_column(file_id, column, array, default, index, skip)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file_id
character(len=*), intent(in), optional :: column
character(len=*), intent(out), dimension(:):: array
character(len=*), intent(in), optional :: default
integer, intent(in), optional :: index
integer, intent(in), optional :: skip