GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: phylmd/rrtm/rrtm_taumol6.F90 Lines: 16 16 100.0 %
Date: 2023-06-30 12:56:34 Branches: 12 14 85.7 %

Line Branch Exec Source
1
!----------------------------------------------------------------------------
2
71568
SUBROUTINE RRTM_TAUMOL6 (KLEV,P_TAU,P_WX,&
3
 & P_TAUAERL,P_FAC00,P_FAC01,P_FAC10,P_FAC11,K_JP,K_JT,K_JT1,&
4
 & P_COLH2O,P_CO2MULT,K_LAYTROP,P_SELFFAC,P_SELFFRAC,K_INDSELF,PFRAC)
5
6
!     BAND 6:  820-980 cm-1 (low - H2O; high - nothing)
7
8
! Modifications
9
!        M.Hamrud      01-Oct-2003 CY28 Cleaning
10
11
!     D Salmond   2000-05-15 speed-up
12
!     JJMorcrette 2000-05-17 speed-up
13
14
USE PARKIND1  ,ONLY : JPIM     ,JPRB
15
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
16
17
USE PARRRTM  , ONLY : JPLAY  ,JPBAND ,JPGPT  ,JPXSEC ,NG6   ,NGS5
18
USE YOERRTWN , ONLY :      NSPA
19
USE YOERRTA6 , ONLY : ABSA   ,ABSCO2 ,CFC11ADJ , CFC12  ,&
20
 & FRACREFA,SELFREF
21
22
!  Input
23
!#include "yoeratm.h"
24
25
!      REAL TAUAER(JPLAY)
26
27
IMPLICIT NONE
28
29
INTEGER(KIND=JPIM),INTENT(IN)    :: KLEV
30
REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_TAU(JPGPT,JPLAY)
31
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_WX(JPXSEC,JPLAY) ! Amount of trace gases
32
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_TAUAERL(JPLAY,JPBAND)
33
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC00(JPLAY)
34
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC01(JPLAY)
35
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC10(JPLAY)
36
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC11(JPLAY)
37
INTEGER(KIND=JPIM),INTENT(IN)    :: K_JP(JPLAY)
38
INTEGER(KIND=JPIM),INTENT(IN)    :: K_JT(JPLAY)
39
INTEGER(KIND=JPIM),INTENT(IN)    :: K_JT1(JPLAY)
40
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLH2O(JPLAY)
41
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_CO2MULT(JPLAY)
42
INTEGER(KIND=JPIM),INTENT(IN)    :: K_LAYTROP
43
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_SELFFAC(JPLAY)
44
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_SELFFRAC(JPLAY)
45
INTEGER(KIND=JPIM),INTENT(IN)    :: K_INDSELF(JPLAY)
46
REAL(KIND=JPRB)   ,INTENT(OUT)   :: PFRAC(JPGPT,JPLAY)
47
!  Output
48
!- from AER
49
!- from INTFAC
50
!- from INTIND
51
!- from PROFDATA
52
!- from SELF
53
!- from SP
54
INTEGER(KIND=JPIM) :: IND0(JPLAY),IND1(JPLAY),INDS(JPLAY)
55
56
INTEGER(KIND=JPIM) :: IG, I_LAY
57
REAL(KIND=JPRB) :: ZHOOK_HANDLE
58
59
!      EQUIVALENCE (TAUAERL(1,6),TAUAER)
60
61
!     Compute the optical depth by interpolating in ln(pressure) and
62
!     temperature. The water vapor self-continuum is interpolated
63
!     (in temperature) separately.
64
65
71568
IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL6',0,ZHOOK_HANDLE)
66
1574496
DO I_LAY = 1, K_LAYTROP
67
1502928
  IND0(I_LAY) = ((K_JP(I_LAY)-1)*5+(K_JT(I_LAY)-1))*NSPA(6) + 1
68
1502928
  IND1(I_LAY) = (K_JP(I_LAY)*5+(K_JT1(I_LAY)-1))*NSPA(6) + 1
69
1574496
  INDS(I_LAY) = K_INDSELF(I_LAY)
70
ENDDO
71
72
!-- DS_000515
73
644112
DO IG = 1, NG6
74
12667536
  DO I_LAY = 1, K_LAYTROP
75
!-- DS_000515
76
    P_TAU (NGS5+IG,I_LAY) = P_COLH2O(I_LAY) *&
77
     & (P_FAC00(I_LAY) * ABSA(IND0(I_LAY)  ,IG) +&
78
     & P_FAC10(I_LAY) * ABSA(IND0(I_LAY)+1,IG) +&
79
     & P_FAC01(I_LAY) * ABSA(IND1(I_LAY)  ,IG) +&
80
     & P_FAC11(I_LAY) * ABSA(IND1(I_LAY)+1,IG) +&
81
     & P_SELFFAC(I_LAY) * (SELFREF(INDS(I_LAY),IG) + &
82
     & P_SELFFRAC(I_LAY)*&
83
     & (SELFREF(INDS(I_LAY)+1,IG)-SELFREF(INDS(I_LAY),IG))))&
84
     & + P_WX(2,I_LAY) * CFC11ADJ(IG)&
85
     & + P_WX(3,I_LAY) * CFC12(IG)&
86
     & + P_CO2MULT(I_LAY) * ABSCO2(IG)&
87
12023424
     & + P_TAUAERL(I_LAY,6)
88
12595968
    PFRAC(NGS5+IG,I_LAY) = FRACREFA(IG)
89
  ENDDO
90
ENDDO
91
92
!     Nothing important goes on above LAYTROP in this band.
93
!-- JJM_000517
94
644112
DO IG = 1, NG6
95
10949904
  DO I_LAY = K_LAYTROP+1, KLEV
96
!-- JJM_000517
97
    P_TAU (NGS5+IG,I_LAY) = 0.0_JPRB &
98
     & + P_WX(2,I_LAY) * CFC11ADJ(IG)&
99
     & + P_WX(3,I_LAY) * CFC12(IG)&
100
10305792
     & + P_TAUAERL(I_LAY,6)
101
10878336
    PFRAC(NGS5+IG,I_LAY) = FRACREFA(IG)
102
  ENDDO
103
ENDDO
104
105
71568
IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL6',1,ZHOOK_HANDLE)
106
71568
END SUBROUTINE RRTM_TAUMOL6