GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: phylmd/rrtm/rrtm_taumol14.F90 Lines: 19 19 100.0 %
Date: 2023-06-30 12:56:34 Branches: 6 8 75.0 %

Line Branch Exec Source
1
!******************************************************************************
2
71568
SUBROUTINE RRTM_TAUMOL14 (KLEV,P_TAU,&
3
 & P_TAUAERL,P_FAC00,P_FAC01,P_FAC10,P_FAC11,K_JP,K_JT,K_JT1,&
4
 & P_COLCO2,K_LAYTROP,P_SELFFAC,P_SELFFRAC,K_INDSELF,PFRAC)
5
6
!     BAND 14:  2250-2380 cm-1 (low - CO2; high - CO2)
7
8
! Modifications
9
!        M.Hamrud      01-Oct-2003 CY28 Cleaning
10
11
!     D Salmond 1999-07-14 speed-up
12
13
USE PARKIND1  ,ONLY : JPIM     ,JPRB
14
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
15
16
USE PARRRTM  , ONLY : JPLAY  ,JPBAND ,JPGPT  ,NGS13
17
USE YOERRTWN , ONLY :      NSPA   ,NSPB
18
USE YOERRTA14, ONLY : ABSA   ,ABSB   ,FRACREFA, FRACREFB,SELFREF
19
20
IMPLICIT NONE
21
22
!  Output
23
INTEGER(KIND=JPIM),INTENT(IN)    :: KLEV
24
REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_TAU(JPGPT,JPLAY)
25
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_TAUAERL(JPLAY,JPBAND)
26
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC00(JPLAY)
27
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC01(JPLAY)
28
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC10(JPLAY)
29
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC11(JPLAY)
30
INTEGER(KIND=JPIM),INTENT(IN)    :: K_JP(JPLAY)
31
INTEGER(KIND=JPIM),INTENT(IN)    :: K_JT(JPLAY)
32
INTEGER(KIND=JPIM),INTENT(IN)    :: K_JT1(JPLAY)
33
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLCO2(JPLAY)
34
INTEGER(KIND=JPIM),INTENT(IN)    :: K_LAYTROP
35
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_SELFFAC(JPLAY)
36
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_SELFFRAC(JPLAY)
37
INTEGER(KIND=JPIM),INTENT(IN)    :: K_INDSELF(JPLAY)
38
REAL(KIND=JPRB)   ,INTENT(OUT)   :: PFRAC(JPGPT,JPLAY)
39
!- from AER
40
!- from INTFAC
41
!- from INTIND
42
!- from PROFDATA
43
!- from SELF
44
!- from SP
45
INTEGER(KIND=JPIM) :: IG, IND0, IND1, INDS, I_LAY
46
REAL(KIND=JPRB) :: ZHOOK_HANDLE
47
48
!  Input
49
!#include "yoeratm.h"
50
51
!      REAL TAUAER(JPLAY)
52
!      EQUIVALENCE (TAUAERL(1,14),TAUAER)
53
54
!     Compute the optical depth by interpolating in ln(pressure) and
55
!     temperature.  Below LAYTROP, the water vapor self-continuum
56
!     is interpolated (in temperature) separately.
57
58
71568
IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL14',0,ZHOOK_HANDLE)
59
1574496
DO I_LAY = 1, K_LAYTROP
60
1502928
  IND0 = ((K_JP(I_LAY)-1)*5+(K_JT(I_LAY)-1))*NSPA(14) + 1
61
1502928
  IND1 = (K_JP(I_LAY)*5+(K_JT1(I_LAY)-1))*NSPA(14) + 1
62
1502928
  INDS = K_INDSELF(I_LAY)
63
!-- DS_990714
64
!         DO IG = 1, NG14
65
  IG=1
66
  P_TAU (NGS13+IG,I_LAY) = P_COLCO2(I_LAY) *&
67
   & (P_FAC00(I_LAY) * ABSA(IND0  ,IG) +&
68
   & P_FAC10(I_LAY) * ABSA(IND0+1,IG) +&
69
   & P_FAC01(I_LAY) * ABSA(IND1  ,IG) +&
70
   & P_FAC11(I_LAY) * ABSA(IND1+1,IG) +&
71
   & P_SELFFAC(I_LAY) * (SELFREF(INDS,IG) + &
72
   & P_SELFFRAC(I_LAY) *&
73
   & (SELFREF(INDS+1,IG) - SELFREF(INDS,IG))))&
74
1502928
   & + P_TAUAERL(I_LAY,14)
75
1502928
  PFRAC(NGS13+IG,I_LAY) = FRACREFA(IG)
76
  IG=2
77
  P_TAU (NGS13+IG,I_LAY) = P_COLCO2(I_LAY) *&
78
   & (P_FAC00(I_LAY) * ABSA(IND0  ,IG) +&
79
   & P_FAC10(I_LAY) * ABSA(IND0+1,IG) +&
80
   & P_FAC01(I_LAY) * ABSA(IND1  ,IG) +&
81
   & P_FAC11(I_LAY) * ABSA(IND1+1,IG) +&
82
   & P_SELFFAC(I_LAY) * (SELFREF(INDS,IG) +&
83
   & P_SELFFRAC(I_LAY) *&
84
   & (SELFREF(INDS+1,IG) - SELFREF(INDS,IG))))&
85
1502928
   & + P_TAUAERL(I_LAY,14)
86
1574496
  PFRAC(NGS13+IG,I_LAY) = FRACREFA(IG)
87
!         END DO
88
!-- DS_990714
89
ENDDO
90
91
1359792
DO I_LAY = K_LAYTROP+1, KLEV
92
1288224
  IND0 = ((K_JP(I_LAY)-13)*5+(K_JT(I_LAY)-1))*NSPB(14) + 1
93
1288224
  IND1 = ((K_JP(I_LAY)-12)*5+(K_JT1(I_LAY)-1))*NSPB(14) + 1
94
!-- DS_990714
95
!         DO IG = 1, NG14
96
  IG=1
97
  P_TAU (NGS13+IG,I_LAY) = P_COLCO2(I_LAY) *&
98
   & (P_FAC00(I_LAY) * ABSB(IND0  ,IG) +&
99
   & P_FAC10(I_LAY) * ABSB(IND0+1,IG) +&
100
   & P_FAC01(I_LAY) * ABSB(IND1  ,IG) +&
101
   & P_FAC11(I_LAY) * ABSB(IND1+1,IG)) &
102
1288224
   & + P_TAUAERL(I_LAY,14)
103
1288224
  PFRAC(NGS13+IG,I_LAY) = FRACREFB(IG)
104
  IG=2
105
  P_TAU (NGS13+IG,I_LAY) = P_COLCO2(I_LAY) *&
106
   & (P_FAC00(I_LAY) * ABSB(IND0  ,IG) +&
107
   & P_FAC10(I_LAY) * ABSB(IND0+1,IG) +&
108
   & P_FAC01(I_LAY) * ABSB(IND1  ,IG) +&
109
   & P_FAC11(I_LAY) * ABSB(IND1+1,IG)) &
110
1288224
   & + P_TAUAERL(I_LAY,14)
111
1359792
  PFRAC(NGS13+IG,I_LAY) = FRACREFB(IG)
112
!         END DO
113
!-- DS_990714
114
ENDDO
115
116
71568
IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL14',1,ZHOOK_HANDLE)
117
71568
END SUBROUTINE RRTM_TAUMOL14