forked from jadexter/grtrans
/
ppslave.py
executable file
·90 lines (85 loc) · 2.64 KB
/
ppslave.py
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
#This is Alwin Mao's parser (or half of it) as of September 29, 2014
#For running Jason Dexter's grtrans
#Through pgrtrans
#Through command line
#You know, in case you wanted to do that sort of thing.
#imports SYS, OS, and PGRTRANS (BARE MINIMUM, JUST A PARSER)
import sys
import os #for moving to the right directory and other tools
hostname = os.getenv('HOSTNAME')[:-21] #for enjoying
print(hostname + ' is working')
os.environ['OMP_NUM_THREADS'] = '4'
#os.chdir('/home/smao/turg/fluidinputs/grtrans/') #to the directory holding pgrtrans
os.system('pwd')
from pgrtrans import pgrtrans
standard = int(sys.argv[1])
mumin = float(sys.argv[2])
mumax = float(sys.argv[3])
nmu = int(sys.argv[4])
phi0 = float(sys.argv[5])
spin = float(sys.argv[6])
uout = float(sys.argv[7])
uin = float(sys.argv[8])
rcut = float(sys.argv[9])
nrotype = int(sys.argv[10])
gridvals = list([float(x) for x in (str(sys.argv[11]).split(','))])
nn = list([ int(x) for x in (str(sys.argv[12]).split(','))])
fname = str(sys.argv[13])
dt = float(sys.argv[14])
nt = int(sys.argv[15])
nload = int(sys.argv[16])
nmdot = int(sys.argv[17])
mdotmin = float(sys.argv[18])
mdotmax = float(sys.argv[19])
ename = str(sys.argv[20])
print('.'+ename+'.')
mbh = float(sys.argv[21])
nfreq = int(sys.argv[22])
fmin = float(sys.argv[23])
fmax = float(sys.argv[24])
muval = float(sys.argv[25])
gmin = int(sys.argv[26])
gmax = float(sys.argv[27])
p1 = float(sys.argv[28])
p2 = float(sys.argv[29])
jetalpha = float(sys.argv[30])
stype = str(sys.argv[31])
use_geokerr = str(sys.argv[32])
nvals = int(sys.argv[33])
iname = str(sys.argv[34])
cflag = int(sys.argv[35])
extra = int(sys.argv[36])
ofile = str(sys.argv[37])
fdfile = str('')
fhfile = str('')
fgfile = str('')
fsim = str('')
fnt = int(0)
findf = int(0)
fnfiles = int(0)
fjonfix = int(0)
pnw = int(0)
pnfreq_tab = int(0)
pnr = int(0)
foffset = int(0)
fdindf = int(0)
fmagcrit = int(0)
hrspot = float(0)
hr0spot = float(0)
hn0spot= float(0)
ntscl= float(0)
nrscl= float(0)
pwmin= float(0)
pwmax= float(0)
pfmin= float(0)
pfmax= float(0)
prmax= float(0)
psigt= float(0)
pfcol= float(0)
tmdot= float(0)
snscl= float(0)
snnthscl= float(0)
snnthp= float(0)
sbeta= float(0)
pgrtrans.grtrans_main(standard,mumin,mumax,nmu,phi0,spin,uout,uin,rcut,nrotype,gridvals,nn,fname,dt,nt,nload,nmdot,mdotmin,mdotmax,ename,mbh,nfreq,fmin,fmax,muval,gmin,gmax,p1,p2,jetalpha,stype,use_geokerr,nvals,iname,cflag,extra,ofile,fdfile,fhfile,fgfile,fsim,fnt,findf,fnfiles,fjonfix,pnw,pnfreq_tab,pnr,foffset,fdindf,fmagcrit,hrspot,hr0spot,hn0spot,ntscl,nrscl,pwmin,pwmax,pfmin,pfmax,prmax,psigt,pfcol,tmdot,snscl,snnthscl,snnthp,sbeta)
pgrtrans.del_pgrtrans_data()