subroutine sutag

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

USE YOMTAG   , ONLY : MTAGLM   ,&
 & MTAGMS   ,MTAGSM   ,MTAGMV   ,MTAGVH   ,&
 & MTAGSPNO ,MTAGSLAG ,MTAGTIDE ,&
 & MTAGRAD  ,&
 & MTAGPART ,MTAGDISTSP,&
 & MTAGDISTGP,MTAGDISTGP_DEP,MTAGMN   ,MTAGNM   ,&
 & MTAGCAIN ,MTAGCOST ,MTAGGSUM ,MTAGGLOBSI,&
 & MTAGGLOBSR,MTAGOBSEQ,MTAGOBSEQAD,MTAGFCE  ,&
 & MTAGBDY  ,MTAGDDHRES,MTAGSIG  ,MTAGBRPR ,&
 & MTAGGPNORM,MTAGDDH1 ,MTAGDDH2 ,MTAGDDH3 ,MTAGDDH4 ,&
 & MTAGOZON ,MTAGREADVEC,&
 & MT_DISTRIBUTED_VECTOR, MTAGLCZ  ,&
 & MTAGGOM  ,MTAGFREQ ,MTAGEIGMD, MTAGKE, MTAGDISTFO  


!**** *SUTAG* - Set up tag identifiers used in message passing communication

!     Purpose.
!     --------
!        Set up tag identifiers used in message passing communication

!**   Interface.
!     ----------
!        *CALL* *SUTAG

!        Explicit arguments :  NONE
!        --------------------

!        Implicit arguments :  NONE
!        --------------------
!     Method.
!     -------

!     Externals.
!     ----------
!         NONE

!     Reference.
!     ----------
!        ECMWF Research Department documentation of the IFS

!     Author.
!     -------
!        Lars Isaksen *ECMWF*

!     Modifications.
!     --------------
!        Original : 95-03-15
!        D. Paradis : 96-11-06 Addition of tag MTAGBRPR
!        Modified 99-02-17 by K. YESSAD: options LRETCFOU, LWRTCFOU.
!        Modified 00-09-01 by D. Dent  : tags restricted to less than 32767
!        M.Hamrud      01-Oct-2003 CY28 Cleaning
!        M.Hamrud      01-Dec-2003 CY28R1 Cleaning
!        K.Yessad      27-02-2007  Add MTAGDISTGP_DEP.
!     ------------------------------------------------------------------

IMPLICIT NONE

REAL(KIND=JPRB) :: ZHOOK_HANDLE
IF (LHOOK) CALL DR_HOOK('SUTAG',0,ZHOOK_HANDLE)

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

!*       1.    Define tag identifier ranges
!              ----------------------------------------
!  Tag identifier range 1-1999 are reserved for diagnostics

mtaglm =  600

! Transpositions between horizontal and vertical distribution of spectral coefficients

mtagms = 1000
mtagsm = 1200

! Transpositions used in NMI

mtagmv = 1400
mtagvh = 1600

! Collection of spectral norms on PE0

mtagspno = 2200

! Semi-Lagrangian communication

mtagslag = 2400

! Collection of tidal array

mtagtide = 2600

! Radiation initialisation (suecrad)

mtagrad = 2800

! Exchange of partitioning info for global view

mtagpart  = 3600

! Transpositions of spectral coefficients between m and n distribution

mtagmn =  3800
mtagnm =  4000

! Gathering of global spectral data in cain.F

mtagcain = 4200

! Gathering of spectral cost function data in evcost.F

mtagcost = 4400

! Gathering of cost function diagnostics

mtaggsum = 4600

! Communication of forecast error information in suinfce.F

mtagfce   = 5000

! Communication of global surface field in sumdfce.F

mtagbdy   = 5200

! Communication required for grid point norm calculation

mtaggpnorm = 5400

! Broadcasting of Pressure to Bset processor in spectral space

mtagbrpr = 5600

! Communication of ozon data

mtagozon = 5800

! Communication of nsec1 in Lanczos part

mtaglcz = 6000

! Communication of gom diagnostic arrays

mtaggom = 6200

! Communication of nmi frequencies

mtagfreq = 6400

! Communication of Jb eigenvectors

mtageigmd = 6600

! Communication of vertical mode energy gathering

mtagke = 6800

! Distribution of real spectral data

mtagdistsp = 10000

! Distribution of real grid point data

mtagdistgp = 11000
mtagdistgp_dep = 12000

! Building up of global observation tables (in MKGLOBSTAB)

mtagglobsi = 22001
mtagglobsr = 22002

! Passing of observation equivalents (MPOBSEQ,MPOBEQAD)

mtagobseq = 23000
mtagobseqad = 23001

! Communication of DDH restart data

mtagddhres = 24000

! Signal flag communication to all processors 

mtagsig   = 26000

!  Communication within DDH package

mtagddh1 = 27000
mtagddh2 = 28000
mtagddh3 = 29000
mtagddh4 = 30000

!  Communication in var/readvec

mtagreadvec = 31000

!  Distributed vectors

mt_distributed_vector = 32000

!  Communication for Fourier coefficients of transmission coefficients.

MTAGDISTFO=32300

!     ------------------------------------------------------------------
IF (LHOOK) CALL DR_HOOK('SUTAG',1,ZHOOK_HANDLE)
end subroutine sutag
