trinitycrmod 0.8.7 → 0.8.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/trinitycrmod/chease.rb +8 -2
- data/lib/trinitycrmod/deleted_variables.rb +0 -11
- data/lib/trinitycrmod/graphs.rb +1 -1
- data/lib/trinitycrmod/namelists.rb +57 -24
- data/lib/trinitycrmod/output_files.rb +5 -3
- data/lib/trinitycrmod/read_netcdf.rb +4 -1
- data/lib/trinitycrmod/trinity.rb +40 -17
- data/trinitycrmod.gemspec +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc8d7d9cf9529283fc52bceac1cab24670502094
|
4
|
+
data.tar.gz: acf2a208a53b90eed4e1abe25e679fd08f2f4408
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2c24f3684d4a53bb37561177a1a7f4689b17ab3641e9de9aff536822253df5fcf78ce12a29e6563787505b0aefb596605d26b7e09decb945ac6ceef0cc24b97
|
7
|
+
data.tar.gz: 510cac280af8ffbb5af6885a2b76d3a6afeb43e81a57da7137071d0d063de6d5fbe052422fd10d5cbaad708d0bc61f1db8bb30823905ee1b266fb3fd8a5026bf
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.8
|
data/lib/trinitycrmod/chease.rb
CHANGED
@@ -16,12 +16,18 @@ class CodeRunner::Trinity
|
|
16
16
|
FileUtils.cp_r(@gs_folder, 'chease')
|
17
17
|
chrun = chease_run
|
18
18
|
chrun.neqdsk = 0 # Use EXPEQ
|
19
|
-
chrun.nsurf = 6
|
19
|
+
chrun.nsurf = 6 # Outer surface from EXPEQ
|
20
20
|
puts ['chrun2', chrun.nsurf]
|
21
21
|
chrun.nppfun = 4 # Pres profile from EXPEQ
|
22
22
|
chrun.nfunc = 4 # Current func
|
23
23
|
chrun.nopt = -1 # Use prev soln for initial
|
24
|
-
|
24
|
+
chrun.nblopt = 0 # Don't modify the pressure profile
|
25
|
+
Dir.chdir(@directory + '/chease/'){
|
26
|
+
chrun.write_input_file
|
27
|
+
FileUtils.cp('NOUT', 'NIN')
|
28
|
+
}
|
29
|
+
elsif @gs_folder
|
30
|
+
FileUtils.cp_r(@gs_folder, 'chease')
|
25
31
|
else
|
26
32
|
FileUtils.mkdir('chease') unless FileTest.exist? 'chease'
|
27
33
|
origfile = @runner.root_folder + '/ogyropsi.dat'
|
@@ -116,17 +116,6 @@
|
|
116
116
|
"This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
|
117
117
|
:type=>:Float,
|
118
118
|
:autoscanned_defaults=>[]},
|
119
|
-
:density_boost=>
|
120
|
-
{:should_include=>"true",
|
121
|
-
:description=>nil,
|
122
|
-
:help=>nil,
|
123
|
-
:code_name=>:density_boost,
|
124
|
-
:must_pass=>
|
125
|
-
[{:test=>"kind_of? Numeric",
|
126
|
-
:explanation=>
|
127
|
-
"This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
|
128
|
-
:type=>:Float,
|
129
|
-
:autoscanned_defaults=>[]},
|
130
119
|
:powerin=>
|
131
120
|
{:should_include=>"true",
|
132
121
|
:description=>nil,
|
data/lib/trinitycrmod/graphs.rb
CHANGED
@@ -191,7 +191,7 @@ class CodeRunner::Trinity
|
|
191
191
|
# This is the hook that is called by CodeRunner, providing the
|
192
192
|
# graphkit with the given name and functions to the CodeRunner framework
|
193
193
|
def graphkit(name, options)
|
194
|
-
|
194
|
+
NetcdfSmartReader.dimensions.map{|d| d.to_sym}.each do |var|
|
195
195
|
#ep 'index', var
|
196
196
|
if options[var].class == Symbol and options[var] == :all
|
197
197
|
options[var] = list(var).values
|
@@ -11,7 +11,7 @@
|
|
11
11
|
[{:test=>"kind_of? String",
|
12
12
|
:explanation=>"This variable must be a string."}],
|
13
13
|
:type=>:String,
|
14
|
-
:autoscanned_defaults=>["
|
14
|
+
:autoscanned_defaults=>["default"]},
|
15
15
|
:geo_file=>
|
16
16
|
{:should_include=>"true",
|
17
17
|
:description=>" file with input data",
|
@@ -43,7 +43,7 @@
|
|
43
43
|
:explanation=>
|
44
44
|
"This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
|
45
45
|
:type=>:Float,
|
46
|
-
:autoscanned_defaults=>[0.
|
46
|
+
:autoscanned_defaults=>[0.95]},
|
47
47
|
:nrad=>
|
48
48
|
{:should_include=>"true",
|
49
49
|
:description=>" number of radial grid points",
|
@@ -53,7 +53,7 @@
|
|
53
53
|
[{:test=>"kind_of? Integer",
|
54
54
|
:explanation=>"This variable must be an integer."}],
|
55
55
|
:type=>:Integer,
|
56
|
-
:autoscanned_defaults=>[
|
56
|
+
:autoscanned_defaults=>[9]},
|
57
57
|
:bt_in=>
|
58
58
|
{:should_include=>"true",
|
59
59
|
:description=>
|
@@ -176,7 +176,7 @@
|
|
176
176
|
[{:test=>"kind_of? String",
|
177
177
|
:explanation=>"This variable must be a string."}],
|
178
178
|
:type=>:String,
|
179
|
-
:autoscanned_defaults=>["
|
179
|
+
:autoscanned_defaults=>["default"]},
|
180
180
|
:phia_in=>
|
181
181
|
{:should_include=>"true",
|
182
182
|
:description=>
|
@@ -289,7 +289,7 @@
|
|
289
289
|
:explanation=>
|
290
290
|
"This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
|
291
291
|
:type=>:Float,
|
292
|
-
:autoscanned_defaults=>[-1.0
|
292
|
+
:autoscanned_defaults=>[-1.0]},
|
293
293
|
:mi=>
|
294
294
|
{:should_include=>"true",
|
295
295
|
:description=>
|
@@ -302,7 +302,7 @@
|
|
302
302
|
:explanation=>
|
303
303
|
"This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
|
304
304
|
:type=>:Float,
|
305
|
-
:autoscanned_defaults=>[-1.0
|
305
|
+
:autoscanned_defaults=>[-1.0]},
|
306
306
|
:zeff_in=>
|
307
307
|
{:should_include=>"true",
|
308
308
|
:description=>" effective charge",
|
@@ -478,7 +478,7 @@
|
|
478
478
|
[{:test=>"kind_of? Integer",
|
479
479
|
:explanation=>"This variable must be an integer."}],
|
480
480
|
:type=>:Integer,
|
481
|
-
:autoscanned_defaults=>[
|
481
|
+
:autoscanned_defaults=>[20]},
|
482
482
|
:niter=>
|
483
483
|
{:should_include=>"true",
|
484
484
|
:description=>" max number of newton iterations per time step",
|
@@ -499,7 +499,7 @@
|
|
499
499
|
:explanation=>
|
500
500
|
"This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
|
501
501
|
:type=>:Float,
|
502
|
-
:autoscanned_defaults=>[0.01
|
502
|
+
:autoscanned_defaults=>[0.01]},
|
503
503
|
:ntdelt_max=>
|
504
504
|
{:should_include=>"true",
|
505
505
|
:description=>" maximum size of transport time step",
|
@@ -533,7 +533,7 @@
|
|
533
533
|
:explanation=>
|
534
534
|
"This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
|
535
535
|
:type=>:Float,
|
536
|
-
:autoscanned_defaults=>[0.2
|
536
|
+
:autoscanned_defaults=>[0.2]},
|
537
537
|
:errflr=>
|
538
538
|
{:should_include=>"true",
|
539
539
|
:description=>" relative error below which we stop iterating",
|
@@ -544,7 +544,7 @@
|
|
544
544
|
:explanation=>
|
545
545
|
"This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
|
546
546
|
:type=>:Float,
|
547
|
-
:autoscanned_defaults=>[0.005
|
547
|
+
:autoscanned_defaults=>[0.005]},
|
548
548
|
:flrfac=>
|
549
549
|
{:should_include=>"true",
|
550
550
|
:description=>
|
@@ -557,7 +557,7 @@
|
|
557
557
|
:explanation=>
|
558
558
|
"This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
|
559
559
|
:type=>:Float,
|
560
|
-
:autoscanned_defaults=>[
|
560
|
+
:autoscanned_defaults=>[2.0]},
|
561
561
|
:nensembles=>
|
562
562
|
{:should_include=>"true",
|
563
563
|
:description=>
|
@@ -568,7 +568,18 @@
|
|
568
568
|
[{:test=>"kind_of? Integer",
|
569
569
|
:explanation=>"This variable must be an integer."}],
|
570
570
|
:type=>:Integer,
|
571
|
-
:autoscanned_defaults=>[1]}
|
571
|
+
:autoscanned_defaults=>[1]},
|
572
|
+
:convergetol=>
|
573
|
+
{:should_include=>"true",
|
574
|
+
:description=>" convergence tolerance when seeking steady state",
|
575
|
+
:help=>" convergence tolerance when seeking steady state",
|
576
|
+
:code_name=>:convergetol,
|
577
|
+
:must_pass=>
|
578
|
+
[{:test=>"kind_of? Numeric",
|
579
|
+
:explanation=>
|
580
|
+
"This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
|
581
|
+
:type=>:Float,
|
582
|
+
:autoscanned_defaults=>[-1.0]}}},
|
572
583
|
:fluxes=>
|
573
584
|
{:description=>"",
|
574
585
|
:should_include=>"true",
|
@@ -582,7 +593,7 @@
|
|
582
593
|
[{:test=>"kind_of? String",
|
583
594
|
:explanation=>"This variable must be a string."}],
|
584
595
|
:type=>:String,
|
585
|
-
:autoscanned_defaults=>["default"
|
596
|
+
:autoscanned_defaults=>["default"]},
|
586
597
|
:flxmult=>
|
587
598
|
{:should_include=>"true",
|
588
599
|
:description=>" coefficient multiplying fluxes (for testing)",
|
@@ -659,7 +670,7 @@
|
|
659
670
|
:explanation=>
|
660
671
|
"This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
|
661
672
|
:type=>:Float,
|
662
|
-
:autoscanned_defaults=>[0.1
|
673
|
+
:autoscanned_defaults=>[0.1]},
|
663
674
|
:dtprim=>
|
664
675
|
{:should_include=>"true",
|
665
676
|
:description=>" step size for R/LT is R/LT * dtprim",
|
@@ -670,7 +681,7 @@
|
|
670
681
|
:explanation=>
|
671
682
|
"This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
|
672
683
|
:type=>:Float,
|
673
|
-
:autoscanned_defaults=>[0.1
|
684
|
+
:autoscanned_defaults=>[0.1]},
|
674
685
|
:dgexb=>
|
675
686
|
{:should_include=>"true",
|
676
687
|
:description=>" step size for gexb is gexb * dgexb",
|
@@ -714,7 +725,7 @@
|
|
714
725
|
:explanation=>
|
715
726
|
"This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
|
716
727
|
:type=>:Fortran_Bool,
|
717
|
-
:autoscanned_defaults=>[".false."
|
728
|
+
:autoscanned_defaults=>[".false."]},
|
718
729
|
:dflx_stencil=>
|
719
730
|
{:should_include=>"true",
|
720
731
|
:description=>" number of fluxes to use for flux derivatives",
|
@@ -1085,7 +1096,7 @@
|
|
1085
1096
|
[{:test=>"kind_of? String",
|
1086
1097
|
:explanation=>"This variable must be a string."}],
|
1087
1098
|
:type=>:String,
|
1088
|
-
:autoscanned_defaults=>["
|
1099
|
+
:autoscanned_defaults=>["default"]},
|
1089
1100
|
:init_file=>
|
1090
1101
|
{:should_include=>"true",
|
1091
1102
|
:description=>" file with input data",
|
@@ -1209,6 +1220,18 @@
|
|
1209
1220
|
"This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
|
1210
1221
|
:type=>:Float,
|
1211
1222
|
:autoscanned_defaults=>[0.0]},
|
1223
|
+
:restart_file=>
|
1224
|
+
{:should_include=>"true",
|
1225
|
+
:description=>
|
1226
|
+
"Netcdf file with restart data (gradually replacing old restart files).",
|
1227
|
+
:help=>
|
1228
|
+
"Netcdf file with restart data (gradually replacing old restart files).",
|
1229
|
+
:code_name=>:restart_file,
|
1230
|
+
:must_pass=>
|
1231
|
+
[{:test=>"kind_of? String",
|
1232
|
+
:explanation=>"This variable must be a string."}],
|
1233
|
+
:type=>:String,
|
1234
|
+
:autoscanned_defaults=>[""]},
|
1212
1235
|
:iternt_file=>
|
1213
1236
|
{:should_include=>"true",
|
1214
1237
|
:description=>
|
@@ -1335,7 +1358,17 @@
|
|
1335
1358
|
:explanation=>
|
1336
1359
|
"This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
|
1337
1360
|
:type=>:Float,
|
1338
|
-
:autoscanned_defaults=>[-1.0]}
|
1361
|
+
:autoscanned_defaults=>[-1.0]},
|
1362
|
+
:density_boost=>
|
1363
|
+
{:should_include=>"true",
|
1364
|
+
:description=>"Increase initial density at constant pressure.",
|
1365
|
+
:help=>"Increase initial density at constant pressure.",
|
1366
|
+
:code_name=>:density_boost,
|
1367
|
+
:must_pass=>
|
1368
|
+
[{:test=>"kind_of? Numeric",
|
1369
|
+
:explanation=>
|
1370
|
+
"This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
|
1371
|
+
:type=>:Float}}},
|
1339
1372
|
:sources=>
|
1340
1373
|
{:description=>"",
|
1341
1374
|
:should_include=>"true",
|
@@ -1349,7 +1382,7 @@
|
|
1349
1382
|
[{:test=>"kind_of? String",
|
1350
1383
|
:explanation=>"This variable must be a string."}],
|
1351
1384
|
:type=>:String,
|
1352
|
-
:autoscanned_defaults=>["
|
1385
|
+
:autoscanned_defaults=>["default"]},
|
1353
1386
|
:source_file=>
|
1354
1387
|
{:should_include=>"true",
|
1355
1388
|
:description=>" file with input data",
|
@@ -1438,7 +1471,7 @@
|
|
1438
1471
|
:explanation=>
|
1439
1472
|
"This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
|
1440
1473
|
:type=>:Fortran_Bool,
|
1441
|
-
:autoscanned_defaults=>[".
|
1474
|
+
:autoscanned_defaults=>[".true."]},
|
1442
1475
|
:include_radiation=>
|
1443
1476
|
{:should_include=>"true",
|
1444
1477
|
:description=>" include bremstrahlung radiation",
|
@@ -1449,7 +1482,7 @@
|
|
1449
1482
|
:explanation=>
|
1450
1483
|
"This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
|
1451
1484
|
:type=>:Fortran_Bool,
|
1452
|
-
:autoscanned_defaults=>[".
|
1485
|
+
:autoscanned_defaults=>[".true."]},
|
1453
1486
|
:pioq=>
|
1454
1487
|
{:should_include=>"true",
|
1455
1488
|
:description=>" ratio of momentum to heat input",
|
@@ -1634,7 +1667,7 @@
|
|
1634
1667
|
:explanation=>
|
1635
1668
|
"This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
|
1636
1669
|
:type=>:Fortran_Bool,
|
1637
|
-
:autoscanned_defaults=>[".
|
1670
|
+
:autoscanned_defaults=>[".true."]},
|
1638
1671
|
:temp_equil=>
|
1639
1672
|
{:should_include=>"true",
|
1640
1673
|
:description=>" set to false to neglect temperature equilibration",
|
@@ -1645,7 +1678,7 @@
|
|
1645
1678
|
:explanation=>
|
1646
1679
|
"This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
|
1647
1680
|
:type=>:Fortran_Bool,
|
1648
|
-
:autoscanned_defaults=>[".
|
1681
|
+
:autoscanned_defaults=>[".true."]},
|
1649
1682
|
:turb_heat=>
|
1650
1683
|
{:should_include=>"true",
|
1651
1684
|
:description=>" set to false to neglect turbulent heating",
|
@@ -1656,7 +1689,7 @@
|
|
1656
1689
|
:explanation=>
|
1657
1690
|
"This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
|
1658
1691
|
:type=>:Fortran_Bool,
|
1659
|
-
:autoscanned_defaults=>[".
|
1692
|
+
:autoscanned_defaults=>[".true."]},
|
1660
1693
|
:numult=>
|
1661
1694
|
{:should_include=>"true",
|
1662
1695
|
:description=>" multiplier of collision frequency for testing",
|
@@ -67,10 +67,12 @@ class CodeRunner
|
|
67
67
|
# :rho
|
68
68
|
# :rho_cc
|
69
69
|
def list(var)
|
70
|
-
case var
|
71
|
-
when
|
70
|
+
case var.to_s
|
71
|
+
when *NetcdfSmartReader.dimensions
|
72
72
|
hash = {}
|
73
|
-
get_2d_array_float(:nt, /1:\s+time/, /1:\s+time/).map{|arr| arr[0]}.each_with_index{|t,i| hash[i+1] = t}
|
73
|
+
#get_2d_array_float(:nt, /1:\s+time/, /1:\s+time/).map{|arr| arr[0]}.each_with_index{|t,i| hash[i+1] = t}
|
74
|
+
ax = netcdf_smart_reader.axiskit(var.to_s, {})
|
75
|
+
ax.data.to_a.each_with_index{|v,i| hash[i+1] = v}
|
74
76
|
hash
|
75
77
|
end
|
76
78
|
end
|
@@ -98,6 +98,9 @@ class NetcdfSmartReader
|
|
98
98
|
return -1
|
99
99
|
end
|
100
100
|
end
|
101
|
+
def self.dimensions
|
102
|
+
['t','tspec', 'iter', 'rad', 'cc', 'mrow', 'mcol', 'ivar', 'jac', 'grad', 'eval', 'cegrid']
|
103
|
+
end
|
101
104
|
|
102
105
|
def axiskit(variable, options)
|
103
106
|
case variable
|
@@ -108,7 +111,7 @@ class NetcdfSmartReader
|
|
108
111
|
end
|
109
112
|
def dimension_variable_name(n)
|
110
113
|
case n
|
111
|
-
when
|
114
|
+
when *self.class.dimensions
|
112
115
|
n
|
113
116
|
else
|
114
117
|
raise "Unknown dimension #{n}"
|
data/lib/trinitycrmod/trinity.rb
CHANGED
@@ -57,6 +57,7 @@ class CodeRunner
|
|
57
57
|
:te95,
|
58
58
|
:omega0,
|
59
59
|
:omega95,
|
60
|
+
:plasma_volume,
|
60
61
|
:wth
|
61
62
|
]
|
62
63
|
|
@@ -121,6 +122,7 @@ class CodeRunner
|
|
121
122
|
new_run.iternt_file = @run_name + ".iternt"
|
122
123
|
new_run.iterflx_file = @run_name + ".iterflx"
|
123
124
|
new_run.itercalib_file = @run_name + ".itercalib"
|
125
|
+
new_run.restart_file = @run_name + ".out.nc"
|
124
126
|
new_run.init_file = @run_name + ".tmp"
|
125
127
|
@runner.nprocs = @nprocs if @runner.nprocs == "1" # 1 is the default so this means the user probably didn't specify nprocs
|
126
128
|
# This is unnecessary for single restart file.
|
@@ -136,8 +138,8 @@ class CodeRunner
|
|
136
138
|
new_run.run_name += '_t'
|
137
139
|
eputs 'Copying Trinity Restart files', ''
|
138
140
|
#system "ls #@directory"
|
139
|
-
['iternt', 'iterflx', 'tmp', 'itercalib'].each do |ext|
|
140
|
-
next if
|
141
|
+
['iternt', 'iterflx', 'tmp', 'itercalib', 'out.nc'].each do |ext|
|
142
|
+
next if ['itercalib', 'out.nc'].include? ext and not FileTest.exist?("#@directory/#@run_name.#{ext}")
|
141
143
|
# Unlike gs2, trinity always uses the current run name to generate the
|
142
144
|
# restart files. Thus, the name of the restart files changes with every
|
143
145
|
# run.
|
@@ -381,9 +383,16 @@ class CodeRunner
|
|
381
383
|
|
382
384
|
def generate_component_runs
|
383
385
|
#puts "HERE"
|
384
|
-
|
385
|
-
|
386
|
-
|
386
|
+
#<<<<<<< HEAD
|
387
|
+
@component_runs ||= []
|
388
|
+
if @running
|
389
|
+
if (existing = @runner.component_run_list.values.find_all{|r| r.real_id==@id}).size > 0
|
390
|
+
@component_runs = existing.sort_by{|r| -r.id}
|
391
|
+
#=======
|
392
|
+
#if (existing = @runner.component_run_list.values.find_all{|r| r.real_id==@id}).size > 0
|
393
|
+
#@component_runs = existing.sort_by{|r| -r.id}
|
394
|
+
#if @running
|
395
|
+
#>>>>>>> 90ef5ae701681b63da68f6eb1bd1ec1169873f8b
|
387
396
|
return
|
388
397
|
end
|
389
398
|
end
|
@@ -459,7 +468,7 @@ class CodeRunner
|
|
459
468
|
get_status
|
460
469
|
#p ['id is', id, 'ctd is ', ctd]
|
461
470
|
if ctd
|
462
|
-
|
471
|
+
get_global_results rescue nil
|
463
472
|
end
|
464
473
|
#p ['fusionQ is ', fusionQ]
|
465
474
|
@percent_complete = completed_timesteps.to_f / ntstep.to_f * 100.0
|
@@ -497,17 +506,31 @@ class CodeRunner
|
|
497
506
|
|
498
507
|
|
499
508
|
def get_global_results
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
509
|
+
if FileTest.exist? new_netcdf_filename
|
510
|
+
@plasma_volume = new_netcdf_file.var('plasma_volume').get[-1]
|
511
|
+
@pfus = new_netcdf_file.var('fusion_power').get[-1]
|
512
|
+
@fusionQ = new_netcdf_file.var('fusion_gain').get[-1]
|
513
|
+
@pnet = new_netcdf_file.var('net_power').get[-1]
|
514
|
+
@alpha_power = new_netcdf_file.var('alpha_power_total').get[-1]
|
515
|
+
@aux_power = new_netcdf_file.var('aux_power_total').get[-1]
|
516
|
+
@rad_power = new_netcdf_file.var('radiate_power_total').get[-1]
|
517
|
+
@ne0 = new_netcdf_file.var('ne_core').get[-1]
|
518
|
+
@te0 = new_netcdf_file.var('te_core').get[-1]
|
519
|
+
@ti0 = new_netcdf_file.var('ti_core').get[-1]
|
520
|
+
@omega0 = new_netcdf_file.var('omega_core').get[-1]
|
521
|
+
else
|
522
|
+
# If the netcdf file is missing try the info file
|
523
|
+
@fusionQ = info_outfile.get_variable_value('Q').to_f
|
524
|
+
@pfus = info_outfile.get_variable_value(/fusion\s+power/i).to_f
|
525
|
+
@pnet = info_outfile.get_variable_value(/net\s+power/i).to_f
|
526
|
+
@aux_power = info_outfile.get_variable_value(/aux.*\s+power/i).to_f
|
527
|
+
@alpha_power = info_outfile.get_variable_value(/alpha\s+power/i).to_f
|
528
|
+
@rad_power = info_outfile.get_variable_value(/radiated\s+power/i).to_f
|
529
|
+
@ne0 = info_outfile.get_variable_value(/core\s+density|Core\s+electron\s+density/i).to_f
|
530
|
+
@ti0 = info_outfile.get_variable_value(/[Cc]ore\s+T_i/i).to_f
|
531
|
+
@te0 = info_outfile.get_variable_value(/[Cc]ore\s+T_e/i).to_f
|
532
|
+
@omega0 = info_outfile.get_variable_value(/[Cc]ore\s+omega/i).to_f rescue 0.0 # Old info files don't have omega
|
533
|
+
end
|
511
534
|
end
|
512
535
|
|
513
536
|
def self.get_input_help_from_source_code(source_folder)
|
data/trinitycrmod.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: trinitycrmod 0.8.
|
5
|
+
# stub: trinitycrmod 0.8.8 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "trinitycrmod"
|
9
|
-
s.version = "0.8.
|
9
|
+
s.version = "0.8.8"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Edmund Highcock"]
|
14
|
-
s.date = "
|
14
|
+
s.date = "2016-02-29"
|
15
15
|
s.description = "This module allows Trinity, the Multiscale Gyrokinetic Turbulent Transport solver for Fusion Reactors, to harness the power of CodeRunner, a framework for the automated running and analysis of simulations."
|
16
16
|
s.email = "edmundhighcock@sourceforge.net"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -45,7 +45,7 @@ Gem::Specification.new do |s|
|
|
45
45
|
]
|
46
46
|
s.homepage = "http://github.com/edmundhighcock/trinitycrmod"
|
47
47
|
s.licenses = ["GPLv3"]
|
48
|
-
s.rubygems_version = "2.
|
48
|
+
s.rubygems_version = "2.2.0"
|
49
49
|
s.summary = "CodeRunner module for the Trinity simulation software."
|
50
50
|
|
51
51
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trinitycrmod
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edmund Highcock
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coderunner
|
@@ -203,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
203
|
version: '0'
|
204
204
|
requirements: []
|
205
205
|
rubyforge_project:
|
206
|
-
rubygems_version: 2.
|
206
|
+
rubygems_version: 2.2.0
|
207
207
|
signing_key:
|
208
208
|
specification_version: 4
|
209
209
|
summary: CodeRunner module for the Trinity simulation software.
|