subbasin_read_routing Subroutine

public subroutine subbasin_read_routing()

Uses

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

Arguments

None

Calls

proc~~subbasin_read_routing~~CallsGraph proc~subbasin_read_routing subbasin_read_routing proc~input_count_rows input_count_rows proc~subbasin_read_routing->proc~input_count_rows proc~input_open_file input_open_file proc~subbasin_read_routing->proc~input_open_file proc~read_integer_column read_integer_column proc~subbasin_read_routing->proc~read_integer_column proc~log_error log_error proc~input_count_rows->proc~log_error proc~open_file open_file proc~input_open_file->proc~open_file proc~input_type_conversion_error input_type_conversion_error proc~read_integer_column->proc~input_type_conversion_error proc~move_lines move_lines proc~read_integer_column->proc~move_lines proc~check_int_range check_int_range proc~read_integer_column->proc~check_int_range proc~read_integer_column->proc~log_error proc~read_csv_item read_csv_item proc~read_integer_column->proc~read_csv_item proc~header_column_index header_column_index proc~read_integer_column->proc~header_column_index proc~input_error_column_not_found input_error_column_not_found proc~read_integer_column->proc~input_error_column_not_found proc~input_type_conversion_error->proc~log_error proc~check_int_range->proc~log_error proc~log_warn log_warn proc~check_int_range->proc~log_warn proc~out_of_range_error out_of_range_error proc~check_int_range->proc~out_of_range_error proc~log_message log_message proc~log_error->proc~log_message proc~open_file->proc~log_error proc~header_column_index->proc~move_lines proc~header_column_index->proc~input_error_column_not_found proc~input_error_column_not_found->proc~log_error proc~log_warn->proc~log_message proc~out_of_range_error->proc~log_error proc~to_string to_string proc~out_of_range_error->proc~to_string proc~log_write log_write proc~log_message->proc~log_write proc~log_format_message log_format_message proc~log_message->proc~log_format_message proc~log_write->proc~to_string proc~date_time_str date_time_str proc~log_format_message->proc~date_time_str proc~colourise colourise proc~log_format_message->proc~colourise proc~string_index string_index proc~colourise->proc~string_index

Called by

proc~~subbasin_read_routing~~CalledByGraph proc~subbasin_read_routing subbasin_read_routing proc~subbasin_initialise subbasin_initialise proc~subbasin_initialise->proc~subbasin_read_routing proc~initialise initialise proc~initialise->proc~subbasin_initialise program~swim swim program~swim->proc~initialise

Contents

Source Code


Source Code

  subroutine subbasin_read_routing
    use input, only : &
      read_integer_column, &
      read_string_column, &
      input_open_file, &
      input_count_rows

    subbasin_routing_input_file_id = input_open_file(subbasin_routing_input_file)

    mhyd = input_count_rows(subbasin_routing_input_file_id, .true.)
    ! Allocate routing node variables
    allocate(icodes(mhyd))
    allocate(ihouts(mhyd))
    allocate(inum1s(mhyd))
    allocate(inum2s(mhyd))
    icodes = 0
    ihouts = 0
    inum1s = 0
    inum2s = 0

    ! **** READ 3 - routing structure file & count number of hydrograph nodes
    call read_integer_column(subbasin_routing_input_file_id, "icd", icodes)
    call read_integer_column(subbasin_routing_input_file_id, "iht", ihouts)
    call read_integer_column(subbasin_routing_input_file_id, "inm1", inum1s)
    call read_integer_column(subbasin_routing_input_file_id, "inm2", inum2s)
  end subroutine subbasin_read_routing