Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(DIAG_NP_t), | intent(inout) | :: | ND | |||
integer, | intent(in) | :: | KPATCH |
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