ruby-netcdf 0.6.5 → 0.6.6

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.
data/ChangeLog CHANGED
@@ -1,3 +1,10 @@
1
+ Sun Feb 19 2011 T Horinouchi
2
+ * ruby-netcdf-0.6.6 released (relase tag: ruby-netcdf-0_6_6)
3
+ * lib/netcdf.rb: method pack: debug of enbug made
4
+ when 1.1 -> 1.2 (cvs tag) commited in Jan 2010.
5
+ * netcdfraw.c: Added macro NC_RAISE2. Enhanced error
6
+ messaging in NetCDF_open and NetCDF_create to show file name.
7
+
1
8
  Thu Feb 17 2011 T Horinouchi
2
9
  * ruby-netcdf-0.6.5 released (relase tag: ruby-netcdf-0_6_5)
3
10
  Thu Feb 17 2011 T Horinouchi
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'rake/gempackagetask'
2
2
 
3
3
  NAME = 'ruby-netcdf'
4
- VER = '0.6.5'
4
+ VER = '0.6.6'
5
5
 
6
6
  PKG_FILES = FileList[
7
7
  '**',
@@ -14,14 +14,15 @@ PKG_FILES = FileList[
14
14
  spec = Gem::Specification.new do |s|
15
15
  s.name = NAME
16
16
  s.version = VER
17
- s.authors = ['T. Horinouchi','T. Sakakima',\
18
- 'GFD Dennou Club' ]
19
- s.email = 'eriko@gfd-dennou.org'
17
+ s.authors = ["Takeshi Horinouchi", "Tsuyoshi Koshiro",\
18
+ "Shigenori Otsuka", "Seiya Nishizawa", "T Sakakima"]
19
+ s.email = ['eriko@gfd-dennou.org']
20
20
  s.homepage = 'http://www.gfd-dennou.org/arch/ruby/products/ruby-netcdf/'
21
21
  s.licenses = ["GFD Dennou Club"]
22
22
  s.platform = Gem::Platform::RUBY
23
- s.summary = 'Ruby interface to NetCDF'
24
- s.description = '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.'
23
+ s.summary = %q{Ruby interface to NetCDF}
24
+ s.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.}
25
+
25
26
  s.files = PKG_FILES.to_a
26
27
  s.require_paths = ['lib']
27
28
  s.test_files = Dir.glob("test/*")
data/extconf.rb CHANGED
@@ -39,7 +39,7 @@ if File.directory?("/usr/include/netcdf") #-- for Vine linux
39
39
  $CFLAGS += ' ' + cflags
40
40
  $LOCAL_LIBS += ' ' + libs
41
41
  end
42
-
42
+
43
43
  if (enable_config('opendap',true) && ( xsystem("opendap-config --libs") ||
44
44
  xsystem("ncdap-config --libs") ) )
45
45
 
@@ -318,6 +318,7 @@ module NumRu
318
318
  if self.typecode <= NArray::LINT
319
319
  packed = packed.round
320
320
  end
321
+ packed
321
322
  end
322
323
  end
323
324
 
@@ -203,6 +203,7 @@
203
203
  }
204
204
 
205
205
  #define NC_RAISE(status) rb_raise(err_status2class(status),(nc_strerror(status)))
206
+ #define NC_RAISE2(status, str) rb_raise(err_status2class(status),"%s (%s)",nc_strerror(status),(str) )
206
207
 
207
208
  static VALUE mNumRu = 0;
208
209
  static VALUE cNetCDF;
@@ -1033,7 +1034,7 @@ NetCDF_open(VALUE mod,VALUE filename,VALUE omode)
1033
1034
  c_omode=NUM2INT(omode);
1034
1035
 
1035
1036
  status = nc_open(c_filename,c_omode,&ncid);
1036
- if(status !=NC_NOERR){NC_RAISE(status);}
1037
+ if(status !=NC_NOERR){NC_RAISE2(status,c_filename);}
1037
1038
 
