Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(GRID_NP_t), | intent(inout) | :: | GP | |||
integer, | intent(in) | :: | KPATCH |
SUBROUTINE GRID_NP_INIT(GP,KPATCH)
TYPE(GRID_NP_t), INTENT(INOUT) :: GP
INTEGER, INTENT(IN) :: KPATCH
INTEGER :: JP
REAL(KIND=JPRB) :: ZHOOK_HANDLE
IF (LHOOK) CALL DR_HOOK("MODD_SFX_GRID_N:GRID_NP_INIT",0,ZHOOK_HANDLE)
IF (ASSOCIATED(GP%AL)) THEN
DO JP=1,KPATCH
CALL GRID_INIT(GP%AL(JP))
ENDDO
DEALLOCATE(GP%AL)
ELSE
ALLOCATE(GP%AL(KPATCH))
DO JP=1,KPATCH
CALL GRID_INIT(GP%AL(JP))
ENDDO
ENDIF
!
IF (LHOOK) CALL DR_HOOK("MODD_SFX_GRID_N:GRID_NP_INIT",1,ZHOOK_HANDLE)
END SUBROUTINE GRID_NP_INIT