subroutine nutrient_fertilisation(j, je, ii, fen, feno, fep)
!**** PURPOSE: this subroutine applies N and P fertilizers as
! specified by date and amount in initcrop()
!**** CALLED IN: HYDROTOP
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! PARAMETERS & VARIABLES
!
! >>>>> COMMON PARAMETERS & VARIABLES
! ano3(j, je, l) = nitrate (NO3-N) content in a layer
! anora(j, je, l) = active org. N content in a layer
! dflow(j, je, 20) = monthly flows for water and N (see writhru.f)
! fen(ii) = amount of min N fertilizers applied, kg N/ha
! feno(ii) = amount of org N fertilizers applied, kg N/ha
! fep(ii) = amount of P fertilizers applied, kg P/ha
! ida = current day
! inuhd = number of hydrotope to print from ncycle(), if inutr=1
! inusb = number of subbasin to print from ncycle(), if inutr=1
! plab(j, je, l) = labile P content in a layer, kg/ha
! xnflow(7) = NO3-N fertilization in a choosen hydrotope, kg N/ha
! >>>>>
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!**** Include common parameters
real(dp), dimension(:), intent(in) :: fen
real(dp), dimension(:), intent(in) :: feno
real(dp), dimension(:), intent(in) :: fep
integer j, je, ii
!**** ADD FERTILIZERS
ano3(j, je, 2) = ano3(j, je, 2) + fen(ii)
anora(j, je, 2) = anora(j, je, 2) + feno(ii)
plab(j, je, 1) = plab(j, je, 1) + fep(ii)
!**** CALC N flows for a choosen hydrotope (output in ncycle)
if (j .eq. inusb .and. je .eq. inuhd) xnflow(7) = fen(ii)
!**** CALC monthly flows for selected HRUs (output in writhru.f)
dflow(j, je, 20) = dflow(j, je, 20) + fen(ii) + feno(ii)
return
end subroutine nutrient_fertilisation