veritascrmod 0.2.0 → 0.3.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: 9418ff9b2a4f4a2603c9520ffb731734175359ae
4
- data.tar.gz: 26f87eca521f88c8852fb3b252324fd63f863ea7
3
+ metadata.gz: dac480522127c512e64cf75f63d0d9669bfb8509
4
+ data.tar.gz: b27419d05f4f5e4b8dc2daf044cfaf5929d926b0
5
5
  SHA512:
6
- metadata.gz: a77f921dc78c9709927fbf38341e9342e73fb1e5682f69327cd346652e559b34cf5706f2710c61984d6fcb0f1b52b7f11bfb91235f628e7c850e125fecd083b9
7
- data.tar.gz: dd6277e8c0da4d426ba542606f96650a4b164ebee554a716760a1e9edadf74033d258bf37a757fa9d9d907ca3af0ee7da95f7a60c6eb91614997c320a0578703
6
+ metadata.gz: 0b735502b44419114cf2cde1f1ad7d7aac5c538710461847c41392e24439a1b3a8063ba13544e04068ad3dcac6334626408d17d987498cb45eda4a2e7fae45f0
7
+ data.tar.gz: 10955f370179b550fed7194252f24e223cbc0e4795739c210e5b7e349316f0496046be5dd7de76adf271bc1d55f89437bf9e6ae43981bee468a2568ddc467065
data/Gemfile CHANGED
@@ -3,6 +3,7 @@ source "https://rubygems.org"
3
3
  # Example:
4
4
  # gem "activesupport", ">= 2.3.5"
5
5
  gem "coderunner", ">=1.0.0"
6
+ gem "ruby-netcdf", ">= 0.7.1"
6
7
  gem "narray"
7
8
 
8
9
  # Add dependencies to develop your gem here.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
@@ -18,6 +18,45 @@
18
18
  :description=>nil,
19
19
  :help=>nil,
20
20
  :code_name=>:time,