1038
1039
  ncfile = NetCDF_init(ncid,c_filename);
1039
1040
  retval = Data_Wrap_Struct(cNetCDF,0,NetCDF_free,ncfile);
@@ -1056,7 +1057,7 @@ NetCDF_create(VALUE mod,VALUE filename,VALUE cmode)
1056
1057
  c_cmode=NUM2INT(cmode);
1057
1058
 
1058
1059
  status = nc_create(c_filename,c_cmode,&ncid);
1059
- if(status != NC_NOERR) NC_RAISE(status);
1060
+ if(status != NC_NOERR) NC_RAISE2(status, c_filename);
1060
1061
 
1061
1062
  ncfile = NetCDF_init(ncid,c_filename);
1062
1063
  return( Data_Wrap_Struct(cNetCDF,0,NetCDF_free,ncfile) );
metadata CHANGED
@@ -1,23 +1,25 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-netcdf
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
5
- prerelease:
4
+ hash: 11
5
+ prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 5
10
- version: 0.6.5
9
+ - 6
10
+ version: 0.6.6
11
11
  platform: ruby
12
12
  authors:
13
- - T. Horinouchi
14
- - T. Sakakima
15
- - GFD Dennou Club
13
+ - Takeshi Horinouchi
14
+ - Tsuyoshi Koshiro
15
+ - Shigenori Otsuka
16
+ - Seiya Nishizawa
17
+ - T Sakakima
16
18
  autorequire:
17
19
  bindir: bin
18
20
  cert_chain: []
19
21
 
20
- date: 2011-03-08 00:00:00 +09:00
22
+ date: 2012-02-20 00:00:00 +09:00
21
23
  default_executable:
22
24
  dependencies:
23
25
  - !ruby/object:Gem::Dependency
@@ -49,7 +51,8 @@ dependencies:
49
51
  type: :runtime
50
52
  version_requirements: *id002
51
53
  description: 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.
52
- email: eriko@gfd-dennou.org
54
+ email:
55
+ - eriko@gfd-dennou.org
53
56
  executables: []
54
57
 
55
58
  extensions:
@@ -57,40 +60,38 @@ extensions:
57
60
  extra_rdoc_files: []
58
61
 
59
62
  files:
60
- - INSTALL
61
- - LICENSE.txt
62
- - ChangeLog
63
63
  - netcdfraw.c
64
64
  - Rakefile
65
- - extconf.rb.rej
66
- - extconf.rb.orig
65
+ - LICENSE.txt
66
+ - ChangeLog
67
67
  - extconf.rb
68
68
  - ToDo
69
- - lib/netcdf.rb
69
+ - INSTALL
70
70
  - lib/netcdf_miss.rb
71
- - demo/demo2-graphic.rb
72
- - demo/demo4-copy.rb
73
- - demo/demo1-create-alt.rb
71
+ - lib/netcdf.rb
72
+ - demo/demo3-ncepclim.rb
74
73
  - demo/README
75
74
  - demo/demo1-create.rb
76
- - demo/demo3-ncepclim.rb
75
+ - demo/demo4-copy.rb
76
+ - demo/demo2-graphic.rb
77
+ - demo/demo1-create-alt.rb
78
+ - doc/Ref_man_jp.rd
79
+ - doc/Ref_man.rd
77
80
  - doc/Ref_man_jp.html
78
81
  - doc/to_html
79
- - doc/Ref_man.html
80
- - doc/Ref_man.rd
81
- - doc/Ref_man_jp.rd
82
82
  - doc/README_JP.txt
83
- - test/def_var_with_dim.rb
83
+ - doc/Ref_man.html
84
+ - test/create_tmp.rb
84
85
  - test/putatt.rb
85
- - test/type.rb
86
- - test/test.cdl
87
86
  - test/char_var.rb
88
- - test/test.rb
89
- - test/putatt.cdl
90
- - test/aref_aset.rb
91
87
  - test/clone.rb
