GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: phylmd/rrtm/srtm_taumol25.F90 Lines: 0 21 0.0 %
Date: 2023-06-30 12:56:34 Branches: 0 18 0.0 %

Line Branch Exec Source
1
SUBROUTINE SRTM_TAUMOL25 &
2
 & ( KLEV,&
3
 & P_FAC00   , P_FAC01  , P_FAC10   , P_FAC11,&
4
 & K_JP      , K_JT     , K_JT1     , P_ONEMINUS,&
5
 & P_COLH2O  , P_COLMOL , P_COLO3,&
6
 & K_LAYTROP,&
7
 & P_SFLUXZEN, P_TAUG   , P_TAUR    &
8
 & )
9
10
!     Written by Eli J. Mlawer, Atmospheric & Environmental Research.
11
12
!     BAND 25:  16000-22650 cm-1 (low - H2O; high - nothing)
13
14
!      PARAMETER (MG=16, MXLAY=203, NBANDS=14)
15
16
! Modifications
17
!        M.Hamrud      01-Oct-2003 CY28 Cleaning
18
19
!     JJMorcrette 2003-02-24 adapted to ECMWF environment
20
21
!      PARAMETER (MG=16, MXLAY=203, NBANDS=14)
22
23
USE PARKIND1  ,ONLY : JPIM     ,JPRB
24
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
25
26
USE PARSRTM  , ONLY : JPLAY, JPG, NG25
27
USE YOESRTA25, ONLY : ABSA &
28
 & , SFLUXREFC, ABSO3AC, ABSO3BC, RAYLC &
29
 & , LAYREFFR
30
USE YOESRTWN , ONLY : NSPA
31
32
IMPLICIT NONE
33
34
!-- Output
35
INTEGER(KIND=JPIM),INTENT(IN)    :: KLEV
36
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC00(JPLAY)
37
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC01(JPLAY)
38
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC10(JPLAY)
39
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC11(JPLAY)
40
INTEGER(KIND=JPIM),INTENT(IN)    :: K_JP(JPLAY)
41
INTEGER(KIND=JPIM),INTENT(IN)    :: K_JT(JPLAY)
42
INTEGER(KIND=JPIM),INTENT(IN)    :: K_JT1(JPLAY)
43
REAL(KIND=JPRB)                  :: P_ONEMINUS ! Argument NOT used
44
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLH2O(JPLAY)
45
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLMOL(JPLAY)
46
REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLO3(JPLAY)
47
INTEGER(KIND=JPIM),INTENT(IN)    :: K_LAYTROP
48
49
REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_SFLUXZEN(JPG)
50
REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_TAUG(JPLAY,JPG)
51
REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_TAUR(JPLAY,JPG)
52
!- from INTFAC
53
!- from INTIND
54
!- from PRECISE
55
!- from PROFDATA
56
!- from SELF
57
INTEGER(KIND=JPIM) :: IG, IND0, IND1, I_LAY, I_LAYSOLFR, I_NLAYERS
58
59
REAL(KIND=JPRB) ::  &
60
 & Z_TAURAY
61
REAL(KIND=JPRB) :: ZHOOK_HANDLE
62
63
IF (LHOOK) CALL DR_HOOK('SRTM_TAUMOL25',0,ZHOOK_HANDLE)
64
I_NLAYERS = KLEV
65
66
!     Compute the optical depth by interpolating in ln(pressure),
67
!     temperature, and appropriate species.  Below LAYTROP, the water
68
!     vapor self-continuum is interpolated (in temperature) separately.
69
70
I_LAYSOLFR = K_LAYTROP
71
72
DO I_LAY = 1, K_LAYTROP
73
  IF (K_JP(I_LAY) < LAYREFFR .AND. K_JP(I_LAY+1) >= LAYREFFR) &
74
   & I_LAYSOLFR = MIN(I_LAY+1,K_LAYTROP)
75
  IND0 = ((K_JP(I_LAY)-1)*5+(K_JT(I_LAY)-1))*NSPA(25) + 1
76
  IND1 = (K_JP(I_LAY)*5+(K_JT1(I_LAY)-1))*NSPA(25) + 1
77
78
!  DO IG = 1, NG(25)
79
  DO IG = 1 , NG25
80
    Z_TAURAY = P_COLMOL(I_LAY) * RAYLC(IG)
81
    P_TAUG(I_LAY,IG) = P_COLH2O(I_LAY) * &
82
     & (P_FAC00(I_LAY) * ABSA(IND0,IG) + &
83
     & P_FAC10(I_LAY) * ABSA(IND0+1,IG) + &
84
     & P_FAC01(I_LAY) * ABSA(IND1,IG) + &
85
     & P_FAC11(I_LAY) * ABSA(IND1+1,IG)) + &
86
     & P_COLO3(I_LAY) * ABSO3AC(IG)
87
!     &          + TAURAY
88
!    SSA(LAY,IG) = TAURAY/TAUG(LAY,IG)
89
    IF (I_LAY == I_LAYSOLFR) P_SFLUXZEN(IG) = SFLUXREFC(IG)
90
    P_TAUR(I_LAY,IG) = Z_TAURAY
91
  ENDDO
92
ENDDO
93
94
DO I_LAY = K_LAYTROP+1, I_NLAYERS
95
!  DO IG = 1, NG(25)
96
  DO IG = 1 , NG25
97
    Z_TAURAY = P_COLMOL(I_LAY) * RAYLC(IG)
98
    P_TAUG(I_LAY,IG) = P_COLO3(I_LAY) * ABSO3BC(IG)
99
!     &          + TAURAY
100
!    SSA(LAY,IG) = TAURAY/TAUG(LAY,IG)
101
    P_TAUR(I_LAY,IG) = Z_TAURAY
102
  ENDDO
103
ENDDO
104
105
!-----------------------------------------------------------------------
106
IF (LHOOK) CALL DR_HOOK('SRTM_TAUMOL25',1,ZHOOK_HANDLE)
107
END SUBROUTINE SRTM_TAUMOL25
108