-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsco_programDSKB_dL.f90
48 lines (42 loc) · 1.95 KB
/
sco_programDSKB_dL.f90
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
PROGRAM PRUEBA_DSKB
USE iso_fortran_env, ONLY : WP => REAL64
USE sco_global
USE sco_arrays
IMPLICIT NONE
REAL(WP) :: disk_size, corona_size, Tcorona, Tdisk, tau, QPO_frequency, dL, eta_frac
REAL(WP) :: Tsss(meshlog+4), Ssss(meshlog+4), Treal(meshlog+4), Sreal(meshlog+4)
REAL(WP) :: Timag(meshlog+4), Simag(meshlog+4)
REAL(WP) :: dTe_mod, dTs_mod, dTe_arg, dTs_arg, Hexo0_out, eta_int
REAL(WP), ALLOCATABLE :: bandwidth(:,:), fracrms(:), plag_scaled(:), SSS_band(:),Re_band(:), Im_band(:)
INTEGER :: Nsss, Nreal, Nimag, rows, dim_int
disk_size = 250 !km
corona_size = 7100.00 !km
Tcorona = 20.00 !keV
Tdisk = 0.2 !keV
tau = 1.30 !
QPO_frequency = 4.5 !Hz
DL = 0.1 !
eta_frac = 0.5 !
CALL sco_MODEL_LOGdskb_dL(disk_size, corona_size, Tcorona, Tdisk, tau, QPO_frequency, DL, eta_frac, Nsss, Ssss,Tsss, &
Nreal, Sreal, Treal, Nimag,Simag, Timag, dTe_mod, dTs_mod, dTe_arg, dTs_arg, Hexo0_out, eta_int)
write(*,*) 'dTe_mod = ', dTe_mod
write(*,*) 'dTs_mod = ', dTs_mod
write(*,*) 'eta_int = ', eta_int
write(*,*) 'Hex0 =', Hexo0_out
rows = 100
ALLOCATE(bandwidth(rows,2),fracrms(rows), plag_scaled(rows), SSS_band(rows),Re_band(rows), Im_band(rows))
DO I=1,rows
!rows log steps from 0.1 to 100.0 keV
bandwidth(i,1) = 10**( -1 + (i-1)/float(rows)*(3) )
bandwidth(i,2) = 10**( -1 + i/float(rows)*(3) )
ENDDO
dim_int =mesh_size-4
CALL sco_band_integrated_amplitude(rows,bandwidth,dim_int, Nsss, Tsss, Ssss, Nreal, Treal, Sreal, Nimag, Timag, Simag, &
fracrms, plag_scaled, SSS_band,Re_band, Im_band)
OPEN(UNIT=11, FILE= 'outputDSKBdL.dat')
WRITE(11,*) '# E_lo', ' E_hi', 'fractional rms ', ' phase lag ', ' SSS band ', ' Real band ', ' Imag band'
DO I=1, ROWS
WRITE(11,*) bandwidth(I,1),bandwidth(I,2),fracrms(I), plag_scaled(I), SSS_band(I), Re_band(I), Im_band(I)
ENDDO
CLOSE(11)
END PROGRAM