source: LMDZ5/branches/LMDZ5_SPLA/libf/phylmd/rrtm/srtm_taumol29.F90

Last change on this file 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: 4.3 KB
Line 
1SUBROUTINE SRTM_TAUMOL29 &
2 & ( KLEV,&
3 & P_FAC00   , P_FAC01  , P_FAC10   , P_FAC11,&
4 & K_JP      , K_JT     , K_JT1     , P_ONEMINUS,&
5 & P_COLH2O  , P_COLCO2 , P_COLMOL,&
6 & K_LAYTROP , P_SELFFAC, P_SELFFRAC, K_INDSELF  , P_FORFAC, P_FORFRAC, K_INDFOR,&
7 & P_SFLUXZEN, P_TAUG   , P_TAUR    &
8 & ) 
9
10!     Written by Eli J. Mlawer, Atmospheric & Environmental Research.
11
12!     BAND 29:  820-2600 cm-1 (low - H2O; high - CO2)
13
14! Modifications
15!        M.Hamrud      01-Oct-2003 CY28 Cleaning
16
17!     JJMorcrette 2002-10-03 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, NG29
25USE YOESRTA29, ONLY : ABSA, ABSB, FORREFC, SELFREFC &
26 & , SFLUXREFC, ABSH2OC, ABSCO2C, RAYL &
27 & , LAYREFFR 
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_COLH2O(JPLAY)
43REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLCO2(JPLAY)
44REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLMOL(JPLAY)
45INTEGER(KIND=JPIM),INTENT(IN)    :: K_LAYTROP
46REAL(KIND=JPRB)   ,INTENT(IN)    :: P_SELFFAC(JPLAY)
47REAL(KIND=JPRB)   ,INTENT(IN)    :: P_SELFFRAC(JPLAY)
48INTEGER(KIND=JPIM),INTENT(IN)    :: K_INDSELF(JPLAY)
49REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FORFAC(JPLAY)
50REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FORFRAC(JPLAY)
51INTEGER(KIND=JPIM),INTENT(IN)    :: K_INDFOR(JPLAY)
52 
53REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_SFLUXZEN(JPG)
54REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_TAUG(JPLAY,JPG)
55REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_TAUR(JPLAY,JPG)
56!- from INTFAC     
57!- from INTIND
58!- from PRECISE             
59!- from PROFDATA             
60!- from SELF             
61!-- from FOREIGN
62INTEGER(KIND=JPIM) :: IG, IND0, IND1, INDS, INDF, I_LAY, I_LAYSOLFR, I_NLAYERS
63
64REAL(KIND=JPRB) ::  &
65 & Z_TAURAY 
66REAL(KIND=JPRB) :: ZHOOK_HANDLE
67
68IF (LHOOK) CALL DR_HOOK('SRTM_TAUMOL29',0,ZHOOK_HANDLE)
69I_NLAYERS = KLEV
70
71! Compute the optical depth by interpolating in ln(pressure),
72! temperature, and appropriate species.  Below LAYTROP, the water
73! vapor self-continuum is interpolated (in temperature) separately. 
74
75DO I_LAY = 1, K_LAYTROP
76  IND0 = ((K_JP(I_LAY)-1)*5+(K_JT(I_LAY)-1))*NSPA(29) + 1
77  IND1 = (K_JP(I_LAY)*5+(K_JT1(I_LAY)-1))*NSPA(29) + 1
78  INDS = K_INDSELF(I_LAY)
79  INDF = K_INDFOR(I_LAY)
80  Z_TAURAY = P_COLMOL(I_LAY) * RAYL
81
82!  DO IG = 1, NG(29)
83  DO IG = 1, NG29
84    P_TAUG(I_LAY,IG) = P_COLH2O(I_LAY) * &
85     & ((P_FAC00(I_LAY) * ABSA(IND0,IG) + &
86     & P_FAC10(I_LAY) * ABSA(IND0+1,IG) + &
87     & P_FAC01(I_LAY) * ABSA(IND1,IG) + &
88     & P_FAC11(I_LAY) * ABSA(IND1+1,IG)) + &
89     & P_SELFFAC(I_LAY) * (SELFREFC(INDS,IG) + &
90     & P_SELFFRAC(I_LAY) * &
91     & (SELFREFC(INDS+1,IG) - SELFREFC(INDS,IG))) + &
92     & P_FORFAC(I_LAY) * (FORREFC(INDF,IG) +  &
93     & P_FORFRAC(I_LAY) * &
94     & (FORREFC(INDF+1,IG) - FORREFC(INDF,IG)))) &
95     & + P_COLCO2(I_LAY) * ABSCO2C(IG)   
96!     &           + TAURAY &
97!    SSA(LAY,IG) = TAURAY/TAUG(LAY,IG)
98    P_TAUR(I_LAY,IG) = Z_TAURAY
99  ENDDO
100ENDDO
101
102I_LAYSOLFR = I_NLAYERS
103DO I_LAY = K_LAYTROP+1, I_NLAYERS
104  IF (K_JP(I_LAY-1) < LAYREFFR .AND. K_JP(I_LAY) >= LAYREFFR) &
105   & I_LAYSOLFR = I_LAY 
106  IND0 = ((K_JP(I_LAY)-13)*5+(K_JT(I_LAY)-1))*NSPB(29) + 1
107  IND1 = ((K_JP(I_LAY)-12)*5+(K_JT1(I_LAY)-1))*NSPB(29) + 1
108  Z_TAURAY = P_COLMOL(I_LAY) * RAYL
109
110!  DO IG = 1, NG(29)
111  DO IG = 1 , NG29
112    P_TAUG(I_LAY,IG) = P_COLCO2(I_LAY) * &
113     & (P_FAC00(I_LAY) * ABSB(IND0,IG) + &
114     & P_FAC10(I_LAY) * ABSB(IND0+1,IG) + &
115     & P_FAC01(I_LAY) * ABSB(IND1,IG) + &
116     & P_FAC11(I_LAY) * ABSB(IND1+1,IG))   &
117     & + P_COLH2O(I_LAY) * ABSH2OC(IG)   
118!     &           + TAURAY
119!    SSA(LAY,IG) = TAURAY/TAUG(LAY,IG)
120    IF (I_LAY == I_LAYSOLFR) P_SFLUXZEN(IG) = SFLUXREFC(IG)
121    P_TAUR(I_LAY,IG) = Z_TAURAY
122  ENDDO
123ENDDO
124
125!-----------------------------------------------------------------------
126IF (LHOOK) CALL DR_HOOK('SRTM_TAUMOL29',1,ZHOOK_HANDLE)
127END SUBROUTINE SRTM_TAUMOL29
128
Note: See TracBrowser for help on using the repository browser.