-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocalpe_ssflux.pro
159 lines (134 loc) · 4.39 KB
/
localpe_ssflux.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
pro localpe_ssflux,hi
@ace_common_blocks.prg ; common blocks used for all atmospheric chemistry and energetics (ace) software
; see this file for definitions
;___________________________________________________________________________________________________________________________________________________________________
;#1 NRL spectrum
;___________________________________________________________________________________________________________________________________________________________________
restore, 'newspectra.sav'
;;file has: wave_gcm1,wave_gcm2,meanpeakx9,peakm5
wv1=wave_gcm1
wv2=wave_gcm2
ssflux=meanpeakx9
;
mask=fltarr(n_elements(wv1))
mask[hi]=1.
ssflux=ssflux*mask
;___________________________________________________________________________________________________________________________________________________________________
; #4 EUVAC- from Solomon and Qian 2005
;filename='/home/srimoyee/Desktop/nrl_files/sav_files/Solomon_Qian2005.sav'
;;file has:A_fac, fref, wavelength_low, wavelength_high
;restore, filename
;
;f107=70
;f107a=70
;P107 = (F107+F107A)/2.
;n_wvl=n_elements(a_fac)
;ssflux= fltarr(n_wvl)
;for L=0,n_wvl-1 do begin
; SSFLUX(L) = fref(L) * (1. + A_fac(L)*(P107-80.))
; IF (SSFLUX(L) LT 0.8*fref(L)) then SSFLUX(L) = 0.8*fref(L)
;endfor
;
;wv1=wavelength_low
;wv2=wavelength_high
;mask=fltarr(22)
;mask[hi]=1.
;ssflux=ssflux*mask
;......................................................................
;......................................................................
;;Adding EUVAC spectra to higher wavlengths in NRL spectra for testing
;;NRL does not have values in bins higer than 450 A ,.i.e., from index 81
;
;;EUVAC model solar spectrum
;n_wvl=123
;waves=fltarr(n_wvl)
;wavel=fltarr(n_wvl)
;rflux=fltarr(n_wvl) ;reference flux
;a=fltarr(n_wvl)
;
;euv_data=fltarr(4,n_wvl)
;openr,lun_euvac,'ssflux_euvac.dat',/get_lun
;skip_lun, lun_euvac, 1, /lines ; 1 header line
;readf,lun_euvac,euv_data
;waves=reform(euv_data[0,*])
;wavel=reform(euv_data[1,*])
;rflux=reform(euv_data[2,*])
;a=reform(euv_data[3,*])
;free_lun,lun_euvac
;
;P107 = (F107+F107A)/2.
;euv_sflux=fltarr(n_wvl) ; EUV solar spectrum
;
;for L=0,n_wvl-1 do begin
; EUV_SFLUX(L) = RFLUX(L) * (1. + A(L)*(P107-80.))
; IF (EUV_SFLUX(L) LT 0.8*RFLUX(L)) then EUV_SFLUX(L) = 0.8*RFLUX(L)
;endfor
;
;;Adding EUVAC to NRL spectrum for higher wavelengths
;ssflux[81:-1]=euv_sflux[48:-1] ;FINAL SPECTRUM
; Making some bins..................for this keep maskk=0
;ssflux_copy=ssflux
;ssflux=ssflux*0.0
;#1 soft x-rays less than 300A
;ssflux[0:65]=ssflux_copy[0:65]
;#2 He II 304A
;ssflux[66]=ssflux_copy[66]
;
;;#3 greater than 304A
;ssflux[67:-1]=ssflux_copy[67:-1]
;
;;#4 Lyman beta
;ssflux[138]=ssflux_copy[138]
;
;;#5 Lyman alpha
;ssflux[144]=ssflux_copy[144]
;#6 Auger N2
;ssflux[40]=ssflux_copy[40]
;___________________________________________________________________________________________________________________________________________________________________
;; SQ05 with and without Fe line
;file='/home/srimoyee/Desktop/nrl_files/sav_files/x9_stanbands_myver.sav'
;;file='/home/srimoyee/Desktop/nrl_files/sav_files/m5_stanbands_myver.sav'
;; file has: wave_lo, wave_hi,spectrum
;
;restore, file
;;for SQ' 05 + Fe line
;wv1=wave_lo
;wv2=wave_hi
;ssflux=spectrum[*,720]
;mask=fltarr(38)
;mask[hi]=1.
;ssflux=ssflux*mask
;___________________________________________________________________________________________________________________________________________________________________
; FISM Spectra
;filenam= '/home/srimoyee/Desktop/nrl_files/sav_files/fism_1606_253sep17.txt'
;
;openr,lun_fism, filenam, /get_lun
;n_wv=32 ;wavelength bins
;wave1=fltarr(n_wv) ;in nm ?
;wave2=fltarr(n_wv) ;in nm ?
;fismflux=dblarr(n_wv) ;in photons/cm2/s
;skip_lun, lun_fism, 2, /LINES
;count=0
;
;while not eof(lun_fism) do begin
; readf,lun_fism,a,b,c
; wave1(count)=a*10.0
; wave2(count)=b*10.0
; fismflux(count)=c
; count++
;endwhile
;free_lun,lun_fism
;
;wv1=wave1
;wv2=wave2
;ssflux=fismflux
;
;
;;mask=fltarr(n_elements(wv1))
;;mask[hi]=1.
;;ssflux=ssflux*mask
;
;___________________________________________________________________________________________________________________________________________________________________
lmax=n_elements(wv1)
return
end