source: LMDZ6/trunk/libf/phylmd/ecrad/ifsrrtm/rrtm_cmbgb1.F90 @ 5407

Last change on this file since 5407 was 4773, checked in by idelkadi, 12 months ago
  • Update of Ecrad in LMDZ The same organization of the Ecrad offline version is retained in order to facilitate the updating of Ecrad in LMDZ and the comparison between online and offline results. version 1.6.1 of Ecrad (https://github.com/lguez/ecrad.git)
  • Implementation of the double call of Ecrad in LMDZ


File size: 3.2 KB
Line 
1!***************************************************************************
2SUBROUTINE RRTM_CMBGB1
3!***************************************************************************
4
5!  The subroutines CMBGB1->CMBGB16 input the absorption coefficient
6!  data for each band, which are defined for 16 g-points and 16 spectral
7!  bands. The data are combined with appropriate weighting following the
8!  g-point mapping arrays specified in RRTMINIT.  Plank fraction data
9!  in arrays FRACREFA and FRACREFB are combined without weighting.  All
10!  g-point reduced data are put into new arrays for use in RRTM.
11
12!  BAND 1:  10-250 cm-1 (low - H2O; high - H2O)
13
14! ABozzo may 2013 update to the last version of rrtmg
15
16!band 1:  10-350 cm-1 (low key - h2o; low minor - n2)
17!                       (high key - h2o; high minor - n2)
18!***************************************************************************
19
20! Parameters
21USE PARKIND1  ,ONLY : JPIM     ,JPRB
22USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK, JPHOOK
23
24USE YOERRTO1 , ONLY : KAO, KBO, SELFREFO, FORREFO, FRACREFAO,FRACREFBO,KAO_MN2, KBO_MN2
25USE YOERRTA1 , ONLY : KA , KB , SELFREF , FORREF , FRACREFA ,FRACREFB,  KA_MN2, KB_MN2
26USE YOERRTRWT, ONLY : RWGT
27USE YOERRTFTR, ONLY : NGC      ,NGN     
28
29IMPLICIT NONE
30
31INTEGER(KIND=JPIM) :: IGC, IPR, IPRSM, JP, JT
32
33REAL(KIND=JPRB) :: Z_SUMF1, Z_SUMF2, Z_SUMK, Z_SUMK1, Z_SUMK2
34REAL(KIND=JPHOOK) :: ZHOOK_HANDLE
35
36IF (LHOOK) CALL DR_HOOK('RRTM_CMBGB1',0,ZHOOK_HANDLE)
37DO JT = 1,5
38  DO JP = 1,13
39    IPRSM = 0
40    DO IGC = 1,NGC(1)
41      Z_SUMK = 0.0_JPRB
42      DO IPR = 1, NGN(IGC)
43        IPRSM = IPRSM + 1
44
45        Z_SUMK = Z_SUMK + KAO(JT,JP,IPRSM)*RWGT(IPRSM)
46      ENDDO
47
48      KA(JT,JP,IGC) = Z_SUMK
49    ENDDO
50  ENDDO
51  DO JP = 13,59
52    IPRSM = 0
53    DO IGC = 1,NGC(1)
54      Z_SUMK = 0.0_JPRB
55      DO IPR = 1, NGN(IGC)
56        IPRSM = IPRSM + 1
57
58        Z_SUMK = Z_SUMK + KBO(JT,JP,IPRSM)*RWGT(IPRSM)
59      ENDDO
60
61      KB(JT,JP,IGC) = Z_SUMK
62    ENDDO
63  ENDDO
64ENDDO
65
66DO JT = 1,10
67  IPRSM = 0
68  DO IGC = 1,NGC(1)
69    Z_SUMK = 0.0_JPRB
70    DO IPR = 1, NGN(IGC)
71      IPRSM = IPRSM + 1
72
73      Z_SUMK = Z_SUMK + SELFREFO(JT,IPRSM)*RWGT(IPRSM)
74    ENDDO
75
76    SELFREF(JT,IGC) = Z_SUMK
77  ENDDO
78ENDDO
79
80DO JT = 1,4
81         IPRSM = 0
82         DO IGC = 1,NGC(1)
83            Z_SUMK = 0.0_JPRB
84            DO IPR = 1, NGN(IGC)
85               IPRSM = IPRSM + 1
86               Z_SUMK = Z_SUMK + FORREFO(JT,IPRSM)*RWGT(IPRSM)
87            ENDDO
88            FORREF(JT,IGC) = Z_SUMK
89         ENDDO
90      ENDDO
91
92      DO JT = 1,19
93         IPRSM = 0
94         DO IGC = 1,NGC(1)
95            Z_SUMK1 = 0.0_JPRB
96            Z_SUMK2 = 0.0_JPRB
97            DO IPR = 1, NGN(IGC)
98               IPRSM = IPRSM + 1
99               Z_SUMK1 = Z_SUMK1 + KAO_MN2(JT,IPRSM)*RWGT(IPRSM)
100               Z_SUMK2 = Z_SUMK2 + KBO_MN2(JT,IPRSM)*RWGT(IPRSM)
101            ENDDO
102            KA_MN2(JT,IGC) = Z_SUMK1
103            KB_MN2(JT,IGC) = Z_SUMK2
104         ENDDO
105      ENDDO
106
107IPRSM = 0
108DO IGC = 1,NGC(1)
109  Z_SUMF1 = 0.0_JPRB
110  Z_SUMF2 = 0.0_JPRB
111  DO IPR = 1, NGN(IGC)
112    IPRSM = IPRSM + 1
113
114    Z_SUMF1= Z_SUMF1+ FRACREFAO(IPRSM)
115    Z_SUMF2= Z_SUMF2+ FRACREFBO(IPRSM)
116  ENDDO
117
118  FRACREFA(IGC) = Z_SUMF1
119  FRACREFB(IGC) = Z_SUMF2
120ENDDO
121
122
123IF (LHOOK) CALL DR_HOOK('RRTM_CMBGB1',1,ZHOOK_HANDLE)
124END SUBROUTINE RRTM_CMBGB1
Note: See TracBrowser for help on using the repository browser.