source: LMDZ5/trunk/libf/phylmd/rrtm/rrtm_taumol6.F90 @ 5421

Last change on this file since 5421 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 
1!----------------------------------------------------------------------------
2SUBROUTINE RRTM_TAUMOL6 (KLEV,P_TAU,P_WX,&
3 & P_TAUAERL,P_FAC00,P_FAC01,P_FAC10,P_FAC11,K_JP,K_JT,K_JT1,&
4 & P_COLH2O,P_CO2MULT,K_LAYTROP,P_SELFFAC,P_SELFFRAC,K_INDSELF,PFRAC) 
5
6!     BAND 6:  820-980 cm-1 (low - H2O; high - nothing)
7
8! Modifications
9!        M.Hamrud      01-Oct-2003 CY28 Cleaning
10
11!     D Salmond   2000-05-15 speed-up
12!     JJMorcrette 2000-05-17 speed-up
13
14USE PARKIND1  ,ONLY : JPIM     ,JPRB
15USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
16
17USE PARRRTM  , ONLY : JPLAY  ,JPBAND ,JPGPT  ,JPXSEC ,NG6   ,NGS5
18USE YOERRTWN , ONLY :      NSPA   
19USE YOERRTA6 , ONLY : ABSA   ,ABSCO2 ,CFC11ADJ , CFC12  ,&
20 & FRACREFA,SELFREF 
21
22!  Input
23!#include "yoeratm.h"
24
25!      REAL TAUAER(JPLAY)
26
27IMPLICIT NONE
28
29INTEGER(KIND=JPIM),INTENT(IN)    :: KLEV
30REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_TAU(JPGPT,JPLAY)
31REAL(KIND=JPRB)   ,INTENT(IN)    :: P_WX(JPXSEC,JPLAY) ! Amount of trace gases
32REAL(KIND=JPRB)   ,INTENT(IN)    :: P_TAUAERL(JPLAY,JPBAND)
33REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC00(JPLAY)
34REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC01(JPLAY)
35REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC10(JPLAY)
36REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC11(JPLAY)
37INTEGER(KIND=JPIM),INTENT(IN)    :: K_JP(JPLAY)
38INTEGER(KIND=JPIM),INTENT(IN)    :: K_JT(JPLAY)
39INTEGER(KIND=JPIM),INTENT(IN)    :: K_JT1(JPLAY)
40REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLH2O(JPLAY)
41REAL(KIND=JPRB)   ,INTENT(IN)    :: P_CO2MULT(JPLAY)
42INTEGER(KIND=JPIM),INTENT(IN)    :: K_LAYTROP
43REAL(KIND=JPRB)   ,INTENT(IN)    :: P_SELFFAC(JPLAY)
44REAL(KIND=JPRB)   ,INTENT(IN)    :: P_SELFFRAC(JPLAY)
45INTEGER(KIND=JPIM),INTENT(IN)    :: K_INDSELF(JPLAY)
46REAL(KIND=JPRB)   ,INTENT(OUT)   :: PFRAC(JPGPT,JPLAY)
47!  Output
48!- from AER
49!- from INTFAC     
50!- from INTIND
51!- from PROFDATA             
52!- from SELF             
53!- from SP             
54INTEGER(KIND=JPIM) :: IND0(JPLAY),IND1(JPLAY),INDS(JPLAY)
55
56INTEGER(KIND=JPIM) :: IG, I_LAY
57REAL(KIND=JPRB) :: ZHOOK_HANDLE
58
59!      EQUIVALENCE (TAUAERL(1,6),TAUAER)
60
61!     Compute the optical depth by interpolating in ln(pressure) and
62!     temperature. The water vapor self-continuum is interpolated
63!     (in temperature) separately. 
64
65IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL6',0,ZHOOK_HANDLE)
66DO I_LAY = 1, K_LAYTROP
67  IND0(I_LAY) = ((K_JP(I_LAY)-1)*5+(K_JT(I_LAY)-1))*NSPA(6) + 1
68  IND1(I_LAY) = (K_JP(I_LAY)*5+(K_JT1(I_LAY)-1))*NSPA(6) + 1
69  INDS(I_LAY) = K_INDSELF(I_LAY)
70ENDDO
71
72!-- DS_000515 
73DO IG = 1, NG6
74  DO I_LAY = 1, K_LAYTROP
75!-- DS_000515 
76    P_TAU (NGS5+IG,I_LAY) = P_COLH2O(I_LAY) *&
77     & (P_FAC00(I_LAY) * ABSA(IND0(I_LAY)  ,IG) +&
78     & P_FAC10(I_LAY) * ABSA(IND0(I_LAY)+1,IG) +&
79     & P_FAC01(I_LAY) * ABSA(IND1(I_LAY)  ,IG) +&
80     & P_FAC11(I_LAY) * ABSA(IND1(I_LAY)+1,IG) +&
81     & P_SELFFAC(I_LAY) * (SELFREF(INDS(I_LAY),IG) + &
82     & P_SELFFRAC(I_LAY)*&
83     & (SELFREF(INDS(I_LAY)+1,IG)-SELFREF(INDS(I_LAY),IG))))&
84     & + P_WX(2,I_LAY) * CFC11ADJ(IG)&
85     & + P_WX(3,I_LAY) * CFC12(IG)&
86     & + P_CO2MULT(I_LAY) * ABSCO2(IG)&
87     & + P_TAUAERL(I_LAY,6) 
88    PFRAC(NGS5+IG,I_LAY) = FRACREFA(IG)
89  ENDDO
90ENDDO
91
92!     Nothing important goes on above LAYTROP in this band.
93!-- JJM_000517
94DO IG = 1, NG6
95  DO I_LAY = K_LAYTROP+1, KLEV
96!-- JJM_000517
97    P_TAU (NGS5+IG,I_LAY) = 0.0_JPRB &
98     & + P_WX(2,I_LAY) * CFC11ADJ(IG)&
99     & + P_WX(3,I_LAY) * CFC12(IG)&
100     & + P_TAUAERL(I_LAY,6) 
101    PFRAC(NGS5+IG,I_LAY) = FRACREFA(IG)
102  ENDDO
103ENDDO
104
105IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL6',1,ZHOOK_HANDLE)
106END SUBROUTINE RRTM_TAUMOL6
Note: See TracBrowser for help on using the repository browser.