88
+ - test/def_var_with_dim.rb
89
+ - test/aref_aset.rb
90
+ - test/type.rb
91
+ - test/test.rb
92
92
  - test/factor_offset.rb
93
- - test/create_tmp.rb
93
+ - test/test.cdl
94
+ - test/putatt.cdl
94
95
  has_rdoc: true
95
96
  homepage: http://www.gfd-dennou.org/arch/ruby/products/ruby-netcdf/
96
97
  licenses:
@@ -122,19 +123,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
123
  requirements: []
123
124
 
124
125
  rubyforge_project:
125
- rubygems_version: 1.4.1
126
+ rubygems_version: 1.3.7
126
127
  signing_key:
127
128
  specification_version: 3
128
129
  summary: Ruby interface to NetCDF
129
130
  test_files:
130
- - test/def_var_with_dim.rb
131
+ - test/create_tmp.rb
131
132
  - test/putatt.rb
132
- - test/type.rb
133
- - test/test.cdl
134
133
  - test/char_var.rb
135
- - test/test.rb
136
- - test/putatt.cdl
137
- - test/aref_aset.rb
138
134
  - test/clone.rb
135
+ - test/def_var_with_dim.rb
136
+ - test/aref_aset.rb
137
+ - test/type.rb
138
+ - test/test.rb
139
139
  - test/factor_offset.rb
