GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: phylmd/rrtm/rrtm_cmbgb3.F90 Lines: 55 55 100.0 %
Date: 2023-06-30 12:51:15 Branches: 54 56 96.4 %

Line Branch Exec Source
1
!***************************************************************************
2
1
SUBROUTINE RRTM_CMBGB3
3
!***************************************************************************
4
5
!     BAND 3:  500-630 cm-1 (low - H2O,CO2; high - H2O,CO2)
6
!***************************************************************************
7
8
! Parameters
9
USE PARKIND1  ,ONLY : JPIM     ,JPRB
10
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
11
12
USE YOERRTO3 , ONLY : KAO     ,KBO     ,SELFREFO   ,FRACREFAO  ,&
13
 & FRACREFBO  ,FORREFO    ,ABSN2OAO   ,ABSN2OBO
14
USE YOERRTA3 , ONLY : KA      ,KB      ,SELFREF    ,FRACREFA   ,&
15
 & FRACREFB   ,FORREF    ,ABSN2OA   ,ABSN2OB
16
USE YOERRTRWT, ONLY : FREFA    ,FREFB    ,FREFADF  ,FREFBDF   ,RWGT
17
USE YOERRTFTR, ONLY : NGC      ,NGS      ,NGN
18
19
IMPLICIT NONE
20
21
INTEGER(KIND=JPIM) :: IGC, IPR, IPRSM, JN, JP, JT
22
23
REAL(KIND=JPRB) :: Z_SUMF, Z_SUMK, Z_SUMK1, Z_SUMK2, Z_SUMK3
24
REAL(KIND=JPRB) :: ZHOOK_HANDLE
25
26
1
IF (LHOOK) CALL DR_HOOK('RRTM_CMBGB3',0,ZHOOK_HANDLE)
27
11
DO JN = 1,10
28
61
  DO JT = 1,5
29
710
    DO JP = 1,13
30
      IPRSM = 0
31
11100
      DO IGC = 1,NGC(3)
32
        Z_SUMK = 0.0_JPRB
33
20800
        DO IPR = 1, NGN(NGS(2)+IGC)
34
10400
          IPRSM = IPRSM + 1
35
36
20800
          Z_SUMK = Z_SUMK + KAO(JN,JT,JP,IPRSM)*RWGT(IPRSM+32)
37
        ENDDO
38
39
11050
        KA(JN,JT,JP,IGC) = Z_SUMK
40
      ENDDO
41
    ENDDO
42
  ENDDO
43
ENDDO
44
6
DO JN = 1,5
45
31
  DO JT = 1,5
46
1205
    DO JP = 13,59
47
      IPRSM = 0
48
20000
      DO IGC = 1,NGC(3)
49
        Z_SUMK = 0.0_JPRB
50
37600
        DO IPR = 1, NGN(NGS(2)+IGC)
51
18800
          IPRSM = IPRSM + 1
52
53
37600
          Z_SUMK = Z_SUMK + KBO(JN,JT,JP,IPRSM)*RWGT(IPRSM+32)
54
        ENDDO
55
56
19975
        KB(JN,JT,JP,IGC) = Z_SUMK
57
      ENDDO
58
    ENDDO
59
  ENDDO
60
ENDDO
61
62
11
DO JT = 1,10
63
  IPRSM = 0
64
171
  DO IGC = 1,NGC(3)
65
    Z_SUMK = 0.0_JPRB
66
    Z_SUMF = 0.0_JPRB
67
320
    DO IPR = 1, NGN(NGS(2)+IGC)
68
160
      IPRSM = IPRSM + 1
69
70
160
      Z_SUMK = Z_SUMK + SELFREFO(JT,IPRSM)*RWGT(IPRSM+32)
71
320
      Z_SUMF = Z_SUMF + FRACREFAO(IPRSM,JT)
72
    ENDDO
73
74
160
    SELFREF(JT,IGC) = Z_SUMK
75
170
    FRACREFA(IGC,JT) = Z_SUMF
76
  ENDDO
77
ENDDO
78
79
6
DO JP = 1,5
80
  IPRSM = 0
81
86
  DO IGC = 1,NGC(3)
82
    Z_SUMF = 0.0_JPRB
83
160
    DO IPR = 1, NGN(NGS(2)+IGC)
84
80
      IPRSM = IPRSM + 1
85
86
160
      Z_SUMF = Z_SUMF + FRACREFBO(IPRSM,JP)
87
    ENDDO
88
89
85
    FRACREFB(IGC,JP) = Z_SUMF
90
  ENDDO
91
ENDDO
92
93
IPRSM = 0
94
17
DO IGC = 1,NGC(3)
95
  Z_SUMK1= 0.0_JPRB
96
  Z_SUMK2= 0.0_JPRB
97
  Z_SUMK3= 0.0_JPRB
98
32
  DO IPR = 1, NGN(NGS(2)+IGC)
99
16
    IPRSM = IPRSM + 1
100
101
16
    Z_SUMK1= Z_SUMK1+ FORREFO(IPRSM)*RWGT(IPRSM+32)
102
16
    Z_SUMK2= Z_SUMK2+ ABSN2OAO(IPRSM)*RWGT(IPRSM+32)
103
32
    Z_SUMK3= Z_SUMK3+ ABSN2OBO(IPRSM)*RWGT(IPRSM+32)
104
  ENDDO
105
106
16
  FORREF(IGC) = Z_SUMK1
107
16
  ABSN2OA(IGC) = Z_SUMK2
108
17
  ABSN2OB(IGC) = Z_SUMK3
109
ENDDO
110
111
11
DO JP = 1,10
112
171
  DO IGC = 1,NGC(3)
113
114
170
    FREFA(NGS(2)+IGC,JP) = FRACREFA(IGC,JP)
115
  ENDDO
116
ENDDO
117
10
DO JP = 1,9
118
154
  DO IGC = 1,NGC(3)
119
120
153
    FREFADF(NGS(2)+IGC,JP) = FRACREFA(IGC,JP+1) -FRACREFA(IGC,JP)
121
  ENDDO
122
ENDDO
123
6
DO JP = 1,5
124
86
  DO IGC = 1,NGC(3)
125
126
85
    FREFB(NGS(2)+IGC,JP) = FRACREFB(IGC,JP)
127
  ENDDO
128
ENDDO
129
5
DO JP = 1,4
130
69
  DO IGC = 1,NGC(3)
131
132
68
    FREFBDF(NGS(2)+IGC,JP) = FRACREFB(IGC,JP+1) -FRACREFB(IGC,JP)
133
  ENDDO
134
ENDDO
135
136
1
IF (LHOOK) CALL DR_HOOK('RRTM_CMBGB3',1,ZHOOK_HANDLE)
137
1
END SUBROUTINE RRTM_CMBGB3