source: LMDZ6/trunk/libf/phylmd/rrtm/rrtm_taumol8.F90 @ 5018

Last change on this file since 5018 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.9 KB
Line 
1!*******************************************************************************
2SUBROUTINE RRTM_TAUMOL8 (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_COLO3,P_COLN2O,P_CO2MULT,K_LAYSWTCH,P_SELFFAC,P_SELFFRAC,K_INDSELF,PFRAC) 
5
6!     BAND 8:  1080-1180 cm-1 (low (i.e.>~300mb) - H2O; high - O3)
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 ,NG8   ,NGS7
18USE YOERRTWN , ONLY :      NSPA   ,NSPB
19USE YOERRTA8 , ONLY : ABSA   ,ABSB   ,FRACREFA, FRACREFB,SELFREF,ABSCO2A , ABSCO2B ,&
20 & ABSN2OA , ABSN2OB,CFC12  ,CFC22ADJ, H2OREF  ,&
21 & N2OREF  , O3REF 
22
23!  Input
24!#include "yoeratm.h"
25
26IMPLICIT NONE
27
28INTEGER(KIND=JPIM),INTENT(IN)    :: KLEV
29REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_TAU(JPGPT,JPLAY)
30REAL(KIND=JPRB)   ,INTENT(IN)    :: P_WX(JPXSEC,JPLAY) ! Amount of trace gases
31REAL(KIND=JPRB)   ,INTENT(IN)    :: P_TAUAERL(JPLAY,JPBAND)
32REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC00(JPLAY)
33REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC01(JPLAY)
34REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC10(JPLAY)
35REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC11(JPLAY)
36INTEGER(KIND=JPIM),INTENT(IN)    :: K_JP(JPLAY)
37INTEGER(KIND=JPIM),INTENT(IN)    :: K_JT(JPLAY)
38INTEGER(KIND=JPIM),INTENT(IN)    :: K_JT1(JPLAY)
39REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLH2O(JPLAY)
40REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLO3(JPLAY)
41REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLN2O(JPLAY)
42REAL(KIND=JPRB)   ,INTENT(IN)    :: P_CO2MULT(JPLAY)
43INTEGER(KIND=JPIM),INTENT(IN)    :: K_LAYSWTCH
44REAL(KIND=JPRB)   ,INTENT(IN)    :: P_SELFFAC(JPLAY)
45REAL(KIND=JPRB)   ,INTENT(IN)    :: P_SELFFRAC(JPLAY)
46INTEGER(KIND=JPIM),INTENT(IN)    :: K_INDSELF(JPLAY)
47REAL(KIND=JPRB)   ,INTENT(OUT)   :: PFRAC(JPGPT,JPLAY)
48!  Output
49!- from AER
50!- from INTFAC     
51!- from INTIND
52!- from PROFDATA             
53!- from SELF             
54!- from SP             
55INTEGER(KIND=JPIM) :: IND0(JPLAY),IND1(JPLAY),INDS(JPLAY)
56
57!      REAL TAUAER(JPLAY)
58REAL(KIND=JPRB) :: Z_N2OMULT(JPLAY)
59
60INTEGER(KIND=JPIM) :: IG, I_LAY
61
62REAL(KIND=JPRB) :: Z_COLREF1, Z_COLREF2, Z_CURRN2O, Z_FP, Z_RATIO, Z_WCOMB1, Z_WCOMB2
63REAL(KIND=JPRB) :: ZHOOK_HANDLE
64
65!      EQUIVALENCE (TAUAERL(1,8),TAUAER)
66
67!     Compute the optical depth by interpolating in ln(pressure) and
68!     temperature. 
69
70IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL8',0,ZHOOK_HANDLE)
71DO I_LAY = 1, K_LAYSWTCH
72  Z_FP = P_FAC01(I_LAY) + P_FAC11(I_LAY)
73  IND0(I_LAY) = ((K_JP(I_LAY)-1)*5+(K_JT(I_LAY)-1))*NSPA(8) + 1
74  IND1(I_LAY) = (K_JP(I_LAY)*5+(K_JT1(I_LAY)-1))*NSPA(8) + 1
75  INDS(I_LAY) = K_INDSELF(I_LAY)
76  Z_COLREF1 = N2OREF(K_JP(I_LAY))
77  Z_COLREF2 = N2OREF(K_JP(I_LAY)+1)
78  Z_WCOMB1 = 1.0_JPRB/H2OREF(K_JP(I_LAY))
79  Z_WCOMB2 = 1.0_JPRB/H2OREF(K_JP(I_LAY)+1)
80  Z_RATIO = (Z_COLREF1*Z_WCOMB1)+Z_FP*((Z_COLREF2*Z_WCOMB2)-(Z_COLREF1*Z_WCOMB1))
81  Z_CURRN2O = P_COLH2O(I_LAY) * Z_RATIO
82  Z_N2OMULT(I_LAY) = P_COLN2O(I_LAY) - Z_CURRN2O
83ENDDO
84
85!-- DS_000515
86DO IG = 1, NG8
87  DO I_LAY = 1, K_LAYSWTCH
88!-- DS_000515
89    P_TAU (NGS7+IG,I_LAY) = P_COLH2O(I_LAY) *&
90     & (P_FAC00(I_LAY) * ABSA(IND0(I_LAY)  ,IG) +&
91     & P_FAC10(I_LAY) * ABSA(IND0(I_LAY)+1,IG) +&
92     & P_FAC01(I_LAY) * ABSA(IND1(I_LAY)  ,IG) +&
93     & P_FAC11(I_LAY) * ABSA(IND1(I_LAY)+1,IG) +&
94     & P_SELFFAC(I_LAY) * (SELFREF(INDS(I_LAY),IG) + &
95     & P_SELFFRAC(I_LAY) *&
96     & (SELFREF(INDS(I_LAY)+1,IG) - SELFREF(INDS(I_LAY),IG))))&
97     & + P_WX(3,I_LAY) * CFC12(IG)&
98     & + P_WX(4,I_LAY) * CFC22ADJ(IG)&
99     & + P_CO2MULT(I_LAY) * ABSCO2A(IG)&
100     & + Z_N2OMULT(I_LAY) * ABSN2OA(IG)&
101     & + P_TAUAERL(I_LAY,8) 
102    PFRAC(NGS7+IG,I_LAY) = FRACREFA(IG)
103  ENDDO
104ENDDO
105
106DO I_LAY = K_LAYSWTCH+1, KLEV
107  Z_FP = P_FAC01(I_LAY) + P_FAC11(I_LAY)
108  IND0(I_LAY) = ((K_JP(I_LAY)-7)*5+(K_JT(I_LAY)-1))*NSPB(8) + 1
109  IND1(I_LAY) = ((K_JP(I_LAY)-6)*5+(K_JT1(I_LAY)-1))*NSPB(8) + 1
110  Z_COLREF1 = N2OREF(K_JP(I_LAY))
111  Z_COLREF2 = N2OREF(K_JP(I_LAY)+1)
112  Z_WCOMB1 = 1.0_JPRB/O3REF(K_JP(I_LAY))
113  Z_WCOMB2 = 1.0_JPRB/O3REF(K_JP(I_LAY)+1)
114  Z_RATIO = (Z_COLREF1*Z_WCOMB1)+Z_FP*((Z_COLREF2*Z_WCOMB2)-(Z_COLREF1*Z_WCOMB1))
115  Z_CURRN2O = P_COLO3(I_LAY) * Z_RATIO
116  Z_N2OMULT(I_LAY) = P_COLN2O(I_LAY) - Z_CURRN2O
117ENDDO
118
119!-- JJM_000517
120DO IG = 1, NG8
121  DO I_LAY = K_LAYSWTCH+1, KLEV
122!-- JJM_000517
123    P_TAU (NGS7+IG,I_LAY) = P_COLO3(I_LAY) *&
124     & (P_FAC00(I_LAY) * ABSB(IND0(I_LAY)  ,IG) +&
125     & P_FAC10(I_LAY) * ABSB(IND0(I_LAY)+1,IG) +&
126     & P_FAC01(I_LAY) * ABSB(IND1(I_LAY)  ,IG) +&
127     & P_FAC11(I_LAY) * ABSB(IND1(I_LAY)+1,IG)) &
128     & + P_WX(3,I_LAY) * CFC12(IG)&
129     & + P_WX(4,I_LAY) * CFC22ADJ(IG)&
130     & + P_CO2MULT(I_LAY) * ABSCO2B(IG)&
131     & + Z_N2OMULT(I_LAY) * ABSN2OB(IG)&
132     & + P_TAUAERL(I_LAY,8) 
133    PFRAC(NGS7+IG,I_LAY) = FRACREFB(IG)
134  ENDDO
135ENDDO
136
137IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL8',1,ZHOOK_HANDLE)
138END SUBROUTINE RRTM_TAUMOL8
Note: See TracBrowser for help on using the repository browser.