erosion_initialise Subroutine

public subroutine erosion_initialise(mb, mcrdb, meap, subbasin_input_file_id, da, flu, stp, slope_length, tc, tp6, tp5, al, chl, chnn, chd, chss)

Uses

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

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: mb
integer, intent(in) :: mcrdb
integer, intent(in) :: meap
integer, intent(in) :: subbasin_input_file_id
real(kind=dp), intent(in) :: da
real(kind=dp), intent(in) :: flu(:)
real(kind=dp), intent(in) :: stp(:)
real(kind=dp), intent(in) :: slope_length(:)
real(kind=dp), intent(in) :: tc(:)
real(kind=dp), intent(in) :: tp6(:)
real(kind=dp), intent(in) :: tp5(:)
real(kind=dp), intent(out) :: al(:)
real(kind=dp), intent(in) :: chl(:,:)
real(kind=dp), intent(in) :: chnn(:)
real(kind=dp), intent(in) :: chd(:)
real(kind=dp), intent(in) :: chss(:)

Calls

proc~~erosion_initialise~~CallsGraph proc~erosion_initialise erosion_initialise proc~get_config_fid get_config_fid proc~erosion_initialise->proc~get_config_fid proc~erosion_read_input erosion_read_input proc~erosion_initialise->proc~erosion_read_input proc~erosion_allocate erosion_allocate proc~erosion_initialise->proc~erosion_allocate proc~open_file open_file proc~get_config_fid->proc~open_file proc~read_real_column read_real_column proc~erosion_read_input->proc~read_real_column proc~log_error log_error proc~open_file->proc~log_error proc~input_type_conversion_error input_type_conversion_error proc~read_real_column->proc~input_type_conversion_error proc~move_lines move_lines proc~read_real_column->proc~move_lines proc~read_real_column->proc~log_error proc~check_range check_range proc~read_real_column->proc~check_range proc~read_csv_item read_csv_item proc~read_real_column->proc~read_csv_item proc~header_column_index header_column_index proc~read_real_column->proc~header_column_index proc~input_error_column_not_found input_error_column_not_found proc~read_real_column->proc~input_error_column_not_found proc~input_type_conversion_error->proc~log_error proc~log_message log_message proc~log_error->proc~log_message proc~check_range->proc~log_error proc~log_warn log_warn proc~check_range->proc~log_warn proc~out_of_range_error out_of_range_error proc~check_range->proc~out_of_range_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~~erosion_initialise~~CalledByGraph proc~erosion_initialise erosion_initialise proc~initialise initialise proc~initialise->proc~erosion_initialise program~swim swim program~swim->proc~initialise

Contents

Source Code


Source Code

  subroutine erosion_initialise(mb, mcrdb, meap, subbasin_input_file_id, da, flu, stp, slope_length, tc, tp6, tp5, al, chl, chnn, chd, chss)
    use input, only : get_config_fid
    integer, intent(in) :: mb, mcrdb, meap, subbasin_input_file_id
    real(dp), intent(in) :: da
    real(dp), intent(in) :: flu(:)
    real(dp), intent(in) :: stp(:)
    real(dp), intent(in) :: slope_length(:)
    real(dp), intent(in) :: tc(:)
    real(dp), intent(in) :: tp6(:)
    real(dp), intent(in) :: tp5(:)
    real(dp), intent(out) :: al(:)
    real(dp), intent(in) :: chl(:, :)
    real(dp), intent(in) :: chnn(:)
    real(dp), intent(in) :: chd(:)
    real(dp), intent(in) :: chss(:)

    integer j
    real(dp) vm, a2, xm, sxc

    read(get_config_fid(), EROSION_PARAMETERS)

    call erosion_allocate(mb, mcrdb, meap)
    call erosion_read_input(subbasin_input_file_id)

    !**** CALC subbasin parameters sl(), al(), css()
    do j = 1, mb
      xm = .6 * (1. - exp(- 35.835 * stp(j)))
      sl(j) = (slope_length(j) / 22.127) ** xm * (65.41 * stp(j) * stp(j) + 4.56 * stp(j) + .065)
      a2 = - log10(tp5(j) / tp6(j)) / 1.0792
      al(j) = tp6(j) * (tc(j) / 6.) ** a2 * (da / 3.6) * flu(j) / tp5(j)
      if (chl(2, j) .ne. 0.) then
        sxc = sqrt(chss(j)) / chnn(j)
        vm = chd(j) ** .6667 * sxc
      end if
      css(j) = css(j) * 1.e-6
    end do
  end subroutine erosion_initialise