source: LMDZ6/branches/contrails/libf/phylmd/rrtm/surhcri.F90 @ 5428

Last change on this file since 5428 was 1990, checked in by Laurent Fairhead, 11 years ago

Corrections à la version r1989 pour permettre la compilation avec RRTM
Inclusion de la licence CeCILL_V2 pour RRTM


Changes to revision r1989 to enable RRTM code compilation
RRTM part put under CeCILL_V2 licence

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
File size: 2.8 KB
Line 
1!-----------------------------------------------------------------------
2      SUBROUTINE SURHCRI(KULOUT)
3!-----------------------------------------------------------------------
4!
5!**** *SURHCRI * - COMPUTATION OF THE CRTITICAL RELATIVE HUMIDITY
6!                  PROFILE FOR SMITH'S CONDENSATION SCHEME.
7!
8!**   Interface.
9!     ----------
10!        *CALL* *SURHCRI*
11!
12!-----------------------------------------------------------------------
13!
14! -   ARGUMENTS D'ENTREE./INPUT ARGUMENTS.
15!     ------------------------------------
16!
17!-----------------------------------------------------------------------
18!
19! -   ARGUMENTS IMPLICITES.
20!     ---------------------
21!
22! COMMON /YOMPHY/
23! COMMON /YOMPHY0/
24!
25!*
26!-----------------------------------------------------------------------
27!
28!     Auteur.
29!     -------
30!         05-03, Luc Gerard (from Ph. Lopez acrhcri)
31!
32!     Modifications.
33!     --------------
34!         06-10, nettoyage - R. Brozkova
35!-----------------------------------------------------------------------
36!
37USE PARKIND1  ,ONLY : JPIM     ,JPRB
38USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
39!
40USE YOMPHY0   , ONLY : RHCRIT1, RHCRIT2, RETAMIN, GRHCMOD, RHCRI ,NRHCRI
41USE YOMDIM    , ONLY : NFLEVG
42USE YOMGC     , ONLY : GAW, GM
43USE YOMGEM    , ONLY : VP00, TEQH
44USE YOMPHY    , ONLY : LGWRHCRI
45USE YOMSTA    , ONLY : STPRE
46 
47IMPLICIT NONE
48 
49INTEGER (KIND=JPIM),INTENT(IN) :: KULOUT
50 
51! LOCAL
52 
53REAL(KIND=JPRB) :: ZVETAF
54REAL(KIND=JPRB) :: ZGAW0,ZEGAW,ZFACT,ZFACT0,ZFACTA,ZFACTB,ZFACTC, &
55        & ZA,ZB,ZC
56INTEGER (KIND=JPIM) :: JLEV
57REAL(KIND=JPRB) :: ZHOOK_HANDLE
58IF (LHOOK) CALL DR_HOOK('SURHCRI',0,ZHOOK_HANDLE)
59 
60!     ------------------------------------------------------------------
61 
62IF(NRHCRI == NFLEVG) THEN
63 
64!     ------------------------------------------------------------------
65 
66! CRITICAL RELATIVE HUMIDITY PROFILE
67! DEPENDENT ON THE LOCAL RESOLUTION.
68! ----------------------------------
69 
70   ZFACT0=(RETAMIN*(RETAMIN-1._JPRB))**2
71   ZFACTA=(2._JPRB*RETAMIN-1._JPRB)
72   ZFACTB=(1._JPRB-3._JPRB*RETAMIN**2)
73   ZFACTC=(3._JPRB*RETAMIN-2._JPRB)*RETAMIN
74   IF (LGWRHCRI) THEN
75     ZGAW0=2.42E-05_JPRB
76     ZEGAW=(1.0_JPRB-EXP(-GAW(1)/ZGAW0))/ZFACT0
77   ELSE
78     ZEGAW=(1.0_JPRB-GRHCMOD*EXP(-1.0_JPRB/(TEQH*GM(1))))/ZFACT0
79   ENDIF
80 
81   ZFACT=(RHCRIT2-RHCRIT1)*ZEGAW
82   ZA=ZFACTA*ZFACT
83   ZB=ZFACTB*ZFACT
84   ZC=ZFACTC*ZFACT
85 
86   DO JLEV=1,NFLEVG
87     ZVETAF=STPRE (JLEV)/VP00
88     RHCRI(JLEV) = ZA * ZVETAF**3 &
89                     & + ZB * ZVETAF**2 &
90                     & + ZC * ZVETAF &
91                     & + RHCRIT2
92   ENDDO   
93 
94   WRITE(KULOUT,'(A)') 'RHCRI: SMITH SCHEME CRITICAL RH PROFILE:'
95   WRITE(KULOUT,'((10(G9.3)))') (RHCRI(JLEV),JLEV=1,NFLEVG)
96ELSE
97   WRITE(KULOUT,*) 'NRHCRI=',NRHCRI,': GLOBAL MODEL, NO RHCRI INITIALISATION IN SETUP'
98ENDIF
99IF (LHOOK) CALL DR_HOOK('SURHCRI',1,ZHOOK_HANDLE)
100END SUBROUTINE SURHCRI
Note: See TracBrowser for help on using the repository browser.