gs2crmod 0.11.54 → 0.11.55
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/gs2crmod.gemspec +3 -3
- data/lib/gs2crmod/gs2.rb +3 -3
- data/lib/gs2crmod/read_netcdf.rb +101 -79
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c31f9f94d4ee877354ea333dc090790a3d3d40ac
|
4
|
+
data.tar.gz: aceb9deb1003065b4fb3941dd19568689c36c6f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b11926703a4627d36891b5289baa606257da618c26d2945744224611c259efc80fc9c1b58a53efa5ebcff1409055f9dfd1b2f8c56afe919e90aed3d87754930
|
7
|
+
data.tar.gz: a04cbd4bba9223f25b3d5dbec7fe1170bdbef6e2e4058780a39f5b1b021a54c859ab16008a46df18aac1a40fb07ad6d005bbe08c86ff6d98c654a23aa58f2e42
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.11.
|
1
|
+
0.11.55
|
data/gs2crmod.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
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: gs2crmod 0.11.
|
5
|
+
# stub: gs2crmod 0.11.55 ruby lib
|
6
6
|
# stub: ext/extconf.rb
|
7
7
|
|
8
8
|
Gem::Specification.new do |s|
|
9
9
|
s.name = "gs2crmod"
|
10
|
-
s.version = "0.11.
|
10
|
+
s.version = "0.11.55"
|
11
11
|
|
12
12
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
13
13
|
s.require_paths = ["lib"]
|
14
14
|
s.authors = ["Edmund Highcock", "Ferdinand van Wyk"]
|
15
|
-
s.date = "2014-07-
|
15
|
+
s.date = "2014-07-22"
|
16
16
|
s.description = "GS2 is a gyrokinetic flux tube initial value turbulence code which can be used for fusion or astrophysical plasmas. CodeRunner is a framework for the automated running and analysis of large simulations. This module allows GS2 (and its sister code AstroGK) to harness the power of the CodeRunner framework."
|
17
17
|
s.email = "edmundhighcock@sourceforge.net"
|
18
18
|
s.extensions = ["ext/extconf.rb"]
|
data/lib/gs2crmod/gs2.rb
CHANGED
@@ -378,7 +378,7 @@ def get_time
|
|
378
378
|
end
|
379
379
|
|
380
380
|
def get_completed_timesteps
|
381
|
-
|
381
|
+
#raise CRFatal.new("Couldn't find outfile #{@run_name}.out") unless FileTest.exist?(@run_name + ".out")
|
382
382
|
#p 'try to get completed_timesteps', Dir.pwd, 'nwrite', @nwrite, 'delt', @delt
|
383
383
|
@completed_timesteps = (list(:t).size - 1) * (@nwrite || 1)
|
384
384
|
#p 'tried to get completed_timesteps'
|
@@ -437,9 +437,9 @@ def print_out_line
|
|
437
437
|
name += " (res: #@restart_id)" if @restart_id
|
438
438
|
name += " real_id: #@real_id" if @real_id
|
439
439
|
beginning = sprintf("%2d:%d %-60s %1s:%2.1f(%s) %3s%1s %1s", @id, @job_no, name, @status.to_s[0,1], @run_time.to_f / 60.0, @nprocs.to_s, percent_complete, "%", @converged.to_s)
|
440
|
-
|
440
|
+
if @ky
|
441
441
|
beginning += sprintf("%3s %4s %4s", @ky, @growth_rates[@ky], @real_frequencies[@ky])
|
442
|
-
|
442
|
+
elsif @nonlinear_mode == "off"
|
443
443
|
beginning += sprintf("%3s %4s %4s",
|
444
444
|
@fastest_growing_mode, @max_growth_rate,
|
445
445
|
@freq_of_max_growth_rate)
|
data/lib/gs2crmod/read_netcdf.rb
CHANGED
@@ -194,89 +194,111 @@ def old_smart_graphkit(options)
|
|
194
194
|
end
|
195
195
|
|
196
196
|
def hyperviscosity_graphkit(options)
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
197
|
+
case options[:command]
|
198
|
+
when :help
|
199
|
+
"Plot of the effect of hyperviscosity"
|
200
|
+
when :options
|
201
|
+
return []
|
202
|
+
else
|
203
|
+
raise "This only works for spectrogk" unless spectrogk?
|
204
|
+
options[:modify_variable] = Proc.new do |varname, narray, dimhash|
|
205
|
+
#dimnames = dimhash.keys
|
206
|
+
shape = narray.shape
|
207
|
+
if varname == "gnew2_ta"
|
208
|
+
#p dimhash
|
209
|
+
#p dimhash['Y']
|
210
|
+
ky = dimhash['Y'].to_a.to_gslv
|
211
|
+
kx = dimhash['X'].to_a.to_gslv
|
212
|
+
shape = narray.shape
|
213
|
+
for ig in 0...shape[0]
|
214
|
+
for it in 0...shape[1]
|
215
|
+
for ik in 0...shape[2]
|
216
|
+
for il in 0...shape[3]
|
217
|
+
for ie in 0...shape[4]
|
218
|
+
for is in 0...shape[5]
|
219
|
+
narray[ig,it,ik,il,ie,is]*=(ky[ik]**2.0 + kx[it]**2.0)**(2*@nexp)*@d_hypervisc
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
narray
|
228
|
+
end
|
229
|
+
options[:graphkit_name] = 'cdf_gnew2_ta'
|
230
|
+
return smart_graphkit(options)
|
231
|
+
end
|
225
232
|
end
|
226
233
|
def hypercoll_graphkit(options)
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
234
|
+
case options[:command]
|
235
|
+
when :help
|
236
|
+
"Plot of the effect of hypercollisions"
|
237
|
+
when :options
|
238
|
+
return []
|
239
|
+
else
|
240
|
+
raise "This only works for spectrogk" unless spectrogk?
|
241
|
+
options[:modify_variable] = Proc.new do |varname, narray, dimhash|
|
242
|
+
#dimnames = dimhash.keys
|
243
|
+
p varname, dimhash
|
244
|
+
if varname == "gnew2_ta"
|
245
|
+
shape = narray.shape
|
246
|
+
m = dimhash['m']
|
247
|
+
mmax = new_netcdf_file.var('hermite').get.to_a.size - 1
|
248
|
+
p 'shape',shape
|
249
|
+
for ig in 0...shape[0]
|
250
|
+
for it in 0...shape[1]
|
251
|
+
for ik in 0...shape[2]
|
252
|
+
for il in 0...shape[3]
|
253
|
+
for ie in 0...shape[4]
|
254
|
+
for is in 0...shape[5]
|
255
|
+
narray[ig,it,ik,il,ie,is]*=send(:nu_h_ + (is+1).to_sym)*(m[il]/mmax)**send(:nexp_h_ + (is+1).to_sym)
|
256
|
+
end
|
257
|
+
end
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|
263
|
+
narray
|
264
|
+
end
|
265
|
+
options[:graphkit_name] = 'cdf_gnew2_ta'
|
266
|
+
return smart_graphkit(options)
|
267
|
+
end
|
254
268
|
end
|
255
269
|
def lenardbern_graphkit(options)
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
270
|
+
case options[:command]
|
271
|
+
when :help
|
272
|
+
"Plot of the effect of Lenard Bernstein collisions"
|
273
|
+
when :options
|
274
|
+
return []
|
275
|
+
else
|
276
|
+
raise "This only works for spectrogk" unless spectrogk?
|
277
|
+
options[:modify_variable] = Proc.new do |varname, narray, dimhash|
|
278
|
+
#dimnames = dimhash.keys
|
279
|
+
if varname == "gnew2_ta"
|
280
|
+
m = dimhash['m']
|
281
|
+
shape = narray.shape
|
282
|
+
for ig in 0...shape[0]
|
283
|
+
for it in 0...shape[1]
|
284
|
+
for ik in 0...shape[2]
|
285
|
+
for il in 0...shape[3]
|
286
|
+
for ie in 0...shape[4]
|
287
|
+
for is in 0...shape[5]
|
288
|
+
narray[ig,it,ik,il,ie,is]*=send(:nu_ + (is+1).to_sym)*m[il]
|
289
|
+
end
|
290
|
+
end
|
291
|
+
end
|
292
|
+
end
|
293
|
+
end
|
294
|
+
end
|
295
|
+
end
|
296
|
+
narray
|
297
|
+
end
|
298
|
+
options[:graphkit_name] = 'cdf_gnew2_ta'
|
299
|
+
kit = smart_graphkit(options)
|
300
|
+
return kit
|
301
|
+
end
|
280
302
|
end
|
281
303
|
|
282
304
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gs2crmod
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.55
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edmund Highcock
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-07-
|
12
|
+
date: 2014-07-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: coderunner
|