ISBA_NPE_INIT Subroutine

public subroutine ISBA_NPE_INIT(YISBA_NPE, KPATCH)

Arguments

Type IntentOptional AttributesName
type(ISBA_NPE_t), intent(inout) :: YISBA_NPE
integer, intent(in) :: KPATCH

Contents

Source Code


Source Code

SUBROUTINE ISBA_NPE_INIT(YISBA_NPE,KPATCH)
TYPE(ISBA_NPE_t), INTENT(INOUT) :: YISBA_NPE
INTEGER, INTENT(IN) :: KPATCH
INTEGER :: JP
REAL(KIND=JPRB) :: ZHOOK_HANDLE
IF (LHOOK) CALL DR_HOOK("MODD_ISBA_N:ISBA_NPE_INIT",0,ZHOOK_HANDLE)
!
IF (ASSOCIATED(YISBA_NPE%AL)) THEN
  DO JP = 1,KPATCH
    CALL ISBA_PE_INIT(YISBA_NPE%AL(JP))
  ENDDO
  DEALLOCATE(YISBA_NPE%AL)
ELSE
  ALLOCATE(YISBA_NPE%AL(KPATCH))
  DO JP = 1,KPATCH
    CALL ISBA_PE_INIT(YISBA_NPE%AL(JP))
  ENDDO
ENDIF
!
IF (LHOOK) CALL DR_HOOK("MODD_ISBA_N:ISBA_NPE_INIT",1,ZHOOK_HANDLE)
END SUBROUTINE ISBA_NPE_INIT