TEB_NP_INIT Subroutine

public subroutine TEB_NP_INIT(YNTEB, KPATCH)

Arguments

Type IntentOptional AttributesName
type(TEB_NP_t), intent(inout) :: YNTEB
integer, intent(in) :: KPATCH

Contents

Source Code


Source Code

SUBROUTINE TEB_NP_INIT(YNTEB,KPATCH)
TYPE(TEB_NP_t), INTENT(INOUT) :: YNTEB
INTEGER, INTENT(IN) :: KPATCH
INTEGER :: JP
REAL(KIND=JPRB) :: ZHOOK_HANDLE
IF (LHOOK) CALL DR_HOOK("MODD_TEB_N:TEB_NP_INIT",0,ZHOOK_HANDLE)
IF (.NOT.ASSOCIATED(YNTEB%AL)) THEN
  ALLOCATE(YNTEB%AL(KPATCH))
  DO JP=1,KPATCH
    CALL TEB_INIT(YNTEB%AL(JP))
  ENDDO
ELSE
  DO JP=1,KPATCH
    CALL TEB_INIT(YNTEB%AL(JP))
  ENDDO
  DEALLOCATE(YNTEB%AL)        
ENDIF
IF (LHOOK) CALL DR_HOOK("MODD_TEB_N:TEB_NP_INIT",1,ZHOOK_HANDLE)
END SUBROUTINE TEB_NP_INIT