trinitycrmod 0.6.9 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70d5de67c1071d586f98ace5987cd0fbde2f77f5
4
- data.tar.gz: 280ed4b4c41a8d0cd286aee3ef84743d8675aa4e
3
+ metadata.gz: 3fb8ea31bb4ef23998f583fb453df5ea05eb16ac
4
+ data.tar.gz: dd0e0d6b0f9bc15b43e61cbb7373bff07780db05
5
5
  SHA512:
6
- metadata.gz: 77b3ce0fda8680f9d8397c49be4ffae800932a1daaa83b5d223e33630e72b116a0071c17f046f1bbb0f289c8094580646e68b6d2c39bba7fe61e26a8eff3a6b1
7
- data.tar.gz: 32f14d8439eba8441d32d5b0e06d983d464a533971955b419e4a940cb4def247afa0b25ae14fc8d232a814c129d175ae77e1c4bdbcf80a9afa9b886088024cb2
6
+ metadata.gz: 4cfbe86b9003759c94e641305cb65b2e516600412bdc7731aa60e939a41d80bce2b6b13d110b6f812af76648424dd3a77da1ec8603c8a15ede0adf9cc15b7f69
7
+ data.tar.gz: c765d21c28840c38c38cfff5c3e2102fe371f77890834f8dfd254f1c55eb9dad72dfa50ee3456eecbed45b9f3d790aebdaff92f5999a050fd8c7a01f25afb444
data/Gemfile CHANGED
@@ -1,20 +1,19 @@
1
1
  source "http://rubygems.org"
2
2
  # Add dependencies required to use your gem here.
3
3
  # Example:
4
- gem "coderunner", ">= 0.15.5"
5
- gem "text-data-tools", ">= 1.1.3"
4
+ gem "coderunner", ">= 0.16.10"
5
+ gem "text-data-tools", ">= 1.1.6"
6
6
  gem "gs2crmod", ">=0.11.76"
7
7
 
8
8
  # Add dependencies to develop your gem here.
9
9
  # Include everything needed to run rake, tests, features, etc.
10
10
  group :development do
11
- #gem "shoulda", ">= 0"
11
+ gem "shoulda", ">= 0"
12
12
  #gem "rdoc", "~> 3.12"
13
13
  #gem "bundler", "> 1.0.0"
14
14
  #gem "jeweler", ">= 2.0.0"
15
- gem "shoulda", " 3.0.1"
15
+ #gem "shoulda", " 3.0.1"
16
16
  gem "rdoc", "~> 3.12"
17
17
  gem "bundler", "> 1.0.0"
