source: LMDZ6/branches/LMDZ_ECRad/libf/phylmd/ecrad/ifsrrtm/rrtm_cmbgb2.F90 @ 5134

Last change on this file since 5134 was 4728, checked in by idelkadi, 14 months ago

Update of ecrad in the LMDZ_ECRad branch of LMDZ:

  • version 1.6.1 of ecrad
  • files are no longer grouped in the same ecrad directory.
  • the structure of ecrad offline is preserved to facilitate updating in LMDZ
  • cfg.bld modified to take into account the new added subdirectories.
  • the interface routines and those added in ecrad are moved to the phylmd directory
File size: 2.6 KB
Line 
1!***************************************************************************
2SUBROUTINE RRTM_CMBGB2
3!***************************************************************************
4
5!     BAND 2:  250-500 cm-1 (low - H2O; high - H2O)
6! ABozzo May 2013 updated to last version of rrtmg
7!     band 2:  350-500 cm-1 (low key - h2o; high key - h2o)
8!***************************************************************************
9
10! Parameters
11USE PARKIND1  ,ONLY : JPIM     ,JPRB
12USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK, JPHOOK
13
14USE YOERRTO2 , ONLY : KAO     ,KBO     ,SELFREFO   ,FRACREFAO  ,&
15 & FRACREFBO  ,FORREFO 
16USE YOERRTA2 , ONLY : KA      ,KB      ,SELFREF    ,FRACREFA   ,&
17 & FRACREFB   ,FORREF       
18USE YOERRTRWT, ONLY : RWGT
19USE YOERRTFTR, ONLY : NGC      ,NGS      ,NGN     
20
21IMPLICIT NONE
22
23INTEGER(KIND=JPIM) :: IGC, IPR, IPRSM, JP, JT
24
25REAL(KIND=JPRB) :: Z_SUMF, Z_SUMK
26REAL(KIND=JPHOOK) :: ZHOOK_HANDLE
27
28IF (LHOOK) CALL DR_HOOK('RRTM_CMBGB2',0,ZHOOK_HANDLE)
29DO JT = 1,5
30  DO JP = 1,13
31    IPRSM = 0
32    DO IGC = 1,NGC(2)
33      Z_SUMK = 0.0_JPRB
34      DO IPR = 1, NGN(NGS(1)+IGC)
35        IPRSM = IPRSM + 1
36
37        Z_SUMK = Z_SUMK + KAO(JT,JP,IPRSM)*RWGT(IPRSM+16)
38      ENDDO
39
40      KA(JT,JP,IGC) = Z_SUMK
41    ENDDO
42  ENDDO
43  DO JP = 13,59
44    IPRSM = 0
45    DO IGC = 1,NGC(2)
46      Z_SUMK = 0.0_JPRB
47      DO IPR = 1, NGN(NGS(1)+IGC)
48        IPRSM = IPRSM + 1
49
50        Z_SUMK = Z_SUMK + KBO(JT,JP,IPRSM)*RWGT(IPRSM+16)
51      ENDDO
52!               KBC(JT,JP,IGC) = SUMK
53      KB(JT,JP,IGC) = Z_SUMK
54    ENDDO
55  ENDDO
56ENDDO
57
58DO JT = 1,10
59  IPRSM = 0
60  DO IGC = 1,NGC(2)
61    Z_SUMK = 0.0_JPRB
62    DO IPR = 1, NGN(NGS(1)+IGC)
63      IPRSM = IPRSM + 1
64
65      Z_SUMK = Z_SUMK + SELFREFO(JT,IPRSM)*RWGT(IPRSM+16)
66    ENDDO
67
68    SELFREF(JT,IGC) = Z_SUMK
69  ENDDO
70ENDDO
71
72DO JT = 1,4
73   IPRSM = 0
74   DO IGC = 1,NGC(2)
75      Z_SUMK = 0.0_JPRB
76        DO IPR = 1, NGN(NGS(1)+IGC)
77           IPRSM = IPRSM + 1
78           Z_SUMK = Z_SUMK + FORREFO(JT,IPRSM)*RWGT(IPRSM+16)
79        ENDDO
80      FORREF(JT,IGC) = Z_SUMK
81   ENDDO
82ENDDO
83
84
85IPRSM = 0
86DO IGC = 1,NGC(2)
87  Z_SUMK = 0.0_JPRB
88  Z_SUMF = 0.0_JPRB
89  DO IPR = 1, NGN(NGS(1)+IGC)
90    IPRSM = IPRSM + 1
91
92    Z_SUMK = Z_SUMK + FRACREFAO(IPRSM)
93    Z_SUMF = Z_SUMF + FRACREFBO(IPRSM)
94  ENDDO
95
96  FRACREFA(IGC) = Z_SUMK
97  FRACREFB(IGC) = Z_SUMF
98ENDDO
99
100!DO JP = 1,13
101!  DO IGC = 1,NGC(2)
102
103!    FREFA(NGS(1)+IGC,JP) = FRACREFA(IGC,JP)
104!  ENDDO
105!ENDDO
106!DO JP = 2,13
107!  DO IGC = 1,NGC(2)
108
109!    FREFADF(NGS(1)+IGC,JP) = FRACREFA(IGC,JP-1) -FRACREFA(IGC,JP)
110!  ENDDO
111!ENDDO
112!DO IGC = 1,NGC(2)
113
114!  FREFB(NGS(1)+IGC,1) = FRACREFB(IGC)
115!ENDDO
116
117IF (LHOOK) CALL DR_HOOK('RRTM_CMBGB2',1,ZHOOK_HANDLE)
118END SUBROUTINE RRTM_CMBGB2
Note: See TracBrowser for help on using the repository browser.