LMDZ
srtm_taumol20.F90
Go to the documentation of this file.
1 SUBROUTINE srtm_taumol20 &
2  & ( klev,&
3  & p_fac00 , p_fac01 , p_fac10 , p_fac11,&
4  & k_jp , k_jt , k_jt1 , p_oneminus,&
5  & p_colh2o , p_colch4 , 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 20: 5150-6150 cm-1 (low - H2O; high - H2O)
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 
21 USE parkind1 ,ONLY : jpim ,jprb
22 USE yomhook ,ONLY : lhook, dr_hook
23 
24 USE parsrtm , ONLY : jplay, jpg, ng20
25 USE yoesrta20, ONLY : absa, absb, forrefc, selfrefc &
26  & , sfluxrefc, absch4c, rayl &
27  & , layreffr
28 USE yoesrtwn , ONLY : nspa, nspb
29 
30 IMPLICIT NONE
31 
32 !-- Output
33 INTEGER(KIND=JPIM),INTENT(IN) :: KLEV
34 REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC00(jplay)
35 REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC01(jplay)
36 REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC10(jplay)
37 REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC11(jplay)
38 INTEGER(KIND=JPIM),INTENT(IN) :: K_JP(jplay)
39 INTEGER(KIND=JPIM),INTENT(IN) :: K_JT(jplay)
40 INTEGER(KIND=JPIM),INTENT(IN) :: K_JT1(jplay)
41 REAL(KIND=JPRB) :: P_ONEMINUS ! Argument NOT used
42 REAL(KIND=JPRB) ,INTENT(IN) :: P_COLH2O(jplay)
43 REAL(KIND=JPRB) ,INTENT(IN) :: P_COLCH4(jplay)
44 REAL(KIND=JPRB) ,INTENT(IN) :: P_COLMOL(jplay)
45 INTEGER(KIND=JPIM),INTENT(IN) :: K_LAYTROP
46 REAL(KIND=JPRB) ,INTENT(IN) :: P_SELFFAC(jplay)
47 REAL(KIND=JPRB) ,INTENT(IN) :: P_SELFFRAC(jplay)
48 INTEGER(KIND=JPIM),INTENT(IN) :: K_INDSELF(jplay)
49 REAL(KIND=JPRB) ,INTENT(IN) :: P_FORFAC(jplay)
50 REAL(KIND=JPRB) ,INTENT(IN) :: P_FORFRAC(jplay)
51 INTEGER(KIND=JPIM),INTENT(IN) :: K_INDFOR(jplay)
52 
53 REAL(KIND=JPRB) ,INTENT(OUT) :: P_SFLUXZEN(jpg)
54 REAL(KIND=JPRB) ,INTENT(OUT) :: P_TAUG(jplay,jpg)
55 REAL(KIND=JPRB) ,INTENT(OUT) :: P_TAUR(jplay,jpg)
56 !- from INTFAC
57 !- from INTIND
58 !- from PRECISE
59 !- from PROFDATA
60 !- from SELF
61 INTEGER(KIND=JPIM) :: IG, IND0, IND1, INDS, INDF, I_LAY, I_LAYSOLFR, I_NLAYERS
62 
63 REAL(KIND=JPRB) :: &
64  & Z_TAURAY
65 REAL(KIND=JPRB) :: ZHOOK_HANDLE
66 
67 IF (lhook) CALL dr_hook('SRTM_TAUMOL20',0,zhook_handle)
68 i_nlayers = klev
69 
70 ! Compute the optical depth by interpolating in ln(pressure),
71 ! temperature, and appropriate species. Below LAYTROP, the water
72 ! vapor self-continuum is interpolated (in temperature) separately.
73 
74 i_laysolfr = k_laytrop
75 
76 DO i_lay = 1, k_laytrop
77  IF (k_jp(i_lay) < layreffr .AND. k_jp(i_lay+1) >= layreffr) &
78  & i_laysolfr = min(i_lay+1,k_laytrop)
79  ind0 = ((k_jp(i_lay)-1)*5+(k_jt(i_lay)-1))*nspa(20) + 1
80  ind1 = (k_jp(i_lay)*5+(k_jt1(i_lay)-1))*nspa(20) + 1
81  inds = k_indself(i_lay)
82  indf = k_indfor(i_lay)
83  z_tauray = p_colmol(i_lay) * rayl
84 
85 ! DO IG = 1, NG(20)
86  DO ig = 1 , ng20
87  p_taug(i_lay,ig) = p_colh2o(i_lay) * &
88  & ((p_fac00(i_lay) * absa(ind0,ig) + &
89  & p_fac10(i_lay) * absa(ind0+1,ig) + &
90  & p_fac01(i_lay) * absa(ind1,ig) + &
91  & p_fac11(i_lay) * absa(ind1+1,ig)) + &
92  & p_selffac(i_lay) * (selfrefc(inds,ig) + &
93  & p_selffrac(i_lay) * &
94  & (selfrefc(inds+1,ig) - selfrefc(inds,ig))) + &
95  & p_forfac(i_lay) * (forrefc(indf,ig) + &
96  & p_forfrac(i_lay) * &
97  & (forrefc(indf+1,ig) - forrefc(indf,ig)))) &
98  & + p_colch4(i_lay) * absch4c(ig)
99 ! & + TAURAY &
100 ! SSA(LAY,IG) = TAURAY/TAUG(LAY,IG)
101  p_taur(i_lay,ig) = z_tauray
102  IF (i_lay == i_laysolfr) p_sfluxzen(ig) = sfluxrefc(ig)
103  ENDDO
104 ENDDO
105 
106 DO i_lay = k_laytrop+1, i_nlayers
107  ind0 = ((k_jp(i_lay)-13)*5+(k_jt(i_lay)-1))*nspb(20) + 1
108  ind1 = ((k_jp(i_lay)-12)*5+(k_jt1(i_lay)-1))*nspb(20) + 1
109  indf = k_indfor(i_lay)
110  z_tauray = p_colmol(i_lay) * rayl
111 
112 ! DO IG = 1, NG(20)
113  DO ig = 1 , ng20
114  p_taug(i_lay,ig) = p_colh2o(i_lay) * &
115  & (p_fac00(i_lay) * absb(ind0,ig) + &
116  & p_fac10(i_lay) * absb(ind0+1,ig) + &
117  & p_fac01(i_lay) * absb(ind1,ig) + &
118  & p_fac11(i_lay) * absb(ind1+1,ig) + &
119  & p_forfac(i_lay) * (forrefc(indf,ig) + &
120  & p_forfrac(i_lay) * &
121  & (forrefc(indf+1,ig) - forrefc(indf,ig)))) + &
122  & p_colch4(i_lay) * absch4c(ig)
123 ! & TAURAY + &
124 ! SSA(LAY,IG) = TAURAY/TAUG(LAY,IG)
125  p_taur(i_lay,ig) = z_tauray
126  ENDDO
127 ENDDO
128 
129 !-----------------------------------------------------------------------
130 IF (lhook) CALL dr_hook('SRTM_TAUMOL20',1,zhook_handle)
131 END SUBROUTINE srtm_taumol20
132 
real(kind=jprb), dimension(ng20) sfluxrefc
Definition: yoesrta20.F90:26
integer(kind=jpim), parameter jplay
Definition: parsrtm.F90:19
integer, save klev
Definition: dimphy.F90:7
real(kind=jprb), dimension(235, ng20) absb
Definition: yoesrta20.F90:24
integer(kind=jpim), dimension(16:29) nspa
Definition: yoesrtwn.F90:12
integer, parameter jprb
Definition: parkind1.F90:31
real(kind=jprb), dimension(65, ng20) absa
Definition: yoesrta20.F90:23
integer(kind=jpim), dimension(16:29) nspb
Definition: yoesrtwn.F90:13
real(kind=jprb) rayl
Definition: yoesrta20.F90:20
logical lhook
Definition: yomhook.F90:12
real(kind=jprb), dimension(4, ng20) forrefc
Definition: yoesrta20.F90:25
real(kind=jprb), dimension(ng20) absch4c
Definition: yoesrta20.F90:26
integer(kind=jpim) layreffr
Definition: yoesrta20.F90:21
real(kind=jprb), dimension(10, ng20) selfrefc
Definition: yoesrta20.F90:25
subroutine dr_hook(CDNAME, KSWITCH, PKEY)
Definition: yomhook.F90:17
integer(kind=jpim), parameter ng20
Definition: parsrtm.F90:42
integer, parameter jpim
Definition: parkind1.F90:13
integer(kind=jpim), parameter jpg
Definition: parsrtm.F90:21
subroutine srtm_taumol20(KLEV, P_FAC00, P_FAC01, P_FAC10, P_FAC11, K_JP, K_JT, K_JT1, P_ONEMINUS, P_COLH2O, P_COLCH4, P_COLMOL, K_LAYTROP, P_SELFFAC, P_SELFFRAC, K_INDSELF, P_FORFAC, P_FORFRAC, K_INDFOR, P_SFLUXZEN, P_TAUG, P_TAUR)