SUBROUTINE AGRI_NP_INIT(YNAG,KPATCH)
TYPE(AGRI_NP_t), INTENT(INOUT) :: YNAG
INTEGER, INTENT(IN) :: KPATCH
INTEGER :: JP
REAL(KIND=JPRB) :: ZHOOK_HANDLE
IF (LHOOK) CALL DR_HOOK("MODD_AGRI_N:AGRI_NP_INIT",0,ZHOOK_HANDLE)
!
IF (ASSOCIATED(YNAG%AL)) THEN
DO JP = 1,KPATCH
CALL AGRI_INIT(YNAG%AL(JP))
ENDDO
DEALLOCATE(YNAG%AL)
ELSE
ALLOCATE(YNAG%AL(KPATCH))
DO JP = 1,KPATCH
CALL AGRI_INIT(YNAG%AL(JP))
ENDDO
ENDIF
!
IF (LHOOK) CALL DR_HOOK("MODD_AGRI_N:AGRI_NP_INIT",1,ZHOOK_HANDLE)
END SUBROUTINE AGRI_NP_INIT