SUBROUTINE SUALCAN
!****-------------------------------------------------------------------
!**** *SUALCAN* - Allocate additional space for analysis grid.
!****  -------  - Allocate space for diagnostic fields.
!****           - Compute the absolute address for each field
!****-------------------------------------------------------------------

USE PARKIND1  ,ONLY : JPRB
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK

USE YOMDIM   , ONLY : NFLEVG
USE YOMDIMO  , ONLY : NOBTOT
USE YOMGEM   , ONLY : NGPTOT
USE YOMLUN   , ONLY : NULOUT
USE QALORI   , ONLY : QCAGUE   ,QCAOBS
USE QAGPSF   , ONLY : RSGHUM   ,RSGPHI

IMPLICIT NONE

!**---------------------------------------------------------------------
!**      1.    ALLOCATE SPACE FOR ARRAYS.
!**            -------------------------

REAL(KIND=JPRB) :: ZHOOK_HANDLE
IF (LHOOK) CALL DR_HOOK('SUALCAN',0,ZHOOK_HANDLE)
ALLOCATE(QCAOBS(2,NOBTOT))
ALLOCATE(QCAGUE(2,NGPTOT))
ALLOCATE(RSGPHI(NFLEVG,NGPTOT))
ALLOCATE(RSGHUM(NFLEVG,NGPTOT))

WRITE(NULOUT,9990)'QCAOBS    ',SIZE(QCAOBS    ),SHAPE(QCAOBS    )
WRITE(NULOUT,9990)'QCAGUE    ',SIZE(QCAGUE    ),SHAPE(QCAGUE    )
WRITE(NULOUT,9990)'RSGPHI    ',SIZE(RSGPHI    ),SHAPE(RSGPHI    )
WRITE(NULOUT,9990)'RSGHUM    ',SIZE(RSGHUM    ),SHAPE(RSGHUM    )

!**----------------------------------------------------------------------
9990 FORMAT(1X,'ARRAY ',A10,' ALLOCATED ',8I8)

IF (LHOOK) CALL DR_HOOK('SUALCAN',1,ZHOOK_HANDLE)
END SUBROUTINE SUALCAN
