GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: phylmd/rrtm/rrtm_cmbgb2.F90 Lines: 44 44 100.0 %
Date: 2023-06-30 12:51:15 Branches: 42 44 95.5 %

Line Branch Exec Source
1
!***************************************************************************
2
1
SUBROUTINE RRTM_CMBGB2
3
!***************************************************************************
4
5
!     BAND 2:  250-500 cm-1 (low - H2O; high - H2O)
6
!***************************************************************************
7
8
! Parameters
9
USE PARKIND1  ,ONLY : JPIM     ,JPRB
10
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
11
12
USE YOERRTO2 , ONLY : KAO     ,KBO     ,SELFREFO   ,FRACREFAO  ,&
13
 & FRACREFBO  ,FORREFO
14
USE YOERRTA2 , ONLY : KA      ,KB      ,SELFREF    ,FRACREFA   ,&
15
 & FRACREFB   ,FORREF
16
USE YOERRTRWT, ONLY : FREFA    ,FREFB    ,FREFADF  ,RWGT
17
USE YOERRTFTR, ONLY : NGC      ,NGS      ,NGN
18
19
IMPLICIT NONE
20
21
INTEGER(KIND=JPIM) :: IGC, IPR, IPRSM, JP, JT
22
23
REAL(KIND=JPRB) :: Z_SUMF, Z_SUMK
24
REAL(KIND=JPRB) :: ZHOOK_HANDLE
25
26
1
IF (LHOOK) CALL DR_HOOK('RRTM_CMBGB2',0,ZHOOK_HANDLE)
27
6
DO JT = 1,5
28
70
  DO JP = 1,13
29
    IPRSM = 0
30
980
    DO IGC = 1,NGC(2)
31
      Z_SUMK = 0.0_JPRB
32
1950
      DO IPR = 1, NGN(NGS(1)+IGC)
33
1040
        IPRSM = IPRSM + 1
34
35
1950
        Z_SUMK = Z_SUMK + KAO(JT,JP,IPRSM)*RWGT(IPRSM+16)
36
      ENDDO
37
38
975
      KA(JT,JP,IGC) = Z_SUMK
39
    ENDDO
40
  ENDDO
41
241
  DO JP = 13,59
42
    IPRSM = 0
43
3530
    DO IGC = 1,NGC(2)
44
      Z_SUMK = 0.0_JPRB
45
7050
      DO IPR = 1, NGN(NGS(1)+IGC)
46
3760
        IPRSM = IPRSM + 1
47
48
7050
        Z_SUMK = Z_SUMK + KBO(JT,JP,IPRSM)*RWGT(IPRSM+16)
49
      ENDDO
50
!               KBC(JT,JP,IGC) = SUMK
51
3525
      KB(JT,JP,IGC) = Z_SUMK
52
    ENDDO
53
  ENDDO
54
ENDDO
55
56
11
DO JT = 1,10
57
  IPRSM = 0
58
151
  DO IGC = 1,NGC(2)
59
    Z_SUMK = 0.0_JPRB
60
300
    DO IPR = 1, NGN(NGS(1)+IGC)
61
160
      IPRSM = IPRSM + 1
62
63
300
      Z_SUMK = Z_SUMK + SELFREFO(JT,IPRSM)*RWGT(IPRSM+16)
64
    ENDDO
65
66
150
    SELFREF(JT,IGC) = Z_SUMK
67
  ENDDO
68
ENDDO
69
70
14
DO JP = 1,13
71
  IPRSM = 0
72
196
  DO IGC = 1,NGC(2)
73
    Z_SUMF = 0.0_JPRB
74
390
    DO IPR = 1, NGN(NGS(1)+IGC)
75
208
      IPRSM = IPRSM + 1
76
77
390
      Z_SUMF = Z_SUMF + FRACREFAO(IPRSM,JP)
78
    ENDDO
79
80
195
    FRACREFA(IGC,JP) = Z_SUMF
81
  ENDDO
82
ENDDO
83
84
IPRSM = 0
85
15
DO IGC = 1,NGC(2)
86
  Z_SUMK = 0.0_JPRB
87
  Z_SUMF = 0.0_JPRB
88
30
  DO IPR = 1, NGN(NGS(1)+IGC)
89
16
    IPRSM = IPRSM + 1
90
91
16
    Z_SUMK = Z_SUMK + FORREFO(IPRSM)*RWGT(IPRSM+16)
92
30
    Z_SUMF = Z_SUMF + FRACREFBO(IPRSM)
93
  ENDDO
94
95
14
  FORREF(IGC) = Z_SUMK
96
15
  FRACREFB(IGC) = Z_SUMF
97
ENDDO
98
99
14
DO JP = 1,13
100
196
  DO IGC = 1,NGC(2)
101
102
195
    FREFA(NGS(1)+IGC,JP) = FRACREFA(IGC,JP)
103
  ENDDO
104
ENDDO
105
13
DO JP = 2,13
106
181
  DO IGC = 1,NGC(2)
107
108
180
    FREFADF(NGS(1)+IGC,JP) = FRACREFA(IGC,JP-1) -FRACREFA(IGC,JP)
109
  ENDDO
110
ENDDO
111
15
DO IGC = 1,NGC(2)
112
113
15
  FREFB(NGS(1)+IGC,1) = FRACREFB(IGC)
114
ENDDO
115
116
1
IF (LHOOK) CALL DR_HOOK('RRTM_CMBGB2',1,ZHOOK_HANDLE)
117
1
END SUBROUTINE RRTM_CMBGB2