140
- - test/create_tmp.rb
140
+ - test/test.cdl
141
+ - test/putatt.cdl
@@ -1,124 +0,0 @@
1
- require "mkmf"
2
-
3
- dir_config('narray',$sitearchdir,$sitearchdir)
4
- dir_config('netcdf','/usr/local')
5
-
6
- if ( ! ( have_header("narray.h") && have_header("narray_config.h") ) ) then
7
- print <<EOS
8
- ** configure error **
9
- Header narray.h or narray_config.h is not found. If you have these files in
10
- /narraydir/include, try the following:
11
-
12
- % ruby extconf.rb --with-narray-include=/narraydir/include
13
-
14
- EOS
15
- exit(-1)
16
- end
17
-
18
- if xsystem("ncdap-config --libs")
19
- libncdods = "nc-dap"
20
- cflags = `ncdap-config --cflags`.gsub(/\n/, " ")
21
- libs = `ncdap-config --libs`.gsub(/\n/, " ")
22
- prefix_dods = `ncdap-config --prefix`.gsub(/\n/, "")
23
- elsif xsystem("opendap-config --libs")
24
- libncdods = "nc-dods"
25
- cflags = `opendap-config --cflags`.gsub(/\n/, " ")
26
- libs = `opendap-config --libs-nc`.gsub(/\n/, " ")
27
- prefix_dods = `opendap-config --prefix`.gsub(/\n/, "")
28
- end
29
-
30
- if (enable_config('opendap',true) && ( xsystem("opendap-config --libs") ||
31
- xsystem("ncdap-config --libs") ) )
32
-
33
- dir_config(libncdods,prefix_dods)
34
-
35
- if (!have_library(libncdods))
36
- print <<-EOS
37
- ** ERROR ** Library not found: nc-dods (OPeNDAP/DODS-enabled NetCDF lib)
38
- Install it, or run extconf.rb with option --disable-opendap.
39
- ^^^^^^^^^^^^^^^^^
40
- EOS
41
- exit(-1)
42
- else
43
- print <<-EOS
44
- ** Message ** Compiling with OPeNDAP/DODS-enabled NetCDF library.
45
-
46
- This is because the command opendap-config is found in your system.
47
- If you want to use the ordinary (non-DODS) version of NetCDF,
48
- run extconf.rb with option --disable-opendap.
49
- ^^^^^^^^^^^^^^^^^
50
- EOS
51
- end
52
-
53
- $CFLAGS += ' '+cflags
54
- $LOCAL_LIBS += ' ' + libs
55
-
56
- # non portable treatments: should be improved (by Horinouchi)
57
- CONFIG['LDSHARED'].sub!(/gcc/,'g++')
58
- $LIBS.sub!(/-lc\s/,'') ; $LIBS.sub!(/-lc$/,'')
59
- print <<-EOS
60
- ** Warning ** non-portable treatments are made,
61
- which was sucessfull redhat linux 9:
62
- * gcc was replaced with g++ in CONFIG['LDSHARED']
63
- * -lc library was removed if in $LIBS
64
-
65
- EOS
66
- # p '@@@'
67
- # ary = []
68
- # CONFIG.each{|k,v| ary.push([k,v])}
69
- # ary.sort.each{|x| p x}
70
- else
71
- if xsystem("nc-config --libs") # for NetCDF 4
72
- cflags = `nc-config --cflags`.gsub(/\n/, " ")
73
- libs = `nc-config --libs`.gsub(/\n/, " ")
74
- prefix_nc = `nc-config --prefix`.gsub(/\n/, "")
75
-
76
- dir_config("netcdf",prefix_nc)
77
- $CFLAGS += ' ' + cflags
78
- $LOCAL_LIBS += ' ' + libs
79
- end
80
- if ( ! ( have_header("netcdf.h") && have_library("netcdf") ) )then
81
- print <<-EOS
82
- ** configure error **
83
- Header netcdf.h or the compiled netcdf library is not found.
84
- If you have the library installed under /netcdfdir (that is, netcdf.h is
85
- in /netcdfdir/include and the library in /netcdfdir/lib/),
86
- try the following:
87
-
88
- % ruby extconf.rb --with-netcdf-dir=/netcdfdir
89
-
90
- Alternatively, you can specify the two directory separately
91
- with --with-netcdf-include and --with-netcdf-lib.
92
- EOS
93
- exit(-1)
94
- end
95
- end
96
-
97
- if /cygwin|mingw/ =~ RUBY_PLATFORM
98
- have_library("narray") || raise("ERROR: narray library is not found")
99
- end
100
-
101
- create_makefile "numru/netcdfraw"
102
-
103
- ###### Modify Makefile: #######
104
- File.rename("Makefile","Makefile.orig")
105
- oldmkfl = File.open("Makefile.orig")
106
- newmkfl = File.open("Makefile","w")
107
- oldmkfl.each_line{ |line|
108
- case(line)
109
- when /^distclean:/
110
- newmkfl.puts(line)
111
- newmkfl.puts("\t\t@$(RM) *.nc demo/*.nc demo/*~ lib/*~ doc/*~ test/*.nc test/*~ Makefile.orig")
112
- when /^all:/
113
- newmkfl.puts(line)
114
- newmkfl.puts("")
115
- newmkfl.puts("test: all") # insert the "test" target
116
- newmkfl.puts("\t\t@cd test && ruby test.rb && echo 'test did not fail :-p (please ignore the warnings)' && cd ..")
117
- when /lib\/netcdf/
118
- line = line.chomp! + "/"
119
- newmkfl.puts(line)
120
- else
121
- newmkfl.puts(line)
122
- end
123
- }
124
- newmkfl.close
@@ -1,16 +0,0 @@
1
- --- extconf.rb 2011-02-04 13:30:55.000000000 +0900
2
- +++ extconf.rb 2011-02-14 15:57:48.000000000 +0900
3
- @@ -33,6 +39,13 @@
4
- prefix_dods = `opendap-config --prefix`.gsub(/\n/, "")
5
- end
6
-
7
- +if File.directory?("/usr/include/netcdf") #-- for Vine linux
8
- + cflags = "-I/usr/include/netcdf"
9
- + libs = "-L/usr/lib"
10
- + $CFLAGS += ' ' + cflags
11
- + $LOCAL_LIBS += ' ' + libs
12
- +end
13
- +
14
- if (enable_config('opendap',true) && ( xsystem("opendap-config --libs")) ||
15
- xsystem("ncdap-config --libs") )
16
-