ISBA_NK_INIT Subroutine

public subroutine ISBA_NK_INIT(YISBA_NK, KPATCH)

Arguments

Type IntentOptional AttributesName
type(ISBA_NK_t), intent(inout) :: YISBA_NK
integer, intent(in) :: KPATCH

Contents

Source Code


Source Code

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