;change dir(L7),ndays(L8),Year(L16),DOY(L34),mn(L38),band(L40),filenmae(L61),fmt(L68) ;--------------------------------------------------- ; restore FISM *.sav ;ls *.sav>files.dat ;dir='/hao/ada1/lqian/fism/2012flare_phil/lisird_FISM_flare_data.2012022.2012024/2012/' dir = '/hao/aim3/huangys/tiegcm1.94_data/SolarFlare/RawData/FISM_flare/2011/' ndays=365 nbins=195 ntimes=ndays*1440L ; 1-minute resolution flux=fltarr(ntimes,nbins) flux2 = flux time=fltarr(ntimes) ; close,1 openr,1,'files_2011.dat' str=' ' ; restore the first day ; fism_wv[195]: wave length from 0-195 on 1-nm resolution ;fism_pred[1440,195]:flare data on 1-minute cadence for a day ;utc[1440]: time of the spectra for the day (in seconds,from 0,60,120... 86340) for m=0L,ndays-1 do begin readf,1,str fn=dir+str print,fn restore,fn ;wavelength in nm if m eq 0 then wv=fism_wv for i=0L,nbins-1 do begin flux[m*1440:((m+1)*1440-1),i]=fism_pred[*,i]*(6.242e11/12398)*wv[i]*10.*1.e3 ; w/m^2(FISM) to photon/cm^2/s(TIEGCM) endfor time[m*1440:((m+1)*1440-1)]=double(utc)/double(3600.)/double(24.)+(DATE-2011000.) endfor ;set XUV/EUV/Lyman alpha/FUV to a constant value before flare. mn = 0 ;index for preflare ;for i = 0, nbins-1 do begin ;flux(*,0:13) ;0.5 - 13.5 nm ; if (i ge 14) then flux(*,i) = flux(mn,i) ;flux(*,14:24) ;14.5 - 24.5 nm ; if ((i le 13) or (i ge 25)) then flux(*,i) = flux(mn,i) ;flux(*,25:104) ;25.5 - 104.5 nm ; if ((i le 24) or (i ge 105)) then flux(*,i) = flux(mn,i) ;flux(*,105:120) ;105.5 - 120.5 nm ; if ((i le 104) or (i ge 121)) then flux(*,i) = flux(mn,i) ;flux(*,121) ;Lyman alpha ; if (i ne 121) then flux(*,i)=flux(mn,i) ;flux(*,122:194) ;122.5 - 194.5 nm ; if (i le 121) then flux(*,i) = flux(mn,i) ;flux(*,0:194) ;0.5 - 194.5 nm ; flux(*,i) = flux(mn,i) ;endfor ;plot, wv,flux(667, *)-flux(mn,*) ;write text data file close,1 ;openw,2,'2012_0122-0124_fism_flare_orig.dat' ;openw,2,'2012063_073_fism_0_195nm_orig.dat' openw,2,'2011001_365_fism_0_195nm_orig.dat' ; 1440*3=4320 ; 1440*4=5760 ; 1440*5=7200 ;1440*6=8640 ;1440*7=10080 ;fmt='$(f9.2,4321e12.3)' fmt='$(f9.2,525601e12.3)' ;one day with 1440 points for 1-minute resolution:1440*365L+1 ;fmt='$(f9.2,306721e12.3)' ;one day with 1440 points for 1-minute resolution:1440*213L+1 for i=0,nbins-1 do begin printf,2,fmt,wv[i],flux[*,i] endfor close,2 end