21
+ :must_pass=>
22
+ [{:test=>"kind_of? Numeric",
23
+ :explanation=>
24
+ "This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
25
+ :type=>:Float},
26
+ :runtime=>
27
+ {:should_include=>"true",
28
+ :description=>nil,
29
+ :help=>nil,
30
+ :code_name=>:runtime,
31
+ :must_pass=>
32
+ [{:test=>"kind_of? Numeric",
33
+ :explanation=>
34
+ "This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
35
+ :type=>:Float},
36
+ :stepfreq=>
37
+ {:should_include=>"true",
38
+ :description=>nil,
39
+ :help=>nil,
40
+ :code_name=>:stepfreq,
41
+ :must_pass=>
42
+ [{:test=>"kind_of? Numeric",
43
+ :explanation=>
44
+ "This variable must be a floating point number (an integer is also acceptable: it will be converted into a floating point number)."}],
45
+ :type=>:Float},
46
+ :nregrid=>
47
+ {:should_include=>"true",
48
+ :description=>nil,
49
+ :help=>nil,
50
+ :code_name=>:nregrid,
51
+ :must_pass=>
52
+ [{:test=>"kind_of? Integer",
53
+ :explanation=>"This variable must be an integer."}],
54
+ :type=>:Integer},
55
+ :tfieldsonly=>
56
+ {:should_include=>"true",
57
+ :description=>nil,
58
+ :help=>nil,
59
+ :code_name=>:tfieldsonly,
21
60
  :must_pass=>
22
61
  [{:test=>"kind_of? Numeric",
23
62
  :explanation=>
@@ -0,0 +1,155 @@
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::Veritas
10
+
11
+ class NetcdfSmartReader
12
+ def initialize(file)
13
+ @file = file
14
+ end
15
+ def dimensions(varname)
16
+ #p 'varname', varname
17
+ raise "Unknown variable #{varname}" unless @file.var(varname)
18
+ @file.var(varname).dims
19
+ end
20
+ def read_variable(varname, options)
21
+ #start = get_start(dims, options)
22
+ dims = dimensions(varname)
23
+ narray = @file.var(varname).get('start'=>starts(dims, options), 'end'=>ends(dims, options))
24
+ if options[:modify_variable]
25
+ myhsh = dims.inject({}){|hsh, dim|
26
+ opts = options.dup
27
+ opts[:modify_variable] = nil
28
+ dimval = read_variable(dimension_variable_name(dim.name), opts)
29
+ hsh[dim.name] = dimval
30
+ hsh
31
+ }
32
+ narray = options[:modify_variable].call(varname, narray, myhsh)
33
+ elsif options[:invert_matrix]
34
+ narray = GSL::Linalg::LU.invert(narray.to_gm_view).to_na_ref
35
+ end
36
+ shape = narray.shape
37
+ shape.delete_if{|i| i==1}
38
+ #p 'shape', shape; STDIN.gets
39
+ narray.reshape!(*shape)
40
+ narray
41
+
42
+ end
43
+ def starts(dims, options)
44
+ dims.map{|d| dim_start(d.name, options)}
45
+ end
46
+ def dim_start(name, options)
47
+ sym = name.to_sym
48
+ if i=options[sym + :_index] or i = options[sym]
49
+ return i-1
50
+ elsif i=options[sym + :_element]
51
+ return i
52
+ elsif i=options[sym + :min]
53
+ return i
54
+ else
55
+ return 0
56
+ end
57
+ end
58
+ def ends(dims, options)
59
+ dims.map{|d| dim_end(d.name, options)}
60
+ end
61
+ def dim_end(name, options)
62
+ sym = name.to_sym
63
+ if i=options[sym + :_index] or i=options[sym]
64
+ return i-1
65
+ elsif i=options[sym + :_element]
66
+ return i
67
+ elsif i=options[sym + :max]
68
+ return i
69
+ else
70
+ return -1
71
+ end
72
+ end
73
+ def file_dimensions
74
+ @file.dims.map{|d| d.name}
75
+ end
76
+
77
+ def axiskit(variable, options)
78
+ case variable
79
+ when *file_dimensions
80
+ return GraphKit::AxisKit.autocreate(data: GSL::Vector.linspace(1, sz=@file.dim(variable).length, sz), title: variable)
81
+ end
82
+ 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/, '').sub(/.*rho.*The definition.*/, 'rho'))
83
+ end
84
+ def dimension_variable_name(n)
85
+ case n
86
+ when *file_dimensions
87
+ n
88
+ else
89
+ raise "Unknown dimension #{n}"
90
+ end
91
+ end
92
+ def check_no_r(non_flat_dims)
93
+ raise "Please specify the r index for real or imaginary" if non_flat_dims.include? @file.dim('r')
94
+ end
95
+ def graphkit(variable, options)
96
+ non_flat_dims=dimensions(variable).find_all{|dim| dim_start(dim.name, options) != dim_end(dim.name, options) and dim.length != 1}
97
+ check_no_r(non_flat_dims)
98
+ axiskits = non_flat_dims.map{|dim| dimvar = dimension_variable_name(dim.name); axiskit(dimvar, options)} + [axiskit(variable, options)]
99
+ hash = {}
100
+ axes = [:x, :y, :z, :f]
101
+ axiskits.each_with_index{|ax, i| hash[axes[i]] = ax}
102
+ kit = GraphKit.autocreate(hash)
103
+ opts = options.dup
104
+ opts.delete(:modify_variable)
105
+ opts.delete(:graphkit_name)
106
+ #kit.data[0].title += " with options: " + opts.to_s
107
+ kit.data[0].title += " " + opts.to_s.gsub(/_(index|element)/, '')
108
+ kit.data[0].gp.with = "lp"
109
+ if kit.zlabel
110
+ kit.zlabel = "'#{kit.zlabel}' rotate by 90"
111
+ #kit.zlabel = nil
112
+ end
113
+ kit
114
+ end
115
+ end # class NetcdfSmartReader
116
+
117
+
118
+ def netcdf_smart_reader
119
+ end
120
+
121
+ class SmartGraphKitError < StandardError
122
+ end
123
+
124
+ def smart_graphkit(options)
125
+ case options[:command]
126
+ when :help
127
+ "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."
128
+ when :options
129
+ [:nmat_index, :t_index, :tspec_index, :iter_index]
130
+ else
131
+ case options[:graphkit_name]
132
+ when /_vs_/
133
+ kits = options[:graphkit_name].sub(/^nc_/, '').split(/_vs_/).map{|n| netcdf_smart_reader.graphkit(n, options)}
134
+ kit = kits[-1]
135
+ raise SmartGraphKitError.new("Number of axes does not match number of variables") if kits.size != kit.naxes
136
+ for i in 0...kit.data.size
137
+ if kit.naxes > 1
138
+ kit.data[i].x = kits[0].data[i].y
139
+ end
140
+ if kit.naxes > 2
141
+ kit.data[i].x = kits[0].data[i].z
142
+ kit.data[i].y = kits[1].data[i].z
143
+ end
144
+ end
145
+ kit.autocreate
146
+ kit
147
+ else
148
+ openncfile{|f| NetcdfSmartReader.new(f).graphkit(options[:graphkit_name].sub(/^nc_/, ''), options)}
149
+ end
150
+ end
151
+ end
152
+
153
+
154
+
155
+ end
@@ -9,6 +9,8 @@ class CodeRunner
9
9
  # Where this file is
10
10
  @code_module_folder = File.dirname(File.expand_path(__FILE__)) # i.e. the directory this file is in
11
11
 
12
+ require 'veritascrmod/read_netcdf.rb'
13
+
12
14
  # Use the Run::FortranNamelist tools to process the variable database
13
15
  setup_namelists(@code_module_folder)
14
16
 
@@ -42,6 +44,7 @@ class CodeRunner
42
44
  name += " (res: #@restart_id)" if @restart_id
43
45
  name += " real_id: #@real_id" if @real_id
44
46
  beginning = sprintf("%2d:%d %-60s %1s:%2.1f(%s) %3s%1s", @id, @job_no, name, @status.to_s[0,1], @run_time.to_f / 60.0, @nprocs.to_s, percent_complete.to_f, "%")
47
+ beginning += " n:#@nlines " if @nlines
45
48
  #if ctd and fusionQ
46
49
  #beginning += sprintf("Q:%f, Pfusion:%f MW, Ti0:%f keV, Te0:%f keV, n0:%f x10^20", fusionQ, pfus, ti0, te0, ne0)
47
50
  #end
@@ -112,6 +115,10 @@ class CodeRunner
112
115
  #
113
116
  def process_directory_code_specific
114
117
  get_status
118
+ if FileTest.exist? 'output/time.txt'
119
+ @nlines = File.read('output/time.txt').split("\n").size
120
+ end
121
+
115
122
  end
116
123
 
117
124
  def get_status
@@ -168,6 +175,206 @@ EOF1
168
175
  '.in'
169
176
  end
170
177
 
178
+ def self.modify_job_script(runner, runs_in, script)
179
+ if CODE_OPTIONS[:veritas] and CODE_OPTIONS[:veritas][:list]
180
+ if (list_size = CODE_OPTIONS[:veritas][:list]).kind_of? Integer
181
+ raise "The total number of runs must be a multiple of the list size!" unless runs_in.size % list_size == 0
182
+ pieces = runs_in.pieces(runs_in.size/list_size)
183
+ else
184
+ pieces = [runs_in]
185
+ end
186
+ script = ""
187
+ pieces.each do |runs|
188
+ #ep 'there is a list'
189
+ FileUtils.makedirs('job_lists')
190
+ jid = "#{runs[0].id}-#{runs[-1].id}"
191
+ list_file = "../job_lists/veritas_list_#{jid}.list"
192
+ Dir.chdir('job_chain_files') do
193
+ File.open(list_file,'w') do |file|
194
+ file.puts runs.size
195
+ file.puts runs.map{|r| "../#{r.relative_directory}/\n#{r.run_name}"}.join("\n")
196
+ end
197
+ end
198
+ raise "runs must all have the same nprocs" unless runs.map{|r| r.nprocs}.uniq.size == 1
199
+ runs.each do |r|
200
+ # Make sure the restart file name includes the relative directory for
201
+ # list runs
202
+ #reldir = r.relative_directory
203
+ #puts rdir[0...reldir.size] == reldir, rdir[0...reldir.size], reldir
204
+ #raise ""
205
+ Dir.chdir(r.directory){r.write_input_file}
206
+ end
207
+ #np = runs[0].nprocs.split('x').map{|n| n.to_i}
208
+ #np[0] *= runs.size
209
+ #nprocs = np.map{|n| n.to_s}.join('x')
210
+ #@runner.nprocs = nprocs
211
+ @runner.nprocs = runs[0].nprocs
212
+ ls = ListSubmitter.new(@runner, @runner.nprocs, list_file, jid)
213
+ script << 'cd job_chain_files; '
214
+ script << ls.run_command
215
+ end
216
+ end
217
+ return script
218
+ end
219
+
220
+ class ListSubmitter
221
+ include CodeRunner::SYSTEM_MODULE
222
+ @uses_mpi = true
223
+ attr_reader :executable_location, :executable_name, :parameter_string
224
+ attr_reader :job_identifier
225
+ def initialize(runner, nprocs, list_file, jid)
226
+ @executable_location = runner.executable_location
227
+ @executable_name = runner.executable_name
228
+ @parameter_string = list_file
229
+ @job_identifier = jid
230
+ @nprocs = nprocs
231
+ end
232
+ def rcp
233
+ self.class.rcp
234
+ end
235
+ def self.rcp
236
+ @rcp ||= CodeRunner::Run::RunClassPropertyFetcher.new(self)
237
+ end
238
+
239
+ end #class ListSubmitter
240
+ def graphkit(name, options)
241
+ if name =~ /^nc/
242
+ smart_graphkit(options.absorb(graphkit_name: name))
243
+ else
244
+ send((name + '_graphkit').to_sym, options)
245
+ end
246
+ end
247
+ def potential_graphkit(options)
248
+ real_space_graphkit(signal: 'phi')
249
+ end
250
+ def asquared_graphkit(options)
251
+ real_space_graphkit(signal: 'asquared')
252
+ end
253
+ def asquared2d_graphkit(options)
254
+ real_space_2d_graphkit(options.dup.absorb(signal: 'asquared'))
255
+ end
256
+ def openncfile
257
+ require 'numru/netcdf'
258
+ res = nil
259
+ file = NumRu::NetCDF.open("#@directory/#@run_name.nc")
260
+ res = yield(file)
261
+ file.close
262
+ res
263
+ end
264
+ def real_space_graphkit(options)
265
+ Dir.chdir(@directory) do
266
+ mat = openncfile{|f| f.var(options[:signal]).get}
267
+ shape = mat.shape
268
+ p 'shape', mat.shape
269
+ x = shape[0].times.to_a
270
+ t = shape[1].times.to_a
271
+ kit = GraphKit.quick_create([x, t, mat])
272
+ kit.gp.view = "map"
273
+ kit.gp.palette = "rgb 23,28,3"
274
+ kit.data[0].gp.with = "pm3d"
275
+ kit
276
+ end
277
+ end
278
+ def real_space_2d_graphkit(options)
279
+ t = options[:t]
280
+ raise "Please supply :t" unless t
281
+ Dir.chdir(@directory) do
282
+ vec = openncfile{|f| f.var(options[:signal]).get('start'=>[0,t], 'end'=>[-1,t])}
283
+ mat = GSL::Matrix.alloc(vec.size, 2)
284
+ for i in 0...vec.size
285
+ mat[i,0] = mat[i,1] = vec[i]
286
+ end
287
+ shape = mat.shape
288
+ p 'shape', mat.shape
289
+ x = shape[0].times.to_a
290
+ t = shape[1].times.to_a
291
+ kit = GraphKit.quick_create([x, t, mat])
292
+ kit.gp.view = "map"
293
+ kit.gp.palette = "rgb 23,28,3"
294
+ kit.data[0].gp.with = "pm3d"
295
+ kit
296
+ end
297
+ end
298
+ def waveandparticles_graphkit(options)
299
+ kit = GraphKit::MultiKit.new([
300
+ asquared2d_graphkit(options),
301
+ dist_fn_graphkit(options)
302
+ ])
303
+ kit[0].gp.size = "1.0,0.3"
304
+ kit[0].gp.origin = "0.0,0.7"
305
+ kit[1].gp.size = "1.0,0.9"
306
+ kit[1].gp.origin = "0.0,-0.1"
307
+ kit[1].gp.cbrange = "[0:]"
308
+ kit.each do |k|
309
+ k.key="off"
310
+ k.xlabel=nil
311
+ k.ylabel=nil
312
+ k.gp.xtics = "unset"
313
+ k.gp.ytics = "unset"
314
+ k.title = nil
315
+ end
316
+ kit
317
+ end
318
+ def vspace_dist_fn_graphkit(options)
319
+ kit = dist_fn_graphkit(options)
320
+ mat = kit.data[0].z.data
321
+ pvec = GSL::Vector.alloc(mat.shape[1])
322
+ pvec = 0.0
323
+ for i in 0...mat.shape[0]
324
+ pvec = pvec + mat.row(i)
325
+ end
326
+ kit2 = GraphKit.quick_create([kit.data[0].y.data, pvec])
327
+ kit2.data[0].gp.with = "lp"
328
+ kit2.gp.logscale = "y"
329
+ kit2
330
+ end
331
+ def dist_fn_graphkit(options)
332
+ t = options[:t]
333
+ p = options[:particle]
334
+ raise "Please supply :t" unless t
335
+ raise "Please supply :particle" unless p
336
+ mat = openncfile do |f|
337
+ m = GSL::Matrix.alloc(f.dim("x_finest").length, f.dim("p_finest").length)
338
+ nlevels = f.dim("level").length
339
+ nlevels.times.to_a.reverse.each do |l|
340
+ #[2].each do |l|
341
+ factor = (@r||2)**l
342
+ # NB the Ruby netCDF interface is (very annoyingly) written in column major (Fortran) style
343
+ nrectangles = f.var("level_rnum").get('index'=> [l,p,t])[0]
344
+ nrectangles.times do |r|
345
+ urid = f.var('urid').get('index'=>[r,l,p,t])[0]
346
+ md = f.var('rectangle_metadata').get('start'=>[0,0,urid], 'end'=>[-1,-1,urid])[true,true,0]
347
+ x_indices = f.var("integer_blob_data").get('start'=>[md[0,0]], 'end'=>[md[1,0]])
348
+ p_indices = f.var("integer_blob_data").get('start'=>[md[0,1]], 'end'=>[md[1,1]])
349
+ fdata = f.var("double_blob_data").get('start'=>[md[0,2]], 'end'=>[md[1,2]])
350
+ p_size = md[1,1] - md[0,1] + 1
351
+ x_indices.to_a.each_with_index do |ixglobal,ixrec|
352
+ p_indices.to_a.each_with_index do |ipglobal,iprec|
353
+ index = ixrec*p_size + iprec
354
+ #ep ["index", index, "fsize", md[1,2]-md[0,2]+1, 'ix', ixrec, 'ip', iprec, 'p_size', p_size, 'level', l, 'ixglobal', ixglobal, 'factor', factor]
355
+ for i in 0...factor
356
+ for j in 0...factor
357
+ m[ixglobal*factor+i,ipglobal*factor+j] = fdata[index]
358
+ end
359
+ end
360
+ end
361
+ end
362
+ end
363
+ end
364
+ m
365
+ end
366
+ #mat = mat.log if (options[:log])
367
+ shape = mat.shape
368
+ p 'shape', mat.shape
369
+ x = shape[0].times.to_a.reverse
370
+ t = shape[1].times.to_a.reverse
371
+ kit = GraphKit.quick_create([x, t, mat])
372
+ #kit.live = true
373
+ kit.gp.view = "map"
374
+ kit.gp.palette = "rgb 23,28,3"
375
+ kit.data[0].gp.with = "pm3d"
376
+ kit
377
+ end
171
378
  # Override CodeRunner for 0-based# Override CodeRunner for 0-based# Override CodeRunner for 0-based
172
379
  def input_file_text
173
380
  text = input_file_header
data/test/test.in CHANGED
@@ -1,9 +1,12 @@
1
1
  &time
2
2
  filewrite_freq = 10
3
+ runtime = 50.0
3
4
  /
4
5
 
5
6
  &grid
6
7
  nx = 16
8
+ lfinest = 3
9
+ r = 2
7
10
  /
8
11
 
9
12
  &particles
data/test/test_veritas.rb CHANGED
@@ -9,7 +9,7 @@ $coderunner_command = "#{$ruby_command} -I lib/ lib/coderunner.rb"
9
9
  class TestVeritas < MiniTest::Test
10
10
  def setup
11
11
  #puts "setup"; STDIN.gets
12
- cleanup if FileTest.exist?('test/test_results')
12
+ #cleanup if FileTest.exist?('test/test_results')
13
13
  FileUtils.makedirs('test/test_results/v')
14
14
  @runner = CodeRunner.fetch_runner(Y: 'test/test_results', C: 'veritas', X: '/dev/null')
15
15
  end
@@ -23,19 +23,24 @@ class TestVeritas < MiniTest::Test
23
23
  end
24
24
  def teardown
25
25
  end
26
- def test_basics
27
- assert_equal(@runner.run_class, CodeRunner::Veritas)
28
- end
26
+ #def test_basics
27
+ #assert_equal(@runner.run_class, CodeRunner::Veritas)
28
+ #end
29
29
  def test_submit
30
- @runner.run_class.make_new_defaults_file("rake_test", "test/test.in")
31
- FileUtils.mv('rake_test_defaults.rb', 'test/test_results')
32
- if ENV['VERITAS_EXEC']
33
- CodeRunner.submit(Y: 'test/test_results', T: false, D: 'rake_test', n: '1', X: ENV['VERITAS_EXEC'], p: '{np_0: 16, np_1: 16}')
34
- end
30
+ #@runner.run_class.make_new_defaults_file("rake_test", "test/test.in")
31
+ #FileUtils.mv('rake_test_defaults.rb', 'test/test_results')
32
+ #if ENV['VERITAS_EXEC']
33
+ #CodeRunner.submit(Y: 'test/test_results', T: false, D: 'rake_test', n: '1', X: ENV['VERITAS_EXEC'], p: '{np_0: 16, np_1: 16}')
34
+ #end
35
35
  base_hash = @runner.run_class.parse_input_file('test/test.in')
36
36
  test_hash = @runner.run_class.parse_input_file('test/test_results/v/id_1/v_np_0_16_np_1_16_id_1.in')
37
37
  assert_equal(base_hash, test_hash)
38
38
  CodeRunner.status(Y: 'test/test_results')
39
+ #CodeRunner.plot_graph(Y: 'test/test_results', g: ['asquared'], G: [])
40
+ #CodeRunner.plot_graph(Y: 'test/test_results', g: ['waveandparticles;{t:-1, particle: 0, log: true}'], G: [])
41
+ #CodeRunner.plot_graph(Y: 'test/test_results', g: ['nc_asquared;{time:-1, particle: 1}'], G: [])
42
+ #CodeRunner.plot_graph(Y: 'test/test_results', g: ['dist_fn;{t: 0, particle: 0}'], G: [], w: "self.live=true")
43
+ CodeRunner.plot_graph(Y: 'test/test_results', g: ['vspace_dist_fn;{t: 0, particle: 0}'], G: [], w: "self.live=true")
39
44
  #cleanup if FileTest.exist?('test/test_results')
40
45
  end
41
46
  end
data/veritascrmod.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: veritascrmod 0.2.0 ruby lib
5
+ # stub: veritascrmod 0.3.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "veritascrmod"
9
- s.version = "0.2.0"
9
+ s.version = "0.3.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 = "2016-08-10"
14
+ s.date = "2016-08-16"
15
15
  s.description = "A CodeRunner module for the Veritas Vlasov Solver"
16
16
  s.email = "edmundhighcock@users.sourceforge.net"
17
17
  s.extra_rdoc_files = [
@@ -27,6 +27,7 @@ Gem::Specification.new do |s|
27
27
  "VERSION",
28
28
  "lib/veritascrmod.rb",
29
29
  "lib/veritascrmod/namelists.rb",
30
+ "lib/veritascrmod/read_netcdf.rb",
30
31
  "lib/veritascrmod/veritas.rb",
31
32
  "sync_variables/helper.rb",
32
33
  "sync_variables/sync_variables.rb",
@@ -45,6 +46,7 @@ Gem::Specification.new do |s|
45
46
 
46
47
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
47
48
  s.add_runtime_dependency(%q<coderunner>, [">= 1.0.0"])
49
+ s.add_runtime_dependency(%q<ruby-netcdf>, [">= 0.7.1"])
48
50
  s.add_runtime_dependency(%q<narray>, [">= 0"])
49
51
  s.add_development_dependency(%q<shoulda>, [">= 0"])
50
52
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
@@ -53,6 +55,7 @@ Gem::Specification.new do |s|
53
55
  s.add_development_dependency(%q<simplecov>, [">= 0"])
54
56
  else
55
57
  s.add_dependency(%q<coderunner>, [">= 1.0.0"])
58
+ s.add_dependency(%q<ruby-netcdf>, [">= 0.7.1"])
56
59
  s.add_dependency(%q<narray>, [">= 0"])
57
60
  s.add_dependency(%q<shoulda>, [">= 0"])
58
61
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
@@ -62,6 +65,7 @@ Gem::Specification.new do |s|
62
65
  end
63
66
  else
64
67
  s.add_dependency(%q<coderunner>, [">= 1.0.0"])
68
+ s.add_dependency(%q<ruby-netcdf>, [">= 0.7.1"])
65
69
  s.add_dependency(%q<narray>, [">= 0"])
66
70
  s.add_dependency(%q<shoulda>, [">= 0"])
67
71
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: veritascrmod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.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: 2016-08-10 00:00:00.000000000 Z
11
+ date: 2016-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coderunner
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: ruby-netcdf
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.7.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 0.7.1
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: narray
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -124,6 +138,7 @@ files:
124
138
  - VERSION
125
139
  - lib/veritascrmod.rb
126
140
  - lib/veritascrmod/namelists.rb
141
+ - lib/veritascrmod/read_netcdf.rb
127
142
  - lib/veritascrmod/veritas.rb
128
143
  - sync_variables/helper.rb
129
144
  - sync_variables/sync_variables.rb