DIAG_NP_INIT Subroutine

public subroutine DIAG_NP_INIT(ND, KPATCH)

Arguments

Type IntentOptional AttributesName
type(DIAG_NP_t), intent(inout) :: ND
integer, intent(in) :: KPATCH

Contents

Source Code


Source Code

SUBROUTINE DIAG_NP_INIT(ND,KPATCH)
TYPE(DIAG_NP_t), INTENT(INOUT) :: ND 
INTEGER, INTENT(IN) :: KPATCH
INTEGER :: JP
REAL(KIND=JPRB) :: ZHOOK_HANDLE
IF (LHOOK) CALL DR_HOOK("MODD_DIAG_N:DIAG_NP_INIT",0,ZHOOK_HANDLE)
IF (.NOT.ASSOCIATED(ND%AL)) THEN
  ALLOCATE(ND%AL(KPATCH))
  DO JP=1,KPATCH
    CALL DIAG_INIT(ND%AL(JP))
  ENDDO
ELSE
  DO JP=1,KPATCH
    CALL DIAG_INIT(ND%AL(JP))
  ENDDO
  DEALLOCATE(ND%AL)
ENDIF
IF (LHOOK) CALL DR_HOOK("MODD_DIAG_N:DIAG_NP_INIT",1,ZHOOK_HANDLE)
END SUBROUTINE DIAG_NP_INIT