18
- gem "jeweler", ">= 1.8.4"
19
- gem "minitest", "~> 4"
18
+ gem "jeweler", ">= 2.00"
20
19
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.9
1
+ 0.7.0
@@ -0,0 +1,208 @@
1
+ require 'scanf'
2
+ class CodeRunner
3
+ class ZeroEval
4
+ def eval(*args)
5
+ 0.0
6
+ end
7
+ end
8
+ class Trinity
9
+ class << self
10
+ # To be used in conjunction with the shell script
11
+ # option in Trinity. Read the output of old_run_name
12
+ # (which may be a commma-separated list of multiple runs)
13
+ # and read the contents of <run_name>_flux_inputs.dat and use them
14
+ # to interpolate esitmates of the fluxes
15
+ def interpolate_fluxes(old_run_folder, run_folder, grad_option, ntspec)
16
+ old_run_name = nil
17
+ Dir.chdir(old_run_folder) do
18
+ old_cc = Dir.entries(Dir.pwd).find{|f| f =~ /\.cc$/}
19
+ raise "Can't find cc file in #{old_run_folder}" unless old_cc
20
+ old_run_name = File.expand_path(old_cc).sub(/.cc$/,'')
21
+ end
22
+
23
+ run_name = nil
24
+ Dir.chdir(run_folder) do
25
+ new_inp = Dir.entries(Dir.pwd).find{|f| f =~ /.flux_inputs$/}
26
+ raise "Can't find flux_inputs in #{run_folder}" unless new_inp
27
+ run_name = File.expand_path(new_inp).sub(/.flux_inputs$/,'')
28
+ end
29
+
30
+
31
+ ccfile = TextDataTools::Column::DataFile.new(old_run_name + '.cc', true, /\S+/, /(?:\#\s+)?\d+:.*?(?=\d+:|\Z)/)
32
+ geofile = TextDataTools::Column::DataFile.new(old_run_name + '.geo', true, /\S+/, /(?:\#\s+)?\d+:\D*?(?=\d:|\d\d:|\Z)/)
33
+ radius_data = ccfile.get_1d_array_float(/radius/)
34
+ radius_uniq = radius_data.uniq
35
+ p 'radius_uniq', radius_uniq
36
+ ncc = radius_uniq.size
37
+ np = radius_data.size/ncc
38
+ p 'np is ', np, 'ncc is', ncc
39
+ #p 'ion_tprim_perturb_data',ion_tprim_perturb_data = ccfile.get_1d_array_float(/11:/).pieces(np)
40
+ perturb = {
41
+ fprim: /10:/,
42
+ ion_tprim: /11:/,
43
+ eln_tprim: /12:/,
44
+ dens: /18:/,
45
+ ion_temp: /19:/,
46
+ eln_temp: /20:/
47
+ }
48
+ perturb_data = perturb.inject({}) do |h,(k,v)|
49
+ begin
50
+ h[k] = ccfile.get_1d_array_float(v).pieces(np).transpose
51
+ rescue=>err
52
+ p ccfile.get_1d_array(v)
53
+ puts "Error reading: #{k}, #{v}"
54
+ raise err
55
+ end
56
+ h
57
+ end
58
+ fluxes = {
59
+ ion_hflux: /5: i/,
60
+ eln_hflux: /6: e/,
61
+ pflux: /3: i/,
62
+ lflux: /9: v/,
63
+ ion_heat: /7: i/,
64
+ eln_heat: /8: e/
65
+ }
66
+ fluxes_data = fluxes.inject({}) do |h,(k,v)|
67
+ h[k] = ccfile.get_1d_array_float(v).pieces(np).transpose
68
+ h
69
+ end
70
+ area = geofile.get_1d_array_float(/area/)
71
+ grho = geofile.get_1d_array_float(/grho/)
72
+ case grad_option
73
+ when 'tigrad'
74
+ jacobian_vecs = [:ion_temp,:ion_tprim]
75
+ jacobian_vecs = [:ion_tprim]
76
+ interp_vecs = [:ion_hflux]
77
+ njac = 2
78
+ when 'ntgrads'
79
+ jacobian_vecs = [:ion_tprim, :eln_tprim, :fprim]
80
+ jacobian_vecs = [:ion_tprim, :fprim]
81
+ interp_vecs = [:ion_hflux, :eln_hflux, :pflux]
82
+ njac = 4
83
+ else
84
+ raise "Unknown grad_option: #{grad_option}"
85
+ end
86
+ GraphKit.quick_create([perturb_data[:ion_tprim][0].to_gslv, fluxes_data[:ion_hflux][0].to_gslv])#.gnuplot
87
+ #p perturb_data[:ion_tprim][0]
88
+ interp = fluxes_data.inject({}) do |h, (k,v)|
89
+ h[k] = radius_uniq.size.times.map do |i|
90
+ if interp_vecs.include?(k)
91
+ #puts 'i is', i
92
+ GSL::ScatterInterp.alloc(
93
+ :linear,
94
+ jacobian_vecs.map{|name|
95
+ arr = perturb_data[name]
96
+ arr[i].to_gslv +
97
+ GSL::Vector.linspace(0,1e-9,arr[i].size)
98
+ } + [v[i].to_gslv],
99
+ false,
100
+ 1.0
101
+ )
102
+ else
103
+ ZeroEval.new
104
+ end
105
+ end
106
+ h
107
+ end
108
+ if false and run_name != 'dummy'
109
+ arr = []
110
+ File.read(run_name + '.flux_inputs').scanf("%e"){|m| p m; arr+= m}
111
+ # each of these quantities is a flat array with
112
+ # radial index varying fastest, then jacobian index
113
+ # then species index where appropriate
114
+ i = 0
115
+ #p arr
116
+ dens = arr[i...(i+=ncc*njac)]
117
+ temp = arr[i...(i+=ncc*njac*2)].pieces(2) # This is hardwired to 2
118
+ fprim = arr[i...(i+=ncc*njac)]
119
+ tprim = arr[i...(i+=ncc*njac*2)].pieces(2) # This is hardwired to 2
120
+ inputs = {}
121
+ inputs[:dens] = dens
122
+ inputs[:ion_temp] = temp[0]
123
+ inputs[:eln_temp] = temp[1]
124
+ inputs[:fprim] = fprim
125
+ inputs[:ion_tprim] = tprim[0]
126
+ inputs[:eln_tprim] = tprim[1]
127
+
128
+ #p 'inputs', inputs.values.map{|v| v.size}, inputs[:eln_tprim]
129
+
130
+ File.open(run_name + '.flux_results', 'w') do |file|
131
+ njac.times{|ij| (ntspec+1).times{ ncc.times{|ic| file.printf("%e ",interp[:pflux][ic].eval(*jacobian_vecs.map{|v| inputs[v][ic + ij*ncc]}))}}}
132
+ file.printf("\n")
133
+ njac.times{|ij|
134
+ ncc.times{|ic| file.printf("%e ",interp[:ion_hflux][ic].eval(*jacobian_vecs.map{|v| inputs[v][ic + ij*ncc]}))}
135
+ ntspec.times{
136
+ ncc.times{|ic| file.printf("%e ",interp[:eln_hflux][ic].eval(*jacobian_vecs.map{|v| inputs[v][ic + ij*ncc]}))}
137
+ }
138
+ }
139
+ file.printf("\n")
140
+ njac.times{|ij|
141
+ ncc.times{|ic| file.printf("%e ",interp[:ion_heat][ic].eval(*jacobian_vecs.map{|v| inputs[v][ic + ij*ncc]}))}
142
+ ntspec.times{
143
+ ncc.times{|ic| file.printf("%e ",interp[:eln_heat][ic].eval(*jacobian_vecs.map{|v| inputs[v][ic + ij*ncc]}))}
144
+ }
145
+ }
146
+ file.printf("\n")
147
+ njac.times{|ij| ncc.times{|ic| file.printf("%e ",interp[:lflux][ic].eval(*jacobian_vecs.map{|v| inputs[v][ic + ij*ncc]}))}}
148
+ file.printf("\n")
149
+ area.each{|v| file.printf("%e ", v)}
150
+ file.printf("\n")
151
+ grho.each{|v| file.printf("%e ", v)}
152
+ file.printf("\n")
153
+ end
154
+ else
155
+ vec = GSL::Vector.linspace(perturb_data[:ion_tprim][0].min, perturb_data[:ion_tprim][0].max,20)
156
+ vec2 = GSL::Vector.linspace(perturb_data[:fprim][0].min, perturb_data[:fprim][0].max,20)
157
+ mat = GSL::Matrix.alloc(20,20)
158
+ for i in 0...20
159
+ for j in 0...20
160
+ mat[i,j] = interp[:ion_hflux][0].eval(vec[i], vec2[j])
161
+ end
162
+ end
163
+ vec3 = GSL::Vector.linspace(perturb_data[:ion_tprim][1].min, perturb_data[:ion_tprim][1].max,20)
164
+ vec4 = GSL::Vector.linspace(perturb_data[:fprim][1].min, perturb_data[:fprim][1].max,20)
165
+ mat2 = GSL::Matrix.alloc(20,20)
166
+ for i in 0...20
167
+ for j in 0...20
168
+ mat2[i,j] = interp[:ion_hflux][1].eval(vec3[i], vec4[j])
169
+ end
170
+ end
171
+ #vec.collect{|x| vec2.collect{|y| mat(interp[:ion_hflux][0].eval(x)}
172
+ #GraphKit.quick_create([vec, vec2, mat], [perturb_data[:ion_tprim][0].to_gslv, perturb_data[:fprim][0], fluxes_data[:ion_hflux][0].to_gslv], [vec3, vec4, mat2], [perturb_data[:ion_tprim][1].to_gslv, perturb_data[:fprim][1], fluxes_data[:ion_hflux][1].to_gslv]).gnuplot live: true
173
+ vec5 = GSL::Vector.linspace(perturb_data[:ion_tprim][2].min, perturb_data[:ion_tprim][2].max,20)
174
+ vec6 = GSL::Vector.linspace(perturb_data[:fprim][2].min, perturb_data[:fprim][2].max,20)
175
+ mat3 = GSL::Matrix.alloc(20,20)
176
+ for i in 0...20
177
+ for j in 0...20
178
+ mat3[i,j] = interp[:ion_hflux][2].eval(vec5[i], vec6[j])
179
+ end
180
+ end
181
+ #vec.collect{|x| vec2.collect{|y| mat(interp[:ion_hflux][0].eval(x)}
182
+ #GraphKit.quick_create([vec, vec2, mat], [perturb_data[:ion_tprim][0].to_gslv, perturb_data[:fprim][0], fluxes_data[:ion_hflux][0].to_gslv], [vec3, vec4, mat2], [perturb_data[:ion_tprim][1].to_gslv, perturb_data[:fprim][1], fluxes_data[:ion_hflux][1].to_gslv],[vec5, vec6, mat3], [perturb_data[:ion_tprim][2].to_gslv, perturb_data[:fprim][2], fluxes_data[:ion_hflux][2].to_gslv]).gnuplot live: true
183
+ vec7 = GSL::Vector.linspace(perturb_data[:ion_tprim][3].min, perturb_data[:ion_tprim][3].max,20)
184
+ vec8 = GSL::Vector.linspace(perturb_data[:fprim][3].min, perturb_data[:fprim][3].max,20)
185
+ mat4 = GSL::Matrix.alloc(20,20)
186
+ for i in 0...20
187
+ for j in 0...20
188
+ mat4[i,j] = interp[:ion_hflux][3].eval(vec7[i], vec8[j])
189
+ end
190
+ end
191
+ #vec.collect{|x| vec2.collect{|y| mat(interp[:ion_hflux][0].eval(x)}
192
+ GraphKit.quick_create([vec, vec2, mat], [perturb_data[:ion_tprim][0].to_gslv, perturb_data[:fprim][0], fluxes_data[:ion_hflux][0].to_gslv], [vec3, vec4, mat2], [perturb_data[:ion_tprim][1].to_gslv, perturb_data[:fprim][1], fluxes_data[:ion_hflux][1].to_gslv],[vec5, vec6, mat3], [perturb_data[:ion_tprim][2].to_gslv, perturb_data[:fprim][2], fluxes_data[:ion_hflux][2].to_gslv],[vec7, vec8, mat4], [perturb_data[:ion_tprim][3].to_gslv, perturb_data[:fprim][3], fluxes_data[:ion_hflux][3].to_gslv]).gnuplot live: true
193
+ end
194
+ #vec = GSL::Vector.linspace(perturb_data[:ion_tprim][0].min, perturb_data[:ion_tprim][0].max,20)
195
+ #GraphKit.quick_create([vec, vec.collect{|x| interp[:ion_hflux][0].eval(x)}], [perturb_data[:ion_tprim][0].to_gslv, fluxes_data[:ion_hflux][0].to_gslv]).gnuplot
196
+
197
+ #vec = GSL::Vector.linspace(perturb_data[:ion_tprim][1].min, perturb_data[:ion_tprim][1].max,20)
198
+ #GraphKit.quick_create([vec, vec.collect{|x| interp[:ion_hflux][1].eval(x)}], [perturb_data[:ion_tprim][1].to_gslv, fluxes_data[:ion_hflux][1].to_gslv]).gnuplot
199
+ #vec = GSL::Vector.linspace(perturb_data[:ion_tprim][2].min, perturb_data[:ion_tprim][2].max,80)
200
+ #GraphKit.quick_create([vec, vec.collect{|x| interp[:ion_hflux][2].eval(x)}], [perturb_data[:ion_tprim][2].to_gslv, fluxes_data[:ion_hflux][2].to_gslv]).gnuplot
201
+ #STDIN.gets
202
+ #GraphKit.quick_create([vec, vec.collect{|x| interp[:ion_hflux][0].eval(perturb_data[:ion_tprim][0].to_gslv.min, x)}]).gnuplot
203
+
204
+ #p [tprim_perturb_data, fprim_perturb_data]
205
+ end
206
+ end
207
+ end
208
+ end
@@ -1,97 +1,97 @@
1
1
  class CodeRunner::Trinity
2
- module TrinityGraphKits
3
- # Graphs plotting quantities from the '.nt' file vs rho for a given t_index
4
- def nt_prof_graphkit(options)
5
- prof_graphkit(options.dup.absorb({outfile: :nt}))
6
- end
7
- # Graphs plotting quantities from the '.nt' file vs rho for a given t_index
8
- def pwr_prof_graphkit(options)
9
- prof_graphkit(options.dup.absorb({outfile: :pwr, radius_match: /2.*rad/}))
10
- end
11
- # Graphs plotting quantities from the '.fluxes' file vs rho for a given t_index
12
- def fluxes_prof_graphkit(options)
13
- prof_graphkit(options.absorb({outfile: :fluxes, exclude_perturbed_fluxes: true}))
14
- end
15
- # Graphs plotting quantities from the '.pbalance' file vs rho for a given t_index
16
- def pbalance_prof_graphkit(options)
17
- prof_graphkit(options.absorb({outfile: :pbalance}))
18
- end
19
- def prof_graphkit(options)
20
- raise "Please specify t_index" unless options[:t_index]
21
- it = options[:t_index] - 1
22
- if ta = options[:time_average]
23
- if ta < 0
24
- t_indices = (it+ta..it).to_a
25
- else
26
- t_indices = (it..it+ta).to_a
27
- end
28
- else
29
- t_indices = [it]
30
- end
31
- array = t_indices.map{|i| get_2d_array_float(options[:outfile], options[:header], /1.*time/)[i].to_gslv}.mean.to_a
32
- rho_array = t_indices.map{|i| get_2d_array_float(options[:outfile], options[:radius_match]||/2.*radius/, /1.*time/)[i].to_gslv}.mean.to_a
33
- if options[:exclude_perturbed_fluxes]
34
- #s = array.size
35
- array = array.slice(0...nrad-1)
36
- rho_array = rho_array.slice(0...nrad-1)
37
- end
38
- #p rho_array, array
39
- kit = GraphKit.autocreate(x: {data: rho_array.to_gslv, title: 'rho', units: ''},
40
- y: {data: array.to_gslv, title: options[:title]||"", units: options[:units]||""}
41
- )
42
- kit.data[0].title += " at time = #{list(:t)[it+1]} s for id #{id}"
43
- kit.data[0].gp.with = 'lp'
44
- kit
45
- end
46
- # Graph of Qi in gyroBohm units against rho for a given t_index
47
- def ion_hflux_gb_prof_graphkit(options)
48
- fluxes_prof_graphkit(options.absorb({header: /Qi.*\(GB/, title: 'Ion Heat Flux', units: 'Q_gB'}))
49
- end
50
- # Graph of Qi in MW against rho for a given t_index
51
- def ion_hflux_prof_graphkit(options)
52
- fluxes_prof_graphkit(options.absorb({header: /Qi.*\(MW/, title: 'Ion Heat Flux', units: 'MW'}))
53
- end
54
- # Graph of Qe in gyroBohm units against rho for a given t_index
55
- def eln_hflux_gb_prof_graphkit(options)
56
- fluxes_prof_graphkit(options.absorb({header: /Qe.*\(GB/, title: 'Electron Heat Flux', units: 'Q_gB'}))
57
- end
58
- # Graph of Qe in MW against rho for a given t_index
59
- def eln_hflux_prof_graphkit(options)
60
- fluxes_prof_graphkit(options.absorb({header: /Qe.*\(MW/, title: 'Electron Heat Flux', units: 'MW'}))
61
- end
62
- # Graph of toroidal angular momentum flux in gyroBohm units against rho for a given t_index
63
- def lflux_gb_prof_graphkit(options)
64
- fluxes_prof_graphkit(options.absorb({header: /Pi.*\(GB/, title: 'Toroidal Angular Momentum Flux', units: 'Pi_gB'}))
65
- end
66
- # Graph of toroidal angular momentum against rho for a given t_index
67
- def ang_mom_prof_graphkit(options)
68
- return nt_prof_graphkit(options.absorb({header: /ang\s+mom/, title: 'Angular Momentum', units: ''}))
69
- end
70
- # Graph of Ti against rho for a given t_index
71
- def ion_temp_prof_graphkit(options)
72
- return nt_prof_graphkit(options.absorb({header: /i\+ temp/, title: 'Ti', units: 'keV'}))
73
- end
74
- # Graph of Te against rho for a given t_index
75
- def eln_temp_prof_graphkit(options)
76
- return nt_prof_graphkit(options.absorb({header: /e\- temp/, title: 'Te', units: 'keV'}))
77
- end
78
- # Graph of n against rho for a given t_index
79
- def dens_prof_graphkit(options)
80
- return nt_prof_graphkit(options.absorb({header: /dens/, title: 'n', units: '10^20 m^-3'}))
81
- end
2
+ module TrinityGraphKits
3
+ # Graphs plotting quantities from the '.nt' file vs rho for a given t_index
4
+ def nt_prof_graphkit(options)
5
+ prof_graphkit(options.dup.absorb({outfile: :nt}))
6
+ end
7
+ # Graphs plotting quantities from the '.nt' file vs rho for a given t_index
8
+ def pwr_prof_graphkit(options)
9
+ prof_graphkit(options.dup.absorb({outfile: :pwr, radius_match: /2.*rad/}))
10
+ end
11
+ # Graphs plotting quantities from the '.fluxes' file vs rho for a given t_index
12
+ def fluxes_prof_graphkit(options)
13
+ prof_graphkit(options.absorb({outfile: :fluxes, exclude_perturbed_fluxes: true}))
14
+ end
15
+ # Graphs plotting quantities from the '.pbalance' file vs rho for a given t_index
16
+ def pbalance_prof_graphkit(options)
17
+ prof_graphkit(options.absorb({outfile: :pbalance}))
18
+ end
19
+ def prof_graphkit(options)
20
+ raise "Please specify t_index" unless options[:t_index]
21
+ it = options[:t_index] - 1
22
+ if ta = options[:time_average]
23
+ if ta < 0
24
+ t_indices = (it+ta..it).to_a
25
+ else
26
+ t_indices = (it..it+ta).to_a
27
+ end
28
+ else
29
+ t_indices = [it]
30
+ end
31
+ array = t_indices.map{|i| get_2d_array_float(options[:outfile], options[:header], /1.*time/)[i].to_gslv}.mean.to_a
32
+ rho_array = t_indices.map{|i| get_2d_array_float(options[:outfile], options[:radius_match]||/2.*radius/, /1.*time/)[i].to_gslv}.mean.to_a
33
+ if options[:exclude_perturbed_fluxes]
34
+ #s = array.size
35
+ array = array.slice(0...nrad-1)
36
+ rho_array = rho_array.slice(0...nrad-1)
37
+ end
38
+ #p rho_array, array
39
+ kit = GraphKit.autocreate(x: {data: rho_array.to_gslv, title: 'rho', units: ''},
40
+ y: {data: array.to_gslv, title: options[:title]||"", units: options[:units]||""}
41
+ )
42
+ kit.data[0].title += " at time = #{list(:t)[it+1]} s for id #{id}"
43
+ kit.data[0].gp.with = 'lp'
44
+ kit
45
+ end
46
+ # Graph of Qi in gyroBohm units against rho for a given t_index
47
+ def ion_hflux_gb_prof_graphkit(options)
48
+ fluxes_prof_graphkit(options.absorb({header: /Qi.*\(GB/, title: 'Ion Heat Flux', units: 'Q_gB'}))
49
+ end
50
+ # Graph of Qi in MW against rho for a given t_index
51
+ def ion_hflux_prof_graphkit(options)
52
+ fluxes_prof_graphkit(options.absorb({header: /Qi.*\(MW/, title: 'Ion Heat Flux', units: 'MW'}))
53
+ end
54
+ # Graph of Qe in gyroBohm units against rho for a given t_index
55
+ def eln_hflux_gb_prof_graphkit(options)
56
+ fluxes_prof_graphkit(options.absorb({header: /Qe.*\(GB/, title: 'Electron Heat Flux', units: 'Q_gB'}))
57
+ end
58
+ # Graph of Qe in MW against rho for a given t_index
59
+ def eln_hflux_prof_graphkit(options)
60
+ fluxes_prof_graphkit(options.absorb({header: /Qe.*\(MW/, title: 'Electron Heat Flux', units: 'MW'}))
61
+ end
62
+ # Graph of toroidal angular momentum flux in gyroBohm units against rho for a given t_index
63
+ def lflux_gb_prof_graphkit(options)
64
+ fluxes_prof_graphkit(options.absorb({header: /Pi.*\(GB/, title: 'Toroidal Angular Momentum Flux', units: 'Pi_gB'}))
65
+ end
66
+ # Graph of toroidal angular momentum against rho for a given t_index
67
+ def ang_mom_prof_graphkit(options)
68
+ return nt_prof_graphkit(options.absorb({header: /ang\s+mom/, title: 'Angular Momentum', units: ''}))
69
+ end
70
+ # Graph of Ti against rho for a given t_index
71
+ def ion_temp_prof_graphkit(options)
72
+ return nt_prof_graphkit(options.absorb({header: /i\+ temp/, title: 'Ti', units: 'keV'}))
73
+ end
74
+ # Graph of Te against rho for a given t_index
75
+ def eln_temp_prof_graphkit(options)
76
+ return nt_prof_graphkit(options.absorb({header: /e\- temp/, title: 'Te', units: 'keV'}))
77
+ end
78
+ # Graph of n against rho for a given t_index
79
+ def dens_prof_graphkit(options)
80
+ return nt_prof_graphkit(options.absorb({header: /dens/, title: 'n', units: '10^20 m^-3'}))
81
+ end
82
82
 
83
- # Graph of ion power integrated from the magnetic axis to rho vs rho
84
- def ion_pwr_prof_graphkit(options)
85
- return pbalance_prof_graphkit(options.absorb({header: /i\+ pwr/, title: 'Integrated ion power', units: 'MW'}))
86
- end
87
- # Graph of electron power integrated from the magnetic axis to rho vs rho
88
- def eln_pwr_prof_graphkit(options)
89
- return pbalance_prof_graphkit(options.absorb({header: /e\- pwr/, title: 'Integrated electron power', units: 'MW'}))
90
- end
91
- # Graph of ion power integrated from the magnetic axis to rho vs rho
92
- def torque_prof_graphkit(options)
93
- return pbalance_prof_graphkit(options.absorb({header: /torque/, title: 'Integrated torque', units: 'Nm'}))
94
- end
83
+ # Graph of ion power integrated from the magnetic axis to rho vs rho
84
+ def ion_pwr_prof_graphkit(options)
85
+ return pbalance_prof_graphkit(options.absorb({header: /i\+ pwr/, title: 'Integrated ion power', units: 'MW'}))
86
+ end
87
+ # Graph of electron power integrated from the magnetic axis to rho vs rho
88
+ def eln_pwr_prof_graphkit(options)
89
+ return pbalance_prof_graphkit(options.absorb({header: /e\- pwr/, title: 'Integrated electron power', units: 'MW'}))
90
+ end
91
+ # Graph of ion power integrated from the magnetic axis to rho vs rho
92
+ def torque_prof_graphkit(options)
93
+ return pbalance_prof_graphkit(options.absorb({header: /torque/, title: 'Integrated torque', units: 'Nm'}))
94
+ end
95
95
 
96
96
  def integrate_profkit(kit, area_vectors, t_indices)
97
97
  datavecs = kit.data.map{|d| d.y.data}
@@ -122,7 +122,7 @@ class CodeRunner::Trinity
122
122
  end
123
123
 
124
124
  end
125
- end
125
+ end
126
126
 
127
127
  # Graph of the ion heat calibration factor
128
128
  def ion_hflux_calibration_graphkit(options)
@@ -146,7 +146,7 @@ class CodeRunner::Trinity
146
146
  k
147
147
  end
148
148
 
149
- include TrinityGraphKits
149
+ include TrinityGraphKits
150
150
 
151
151
  module TrinityMultiKits
152
152
  def profiles_graphkit(options)
@@ -187,35 +187,37 @@ class CodeRunner::Trinity
187
187
 
188
188
  include TrinityMultiKits
189
189
 
190
- # This is the hook that is called by CodeRunner, providing the
191
- # graphkit with the given name and functions to the CodeRunner framework
192
- def graphkit(name, options)
193
- [:t].each do |var|
194
- #ep 'index', var
195
- if options[var].class == Symbol and options[var] == :all
196
- options[var] = list(var).values
197
- elsif options[var+:_index].class == Symbol and options[var+:_index] == :all
198
- #ep 'Symbol'
199
- options[var+:_index] = list(var).keys
200
- end
201
- if options[var].class == Array
202
- return options[var].map{|value| graphkit(name, options.dup.absorb({var => value}))}.sum
203
- elsif options[var+:_index].class == Array
204
- #ep 'Array'
205
- return options[var+:_index].map{|value| graphkit(name, options.dup.absorb({var+:_index => value}))}.sum
206
- end
207
- if options[var].class == Symbol and options[var] == :max
208
- options[var] = list(var).values.max
209
- elsif options[var+:_index].class == Symbol and options[var+:_index] == :max
210
- ep 'Symbol'
211
- options[var+:_index] = list(var).keys.max
212
- end
213
- end
214
- if (meth = TrinityGraphKits.instance_methods.find{|m| m.to_s == name + '_graphkit'} or
190
+ # This is the hook that is called by CodeRunner, providing the
191
+ # graphkit with the given name and functions to the CodeRunner framework
192
+ def graphkit(name, options)
193
+ [:t].each do |var|
194
+ #ep 'index', var
195
+ if options[var].class == Symbol and options[var] == :all
196
+ options[var] = list(var).values
197
+ elsif options[var+:_index].class == Symbol and options[var+:_index] == :all
198
+ #ep 'Symbol'
199
+ options[var+:_index] = list(var).keys
200
+ end
201
+ if options[var].class == Array
202
+ return options[var].map{|value| graphkit(name, options.dup.absorb({var => value}))}.sum
203
+ elsif options[var+:_index].class == Array
204
+ #ep 'Array'
205
+ return options[var+:_index].map{|value| graphkit(name, options.dup.absorb({var+:_index => value}))}.sum
206
+ end
207
+ if options[var].class == Symbol and options[var] == :max
208
+ options[var] = list(var).values.max
209
+ elsif options[var+:_index].class == Symbol and options[var+:_index] == :max
210
+ ep 'Symbol'
211
+ options[var+:_index] = list(var).keys.max
212
+ end
213
+ end
214
+ if (meth = TrinityGraphKits.instance_methods.find{|m| m.to_s == name + '_graphkit'} or
215
215
  meth = TrinityMultiKits.instance_methods.find{|m| m.to_s == name + '_graphkit'})
216
- return send(meth, options)
217
- else
218
- raise "GraphKit not found: #{name}"
219
- end
220
- end
216
+ return send(meth, options)
217
+ elsif name =~ /^nc_/
218
+ return smart_graphkit(options.absorb({graphkit_name: name}))
219
+ else
220
+ raise "GraphKit not found: #{name}"
221
+ end
222
+ end
221
223
  end
@@ -902,11 +902,30 @@
902
902
  :autoscanned_defaults=>[".false."]},
903
903
  :calib_option=>
904
904
  {:should_include=>"true",
905
- :description=>
906
- "Sets interpolation of the calibration factor. 'default', 'piecewise_linear', or 'spline'.",
907
- :help=>
908
- "Which interpolation method to use for the calibration factor. 'default', 'piecewise_linear', or 'spline'.",
905
+ :description=>" Option for interpolating calib factor",
906
+ :help=>" Option for interpolating calib factor",
909
907
  :code_name=>:calib_option,
908
+ :must_pass=>
909
+ [{:test=>"kind_of? String",
910
+ :explanation=>"This variable must be a string."}],
911
+ :type=>:String,
912
+ :autoscanned_defaults=>["default"]},
913
+ :n_gpus=>
914
+ {:should_include=>"true",
915
+ :description=>"Number of gpus avail for gryfx sims",
916
+ :help=>
917
+ "If running with gryfx, specify the number of gpus, i.e. the number of simulataneous gryfx simulations.",
918
+ :code_name=>:n_gpus,
919
+ :must_pass=>
920
+ [{:test=>"kind_of? Integer",
921
+ :explanation=>"This variable must be an integer."}],
922
+ :type=>:Integer},
923
+ :flux_shell_script=>
924
+ {:should_include=>"true",
925
+ :description=>"A shell script to calculate the fluxes.",
926
+ :help=>
927
+ "When running with flux_option = shell, a shell script to calculate the fluxes that is executed during get fluxes.",
928
+ :code_name=>:flux_shell_script,
910
929
  :must_pass=>
911
930
  [{:test=>"kind_of? String",
912
931
  :explanation=>"This variable must be a string."}],
@@ -924,7 +943,7 @@
924
943
  [{:test=>"kind_of? String",
925
944
  :explanation=>"This variable must be a string."}],
926
945
  :type=>:String,
927
- :autoscanned_defaults=>["default", "iterdb"]},
946
+ :autoscanned_defaults=>["default"]},
928
947
  :init_file=>
929
948
  {:should_include=>"true",
930
949
  :description=>" file with input data",
@@ -1107,7 +1126,7 @@
1107
1126
  :explanation=>
1108
1127
  "This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
1109
1128
  :type=>:Fortran_Bool,
1110
- :autoscanned_defaults=>[".false.", ".true."]},
1129
+ :autoscanned_defaults=>[".false."]},
1111
1130
  :flux_groups=>
1112
1131
  {:should_include=>"true",
1113
1132
  :description=>" The number of processors for each flux calculation",
@@ -1129,7 +1148,7 @@
1129
1148
  :explanation=>
1130
1149
  "This variable must be a fortran boolean. (In Ruby this is represented as a string: e.g. '.true.')"}],
1131
1150
  :type=>:Fortran_Bool,
1132
- :autoscanned_defaults=>[".false.", ".true."]},
1151
+ :autoscanned_defaults=>[".false."]},
1133
1152
  :peaking_factor=>
1134
1153
  {:should_include=>"true",
1135
1154
  :description=>
@@ -0,0 +1,157 @@
1
+ # This module reads data from the new diagnostics output file
2
+ # <run_name>.out.nc.
3
+ #
4
+ # It defines a new
5
+ # generic reader function which can read any variable in the new
6
+ # netcdf file using a standard set of index constraints
7
+ #
8
+
9
+ class CodeRunner::Trinity
10
+ module ReadNetcdf
11
+
12
+ def new_netcdf_file
13
+ if (open = @runner.run_list.keys.find_all{|id| @runner.run_list[id].cache[:new_netcdf_file]}).size > 200
14
+ open = open.sort_by{|id| @runner.run_list[id].cache[:new_netcdf_file_otime]}
15
+ @runner.run_list[open[0]].new_ncclose
16
+ end
17
+
18
+ if cache[:new_netcdf_file] and not [:Complete, :Failed].include? @status
19
+ new_ncclose
20
+ end
21
+ cache[:new_netcdf_file_otime] = Time.now.to_i
22
+ cache[:new_netcdf_file] ||= NumRu::NetCDF.open(new_netcdf_filename)
23
+ cache[:new_netcdf_file].sync
24
+ cache[:new_netcdf_file]
25
+ end
26
+
27
+ def new_netcdf_filename
28
+ @directory + '/' + @run_name + '.out.nc'
29
+ end
30
+ def new_ncclose
31
+ cache[:new_netcdf_file].close
32
+ cache.delete(:new_netcdf_file)
33
+ end
34
+
35
+
36
+ end #module ReadNetcdf
37
+ include ReadNetcdf
38
+
39
+ class NetcdfSmartReader
40
+ def initialize(file)
41
+ @file = file
42
+ end
43
+ def dimensions(varname)
44
+ #p 'varname', varname
45
+ raise "Unknown variable #{varname}" unless @file.var(varname)
46
+ @file.var(varname).dims
47
+ end
48
+ def read_variable(varname, options)
49
+ #start = get_start(dims, options)
50
+ dims = dimensions(varname)
51
+ narray = @file.var(varname).get('start'=>starts(dims, options), 'end'=>ends(dims, options))
52
+ if options[:modify_variable]
53
+ myhsh = dims.inject({}){|hsh, dim|
54
+ opts = options.dup
55
+ opts[:modify_variable] = nil
56
+ dimval = read_variable(dimension_variable_name(dim.name), opts)
57
+ hsh[dim.name] = dimval
58
+ hsh
59
+ }
60
+ narray = options[:modify_variable].call(varname, narray, myhsh)
61
+ end
62
+ shape = narray.shape
63
+ shape.delete_if{|i| i==1}
64
+ #p 'shape', shape; STDIN.gets
65
+ narray.reshape!(*shape)
66
+ narray
67
+
68
+ end
69
+ def starts(dims, options)
70
+ dims.map{|d| dim_start(d.name, options)}
71
+ end
72
+ def dim_start(name, options)
73
+ sym = name.to_sym
74
+ if i=options[sym + :_index]
75
+ return i-1
76
+ elsif i=options[sym + :_element]
77
+ return i
78
+ elsif i=options[sym + :min]
79
+ return i
80
+ else
81
+ return 0
82
+ end
83
+ end
84
+ def ends(dims, options)
85
+ dims.map{|d| dim_end(d.name, options)}
86
+ end
87
+ def dim_end(name, options)
88
+ sym = name.to_sym
89
+ if i=options[sym + :_index]
90
+ return i-1
91
+ elsif i=options[sym + :_element]
92
+ return i
93
+ elsif i=options[sym + :max]
94
+ return i
95
+ else
96
+ return -1
97
+ end
98
+ end
99
+
100
+ def axiskit(variable, options)
101
+ case variable
102
+ when 'nmat', 'tspec', 'iter'
103
+ return GraphKit::AxisKit.autocreate(data: GSL::Vector.linspace(1, sz=@file.dim(variable).length, sz), title: variable)
104
+ end
105
+ GraphKit::AxisKit.autocreate(data: read_variable(variable, options), units: @file.var(variable).att('units').get, title: @file.var(variable).att('description').get.sub(/(,|summed|average).*$/, '').sub(/[vV]alues of (the )?/, '').sub(/ coordinate/, ''))
106
+ end
107
+ def dimension_variable_name(n)
108
+ case n
109
+ when 't','tspec', 'iter', 'rad', 'cc', 'nmat'
110
+ n
111
+ else
112
+ raise "Unknown dimension #{n}"
113
+ end
114
+ end
115
+ def check_no_r(non_flat_dims)
116
+ raise "Please specify the r index for real or imaginary" if non_flat_dims.include? @file.dim('r')
117
+ end
118
+ def graphkit(variable, options)
119
+ non_flat_dims=dimensions(variable).find_all{|dim| dim_start(dim.name, options) != dim_end(dim.name, options) and dim.length != 1}
120
+ check_no_r(non_flat_dims)
121
+ axiskits = non_flat_dims.map{|dim| dimvar = dimension_variable_name(dim.name); axiskit(dimvar, options)} + [axiskit(variable, options)]
122
+ hash = {}
123
+ axes = [:x, :y, :z, :f]
124
+ axiskits.each_with_index{|ax, i| hash[axes[i]] = ax}
125
+ kit = GraphKit.autocreate(hash)
126
+ opts = options.dup
127
+ opts.delete(:modify_variable)
128
+ opts.delete(:graphkit_name)
129
+ #kit.data[0].title += " with options: " + opts.to_s
130
+ kit.data[0].title += " " + opts.to_s.gsub(/_(index|element)/, '')
131
+ if kit.zlabel
132
+ kit.zlabel = "'#{kit.zlabel}' rotate by 90"
133
+ #kit.zlabel = nil
134
+ end
135
+ kit
136
+ end
137
+ end # class NetcdfSmartReader
138
+
139
+
140
+ def netcdf_smart_reader
141
+ NetcdfSmartReader.new(new_netcdf_file)
142
+ end
143
+
144
+ def smart_graphkit(options)
145
+ case options[:command]
146
+ when :help
147
+ "A smart graphkit is a direct plot of a given variable from the new netcdf file. The name of the graphkit is the name of the variable prefixed by 'cdf_'. To plot, for example, the heat flux vs time, you would give the graph name cdf_heat_flux_tot. You can use index specifiers in the the options; for example, to plot the potential as a function of kx and ky for a given time index, you would use the graph name cdf_phi2_by_mode, and the options {t_index: n}. To plot the potential as function of kx for a given ky and time would use the options {t_index, n, Y_index: m}. For each dimension you can specify the index, or a minium and/or maximum."
148
+ when :options
149
+ [:nmat_index, :t_index, :tspec_index, :iter_index]
150
+ else
151
+ netcdf_smart_reader.graphkit(options[:graphkit_name].sub(/^nc_/, ''), options)
152
+ end
153
+ end
154
+
155
+
156
+
157
+ end
@@ -25,6 +25,8 @@ class CodeRunner
25
25
  require 'trinitycrmod/actual_parameter_values'
26
26
  require 'trinitycrmod/chease'
27
27
  require 'trinitycrmod/calib'
28
+ require 'trinitycrmod/flux_interpolator'
29
+ require 'trinitycrmod/read_netcdf'
28
30
 
29
31
  # Setup gs2 in case people are using it
30
32
  CodeRunner.setup_run_class('gs2')
@@ -7,12 +7,8 @@ rescue Bundler::BundlerError => e
7
7
  $stderr.puts "Run `bundle install` to install missing gems"
8
8
  exit e.status_code
9
9
  end
10
- require 'test/unit'
11
- require 'shoulda'
12
10
 
13
11
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
12
  $LOAD_PATH.unshift(File.dirname(__FILE__))
15
13
  require 'coderunner'
16
14
 
17
- class Test::Unit::TestCase
18
- end
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.6.9 ruby lib
5
+ # stub: trinitycrmod 0.7.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "trinitycrmod"
9
- s.version = "0.6.9"
9
+ s.version = "0.7.0"
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 = "2015-03-31"
14
+ s.date = "2015-07-11"
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 = [
@@ -31,9 +31,11 @@ Gem::Specification.new do |s|
31
31
  "lib/trinitycrmod/chease.rb",
32
32
  "lib/trinitycrmod/check_parameters.rb",
33
33
  "lib/trinitycrmod/deleted_variables.rb",
34
+ "lib/trinitycrmod/flux_interpolator.rb",
34
35
  "lib/trinitycrmod/graphs.rb",
35
36
  "lib/trinitycrmod/namelists.rb",
36
37
  "lib/trinitycrmod/output_files.rb",
38
+ "lib/trinitycrmod/read_netcdf.rb",
37
39
  "lib/trinitycrmod/trinity.rb",
38
40
  "lib/trinitycrmod/trinity_gs2.rb",
39
41
  "sync_variables/helper.rb",
@@ -42,40 +44,37 @@ Gem::Specification.new do |s|
42
44
  ]
43
45
  s.homepage = "http://github.com/edmundhighcock/trinitycrmod"
44
46
  s.licenses = ["GPLv3"]
45
- s.rubygems_version = "2.2.2"
47
+ s.rubygems_version = "2.4.8"
46
48
  s.summary = "CodeRunner module for the Trinity simulation software."
47
49
 
48
50
  if s.respond_to? :specification_version then
49
51
  s.specification_version = 4
50
52
 
51
53
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
52
- s.add_runtime_dependency(%q<coderunner>, [">= 0.15.5"])
53
- s.add_runtime_dependency(%q<text-data-tools>, [">= 1.1.3"])
54
+ s.add_runtime_dependency(%q<coderunner>, [">= 0.16.10"])
55
+ s.add_runtime_dependency(%q<text-data-tools>, [">= 1.1.6"])
54
56
  s.add_runtime_dependency(%q<gs2crmod>, [">= 0.11.76"])
55
- s.add_development_dependency(%q<shoulda>, ["= 3.0.1"])
57
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
56
58
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
57
59
  s.add_development_dependency(%q<bundler>, ["> 1.0.0"])
58
- s.add_development_dependency(%q<jeweler>, [">= 1.8.4"])
59
- s.add_development_dependency(%q<minitest>, ["~> 4"])
60
+ s.add_development_dependency(%q<jeweler>, [">= 2.00"])
60
61
  else
61
- s.add_dependency(%q<coderunner>, [">= 0.15.5"])
62
- s.add_dependency(%q<text-data-tools>, [">= 1.1.3"])
62
+ s.add_dependency(%q<coderunner>, [">= 0.16.10"])
63
+ s.add_dependency(%q<text-data-tools>, [">= 1.1.6"])
63
64
  s.add_dependency(%q<gs2crmod>, [">= 0.11.76"])
64
- s.add_dependency(%q<shoulda>, ["= 3.0.1"])
65
+ s.add_dependency(%q<shoulda>, [">= 0"])
65
66
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
66
67
  s.add_dependency(%q<bundler>, ["> 1.0.0"])
67
- s.add_dependency(%q<jeweler>, [">= 1.8.4"])
68
- s.add_dependency(%q<minitest>, ["~> 4"])
68
+ s.add_dependency(%q<jeweler>, [">= 2.00"])
69
69
  end
70
70
  else
71
- s.add_dependency(%q<coderunner>, [">= 0.15.5"])
72
- s.add_dependency(%q<text-data-tools>, [">= 1.1.3"])
71
+ s.add_dependency(%q<coderunner>, [">= 0.16.10"])
72
+ s.add_dependency(%q<text-data-tools>, [">= 1.1.6"])
73
73
  s.add_dependency(%q<gs2crmod>, [">= 0.11.76"])
74
- s.add_dependency(%q<shoulda>, ["= 3.0.1"])
74
+ s.add_dependency(%q<shoulda>, [">= 0"])
75
75
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
76
76
  s.add_dependency(%q<bundler>, ["> 1.0.0"])
77
- s.add_dependency(%q<jeweler>, [">= 1.8.4"])
78
- s.add_dependency(%q<minitest>, ["~> 4"])
77
+ s.add_dependency(%q<jeweler>, [">= 2.00"])
79
78
  end
80
79
  end
81
80
 
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.6.9
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edmund Highcock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-31 00:00:00.000000000 Z
11
+ date: 2015-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coderunner
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.15.5
19
+ version: 0.16.10
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.15.5
26
+ version: 0.16.10
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: text-data-tools
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.1.3
33
+ version: 1.1.6
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 1.1.3
40
+ version: 1.1.6
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: gs2crmod
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: shoulda
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 3.0.1
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 3.0.1
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rdoc
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -100,28 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: 1.8.4
103
+ version: '2.00'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: 1.8.4
111
- - !ruby/object:Gem::Dependency
112
- name: minitest
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '4'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '4'
110
+ version: '2.00'
125
111
  description: This module allows Trinity, the Multiscale Gyrokinetic Turbulent Transport
126
112
  solver for Fusion Reactors, to harness the power of CodeRunner, a framework for
127
113
  the automated running and analysis of simulations.
@@ -144,9 +130,11 @@ files:
144
130
  - lib/trinitycrmod/chease.rb
145
131
  - lib/trinitycrmod/check_parameters.rb
146
132
  - lib/trinitycrmod/deleted_variables.rb
133
+ - lib/trinitycrmod/flux_interpolator.rb
147
134
  - lib/trinitycrmod/graphs.rb
148
135
  - lib/trinitycrmod/namelists.rb
149
136
  - lib/trinitycrmod/output_files.rb
137
+ - lib/trinitycrmod/read_netcdf.rb
150
138
  - lib/trinitycrmod/trinity.rb
151
139
  - lib/trinitycrmod/trinity_gs2.rb
152
140
  - sync_variables/helper.rb
@@ -172,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
160
  version: '0'
173
161
  requirements: []
174
162
  rubyforge_project:
175
- rubygems_version: 2.2.2
163
+ rubygems_version: 2.4.8
176
164
  signing_key:
177
165
  specification_version: 4
178
166
  summary: CodeRunner module for the Trinity simulation software.