1 | SUBROUTINE SRTM_TAUMOL27 & |
---|
2 | & ( KIDIA , KFDIA , KLEV,& |
---|
3 | & P_FAC00 , P_FAC01 , P_FAC10 , P_FAC11,& |
---|
4 | & K_JP , K_JT , K_JT1,& |
---|
5 | & P_COLMOL , P_COLO3,& |
---|
6 | & K_LAYTROP,& |
---|
7 | & P_SFLUXZEN, P_TAUG , P_TAUR , PRMU0 & |
---|
8 | & ) |
---|
9 | |
---|
10 | ! Written by Eli J. Mlawer, Atmospheric & Environmental Research. |
---|
11 | |
---|
12 | ! BAND 27: 29000-38000 cm-1 (low - O3; high - O3) |
---|
13 | |
---|
14 | ! Modifications |
---|
15 | ! M.Hamrud 01-Oct-2003 CY28 Cleaning |
---|
16 | |
---|
17 | ! JJMorcrette 2003-02-24 adapted to ECMWF environment |
---|
18 | ! D.Salmond 31-Oct-2007 Vector version in the style of RRTM from Meteo France & NEC |
---|
19 | ! JJMorcrette 20110610 Flexible configuration for number of g-points |
---|
20 | |
---|
21 | USE PARKIND1 , ONLY : JPIM, JPRB |
---|
22 | USE YOMHOOK , ONLY : LHOOK, DR_HOOK |
---|
23 | USE PARSRTM , ONLY : JPG |
---|
24 | USE YOESRTM , ONLY : NG27 |
---|
25 | USE YOESRTA27, ONLY : ABSA, ABSB, SFLUXREFC, RAYLC, LAYREFFR, SCALEKUR |
---|
26 | USE YOESRTWN , ONLY : NSPA, NSPB |
---|
27 | |
---|
28 | IMPLICIT NONE |
---|
29 | |
---|
30 | !-- Output |
---|
31 | INTEGER(KIND=JPIM),INTENT(IN) :: KIDIA, KFDIA |
---|
32 | INTEGER(KIND=JPIM),INTENT(IN) :: KLEV |
---|
33 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC00(KIDIA:KFDIA,KLEV) |
---|
34 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC01(KIDIA:KFDIA,KLEV) |
---|
35 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC10(KIDIA:KFDIA,KLEV) |
---|
36 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC11(KIDIA:KFDIA,KLEV) |
---|
37 | INTEGER(KIND=JPIM),INTENT(IN) :: K_JP(KIDIA:KFDIA,KLEV) |
---|
38 | INTEGER(KIND=JPIM),INTENT(IN) :: K_JT(KIDIA:KFDIA,KLEV) |
---|
39 | INTEGER(KIND=JPIM),INTENT(IN) :: K_JT1(KIDIA:KFDIA,KLEV) |
---|
40 | REAL(KIND=JPRB) ,INTENT(IN) :: P_COLMOL(KIDIA:KFDIA,KLEV) |
---|
41 | REAL(KIND=JPRB) ,INTENT(IN) :: P_COLO3(KIDIA:KFDIA,KLEV) |
---|
42 | INTEGER(KIND=JPIM),INTENT(IN) :: K_LAYTROP(KIDIA:KFDIA) |
---|
43 | |
---|
44 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_SFLUXZEN(KIDIA:KFDIA,JPG) |
---|
45 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_TAUG(KIDIA:KFDIA,KLEV,JPG) |
---|
46 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_TAUR(KIDIA:KFDIA,KLEV,JPG) |
---|
47 | REAL(KIND=JPRB) ,INTENT(IN) :: PRMU0(KIDIA:KFDIA) |
---|
48 | !- from INTFAC |
---|
49 | !- from INTIND |
---|
50 | !- from PRECISE |
---|
51 | !- from PROFDATA |
---|
52 | !- from SELF |
---|
53 | INTEGER(KIND=JPIM) :: IG, IND0, IND1, I_LAY, I_LAYSOLFR(KIDIA:KFDIA), I_NLAYERS, IPLON |
---|
54 | |
---|
55 | REAL(KIND=JPRB) :: & |
---|
56 | & Z_TAURAY |
---|
57 | REAL(KIND=JPRB) :: ZHOOK_HANDLE |
---|
58 | |
---|
59 | ASSOCIATE(NFLEVG=>KLEV) |
---|
60 | IF (LHOOK) CALL DR_HOOK('SRTM_TAUMOL27',0,ZHOOK_HANDLE) |
---|
61 | |
---|
62 | I_NLAYERS = KLEV |
---|
63 | |
---|
64 | ! Compute the optical depth by interpolating in ln(pressure), |
---|
65 | ! temperature, and appropriate species. Below LAYTROP, the water |
---|
66 | ! vapor self-continuum is interpolated (in temperature) separately. |
---|
67 | DO I_LAY = 1, I_NLAYERS |
---|
68 | DO IPLON = KIDIA, KFDIA |
---|
69 | IF (PRMU0(IPLON) > 0.0_JPRB) THEN |
---|
70 | IF (I_LAY <= K_LAYTROP(IPLON)) THEN |
---|
71 | IND0 = ((K_JP(IPLON,I_LAY)-1)*5+(K_JT(IPLON,I_LAY)-1))*NSPA(27) + 1 |
---|
72 | IND1 = (K_JP(IPLON,I_LAY)*5+(K_JT1(IPLON,I_LAY)-1))*NSPA(27) + 1 |
---|
73 | |
---|
74 | ! DO IG = 1, NG(27) |
---|
75 | !CDIR UNROLL=NG27 |
---|
76 | DO IG = 1 , NG27 |
---|
77 | Z_TAURAY = P_COLMOL(IPLON,I_LAY) * RAYLC(IG) |
---|
78 | P_TAUG(IPLON,I_LAY,IG) = P_COLO3(IPLON,I_LAY) * & |
---|
79 | & (P_FAC00(IPLON,I_LAY) * ABSA(IND0,IG) + & |
---|
80 | & P_FAC10(IPLON,I_LAY) * ABSA(IND0+1,IG) + & |
---|
81 | & P_FAC01(IPLON,I_LAY) * ABSA(IND1,IG) + & |
---|
82 | & P_FAC11(IPLON,I_LAY) * ABSA(IND1+1,IG)) |
---|
83 | ! & + TAURAY |
---|
84 | ! SSA(LAY,IG) = TAURAY/TAUG(LAY,IG) |
---|
85 | P_TAUR(IPLON,I_LAY,IG) = Z_TAURAY |
---|
86 | ENDDO |
---|
87 | ENDIF |
---|
88 | ENDIF |
---|
89 | ENDDO |
---|
90 | ENDDO |
---|
91 | |
---|
92 | I_LAYSOLFR(:) = I_NLAYERS |
---|
93 | |
---|
94 | DO I_LAY = 1, I_NLAYERS |
---|
95 | DO IPLON = KIDIA, KFDIA |
---|
96 | IF (PRMU0(IPLON) > 0.0_JPRB) THEN |
---|
97 | IF (I_LAY >= K_LAYTROP(IPLON)+1) THEN |
---|
98 | IF (K_JP(IPLON,I_LAY-1) < LAYREFFR .AND. K_JP(IPLON,I_LAY) >= LAYREFFR) & |
---|
99 | & I_LAYSOLFR(IPLON) = I_LAY |
---|
100 | IND0 = ((K_JP(IPLON,I_LAY)-13)*5+(K_JT(IPLON,I_LAY)-1))*NSPB(27) + 1 |
---|
101 | IND1 = ((K_JP(IPLON,I_LAY)-12)*5+(K_JT1(IPLON,I_LAY)-1))*NSPB(27) + 1 |
---|
102 | |
---|
103 | ! DO IG = 1, NG(27) |
---|
104 | !CDIR UNROLL=NG27 |
---|
105 | DO IG = 1 , NG27 |
---|
106 | Z_TAURAY = P_COLMOL(IPLON,I_LAY) * RAYLC(IG) |
---|
107 | P_TAUG(IPLON,I_LAY,IG) = P_COLO3(IPLON,I_LAY) * & |
---|
108 | & (P_FAC00(IPLON,I_LAY) * ABSB(IND0,IG) + & |
---|
109 | & P_FAC10(IPLON,I_LAY) * ABSB(IND0+1,IG) + & |
---|
110 | & P_FAC01(IPLON,I_LAY) * ABSB(IND1,IG) + & |
---|
111 | & P_FAC11(IPLON,I_LAY) * ABSB(IND1+1,IG)) |
---|
112 | ! & + TAURAY |
---|
113 | ! SSA(LAY,IG) = TAURAY/TAUG(LAY,IG) |
---|
114 | IF (I_LAY == I_LAYSOLFR(IPLON)) P_SFLUXZEN(IPLON,IG) = SCALEKUR * SFLUXREFC(IG) |
---|
115 | P_TAUR(IPLON,I_LAY,IG) = Z_TAURAY |
---|
116 | ENDDO |
---|
117 | ENDIF |
---|
118 | ENDIF |
---|
119 | ENDDO |
---|
120 | ENDDO |
---|
121 | |
---|
122 | !----------------------------------------------------------------------- |
---|
123 | IF (LHOOK) CALL DR_HOOK('SRTM_TAUMOL27',1,ZHOOK_HANDLE) |
---|
124 | END ASSOCIATE |
---|
125 | END SUBROUTINE SRTM_TAUMOL27 |
---|