19 double precision ::
t_aia(1:101)
22 double precision ::
f_335(1:101)
35 data t_aia / 4. , 4.05, 4.1, 4.15, 4.2, 4.25, 4.3, 4.35, &
36 4.4, 4.45, 4.5, 4.55, 4.6, 4.65, 4.7, 4.75, &
37 4.8, 4.85, 4.9, 4.95, 5. , 5.05, 5.1, 5.15, &
38 5.2, 5.25, 5.3, 5.35, 5.4, 5.45, 5.5, 5.55, &
39 5.6, 5.65, 5.7, 5.75, 5.8, 5.85, 5.9, 5.95, &
40 6. , 6.05, 6.1, 6.15, 6.2, 6.25, 6.3, 6.35, &
41 6.4, 6.45, 6.5, 6.55, 6.6, 6.65, 6.7, 6.75, &
42 6.8, 6.85, 6.9, 6.95, 7. , 7.05, 7.1, 7.15, &
43 7.2, 7.25, 7.3, 7.35, 7.4, 7.45, 7.5, 7.55, &
44 7.6, 7.65, 7.7, 7.75, 7.8, 7.85, 7.9, 7.95, &
45 8. , 8.05, 8.1, 8.15, 8.2, 8.25, 8.3, 8.35, &
46 8.4, 8.45, 8.5, 8.55, 8.6, 8.65, 8.7, 8.75, &
47 8.8, 8.85, 8.9, 8.95, 9. /
49 data f_94 / 4.25022959
d-37, 4.35880298
d-36, 3.57054296
d-35, 2.18175426
d-34, &
50 8.97592571
d-34, 2.68512961
d-33, 7.49559346
d-33, 2.11603751
d-32, &
51 5.39752853
d-32, 1.02935904
d-31, 1.33822307
d-31, 1.40884290
d-31, &
52 1.54933156
d-31, 2.07543102
d-31, 3.42026227
d-31, 6.31171444
d-31, &
53 1.16559416
d-30, 1.95360497
d-30, 2.77818735
d-30, 3.43552578
d-30, &
54 4.04061803
d-30, 4.75470982
d-30, 5.65553769
d-30, 6.70595782
d-30, &
55 7.80680354
d-30, 8.93247715
d-30, 1.02618156
d-29, 1.25979030
d-29, &
56 1.88526483
d-29, 3.62448572
d-29, 7.50553279
d-29, 1.42337571
d-28, &
57 2.37912813
d-28, 3.55232305
d-28, 4.84985757
d-28, 6.20662827
d-28, &
58 7.66193687
d-28, 9.30403645
d-28, 1.10519802
d-27, 1.25786927
d-27, &
59 1.34362634
d-27, 1.33185242
d-27, 1.22302081
d-27, 1.05677973
d-27, &
60 9.23064720
d-28, 8.78570994
d-28, 8.02397416
d-28, 5.87681142
d-28, &
61 3.82272695
d-28, 3.11492649
d-28, 3.85736090
d-28, 5.98893519
d-28, &
62 9.57553548
d-28, 1.46650267
d-27, 2.10365847
d-27, 2.79406671
d-27, &
63 3.39420087
d-27, 3.71077520
d-27, 3.57296767
d-27, 2.95114380
d-27, &
64 2.02913103
d-27, 1.13361825
d-27, 5.13405629
d-28, 2.01305089
d-28, &
65 8.15781482
d-29, 4.28366817
d-29, 3.08701543
d-29, 2.68693906
d-29, &
66 2.51764203
d-29, 2.41773103
d-29, 2.33996083
d-29, 2.26997246
d-29, &
67 2.20316143
d-29, 2.13810001
d-29, 2.07424438
d-29, 2.01149189
d-29, &
68 1.94980213
d-29, 1.88917920
d-29, 1.82963583
d-29, 1.77116920
d-29, &
69 1.71374392
d-29, 1.65740593
d-29, 1.60214447
d-29, 1.54803205
d-29, &
70 1.49510777
d-29, 1.44346818
d-29, 1.39322305
d-29, 1.34441897
d-29, &
71 1.29713709
d-29, 1.25132618
d-29, 1.20686068
d-29, 1.14226584
d-29, &
72 1.09866413
d-29, 1.05635524
d-29, 1.01532444
d-29, 9.75577134
d-30, &
73 9.37102736
d-30, 8.99873335
d-30, 8.63860172
d-30, 8.29051944
d-30, &
76 data f_131 / 3.18403601
d-37, 3.22254703
d-36, 2.61657920
d-35, &
77 1.59575286
d-34, 6.65779556
d-34, 2.07015132
d-33, &
78 6.05768615
d-33, 1.76074833
d-32, 4.52633001
d-32, &
79 8.57121883
d-32, 1.09184271
d-31, 1.10207963
d-31, &
80 1.11371658
d-31, 1.29105226
d-31, 1.80385897
d-31, &
81 3.27295431
d-31, 8.92002136
d-31, 3.15214579
d-30, &
82 9.73440787
d-30, 2.22709702
d-29, 4.01788984
d-29, &
83 6.27471832
d-29, 8.91764995
d-29, 1.18725647
d-28, &
84 1.52888040
d-28, 2.05082946
d-28, 3.47651873
d-28, &
85 8.80482184
d-28, 2.66533063
d-27, 7.05805149
d-27, &
86 1.46072515
d-26, 2.45282476
d-26, 3.55303726
d-26, &
87 4.59075911
d-26, 5.36503515
d-26, 5.68444094
d-26, &
88 5.47222296
d-26, 4.81119761
d-26, 3.85959059
d-26, &
89 2.80383406
d-26, 1.83977650
d-26, 1.11182849
d-26, &
90 6.50748885
d-27, 3.96843481
d-27, 2.61876319
d-27, &
91 1.85525324
d-27, 1.39717024
d-27, 1.11504283
d-27, &
92 9.38169611
d-28, 8.24801234
d-28, 7.43331919
d-28, &
93 6.74537063
d-28, 6.14495760
d-28, 5.70805277
d-28, &
94 5.61219786
d-28, 6.31981777
d-28, 9.19747307
d-28, &
95 1.76795732
d-27, 3.77985446
d-27, 7.43166191
d-27, &
96 1.19785603
d-26, 1.48234676
d-26, 1.36673114
d-26, &
97 9.61047146
d-27, 5.61209353
d-27, 3.04779780
d-27, &
98 1.69378976
d-27, 1.02113491
d-27, 6.82223774
d-28, &
99 5.02099099
d-28, 3.99377760
d-28, 3.36279037
d-28, &
100 2.94767378
d-28, 2.65740865
d-28, 2.44396277
d-28, &
101 2.28003967
d-28, 2.14941419
d-28, 2.04178995
d-28, &
102 1.95031045
d-28, 1.87011994
d-28, 1.79777869
d-28, &
103 1.73093957
d-28, 1.66795789
d-28, 1.60785455
d-28, &
104 1.55002399
d-28, 1.49418229
d-28, 1.44022426
d-28, &
105 1.38807103
d-28, 1.33772767
d-28, 1.28908404
d-28, &
106 1.24196208
d-28, 1.17437501
d-28, 1.12854330
d-28, &
107 1.08410498
d-28, 1.04112003
d-28, 9.99529904
d-29, &
108 9.59358806
d-29, 9.20512291
d-29, 8.83009123
d-29, &
109 8.46817043
d-29, 8.11921928
d-29 /
111 data f_171 / 2.98015581
d-42, 1.24696230
d-40, 3.37614652
d-39, 5.64103034
d-38, &
112 5.20550266
d-37, 2.77785939
d-36, 1.16283616
d-35, 6.50007689
d-35, &
113 9.96177399
d-34, 1.89586076
d-32, 2.10982799
d-31, 1.36946479
d-30, &
114 6.27396553
d-30, 2.29955134
d-29, 7.13430211
d-29, 1.91024282
d-28, &
115 4.35358848
d-28, 7.94807808
d-28, 1.07431875
d-27, 1.08399488
d-27, &
116 9.16212938
d-28, 7.34715770
d-28, 6.59246382
d-28, 9.13541375
d-28, &
117 2.05939035
d-27, 5.08206555
d-27, 1.10148083
d-26, 2.01884662
d-26, &
118 3.13578384
d-26, 4.14367719
d-26, 5.36067711
d-26, 8.74170213
d-26, &
119 1.64161233
d-25, 2.94587860
d-25, 4.76298332
d-25, 6.91765639
d-25, &
120 9.08825111
d-25, 1.08496183
d-24, 1.17440114
d-24, 1.13943939
d-24, &
121 9.71696981
d-25, 7.09593688
d-25, 4.31376399
d-25, 2.12708486
d-25, &
122 8.47429567
d-26, 3.17608104
d-26, 1.95898842
d-26, 1.98064242
d-26, &
123 1.67706555
d-26, 8.99126003
d-27, 3.29773878
d-27, 1.28896127
d-27, &
124 8.51169698
d-28, 7.53520167
d-28, 6.18268143
d-28, 4.30034650
d-28, &
125 2.78152409
d-28, 1.95437088
d-28, 1.65896278
d-28, 1.68740181
d-28, &
126 1.76054383
d-28, 1.63978419
d-28, 1.32880591
d-28, 1.00833205
d-28, &
127 7.82252806
d-29, 6.36181741
d-29, 5.34633869
d-29, 4.58013864
d-29, &
128 3.97833422
d-29, 3.49414760
d-29, 3.09790940
d-29, 2.76786227
d-29, &
129 2.48806269
d-29, 2.24823367
d-29, 2.04016653
d-29, 1.85977413
d-29, &
130 1.70367499
d-29, 1.56966125
d-29, 1.45570643
d-29, 1.35964565
d-29, &
131 1.27879263
d-29, 1.21016980
d-29, 1.15132499
d-29, 1.09959628
d-29, &
132 1.05307482
d-29, 1.01040261
d-29, 9.70657096
d-30, 9.33214234
d-30, &
133 8.97689427
d-30, 8.63761192
d-30, 8.31149879
d-30, 7.85162401
d-30, &
134 7.53828281
d-30, 7.23559452
d-30, 6.94341530
d-30, 6.66137038
d-30, &
135 6.38929156
d-30, 6.12669083
d-30, 5.87346434
d-30, 5.62943622
d-30, &
138 data f_193 / 6.40066486
d-32, 4.92737300
d-31, 2.95342934
d-30, 1.28061594
d-29, &
139 3.47747667
d-29, 5.88554792
d-29, 7.72171179
d-29, 9.75609282
d-29, &
140 1.34318963
d-28, 1.96252638
d-28, 2.70163878
d-28, 3.63192965
d-28, &
141 5.28087341
d-28, 8.37821446
d-28, 1.39089159
d-27, 2.31749718
d-27, &
142 3.77510689
d-27, 5.85198594
d-27, 8.26021568
d-27, 1.04870405
d-26, &
143 1.25209374
d-26, 1.47406787
d-26, 1.77174067
d-26, 2.24098537
d-26, &
144 3.05926105
d-26, 4.50018853
d-26, 6.84720216
d-26, 1.00595861
d-25, &
145 1.30759222
d-25, 1.36481773
d-25, 1.15943558
d-25, 1.01467304
d-25, &
146 1.04092532
d-25, 1.15071251
d-25, 1.27416033
d-25, 1.38463476
d-25, &
147 1.47882726
d-25, 1.57041238
d-25, 1.69786224
d-25, 1.94970397
d-25, &
148 2.50332918
d-25, 3.58321431
d-25, 5.18061550
d-25, 6.60405549
d-25, &
149 6.64085365
d-25, 4.83825816
d-25, 2.40545020
d-25, 8.59534098
d-26, &
150 2.90920638
d-26, 1.33204845
d-26, 9.03933926
d-27, 7.78910836
d-27, &
151 7.29342321
d-27, 7.40267022
d-27, 8.05279981
d-27, 8.13829291
d-27, &
152 6.92634262
d-27, 5.12521880
d-27, 3.59527615
d-27, 2.69617560
d-27, &
153 2.84432713
d-27, 5.06697306
d-27, 1.01281903
d-26, 1.63526978
d-26, &
154 2.06759342
d-26, 2.19482312
d-26, 2.10050611
d-26, 1.89837248
d-26, &
155 1.66347131
d-26, 1.43071097
d-26, 1.21518419
d-26, 1.02078343
d-26, &
156 8.46936184
d-27, 6.93015742
d-27, 5.56973237
d-27, 4.38951754
d-27, &
157 3.38456457
d-27, 2.55309556
d-27, 1.88904224
d-27, 1.38057546
d-27, &
158 1.00718330
d-27, 7.43581116
d-28, 5.63562931
d-28, 4.43359435
d-28, &
159 3.63923535
d-28, 3.11248143
d-28, 2.75586846
d-28, 2.50672237
d-28, &
160 2.32419348
d-28, 2.18325682
d-28, 2.06834486
d-28, 1.93497044
d-28, &
161 1.84540751
d-28, 1.76356504
d-28, 1.68741425
d-28, 1.61566157
d-28, &
162 1.54754523
d-28, 1.48249410
d-28, 1.42020176
d-28, 1.36045230
d-28, &
165 data f_211 / 4.74439912
d-42, 1.95251522
d-40, 5.19700194
d-39, 8.53120166
d-38, &
166 7.72745727
d-37, 4.04158559
d-36, 1.64853511
d-35, 8.56295439
d-35, &
167 1.17529722
d-33, 2.16867729
d-32, 2.40472264
d-31, 1.56418133
d-30, &
168 7.20032889
d-30, 2.65838271
d-29, 8.33196904
d-29, 2.26128236
d-28, &
169 5.24295811
d-28, 9.77791121
d-28, 1.35913489
d-27, 1.43957785
d-27, &
170 1.37591544
d-27, 1.49029886
d-27, 2.06183401
d-27, 3.31440622
d-27, &
171 5.42497318
d-27, 8.41100374
d-27, 1.17941366
d-26, 1.49269794
d-26, &
172 1.71506074
d-26, 1.71266353
d-26, 1.51434781
d-26, 1.36766622
d-26, &
173 1.33483562
d-26, 1.36834518
d-26, 1.45829002
d-26, 1.62575306
d-26, &
174 1.88773347
d-26, 2.22026986
d-26, 2.54930499
d-26, 2.80758138
d-26, &
175 3.06176409
d-26, 3.62799792
d-26, 5.13226109
d-26, 8.46260744
d-26, &
176 1.38486586
d-25, 1.86192535
d-25, 1.78007934
d-25, 1.16548409
d-25, &
177 5.89293257
d-26, 2.69952884
d-26, 1.24891081
d-26, 6.41273176
d-27, &
178 4.08282914
d-27, 3.26463328
d-27, 2.76230280
d-27, 2.08986882
d-27, &
179 1.37658470
d-27, 8.48489381
d-28, 5.19304217
d-28, 3.19312514
d-28, &
180 2.02968197
d-28, 1.50171666
d-28, 1.39164218
d-28, 1.42448821
d-28, &
181 1.41714519
d-28, 1.33341059
d-28, 1.20759270
d-28, 1.07259692
d-28, &
182 9.44895400
d-29, 8.29030041
d-29, 7.25440631
d-29, 6.33479483
d-29, &
183 5.51563757
d-29, 4.79002469
d-29, 4.14990482
d-29, 3.59384972
d-29, &
184 3.12010860
d-29, 2.72624742
d-29, 2.40734791
d-29, 2.15543565
d-29, &
185 1.95921688
d-29, 1.80682882
d-29, 1.68695662
d-29, 1.59020936
d-29, &
186 1.50940886
d-29, 1.43956179
d-29, 1.37731622
d-29, 1.32049043
d-29, &
187 1.26771875
d-29, 1.21803879
d-29, 1.17074716
d-29, 1.10507836
d-29, &
188 1.06022834
d-29, 1.01703080
d-29, 9.75436986
d-30, 9.35349257
d-30, &
189 8.96744546
d-30, 8.59527489
d-30, 8.23678940
d-30, 7.89144480
d-30, &
192 data f_304 / 3.62695850
d-32, 2.79969087
d-31, 1.68340584
d-30, 7.32681440
d-30, &
193 1.99967770
d-29, 3.41296785
d-29, 4.55409104
d-29, 5.94994635
d-29, &
194 8.59864963
d-29, 1.39787633
d-28, 3.17701965
d-28, 1.14474920
d-27, &
195 4.44845958
d-27, 1.54785841
d-26, 4.70265345
d-26, 1.24524365
d-25, &
196 2.81535352
d-25, 5.10093666
d-25, 6.83545307
d-25, 6.82110329
d-25, &
197 5.66886188
d-25, 4.36205513
d-25, 3.29265688
d-25, 2.49802368
d-25, &
198 1.92527113
d-25, 1.51058572
d-25, 1.20596047
d-25, 9.76884267
d-26, &
199 7.89979266
d-26, 6.18224289
d-26, 4.67298332
d-26, 3.57934505
d-26, &
200 2.84535785
d-26, 2.32853022
d-26, 1.95228514
d-26, 1.67880071
d-26, &
201 1.47608785
d-26, 1.32199691
d-26, 1.20070960
d-26, 1.09378177
d-26, &
202 1.00031730
d-26, 9.62434001
d-27, 1.05063954
d-26, 1.27267143
d-26, &
203 1.45923057
d-26, 1.36746707
d-26, 1.03466970
d-26, 6.97647829
d-27, &
204 4.63141039
d-27, 3.19031994
d-27, 2.33373613
d-27, 1.81589079
d-27, &
205 1.48446917
d-27, 1.26611478
d-27, 1.12617468
d-27, 1.03625148
d-27, &
206 9.61400595
d-28, 8.79016231
d-28, 7.82612130
d-28, 6.73762960
d-28, &
207 5.59717956
d-28, 4.53010243
d-28, 3.65712196
d-28, 3.00958686
d-28, &
208 2.54011502
d-28, 2.18102277
d-28, 1.88736437
d-28, 1.63817539
d-28, &
209 1.42283147
d-28, 1.23631916
d-28, 1.07526003
d-28, 9.36797928
d-29, &
210 8.18565660
d-29, 7.18152734
d-29, 6.32523238
d-29, 5.59513985
d-29, &
211 4.96614048
d-29, 4.42518826
d-29, 3.95487628
d-29, 3.54690294
d-29, &
212 3.18953930
d-29, 2.87720933
d-29, 2.60186750
d-29, 2.36011522
d-29, &
213 2.14717806
d-29, 1.95905217
d-29, 1.79287981
d-29, 1.64562262
d-29, &
214 1.51489425
d-29, 1.39876064
d-29, 1.29496850
d-29, 1.18665438
d-29, &
215 1.10240474
d-29, 1.02643099
d-29, 9.57780996
d-30, 8.95465151
d-30, &
216 8.38950190
d-30, 7.87283711
d-30, 7.40136507
d-30, 6.96804279
d-30, &
219 data f_335 / 2.46882661
d-32, 1.89476632
d-31, 1.13216502
d-30, 4.89532008
d-30, &
220 1.32745970
d-29, 2.25390335
d-29, 3.00511672
d-29, 3.96035934
d-29, &
221 5.77977656
d-29, 8.58600736
d-29, 1.14083000
d-28, 1.48644411
d-28, &
222 2.15788823
d-28, 3.51628877
d-28, 6.12200698
d-28, 1.08184987
d-27, &
223 1.85590697
d-27, 2.91679107
d-27, 3.94405396
d-27, 4.63610680
d-27, &
224 5.13824456
d-27, 5.66602209
d-27, 6.30009232
d-27, 7.03422868
d-27, &
225 7.77973918
d-27, 8.32371831
d-27, 8.56724316
d-27, 8.62601374
d-27, &
226 8.13308844
d-27, 6.53188216
d-27, 4.55197029
d-27, 3.57590087
d-27, &
227 3.59571707
d-27, 4.03502770
d-27, 4.54366411
d-27, 4.96914990
d-27, &
228 5.24601170
d-27, 5.39979250
d-27, 5.43023669
d-27, 5.26235042
d-27, &
229 4.91585495
d-27, 4.52628362
d-27, 4.13385020
d-27, 3.67538967
d-27, &
230 3.39939742
d-27, 3.81284533
d-27, 5.02332701
d-27, 6.19438602
d-27, &
231 6.49613071
d-27, 6.04010475
d-27, 5.24664275
d-27, 4.37225997
d-27, &
232 3.52957182
d-27, 2.76212276
d-27, 2.08473158
d-27, 1.50850518
d-27, &
233 1.04602472
d-27, 7.13091243
d-28, 5.34289645
d-28, 5.21079581
d-28, &
234 6.22246365
d-28, 6.99555864
d-28, 6.29665489
d-28, 4.45077026
d-28, &
235 2.67046793
d-28, 1.52774686
d-28, 9.18061770
d-29, 6.09116074
d-29, &
236 4.48562572
d-29, 3.59463696
d-29, 3.05820218
d-29, 2.70766652
d-29, &
237 2.46144034
d-29, 2.27758450
d-29, 2.13331183
d-29, 2.01537836
d-29, &
238 1.91566180
d-29, 1.82893912
d-29, 1.75167748
d-29, 1.68136168
d-29, &
239 1.61615595
d-29, 1.55481846
d-29, 1.49643236
d-29, 1.44046656
d-29, &
240 1.38657085
d-29, 1.33459068
d-29, 1.28447380
d-29, 1.23615682
d-29, &
241 1.18963296
d-29, 1.14478976
d-29, 1.10146637
d-29, 1.04039479
d-29, &
242 9.98611410
d-30, 9.58205147
d-30, 9.19202009
d-30, 8.81551313
d-30, &
243 8.45252127
d-30, 8.10224764
d-30, 7.76469090
d-30, 7.43954323
d-30, &
249 data t_iris / 4. , 4.1 , 4.2 , 4.3 , 4.40000001, &
250 4.50000001, 4.60000001, 4.70000001, 4.80000001, 4.90000001, &
251 5.00000001, 5.10000002, 5.20000002, 5.30000002, 5.40000002, &
252 5.50000002, 5.60000002, 5.70000003, 5.80000003, 5.90000003, &
253 6.00000003, 6.10000003, 6.20000003, 6.30000003, 6.40000004, &
254 6.50000004, 6.60000004, 6.70000004, 6.80000004, 6.90000004, &
255 7.00000004, 7.10000005, 7.20000005, 7.30000005, 7.40000005, &
256 7.50000005, 7.60000005, 7.70000006, 7.80000006, 7.90000006, &
259 data f_1354 / 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, &
260 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, &
261 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, &
262 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, &
263 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, &
264 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, 1.09503647
d-39, &
265 5.47214550
d-36, 2.42433983
d-33, 2.75295034
d-31, 1.21929718
d-29, &
266 2.48392125
d-28, 2.33268145
d-27, 8.68623633
d-27, 1.00166284
d-26, &
267 3.63126633
d-27, 7.45174807
d-28, 1.38224064
d-28, 2.69270994
d-29, &
268 5.53314977
d-30, 1.15313092
d-30, 2.34195788
d-31, 4.48242942
d-32, &
274 data t_eis1 / 1.99526231
d+05, 2.23872114
d+05, 2.51188643
d+05, 2.81838293
d+05, &
275 3.16227766
d+05, 3.54813389
d+05, 3.98107171
d+05, 4.46683592
d+05, &
276 5.01187234
d+05, 5.62341325
d+05, 6.30957344
d+05, 7.07945784
d+05, &
277 7.94328235
d+05, 8.91250938
d+05, 1.00000000
d+06, 1.12201845
d+06, &
278 1.25892541
d+06, 1.41253754
d+06, 1.58489319
d+06, 1.77827941
d+06, &
279 1.99526231
d+06, 2.23872114
d+06, 2.51188643
d+06, 2.81838293
d+06, &
280 3.16227766
d+06, 3.54813389
d+06, 3.98107171
d+06, 4.46683592
d+06, &
281 5.01187234
d+06, 5.62341325
d+06, 6.30957344
d+06, 7.07945784
d+06, &
282 7.94328235
d+06, 8.91250938
d+06, 1.00000000
d+07, 1.12201845
d+07, &
283 1.25892541
d+07, 1.41253754
d+07, 1.58489319
d+07, 1.77827941
d+07, &
284 1.99526231
d+07, 2.23872114
d+07, 2.51188643
d+07, 2.81838293
d+07, &
285 3.16227766
d+07, 3.54813389
d+07, 3.98107171
d+07, 4.46683592
d+07, &
286 5.01187234
d+07, 5.62341325
d+07, 6.30957344
d+07, 7.07945784
d+07, &
287 7.94328235
d+07, 8.91250938
d+07, 1.00000000
d+08, 1.12201845
d+08, &
288 1.25892541
d+08, 1.41253754
d+08, 1.58489319
d+08, 1.77827941
d+08 /
290 data t_eis2 / 1.99526231
d+06, 2.23872114
d+06, 2.51188643
d+06, 2.81838293
d+06, &
291 3.16227766
d+06, 3.54813389
d+06, 3.98107171
d+06, 4.46683592
d+06, &
292 5.01187234
d+06, 5.62341325
d+06, 6.30957344
d+06, 7.07945784
d+06, &
293 7.94328235
d+06, 8.91250938
d+06, 1.00000000
d+07, 1.12201845
d+07, &
294 1.25892541
d+07, 1.41253754
d+07, 1.58489319
d+07, 1.77827941
d+07, &
295 1.99526231
d+07, 2.23872114
d+07, 2.51188643
d+07, 2.81838293
d+07, &
296 3.16227766
d+07, 3.54813389
d+07, 3.98107171
d+07, 4.46683592
d+07, &
297 5.01187234
d+07, 5.62341325
d+07, 6.30957344
d+07, 7.07945784
d+07, &
298 7.94328235
d+07, 8.91250938
d+07, 1.00000000
d+08, 1.12201845
d+08, &
299 1.25892541
d+08, 1.41253754
d+08, 1.58489319
d+08, 1.77827941
d+08, &
300 1.99526231
d+08, 2.23872114
d+08, 2.51188643
d+08, 2.81838293
d+08, &
301 3.16227766
d+08, 3.54813389
d+08, 3.98107171
d+08, 4.46683592
d+08, &
302 5.01187234
d+08, 5.62341325
d+08, 6.30957344
d+08, 7.07945784
d+08, &
303 7.94328235
d+08, 8.91250938
d+08, 1.00000000
d+09, 1.12201845
d+09, &
304 1.25892541
d+09, 1.41253754
d+09, 1.58489319
d+09, 1.77827941
d+09 /
306 data f_263 / 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, &
307 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, &
308 0.00000000
d+00, 4.46454917
d-45, 3.26774829
d-42, 1.25292566
d-39, &
309 2.66922338
d-37, 3.28497742
d-35, 2.38677554
d-33, 1.03937729
d-31, &
310 2.75075687
d-30, 4.47961733
d-29, 4.46729177
d-28, 2.64862689
d-27, &
311 8.90863800
d-27, 1.72437548
d-26, 2.22217752
d-26, 2.27999477
d-26, &
312 2.08264363
d-26, 1.78226687
d-26, 1.45821699
d-26, 1.14675379
d-26, &
313 8.63082492
d-27, 6.15925429
d-27, 4.11252514
d-27, 2.51530564
d-27, &
314 1.37090986
d-27, 6.42443134
d-28, 2.48392636
d-28, 7.59187874
d-29, &
315 1.77852938
d-29, 3.23945221
d-30, 4.90533903
d-31, 6.75458158
d-32, &
316 9.06878868
d-33, 1.23927474
d-33, 1.75769395
d-34, 2.60710914
d-35, &
317 4.04318030
d-36, 6.53500581
d-37, 1.09365022
d-37, 1.88383322
d-38, &
318 3.31425233
d-39, 5.90964084
d-40, 1.06147549
d-40, 1.90706170
d-41, &
319 3.41331584
d-42, 6.07310718
d-43, 1.07364738
d-43, 1.89085498
d-44, &
320 3.32598922
d-45, 5.87125640
d-46, 0.00000000
d+00, 0.00000000
d+00 /
322 data f_264 / 0.00000000
d+00, 2.81670057
d-46, 1.28007268
d-43, 2.54586603
d-41, &
323 2.67887256
d-39, 1.68413285
d-37, 6.85702304
d-36, 1.91797284
d-34, &
324 3.84675839
d-33, 5.69939170
d-32, 6.36224608
d-31, 5.39176489
d-30, &
325 3.45478458
d-29, 1.64848693
d-28, 5.71476364
d-28, 1.39909997
d-27, &
326 2.37743056
d-27, 2.86712530
d-27, 2.65206348
d-27, 2.07175767
d-27, &
327 1.47866767
d-27, 1.01087374
d-27, 6.79605811
d-28, 4.54746770
d-28, &
328 3.04351751
d-28, 2.03639149
d-28, 1.35940991
d-28, 9.01451939
d-29, &
329 5.91289972
d-29, 3.81821178
d-29, 2.41434696
d-29, 1.48871220
d-29, &
330 8.93362094
d-30, 5.21097445
d-30, 2.95964719
d-30, 1.64278748
d-30, &
331 8.95571660
d-31, 4.82096011
d-31, 2.57390991
d-31, 1.36821781
d-31, &
332 7.27136350
d-32, 3.87019426
d-32, 2.06883430
d-32, 1.11228884
d-32, &
333 6.01883313
d-33, 3.27790676
d-33, 1.79805012
d-33, 9.93085346
d-34, &
334 5.52139556
d-34, 3.08881387
d-34, 1.73890315
d-34, 9.84434964
d-35, &
335 5.60603378
d-35, 3.20626492
d-35, 1.84111068
d-35, 0.00000000
d+00, &
336 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00 /
338 data f_192 / 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, 4.35772105
d-44, &
339 1.26162319
d-41, 1.97471205
d-39, 1.83409019
d-37, 1.08206288
d-35, &
340 4.27914363
d-34, 1.17943846
d-32, 2.32565755
d-31, 3.33087991
d-30, &
341 3.47013260
d-29, 2.60375866
d-28, 1.37737127
d-27, 5.01053913
d-27, &
342 1.23479810
d-26, 2.11310542
d-26, 2.71831513
d-26, 2.89851163
d-26, &
343 2.77312376
d-26, 2.50025229
d-26, 2.18323661
d-26, 1.86980322
d-26, &
344 1.58035034
d-26, 1.31985651
d-26, 1.08733133
d-26, 8.81804906
d-27, &
345 7.00417973
d-27, 5.43356567
d-27, 4.09857884
d-27, 2.99651764
d-27, &
346 2.11902962
d-27, 1.45014127
d-27, 9.62291023
d-28, 6.21548647
d-28, &
347 3.92807578
d-28, 2.44230375
d-28, 1.50167782
d-28, 9.17611405
d-29, &
348 5.58707641
d-29, 3.40570915
d-29, 2.08030862
d-29, 1.27588676
d-29, &
349 7.86535588
d-30, 4.87646151
d-30, 3.03888897
d-30, 1.90578649
d-30, &
350 1.20195947
d-30, 7.61955060
d-31, 4.85602199
d-31, 3.11049969
d-31, &
351 2.00087065
d-31, 1.29223740
d-31, 8.37422008
d-32, 0.00000000
d+00, &
352 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00 /
354 data f_255 / 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, 1.76014287
d-44, &
355 5.07057938
d-42, 7.90473970
d-40, 7.31852999
d-38, 4.30709255
d-36, &
356 1.70009061
d-34, 4.67925160
d-33, 9.21703546
d-32, 1.31918676
d-30, &
357 1.37393161
d-29, 1.03102379
d-28, 5.45694018
d-28, 1.98699648
d-27, &
358 4.90346776
d-27, 8.40524725
d-27, 1.08321456
d-26, 1.15714525
d-26, &
359 1.10905152
d-26, 1.00155023
d-26, 8.75799161
d-27, 7.50935839
d-27, &
360 6.35253533
d-27, 5.30919268
d-27, 4.37669455
d-27, 3.55185164
d-27, &
361 2.82347055
d-27, 2.19257595
d-27, 1.65589541
d-27, 1.21224987
d-27, &
362 8.58395132
d-28, 5.88163935
d-28, 3.90721447
d-28, 2.52593407
d-28, &
363 1.59739995
d-28, 9.93802874
d-29, 6.11343388
d-29, 3.73711135
d-29, &
364 2.27618743
d-29, 1.38793199
d-29, 8.48060787
d-30, 5.20305940
d-30, &
365 3.20867365
d-30, 1.99011277
d-30, 1.24064551
d-30, 7.78310544
d-31, &
366 4.91013681
d-31, 3.11338381
d-31, 1.98451675
d-31, 1.27135460
d-31, &
367 8.17917486
d-32, 5.28280497
d-32, 3.42357159
d-32, 0.00000000
d+00, &
368 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00, 0.00000000
d+00 /
373 integer,
intent(in) :: ixI^L, ixO^L
374 double precision,
intent(in) :: w(ixI^S,nw)
375 double precision,
intent(in) :: x(ixI^S,1:ndim)
376 double precision,
intent(out):: res(ixI^S)
383 procedure(
get_subr1),
pointer,
nopass :: get_rho => null()
384 procedure(
get_subr1),
pointer,
nopass :: get_temperature => null()
391 subroutine get_line_info(wl,ion,mass,logTe,line_center,spatial_px,spectral_px,sigma_PSF,width_slit)
403 integer,
intent(in) :: wl
404 integer,
intent(out) :: mass
405 character(len=30),
intent(out) :: ion
406 double precision,
intent(out) :: logTe,line_center,spatial_px,spectral_px
407 double precision,
intent(out) :: sigma_PSF,width_slit
486 line_center=262.976d0
495 line_center=263.765d0
504 line_center=192.028d0
513 line_center=255.113d0
519 call mpistop(
"No information about this line")
525 subroutine get_euv(wl,ixI^L,ixO^L,w,x,fl,flux)
532 integer,
intent(in) :: wl
533 integer,
intent(in) :: ixI^L, ixO^L
534 double precision,
intent(in) :: x(ixI^S,1:ndim)
535 double precision,
intent(in) :: w(ixI^S,1:nw)
537 double precision,
intent(out) :: flux(ixI^S)
540 double precision,
allocatable :: t_table(:),f_table(:)
541 integer :: ix^D,iTt,i
542 double precision :: Te(ixI^S),Ne(ixI^S)
543 double precision :: logT,logGT,GT
549 allocate(t_table(1:n_table))
550 allocate(f_table(1:n_table))
555 allocate(t_table(1:n_table))
556 allocate(f_table(1:n_table))
561 allocate(t_table(1:n_table))
562 allocate(f_table(1:n_table))
567 allocate(t_table(1:n_table))
568 allocate(f_table(1:n_table))
573 allocate(t_table(1:n_table))
574 allocate(f_table(1:n_table))
579 allocate(t_table(1:n_table))
580 allocate(f_table(1:n_table))
585 allocate(t_table(1:n_table))
586 allocate(f_table(1:n_table))
591 allocate(t_table(1:n_table))
592 allocate(f_table(1:n_table))
597 allocate(t_table(1:n_table))
598 allocate(f_table(1:n_table))
603 allocate(t_table(1:n_table))
604 allocate(f_table(1:n_table))
609 allocate(t_table(1:n_table))
610 allocate(f_table(1:n_table))
615 allocate(t_table(1:n_table))
616 allocate(f_table(1:n_table))
622 call mpistop(
"Unknown wavelength")
624 call fl%get_rho(w,x,ixi^l,ixo^l,ne)
625 call fl%get_temperature(w,x,ixi^l,ixo^l,te)
629 flux(ixo^s)=ne(ixo^s)**2
632 flux(ixo^s)=ne(ixo^s)**2
636 case(94,131,171,193,211,304,335,1354)
639 if(f_table(i) .gt. 1.d-99)
then
640 f_table(i)=log10(f_table(i))
645 {
do ix^db=ixomin^db,ixomax^db\}
648 if (logt>=t_table(1) .and. logt<=t_table(n_table))
then
649 if (logt>=t_table(n_table))
then
650 loggt=f_table(n_table)
653 if (logt>=t_table(itt) .and. logt<t_table(itt+1))
then
654 loggt=f_table(itt)*(logt-t_table(itt+1))/(t_table(itt)-t_table(itt+1))+&
655 f_table(itt+1)*(logt-t_table(itt))/(t_table(itt+1)-t_table(itt))
660 flux(ix^d)=flux(ix^d)*(10**(loggt))
661 if(flux(ix^d)<smalldouble) flux(ix^d)=0.d0
668 {
do ix^db=ixomin^db,ixomax^db\}
670 if (te(ix^d)>=t_table(1) .and. te(ix^d)<=t_table(n_table))
then
671 if (te(ix^d)>=t_table(n_table))
then
675 if (te(ix^d)>=t_table(itt) .and. te(ix^d)<t_table(itt+1))
then
676 gt=f_table(itt)*(te(ix^d)-t_table(itt+1))/(t_table(itt)-t_table(itt+1))+&
677 f_table(itt+1)*(te(ix^d)-t_table(itt))/(t_table(itt+1)-t_table(itt))
682 flux(ix^d)=flux(ix^d)*gt
683 if(flux(ix^d)<smalldouble) flux(ix^d)=0.d0
690 deallocate(t_table,f_table)
693 subroutine get_sxr(ixI^L,ixO^L,w,x,fl,flux,El,Eu)
700 integer,
intent(in) :: ixI^L,ixO^L
701 integer,
intent(in) :: El,Eu
702 double precision,
intent(in) :: x(ixI^S,1:ndim)
703 double precision,
intent(in) :: w(ixI^S,nw)
705 double precision,
intent(out) :: flux(ixI^S)
707 integer :: ix^D,ixO^D
709 double precision :: I0,kb,keV,dE,Ei
710 double precision :: Te(ixI^S),kbT(ixI^S)
711 double precision :: Ne(ixI^S),gff(ixI^S),fi(ixI^S)
712 double precision :: EM(ixI^S)
718 nume=floor((eu-el)/de)
719 call fl%get_rho(w,x,ixi^l,ixo^l,ne)
720 call fl%get_temperature(w,x,ixi^l,ixo^l,te)
724 em(ixo^s)=(ne(ixo^s))**2*1.d6
727 em(ixo^s)=(ne(ixo^s))**2
729 kbt(ixo^s)=kb*te(ixo^s)/kev
734 {
do ix^db=ixomin^db,ixomax^db\}
735 if (kbt(ix^d)>0.01*ei)
then
736 if(kbt(ix^d)<ei) gff(ix^d)=(kbt(ix^d)/ei)**0.4
737 fi(ix^d)=(em(ix^d)*gff(ix^d))*dexp(-ei/(kbt(ix^d)))/(ei*dsqrt(kbt(ix^d)))
742 flux(ixo^s)=flux(ixo^s)+fi(ixo^s)*de
744 flux(ixo^s)=flux(ixo^s)*i0
751 double precision,
intent(in) :: xbox^L
753 double precision,
intent(out) :: eflux
755 double precision :: dxb^D,xb^L
756 integer :: iigrid,igrid
757 integer :: ixO^L,ixI^L,ix^D
758 double precision :: eflux_grid,eflux_pe
765 do iigrid=1,igridstail; igrid=igrids(iigrid);
769 call get_goes_flux_grid(ixi^l,ixo^l,ps(igrid)%w,ps(igrid)%x,ps(igrid)%dvolume(ixi^s),xbox^l,xb^l,fl,eflux_grid)
770 eflux_pe=eflux_pe+eflux_grid
772 call mpi_allreduce(eflux_pe,eflux,1,mpi_double_precision,mpi_sum,
icomm,
ierrmpi)
778 integer,
intent(in) :: ixI^L,ixO^L
779 double precision,
intent(in) :: x(ixI^S,1:ndim),dV(ixI^S)
780 double precision,
intent(in) :: w(ixI^S,nw)
781 double precision,
intent(in) :: xbox^L,xb^L
783 double precision,
intent(out) :: eflux_grid
785 integer :: ix^D,ixO^D,ixb^L
786 integer :: iE,numE,inbox
787 double precision :: I0,kb,keV,dE,Ei,El,Eu,A_cgs
788 double precision :: Te(ixI^S),kbT(ixI^S)
789 double precision :: Ne(ixI^S),EM(ixI^S)
790 double precision :: gff,fi,erg_SI
794 {
if (xbmin^d<xboxmax^d .and. xbmax^d>xboxmin^d) inbox=inbox+1\}
796 if (inbox==ndim)
then
798 ^d&ixbmin^d=ixomin^d;
799 ^d&ixbmax^d=ixomax^d;
800 {
if (xbmax^d>xboxmax^d) ixbmax^d=ixomax^d-ceiling((xbmax^d-xboxmax^d)/
dxlevel(^d))\}
801 {
if (xbmin^d<xboxmin^d) ixbmin^d=ceiling((xboxmin^d-xbmin^d)/
dxlevel(^d))+ixomin^d\}
808 el=const_h*const_c/(8.d0*a_cgs)/kev
809 eu=const_h*const_c/(1.d0*a_cgs)/kev
811 nume=floor((eu-el)/de)
812 call fl%get_rho(w,x,ixi^l,ixb^l,ne)
813 call fl%get_temperature(w,x,ixi^l,ixb^l,te)
817 em(ixb^s)=(i0*(ne(ixb^s))**2)*dv(ixb^s) * &
821 em(ixb^s)=(i0*(ne(ixb^s))**2)*dv(ixb^s) * &
824 kbt(ixb^s)=kb*te(ixb^s)/kev
829 {
do ix^db=ixbmin^db,ixbmax^db\}
830 if (kbt(ix^d)>1.d-2*ei)
then
831 if(kbt(ix^d)<ei)
then
832 gff=(kbt(ix^d)/ei)**0.4
836 fi=(em(ix^d)*gff)*dexp(-ei/(kbt(ix^d)))/(ei*dsqrt(kbt(ix^d)))
837 eflux_grid=eflux_grid+fi*de*ei
841 eflux_grid=eflux_grid*kev*erg_si
850 integer,
intent(in) :: qunit
852 character(20) :: datatype
855 character (30) :: ion
856 double precision :: logTe,lineCent,sigma_PSF,spaceRsl,wlRsl,wslit
857 double precision :: xslit,arcsec
859 datatype=
'spectrum_euv'
863 if (
mype==0) print *,
'###################################################'
866 if (
mype==0) print *,
'Systhesizing EUV spectrum (observed by IRIS).'
867 case (263,264,192,255)
868 if (
mype==0) print *,
'Systhesizing EUV spectrum (observed by Hinode/EIS).'
870 call mpistop(
'Wrong wavelength!')
874 call mpistop(
'Wrong spectrum window!')
877 if (
mype==0)
write(*,
'(a,f8.3,a)')
' Wavelength: ',linecent,
' Angstrom'
878 if (
mype==0) print *,
'Unit of EUV flux: DN s^-1 pixel^-1'
882 write(*,
'(a,f5.3,a,f5.1,a)')
' Supposed pixel: ',wlrsl,
' Angstrom x ',spacersl*725.0,
' km'
883 print *,
'Unit of wavelength: Angstrom (0.1 nm) '
885 write(*,
'(a,f8.1,a)')
' Unit of length: ',
unit_length/1.d6,
' Mm'
887 write(*,
'(a,f8.1,a)')
' Unit of length: ',
unit_length/1.d8,
' Mm'
889 write(*,
'(a,f8.1,a)')
' Supposed width of slit: ',wslit*725.0,
' km'
894 print *,
'Unit of wavelength: Angstrom (0.1 nm) '
896 write(*,
'(a,f5.3,a,f5.1,a)')
' Pixel: ',wlrsl,
' Angstrom x ',spacersl*725.0,
' km'
897 print *,
'Unit of length: arcsec (~725 km)'
898 write(*,
'(a,f8.1,a)')
' Location of slit: xI1 = ',
location_slit,
' arcsec'
899 write(*,
'(a,f8.1,a)')
' Width of slit: ',wslit,
' arcsec'
902 if (
mype==0)
write(*,
'(a,f8.1,a)')
' Unit of length: ',
unit_length/1.d6,
' Mm'
904 if (
mype==0)
write(*,
'(a,f8.1,a)')
' Unit of length: ',
unit_length/1.d8,
' Mm'
906 write(*,
'(a,f8.1,a)')
' Location of slit: xI1 = ',
location_slit,
' Unit_length'
907 write(*,
'(a,f8.1,a)')
' Width of slit: ',wslit*725.d0,
' km'
910 if (
mype==0) print *,
'Direction of the slit: parallel to xI2 vector'
914 call mpistop(
"EUV spectrum synthesis: support for sperical coordinates is to be added!")
918 if (
mype==0) print *,
'###################################################'
924 integer,
intent(in) :: qunit
925 character(20),
intent(in) :: datatype
928 integer :: numWL,numXS,iwL,ixS,numWI,numS
929 double precision :: dwLg,xSmin,xSmax,wLmin,wLmax
930 double precision,
allocatable :: wL(:),xS(:),dwL(:),dxS(:)
931 double precision,
allocatable :: wI(:,:,:),spectra(:,:),spectra_rc(:,:)
932 integer :: strtype,nstrb,nbb,nuni,nstr,bnx
933 double precision :: qs,dxfirst,dxmid,lenstr
935 integer :: iigrid,igrid,j,dir_loc
936 double precision :: xbmin(1:ndim),xbmax(1:ndim)
939 numwl=4*int((spectrum_window_max-spectrum_window_min)/(4.d0*dwlg))
940 wlmin=(spectrum_window_max+spectrum_window_min)/2.d0-dwlg*numwl/2
941 wlmax=(spectrum_window_max+spectrum_window_min)/2.d0+dwlg*numwl/2
942 allocate(wl(numwl),dwl(numwl))
945 wl(iwl)=wlmin+iwl*dwlg-half*dwlg
948 select case(direction_slit)
950 numxs=domain_nx1*2**(refine_max_level-1)
955 strtype=stretch_type(1)
956 nstrb=nstretchedblocks_baselevel(1)
957 qs=qstretch_baselevel(1)
958 if (mype==0) print *,
'Direction of the slit: x'
960 numxs=domain_nx2*2**(refine_max_level-1)
965 strtype=stretch_type(2)
966 nstrb=nstretchedblocks_baselevel(2)
967 qs=qstretch_baselevel(2)
968 if (mype==0) print *,
'Direction of the slit: y'
970 numxs=domain_nx3*2**(refine_max_level-1)
975 strtype=stretch_type(3)
976 nstrb=nstretchedblocks_baselevel(3)
977 qs=qstretch_baselevel(3)
978 if (mype==0) print *,
'Direction of the slit: z'
980 call mpistop(
'Wrong direction_slit')
983 allocate(xs(numxs),dxs(numxs),spectra(numwl,numxs),spectra_rc(numwl,numxs))
985 allocate(wi(numwl,numxs,numwi))
989 dxs(:)=(xsmax-xsmin)/numxs
991 xs(ixs)=xsmin+dxs(ixs)*(ixs-half)
994 qs=qs**(one/2**(refine_max_level-1))
995 dxfirst=(xsmax-xsmin)*(one-qs)/(one-qs**numxs)
998 dxs(ixs)=dxfirst*qs**(ixs-1)
999 xs(ixs)=dxs(1)/(one-qs)*(one-qs**(ixs-1))+half*dxs(ixs)
1005 lenstr=(xsmax-xsmin)/(2.d0+nuni*(one-qs)/(one-qs**nstr))
1006 dxfirst=(xsmax-xsmin)/(dble(nuni)+2.d0/(one-qs)*(one-qs**nstr))
1009 nstr=nstr*2**(refine_max_level-1)
1010 nuni=nuni*2**(refine_max_level-1)
1011 qs=qs**(one/2**(refine_max_level-1))
1012 dxfirst=lenstr*(one-qs)/(one-qs**nstr)
1013 dxmid=dxmid/2**(refine_max_level-1)
1015 if(nuni .gt. 0)
then
1016 do ixs=nstr+1,nstr+nuni
1018 xs(ixs)=lenstr+(dble(ixs)-0.5d0-nstr)*dxs(ixs)+xsmin
1023 dxs(ixs)=dxfirst*qs**(nstr-ixs)
1024 xs(ixs)=xsmin+lenstr-dxs(ixs)*half-dxfirst*(one-qs**(nstr-ixs))/(one-qs)
1027 do ixs=nstr+nuni+1,numxs
1028 dxs(ixs)=dxfirst*qs**(ixs-nstr-nuni-1)
1029 xs(ixs)=xsmax-lenstr+dxs(ixs)*half+dxfirst*(one-qs**(ixs-nstr-nuni-1))/(one-qs)
1032 call mpistop(
"unknown stretch type")
1035 if (los_phi==0 .and. los_theta==90 .and. direction_slit==2)
then
1038 else if (los_phi==0 .and. los_theta==90 .and. direction_slit==3)
then
1041 else if (los_phi==90 .and. los_theta==90 .and. direction_slit==1)
then
1044 else if (los_phi==90 .and. los_theta==90 .and. direction_slit==3)
then
1047 else if (los_theta==0 .and. direction_slit==1)
then
1050 else if (los_theta==0 .and. direction_slit==2)
then
1054 call mpistop(
'Wrong combination of LOS and slit direction!')
1057 if (dir_loc==1)
then
1058 if (location_slit>xprobmax1 .or. location_slit<xprobmin1)
then
1059 call mpistop(
'Wrong value for location_slit!')
1061 if(mype==0)
write(*,
'(a,f8.1,a)')
' Location of slit: x = ',location_slit,
' Unit_length'
1062 else if (dir_loc==2)
then
1063 if (location_slit>xprobmax2 .or. location_slit<xprobmin2)
then
1064 call mpistop(
'Wrong value for location_slit!')
1066 if(mype==0)
write(*,
'(a,f8.1,a)')
' Location of slit: y = ',location_slit,
' Unit_length'
1068 if (location_slit>xprobmax3 .or. location_slit<xprobmin3)
then
1069 call mpistop(
'Wrong value for location_slit!')
1071 if(mype==0)
write(*,
'(a,f8.1,a)')
' Location of slit: z = ',location_slit,
' Unit_length'
1076 do iigrid=1,igridstail; igrid=igrids(iigrid);
1077 ^d&xbmin(^d)=rnode(rpxmin^d_,igrid);
1078 ^d&xbmax(^d)=rnode(rpxmax^d_,igrid);
1079 if (location_slit>=xbmin(dir_loc) .and. location_slit<xbmax(dir_loc))
then
1085 call mpi_allreduce(spectra,spectra_rc,nums,mpi_double_precision, &
1086 mpi_sum,icomm,ierrmpi)
1089 if (spectra_rc(iwl,ixs)>smalldouble)
then
1090 wi(iwl,ixs,1)=spectra_rc(iwl,ixs)
1097 call output_data(qunit,wl,xs,dwl,dxs,wi,numwl,numxs,numwi,datatype)
1099 deallocate(wl,xs,dwl,dxs,spectra,spectra_rc,wi)
1106 integer,
intent(in) :: igrid,numWL,numXS,dir_loc
1108 double precision,
intent(in) :: wL(numWL),dwL(numWL)
1109 double precision,
intent(inout) :: spectra(numWL,numXS)
1111 integer :: direction_LOS
1112 integer :: ixO^L,ixI^L,ix^D,ixOnew
1113 double precision,
allocatable :: flux(:^D&),v(:^D&),Te(:^D&),rho(:^D&)
1114 double precision :: wlc,wlwd
1117 double precision :: logTe,lineCent
1118 character (30) :: ion
1119 double precision :: spaceRsl,wlRsl,sigma_PSF,wslit
1121 integer :: levelg,rft,ixSmin,ixSmax,iwL
1122 double precision :: flux_pix,dL
1124 call get_line_info(spectrum_wl,ion,mass,logte,linecent,spacersl,wlrsl,sigma_psf,wslit)
1126 if (los_phi==0 .and. los_theta==90)
then
1128 else if (los_phi==90 .and. los_theta==90)
then
1134 ^d&ixomin^d=ixmlo^d\
1135 ^d&ixomax^d=ixmhi^d\
1136 ^d&iximin^d=ixglo^d\
1137 ^d&iximax^d=ixghi^d\
1138 allocate(flux(ixi^s),v(ixi^s),te(ixi^s),rho(ixi^s))
1141 if (dir_loc==1)
then
1142 do ix1=ixomin1,ixomax1
1143 if (location_slit>=(ps(igrid)%x(ix^d,1)-
half*ps(igrid)%dx(ix^d,1)) .and. &
1144 location_slit<(ps(igrid)%x(ix^d,1)+
half*ps(igrid)%dx(ix^d,1)))
then
1150 else if (dir_loc==2)
then
1151 do ix2=ixomin2,ixomax2
1152 if (location_slit>=(ps(igrid)%x(ix^d,2)-
half*ps(igrid)%dx(ix^d,2)) .and. &
1153 location_slit<(ps(igrid)%x(ix^d,2)+
half*ps(igrid)%dx(ix^d,2)))
then
1160 do ix3=ixomin3,ixomax3
1161 if (location_slit>=(ps(igrid)%x(ix^d,3)-
half*ps(igrid)%dx(ix^d,3)) .and. &
1162 location_slit<(ps(igrid)%x(ix^d,3)+
half*ps(igrid)%dx(ix^d,3)))
then
1170 call get_euv(spectrum_wl,ixi^l,ixo^l,ps(igrid)%w,ps(igrid)%x,fl,flux)
1171 flux(ixo^s)=flux(ixo^s)/instrument_resolution_factor**2
1172 call fl%get_rho(ps(igrid)%w,ps(igrid)%x,ixi^l,ixo^l,rho)
1173 v(ixo^s)=-ps(igrid)%w(ixo^s,iw_mom(direction_los))/rho(ixo^s)
1174 call fl%get_temperature(ps(igrid)%w,ps(igrid)%x,ixi^l,ixo^l,te)
1177 levelg=ps(igrid)%level
1178 rft=2**(refine_max_level-levelg)
1180 {
do ix^d=ixomin^d,ixomax^d\}
1183 wlc=linecent*(1.d0+v(ix^d)*unit_velocity*1.d2/
const_c)
1185 wlc=linecent*(1.d0+v(ix^d)*unit_velocity/
const_c)
1187 wlwd=sqrt(
kb_cgs*te(ix^d)*unit_temperature/(mass*
mp_cgs))
1190 select case(direction_slit)
1192 ixsmin=(block_nx1*(node(pig1_,igrid)-1)+(ix1-ixomin1))*rft+1
1193 ixsmax=(block_nx1*(node(pig1_,igrid)-1)+(ix1-ixomin1+1))*rft
1195 ixsmin=(block_nx2*(node(pig2_,igrid)-1)+(ix2-ixomin2))*rft+1
1196 ixsmax=(block_nx2*(node(pig2_,igrid)-1)+(ix2-ixomin2+1))*rft
1198 ixsmin=(block_nx3*(node(pig3_,igrid)-1)+(ix3-ixomin3))*rft+1
1199 ixsmax=(block_nx3*(node(pig3_,igrid)-1)+(ix3-ixomin3+1))*rft
1202 select case(direction_los)
1204 dl=ps(igrid)%dx(ix^d,1)*unit_length
1206 dl=ps(igrid)%dx(ix^d,2)*unit_length
1208 dl=ps(igrid)%dx(ix^d,3)*unit_length
1210 if (si_unit) dl=dl*1.d2
1213 flux_pix=flux(ix^d)*wlrsl*dl*exp(-(wl(iwl)-wlc)**2/(2*wlwd**2))/(sqrt(2*
dpi)*wlwd)
1215 flux_pix=flux_pix*wslit/spacersl
1216 spectra(iwl,ixsmin:ixsmax)=spectra(iwl,ixsmin:ixsmax)+flux_pix
1222 deallocate(flux,v,te,rho)
1228 integer,
intent(in) :: qunit
1229 character(20),
intent(in) :: datatype
1232 integer :: numWL,numXS,iwL,ixS,numWI,ix^D
1233 double precision :: dwLg,dxSg,xSmin,xSmax,xScent,wLmin,wLmax
1234 double precision,
allocatable :: wL(:),xS(:),dwL(:),dxS(:)
1235 double precision,
allocatable :: wI(:,:,:),spectra(:,:),spectra_rc(:,:)
1236 double precision :: vec_cor(1:3),xI_cor(1:2)
1237 double precision :: res,r_loc,r_max
1240 character (30) :: ion
1241 double precision :: logTe,lineCent,sigma_PSF,spaceRsl,wlRsl,wslit
1242 double precision :: unitv,arcsec,RHESSI_rsl,pixel
1243 integer :: iigrid,igrid,i,j,numS
1244 double precision :: xLmin,xLmax,xslit
1255 xsmin=-abs(xprobmax1)
1256 xsmax=abs(xprobmax1)
1259 if (ix1==1) vec_cor(1)=xprobmin1
1260 if (ix1==2) vec_cor(1)=xprobmax1
1262 if (ix2==1) vec_cor(2)=xprobmin2
1263 if (ix2==2) vec_cor(2)=xprobmax2
1265 if (ix3==1) vec_cor(3)=xprobmin3
1266 if (ix3==2) vec_cor(3)=xprobmax3
1268 r_loc=(vec_cor(1)-x_origin(1))**2
1269 r_loc=r_loc+(vec_cor(2)-x_origin(2))**2
1270 r_loc=r_loc+(vec_cor(3)-x_origin(3))**2
1272 if (ix1==1 .and. ix2==1 .and. ix3==1)
then
1275 r_max=max(r_max,r_loc)
1279 if (ix1==1 .and. ix2==1 .and. ix3==1)
then
1283 xsmin=min(xsmin,xi_cor(2))
1284 xsmax=max(xsmax,xi_cor(2))
1295 xscent=(xsmin+xsmax)/2.d0
1299 arcsec=7.25d5/unit_length
1301 arcsec=7.25d7/unit_length
1303 call get_line_info(spectrum_wl,ion,mass,logte,linecent,spacersl,wlrsl,sigma_psf,wslit)
1304 dxsg=spacersl*arcsec
1305 numxs=ceiling((xsmax-xscent)/dxsg)
1306 xsmin=xscent-numxs*dxsg
1307 xsmax=xscent+numxs*dxsg
1310 numwl=2*int((spectrum_window_max-spectrum_window_min)/(2.d0*dwlg))
1311 wlmin=(spectrum_window_max+spectrum_window_min)/2.d0-dwlg*numwl/2
1312 wlmax=(spectrum_window_max+spectrum_window_min)/2.d0+dwlg*numwl/2
1313 allocate(wl(numwl),dwl(numwl),xs(numxs),dxs(numxs))
1315 allocate(wi(numwl,numxs,numwi),spectra(numwl,numxs),spectra_rc(numwl,numxs))
1317 wl(iwl)=wlmin+iwl*dwlg-half*dwlg
1321 xs(ixs)=xsmin+dxsg*(ixs-half)
1327 do iigrid=1,igridstail; igrid=igrids(iigrid);
1329 if (ix1==1) vec_cor(1)=rnode(rpxmin1_,igrid)
1330 if (ix1==2) vec_cor(1)=rnode(rpxmax1_,igrid)
1332 if (ix2==1) vec_cor(2)=rnode(rpxmin2_,igrid)
1333 if (ix2==2) vec_cor(2)=rnode(rpxmax2_,igrid)
1335 if (ix3==1) vec_cor(3)=rnode(rpxmin3_,igrid)
1336 if (ix3==2) vec_cor(3)=rnode(rpxmax3_,igrid)
1338 if (ix1==1 .and. ix2==1 .and. ix3==1)
then
1342 xlmin=min(xlmin,xi_cor(1))
1343 xlmax=max(xlmax,xi_cor(1))
1349 if (activate_unit_arcsec)
then
1350 xslit=location_slit*arcsec
1354 if (xslit>=xlmin-wslit*arcsec .and. xslit<=xlmax+wslit*arcsec)
then
1360 call mpi_allreduce(spectra,spectra_rc,nums,mpi_double_precision, &
1361 mpi_sum,icomm,ierrmpi)
1364 if (spectra_rc(iwl,ixs)>smalldouble)
then
1365 wi(iwl,ixs,1)=spectra_rc(iwl,ixs)
1372 if (activate_unit_arcsec)
then
1377 call output_data(qunit,wl,xs,dwl,dxs,wi,numwl,numxs,numwi,datatype)
1379 deallocate(wl,xs,dwl,dxs,spectra,spectra_rc,wi)
1385 integer,
intent(in) :: igrid,numWL,numXS
1386 double precision,
intent(in) :: wL(numWL),xS(numXS)
1387 double precision,
intent(in) :: dwLg,dxSg
1388 double precision,
intent(inout) :: spectra(numWL,numXS)
1391 integer :: ixO^L,ixI^L,ix^D,ixOnew,j
1392 double precision,
allocatable :: flux(:^D&),v(:^D&),Te(:^D&),rho(:^D&)
1393 double precision :: wlc,wlwd,res,dst_slit,xslit,arcsec
1394 double precision :: vloc(1:3),xloc(1:3),dxloc(1:3),xIloc(1:2),dxIloc(1:2)
1395 integer :: nSubC^D,iSubC^D,iwL,ixS,ixSmin,ixSmax,iwLmin,iwLmax,nwL
1396 double precision :: slit_width,dxSubC^D,xerf^L,fluxSubC
1397 double precision :: xSubC(1:3),xCent(1:2)
1400 double precision :: logTe,lineCent
1401 character (30) :: ion
1402 double precision :: spaceRsl,wlRsl,sigma_PSF,wslit
1403 double precision :: sigma_wl,sigma_xs,factor
1406 arcsec=7.25d5/unit_length
1408 arcsec=7.25d7/unit_length
1410 if (activate_unit_arcsec)
then
1411 xslit=location_slit*arcsec
1416 call get_line_info(spectrum_wl,ion,mass,logte,linecent,spacersl,wlrsl,sigma_psf,wslit)
1418 ^d&ixomin^d=ixmlo^d\
1419 ^d&ixomax^d=ixmhi^d\
1420 ^d&iximin^d=ixglo^d\
1421 ^d&iximax^d=ixghi^d\
1422 allocate(flux(ixi^s),v(ixi^s),te(ixi^s),rho(ixi^s))
1424 call get_euv(spectrum_wl,ixi^l,ixo^l,ps(igrid)%w,ps(igrid)%x,fl,flux)
1425 flux(ixo^s)=flux(ixo^s)/instrument_resolution_factor**2
1426 call fl%get_rho(ps(igrid)%w,ps(igrid)%x,ixi^l,ixo^l,rho)
1427 call fl%get_temperature(ps(igrid)%w,ps(igrid)%x,ixi^l,ixo^l,te)
1428 {
do ix^d=ixomin^d,ixomax^d\}
1430 vloc(j)=ps(igrid)%w(ix^d,iw_mom(j))/rho(ix^d)
1438 slit_width=wslit*arcsec
1439 sigma_wl=sigma_psf*dwlg
1440 sigma_xs=sigma_psf*dxsg
1441 {
do ix^d=ixomin^d,ixomax^d\}
1442 if (flux(ix^d)>smalldouble)
then
1443 xloc(1:3)=ps(igrid)%x(ix^d,1:3)
1444 dxloc(1:3)=ps(igrid)%dx(ix^d,1:3)
1448 if (xiloc(1)>=xslit-half*(slit_width+dxiloc(1)) .and. &
1449 xiloc(1)<=xslit+half*(slit_width+dxiloc(1)))
then
1451 ^d&nsubc^d=max(nsubc^d,ceiling(ps(igrid)%dx(ix^dd,^d)*abs(
vec_xi1(^d))/(slit_width/16.d0)));
1452 ^d&nsubc^d=max(nsubc^d,ceiling(ps(igrid)%dx(ix^dd,^d)*abs(
vec_xi2(^d))/(dxsg/4.d0)));
1453 ^d&dxsubc^d=ps(igrid)%dx(ix^dd,^d)/nsubc^d;
1456 fluxsubc=flux(ix^d)*dxsubc1*dxsubc2*dxsubc3*unit_length*1.d2/dxsg/dxsg
1457 wlc=linecent*(1.d0+v(ix^d)*unit_velocity*1.d2/const_c)
1459 fluxsubc=flux(ix^d)*dxsubc1*dxsubc2*dxsubc3*unit_length/dxsg/dxsg
1460 wlc=linecent*(1.d0+v(ix^d)*unit_velocity/const_c)
1462 wlwd=sqrt(kb_cgs*te(ix^d)*unit_temperature/(mass*mp_cgs))
1463 wlwd=wlwd*linecent/const_c
1465 {
do isubc^d=1,nsubc^d\}
1466 ^d&xsubc(^d)=xloc(^d)-half*dxloc(^d)+(isubc^d-half)*dxsubc^d;
1468 dst_slit=abs(xcent(1)-xslit)
1469 if (dst_slit<=half*slit_width)
then
1470 ixs=floor((xcent(2)-(xs(1)-half*dxsg))/dxsg)+1
1472 ixsmax=min(ixs+3,numxs)
1473 iwl=floor((wlc-(wl(1)-half*dwlg))/dwlg)+1
1474 nwl=3*ceiling(wlwd/dwlg+1)
1475 iwlmin=max(1,iwl-nwl)
1476 iwlmax=min(iwl+nwl,numwl)
1478 do iwl=iwlmin,iwlmax
1479 do ixs=ixsmin,ixsmax
1480 xerfmin1=(wl(iwl)-half*dwlg-wlc)/sqrt(2.d0*(sigma_wl**2+wlwd**2))
1481 xerfmax1=(wl(iwl)+half*dwlg-wlc)/sqrt(2.d0*(sigma_wl**2+wlwd**2))
1482 xerfmin2=(xs(ixs)-half*dxsg-xcent(2))/(sqrt(2.d0)*sigma_xs)
1483 xerfmax2=(xs(ixs)+half*dxsg-xcent(2))/(sqrt(2.d0)*sigma_xs)
1484 factor=(erfc(xerfmin1)-erfc(xerfmax1))*(erfc(xerfmin2)-erfc(xerfmax2))/4.d0
1485 spectra(iwl,ixs)=spectra(iwl,ixs)+fluxsubc*factor
1495 deallocate(flux,v,te)
1503 integer,
intent(in) :: qunit
1505 character(20) :: datatype
1508 character (30) :: ion
1509 double precision :: logTe,lineCent,sigma_PSF,spaceRsl,wlRsl,wslit
1510 double precision :: t0,t1
1513 datatype=
'image_euv'
1517 print *,
'###################################################'
1518 print *,
'Systhesizing EUV image'
1519 write(*,
'(a,f8.3,a)')
' Wavelength: ',linecent,
' Angstrom'
1520 print *,
'Unit of EUV flux: DN s^-1 pixel^-1'
1526 write(*,
'(a,f7.1,a,f7.1,a,f5.1,a,f5.1,a)')
' Supposed Pixel: ',spacersl*725.0,
' km x ',spacersl*725.0, &
1527 ' km (', spacersl,
' arcsec x ', spacersl,
' arcsec)'
1529 write(*,
'(a,f8.1,a)')
' Unit of length: ',
unit_length/1.d6,
' Mm'
1531 write(*,
'(a,f8.1,a)')
' Unit of length: ',
unit_length/1.d8,
' Mm'
1541 call mpistop(
'ERROR: Wrong LOS for synthesizing emission!')
1545 write(*,
'(a,f7.1,a,f7.1,a,f5.1,a,f5.1,a)')
' Pixel: ',spacersl*725.0,
' km x ',spacersl*725.0,
' km (', &
1546 spacersl,
' arcsec x ', spacersl,
' arcsec)'
1548 print *,
'Unit of length: arcsec (~725 km)'
1551 write(*,
'(a,f8.1,a)')
' Unit of length: ',
unit_length/1.d6,
' Mm'
1553 write(*,
'(a,f8.1,a)')
' Unit of length: ',
unit_length/1.d8,
' Mm'
1559 '] of the simulation box is located at [X=0,Y=0] of the image'
1562 if (
mype==0)
write(*,
'(a,f6.3,f8.3,f8.3,a)')
' Mapping: R=0 of the simulation box is located at [X=0,Y=0] of the image'
1565 call mpistop(
"EUV synthesis: this coordinate is not supported!")
1570 if (
mype==0) print *,
'time comsuming: ',t1-t0,
' s'
1571 if (
mype==0) print *,
'###################################################'
1578 integer,
intent(in) :: qunit
1580 character(20) :: datatype
1581 double precision :: RHESSI_rsl
1582 double precision :: t0,t1
1585 datatype=
'image_sxr'
1589 print *,
'###################################################'
1590 print *,
'Systhesizing SXR image (observed at 1 AU).'
1597 print *,
'Unit of SXR flux: photons cm^-2 s^-1 pixel^-1'
1598 write(*,
'(a,f5.1,a,f5.1,a,f5.1,a,f5.1,a)')
' Supposed Pixel: ',rhessi_rsl*0.725,
' Mm x ',rhessi_rsl*0.725, &
1599 ' Mm (', rhessi_rsl,
' arcsec x ', rhessi_rsl,
' arcsec)'
1601 write(*,
'(a,f8.1,a)')
' Unit of length: ',
unit_length/1.d6,
' Mm'
1603 write(*,
'(a,f8.1,a)')
' Unit of length: ',
unit_length/1.d8,
' Mm'
1613 call mpistop(
'ERROR: Wrong LOS for synthesizing emission!')
1617 print *,
'Unit of SXR flux: photons cm^-2 s^-1 pixel^-1'
1618 write(*,
'(a,f5.1,a,f5.1,a,f5.1,a,f5.1,a)')
' Pixel: ',rhessi_rsl*0.725,
' Mm x ',rhessi_rsl*0.725, &
1619 ' Mm (', rhessi_rsl,
' arcsec x ', rhessi_rsl,
' arcsec)'
1621 print *,
'Unit of length: arcsec (~725 km)'
1624 write(*,
'(a,f8.1,a)')
' Unit of length: ',
unit_length/1.d6,
' Mm'
1626 write(*,
'(a,f8.1,a)')
' Unit of length: ',
unit_length/1.d8,
' Mm'
1632 '] of the simulation box is located at [X=0,Y=0] of the image'
1635 if (
mype==0)
write(*,
'(a,f6.3,f8.3,f8.3,a)')
' Mapping: R=0 of the simulation box is located at [X=0,Y=0] of the image'
1638 call mpistop(
"SXR synthesis: this coordinate is not supported!")
1643 if (
mype==0) print *,
'time comsuming:',t1-t0
1644 if (
mype==0) print *,
'###################################################'
1651 integer,
intent(in) :: qunit
1653 character(20) :: datatype
1654 double precision :: LASCO_rsl
1656 if (
mype==0) print *,
'###################################################'
1660 if (
mype==0) print *,
'Systhesizing white light image (observed by LASCO/C1).'
1663 if (
mype==0) print *,
'Systhesizing white light image (observed by LASCO/C2).'
1666 if (
mype==0) print *,
'Systhesizing white light image (observed by LASCO/C3).'
1668 call mpistop(
'Whitelight synthesis: instrument is not supported!')
1671 if (
mype==0)
write(*,
'(a,f5.1,a,f5.1,a,f5.1,a,f5.1,a)')
' Pixel: ',lasco_rsl*0.725,
' Mm x ',lasco_rsl*0.725,
' Mm (', &
1672 lasco_rsl,
' arcsec x ', lasco_rsl,
' arcsec) '
1673 if (
mype==0) print *,
'Unit of white light flux: average Sun brightness'
1675 datatype=
'image_whitelight'
1679 print *,
'Unit of length: arcsec (~725 km)'
1682 if (
mype==0)
write(*,
'(a,f8.1,a)')
' Unit of length: ',
unit_length/1.d6,
' Mm'
1684 if (
mype==0)
write(*,
'(a,f8.1,a)')
' Unit of length: ',
unit_length/1.d8,
' Mm'
1690 if (
mype==0)
write(*,
'(a,f6.3,f8.3,f8.3,a)')
' Mapping: R=0 of the simulation box is located at [X=0,Y=0] of the image'
1693 call mpistop(
"Whitelight synthesis: this coordinate is not supported!")
1696 if (
mype==0) print *,
'###################################################'
1706 integer,
intent(in) :: qunit
1707 character(20),
intent(in) :: datatype
1710 double precision :: dx^D
1711 integer :: numX^D,ix^D
1712 double precision,
allocatable :: EUV(:,:),EUVs(:,:),Dpl(:,:),Dpls(:,:)
1713 double precision,
allocatable :: SXR(:,:),SXRs(:,:),wI(:,:,:)
1714 double precision,
allocatable :: xI1(:),xI2(:),dxI1(:),dxI2(:),dxIi
1715 integer :: numXI1,numXI2,numSI,numWI
1716 double precision :: xI^L
1717 integer :: iigrid,igrid,i,j
1718 double precision,
allocatable :: xIF1(:),xIF2(:),dxIF1(:),dxIF2(:)
1719 integer :: nXIF1,nXIF2
1720 double precision :: xIF^L
1722 double precision :: unitv,arcsec,RHESSI_rsl
1723 integer :: strtype^D,nstrb^D,nbb^D,nuni^D,nstr^D,bnx^D
1724 double precision :: qs^D,dxfirst^D,dxmid^D,lenstr^D
1748 if (
mype==0)
write(*,
'(a)')
' LOS vector: [-1.00 0.00 0.00]'
1749 if (
mype==0)
write(*,
'(a)')
' xI1 vector: [ 0.00 1.00 0.00]'
1750 if (
mype==0)
write(*,
'(a)')
' xI2 vector: [ 0.00 0.00 1.00]'
1768 if (
mype==0)
write(*,
'(a)')
' LOS vector: [ 0.00 -1.00 0.00]'
1769 if (
mype==0)
write(*,
'(a)')
' xI1 vector: [-1.00 0.00 0.00]'
1770 if (
mype==0)
write(*,
'(a)')
' xI2 vector: [ 0.00 0.00 1.00]'
1788 if (
mype==0)
write(*,
'(a)')
' LOS vector: [ 0.00 0.00 -1.00]'
1789 if (
mype==0)
write(*,
'(a)')
' xI1 vector: [ 1.00 0.00 0.00]'
1790 if (
mype==0)
write(*,
'(a)')
' xI2 vector: [ 0.00 1.00 0.00]'
1792 allocate(xif1(nxif1),xif2(nxif2),dxif1(nxif1),dxif2(nxif2))
1795 select case(strtype1)
1797 dxif1(:)=(xifmax1-xifmin1)/nxif1
1799 xif1(ix1)=xifmin1+dxif1(ix1)*(ix1-
half)
1803 dxfirst1=(xifmax1-xifmin1)*(
one-qs1)/(
one-qs1**nxif1)
1806 dxif1(ix1)=dxfirst1*qs1**(ix1-1)
1807 xif1(ix1)=dxif1(1)/(
one-qs1)*(
one-qs1**(ix1-1))+
half*dxif1(ix1)
1812 nuni1=nbb1-nstrb1*bnx1
1813 lenstr1=(xifmax1-xifmin1)/(2.d0+nuni1*(
one-qs1)/(
one-qs1**nstr1))
1814 dxfirst1=(xifmax1-xifmin1)/(dble(nuni1)+2.d0/(
one-qs1)*(
one-qs1**nstr1))
1820 dxfirst1=lenstr1*(
one-qs1)/(
one-qs1**nstr1)
1823 if(nuni1 .gt. 0)
then
1824 do ix1=nstr1+1,nstr1+nuni1
1826 xif1(ix1)=lenstr1+(dble(ix1)-0.5d0-nstr1)*dxif1(ix1)+xifmin1
1831 dxif1(ix1)=dxfirst1*qs1**(nstr1-ix1)
1832 xif1(ix1)=xifmin1+lenstr1-dxif1(ix1)*
half-dxfirst1*(
one-qs1**(nstr1-ix1))/(
one-qs1)
1835 do ix1=nstr1+nuni1+1,nxif1
1836 dxif1(ix1)=dxfirst1*qs1**(ix1-nstr1-nuni1-1)
1837 xif1(ix1)=xifmax1-lenstr1+dxif1(ix1)*
half+dxfirst1*(
one-qs1**(ix1-nstr1-nuni1-1))/(
one-qs1)
1840 call mpistop(
"unknown stretch type")
1843 select case(strtype2)
1845 dxif2(:)=(xifmax2-xifmin2)/nxif2
1847 xif2(ix2)=xifmin2+dxif2(ix2)*(ix2-
half)
1851 dxfirst2=(xifmax2-xifmin2)*(
one-qs2)/(
one-qs2**nxif2)
1854 dxif2(ix2)=dxfirst2*qs2**(ix2-1)
1855 xif2(ix2)=dxif2(1)/(
one-qs2)*(
one-qs2**(ix2-1))+
half*dxif2(ix2)
1860 nuni2=nbb2-nstrb2*bnx2
1861 lenstr2=(xifmax2-xifmin2)/(2.d0+nuni2*(
one-qs2)/(
one-qs2**nstr2))
1862 dxfirst2=(xifmax2-xifmin2)/(dble(nuni2)+2.d0/(
one-qs2)*(
one-qs2**nstr2))
1868 dxfirst2=lenstr2*(
one-qs2)/(
one-qs2**nstr2)
1871 if(nuni2 .gt. 0)
then
1872 do ix2=nstr2+1,nstr2+nuni2
1874 xif2(ix2)=lenstr2+(dble(ix2)-0.5d0-nstr2)*dxif2(ix2)+xifmin2
1879 dxif2(ix2)=dxfirst2*qs2**(nstr2-ix2)
1880 xif2(ix2)=xifmin2+lenstr2-dxif2(ix2)*
half-dxfirst2*(
one-qs2**(nstr2-ix2))/(
one-qs2)
1883 do ix2=nstr2+nuni2+1,nxif2
1884 dxif2(ix2)=dxfirst2*qs2**(ix2-nstr2-nuni2-1)
1885 xif2(ix2)=xifmax2-lenstr2+dxif2(ix2)*
half+dxfirst2*(
one-qs2**(ix2-nstr2-nuni2-1))/(
one-qs2)
1888 call mpistop(
"unknown stretch type")
1892 if (datatype==
'image_euv')
then
1899 allocate(wi(nxif1,nxif2,numwi))
1900 allocate(euvs(nxif1,nxif2),euv(nxif1,nxif2))
1901 allocate(dpl(nxif1,nxif2),dpls(nxif1,nxif2))
1906 do iigrid=1,igridstail; igrid=igrids(iigrid);
1910 call mpi_allreduce(euvs,euv,numsi,mpi_double_precision, &
1912 call mpi_allreduce(dpls,dpl,numsi,mpi_double_precision, &
1917 if(euv(ix1,ix2)/=0)
then
1918 dpl(ix1,ix2)=(dpl(ix1,ix2)/euv(ix1,ix2))*unitv
1928 call output_data(qunit,xif1,xif2,dxif1,dxif2,wi,nxif1,nxif2,numwi,datatype)
1929 deallocate(wi,euv,euvs,dpl,dpls)
1933 if (datatype==
'image_sxr')
then
1941 allocate(wi(nxif1,nxif2,numwi))
1942 allocate(sxrs(nxif1,nxif2),sxr(nxif1,nxif2))
1945 do iigrid=1,igridstail; igrid=igrids(iigrid);
1949 call mpi_allreduce(sxrs,sxr,numsi,mpi_double_precision, &
1952 sxr=sxr*(rhessi_rsl*arcsec)**2
1960 call output_data(qunit,xif1,xif2,dxif1,dxif2,wi,nxif1,nxif2,numwi,datatype)
1961 deallocate(wi,sxr,sxrs)
1964 deallocate(xif1,xif2,dxif1,dxif2)
1971 integer,
intent(in) :: igrid,nXIF1,nXIF2
1972 double precision,
intent(in) :: xIF1(nXIF1),xIF2(nXIF2)
1973 double precision,
intent(in) :: dxIF1(nXIF1),dxIF2(nXIF2)
1975 double precision,
intent(out) :: SXR(nXIF1,nXIF2)
1977 integer :: ixO^L,ixO^D,ixI^L,ix^D,i,j
1978 double precision :: xb^L,xd^D
1979 double precision,
allocatable :: flux(:^D&)
1980 double precision,
allocatable :: dxb1(:^D&),dxb2(:^D&),dxb3(:^D&)
1981 double precision,
allocatable :: SXRg(:,:),xg1(:),xg2(:),dxg1(:),dxg2(:)
1982 integer :: levelg,nXg1,nXg2,iXgmin1,iXgmax1,iXgmin2,iXgmax2,rft,iXg^D
1983 double precision :: SXRt,xc^L,xg^L,r2,area_1AU
1984 integer :: ixP^L,ixP^D
1985 integer :: direction_LOS
1995 ^d&ixomin^d=ixmlo^d\
1996 ^d&ixomax^d=ixmhi^d\
1997 ^d&iximin^d=
ixglo^d\
1998 ^d&iximax^d=
ixghi^d\
2002 allocate(flux(ixi^s))
2003 allocate(dxb1(ixi^s),dxb2(ixi^s),dxb3(ixi^s))
2004 dxb1(ixo^s)=ps(igrid)%dx(ixo^s,1)
2005 dxb2(ixo^s)=ps(igrid)%dx(ixo^s,2)
2006 dxb3(ixo^s)=ps(igrid)%dx(ixo^s,3)
2011 levelg=ps(igrid)%level
2015 select case(direction_los)
2026 allocate(sxrg(nxg1,nxg2),xg1(nxg1),xg2(nxg2),dxg1(nxg1),dxg2(nxg2))
2032 select case(direction_los)
2034 do ix2=ixomin2,ixomax2
2035 ixgmin1=(ix2-1)*rft+1
2037 do ix3=ixomin3,ixomax3
2038 ixgmin2=(ix3-1)*rft+1
2041 do ix1=ixomin1,ixomax1
2044 sxrg(ixgmin1:ixgmax1,ixgmin2:ixgmax2)=sxrt
2048 do ix3=ixomin3,ixomax3
2049 ixgmin1=(ix3-1)*rft+1
2051 do ix1=ixomin1,ixomax1
2052 ixgmin2=(ix1-1)*rft+1
2055 do ix2=ixomin2,ixomax2
2058 sxrg(ixgmin1:ixgmax1,ixgmin2:ixgmax2)=sxrt
2062 do ix1=ixomin1,ixomax1
2063 ixgmin1=(ix1-1)*rft+1
2065 do ix2=ixomin2,ixomax2
2066 ixgmin2=(ix2-1)*rft+1
2069 do ix3=ixomin3,ixomax3
2072 sxrg(ixgmin1:ixgmax1,ixgmin2:ixgmax2)=sxrt
2082 select case(direction_los)
2084 ixgmin1=(ixomin2-1)*rft+1
2086 ixgmin2=(ixomin3-1)*rft+1
2089 ixgmin1=(ixomin3-1)*rft+1
2091 ixgmin2=(ixomin1-1)*rft+1
2094 ixgmin1=(ixomin1-1)*rft+1
2096 ixgmin2=(ixomin2-1)*rft+1
2100 select case(direction_los)
2102 ixpmin1=(
node(pig2_,igrid)-1)*rft*block_nx2+1
2103 ixpmax1=
node(pig2_,igrid)*rft*block_nx2
2104 ixpmin2=(
node(pig3_,igrid)-1)*rft*block_nx3+1
2105 ixpmax2=
node(pig3_,igrid)*rft*block_nx3
2107 ixpmin1=(
node(pig3_,igrid)-1)*rft*block_nx3+1
2108 ixpmax1=
node(pig3_,igrid)*rft*block_nx3
2109 ixpmin2=(
node(pig1_,igrid)-1)*rft*block_nx1+1
2110 ixpmax2=
node(pig1_,igrid)*rft*block_nx1
2112 ixpmin1=(
node(pig1_,igrid)-1)*rft*block_nx1+1
2113 ixpmax1=
node(pig1_,igrid)*rft*block_nx1
2114 ixpmin2=(
node(pig2_,igrid)-1)*rft*block_nx2+1
2115 ixpmax2=
node(pig2_,igrid)*rft*block_nx2
2117 xg1(ixgmin1:ixgmax1)=xif1(ixpmin1:ixpmax1)
2118 xg2(ixgmin2:ixgmax2)=xif2(ixpmin2:ixpmax2)
2119 dxg1(ixgmin1:ixgmax1)=dxif1(ixpmin1:ixpmax1)
2120 dxg2(ixgmin2:ixgmax2)=dxif2(ixpmin2:ixpmax2)
2121 sxr(ixpmin1:ixpmax1,ixpmin2:ixpmax2)=sxr(ixpmin1:ixpmax1,ixpmin2:ixpmax2)+&
2122 sxrg(ixgmin1:ixgmax1,ixgmin2:ixgmax2)
2124 deallocate(flux,dxb1,dxb2,dxb3,sxrg,xg1,xg2,dxg1,dxg2)
2131 integer,
intent(in) :: igrid,nXIF1,nXIF2
2132 double precision,
intent(in) :: xIF1(nXIF1),xIF2(nXIF2)
2133 double precision,
intent(in) :: dxIF1(nXIF1),dxIF2(nXIF2)
2135 double precision,
intent(out) :: EUV(nXIF1,nXIF2),Dpl(nXIF1,nXIF2)
2137 integer :: ixO^L,ixO^D,ixI^L,ix^D,i,j
2138 double precision :: xb^L,xd^D
2139 double precision,
allocatable :: flux(:^D&),v(:^D&),rho(:^D&)
2140 double precision,
allocatable :: dxb1(:^D&),dxb2(:^D&),dxb3(:^D&)
2141 double precision,
allocatable :: EUVg(:,:),Fvg(:,:),xg1(:),xg2(:),dxg1(:),dxg2(:)
2142 integer :: levelg,nXg1,nXg2,iXgmin1,iXgmax1,iXgmin2,iXgmax2,rft,iXg^D
2143 double precision :: EUVt,Fvt,xc^L,xg^L,r2
2144 integer :: ixP^L,ixP^D
2145 integer :: direction_LOS
2155 ^d&ixomin^d=ixmlo^d\
2156 ^d&ixomax^d=ixmhi^d\
2157 ^d&iximin^d=
ixglo^d\
2158 ^d&iximax^d=
ixghi^d\
2162 allocate(flux(ixi^s),v(ixi^s),rho(ixi^s))
2163 allocate(dxb1(ixi^s),dxb2(ixi^s),dxb3(ixi^s))
2164 dxb1(ixo^s)=ps(igrid)%dx(ixo^s,1)
2165 dxb2(ixo^s)=ps(igrid)%dx(ixo^s,2)
2166 dxb3(ixo^s)=ps(igrid)%dx(ixo^s,3)
2170 call fl%get_rho(ps(igrid)%w,ps(igrid)%x,ixi^l,ixo^l,rho)
2171 v(ixo^s)=-ps(igrid)%w(ixo^s,iw_mom(direction_los))/rho(ixo^s)
2175 levelg=ps(igrid)%level
2179 select case(direction_los)
2190 allocate(euvg(nxg1,nxg2),fvg(nxg1,nxg2),xg1(nxg1),xg2(nxg2),dxg1(nxg1),dxg2(nxg2))
2197 select case(direction_los)
2199 do ix2=ixomin2,ixomax2
2200 ixgmin1=(ix2-1)*rft+1
2202 do ix3=ixomin3,ixomax3
2203 ixgmin2=(ix3-1)*rft+1
2207 do ix1=ixomin1,ixomax1
2211 euvg(ixgmin1:ixgmax1,ixgmin2:ixgmax2)=euvt
2212 fvg(ixgmin1:ixgmax1,ixgmin2:ixgmax2)=fvt
2216 do ix3=ixomin3,ixomax3
2217 ixgmin1=(ix3-1)*rft+1
2219 do ix1=ixomin1,ixomax1
2220 ixgmin2=(ix1-1)*rft+1
2224 do ix2=ixomin2,ixomax2
2228 euvg(ixgmin1:ixgmax1,ixgmin2:ixgmax2)=euvt
2229 fvg(ixgmin1:ixgmax1,ixgmin2:ixgmax2)=fvt
2233 do ix1=ixomin1,ixomax1
2234 ixgmin1=(ix1-1)*rft+1
2236 do ix2=ixomin2,ixomax2
2237 ixgmin2=(ix2-1)*rft+1
2241 do ix3=ixomin3,ixomax3
2245 euvg(ixgmin1:ixgmax1,ixgmin2:ixgmax2)=euvt
2246 fvg(ixgmin1:ixgmax1,ixgmin2:ixgmax2)=fvt
2257 select case(direction_los)
2259 ixgmin1=(ixomin2-1)*rft+1
2261 ixgmin2=(ixomin3-1)*rft+1
2264 ixgmin1=(ixomin3-1)*rft+1
2266 ixgmin2=(ixomin1-1)*rft+1
2269 ixgmin1=(ixomin1-1)*rft+1
2271 ixgmin2=(ixomin2-1)*rft+1
2275 select case(direction_los)
2277 ixpmin1=(
node(pig2_,igrid)-1)*rft*block_nx2+1
2278 ixpmax1=
node(pig2_,igrid)*rft*block_nx2
2279 ixpmin2=(
node(pig3_,igrid)-1)*rft*block_nx3+1
2280 ixpmax2=
node(pig3_,igrid)*rft*block_nx3
2282 ixpmin1=(
node(pig3_,igrid)-1)*rft*block_nx3+1
2283 ixpmax1=
node(pig3_,igrid)*rft*block_nx3
2284 ixpmin2=(
node(pig1_,igrid)-1)*rft*block_nx1+1
2285 ixpmax2=
node(pig1_,igrid)*rft*block_nx1
2287 ixpmin1=(
node(pig1_,igrid)-1)*rft*block_nx1+1
2288 ixpmax1=
node(pig1_,igrid)*rft*block_nx1
2289 ixpmin2=(
node(pig2_,igrid)-1)*rft*block_nx2+1
2290 ixpmax2=
node(pig2_,igrid)*rft*block_nx2
2292 xg1(ixgmin1:ixgmax1)=xif1(ixpmin1:ixpmax1)
2293 xg2(ixgmin2:ixgmax2)=xif2(ixpmin2:ixpmax2)
2294 dxg1(ixgmin1:ixgmax1)=dxif1(ixpmin1:ixpmax1)
2295 dxg2(ixgmin2:ixgmax2)=dxif2(ixpmin2:ixpmax2)
2296 euv(ixpmin1:ixpmax1,ixpmin2:ixpmax2)=euv(ixpmin1:ixpmax1,ixpmin2:ixpmax2)+&
2297 euvg(ixgmin1:ixgmax1,ixgmin2:ixgmax2)
2298 dpl(ixpmin1:ixpmax1,ixpmin2:ixpmax2)=dpl(ixpmin1:ixpmax1,ixpmin2:ixpmax2)+&
2299 fvg(ixgmin1:ixgmax1,ixgmin2:ixgmax2)
2301 deallocate(flux,v,dxb1,dxb2,dxb3,euvg,fvg,xg1,xg2,dxg1,dxg2)
2311 integer,
intent(in) :: qunit
2313 character(20),
intent(in) :: datatype
2315 integer :: ix^D,numXI1,numXI2,numWI
2316 double precision :: xImin1,xImax1,xImin2,xImax2,xIcent1,xIcent2,dxI
2317 double precision,
allocatable :: xI1(:),xI2(:),dxI1(:),dxI2(:)
2318 double precision,
allocatable :: wI(:,:,:),wIs(:,:,:),EM(:,:),WLB(:,:,:)
2319 double precision :: vec_temp1(1:3),vec_temp2(1:3)
2320 double precision :: vec_z(1:3),vec_cor(1:3),xI_cor(1:2)
2321 double precision :: res,LOS_psi,r_max,r_loc
2324 character (30) :: ion
2325 double precision :: logTe,lineCent,sigma_PSF,spaceRsl,wlRsl,wslit
2326 double precision :: arcsec,RHESSI_rsl,LASCO_rsl,pixel,R_occult,smallflux
2327 integer :: iigrid,igrid,i,j,numSI,iw
2339 ximin1=-abs(xprobmax1)
2340 ximin2=-abs(xprobmax1)
2341 ximax1=abs(xprobmax1)
2342 ximax2=abs(xprobmax1)
2346 if (ix1==1) vec_cor(1)=xprobmin1
2347 if (ix1==2) vec_cor(1)=xprobmax1
2349 if (ix2==1) vec_cor(2)=xprobmin2
2350 if (ix2==2) vec_cor(2)=xprobmax2
2352 if (ix3==1) vec_cor(3)=xprobmin3
2353 if (ix3==2) vec_cor(3)=xprobmax3
2356 r_loc=r_loc+(vec_cor(2)-
x_origin(2))**2
2357 r_loc=r_loc+(vec_cor(3)-
x_origin(3))**2
2359 if (ix1==1 .and. ix2==1 .and. ix3==1)
then
2362 r_max=max(r_max,r_loc)
2366 if (ix1==1 .and. ix2==1 .and. ix3==1)
then
2372 ximin1=min(ximin1,xi_cor(1))
2373 ximax1=max(ximax1,xi_cor(1))
2374 ximin2=min(ximin2,xi_cor(2))
2375 ximax2=max(ximax2,xi_cor(2))
2388 xicent1=(ximin1+ximax1)/2.d0
2389 xicent2=(ximin2+ximax2)/2.d0
2397 if (datatype==
'image_euv')
then
2401 else if (datatype==
'image_sxr')
then
2403 dxi=rhessi_rsl*arcsec
2405 else if (datatype==
'image_whitelight')
then
2416 call mpistop(
'Whitelight synthesis: instrument is not supported!')
2418 dxi=lasco_rsl*arcsec
2423 numxi1=8*ceiling((ximax1-xicent1)/dxi/8.d0)
2424 ximin1=xicent1-numxi1*dxi
2425 ximax1=xicent1+numxi1*dxi
2427 numxi2=8*ceiling((ximax2-xicent2)/dxi/8.d0)
2428 ximin2=xicent2-numxi2*dxi
2429 ximax2=xicent2+numxi2*dxi
2431 allocate(xi1(numxi1),xi2(numxi2),dxi1(numxi1),dxi2(numxi2))
2433 xi1(ix1)=ximin1+dxi*(ix1-
half)
2437 xi2(ix2)=ximin2+dxi*(ix2-
half)
2442 if (datatype==
'image_euv' .or. datatype==
'image_sxr')
then
2444 allocate(wi(numxi1,numxi2,numwi),wis(numxi1,numxi2,numwi),em(numxi1,numxi2))
2449 do iigrid=1,igridstail; igrid=igrids(iigrid);
2453 do iigrid=1,igridstail; igrid=igrids(iigrid);
2459 if (em(ix1,ix2)>smallflux) wis(ix1,ix2,1)=em(ix1,ix2)
2462 numsi=numxi1*numxi2*numwi
2463 call mpi_allreduce(wis,wi,numsi,mpi_double_precision,mpi_sum,
icomm,
ierrmpi)
2470 call output_data(qunit,xi1,xi2,dxi1,dxi2,wi,numxi1,numxi2,numwi,datatype)
2471 deallocate(wi,wis,em)
2472 else if (datatype==
'image_whitelight')
then
2474 allocate(wi(numxi1,numxi2,numwi),wis(numxi1,numxi2,numwi),wlb(numxi1,numxi2,numwi))
2479 do iigrid=1,igridstail; igrid=igrids(iigrid);
2485 if (wlb(ix1,ix2,1)>smallflux)
then
2486 wis(ix1,ix2,1)=wlb(ix1,ix2,1)
2487 wis(ix1,ix2,2)=wlb(ix1,ix2,2)
2491 numsi=numxi1*numxi2*numwi
2492 call mpi_allreduce(wis,wi,numsi,mpi_double_precision,mpi_sum,
icomm,
ierrmpi)
2499 call output_data(qunit,xi1,xi2,dxi1,dxi2,wi,numxi1,numxi2,numwi,datatype)
2500 deallocate(wi,wis,wlb)
2503 deallocate(xi1,xi2,dxi1,dxi2)
2508 integer,
intent(in) :: igrid,numXI1,numXI2
2509 double precision,
intent(in) :: xI1(numXI1),xI2(numXI2)
2510 double precision,
intent(in) :: dxI
2512 character(20),
intent(in) :: datatype
2513 double precision,
intent(inout) :: EM(numXI1,numXI2)
2515 integer :: ixO^L,ixO^D,ixI^L,ix^D,i,j
2516 double precision :: xb^L,xd^D
2517 double precision,
allocatable :: flux(:^D&)
2518 double precision :: res
2519 integer :: ixP^L,ixP^D,nSubC^D,iSubC^D
2520 double precision :: xSubP1,xSubP2,dxSubP,xerf^L,fluxsubC
2521 double precision :: xSubC(1:3),dxSubC^D,xCent(1:2)
2524 double precision :: logTe
2525 character (30) :: ion
2526 double precision :: lineCent
2527 double precision :: sigma_PSF,spaceRsl,wlRsl,sigma0,factor,wslit
2528 double precision :: arcsec,pixel,RHESSI_rsl,area_1AU
2529 double precision :: aa,bb
2531 ^d&ixomin^d=ixmlo^d\
2532 ^d&ixomax^d=ixmhi^d\
2533 ^d&iximin^d=ixglo^d\
2534 ^d&iximax^d=ixghi^d\
2535 ^d&xbmin^d=rnode(rpxmin^d_,igrid)\
2536 ^d&xbmax^d=rnode(rpxmax^d_,igrid)\
2539 arcsec=7.25d5/unit_length
2541 arcsec=7.25d7/unit_length
2544 allocate(flux(ixi^s))
2545 if (datatype==
'image_euv')
then
2547 call get_euv(wavelength,ixi^l,ixo^l,ps(igrid)%w,ps(igrid)%x,fl,flux)
2548 flux(ixo^s)=flux(ixo^s)/instrument_resolution_factor**2
2549 call get_line_info(wavelength,ion,mass,logte,linecent,spacersl,wlrsl,sigma_psf,wslit)
2550 pixel=spacersl*arcsec
2551 sigma0=sigma_psf*pixel
2552 else if (datatype==
'image_sxr')
then
2554 call get_sxr(ixi^l,ixo^l,ps(igrid)%w,ps(igrid)%x,fl,flux,emin_sxr,emax_sxr)
2555 rhessi_rsl=2.3d0/instrument_resolution_factor
2557 pixel=rhessi_rsl*arcsec
2558 sigma0=sigma_psf*pixel
2563 {
do ix^d=ixomin^d,ixomax^d\}
2565 ^d&nsubc^d=max(nsubc^d,ceiling(ps(igrid)%dx(ix^dd,^d)*abs(
vec_xi1(^d))/(dxi/2.d0)));
2566 ^d&nsubc^d=max(nsubc^d,ceiling(ps(igrid)%dx(ix^dd,^d)*abs(
vec_xi2(^d))/(dxi/2.d0)));
2567 ^d&dxsubc^d=ps(igrid)%dx(ix^dd,^d)/nsubc^d;
2568 if (datatype==
'image_euv')
then
2570 fluxsubc=flux(ix^d)*dxsubc1*dxsubc2*dxsubc3*unit_length*1.d2/dxi/dxi
2572 fluxsubc=flux(ix^d)*dxsubc1*dxsubc2*dxsubc3*unit_length/dxi/dxi
2574 else if (datatype==
'image_sxr')
then
2576 fluxsubc=flux(ix^d)*dxsubc1*dxsubc2*dxsubc3*unit_length**3/area_1au
2578 if (fluxsubc>smalldouble)
then
2580 {
do isubc^d=1,nsubc^d\}
2581 ^d&xsubc(^d)=ps(igrid)%x(ix^dd,^d)-half*ps(igrid)%dx(ix^dd,^d)+(isubc^d-half)*dxsubc^d;
2585 ixp1=floor((xcent(1)-(xi1(1)-half*dxi))/dxi)+1
2586 ixp2=floor((xcent(2)-(xi2(1)-half*dxi))/dxi)+1
2587 ixpmin1=max(1,ixp1-3)
2588 ixpmax1=min(ixp1+3,numxi1)
2589 ixpmin2=max(1,ixp2-3)
2590 ixpmax2=min(ixp2+3,numxi2)
2591 do ixp1=ixpmin1,ixpmax1
2592 do ixp2=ixpmin2,ixpmax2
2593 xerfmin1=((xi1(ixp1)-half*dxi)-xcent(1))/(sqrt(2.d0)*sigma0)
2594 xerfmax1=((xi1(ixp1)+half*dxi)-xcent(1))/(sqrt(2.d0)*sigma0)
2595 xerfmin2=((xi2(ixp2)-half*dxi)-xcent(2))/(sqrt(2.d0)*sigma0)
2596 xerfmax2=((xi2(ixp2)+half*dxi)-xcent(2))/(sqrt(2.d0)*sigma0)
2597 factor=(erfc(xerfmin1)-erfc(xerfmax1))*(erfc(xerfmin2)-erfc(xerfmax2))/4.d0
2598 em(ixp1,ixp2)=em(ixp1,ixp2)+fluxsubc*factor
2609 integer,
intent(in) :: igrid,numXI1,numXI2
2610 double precision,
intent(in) :: xI1(numXI1),xI2(numXI2)
2611 double precision,
intent(in) :: dxI
2613 character(20),
intent(in) :: datatype
2614 double precision,
intent(inout) :: EM(numXI1,numXI2)
2616 integer :: ixO^L,ixO^D,ixI^L,ix^D,i,j
2617 double precision,
allocatable :: flux(:^D&),Ne(:^D&)
2618 integer :: ixP^L,ixP^D,nSubC^D,iSubC^D
2619 double precision :: xSubP1,xSubP2,dxSubP,xerf^L,fluxsubC,RsubC
2620 double precision :: TBsubC,PBsubC
2621 double precision :: xSubC(1:3),dxSubC^D,xCent(1:2),xSubC_car(1:3)
2622 double precision :: R_thick,dotp,dvolume,R_occult,Rc
2623 double precision :: dxl(1:3),x_sph(1:3),dx_sph(1:3)
2624 double precision :: unitv_r(1:3),unitv_theta(1:3),unitv_phi(1:3)
2625 logical :: sun_back_side,emit
2628 double precision :: logTe
2629 character (30) :: ion
2630 double precision :: lineCent
2631 double precision :: sigma_PSF,spaceRsl,wlRsl,sigma0,factor,wslit
2632 double precision :: RHESSI_rsl,area_1AU,arcsec,pixel
2634 ^d&ixomin^d=ixmlo^d;
2635 ^d&ixomax^d=ixmhi^d;
2636 ^d&iximin^d=ixglo^d;
2637 ^d&iximax^d=ixghi^d;
2640 arcsec=7.25d5/unit_length
2642 arcsec=7.25d7/unit_length
2645 allocate(flux(ixi^s))
2646 if (datatype==
'image_euv')
then
2648 call get_euv(wavelength,ixi^l,ixo^l,ps(igrid)%w,ps(igrid)%x,fl,flux)
2649 flux(ixo^s)=flux(ixo^s)/instrument_resolution_factor**2
2650 call get_line_info(wavelength,ion,mass,logte,linecent,spacersl,wlrsl,sigma_psf,wslit)
2651 pixel=spacersl*arcsec
2652 sigma0=sigma_psf*pixel
2653 else if (datatype==
'image_sxr')
then
2655 call get_sxr(ixi^l,ixo^l,ps(igrid)%w,ps(igrid)%x,fl,flux,emin_sxr,emax_sxr)
2656 rhessi_rsl=2.3d0/instrument_resolution_factor
2658 pixel=rhessi_rsl*arcsec
2659 sigma0=sigma_psf*pixel
2664 r_thick=r_opt_thick*const_rsun/unit_length
2665 {
do ix^d=ixomin^d,ixomax^d\}
2666 x_sph(1:3)=ps(igrid)%x(ix^d,1:3)
2667 dx_sph(1:3)=ps(igrid)%dx(ix^d,1:3)
2669 dxl(2)=x_sph(1)*dx_sph(2)
2670 dxl(3)=x_sph(1)*dsin(x_sph(2))*dx_sph(3)
2675 nsubc1=max(nsubc1,ceiling(dxl(1)*abs(dotp)/(dxi/2.d0)))
2677 nsubc1=max(nsubc1,ceiling(dxl(1)*abs(dotp)/(dxi/2.d0)))
2679 nsubc2=max(nsubc2,ceiling(dxl(2)*abs(dotp)/(dxi/2.d0)))
2681 nsubc2=max(nsubc2,ceiling(dxl(2)*abs(dotp)/(dxi/2.d0)))
2683 nsubc3=max(nsubc3,ceiling(dxl(3)*abs(dotp)/(dxi/2.d0)))
2685 nsubc3=max(nsubc3,ceiling(dxl(3)*abs(dotp)/(dxi/2.d0)))
2690 xsubc(1)=x_sph(1)-half*dx_sph(1)+(isubc1-half)*dx_sph(1)/nsubc1
2692 dxsubc1=dx_sph(1)/nsubc1
2695 xsubc(2)=x_sph(2)-half*dx_sph(2)+(isubc2-half)*dx_sph(2)/nsubc2
2696 dxsubc2=xsubc(1)*dx_sph(2)/nsubc2
2697 dxsubc3=xsubc(1)*dsin(xsubc(2))*dx_sph(3)/nsubc3
2698 dvolume=dxsubc1*dxsubc2*dxsubc3
2699 if (datatype==
'image_euv')
then
2701 fluxsubc=flux(ix^d)*dvolume*unit_length*1.d2/dxi/dxi
2703 fluxsubc=flux(ix^d)*dvolume*unit_length/dxi/dxi
2705 else if (datatype==
'image_sxr')
then
2707 fluxsubc=flux(ix^d)*dvolume*unit_length**3/area_1au
2710 if (fluxsubc>smalldouble)
then
2713 xsubc(3)=x_sph(3)-half*dx_sph(3)+(isubc3-half)*dx_sph(3)/nsubc3
2715 rc=dsqrt(xcent(1)**2+xcent(2)**2)
2720 sun_back_side=.true.
2721 if (dotp<0.d0) sun_back_side=.false.
2723 if (sun_back_side)
then
2725 if (rc>r_thick) emit=.true.
2728 if (xsubc(1)<=r_thick) emit=.false.
2734 ixp1=floor((xcent(1)-(xi1(1)-half*dxi))/dxi)+1
2735 ixp2=floor((xcent(2)-(xi2(1)-half*dxi))/dxi)+1
2736 ixpmin1=max(1,ixp1-3)
2737 ixpmax1=min(ixp1+3,numxi1)
2738 ixpmin2=max(1,ixp2-3)
2739 ixpmax2=min(ixp2+3,numxi2)
2740 do ixp1=ixpmin1,ixpmax1
2741 do ixp2=ixpmin2,ixpmax2
2742 xerfmin1=((xi1(ixp1)-half*dxi)-xcent(1))/(sqrt(2.d0)*sigma0)
2743 xerfmax1=((xi1(ixp1)+half*dxi)-xcent(1))/(sqrt(2.d0)*sigma0)
2744 xerfmin2=((xi2(ixp2)-half*dxi)-xcent(2))/(sqrt(2.d0)*sigma0)
2745 xerfmax2=((xi2(ixp2)+half*dxi)-xcent(2))/(sqrt(2.d0)*sigma0)
2746 factor=(erfc(xerfmin1)-erfc(xerfmax1))*(erfc(xerfmin2)-erfc(xerfmax2))/4.d0
2747 em(ixp1,ixp2)=em(ixp1,ixp2)+fluxsubc*factor
2762 integer,
intent(in) :: igrid,numXI1,numXI2,numWI
2763 double precision,
intent(in) :: xI1(numXI1),xI2(numXI2)
2764 double precision,
intent(in) :: dxI
2766 character(20),
intent(in) :: datatype
2767 double precision,
intent(inout) :: WLB(numXI1,numXI2,numWI)
2769 integer :: ixO^L,ixO^D,ixI^L,ix^D,i,j
2770 double precision,
allocatable :: flux(:^D&),Ne(:^D&)
2771 integer :: ixP^L,ixP^D,nSubC^D,iSubC^D
2772 double precision :: xSubP1,xSubP2,dxSubP,xerf^L,fluxsubC,RsubC
2773 double precision :: sigma_PSF,sigma0,arcsec,pixel,LASCO_rsl
2774 double precision :: A,B,C,D,Rc,Ne0,TBsubC,PBsubC,factor
2775 double precision :: R_thick,dotp,dvolume,R_occult
2776 double precision :: xSubC(1:3),dxSubC^D,xCent(1:2),xSubC_car(1:3)
2777 double precision :: dxl(1:3),x_sph(1:3),dx_sph(1:3)
2778 double precision :: unitv_r(1:3),unitv_theta(1:3),unitv_phi(1:3)
2781 ^d&ixomin^d=ixmlo^d;
2782 ^d&ixomax^d=ixmhi^d;
2783 ^d&iximin^d=ixglo^d;
2784 ^d&iximax^d=ixghi^d;
2787 arcsec=7.25d5/unit_length
2789 arcsec=7.25d7/unit_length
2793 if (whitelight_instrument==
'LASCO/C1')
then
2794 lasco_rsl=5.6d0/instrument_resolution_factor
2796 else if (whitelight_instrument==
'LASCO/C2')
then
2797 lasco_rsl=11.4d0/instrument_resolution_factor
2799 else if (whitelight_instrument==
'LASCO/C3')
then
2800 lasco_rsl=56.d0/instrument_resolution_factor
2803 if (r_occultor>1.d0) r_occult=r_occultor
2804 r_occult=r_occult*const_rsun/unit_length
2805 call fl%get_rho(ps(igrid)%w,ps(igrid)%x,ixi^l,ixo^l,ne)
2807 pixel=lasco_rsl*arcsec
2808 sigma0=sigma_psf*pixel
2811 r_thick=r_opt_thick*const_rsun/unit_length
2812 {
do ix^d=ixomin^d,ixomax^d\}
2813 x_sph(1:3)=ps(igrid)%x(ix^d,1:3)
2814 dx_sph(1:3)=ps(igrid)%dx(ix^d,1:3)
2816 dxl(2)=x_sph(1)*dx_sph(2)
2817 dxl(3)=x_sph(1)*dsin(x_sph(2))*dx_sph(3)
2818 ne0=ne(ix^d)*unit_numberdensity
2823 nsubc1=max(nsubc1,ceiling(dxl(1)*abs(dotp)/(dxi/2.d0)))
2825 nsubc1=max(nsubc1,ceiling(dxl(1)*abs(dotp)/(dxi/2.d0)))
2827 nsubc2=max(nsubc2,ceiling(dxl(2)*abs(dotp)/(dxi/2.d0)))
2829 nsubc2=max(nsubc2,ceiling(dxl(2)*abs(dotp)/(dxi/2.d0)))
2831 nsubc3=max(nsubc3,ceiling(dxl(3)*abs(dotp)/(dxi/2.d0)))
2833 nsubc3=max(nsubc3,ceiling(dxl(3)*abs(dotp)/(dxi/2.d0)))
2838 xsubc(1)=x_sph(1)-half*dx_sph(1)+(isubc1-half)*dx_sph(1)/nsubc1
2840 dxsubc1=dx_sph(1)/nsubc1
2844 xsubc(2)=x_sph(2)-half*dx_sph(2)+(isubc2-half)*dx_sph(2)/nsubc2
2845 dxsubc2=xsubc(1)*dx_sph(2)/nsubc2
2846 dxsubc3=xsubc(1)*dsin(xsubc(2))*dx_sph(3)/nsubc3
2847 dvolume=dxsubc1*dxsubc2*dxsubc3
2850 xsubc(3)=x_sph(3)-half*dx_sph(3)+(isubc3-half)*dx_sph(3)/nsubc3
2852 rc=dsqrt(xcent(1)**2+xcent(2)**2)
2855 if (rc>r_occult)
then
2859 tbsubc=tbsubc*dvolume*unit_length/dxi/dxi
2860 pbsubc=pbsubc*dvolume*unit_length/dxi/dxi
2861 if (tbsubc<1.d-20) emit=.false.
2866 ixp1=floor((xcent(1)-(xi1(1)-half*dxi))/dxi)+1
2867 ixp2=floor((xcent(2)-(xi2(1)-half*dxi))/dxi)+1
2868 ixpmin1=max(1,ixp1-3)
2869 ixpmax1=min(ixp1+3,numxi1)
2870 ixpmin2=max(1,ixp2-3)
2871 ixpmax2=min(ixp2+3,numxi2)
2872 do ixp1=ixpmin1,ixpmax1
2873 do ixp2=ixpmin2,ixpmax2
2874 xerfmin1=((xi1(ixp1)-half*dxi)-xcent(1))/(sqrt(2.d0)*sigma0)
2875 xerfmax1=((xi1(ixp1)+half*dxi)-xcent(1))/(sqrt(2.d0)*sigma0)
2876 xerfmin2=((xi2(ixp2)-half*dxi)-xcent(2))/(sqrt(2.d0)*sigma0)
2877 xerfmax2=((xi2(ixp2)+half*dxi)-xcent(2))/(sqrt(2.d0)*sigma0)
2878 factor=(erfc(xerfmin1)-erfc(xerfmax1))*(erfc(xerfmin2)-erfc(xerfmax2))/4.d0
2879 wlb(ixp1,ixp2,1)=wlb(ixp1,ixp2,1)+tbsubc*factor
2880 wlb(ixp1,ixp2,2)=wlb(ixp1,ixp2,2)+pbsubc*factor
2896 double precision,
intent(in) :: Rl
2897 double precision,
intent(inout) :: A,B,C,D
2899 double precision :: sinO,cosO,sinO2,cosO2,tmp
2904 coso=abs(dsqrt(coso2))
2905 tmp=log((1.d0+sino)/coso)
2907 b=-(1.d0-3.d0*sino2-(coso2/sino)*(1.d0+3.d0*sino2)*tmp)/8.d0
2908 c=4.d0/3.d0-coso-coso*coso2/3.d0
2909 d=(5.d0+sino2-(coso2/sino)*(5.d0-sino2)*tmp)/8.d0
2915 double precision,
intent(in) :: Rl,Rin,Ne,A,B,C,D
2916 double precision,
intent(inout) :: fluxTB,fluxPB
2918 double precision :: const,u,Bt,Br,PB,TB,sinchi2
2921 const=1.24878d-25/(1.d0-u/3.d0)
2923 bt=const*(c+u*(d-c))
2924 pb=const*sinchi2*((a+u*(b-a)))
2933 double precision,
intent(in) :: x_sph(1:3)
2934 double precision,
intent(inout) :: unitv_r(1:3),unitv_theta(1:3),unitv_phi(1:3)
2936 unitv_r(1)=dsin(x_sph(2))*dcos(x_sph(3))
2937 unitv_r(2)=dsin(x_sph(2))*dsin(x_sph(3))
2938 unitv_r(3)=dcos(x_sph(2))
2939 unitv_theta(1)=dcos(x_sph(2))*dcos(x_sph(3))
2940 unitv_theta(2)=dcos(x_sph(2))*dsin(x_sph(3))
2941 unitv_theta(3)=-dsin(x_sph(2))
2942 unitv_phi(1)=-dsin(x_sph(3))
2943 unitv_phi(2)=dcos(x_sph(3))
2948 subroutine output_data(qunit,xO1,xO2,dxO1,dxO2,wO,nXO1,nXO2,nWO,datatype)
2952 integer,
intent(in) :: qunit,nXO1,nXO2,nWO
2953 double precision,
intent(in) :: dxO1(nxO1),dxO2(nxO2)
2954 double precision,
intent(in) :: xO1(nXO1),xO2(nxO2)
2955 double precision,
intent(inout) :: wO(nXO1,nXO2,nWO)
2956 character(20),
intent(in) :: datatype
2958 integer :: nPiece,nP1,nP2,nC1,nC2,nWC
2959 integer :: piece_nmax1,piece_nmax2,ix1,ix2,j,ipc,ixc1,ixc2
2960 double precision,
allocatable :: xC(:,:,:,:),wC(:,:,:,:),dxC(:,:,:,:)
2966 if (abs(wo(ix1,ix2,j))<smalldouble) wo(ix1,ix2,j)=zero
2973 if (datatype==
'image_euv' .or. datatype==
'image_sxr')
then
2975 piece_nmax1=block_nx2
2976 piece_nmax2=block_nx3
2978 piece_nmax1=block_nx3
2979 piece_nmax2=block_nx1
2981 piece_nmax1=block_nx1
2982 piece_nmax2=block_nx2
2984 else if (datatype==
'spectrum_euv')
then
2987 piece_nmax2=block_nx1
2989 piece_nmax2=block_nx2
2991 piece_nmax2=block_nx3
2998 loopn1:
do j=piece_nmax1,1,-1
2999 if(mod(nxo1,j)==0)
then
3004 loopn2:
do j=piece_nmax2,1,-1
3005 if(mod(nxo2,j)==0)
then
3018 case(
'EIvtuCCmpi',
'ESvtuCCmpi',
'SIvtuCCmpi',
'WIvtuCCmpi')
3020 allocate(xc(npiece,nc1,nc2,2))
3021 allocate(dxc(npiece,nc1,nc2,2))
3022 allocate(wc(npiece,nc1,nc2,nwo))
3026 ix1=mod(ipc-1,np1)*nc1+ixc1
3027 ix2=floor(1.0*(ipc-1)/np1)*nc2+ixc2
3028 xc(ipc,ixc1,ixc2,1)=xo1(ix1)
3029 xc(ipc,ixc1,ixc2,2)=xo2(ix2)
3030 dxc(ipc,ixc1,ixc2,1)=dxo1(ix1)
3031 dxc(ipc,ixc1,ixc2,2)=dxo2(ix2)
3033 wc(ipc,ixc1,ixc2,j)=wo(ix1,ix2,j)
3040 deallocate(xc,dxc,wc)
3041 case(
'EIvtiCCmpi',
'ESvtiCCmpi',
'SIvtiCCmpi',
'WIvtiCCmpi')
3043 call mpistop(
"Error in synthesize emission: vti is not supported for dat resolution")
3045 call write_image_vticc(qunit,xo1,xo2,dxo1,dxo2,wo,nxo1,nxo2,nwo,nc1,nc2)
3048 call mpistop(
"Error in synthesize emission: Unknown convert_type")
3054 subroutine write_image_vticc(qunit,xO1,xO2,dxO1,dxO2,wO,nXO1,nXO2,nWO,nC1,nC2)
3058 integer,
intent(in) :: qunit,nXO1,nXO2,nWO,nC1,nC2
3059 double precision,
intent(in) :: xO1(nXO1),xO2(nxO2)
3060 double precision,
intent(in) :: dxO1(nxO1),dxO2(nxO2)
3061 double precision,
intent(in) :: wO(nXO1,nXO2,nWO)
3063 double precision :: origin(1:3), spacing(1:3)
3064 integer :: wholeExtent(1:6),extent(1:6)
3065 integer :: nP1,nP2,iP1,iP2,iw
3066 integer :: ixC1,ixC2,ixCmin1,ixCmax1,ixCmin2,ixCmax2
3070 character (70) :: subname,wname,vname,nameL,nameS
3071 character (len=std_len) :: filename
3073 double precision :: logTe
3074 character (30) :: ion
3075 double precision :: line_center
3076 double precision :: spatial_rsl,spectral_rsl,sigma_PSF,wslit
3079 origin(1)=xo1(1)-0.5d0*dxo1(1)
3080 origin(2)=xo2(1)-0.5d0*dxo2(1)
3099 inquire(qunit,opened=fileopen)
3100 if(.not.fileopen)
then
3105 write(filename,
'(a,i4.4,a)') trim(
filename_euv),filenr,
".vti"
3107 write(filename,
'(a,i4.4,a)') trim(
filename_sxr),filenr,
".vti"
3113 open(qunit,file=filename,status=
'unknown',form=
'formatted')
3117 write(qunit,
'(a)')
'<?xml version="1.0"?>'
3118 write(qunit,
'(a)',advance=
'no')
'<VTKFile type="ImageData"'
3119 write(qunit,
'(a)')
' version="0.1" byte_order="LittleEndian">'
3120 write(qunit,
'(a,3(1pe14.6),a,6(i10),a,3(1pe14.6),a)')
' <ImageData Origin="',&
3121 origin,
'" WholeExtent="',wholeextent,
'" Spacing="',spacing,
'">'
3123 write(qunit,
'(a)')
'<FieldData>'
3124 write(qunit,
'(2a)')
'<DataArray type="Float32" Name="TIME" ',&
3125 'NumberOfTuples="1" format="ascii">'
3127 write(qunit,
'(a)')
'</DataArray>'
3129 write(qunit,
'(2a)')
'<DataArray type="Float32" Name="logT" ',&
3130 'NumberOfTuples="1" format="ascii">'
3131 write(qunit,*) real(logte)
3132 write(qunit,
'(a)')
'</DataArray>'
3134 write(qunit,
'(a)')
'</FieldData>'
3139 extent(1)=(ip1-1)*nc1
3141 extent(3)=(ip2-1)*nc2
3147 write(qunit,
'(a,6(i10),a)') &
3148 '<Piece Extent="',extent,
'">'
3149 write(qunit,
'(a)')
'<CellData>'
3170 if (iw==1)
write(vname,
'(a)')
'B'
3171 if (iw==2)
write(vname,
'(a)')
'pB'
3179 write(qunit,
'(a,a,a)')&
3180 '<DataArray type="Float64" Name="',trim(vname),
'" format="ascii">'
3181 write(qunit,
'(200(1pe14.6))') ((wo(ixc1,ixc2,iw),ixc1=ixcmin1,ixcmax1),ixc2=ixcmin2,ixcmax2)
3182 write(qunit,
'(a)')
'</DataArray>'
3184 write(qunit,
'(a)')
'</CellData>'
3185 write(qunit,
'(a)')
'</Piece>'
3189 write(qunit,
'(a)')
'</ImageData>'
3190 write(qunit,
'(a)')
'</VTKFile>'
3200 integer,
intent(in) :: qunit
3201 integer,
intent(in) :: nPiece,nC1,nC2,nWC
3202 double precision,
intent(in) :: xC(nPiece,nC1,nC2,2),dxC(nPiece,nc1,nc2,2)
3203 double precision,
intent(in) :: wC(nPiece,nC1,nC2,nWC)
3204 character(20),
intent(in) :: datatype
3207 double precision :: xP(nPiece,nC1+1,nC2+1,2)
3210 character (70) :: subname,wname,vname,nameL,nameS
3211 character (len=std_len) :: filename
3212 integer :: ixC1,ixC2,ixP,ix1,ix2,j
3213 integer :: nc,np,icel,VTK_type
3215 double precision :: logTe
3216 character (30) :: ion
3217 double precision :: line_center
3218 double precision :: spatial_rsl,spectral_rsl,sigma_PSF,wslit
3228 if (ix1<np1) xp(ixp,ix1,ix2,1)=xc(ixp,ix1,1,1)-0.5d0*dxc(ixp,ix1,1,1)
3229 if (ix1==np1) xp(ixp,ix1,ix2,1)=xc(ixp,ix1-1,1,1)+0.5d0*dxc(ixp,ix1-1,1,1)
3230 if (ix2<np2) xp(ixp,ix1,ix2,2)=xc(ixp,1,ix2,2)-0.5d0*dxc(ixp,1,ix2,2)
3231 if (ix2==np2) xp(ixp,ix1,ix2,2)=xc(ixp,1,ix2-1,2)+0.5d0*dxc(ixp,1,ix2-1,2)
3236 if (datatype==
'image_euv')
then
3238 else if (datatype==
'spectrum_euv')
then
3243 inquire(qunit,opened=fileopen)
3244 if(.not.fileopen)
then
3248 if (datatype==
'image_euv')
then
3249 write(filename,
'(a,i4.4,a)') trim(
filename_euv),filenr,
".vtu"
3250 else if (datatype==
'image_sxr')
then
3251 write(filename,
'(a,i4.4,a)') trim(
filename_sxr),filenr,
".vtu"
3252 else if (datatype==
'image_whitelight')
then
3254 else if (datatype==
'spectrum_euv')
then
3257 open(qunit,file=filename,status=
'unknown',form=
'formatted')
3260 write(qunit,
'(a)')
'<?xml version="1.0"?>'
3261 write(qunit,
'(a)',advance=
'no')
'<VTKFile type="UnstructuredGrid"'
3262 write(qunit,
'(a)')
' version="0.1" byte_order="LittleEndian">'
3263 write(qunit,
'(a)')
'<UnstructuredGrid>'
3264 write(qunit,
'(a)')
'<FieldData>'
3265 write(qunit,
'(2a)')
'<DataArray type="Float32" Name="TIME" ',&
3266 'NumberOfTuples="1" format="ascii">'
3268 write(qunit,
'(a)')
'</DataArray>'
3269 if (datatype==
'image_euv' .or. datatype==
'spectrum_euv')
then
3270 write(qunit,
'(2a)')
'<DataArray type="Float32" Name="logT" ',&
3271 'NumberOfTuples="1" format="ascii">'
3272 write(qunit,*) real(logte)
3273 write(qunit,
'(a)')
'</DataArray>'
3275 write(qunit,
'(a)')
'</FieldData>'
3277 write(qunit,
'(a,i7,a,i7,a)') &
3278 '<Piece NumberOfPoints="',np,
'" NumberOfCells="',nc,
'">'
3279 write(qunit,
'(a)')
'<CellData>'
3281 if (datatype==
'image_euv')
then
3292 else if (datatype==
'image_sxr')
then
3300 else if (datatype==
'image_whitelight')
then
3301 write(vname,
'(a)')
'whitelight'
3302 else if (datatype==
'spectrum_euv')
then
3309 write(qunit,
'(a,a,a)')&
3310 '<DataArray type="Float64" Name="',trim(vname),
'" format="ascii">'
3311 write(qunit,
'(200(1pe14.6))') ((wc(ixp,ixc1,ixc2,j),ixc1=1,nc1),ixc2=1,nc2)
3312 write(qunit,
'(a)')
'</DataArray>'
3314 write(qunit,
'(a)')
'</CellData>'
3315 write(qunit,
'(a)')
'<Points>'
3316 write(qunit,
'(a)')
'<DataArray type="Float32" NumberOfComponents="3" format="ascii">'
3321 write(qunit,
'(3(1pe14.6))') 0.d0,xp(ixp,ix1,ix2,1),xp(ixp,ix1,ix2,2)
3323 write(qunit,
'(3(1pe14.6))') xp(ixp,ix1,ix2,2),0.d0,xp(ixp,ix1,ix2,1)
3325 write(qunit,
'(3(1pe14.6))') xp(ixp,ix1,ix2,1),xp(ixp,ix1,ix2,2),0.d0
3329 write(qunit,
'(3(1pe14.6))') 0.d0,xp(ixp,ix1,ix2,1),xp(ixp,ix1,ix2,2)
3331 write(qunit,
'(3(1pe14.6))') xp(ixp,ix1,ix2,2),0.d0,xp(ixp,ix1,ix2,1)
3333 write(qunit,
'(3(1pe14.6))') xp(ixp,ix1,ix2,1),xp(ixp,ix1,ix2,2),0.d0
3336 write(qunit,
'(3(1pe14.6))') xp(ixp,ix1,ix2,1),xp(ixp,ix1,ix2,2),0.d0
3340 write(qunit,
'(a)')
'</DataArray>'
3341 write(qunit,
'(a)')
'</Points>'
3343 write(qunit,
'(a)')
'<Cells>'
3344 write(qunit,
'(a)')
'<DataArray type="Int32" Name="connectivity" format="ascii">'
3347 write(qunit,
'(4(i7))') ix1-1+(ix2-1)*np1,ix1+(ix2-1)*np1,&
3348 ix1-1+ix2*np1,ix1+ix2*np1
3351 write(qunit,
'(a)')
'</DataArray>'
3353 write(qunit,
'(a)')
'<DataArray type="Int32" Name="offsets" format="ascii">'
3355 write(qunit,
'(i7)') icel*(2**2)
3357 write(qunit,
'(a)')
'</DataArray>'
3359 write(qunit,
'(a)')
'<DataArray type="Int32" Name="types" format="ascii">'
3363 write(qunit,
'(i2)') vtk_type
3365 write(qunit,
'(a)')
'</DataArray>'
3366 write(qunit,
'(a)')
'</Cells>'
3367 write(qunit,
'(a)')
'</Piece>'
3369 write(qunit,
'(a)')
'</UnstructuredGrid>'
3370 write(qunit,
'(a)')
'</VTKFile>'
3376 double precision,
intent(in) :: vec1(1:3),vec2(1:3)
3377 double precision,
intent(out) :: res
3379 res=vec1(1)*vec2(1)+vec1(2)*vec2(2)+vec1(3)*vec2(3)
3384 double precision,
intent(in) :: vec_in1(1:3),vec_in2(1:3)
3385 double precision,
intent(out) :: vec_out(1:3)
3387 vec_out(1)=vec_in1(2)*vec_in2(3)-vec_in1(3)*vec_in2(2)
3388 vec_out(2)=vec_in1(3)*vec_in2(1)-vec_in1(1)*vec_in2(3)
3389 vec_out(3)=vec_in1(1)*vec_in2(2)-vec_in1(2)*vec_in2(1)
3395 double precision :: LOS_psi
3396 double precision :: vec_car(1:3),vec_z(1:3),vec_temp1(1:3),vec_temp2(1:3)
3397 double precision :: vec_LOS_sph(1:3),vec_xI1_sph(1:3),vec_xI2_sph(1:3)
3401 vec_los(2)=dpi*los_theta/180.d0
3412 if (los_theta==zero)
then
3414 vec_temp1(2)=dpi/2.d0
3415 vec_temp1(3)=dpi*los_phi/180.d0
3429 los_psi=dpi*image_rotate/180.d0
3430 vec_xi1=vec_temp1*cos(los_psi)-vec_temp2*sin(los_psi)
3431 vec_xi2=vec_temp2*cos(los_psi)+vec_temp1*sin(los_psi)
3442 vec_los_sph(2:3)=vec_los_sph(2:3)*180.d0/dpi
3443 vec_xi1_sph(2:3)=vec_xi1_sph(2:3)*180.d0/dpi
3444 vec_xi2_sph(2:3)=vec_xi2_sph(2:3)*180.d0/dpi
3446 if (mype==0)
write(*,
'(a,f3.1,f6.1,f6.1,a)')
' LOS vector (spherial): [',vec_los_sph(1),vec_los_sph(2),vec_los_sph(3),
']'
3447 if (mype==0)
write(*,
'(a,f3.1,f6.1,f6.1,a)')
' xI1 vector (spherial): [',vec_xi1_sph(1),vec_xi1_sph(2),vec_xi1_sph(3),
']'
3448 if (mype==0)
write(*,
'(a,f3.1,f6.1,f6.1,a)')
' xI2 vector (spherial): [',vec_xi2_sph(1),vec_xi2_sph(2),vec_xi2_sph(3),
']'
3454 double precision,
intent(in) :: vec_sph(1:3)
3455 double precision,
intent(inout) :: vec_car(1:3)
3457 vec_car(1)=vec_sph(1)*dsin(vec_sph(2))*dcos(vec_sph(3))
3458 vec_car(2)=vec_sph(1)*dsin(vec_sph(2))*dsin(vec_sph(3))
3459 vec_car(3)=vec_sph(1)*dcos(vec_sph(2))
3465 double precision,
intent(in) :: vec_car(1:3)
3466 double precision,
intent(inout) :: vec_sph(1:3)
3468 vec_sph(1)=dsqrt(vec_car(1)**2+vec_car(2)**2+vec_car(3)**2)
3469 vec_sph(2)=dacos(vec_car(3)/vec_sph(1))
3470 vec_sph(3)=atan2(vec_car(2),vec_car(3))
3476 double precision :: LOS_psi
3477 double precision :: vec_z(1:3),vec_temp1(1:3),vec_temp2(1:3)
3480 vec_los(1)=-cos(dpi*los_phi/180.d0)*sin(dpi*los_theta/180.d0)
3481 vec_los(2)=-sin(dpi*los_phi/180.d0)*sin(dpi*los_theta/180.d0)
3482 vec_los(3)=-cos(dpi*los_theta/180.d0)
3488 if (los_theta==zero)
then
3489 vec_xi1(1)=cos(dpi*los_phi/180.d0)
3490 vec_xi1(2)=sin(dpi*los_phi/180.d0)
3498 los_psi=dpi*image_rotate/180.d0
3499 vec_xi1=vec_temp1*cos(los_psi)-vec_temp2*sin(los_psi)
3500 vec_xi2=vec_temp2*cos(los_psi)+vec_temp1*sin(los_psi)
3514 double precision,
intent(in) :: x_3D_sph(1:3)
3515 double precision,
intent(inout) :: x_image(1:2)
3516 double precision :: res,res_origin
3517 double precision :: x_3D(1:3)
3528 double precision,
intent(in) :: x_3D(1:3)
3529 double precision,
intent(inout) :: x_image(1:2)
3530 double precision :: res,res_origin
3534 x_image(1)=res-res_origin
3537 x_image(2)=res-res_origin
subroutine, public mpistop(message)
Exit MPI-AMRVAC with an error message.
Module for physical and numeric constants.
double precision, parameter const_rsun
double precision, parameter kb_cgs
Boltzmann constant in cgs.
double precision, parameter half
double precision, parameter one
double precision, parameter dpi
Pi.
double precision, parameter zero
some frequently used numbers
double precision, parameter smalldouble
double precision, parameter mp_cgs
Proton mass in cgs.
double precision, parameter const_c
universal constants as specified in cgs units
Module with geometry-related routines (e.g., divergence, curl)
integer, parameter spherical
integer, parameter cartesian
This module contains definitions of global parameters and variables and some generic functions/subrou...
character(len=std_len) filename_sxr
Base file name for synthetic SXR emission output.
integer spectrum_wl
wave length for spectrum
integer ixghi
Upper index of grid block arrays.
logical activate_unit_arcsec
use arcsec as length unit of images/spectra
character(len=std_len) filename_spectrum
Base file name for synthetic EUV spectrum output.
double precision global_time
The global simulation time.
integer snapshotini
Resume from the snapshot with this index.
character(len=std_len) filename_euv
Base file name for synthetic EUV emission output.
double precision unit_numberdensity
Physical scaling factor for number density.
character(len=std_len) filename_whitelight
Base file name for synthetic white light.
character(len=std_len) convert_type
Which format to use when converting.
integer, parameter rpxmin
double precision unit_length
Physical scaling factor for length.
double precision location_slit
location of the slit
double precision time_convert_factor
Conversion factor for time unit.
integer icomm
The MPI communicator.
character(len=std_len) whitelight_instrument
white light observation instrument
integer mype
The rank of the current MPI task.
double precision, dimension(:), allocatable, parameter d
integer ierrmpi
A global MPI error return code.
logical autoconvert
If true, already convert to output format during the run.
integer snapshotnext
IO: snapshot and collapsed views output numbers/labels.
logical dat_resolution
resolution of the images
double precision r_occultor
the white light emission below it (unit=Rsun) is not visible
integer, dimension(ndim) nstretchedblocks_baselevel
(even) number of (symmetrically) stretched blocks at AMR level 1, per dimension
double precision, dimension(^nd) qstretch_baselevel
stretch factor between cells at AMR level 1, per dimension
double precision unit_velocity
Physical scaling factor for velocity.
double precision, dimension(:,:), allocatable rnode
Corner coordinates.
double precision unit_temperature
Physical scaling factor for temperature.
logical si_unit
Use SI units (.true.) or use cgs units (.false.)
double precision los_theta
direction of the line of sight (LOS)
double precision spectrum_window_max
integer wavelength
wavelength for output
integer, dimension(ndim) stretch_type
What kind of stretching is used per dimension.
double precision, dimension(^nd) dxlevel
store unstretched cell size of current level
integer, parameter rpxmax
logical big_image
big image
double precision instrument_resolution_factor
times for enhancing spatial resolution for EUV image/spectra
double precision spectrum_window_min
spectral window
integer refine_max_level
Maximal number of AMR levels.
integer direction_slit
direction of the slit (for dat resolution only)
double precision, dimension(1:3) x_origin
where the is the origin (X=0,Y=0) of image
integer, dimension(:,:), allocatable node
integer, parameter ixglo
Lower index of grid block arrays (always 1)
This module defines the procedures of a physics module. It contains function pointers for the various...
double precision, dimension(1:3) vec_los
subroutine get_goes_flux_grid(ixil, ixol, w, x, dv, xboxl, xbl, fl, eflux_grid)
subroutine integrate_spectra_cartesian(igrid, wl, dwlg, xs, dxsg, spectra, numwl, numxs, fl)
subroutine get_spectrum_datresol(qunit, datatype, fl)
double precision, dimension(1:101) f_304
double precision, dimension(1:101) f_193
double precision, dimension(1:60) f_264
double precision, dimension(1:60) f_263
subroutine get_euv_image(qunit, fl)
double precision, dimension(1:60) t_eis1
subroutine get_sxr(ixil, ixol, w, x, fl, flux, el, eu)
subroutine get_unit_vector_spherical(x_sph, unitv_r, unitv_theta, unitv_phi)
double precision, dimension(1:101) f_131
subroutine get_line_info(wl, ion, mass, logte, line_center, spatial_px, spectral_px, sigma_psf, width_slit)
double precision, dimension(1:60) f_255
double precision, dimension(1:101) t_aia
subroutine write_image_vtucc(qunit, xc, wc, dxc, npiece, nc1, nc2, nwc, datatype)
subroutine get_cor_image(x_3d, x_image)
subroutine get_thomson_parameters(rl, a, b, c, d)
subroutine integrate_euv_datresol(igrid, nxif1, nxif2, xif1, xif2, dxif1, dxif2, fl, euv, dpl)
double precision, dimension(1:60) t_eis2
double precision, dimension(1:101) f_171
double precision, dimension(1:101) f_94
subroutine integrate_spectra_datresol(igrid, wl, dwl, spectra, numwl, numxs, dir_loc, fl)
double precision, dimension(1:3) vec_xi1
subroutine get_spectrum(qunit, datatype, fl)
subroutine cartesian_to_spherical(vec_car, vec_sph)
subroutine get_cor_image_spherical(x_3d_sph, x_image)
subroutine dot_product_loc(vec1, vec2, res)
subroutine integrate_emission_spherical(igrid, numxi1, numxi2, xi1, xi2, dxi, fl, datatype, em)
subroutine get_image(qunit, datatype, fl)
subroutine integrate_emission_cartesian(igrid, numxi1, numxi2, xi1, xi2, dxi, fl, datatype, em)
subroutine init_vectors_spherical()
subroutine write_image_vticc(qunit, xo1, xo2, dxo1, dxo2, wo, nxo1, nxo2, nwo, nc1, nc2)
subroutine get_sxr_image(qunit, fl)
subroutine init_vectors_cartesian()
double precision, dimension(1:60) f_192
subroutine get_whitelight_thomson(rl, rin, ne, a, b, c, d, fluxtb, fluxpb)
subroutine get_image_datresol(qunit, datatype, fl)
subroutine get_goes_sxr_flux(xboxl, fl, eflux)
subroutine integrate_whitelight_spherical(igrid, numxi1, numxi2, numwi, xi1, xi2, dxi, fl, datatype, wlb)
double precision, dimension(1:3) vec_xi2
double precision, dimension(1:41) f_1354
subroutine cross_product_loc(vec_in1, vec_in2, vec_out)
subroutine integrate_sxr_datresol(igrid, nxif1, nxif2, xif1, xif2, dxif1, dxif2, fl, sxr)
double precision, dimension(1:101) f_335
subroutine output_data(qunit, xo1, xo2, dxo1, dxo2, wo, nxo1, nxo2, nwo, datatype)
double precision, dimension(1:41) t_iris
subroutine get_euv_spectrum(qunit, fl)
double precision, dimension(1:101) f_211
subroutine get_whitelight_image(qunit, fl)
subroutine get_euv(wl, ixil, ixol, w, x, fl, flux)
subroutine spherical_to_cartesian(vec_sph, vec_car)