Go to the source code of this file.
◆ k16pgaussleg()
Definition at line 20 of file k16pGaussLeg.f.
References d.
Referenced by clen2thickex(), crigfunc1(), and primdn().
34 real*8 func,
a,
b,
ans 39 real*8 coef(0:16,16), weight(0:16,16)
41 data (coef(
i, 1),
i=0, 0) /
42 * 0.0000000000000000
d+00 /
43 data (weight(
i, 1),
i=0, 0) /
44 * 0.2000000000000000
d+01 /
45 data (coef(
i, 2),
i=1, 1) /
46 * 0.5773502691896257
d+00 /
47 data (weight(
i, 2),
i=1, 1) /
48 * 0.9999999999999998
d+00 /
49 data (coef(
i, 3),
i=0, 1) /
50 * 0.0000000000000000
d+00,
51 * 0.7745966692414832
d+00 /
52 data (weight(
i, 3),
i=0, 1) /
53 * 0.8888888888888888
d+00,
54 * 0.5555555555555558
d+00 /
55 data (coef(
i, 4),
i=1, 2) /
56 * 0.3399810435848563
d+00,
57 * 0.8611363115940525
d+00 /
58 data (weight(
i, 4),
i=1, 2) /
59 * 0.6521451548625459
d+00,
60 * 0.3478548451374539
d+00 /
61 data (coef(
i, 5),
i=0, 2) /
62 * 0.0000000000000000
d+00,
63 * 0.5384693101056831
d+00,
64 * 0.9061798459386639
d+00 /
65 data (weight(
i, 5),
i=0, 2) /
66 * 0.5688888888888888
d+00,
67 * 0.4786286704993666
d+00,
68 * 0.2369268850561892
d+00 /
69 data (coef(
i, 6),
i=1, 3) /
70 * 0.2386191860831969
d+00,
71 * 0.6612093864662644
d+00,
72 * 0.9324695142031520
d+00 /
73 data (weight(
i, 6),
i=1, 3) /
74 * 0.4679139345726909
d+00,
75 * 0.3607615730481386
d+00,
76 * 0.1713244923791703
d+00 /
77 data (coef(
i, 7),
i=0, 3) /
78 * 0.0000000000000000
d+00,
79 * 0.4058451513773972
d+00,
80 * 0.7415311855993944
d+00,
81 * 0.9491079123427584
d+00 /
82 data (weight(
i, 7),
i=0, 3) /
83 * 0.4179591836734694
d+00,
84 * 0.3818300505051189
d+00,
85 * 0.2797053914892767
d+00,
86 * 0.1294849661688699
d+00 /
87 data (coef(
i, 8),
i=1, 4) /
88 * 0.1834346424956498
d+00,
89 * 0.5255324099163289
d+00,
90 * 0.7966664774136267
d+00,
91 * 0.9602898564975361
d+00 /
92 data (weight(
i, 8),
i=1, 4) /
93 * 0.3626837833783622
d+00,
94 * 0.3137066458778873
d+00,
95 * 0.2223810344533746
d+00,
96 * 0.1012285362903763
d+00 /
97 data (coef(
i, 9),
i=0, 4) /
98 * 0.0000000000000000
d+00,
99 * 0.3242534234038089
d+00,
100 * 0.6133714327005903
d+00,
101 * 0.8360311073266357
d+00,
102 * 0.9681602395076260
d+00 /
103 data (weight(
i, 9),
i=0, 4) /
104 * 0.3302393550012598
d+00,
105 * 0.3123470770400028
d+00,
106 * 0.2606106964029356
d+00,
107 * 0.1806481606948573
d+00,
108 * 0.8127438836157435
d-01 /
109 data (coef(
i,10),
i=1, 5) /
110 * 0.1488743389816312
d+00,
111 * 0.4333953941292473
d+00,
112 * 0.6794095682990244
d+00,
113 * 0.8650633666889845
d+00,
114 * 0.9739065285171717
d+00 /
115 data (weight(
i,10),
i=1, 5) /
116 * 0.2955242247147527
d+00,
117 * 0.2692667193099963
d+00,
118 * 0.2190863625159819
d+00,
119 * 0.1494513491505806
d+00,
120 * 0.6667134430868799
d-01 /
121 data (coef(
i,11),
i=0, 5) /
122 * 0.0000000000000000
d+00,
123 * 0.2695431559523450
d+00,
124 * 0.5190961292068118
d+00,
125 * 0.7301520055740493
d+00,
126 * 0.8870625997680953
d+00,
127 * 0.9782286581460569
d+00 /
128 data (weight(
i,11),
i=0, 5) /
129 * 0.2729250867779006
d+00,
130 * 0.2628045445102467
d+00,
131 * 0.2331937645919905
d+00,
132 * 0.1862902109277342
d+00,
133 * 0.1255803694649046
d+00,
134 * 0.5566856711617373
d-01 /
135 data (coef(
i,12),
i=1, 6) /
136 * 0.1252334085114689
d+00,
137 * 0.3678314989981802
d+00,
138 * 0.5873179542866174
d+00,
139 * 0.7699026741943046
d+00,
140 * 0.9041172563704747
d+00,
141 * 0.9815606342467192
d+00 /
142 data (weight(
i,12),
i=1, 6) /
143 * 0.2491470458134029
d+00,
144 * 0.2334925365383548
d+00,
145 * 0.2031674267230659
d+00,
146 * 0.1600783285433463
d+00,
147 * 0.1069393259953185
d+00,
148 * 0.4717533638651187
d-01 /
149 data (coef(
i,13),
i=0, 6) /
150 * 0.0000000000000000
d+00,
151 * 0.2304583159551348
d+00,
152 * 0.4484927510364469
d+00,
153 * 0.6423493394403402
d+00,
154 * 0.8015780907333098
d+00,
155 * 0.9175983992229779
d+00,
156 * 0.9841830547185881
d+00 /
157 data (weight(
i,13),
i=0, 6) /
158 * 0.2325515532308739
d+00,
159 * 0.2262831802628972
d+00,
160 * 0.2078160475368886
d+00,
161 * 0.1781459807619456
d+00,
162 * 0.1388735102197873
d+00,
163 * 0.9212149983772848
d-01,
164 * 0.4048400476531587
d-01 /
165 data (coef(
i,14),
i=1, 7) /
166 * 0.1080549487073436
d+00,
167 * 0.3191123689278898
d+00,
168 * 0.5152486363581540
d+00,
169 * 0.6872929048116854
d+00,
170 * 0.8272013150697650
d+00,
171 * 0.9284348836635735
d+00,
172 * 0.9862838086968123
d+00 /
173 data (weight(
i,14),
i=1, 7) /
174 * 0.2152638534631578
d+00,
175 * 0.2051984637212956
d+00,
176 * 0.1855383974779379
d+00,
177 * 0.1572031671581936
d+00,
178 * 0.1215185706879031
d+00,
179 * 0.8015808715976016
d-01,
180 * 0.3511946033175195
d-01 /
181 data (coef(
i,15),
i=0, 7) /
182 * 0.0000000000000000
d+00,
183 * 0.2011940939974345
d+00,
184 * 0.3941513470775634
d+00,
185 * 0.5709721726085388
d+00,
186 * 0.7244177313601700
d+00,
187 * 0.8482065834104272
d+00,
188 * 0.9372733924007058
d+00,
189 * 0.9879925180204854
d+00 /
190 data (weight(
i,15),
i=0, 7) /
191 * 0.2025782419255613
d+00,
192 * 0.1984314853271116
d+00,
193 * 0.1861610000155623
d+00,
194 * 0.1662692058169940
d+00,
195 * 0.1395706779261542
d+00,
196 * 0.1071592204671719
d+00,
197 * 0.7036604748810814
d-01,
198 * 0.3075324199611710
d-01 /
199 data (coef(
i,16),
i=1, 8) /
200 * 0.9501250983763744
d-01,
201 * 0.2816035507792589
d+00,
202 * 0.4580167776572274
d+00,
203 * 0.6178762444026437
d+00,
204 * 0.7554044083550029
d+00,
205 * 0.8656312023878317
d+00,
206 * 0.9445750230732326
d+00,
207 * 0.9894009349916499
d+00 /
208 data (weight(
i,16),
i=1, 8) /
209 * 0.1894506104550686
d+00,
210 * 0.1826034150449236
d+00,
211 * 0.1691565193950025
d+00,
212 * 0.1495959888165767
d+00,
213 * 0.1246289712555339
d+00,
214 * 0.9515851168249285
d-01,
215 * 0.6225352393864789
d-01,
216 * 0.2715245941175410
d-01 /
218 if(
n .ge. 2 .and.
n .le. 16)
then 222 if (mod(
n,2) .eq. 0)
then 227 ans = weight(0,
n) * func(c1)
232 * weight(
i,
n) * (func(c1 + c2 * coef(
i,
n))
233 * + func(c1 - c2 * coef(
i,
n)))
239 *
'(" k16pGaussLeg: n invalid=",i10)')
atmos%rho(atmos%nodes) **exp(-(z-atmos%z(atmos%nodes))/Hinf) elseif(z .lt. atmos%z(1)) then ans=atmos%rho(1) **exp((atmos%z(1) -z)/atmos%H(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) a=atmos%a(i) if(a .ne. 0.d0) then ans=atmos%rho(i) **(1+a *(z-atmos%z(i))/atmos%H(i)) **(-1.0d0-1.d0/a) else ans=*atmos%rho(i) *exp(-(z-atmos%z(i))/atmos%H(i)) endif endif ! zsave=z ! endif cvh2den=ans end ! ---------------------------------- real *8 function cvh2temp(z) implicit none ! vettical height to temperatur(Kelvin) real *8 z ! input. vertical height in m ! output is temperature of the atmospher in Kelvin real *8 ans integer i if(z .gt. atmos%z(atmos%nodes)) then ans=atmos%T(atmos%nodes) elseif(z .lt. atmos%z(1)) then ans=atmos%T(1)+atmos%b(1) *(z - atmos%z(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) ans=atmos%T(i)+atmos%b(i) *(z-atmos%z(i)) endif cvh2temp=ans end !--------------------------------------------- real *8 function cthick2h(t) implicit none real *8 t ! input. air thickness in kg/m^2 real *8 logt, ans integer i real *8 dod0, fd, a logt=log(t) if(t .ge. atmos%cumd(1)) then ans=atmos%z(1) - *(logt - atmos%logcumd(1)) *atmos%H(1) elseif(t .le. atmos%cumd(atmos%nodes)) then ans=atmos%z(atmos%nodes) - *Hinf *log(t/atmos%cumd(atmos%nodes)) else call kdwhereis(t, atmos%nodes, atmos%cumd, 1, i) ! i is such that X(i) > x >=x(i+1) ans
dE dx *! Nuc Int sampling table d