gs2crmod 0.11.41 → 0.11.42

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2485952c9fd5ce2f24643f82eca1e06f1ff1a0d4
4
- data.tar.gz: ea870f6f032d63e5c1628f39720b47b67059eede
3
+ metadata.gz: d47bfd3f6daaad59aa71daa189d30c0e1e548249
4
+ data.tar.gz: 74da568667cf816e48dc5b841fe6edf0e3fb8abb
5
5
  SHA512:
6
- metadata.gz: f93422f4fa968740a2af38967dd0bc9761ad0db8482dd963344e1e179908555a26d3106b8ea3530626656b5ee9e9c40254a9c226cf02199fcbafcd475b5238b1
7
- data.tar.gz: b7c7dfe02270426ab537a8e89e030916c7d98689c50969a6eeafced53a7ea70f227045f3d90ede58e51bcca7cccef26d64f2fe38f3245d2d8e5805d3205507e6
6
+ metadata.gz: ede1341b80bf20b9748fad03729a0334d38524047823847a4bd154b899106c00839f22bde718868b00867902fd2c0e245887759e516376d0dbb86884013218ff
7
+ data.tar.gz: cf559fa103920112339472b6a0531d3bbdf7204d0be01390c9e4a5051a8c88dc938cdb97a39afaf8394c73928fabfa0570684a7757a2a6a52fe8f8648b361c8c
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.41
1
+ 0.11.42
data/gs2crmod.gemspec CHANGED
@@ -2,12 +2,12 @@
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.41 ruby lib
5
+ # stub: gs2crmod 0.11.42 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.41"
10
+ s.version = "0.11.42"
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"]
@@ -53,14 +53,14 @@ class NetcdfSmartReader
53
53
  dims = dimensions(varname)
54
54
  narray = @file.var(varname).get('start'=>starts(dims, options), 'end'=>ends(dims, options))
55
55
  if options[:modify_variable]
56
- dimhash = dims.inject({}){|hash, dim|
56
+ hsh = dims.inject({}){|hsh, dim|
57
57
  opts = options.dup
58
58
  opts[:modify_variable] = nil
59
59
  dimval = read_variable(dimension_variable_name(dim.name), opts)
60
- hash[dim.name] = dimval
61
- hash
60
+ hsh[dim.name] = dimval
61
+ hsh
62
62
  }
63
- narray = options[:modify_variable].call(varname, narray, hash)
63
+ narray = options[:modify_variable].call(varname, narray, hsh)
64
64
  end
65
65
  shape = narray.shape
66
66
  shape.delete_if{|i| i==1}
@@ -197,8 +197,8 @@ def hyperviscosity_graphkit(options)
197
197
  raise "This only works for spectrogk" unless spectrogk?
198
198
  options[:modify_variable] = Proc.new do |varname, narray, dimhash|
199
199
  #dimnames = dimhash.keys
200
- ky = gsl_vector('ky')
201
- kx = gsl_vector('kx').to_box_order
200
+ ky = dimhash['Y'].to_a.to_gslv
201
+ kx = dimhash['X'].to_a.to_gslv.to_box_order
202
202
  shape = narray.shape
203
203
  if varname == "gnew2_ta"
204
204
  shape = narray.shape
@@ -225,8 +225,11 @@ def hypercoll_graphkit(options)
225
225
  raise "This only works for spectrogk" unless spectrogk?
226
226
  options[:modify_variable] = Proc.new do |varname, narray, dimhash|
227
227
  #dimnames = dimhash.keys
228
+ p varname, dimhash
228
229
  if varname == "gnew2_ta"
229
230
  shape = narray.shape
231
+ m = dimhash['m']
232
+ mmax = new_netcdf_file.var('hermite').get.to_a.size - 1
230
233
  p 'shape',shape
231
234
  for ig in 0...shape[0]
232
235
  for it in 0...shape[1]
@@ -234,7 +237,7 @@ def hypercoll_graphkit(options)
234
237
  for il in 0...shape[3]
235
238
  for ie in 0...shape[4]
236
239
  for is in 0...shape[5]
237
- narray[ig,it,ik,il,ie,is]*=send(:nu_h_ + (is+1).to_sym)*(il.to_f/(shape[3]-1))**send(:nexp_h_ + (is+1).to_sym)
240
+ narray[ig,it,ik,il,ie,is]*=send(:nu_h_ + (is+1).to_sym)*(m[il]/mmax)**send(:nexp_h_ + (is+1).to_sym)
238
241
  end
239
242
  end
240
243
  end
@@ -252,6 +255,7 @@ def lenardbern_graphkit(options)
252
255
  options[:modify_variable] = Proc.new do |varname, narray, dimhash|
253
256
  #dimnames = dimhash.keys
254
257
  if varname == "gnew2_ta"
258
+ m = dimhash['m']
255
259
  shape = narray.shape
256
260
  for ig in 0...shape[0]
257
261
  for it in 0...shape[1]
@@ -259,7 +263,7 @@ def lenardbern_graphkit(options)
259
263
  for il in 0...shape[3]
260
264
  for ie in 0...shape[4]
261
265
  for is in 0...shape[5]
262
- narray[ig,it,ik,il,ie,is]*=send(:nu_ + (is+1).to_sym)*il
266
+ narray[ig,it,ik,il,ie,is]*=send(:nu_ + (is+1).to_sym)*m[il]
263
267
  end
264
268
  end
265
269
  end
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.41
4
+ version: 0.11.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edmund Highcock