LMDZ
rrtm_taumol6.F90
Go to the documentation of this file.
1 !----------------------------------------------------------------------------
2 SUBROUTINE 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 
14 USE parkind1 ,ONLY : jpim ,jprb
15 USE yomhook ,ONLY : lhook, dr_hook
16 
17 USE parrrtm , ONLY : jplay ,jpband ,jpgpt ,jpxsec ,ng6 ,ngs5
18 USE yoerrtwn , ONLY : nspa
19 USE yoerrta6 , ONLY : absa ,absco2 ,cfc11adj , cfc12 ,&
20  & fracrefa,selfref
21 
22 ! Input
23 !#include "yoeratm.h"
24 
25 ! REAL TAUAER(JPLAY)
26 
27 IMPLICIT NONE
28 
29 INTEGER(KIND=JPIM),INTENT(IN) :: KLEV
30 REAL(KIND=JPRB) ,INTENT(OUT) :: P_TAU(jpgpt,jplay)
31 REAL(KIND=JPRB) ,INTENT(IN) :: P_WX(jpxsec,jplay) ! Amount of trace gases
32 REAL(KIND=JPRB) ,INTENT(IN) :: P_TAUAERL(jplay,jpband)
33 REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC00(jplay)
34 REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC01(jplay)
35 REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC10(jplay)
36 REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC11(jplay)
37 INTEGER(KIND=JPIM),INTENT(IN) :: K_JP(jplay)
38 INTEGER(KIND=JPIM),INTENT(IN) :: K_JT(jplay)
39 INTEGER(KIND=JPIM),INTENT(IN) :: K_JT1(jplay)
40 REAL(KIND=JPRB) ,INTENT(IN) :: P_COLH2O(jplay)
41 REAL(KIND=JPRB) ,INTENT(IN) :: P_CO2MULT(jplay)
42 INTEGER(KIND=JPIM),INTENT(IN) :: K_LAYTROP
43 REAL(KIND=JPRB) ,INTENT(IN) :: P_SELFFAC(jplay)
44 REAL(KIND=JPRB) ,INTENT(IN) :: P_SELFFRAC(jplay)
45 INTEGER(KIND=JPIM),INTENT(IN) :: K_INDSELF(jplay)
46 REAL(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
54 INTEGER(KIND=JPIM) :: IND0(jplay),IND1(jplay),INDS(jplay)
55 
56 INTEGER(KIND=JPIM) :: IG, I_LAY
57 REAL(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 
65 IF (lhook) CALL dr_hook('RRTM_TAUMOL6',0,zhook_handle)
66 DO 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)
70 ENDDO
71 
72 !-- DS_000515
73 DO 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
90 ENDDO
91 
92 ! Nothing important goes on above LAYTROP in this band.
93 !-- JJM_000517
94 DO 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
103 ENDDO
104 
105 IF (lhook) CALL dr_hook('RRTM_TAUMOL6',1,zhook_handle)
106 END SUBROUTINE rrtm_taumol6
real(kind=jprb), dimension(ng6) cfc11adj
Definition: yoerrta6.F90:18
real(kind=jprb), dimension(ng6) cfc12
Definition: yoerrta6.F90:19
subroutine rrtm_taumol6(KLEV, P_TAU, P_WX, P_TAUAERL, P_FAC00, P_FAC01, P_FAC10, P_FAC11, K_JP, K_JT, K_JT1, P_COLH2O, P_CO2MULT, K_LAYTROP, P_SELFFAC, P_SELFFRAC, K_INDSELF, PFRAC)
Definition: rrtm_taumol6.F90:5
integer(kind=jpim), parameter jpgpt
Definition: parrrtm.F90:21
integer(kind=jpim), parameter jpband
Definition: parrrtm.F90:18
integer, parameter jprb
Definition: parkind1.F90:31
real(kind=jprb), dimension(10, ng6) selfref
Definition: yoerrta6.F90:23
integer(kind=jpim), parameter ngs5
Definition: parrrtm.F90:44
integer(kind=jpim), dimension(16) nspa
Definition: yoerrtwn.F90:12
logical lhook
Definition: yomhook.F90:12
real(kind=jprb), dimension(65, ng6) absa
Definition: yoerrta6.F90:22
integer(kind=jpim), parameter ng6
Definition: parrrtm.F90:28
real(kind=jprb), dimension(ng6) fracrefa
Definition: yoerrta6.F90:16
integer(kind=jpim), parameter jplay
Definition: parrrtm.F90:15
subroutine dr_hook(CDNAME, KSWITCH, PKEY)
Definition: yomhook.F90:17
real(kind=jprb), dimension(ng6) absco2
Definition: yoerrta6.F90:20
integer, parameter jpim
Definition: parkind1.F90:13
integer(kind=jpim), parameter jpxsec
Definition: parrrtm.F90:19