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