subroutine nutrient_leaching(j, jea, k, bd, cbn, flate, flu, fon, fop, frar, nn, poe, preinf, psp, qd, rsd, rtn, ste, te, ul, yone, yphe)
real(dp), dimension(:), intent(in) :: bd
real(dp), dimension(:, :), intent(in) :: cbn
real(dp), dimension(:, :, :), intent(in) :: flate
real(dp), dimension(:), intent(in) :: flu
real(dp), dimension(:, :, :), intent(inout) :: fon
real(dp), dimension(:, :, :), intent(inout) :: fop
real(dp), dimension(:, :), intent(in) :: frar
integer, intent(in) :: nn
real(dp), dimension(:, :, :), intent(in) :: poe
real(dp), dimension(:, :), intent(in) :: preinf
real(dp), intent(in) :: psp
real(dp), intent(in) :: qd
real(dp), dimension(:, :, :), intent(inout) :: rsd
real(dp), intent(in) :: rtn
real(dp), dimension(:, :, :), intent(in) :: ste
real(dp), dimension(:, :, :), intent(in) :: te
real(dp), dimension(:, :), intent(in) :: ul
real(dp), dimension(:), intent(inout) :: yone
real(dp), dimension(:), intent(inout) :: yphe
integer, intent(in) :: j, jea, k
!#### CALC NITRATE LEACHING, SOLUBLE P LEACING, N & P CYCLES
call nutrient_nitrate_leaching(j, jea, k, flate, nn, poe, preinf, qd, ul)
call nutrient_phosphorus_loss(j, jea, k, bd, qd)
call nutrient_nitrate_cycle(j, jea, k, cbn, flu, fon, fop, frar, nn, rsd, rtn, ste, te, ul, yone)
call nutrient_phosphorus_cycle(j, jea, flu, fon, fop, frar, nn, psp, rsd, yphe)
end subroutine nutrient_leaching