LMDZ
srtm_init.F90
Go to the documentation of this file.
1 SUBROUTINE srtm_init
2 
3 !-- read in the basic coefficients to configure RRTM_SW
4 !- creates module YOESRTWN with BG, NSPA, NSPB, WAVENUM1, WAVENUM2,
5 ! DELWAVE, PREF, PREFLOG, TREF
6 
7 USE parkind1 ,ONLY : jpim , jprb
8 USE yomhook ,ONLY : lhook, dr_hook
9 
10 USE parsrtm , ONLY : jpg, jpsw
11 USE yoesrtwn , ONLY : ng, ngm, wt, ngc, ngn, rwgt, wtsm
12 
13 IMPLICIT NONE
14 
15 ! Local variables
16 INTEGER(KIND=JPIM) :: IGC, IGCSM, IBND, IG, IND, IPR, IPRSM
17 REAL(KIND=JPRB) :: ZWTSUM
18 
19 REAL(KIND=JPRB) :: ZHOOK_HANDLE
20 
21 #include "susrtm.intfb.h"
22 #include "srtm_kgb16.intfb.h"
23 #include "srtm_kgb17.intfb.h"
24 #include "srtm_kgb18.intfb.h"
25 #include "srtm_kgb19.intfb.h"
26 #include "srtm_kgb20.intfb.h"
27 #include "srtm_kgb21.intfb.h"
28 #include "srtm_kgb22.intfb.h"
29 #include "srtm_kgb23.intfb.h"
30 #include "srtm_kgb24.intfb.h"
31 #include "srtm_kgb25.intfb.h"
32 #include "srtm_kgb26.intfb.h"
33 #include "srtm_kgb27.intfb.h"
34 #include "srtm_kgb28.intfb.h"
35 #include "srtm_kgb29.intfb.h"
36 !#include "susrtop.intfb.h"
37 
38 #include "srtm_cmbgb16.intfb.h"
39 #include "srtm_cmbgb17.intfb.h"
40 #include "srtm_cmbgb18.intfb.h"
41 #include "srtm_cmbgb19.intfb.h"
42 #include "srtm_cmbgb20.intfb.h"
43 #include "srtm_cmbgb21.intfb.h"
44 #include "srtm_cmbgb22.intfb.h"
45 #include "srtm_cmbgb23.intfb.h"
46 #include "srtm_cmbgb24.intfb.h"
47 #include "srtm_cmbgb25.intfb.h"
48 #include "srtm_cmbgb26.intfb.h"
49 #include "srtm_cmbgb27.intfb.h"
50 #include "srtm_cmbgb28.intfb.h"
51 #include "srtm_cmbgb29.intfb.h"
52 
53 IF (lhook) CALL dr_hook('SRTM_INIT',0,zhook_handle)
54 
55 CALL susrtm
56 
57 !-- read in the molecular absorption coefficients
58 
59 CALL srtm_kgb16
60 CALL srtm_kgb17
61 CALL srtm_kgb18
62 CALL srtm_kgb19
63 CALL srtm_kgb20
64 CALL srtm_kgb21
65 CALL srtm_kgb22
66 CALL srtm_kgb23
67 CALL srtm_kgb24
68 CALL srtm_kgb25
69 CALL srtm_kgb26
70 CALL srtm_kgb27
71 CALL srtm_kgb28
72 CALL srtm_kgb29
73 
74 !-- read in the cloud optical properties
75 !- creates module YOESRTOP with EXTLIQ1, SSALIQ1, ASYLIQ1,
76 ! EXTICE3, SSAICE3, ASYICE3, FDLICE3
77 
78 !-- RRTM_SW cloud optical properties are not used
79 ! SRTM_CLDPROP is not called
80 ! no need to call SUSRTOP
81 
82 !CALL SUSRTOP ( -1 )
83 
84 
85 !Mike Iacono 20050804
86 !-- Perform g-point reduction from 16 per band (224 total points) to
87 !-- a band dependent number (112 total points) for all absorption
88 !-- coefficient input data and Planck fraction input data.
89 !-- Compute relative weighting for new g-point combinations.
90 
91 igcsm = 0
92 DO ibnd = 1,jpsw
93  iprsm = 0
94  IF (ngc(ibnd) < jpg) THEN
95  DO igc = 1,ngc(ibnd)
96  igcsm = igcsm + 1
97  zwtsum = 0.
98  DO ipr = 1, ngn(igcsm)
99  iprsm = iprsm + 1
100  zwtsum = zwtsum + wt(iprsm)
101  ENDDO
102  wtsm(igc) = zwtsum
103  ENDDO
104 
105  DO ig = 1,ng(ibnd+15)
106  ind = (ibnd-1)*jpg + ig
107  rwgt(ind) = wt(ig)/wtsm(ngm(ind))
108  ENDDO
109  ELSE
110  DO ig = 1,ng(ibnd+15)
111  igcsm = igcsm + 1
112  ind = (ibnd-1)*jpg + ig
113  rwgt(ind) = 1.0
114  ENDDO
115  ENDIF
116 ENDDO
117 
118 CALL srtm_cmbgb16
119 CALL srtm_cmbgb17
120 CALL srtm_cmbgb18
121 CALL srtm_cmbgb19
122 CALL srtm_cmbgb20
123 CALL srtm_cmbgb21
124 CALL srtm_cmbgb22
125 CALL srtm_cmbgb23
126 CALL srtm_cmbgb24
127 CALL srtm_cmbgb25
128 CALL srtm_cmbgb26
129 CALL srtm_cmbgb27
130 CALL srtm_cmbgb28
131 CALL srtm_cmbgb29
132 
133 !-----------------------------------------------------------------------
134 IF (lhook) CALL dr_hook('SRTM_INIT',1,zhook_handle)
135 END SUBROUTINE srtm_init
136 
integer(kind=jpim), parameter jpsw
Definition: parsrtm.F90:23
subroutine srtm_kgb21
Definition: srtm_kgb21.F90:7
integer(kind=jpim), dimension(112) ngn
Definition: yoesrtwn.F90:27
integer(kind=jpim), dimension(224) ngm
Definition: yoesrtwn.F90:24
real(kind=jprb), dimension(16) wt
Definition: yoesrtwn.F90:31
subroutine srtm_cmbgb20
Definition: srtm_cmbgb20.F90:2
subroutine srtm_kgb23
Definition: srtm_kgb23.F90:6
subroutine srtm_kgb24
Definition: srtm_kgb24.F90:7
subroutine srtm_kgb19
Definition: srtm_kgb19.F90:7
real(kind=jprb), dimension(224) rwgt
Definition: yoesrtwn.F90:32
subroutine srtm_cmbgb25
Definition: srtm_cmbgb25.F90:2
subroutine srtm_kgb28
Definition: srtm_kgb28.F90:7
subroutine srtm_kgb27
Definition: srtm_kgb27.F90:6
subroutine srtm_cmbgb29
Definition: srtm_cmbgb29.F90:2
subroutine srtm_cmbgb24
Definition: srtm_cmbgb24.F90:2
subroutine srtm_kgb22
Definition: srtm_kgb22.F90:7
subroutine srtm_cmbgb18
Definition: srtm_cmbgb18.F90:2
subroutine srtm_cmbgb21
Definition: srtm_cmbgb21.F90:2
integer, parameter jprb
Definition: parkind1.F90:31
subroutine srtm_kgb16
Definition: srtm_kgb16.F90:7
subroutine srtm_cmbgb17
Definition: srtm_cmbgb17.F90:2
subroutine srtm_kgb17
Definition: srtm_kgb17.F90:7
subroutine srtm_cmbgb16
Definition: srtm_cmbgb16.F90:2
subroutine srtm_kgb29
Definition: srtm_kgb29.F90:6
subroutine srtm_init
Definition: srtm_init.F90:2
subroutine srtm_cmbgb22
Definition: srtm_cmbgb22.F90:2
subroutine srtm_cmbgb27
Definition: srtm_cmbgb27.F90:2
subroutine srtm_cmbgb26
Definition: srtm_cmbgb26.F90:2
logical lhook
Definition: yomhook.F90:12
subroutine srtm_kgb25
Definition: srtm_kgb25.F90:6
subroutine susrtm
Definition: susrtm.F90:2
subroutine srtm_cmbgb28
Definition: srtm_cmbgb28.F90:2
subroutine dr_hook(CDNAME, KSWITCH, PKEY)
Definition: yomhook.F90:17
integer(kind=jpim), dimension(16:29) ng
Definition: yoesrtwn.F90:11
subroutine srtm_kgb20
Definition: srtm_kgb20.F90:6
subroutine srtm_cmbgb23
Definition: srtm_cmbgb23.F90:2
integer, parameter jpim
Definition: parkind1.F90:13
real(kind=jprb), dimension(16) wtsm
Definition: yoesrtwn.F90:31
subroutine srtm_kgb18
Definition: srtm_kgb18.F90:7
subroutine srtm_kgb26
Definition: srtm_kgb26.F90:6
integer(kind=jpim), parameter jpg
Definition: parsrtm.F90:21
subroutine srtm_cmbgb19
Definition: srtm_cmbgb19.F90:2
integer(kind=jpim), dimension(14) ngc
Definition: yoesrtwn.F90:25