-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathparams.F90
69 lines (65 loc) · 2.42 KB
/
params.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
module params
use data_types
use misc
implicit none
integer :: par_NG, par_NT, par_NF, par_time_grid
real(dp) :: par_R, par_R0, par_d_lum, par_z, par_gamma_bulk, par_theta_obs, &
par_sigma, par_b_index, par_theta_e, par_zetae, par_L_j, par_eps_e, &
par_tstep, par_tmax, par_tmin, par_eps_B, par_tvar, par_frec, par_pind,&
par_g1, par_g2, par_gmin, par_gmax, par_nu_ext, par_uext, par_numin, &
par_numax, par_E0, par_n_ext, par_B, par_mu_mag, par_eta_j, par_fesc, &
par_eps_acc
public :: par_NG, par_NT, par_NF, par_time_grid
public :: par_R, par_R0, par_d_lum, par_z, par_gamma_bulk, par_theta_obs, &
par_sigma, par_b_index, par_theta_e, par_zetae, par_L_j, par_eps_e, &
par_tstep, par_tmax, par_tmin, par_eps_B, par_tvar, par_frec, par_pind,&
par_g1, par_g2, par_gmin, par_gmax, par_nu_ext, par_uext, par_numin, &
par_numax, par_E0, par_B, par_mu_mag, par_eta_j, par_fesc, par_eps_acc
contains
!!!!!! TODO: separate parameters and write them all in a single parameter file: 1st global parameters, 2nd Problem specific parameters
subroutine read_params(par_file)
implicit none
character(*), intent(in) :: par_file
integer :: ios
open(unit=77, file=par_file, iostat=ios)
if ( ios /= 0 ) call an_error("Paramo: Parameter file "//par_file//" could not be opened")
read(77, *) par_R
read(77, *) par_R0
read(77, *) par_d_lum
read(77, *) par_z
read(77, *) par_theta_obs
read(77, *) par_gamma_bulk
read(77, *) par_mu_mag
read(77, *) par_sigma
read(77, *) par_frec
read(77, *) par_b_index
read(77, *) par_B
read(77, *) par_theta_e
read(77, *) par_zetae
read(77, *) par_fesc
read(77, *) par_tstep
read(77, *) par_tmax
read(77, *) par_tmin
read(77, *) par_tvar
read(77, *) par_L_j
read(77, *) par_E0
read(77, *) par_n_ext
read(77, *) par_eps_e
read(77, *) par_eps_B
read(77, *) par_eps_acc
read(77, *) par_g1
read(77, *) par_g2
read(77, *) par_gmin
read(77, *) par_gmax
read(77, *) par_pind
read(77, *) par_nu_ext
read(77, *) par_uext
read(77, *) par_numin
read(77, *) par_numax
read(77, *) par_NG
read(77, *) par_NT
read(77, *) par_NF
read(77, *) par_time_grid
close(77)
end subroutine read_params
end module params