source: LMDZ5/trunk/libf/phylmd/rrtm/srtm_taumol27.F90 @ 4122

Last change on this file since 4122 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: 3.5 KB
Line 
1SUBROUTINE SRTM_TAUMOL27 &
2 & ( KLEV,&
3 & P_FAC00   , P_FAC01  , P_FAC10   , P_FAC11,&
4 & K_JP      , K_JT     , K_JT1     , P_ONEMINUS,&
5 & P_COLMOL  , P_COLO3,&
6 & K_LAYTROP,&
7 & P_SFLUXZEN, P_TAUG   , P_TAUR    &
8 & ) 
9
10!     Written by Eli J. Mlawer, Atmospheric & Environmental Research.
11
12!     BAND 27:  29000-38000 cm-1 (low - O3; high - O3)
13
14! Modifications
15!        M.Hamrud      01-Oct-2003 CY28 Cleaning
16
17!     JJMorcrette 2003-02-24 adapted to ECMWF environment
18
19!      PARAMETER (MG=16, MXLAY=203, NBANDS=14)
20
21USE PARKIND1  ,ONLY : JPIM     ,JPRB
22USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
23
24USE PARSRTM  , ONLY : JPLAY, JPG, NG27
25USE YOESRTA27, ONLY : ABSA, ABSB &
26 & , SFLUXREFC, RAYLC &
27 & , LAYREFFR, SCALEKUR 
28USE YOESRTWN , ONLY : NSPA, NSPB
29
30IMPLICIT NONE
31
32!-- Output
33INTEGER(KIND=JPIM),INTENT(IN)    :: KLEV
34REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC00(JPLAY)
35REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC01(JPLAY)
36REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC10(JPLAY)
37REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC11(JPLAY)
38INTEGER(KIND=JPIM),INTENT(IN)    :: K_JP(JPLAY)
39INTEGER(KIND=JPIM),INTENT(IN)    :: K_JT(JPLAY)
40INTEGER(KIND=JPIM),INTENT(IN)    :: K_JT1(JPLAY)
41REAL(KIND=JPRB)                  :: P_ONEMINUS ! Argument NOT used
42REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLMOL(JPLAY)
43REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLO3(JPLAY)
44INTEGER(KIND=JPIM),INTENT(IN)    :: K_LAYTROP
45
46REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_SFLUXZEN(JPG)
47REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_TAUG(JPLAY,JPG)
48REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_TAUR(JPLAY,JPG)
49!- from INTFAC     
50!- from INTIND
51!- from PRECISE             
52!- from PROFDATA             
53!- from SELF             
54INTEGER(KIND=JPIM) :: IG, IND0, IND1, I_LAY, I_LAYSOLFR, I_NLAYERS
55
56REAL(KIND=JPRB) ::  &
57 & Z_TAURAY 
58REAL(KIND=JPRB) :: ZHOOK_HANDLE
59
60IF (LHOOK) CALL DR_HOOK('SRTM_TAUMOL27',0,ZHOOK_HANDLE)
61I_NLAYERS = KLEV
62
63!     Compute the optical depth by interpolating in ln(pressure),
64!     temperature, and appropriate species.  Below LAYTROP, the water
65!     vapor self-continuum is interpolated (in temperature) separately. 
66DO I_LAY = 1, K_LAYTROP
67  IND0 = ((K_JP(I_LAY)-1)*5+(K_JT(I_LAY)-1))*NSPA(27) + 1
68  IND1 = (K_JP(I_LAY)*5+(K_JT1(I_LAY)-1))*NSPA(27) + 1
69
70!  DO IG = 1, NG(27)
71  DO IG = 1 , NG27
72    Z_TAURAY = P_COLMOL(I_LAY) * RAYLC(IG)
73    P_TAUG(I_LAY,IG) = P_COLO3(I_LAY) * &
74     & (P_FAC00(I_LAY) * ABSA(IND0,IG) + &
75     & P_FAC10(I_LAY) * ABSA(IND0+1,IG) + &
76     & P_FAC01(I_LAY) * ABSA(IND1,IG) + &
77     & P_FAC11(I_LAY) * ABSA(IND1+1,IG)) 
78!     &          + TAURAY
79!    SSA(LAY,IG) = TAURAY/TAUG(LAY,IG)
80    P_TAUR(I_LAY,IG) = Z_TAURAY
81  ENDDO
82ENDDO
83
84I_LAYSOLFR = I_NLAYERS
85
86DO I_LAY = K_LAYTROP+1, I_NLAYERS
87  IF (K_JP(I_LAY-1) < LAYREFFR .AND. K_JP(I_LAY) >= LAYREFFR) &
88   & I_LAYSOLFR = I_LAY 
89  IND0 = ((K_JP(I_LAY)-13)*5+(K_JT(I_LAY)-1))*NSPB(27) + 1
90  IND1 = ((K_JP(I_LAY)-12)*5+(K_JT1(I_LAY)-1))*NSPB(27) + 1
91
92!  DO IG = 1, NG(27)
93  DO IG = 1 , NG27
94    Z_TAURAY = P_COLMOL(I_LAY) * RAYLC(IG)
95    P_TAUG(I_LAY,IG) = P_COLO3(I_LAY) * &
96     & (P_FAC00(I_LAY) * ABSB(IND0,IG) + &
97     & P_FAC10(I_LAY) * ABSB(IND0+1,IG) + &
98     & P_FAC01(I_LAY) * ABSB(IND1,IG) +  &
99     & P_FAC11(I_LAY) * ABSB(IND1+1,IG)) 
100!     &          + TAURAY
101!    SSA(LAY,IG) = TAURAY/TAUG(LAY,IG)
102    IF (I_LAY == I_LAYSOLFR) P_SFLUXZEN(IG) = SCALEKUR * SFLUXREFC(IG)
103    P_TAUR(I_LAY,IG) = Z_TAURAY
104  ENDDO
105ENDDO
106
107!-----------------------------------------------------------------------
108IF (LHOOK) CALL DR_HOOK('SRTM_TAUMOL27',1,ZHOOK_HANDLE)
109END SUBROUTINE SRTM_TAUMOL27
110
Note: See TracBrowser for help on using the repository browser.