ISBA_NP_INIT Subroutine

public subroutine ISBA_NP_INIT(YISBA_NP, KPATCH)

Arguments

Type IntentOptional AttributesName
type(ISBA_NP_t), intent(inout) :: YISBA_NP
integer, intent(in) :: KPATCH

Contents

Source Code


Source Code

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