SUBROUTINE SULEVLAY

!**** SUBROUTINE SULEVLAY - SETUP LEVEL/LAYER PARAMETERS/ARRAYS

!        D. VASILJEVIC    ECMWF   06/09/1994

!**   PURPOSE
!     -------

!        SETUP LEVEL/LAYER STRUCTURES

!**   INTERFACE
!     ---------

!        CALL SULEVLAY

!        SULEVLAY IS CALLED BY MAKECMA

!**   METHOD
!     ------

!        NECESSARY PARAMETERS/ARRAYS ARE DEFINED.

!**   EXTERNALS
!     ---------

!**   MODIFICTIONS
!     ------------

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

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

USE YOMLVLY  , ONLY : LOBTHLAY ,LOBPWLAY ,NMXSTLV  ,NOTHLAY  ,&
 & NOPWLAY  ,STPRELV  ,STPRELVL ,TTHLAY   ,BTHLAY   ,&
 & TPWLAY   ,BPWLAY   ,NMXLAYER  
USE YOMCOSJO , ONLY : NBDLAYER, NTROPOP
USE YOMLUN   , ONLY : NULOUT


IMPLICIT NONE

INTEGER(KIND=JPIM) :: JLN
REAL(KIND=JPRB) :: ZHOOK_HANDLE

!*
!        0.       BASIC PARAMETERS
!                 ----------------

IF (LHOOK) CALL DR_HOOK('SULEVLAY',0,ZHOOK_HANDLE)
NMXSTLV  = 15
NMXLAYER = 14
!*
!        1.       STANDARD PRESSURE LEVELS AND THEIR LNS.
!                 ---------------------------------------

!*          1.1   STANDARD PRESSURE LEVELS IN Pa

STPRELV( 1) = 100000._JPRB
STPRELV( 2) =  85000._JPRB
STPRELV( 3) =  70000._JPRB
STPRELV( 4) =  50000._JPRB
STPRELV( 5) =  40000._JPRB
STPRELV( 6) =  30000._JPRB
STPRELV( 7) =  25000._JPRB
STPRELV( 8) =  20000._JPRB
STPRELV( 9) =  15000._JPRB
STPRELV(10) =  10000._JPRB
STPRELV(11) =   7000._JPRB
STPRELV(12) =   5000._JPRB
STPRELV(13) =   3000._JPRB
STPRELV(14) =   2000._JPRB
STPRELV(15) =   1000._JPRB

! Values to define the different layers used for the Huber Varqc, see defrun 1.8.14
NBDLAYER = 1
NTROPOP  = 9

!*          1.2   LN OF STANDARD PRESSURE LEVELS

DO JLN = 1 , NMXSTLV
  STPRELVL(JLN) = LOG(STPRELV(JLN))
ENDDO
!*
!-----------------------------------------------------------------------

!        2.       LAYERS
!                 ------

!*          2.0   OBSERVED/PREDEFINED LAYERS SWITCH

LOBTHLAY = .TRUE.
LOBPWLAY = .TRUE.

!*          2.1   NO. OF LAYERS

!IF(.NOT.LFEEDBAC)   THEN
NOTHLAY  = 15
!ENDIF
NOPWLAY  =  3

!*          2.2   STANDARD PRESSURE LAYERS

!*          2.2.1 THICKNESS

BTHLAY( 1) = 100000._JPRB
TTHLAY( 1) =  85000._JPRB

BTHLAY( 2) =  85000._JPRB
TTHLAY( 2) =  70000._JPRB

BTHLAY( 3) =  70000._JPRB
TTHLAY( 3) =  50000._JPRB

BTHLAY( 4) =  50000._JPRB
TTHLAY( 4) =  40000._JPRB

BTHLAY( 5) =  40000._JPRB
TTHLAY( 5) =  30000._JPRB

BTHLAY( 6) =  30000._JPRB
TTHLAY( 6) =  25000._JPRB

BTHLAY( 7) =  25000._JPRB
TTHLAY( 7) =  20000._JPRB

BTHLAY( 8) =  20000._JPRB
TTHLAY( 8) =  15000._JPRB

BTHLAY( 9) =  15000._JPRB
TTHLAY( 9) =  10000._JPRB

BTHLAY(10) =  10000._JPRB
TTHLAY(10) =   7000._JPRB

BTHLAY(11) =   7000._JPRB
TTHLAY(11) =   5000._JPRB

BTHLAY(12) =   5000._JPRB
TTHLAY(12) =   3000._JPRB

BTHLAY(13) =   3000._JPRB
TTHLAY(13) =   2000._JPRB

BTHLAY(14) =   2000._JPRB
TTHLAY(14) =   1000._JPRB

!*          2.2.2 PWC

BPWLAY( 1) = 100000._JPRB
TPWLAY( 1) =  85000._JPRB

BPWLAY( 2) =  85000._JPRB
TPWLAY( 2) =  70000._JPRB

BPWLAY( 3) =  70000._JPRB
TPWLAY( 3) =  50000._JPRB

BPWLAY( 4) =  50000._JPRB
TPWLAY( 4) =  40000._JPRB

BPWLAY( 5) =  40000._JPRB
TPWLAY( 5) =  30000._JPRB

BPWLAY( 6) =  30000._JPRB
TPWLAY( 6) =  25000._JPRB

BPWLAY( 7) =  25000._JPRB
TPWLAY( 7) =  20000._JPRB

BPWLAY( 8) =  20000._JPRB
TPWLAY( 8) =  15000._JPRB

BPWLAY( 9) =  15000._JPRB
TPWLAY( 9) =  10000._JPRB

BPWLAY(10) =  10000._JPRB
TPWLAY(10) =   7000._JPRB

BPWLAY(11) =   7000._JPRB
TPWLAY(11) =   5000._JPRB

BPWLAY(12) =   5000._JPRB
TPWLAY(12) =   3000._JPRB

BPWLAY(13) =   3000._JPRB
TPWLAY(13) =   2000._JPRB

BPWLAY(14) =   2000._JPRB
TPWLAY(14) =   1000._JPRB
!*
!-----------------------------------------------------------------------

!        3.       OVERWRITE SOME VALUES
!                 ---------------------

!IF(.NOT.LFEEDBAC)   THEN
!  CALL READNL('NAMLVLY')
!ENDIF
!*
!-----------------------------------------------------------------------

!        4.       SETUP DONE
!                 ----------

WRITE(NULOUT,'(''0LEVEL/LAYER STRUCTURE SETUP'')')
!*
!-----------------------------------------------------------------------

!        5.       RETURN
!                 ------

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