ruby-netcdf 0.7.1.1 → 0.7.2
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 +5 -13
- data/{ChangeLog → .ChangeLog.until20150117} +0 -0
- data/.gitignore +5 -6
- data/Rakefile +36 -1
- data/{extconf.rb → ext/numru/extconf.rb} +2 -2
- data/{netcdfraw.c → ext/numru/netcdfraw.c} +32 -0
- data/lib/{netcdf.rb → numru/netcdf.rb} +7 -5
- data/lib/numru/netcdf/version.rb +7 -0
- data/lib/{netcdf_miss.rb → numru/netcdf_miss.rb} +0 -0
- data/ruby-netcdf-bigmem.gemspec +28 -0
- data/ruby-netcdf.gemspec +6 -12
- data/test/test.rb +4 -4
- metadata +21 -23
- data/.rspec +0 -2
- data/.travis.yml +0 -3
- data/bin/console +0 -14
- data/bin/setup +0 -7
- data/lib/version.rb +0 -5
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MGIzOTc0YTQwNGZlM2U2YWFjYmM1MjM5NDJiNGMxMmMxMjgyNzg4ZQ==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3d8e407e23373b1ac833f0924719f034ea283bdf
|
4
|
+
data.tar.gz: d3567461280f7b1ecc9716c05b40f2918b08a7f0
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MDkzNzYzNzY5NWFkZWIzYTc2MTliMzIxYzk0MTlmYjNmZjA2NGNjNWNiMDFm
|
11
|
-
MDA1ODMxODBiMjgyNzUzOWFmY2VhNTQ1Nzk2YTVlNTUyN2Q2NmU=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NzRiOGU5YTI2MzMzZWVlMzE3Nzk0YmM4NGRlOTE0YTM2ZTk2YWM5YThlYmQz
|
14
|
-
NmNhYTMzYzMwMDE1MWJmNTZiNWQwMjc0ZTVmOWEzYzUwYzFjOGE2NzEyYjAz
|
15
|
-
YzJiMDA3NDQyODA1YTU1OWYzZGQwNzY4NTliMjhiNGZlODdkOTQ=
|
6
|
+
metadata.gz: 6c13aa6dd8cbcbc35d4fca8db098fb6c6f00c52815a090f0cce3d3e6a8e458e3977aceffe4a7fcd470c5dcef6a130bc4f8f0650634009e563a95d764b41ea07b
|
7
|
+
data.tar.gz: 0d3fda3f078eb56f0ea315fb3c1b1673a8a37a024c39dad5852bc9cc4dfcd7ed00f9b91d69c8e3346f2005673ada4c17e6db092284d46dd20688dec5dc98bda7
|
File without changes
|
data/.gitignore
CHANGED
data/Rakefile
CHANGED
@@ -1,2 +1,37 @@
|
|
1
|
-
|
1
|
+
# -* coding: utf-8 -*-
|
2
|
+
require 'rake/testtask'
|
3
|
+
require 'rake/extensiontask'
|
4
|
+
require 'rake/packagetask'
|
5
|
+
begin
|
6
|
+
require 'bundler/gem_helper' # instead of 'bundler/gem_tasks' -> need manual
|
7
|
+
# calls of install_tasks (see below)
|
8
|
+
rescue LoadError
|
9
|
+
puts 'If you want to create gem, You must install Bundler'
|
10
|
+
end
|
2
11
|
|
12
|
+
# manual calls of install_tasks to support multiple gemspec files
|
13
|
+
Bundler::GemHelper.install_tasks(name: "ruby-netcdf")
|
14
|
+
#Bundler::GemHelper.install_tasks(name: "ruby-netcdf-bigmem")
|
15
|
+
|
16
|
+
require './lib/numru/netcdf/version'
|
17
|
+
def version
|
18
|
+
NumRu::NetCDF::VERSION
|
19
|
+
end
|
20
|
+
|
21
|
+
task :default => :test
|
22
|
+
task :test => :compile
|
23
|
+
Rake::TestTask.new do |t|
|
24
|
+
t.libs << 'lib' << 'test'
|
25
|
+
t.test_files = FileList['test/*.rb']
|
26
|
+
end
|
27
|
+
|
28
|
+
Rake::ExtensionTask.new do |ext|
|
29
|
+
ext.name = 'netcdfraw'
|
30
|
+
ext.ext_dir = 'ext/numru'
|
31
|
+
ext.lib_dir = 'lib/numru'
|
32
|
+
end
|
33
|
+
|
34
|
+
Rake::PackageTask.new('ruby-netcdf', "#{version}") do |t|
|
35
|
+
t.need_tar_gz = true
|
36
|
+
t.package_files.include `git ls-files`.split("\n")
|
37
|
+
end
|
@@ -8,14 +8,14 @@ else
|
|
8
8
|
ncversion = nil
|
9
9
|
end
|
10
10
|
|
11
|
-
if Gem.respond_to?(:find_files)
|
11
|
+
if Gem.respond_to?(:find_files) and Gem.find_files("narray.h").length > 0
|
12
12
|
require "rbconfig"
|
13
13
|
so = RbConfig::CONFIG["DLEXT"]
|
14
14
|
narray_include = File.expand_path(File.dirname(Gem.find_files("narray.h")[0]))
|
15
15
|
narray_lib = File.expand_path(File.dirname(Gem.find_files("narray." + so)[0]))
|
16
16
|
else
|
17
17
|
gem_home=(`gem environment GEM_HOME`).chomp
|
18
|
-
narray_dir = Dir.glob("#{gem_home}/gems/narray
|
18
|
+
narray_dir = Dir.glob("#{gem_home}/gems/narray-*/ext/narray").sort[-1]
|
19
19
|
if narray_dir
|
20
20
|
narray_include = narray_lib = narray_dir
|
21
21
|
else
|
@@ -1153,6 +1153,30 @@ NetCDF_unlimited(VALUE file)
|
|
1153
1153
|
return Qnil;
|
1154
1154
|
}
|
1155
1155
|
}
|
1156
|
+
|
1157
|
+
#if NCVER >= 400
|
1158
|
+
|
1159
|
+
VALUE
|
1160
|
+
NetCDF_format(VALUE file)
|
1161
|
+
{
|
1162
|
+
int ncid;
|
1163
|
+
int formatp;
|
1164
|
+
int status;
|
1165
|
+
VALUE Integer;
|
1166
|
+
struct Netcdf *ncfile;
|
1167
|
+
|
1168
|
+
Data_Get_Struct(file,struct Netcdf,ncfile);
|
1169
|
+
ncid=ncfile->ncid;
|
1170
|
+
status=nc_inq_format(ncid,&formatp);
|
1171
|
+
if(status != NC_NOERR) NC_RAISE (status);
|
1172
|
+
Integer = INT2NUM(formatp);
|
1173
|
+
/* one of NC_FORMAT_CLASSIC (1), NC_FORMAT_64BIT (2), NC_FORMAT_NETCDF4 (3),
|
1174
|
+
NC_FORMAT_NETCDF4_CLASSIC (4)
|
1175
|
+
*/
|
1176
|
+
return Integer;
|
1177
|
+
}
|
1178
|
+
|
1179
|
+
#endif
|
1156
1180
|
|
1157
1181
|
VALUE
|
1158
1182
|
NetCDF_sync(VALUE file)
|
@@ -4591,6 +4615,11 @@ Init_netcdfraw(void)
|
|
4591
4615
|
rb_define_const(cNetCDF, "NC_ENDIAN_NATIVE", INT2FIX(NC_ENDIAN_NATIVE));
|
4592
4616
|
rb_define_const(cNetCDF, "NC_ENDIAN_LITTLE", INT2FIX(NC_ENDIAN_LITTLE));
|
4593
4617
|
rb_define_const(cNetCDF, "NC_ENDIAN_BIG", INT2FIX(NC_ENDIAN_BIG));
|
4618
|
+
|
4619
|
+
rb_define_const(cNetCDF, "NC_FORMAT_CLASSIC", INT2FIX(NC_FORMAT_CLASSIC));
|
4620
|
+
rb_define_const(cNetCDF, "NC_FORMAT_64BIT", INT2FIX(NC_FORMAT_64BIT));
|
4621
|
+
rb_define_const(cNetCDF, "NC_FORMAT_NETCDF4", INT2FIX(NC_FORMAT_NETCDF4));
|
4622
|
+
rb_define_const(cNetCDF, "NC_FORMAT_NETCDF4_CLASSIC", INT2FIX(NC_FORMAT_NETCDF4_CLASSIC));
|
4594
4623
|
#endif
|
4595
4624
|
|
4596
4625
|
#ifdef NARRAY_BIGMEM
|
@@ -4617,6 +4646,9 @@ Init_netcdfraw(void)
|
|
4617
4646
|
rb_define_method(cNetCDF,"ndims",NetCDF_ndims,0);
|
4618
4647
|
rb_define_method(cNetCDF,"nvars",NetCDF_nvars,0);
|
4619
4648
|
rb_define_method(cNetCDF,"natts",NetCDF_natts,0);
|
4649
|
+
#if NCVER >= 400
|
4650
|
+
rb_define_method(cNetCDF,"format",NetCDF_format,0);
|
4651
|
+
#endif
|
4620
4652
|
rb_define_method(cNetCDF,"sync",NetCDF_sync,0);
|
4621
4653
|
rb_define_method(cNetCDF,"path",NetCDF_path,0);
|
4622
4654
|
rb_define_method(cNetCDF,"dim",NetCDF_dim,1);
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'narray'
|
2
|
+
require 'numru/netcdf/version'
|
2
3
|
require 'numru/netcdfraw'
|
3
4
|
|
4
5
|
if NArray.const_defined?(:SUPPORT_BIGMEM) && NArray::SUPPORT_BIGMEM
|
@@ -34,13 +35,14 @@ module NumRu
|
|
34
35
|
def NetCDF.creation_format=(cmode)
|
35
36
|
raise("This method is available only for NetCDF >= 4") unless @@nc4
|
36
37
|
case cmode
|
37
|
-
when 0, nil, NC_CLASSIC_MODEL, /^CLASSIC$/i
|
38
|
+
when 0, nil, NC_CLASSIC_MODEL, /^CLASSIC$/i, NC_FORMAT_CLASSIC
|
39
|
+
# classic netcdf ver 3 fmt
|
38
40
|
@@cr_format = 0
|
39
|
-
when NC_64BIT_OFFSET, /^64BIT_OFFSET$/i
|
41
|
+
when NC_64BIT_OFFSET, /^64BIT_OFFSET$/i, NC_FORMAT_64BIT
|
40
42
|
@@cr_format = NC_64BIT_OFFSET
|
41
|
-
when NC_NETCDF4, /^NETCDF4$/i
|
43
|
+
when NC_NETCDF4, /^NETCDF4$/i, NC_FORMAT_NETCDF4
|
42
44
|
@@cr_format = NC_NETCDF4
|
43
|
-
when ( NC_NETCDF4 | NC_CLASSIC_MODEL), /^NETCDF4_CLASSIC$/i
|
45
|
+
when ( NC_NETCDF4 | NC_CLASSIC_MODEL), /^NETCDF4_CLASSIC$/i, NC_FORMAT_NETCDF4_CLASSIC
|
44
46
|
# NetCDF4 but disabling new data models
|
45
47
|
@@cr_format = NC_NETCDF4 | NC_CLASSIC_MODEL
|
46
48
|
else
|
@@ -57,7 +59,7 @@ module NumRu
|
|
57
59
|
"64BIT_OFFSET"
|
58
60
|
when NC_NETCDF4
|
59
61
|
"NETCDF4"
|
60
|
-
when NC_NETCDF4 | NC_CLASSIC_MODEL
|
62
|
+
when (NC_NETCDF4 | NC_CLASSIC_MODEL)
|
61
63
|
"NETCDF4_CLASSIC"
|
62
64
|
end
|
63
65
|
end
|
File without changes
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'numru/netcdf/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "ruby-netcdf-bigmem"
|
8
|
+
spec.version = NumRu::NetCDF::VERSION
|
9
|
+
spec.authors = ["Takeshi Horinouchi", "Tsuyoshi Koshiro",\
|
10
|
+
"Shigenori Otsuka", "Seiya Nishizawa", "T Sakakima"]
|
11
|
+
spec.email = ['eriko@gfd-dennou.org']
|
12
|
+
|
13
|
+
spec.summary = %q{Ruby interface to NetCDF}
|
14
|
+
spec.description = %q{RubyNetCDF is the Ruby interface to the NetCDF library built on the NArray library, which is an efficient multi-dimensional numeric array class for Ruby. This version works with Ruby2.0.}
|
15
|
+
|
16
|
+
spec.homepage = 'http://www.gfd-dennou.org/arch/ruby/products/ruby-netcdf/'
|
17
|
+
spec.licenses = ["BSD-2-Clause"]
|
18
|
+
|
19
|
+
spec.files = `git ls-files -z`.split("\x0")
|
20
|
+
spec.test_files = spec.files.grep(%r{^(test|demo)/})
|
21
|
+
spec.require_paths = ["ext","lib"]
|
22
|
+
spec.extensions << "ext/numru/extconf.rb"
|
23
|
+
|
24
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 1.8")
|
25
|
+
spec.add_runtime_dependency(%q<narray-bigmem>, [">= 0"])
|
26
|
+
spec.add_runtime_dependency(%q<narray_miss-bigmem>, [">= 0"])
|
27
|
+
|
28
|
+
end
|
data/ruby-netcdf.gemspec
CHANGED
@@ -1,34 +1,28 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'version'
|
4
|
+
require 'numru/netcdf/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "ruby-netcdf"
|
8
|
-
spec.version =
|
8
|
+
spec.version = NumRu::NetCDF::VERSION
|
9
9
|
spec.authors = ["Takeshi Horinouchi", "Tsuyoshi Koshiro",\
|
10
10
|
"Shigenori Otsuka", "Seiya Nishizawa", "T Sakakima"]
|
11
11
|
spec.email = ['eriko@gfd-dennou.org']
|
12
12
|
|
13
|
-
#if spec.respond_to?(:metadata)
|
14
|
-
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com' to prevent pushes to rubygems.org, or delete to allow pushes to any server."
|
15
|
-
#end
|
16
|
-
|
17
13
|
spec.summary = %q{Ruby interface to NetCDF}
|
18
14
|
spec.description = %q{RubyNetCDF is the Ruby interface to the NetCDF library built on the NArray library, which is an efficient multi-dimensional numeric array class for Ruby. This version works with Ruby2.0.}
|
19
15
|
|
20
16
|
spec.homepage = 'http://www.gfd-dennou.org/arch/ruby/products/ruby-netcdf/'
|
21
|
-
spec.licenses = ["
|
17
|
+
spec.licenses = ["BSD-2-Clause"]
|
22
18
|
|
23
19
|
spec.files = `git ls-files -z`.split("\x0")
|
24
20
|
spec.test_files = spec.files.grep(%r{^(test|demo)/})
|
25
|
-
|
26
|
-
|
27
|
-
spec.require_paths = ["lib"]
|
21
|
+
spec.require_paths = ["ext","lib"]
|
22
|
+
spec.extensions << "ext/numru/extconf.rb"
|
28
23
|
|
29
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 1.
|
24
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 1.8")
|
30
25
|
spec.add_runtime_dependency(%q<narray>, [">= 0"])
|
31
26
|
spec.add_runtime_dependency(%q<narray_miss>, [">= 0"])
|
32
27
|
|
33
|
-
spec.extensions << "extconf.rb"
|
34
28
|
end
|
data/test/test.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
|
1
|
+
require 'numru/netcdf'
|
2
2
|
## // to test before make install -->
|
3
|
-
require 'narray'
|
4
|
-
require '../netcdfraw'
|
5
|
-
require '../lib/netcdf'
|
3
|
+
#require 'narray'
|
4
|
+
#require '../netcdfraw'
|
5
|
+
#require '../lib/netcdf'
|
6
6
|
## <-- to test before make install //
|
7
7
|
|
8
8
|
include NumRu
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-netcdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takeshi Horinouchi
|
@@ -12,34 +12,34 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2016-09-26 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: narray
|
19
19
|
requirement: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
|
-
- -
|
21
|
+
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: '0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
|
-
- -
|
28
|
+
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: '0'
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: narray_miss
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
34
34
|
requirements:
|
35
|
-
- -
|
35
|
+
- - ">="
|
36
36
|
- !ruby/object:Gem::Version
|
37
37
|
version: '0'
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
42
|
-
- -
|
42
|
+
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '0'
|
45
45
|
description: RubyNetCDF is the Ruby interface to the NetCDF library built on the NArray
|
@@ -49,20 +49,16 @@ email:
|
|
49
49
|
- eriko@gfd-dennou.org
|
50
50
|
executables: []
|
51
51
|
extensions:
|
52
|
-
- extconf.rb
|
52
|
+
- ext/numru/extconf.rb
|
53
53
|
extra_rdoc_files: []
|
54
54
|
files:
|
55
|
-
- .
|
56
|
-
- .
|
57
|
-
- .travis.yml
|
58
|
-
- ChangeLog
|
55
|
+
- ".ChangeLog.until20150117"
|
56
|
+
- ".gitignore"
|
59
57
|
- Gemfile
|
60
58
|
- INSTALL
|
61
59
|
- LICENSE.txt
|
62
60
|
- Rakefile
|
63
61
|
- ToDo
|
64
|
-
- bin/console
|
65
|
-
- bin/setup
|
66
62
|
- demo/README
|
67
63
|
- demo/demo1-create-alt.rb
|
68
64
|
- demo/demo1-create.rb
|
@@ -76,11 +72,12 @@ files:
|
|
76
72
|
- doc/Ref_man_jp.html
|
77
73
|
- doc/Ref_man_jp.rd
|
78
74
|
- doc/to_html
|
79
|
-
- extconf.rb
|
80
|
-
-
|
81
|
-
- lib/
|
82
|
-
- lib/version.rb
|
83
|
-
-
|
75
|
+
- ext/numru/extconf.rb
|
76
|
+
- ext/numru/netcdfraw.c
|
77
|
+
- lib/numru/netcdf.rb
|
78
|
+
- lib/numru/netcdf/version.rb
|
79
|
+
- lib/numru/netcdf_miss.rb
|
80
|
+
- ruby-netcdf-bigmem.gemspec
|
84
81
|
- ruby-netcdf.gemspec
|
85
82
|
- test/aref_aset.rb
|
86
83
|
- test/char_var.rb
|
@@ -95,25 +92,26 @@ files:
|
|
95
92
|
- test/type.rb
|
96
93
|
homepage: http://www.gfd-dennou.org/arch/ruby/products/ruby-netcdf/
|
97
94
|
licenses:
|
98
|
-
-
|
95
|
+
- BSD-2-Clause
|
99
96
|
metadata: {}
|
100
97
|
post_install_message:
|
101
98
|
rdoc_options: []
|
102
99
|
require_paths:
|
100
|
+
- ext
|
103
101
|
- lib
|
104
102
|
required_ruby_version: !ruby/object:Gem::Requirement
|
105
103
|
requirements:
|
106
|
-
- -
|
104
|
+
- - ">="
|
107
105
|
- !ruby/object:Gem::Version
|
108
|
-
version: '1.
|
106
|
+
version: '1.8'
|
109
107
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
108
|
requirements:
|
111
|
-
- -
|
109
|
+
- - ">="
|
112
110
|
- !ruby/object:Gem::Version
|
113
111
|
version: '0'
|
114
112
|
requirements: []
|
115
113
|
rubyforge_project:
|
116
|
-
rubygems_version: 2.
|
114
|
+
rubygems_version: 2.2.2
|
117
115
|
signing_key:
|
118
116
|
specification_version: 4
|
119
117
|
summary: Ruby interface to NetCDF
|
data/.rspec
DELETED
data/.travis.yml
DELETED
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "ruby/netcdf"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|
data/bin/setup
DELETED