MODULE YOM4FPOS

USE PARKIND1  ,ONLY : JPIM

IMPLICIT NONE

SAVE

!     ------------------------------------------------------------------

!*    Full-POS working arrays - level 4

! === DYNAMIC POST-PROCESSING ===

!     DIMENSIONING :

!     NTFPP  : total number of fields in P levels
!     NTFPH  : total number of fields in H levels
!     NTFPTH : total number of fields in THETA levels
!     NTFPPV : total number of fields in PV levels
!     NTFPS  : total number of fields in eta levels

!     NOFPP  : total number of P levels for each field
!     NOFPH  : total number of H levels for each field
!     NOFPTH : total number of THETA levels for each field
!     NOFPPV : total number of PV levels for each field
!     NOFPS  : total number of eta levels for each field

!     NAFPP  : total number of subdomains for each P level of each field
!     NAFPH  : total number of subdomains for each H level of each field
!     NAFPT  : total number of subdomains for each THETA level of each field
!     NAFPV  : total number of subdomains for each PV level of each field
!     NAFPS  : total number of subdomains for each eta level of each field

!     NOFP2F : total number of 2D fields
!     NOFP2A : total number of subdomains for each 2D field

!     INDEX ARRAYS :

!     NCPFP : field pointers in P levels
!     NCHFP : field pointers in H levels
!     NCTFP : field pointers in THETA levels
!     NCVFP : field pointers in PV levels
!     NCSFP : field pointers in eta levels

!     NPFP : P     level pointers for each field
!     NHFP : H     level pointers for each field
!     NTFP : THETA level pointers for each field
!     NVFP : PV    level pointers for each field
!     NSFP : eta   level pointers for each field

!     NIPFP : subdomain index for each P level of each field
!     NIHFP : subdomain index for each H level of each field
!     NITFP : subdomain index for each THETA level of each field
!     NIVFP : subdomain index for each PV level of each field
!     NISFP : subdomain index for each eta level of each field

!     NC2FP : 2-D field pointers
!     NI2FP : subdomain index for each 2D field

! === PHYSICAL POST-PROCESSING ===

!     NFPOSPHY: number of fields
!     NCPHYFP : Fields codes
!     NAPHYFP : Number of subdomains for each field
!     NIPHYFP : Subdomains pointers for each field

INTEGER(KIND=JPIM),ALLOCATABLE:: NOFPP(:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NOFPH(:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NOFPS(:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NOFPPV(:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NOFPTH(:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NCPFP(:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NCHFP(:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NCTFP(:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NCVFP(:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NCSFP(:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NAFPP(:,:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NAFPH(:,:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NAFPT(:,:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NAFPV(:,:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NAFPS(:,:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NIPFP(:,:,:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NIHFP(:,:,:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NITFP(:,:,:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NIVFP(:,:,:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NISFP(:,:,:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NPFP(:,:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NHFP(:,:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NTFP(:,:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NVFP(:,:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NSFP(:,:)

INTEGER(KIND=JPIM),ALLOCATABLE:: NOFP2A(:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NC2FP(:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NI2FP(:,:)

INTEGER(KIND=JPIM) :: NOFP2F
INTEGER(KIND=JPIM) :: NTFPP
INTEGER(KIND=JPIM) :: NTFPH
INTEGER(KIND=JPIM) :: NTFPTH
INTEGER(KIND=JPIM) :: NTFPPV
INTEGER(KIND=JPIM) :: NTFPS

INTEGER(KIND=JPIM),ALLOCATABLE:: NCPHYFP(:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NAPHYFP(:)
INTEGER(KIND=JPIM),ALLOCATABLE:: NIPHYFP(:,:)

INTEGER(KIND=JPIM) :: NFPOSPHY

!     ------------------------------------------------------------------
END MODULE YOM4FPOS
