forked from landreman/regcoil_pm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathregcoil_write_input.f90
42 lines (36 loc) · 1.89 KB
/
regcoil_write_input.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
! This subroutine is used only when REGCOIL is called from STELLOPT,
! and it not used when REGCOIL is run as a standalone code.
subroutine regcoil_write_input(proc_string,iunit,istat)
! proc_string is normally located in stellopt_runtime.f90
! istat is not used for anything. Why include it?
integer, intent(in) :: istat
character(256), intent(in) :: proc_string
character(256) :: wout_filename_new
integer :: iunit
character(LEN=*), parameter :: OUTBOO = "(2X,A,1X,'=',1X,L1)"
character(LEN=*), parameter :: OUTINT = "(2X,A,1X,'=',1X,I0)"
character(LEN=*), parameter :: OUTFLT = "(2X,A,1X,'=',1X,E22.14)"
character(LEN=*), parameter :: OUTSTR = "(2X,A,1X,'=',1X,'''',A,'''')"
wout_filename_new = 'wout_'//TRIM(proc_string)//'.nc'
write(iunit, '(A)') '®coil_nml'
write(iunit, OUTINT) 'general_option', general_option
write(iunit, OUTINT) 'nlambda', nlambda
write(iunit, OUTINT) 'ntheta_plasma', ntheta_plasma
write(iunit, OUTINT) 'nzeta_plasma', nzeta_plasma
write(iunit, OUTINT) 'ntheta_coil', ntheta_coil
write(iunit, OUTINT) 'nzeta_coil', nzeta_coil
write(iunit, OUTINT) 'mpol_magnetization', mpol_magnetization
write(iunit, OUTINT) 'ntor_magnetization', ntor_magnetization
write(iunit, OUTINT) 'target_option', target_option
!write(iunit, OUTFLT) 'current_density_target', current_density_target
write(iunit, OUTINT) 'geometry_option_plasma', geometry_option_plasma
write(iunit, OUTSTR) 'wout_filename', trim(wout_filename_new)
write(iunit, OUTINT) 'geometry_option_coil', geometry_option_coil
write(iunit, OUTFLT) 'separation', separation
write(iunit, OUTINT) 'symmetry_option', symmetry_option
write(iunit, OUTFLT) 'net_poloidal_current_Amperes', net_poloidal_current_Amperes
write(iunit, OUTFLT) 'net_toroidal_current_Amperes', net_toroidal_current_Amperes
write(iunit, '(A)') '/'
! write(iunit, '(A)') ''
return
end subroutine regcoil_write_input