ruby-netcdf 0.6.6.1 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ Y2Q5ZDhkZjJlYzY5YTU3YTE3YWMxMDZmMWRmMDI2MjZlY2NlNTI0Yg==
5
+ data.tar.gz: !binary |-
6
+ ZjMwMWY1OTU2ZmVlZjlmNTA1ZThmMTE2NjIyNzBmYTk4YzA5NTYwZg==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZGRiYmVjYjIxNDg3OWVlNWRjZmFkZjJkYzVhZTExNGE5MjhmNzhmMGIwYjli
10
+ NjdmNjk3Yjc5Y2FkMjljNDcwMTgyYjE4ZjViMTQ5MTc1MjU2MTUxMDI4ZWJj
11
+ MzcwNTk3Y2NjOGQ1NDg4MDk3Nzg1Y2VkNTg1YmIxMmY1YmFiZjY=
12
+ data.tar.gz: !binary |-
13
+ M2JlNWVhZTYyNDQwYjQxNjk3MWQ2MTQzYTA4NWZiNWNmNTY2ZWQzNjdjYWJi
14
+ ODc3MDUyZjcxNDQ1YjA1OWZjYmY3NGUyNzZmNTRhNjI1MjcxZGVkZmFlZGY0
15
+ OWZhZjY5ZjdlN2IzN2RhN2NlODYxYmQ0OTg4YzAxNDZkMDk0OTE=
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
data/ChangeLog CHANGED
@@ -1,3 +1,54 @@
1
+ Tue Jan 27 2015 T Horinouchi
2
+ * ruby-netcdf-0.7.1 released (relase tag: ruby-netcdf-0_7_1)
3
+ Tue Jan 27 2015 T Horinouchi
4
+ * doc/ updated
5
+ * demo/demo5-netcdf4.rb: created
6
+ * netcdfraw.c:
7
+ * added new NetCDF-4 methods:
8
+ * NetCDFVar::deflate : to set compression
9
+ * NetCDFVar::deflate_params : returns current values of
10
+ compression parameters
11
+ * NetCDFVar::endian= : set (change) the endian
12
+ * NetCDFVar::endian : returns the current endian setting
13
+ * added new constants: NC_ENDIAN_NATIVE (=0),
14
+ NC_ENDIAN_LITTLE (=1), NC_ENDIAN_BIG (=2)
15
+ * updated the safe-level condition, which was missed in the
16
+ change on Jan 22.
17
+ Fri Jan 23 2015 T Horinouchi
18
+ * doc/ updated
19
+ Thu Jan 22 2015 T Horinouchi
20
+ * ruby-netcdf-0.7.0 released (relase tag: ruby-netcdf-0_7_0)
21
+ Thu Jan 22 2015 T Horinouchi
22
+ * netcdfraw.c:
23
+ * revised based on the patch posted by seiya with
24
+ [dennou-ruby:003705] but adopted the typedef in the latest
25
+ narray-bigmem (namely, used na_shape_t).
26
+ * changed rb_secure(4) to rb_secure(3), since security
27
+ level 4 is abolished in ruby 2.
28
+ * further type update to na_shape_t (not covered
29
+ by the patch)
30
+ * deleted the unused variable nc_tlen in many methods.
31
+ * lib/netcdf.rb: revised along the patch [dennou-ruby:003705].
32
+ * extconf.rb: supported to configure gem-installed narray
33
+ Mon Sep 8 2014 T Horinouchi
34
+ * lib/netcdf.rb: Tentative treatment of the very slow netcdf-4's
35
+ strided reading.
36
+ Sat Sep 6 2014 T Horinouchi
37
+ * netcdfraw.c: Added constants such as NC_NETCDF4;
38
+ This enables one to individually specify the creation format by
39
+ using the low level interface NetCDF.nc_create
40
+ * lib/netcdf.rb: Supported the "default" file creation format
41
+ by adding NetCDF.creation_format= and NetCDF.creation_format.
42
+ * lib/netcdf.rb: Refactoring of NetCDF#simple_get.
43
+ Sat Sep 6 2014 T Horinouchi
44
+ * extconf.rb
45
+ * introduced the macro NCVER
46
+ * changed to give a higer priority to NetCDF 4;
47
+ * added $vendorarchdir to dir_config
48
+ * netcdfraw.c: Added the class method NetCDF.libvers (<- nc_inq_libvers)
49
+ * lib/netcdf.rb: Added the class constant NCVERSION (<- NetCDF.libvers)
50
+ Mon Aug 25 2014 T Horinouchi
51
+ * netcdfraw.c: to avoid a compile error when -Werror=format-security
1
52
  Sun Feb 19 2011 T Horinouchi
2
53
  * ruby-netcdf-0.6.6 released (relase tag: ruby-netcdf-0_6_6)
3
54
  * lib/netcdf.rb: method pack: debug of enbug made
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in ruby-netcdf.gemspec
4
+ gemspec
data/Rakefile CHANGED
@@ -1,41 +1,2 @@
1
- require 'rake/gempackagetask'
1
+ require "bundler/gem_tasks"
2
2
 
3
- NAME = 'ruby-netcdf'
4
- VER = '0.6.6.1'
5
-
6
- PKG_FILES = FileList[
7
- '**',
8
- 'lib/**/*',
9
- 'demo/**/*',
10
- 'doc/**/*',
11
- 'test/**/*'
12
- ]
13
-
14
- spec = Gem::Specification.new do |s|
15
- s.name = NAME
16
- s.version = VER
17
- s.authors = ["Takeshi Horinouchi", "Tsuyoshi Koshiro",\
18
- "Shigenori Otsuka", "Seiya Nishizawa", "T Sakakima"]
19
- s.email = ['eriko@gfd-dennou.org']
20
- s.homepage = 'http://www.gfd-dennou.org/arch/ruby/products/ruby-netcdf/'
21
- s.licenses = ["GFD Dennou Club"]
22
- s.platform = Gem::Platform::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
-
26
- s.files = PKG_FILES.to_a
27
- s.require_paths = ['lib']
28
- s.test_files = Dir.glob("test/*")
29
- s.has_rdoc = true
30
- s.required_ruby_version = Gem::Requirement.new(">= 1.6")
31
- s.add_runtime_dependency(%q<narray>, [">= 0"])
32
- s.add_runtime_dependency(%q<narray_miss>, [">= 0"])
33
- #s.extra_rdoc_files = ['README']
34
-
35
- s.extensions << "extconf.rb"
36
- end
37
-
38
- Rake::GemPackageTask.new(spec) do |pkg|
39
- pkg.gem_spec = spec
40
- pkg.need_tar = true
41
- end
@@ -0,0 +1,14 @@
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
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,44 @@
1
+ require "numru/netcdf"
2
+ include NumRu
3
+
4
+ file3 = NetCDF.create("test_nc3.nc")
5
+
6
+ NetCDF.creation_format = ( NetCDF::NC_NETCDF4 | NetCDF::NC_CLASSIC_MODEL )
7
+ file4 = NetCDF.create("test_nc4.nc")
8
+
9
+ nx, ny = 100, 50
10
+
11
+ [ file3, file4 ].each do |file|
12
+ xdim = file.def_dim("x",nx)
13
+ ydim = file.def_dim("y",ny)
14
+ x = file.def_var("x","sfloat",[xdim])
15
+ y = file.def_var("y","sfloat",[ydim])
16
+
17
+ v1 = file.def_var("v1","sfloat",[xdim,ydim])
18
+ v2 = file.def_var("v2","int",[xdim,ydim])
19
+
20
+ if /nc4/ =~ file.path
21
+ v1.deflate(2) # set the deflation (compression) level 2
22
+ v2.deflate(2,true) # set the deflation level 2 with the shuffle filter
23
+
24
+ puts "v1 deflate params:"
25
+ p v1.deflate_params
26
+ puts "v2 deflate params:"
27
+ p v2.deflate_params
28
+ end
29
+
30
+ file.enddef
31
+
32
+ x.put( NArray.float(nx).indgen! )
33
+ y.put( NArray.float(ny).indgen! )
34
+
35
+ z = NArray.float(nx,ny).indgen! + 1000000
36
+ z[true,ny/2..-1] = 0 # to see the impac
37
+
38
+ v1.put(z)
39
+ v2.put(z)
40
+ file.close
41
+ end
42
+
43
+ puts "Created test_nc3.nc test_nc4.nc.", "File size comparison:"
44
+ print `ls -l test_nc3.nc test_nc4.nc`
@@ -4,15 +4,16 @@
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
5
  <html xmlns="http://www.w3.org/1999/xhtml">
6
6
  <head>
7
- <title>Ref_man.rd</title>
7
+ <title>Untitled</title>
8
8
  </head>
9
9
  <body>
10
- <h1><a name="label:0" id="label:0">RubyNetCDF Reference Manual</a></h1><!-- RDLabel: "RubyNetCDF Reference Manual" -->
10
+ <h1><a name="label-0" id="label-0">RubyNetCDF Reference Manual</a></h1><!-- RDLabel: "RubyNetCDF Reference Manual" -->
11
+ <p>RubyNetCDF version : 0.7.1</p>
11
12
  <ul>
12
- <li><a href="#label:9">Method Index</a></li>
13
+ <li><a href="#label-9">Method Index</a></li>
13
14
  </ul>
14
15
  <p>---------------------------------------------</p>
15
- <h2><a name="label:1" id="label:1">Overview</a></h2><!-- RDLabel: "Overview" -->
16
+ <h2><a name="label-1" id="label-1">Overview</a></h2><!-- RDLabel: "Overview" -->
16
17
  <p>RubyNetCDF is the Ruby interface of the NetCDF library. Ruby is a free
17
18
  object-oriented scripting language and is freely available from
18
19
  <a href="http://www.ruby-lang.org/">the Ruby homepage</a>.
@@ -26,26 +27,28 @@ tests suggests that NArray is more efficient than NumPy.
26
27
  Optionally, RubyNetCDF offers methods to handle data missing
27
28
  automatically. To use it, you will also
28
29
  need <a href="http://ruby.gfd-dennou.org/products/narray_miss/">NArrayMiss</a>.
29
- See <a href="#label:6">Usage</a> for details.</p>
30
- <h3><a name="label:2" id="label:2">Structure</a></h3><!-- RDLabel: "Structure" -->
30
+ See <a href="#label-6">Usage</a> for details.</p>
31
+ <p>Currently, NetCDF-4 support is partial (the new data models have not been
32
+ supported).</p>
33
+ <h3><a name="label-2" id="label-2">Structure</a></h3><!-- RDLabel: "Structure" -->
31
34
  <p>RubyNetCDF consists of the four classes in the following.</p>
32
35
  <ul>
33
- <li><p><a href="#label:10">class NetCDF</a> -- the file class</p>
36
+ <li><p><a href="#label-10">class NetCDF</a> -- the file class</p>
34
37
  <p>An NetCDF object represents a NetCDF file</p></li>
35
- <li><p><a href="#label:43">class NetCDFDim</a> -- the dimension class</p>
38
+ <li><p><a href="#label-47">class NetCDFDim</a> -- the dimension class</p>
36
39
  <p>Although in its C version a NetCDF dimension is represented by a
37
40
  combination of a file ID and a dimension ID, it is represented by
38
41
  only one NetCDFDim object in RubyNetCDF.</p></li>
39
- <li><p><a href="#label:51">class NetCDFVar</a> -- the variable class</p>
42
+ <li><p><a href="#label-55">class NetCDFVar</a> -- the variable class</p>
40
43
  <p>Although in its C version a NetCDF variable is represented by a
41
44
  combination of a file ID and a variable ID, it is represented by
42
45
  only one NetCDFVar object in RubyNetCDF.</p></li>
43
- <li><p><a href="#label:90">class NetCDFAtt</a> -- the attribute class</p>
46
+ <li><p><a href="#label-98">class NetCDFAtt</a> -- the attribute class</p>
44
47
  <p>Although in its C version a NetCDF attribute is represented by a
45
48
  combination of file ID, variable ID, and its name, it is represented
46
49
  by only one NetCDFAtt object in RubyNetCDF.</p></li>
47
50
  </ul>
48
- <h3><a name="label:3" id="label:3">Data type</a></h3><!-- RDLabel: "Data type" -->
51
+ <h3><a name="label-3" id="label-3">Data type</a></h3><!-- RDLabel: "Data type" -->
49
52
  <p>All the NetCDF variable types char, byte, short, int, float, and
50
53
  double are supported in this Ruby interface. These types are called,
51
54
  however, differently in it to adhere to the convention of Ruby, or,
@@ -62,15 +65,15 @@ the same type as in the file, except for the "char" type which is read
62
65
  into a "byte". This is because NArray does not have a "char" type.
63
66
  However, it not is not supposed to be a problem, since a byte NArray
64
67
  can easily handle string data.</p>
65
- <h3><a name="label:4" id="label:4">Error handling</a></h3><!-- RDLabel: "Error handling" -->
68
+ <h3><a name="label-4" id="label-4">Error handling</a></h3><!-- RDLabel: "Error handling" -->
66
69
  <p>Errors are basically handled by raising exceptions. However, light
67
70
  errors in value-returning methods are handled by returning nil (e.g.,
68
71
  if a non-existent attribute name is specified in attribute reading).
69
72
  Those methods that return nil on error are explicitly written as such
70
73
  in the following.</p>
71
- <h3><a name="label:5" id="label:5">Security features</a></h3><!-- RDLabel: "Security features" -->
74
+ <h3><a name="label-5" id="label-5">Security features</a></h3><!-- RDLabel: "Security features" -->
72
75
  <p>Security handling is done just as in the pre-defined File class.</p>
73
- <h3><a name="label:6" id="label:6">Usage</a></h3><!-- RDLabel: "Usage" -->
76
+ <h3><a name="label-6" id="label-6">Usage</a></h3><!-- RDLabel: "Usage" -->
74
77
  <p>To use the RubyNetCDF library, load the library first by placing the
75
78
  following line in your Ruby program to load the library:</p>
76
79
  <pre>require 'numru/netcdf'</pre>
@@ -105,9 +108,9 @@ file = NetCDF.create('tmp.nc')
105
108
  <p>For more examples, see demo and test programs included in the
106
109
  distribution package.</p>
107
110
  <p>---------------------------------------------</p>
108
- <h2><a name="label:7" id="label:7">How to read this manual</a></h2><!-- RDLabel: "How to read this manual" -->
111
+ <h2><a name="label-7" id="label-7">How to read this manual</a></h2><!-- RDLabel: "How to read this manual" -->
109
112
  <dl>
110
- <dt><h4><a name="label:8" id="label:8"><code>method_name(<var>argument1</var>, <var>argument2</var>, ...) -- <var>arguments</var> <var>that</var> <var>can</var> <var>be</var> <var>omitted</var> <var>are</var> <var>expressed</var> <var>as</var> <var>Argument_name</var>=<var>Default_value</var></code></a></h4></dt><!-- RDLabel: "method_name" -->
113
+ <dt><h4><a name="label-8" id="label-8"><code>method_name(<var>argument1</var>, <var>argument2</var>, ...) -- <var>arguments</var> <var>that</var> <var>can</var> <var>be</var> <var>omitted</var> <var>are</var> <var>expressed</var> <var>as</var> <var>Argument_name</var>=<var>Default_value</var></code></a></h4></dt><!-- RDLabel: "method_name" -->
111
114
  <dd>
112
115
  <p>Explanation of its function</p>
113
116
  <p>Arguments</p>
@@ -128,120 +131,158 @@ distribution package.</p>
128
131
  </ul></dd>
129
132
  </dl>
130
133
  <p>---------------------------------------------</p>
131
- <h2><a name="label:9" id="label:9">Method Index</a></h2><!-- RDLabel: "Method Index" -->
134
+ <h2><a name="label-9" id="label-9">Method Index</a></h2><!-- RDLabel: "Method Index" -->
132
135
  <ul>
133
- <li><p><a href="#label:10">class NetCDF</a></p>
136
+ <li><p><a href="#label-10">class NetCDF</a></p>
134
137
  <p>Class Methods</p>
135
138
  <ul>
136
- <li><a href="#label:12">NetCDF.open</a> Opens a file (class method). If mode="w" and non-existent, a new</li>
137
- <li><a href="#label:13">NetCDF.new</a> Aliased to NetCDF.open</li>
138
- <li><a href="#label:14">NetCDF.create</a> Creates a NetCDF file (class method)</li>
139
- <li><a href="#label:15">NetCDF.create_tmp</a> Creates a temporary NetCDF file (class method)</li>
139
+ <li><a href="#label-13">NetCDF.nc4?</a> returens wheather the linked library is NetCDF-4 (true/false)</li>
140
+ <li><a href="#label-14">NetCDF.creation_format=</a> Set the file format created by NetCDF.create (for NetCDF-4 only).</li>
141
+ <li><a href="#label-15">NetCDF.creation_format</a> Returns the current setting of the creation format (for NetCDF-4 only).</li>
142
+ <li><a href="#label-16">NetCDF.open</a> Opens a file (class method). If mode="w" and non-existent, a new</li>
143
+ <li><a href="#label-17">NetCDF.new</a> Aliased to NetCDF.open</li>
144
+ <li><a href="#label-18">NetCDF.create</a> Creates a NetCDF file (class method)</li>
145
+ <li><a href="#label-19">NetCDF.create_tmp</a> Creates a temporary NetCDF file (class method)</li>
140
146
  </ul>
141
147
  <p>Instance Methods</p>
142
148
  <ul>
143
- <li><a href="#label:17">close</a> Closes the file.</li>
144
- <li><a href="#label:18">ndims</a> Returns the number of dimensions in the file</li>
145
- <li><a href="#label:19">nvars</a> Returns the number of variables in the file</li>
146
- <li><a href="#label:20">natts</a> Returns the number of global attributes in the file</li>
147
- <li><a href="#label:21">unlimited</a> Returns the unlimited dimension in the file</li>
148
- <li><a href="#label:22">path</a> Returns the path of the file (contents of the filename specified when opened/created)</li>
149
- <li><a href="#label:23">redef</a> Switches to the define mode. Does nothing if already in it (nil returned).</li>
150
- <li><a href="#label:24">enddef</a> Switches to the data mode. Does nothing if already in it (nil returned).</li>
151
- <li><a href="#label:25">define_mode?</a> Inquire whether the file is in the define mode.</li>
152
- <li><a href="#label:26">sync</a> Synchronizes the disk copy of a netCDF dataset with in-memory buffer</li>
153
- <li><a href="#label:27">def_dim</a> Define a dimension</li>
154
- <li><a href="#label:28">put_att</a> Sets a global attribute</li>
155
- <li><a href="#label:29">def_var</a> Defines a variable</li>
156
- <li><a href="#label:30">def_var_with_dim</a> Same as def_var but defines dimensions first if needed</li>
157
- <li><a href="#label:31">var</a> Opens an existing variable in the file</li>
158
- <li><a href="#label:32">vars</a> Opens existing variables in the file</li>
159
- <li><a href="#label:33">dim</a> Opens an existing dimension in the file</li>
160
- <li><a href="#label:34">dims</a> Opens existing dimensions in the file</li>
161
- <li><a href="#label:35">att</a> Opens an existing global attribute in the file</li>
162
- <li><a href="#label:36">fill=</a> Sets a fill mode. (Default behavior of NetCDF is FILL.)</li>
163
- <li><a href="#label:37">each_dim</a> Iterator regarding the dimensions in the file.</li>
164
- <li><a href="#label:38">each_var</a> Iterator regarding the variables in the file.</li>
165
- <li><a href="#label:39">each_att</a> Iterator regarding the global attributes of the file.</li>
166
- <li><a href="#label:40">dim_names</a> Returns the names of all dimensions in the file</li>
167
- <li><a href="#label:41">var_names</a> Returns the names of all variables in the file</li>
168
- <li><a href="#label:42">att_names</a> Returns the names of all the global attributes of the file</li>
149
+ <li><a href="#label-21">close</a> Closes the file.</li>
150
+ <li><a href="#label-22">ndims</a> Returns the number of dimensions in the file</li>
151
+ <li><a href="#label-23">nvars</a> Returns the number of variables in the file</li>
152
+ <li><a href="#label-24">natts</a> Returns the number of global attributes in the file</li>
153
+ <li><a href="#label-25">unlimited</a> Returns the unlimited dimension in the file</li>
154
+ <li><a href="#label-26">path</a> Returns the path of the file (contents of the filename specified when opened/created)</li>
155
+ <li><a href="#label-27">redef</a> Switches to the define mode. Does nothing if already in it (nil returned).</li>
156
+ <li><a href="#label-28">enddef</a> Switches to the data mode. Does nothing if already in it (nil returned).</li>
157
+ <li><a href="#label-29">define_mode?</a> Inquire whether the file is in the define mode.</li>
158
+ <li><a href="#label-30">sync</a> Synchronizes the disk copy of a netCDF dataset with in-memory buffer</li>
159
+ <li><a href="#label-31">def_dim</a> Define a dimension</li>
160
+ <li><a href="#label-32">put_att</a> Sets a global attribute</li>
161
+ <li><a href="#label-33">def_var</a> Defines a variable</li>
162
+ <li><a href="#label-34">def_var_with_dim</a> Same as def_var but defines dimensions first if needed</li>
163
+ <li><a href="#label-35">var</a> Opens an existing variable in the file</li>
164
+ <li><a href="#label-36">vars</a> Opens existing variables in the file</li>
165
+ <li><a href="#label-37">dim</a> Opens an existing dimension in the file</li>
166
+ <li><a href="#label-38">dims</a> Opens existing dimensions in the file</li>
167
+ <li><a href="#label-39">att</a> Opens an existing global attribute in the file</li>
168
+ <li><a href="#label-40">fill=</a> Sets a fill mode. (Default behavior of NetCDF is FILL.)</li>
169
+ <li><a href="#label-41">each_dim</a> Iterator regarding the dimensions in the file.</li>
170
+ <li><a href="#label-42">each_var</a> Iterator regarding the variables in the file.</li>
171
+ <li><a href="#label-43">each_att</a> Iterator regarding the global attributes of the file.</li>
172
+ <li><a href="#label-44">dim_names</a> Returns the names of all dimensions in the file</li>
173
+ <li><a href="#label-45">var_names</a> Returns the names of all variables in the file</li>
174
+ <li><a href="#label-46">att_names</a> Returns the names of all the global attributes of the file</li>
169
175
  </ul></li>
170
- <li><p><a href="#label:43">class NetCDFDim</a></p>
176
+ <li><p><a href="#label-47">class NetCDFDim</a></p>
171
177
  <p>Class Methods</p>
172
178
  <p>Instance Methods</p>
173
179
  <ul>
174
- <li><a href="#label:46">length</a> Returns the length of the dimension</li>
175
- <li><a href="#label:47">length_ul0</a> Same as length but returns 0 for the unlimited dimension</li>
176
- <li><a href="#label:48">name=</a> Rename the dimension</li>
177
- <li><a href="#label:49">name</a> Returns the name of the dimension</li>
178
- <li><a href="#label:50">unlimited?</a> Inquires whether the dimension is unlimited or not</li>
180
+ <li><a href="#label-50">length</a> Returns the length of the dimension</li>
181
+ <li><a href="#label-51">length_ul0</a> Same as length but returns 0 for the unlimited dimension</li>
182
+ <li><a href="#label-52">name=</a> Rename the dimension</li>
183
+ <li><a href="#label-53">name</a> Returns the name of the dimension</li>
184
+ <li><a href="#label-54">unlimited?</a> Inquires whether the dimension is unlimited or not</li>
179
185
  </ul></li>
180
- <li><p><a href="#label:51">class NetCDFVar</a></p>
186
+ <li><p><a href="#label-55">class NetCDFVar</a></p>
181
187
  <p>Class Methods</p>
182
188
  <ul>
183
- <li><a href="#label:53">NetCDFVar.new</a> Combines NetCDF.open and NetCDF#Var to open a variable with one line (no need to use this).</li>
184
- <li><a href="#label:54">NetCDFVar.unpack_type=</a> Fix the NArray type to be used
185
- in <a href="#label:81">unpack</a></li>
186
- <li><a href="#label:55">NetCDFVar.unpack_type</a> Returns the NArray type set by <a href="#label:54">NetCDFVar.unpack_type=</a>.</li>
189
+ <li><a href="#label-57">NetCDFVar.new</a> Combines NetCDF.open and NetCDF#Var to open a variable with one line (no need to use this).</li>
190
+ <li><a href="#label-58">NetCDFVar.unpack_type=</a> Fix the NArray type to be used
191
+ in <a href="#label-89">unpack</a></li>
192
+ <li><a href="#label-59">NetCDFVar.unpack_type</a> Returns the NArray type set by <a href="#label-58">NetCDFVar.unpack_type=</a>.</li>
187
193
  </ul>
188
194
  <p>Instance Methods</p>
189
195
  <ul>
190
- <li><a href="#label:33">dim</a> Inquires the dim_num-th dimension of the variable (dim_num=0,1,2,..)</li>
191
- <li><a href="#label:34">dims</a> Returns an array of all the dimensions of the variable</li>
192
- <li><a href="#label:59">shape_ul0</a> Returns the shape of the variable, but the length of the unlimited dimension is set to zero.</li>
193
- <li><a href="#label:60">shape_current</a> Returns the current shape of the variable.</li>
194
- <li><a href="#label:39">each_att</a> Iterator regarding the global attributes of the variables.</li>
195
- <li><a href="#label:40">dim_names</a> Returns the names of all the dimensions of the variable</li>
196
- <li><a href="#label:42">att_names</a> Returns the names of all the attributes of the variable</li>
197
- <li><a href="#label:49">name</a> Returns the name of the variable</li>
198
- <li><a href="#label:48">name=</a> Rename the variable</li>
199
- <li><a href="#label:18">ndims</a> Number of dimensions of the variable (which is rank of the variable).</li>
200
- <li><a href="#label:67">rank</a> aliased to ndims</li>
201
- <li><a href="#label:68">ntype</a> Aliased to vartype</li>
202
- <li><a href="#label:69">vartype</a> Inquires the data value type of the variable</li>
203
- <li><a href="#label:70">typecode</a> Inquires the data type of the variable (returns a typecode of NArray)</li>
204
- <li><a href="#label:20">natts</a> Returns the number of the attributes of the variable</li>
205
- <li><a href="#label:72">file</a> Inquires the file that the variable is in</li>
206
- <li><a href="#label:35">att</a> Returns the attribute specified by its name</li>
207
- <li><a href="#label:28">put_att</a> Sets an attribute</li>
208
- <li><a href="#label:75">put</a> Aliased to <a href="#label:76">simple_put</a></li>
209
- <li><a href="#label:76">simple_put</a> Set the values of the variable</li>
210
- <li><a href="#label:77">pack</a> Pack a NArray (etc) using the attributes scale_factor and/or add_offset of self.</li>
211
- <li><a href="#label:78">scaled_put</a> Same as <a href="#label:76">simple_put</a> but interprets the attributes scale_factor and/or add_offset using <a href="#label:77">pack</a>.</li>
212
- <li><a href="#label:79">get</a> Aliased to <a href="#label:80">simple_get</a></li>
213
- <li><a href="#label:80">simple_get</a> Returns values of the variable</li>
214
- <li><a href="#label:81">unpack</a> Unpack a NArray (etc) using the attributes scale_factor and/or add_offset of self.</li>
215
- <li><a href="#label:82">scaled_get</a> Same as <a href="#label:80">simple_get</a> but interprets the attributes scale_factor and/or add_offset using <a href="#label:81">unpack</a>.</li>
216
- <li><a href="#label:83">[]</a> Same as NetCDFVar#get but a subset is specified as in the method [] of NArray. </li>
217
- <li><a href="#label:84">[]=</a> Same as NetCDFVar#put but a subset is specified as in the method []= of NArray. </li>
196
+ <li><a href="#label-61">deflate</a> Sets "deflation" (compression). (netCDF-4 only)</li>
197
+ <li><a href="#label-62">deflate_params</a> Retuns present deflation parameters. (netCDF-4 only)</li>
198
+ <li><a href="#label-63">endian=</a> Sets (changes) the endian. (netCDF-4 only)</li>
199
+ <li><a href="#label-64">endian</a> Retunrs the present endian setting. (netCDF-4 only)</li>
200
+ <li><a href="#label-37">dim</a> Inquires the dim_num-th dimension of the variable (dim_num=0,1,2,..)</li>
201
+ <li><a href="#label-38">dims</a> Returns an array of all the dimensions of the variable</li>
202
+ <li><a href="#label-67">shape_ul0</a> Returns the shape of the variable, but the length of the unlimited dimension is set to zero.</li>
203
+ <li><a href="#label-68">shape_current</a> Returns the current shape of the variable.</li>
204
+ <li><a href="#label-43">each_att</a> Iterator regarding the global attributes of the variables.</li>
205
+ <li><a href="#label-44">dim_names</a> Returns the names of all the dimensions of the variable</li>
206
+ <li><a href="#label-46">att_names</a> Returns the names of all the attributes of the variable</li>
207
+ <li><a href="#label-53">name</a> Returns the name of the variable</li>
208
+ <li><a href="#label-52">name=</a> Rename the variable</li>
209
+ <li><a href="#label-22">ndims</a> Number of dimensions of the variable (which is rank of the variable).</li>
210
+ <li><a href="#label-75">rank</a> aliased to ndims</li>
211
+ <li><a href="#label-76">ntype</a> Aliased to vartype</li>
212
+ <li><a href="#label-77">vartype</a> Inquires the data value type of the variable</li>
213
+ <li><a href="#label-78">typecode</a> Inquires the data type of the variable (returns a typecode of NArray)</li>
214
+ <li><a href="#label-24">natts</a> Returns the number of the attributes of the variable</li>
215
+ <li><a href="#label-80">file</a> Inquires the file that the variable is in</li>
216
+ <li><a href="#label-39">att</a> Returns the attribute specified by its name</li>
217
+ <li><a href="#label-32">put_att</a> Sets an attribute</li>
218
+ <li><a href="#label-83">put</a> Aliased to <a href="#label-84">simple_put</a></li>
219
+ <li><a href="#label-84">simple_put</a> Set the values of the variable</li>
220
+ <li><a href="#label-85">pack</a> Pack a NArray (etc) using the attributes scale_factor and/or add_offset of self.</li>
221
+ <li><a href="#label-86">scaled_put</a> Same as <a href="#label-84">simple_put</a> but interprets the attributes scale_factor and/or add_offset using <a href="#label-85">pack</a>.</li>
222
+ <li><a href="#label-87">get</a> Aliased to <a href="#label-88">simple_get</a></li>
223
+ <li><a href="#label-88">simple_get</a> Returns values of the variable</li>
224
+ <li><a href="#label-89">unpack</a> Unpack a NArray (etc) using the attributes scale_factor and/or add_offset of self.</li>
225
+ <li><a href="#label-90">scaled_get</a> Same as <a href="#label-88">simple_get</a> but interprets the attributes scale_factor and/or add_offset using <a href="#label-89">unpack</a>.</li>
226
+ <li><a href="#label-91">[]</a> Same as NetCDFVar#get but a subset is specified as in the method [] of NArray. </li>
227
+ <li><a href="#label-92">[]=</a> Same as NetCDFVar#put but a subset is specified as in the method []= of NArray. </li>
218
228
  </ul>
219
229
  <p>Instance Methods added by requiring "numru/netcdf_miss"</p>
220
230
  <ul>
221
- <li><a href="#label:86">get_with_miss</a> Same as <a href="#label:79">get</a> but interprets data missing.</li>
222
- <li><a href="#label:87">get_with_miss_and_scaling</a> Same as <a href="#label:86">get_with_miss</a> but handles data scaling too.</li>
223
- <li><a href="#label:88">put_with_miss</a> Same as <a href="#label:75">put</a> but interprets data missing.</li>
224
- <li><a href="#label:89">put_with_miss_and_scaling</a> Same as <a href="#label:88">put_with_miss</a> but handles data scaling too.</li>
231
+ <li><a href="#label-94">get_with_miss</a> Same as <a href="#label-87">get</a> but interprets data missing.</li>
232
+ <li><a href="#label-95">get_with_miss_and_scaling</a> Same as <a href="#label-94">get_with_miss</a> but handles data scaling too.</li>
233
+ <li><a href="#label-96">put_with_miss</a> Same as <a href="#label-83">put</a> but interprets data missing.</li>
234
+ <li><a href="#label-97">put_with_miss_and_scaling</a> Same as <a href="#label-96">put_with_miss</a> but handles data scaling too.</li>
225
235
  </ul></li>
226
- <li><p><a href="#label:90">class NetCDFAtt</a></p>
236
+ <li><p><a href="#label-98">class NetCDFAtt</a></p>
227
237
  <p>Class Methods</p>
228
238
  <p>Instance Methods</p>
229
239
  <ul>
230
- <li><a href="#label:49">name</a> Returns the name of the attribute</li>
231
- <li><a href="#label:48">name=</a> Rename the attribute</li>
232
- <li><a href="#label:95">copy</a> Copies an attribute to a variable or a file. If file, becomes an global attribute</li>
233
- <li><a href="#label:96">delete</a> Delete an attribute</li>
234
- <li><a href="#label:75">put</a> Sets the value of the attribute</li>
235
- <li><a href="#label:79">get</a> Returns the values of the attribute</li>
236
- <li><a href="#label:99">atttype</a> Inquires the type of attribute values</li>
237
- <li><a href="#label:70">typecode</a> Inquires the type of attribute values (returns a NArray typecode)</li>
240
+ <li><a href="#label-53">name</a> Returns the name of the attribute</li>
241
+ <li><a href="#label-52">name=</a> Rename the attribute</li>
242
+ <li><a href="#label-103">copy</a> Copies an attribute to a variable or a file. If file, becomes an global attribute</li>
243
+ <li><a href="#label-104">delete</a> Delete an attribute</li>
244
+ <li><a href="#label-83">put</a> Sets the value of the attribute</li>
245
+ <li><a href="#label-87">get</a> Returns the values of the attribute</li>
246
+ <li><a href="#label-107">atttype</a> Inquires the type of attribute values</li>
247
+ <li><a href="#label-78">typecode</a> Inquires the type of attribute values (returns a NArray typecode)</li>
238
248
  </ul></li>
239
249
  </ul>
240
250
  <p>---------------------------------------------</p>
241
- <h1><a name="label:10" id="label:10">class NetCDF</a></h1><!-- RDLabel: "class NetCDF" -->
242
- <h3><a name="label:11" id="label:11">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
251
+ <h1><a name="label-10" id="label-10">class NetCDF</a></h1><!-- RDLabel: "class NetCDF" -->
252
+ <h3><a name="label-11" id="label-11">constants</a></h3><!-- RDLabel: "constants" -->
253
+ <ul>
254
+ <li>NC_NOWRITE, NC_WRITE, NC_SHARE, NC_CLOBBER, NC_NOCLOBBER, NC_64BIT_OFFSET, NC_NETCDF4, NC_CLASSIC_MODEL, NCVERSION, SUPPORT_BIGMEM : these constants can accessed by NumRu::NetCDF::NC_NOWRITE etc.</li>
255
+ </ul>
256
+ <h3><a name="label-12" id="label-12">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
243
257
  <dl>
244
- <dt><h4><a name="label:12" id="label:12"><code>NetCDF.open(<var>filename</var>, <var>mode</var>="<var>r</var>", <var>share</var>=<var>false</var>)</code></a></h4></dt><!-- RDLabel: "NetCDF.open" -->
258
+ <dt><h4><a name="label-13" id="label-13"><code>NetCDF.nc4?</code></a></h4></dt><!-- RDLabel: "NetCDF.nc4?" -->
259
+ <dd>
260
+ Returens wheather the linked NetCDF library is NetCDF-4 (true/false).
261
+ false means that it is version 3.</dd>
262
+ <dt><h4><a name="label-14" id="label-14"><code>NetCDF.creation_format=(<var>cmode</var>)</code></a></h4></dt><!-- RDLabel: "NetCDF.creation_format=" -->
263
+ <dd>
264
+ <p>(Available only when NetCDF version 4 is used. Error is raised if not.)
265
+ Set the file format created by NetCDF.create. The initial setting is
266
+ "classic" (conventional netcdf 3 format).</p>
267
+ <p>Arguments</p>
268
+ <ul>
269
+ <li>cmode : one of the following:
270
+ <ul>
271
+ <li>0, nil, or NetCDF::NC_CLASSIC_MODEL : the classic format
272
+ (original NetCDF-3 format). This is the default setting of
273
+ RubyNetCDF. </li>
274
+ <li>NetCDF::NC_64BIT_OFFSET : classic but supports larger variables</li>
275
+ <li>NetCDF::NC_NETCDF4 : The new NetCDF-4 format based on HDF5</li>
276
+ <li>( NetCDF::NC_NETCDF4 | NetCDF::NC_CLASSIC_MODEL) [bit "or" of
277
+ NetCDF::NC_NETCDF4 and NetCDF::NC_CLASSIC_MODEL ]: the new
278
+ NetCDF-4 format but new data models are disabled.</li>
279
+ </ul></li>
280
+ </ul></dd>
281
+ <dt><h4><a name="label-15" id="label-15"><code>NetCDF.creation_format</code></a></h4></dt><!-- RDLabel: "NetCDF.creation_format" -->
282
+ <dd>
283
+ (Available only when NetCDF version 4 is used. Error is raised if not.)
284
+ Returns the current setting of the creation format.</dd>
285
+ <dt><h4><a name="label-16" id="label-16"><code>NetCDF.open(<var>filename</var>, <var>mode</var>="<var>r</var>", <var>share</var>=<var>false</var>)</code></a></h4></dt><!-- RDLabel: "NetCDF.open" -->
245
286
  <dd>
246
287
  <p>Opens a file (class method). If mode="w" and the file does not
247
288
  exist, a new file is created.</p>
@@ -267,10 +308,10 @@ exist, a new file is created.</p>
267
308
  <ul>
268
309
  <li>nc_open, nc_create</li>
269
310
  </ul></dd>
270
- <dt><h4><a name="label:13" id="label:13"><code>NetCDF.new</code></a></h4></dt><!-- RDLabel: "NetCDF.new" -->
311
+ <dt><h4><a name="label-17" id="label-17"><code>NetCDF.new</code></a></h4></dt><!-- RDLabel: "NetCDF.new" -->
271
312
  <dd>
272
- <p>Aliased to NetCDF.open</p></dd>
273
- <dt><h4><a name="label:14" id="label:14"><code>NetCDF.create(<var>filename</var>, <var>noclobber</var>=<var>false</var>, <var>share</var>=<var>false</var>)</code></a></h4></dt><!-- RDLabel: "NetCDF.create" -->
313
+ Aliased to NetCDF.open</dd>
314
+ <dt><h4><a name="label-18" id="label-18"><code>NetCDF.create(<var>filename</var>, <var>noclobber</var>=<var>false</var>, <var>share</var>=<var>false</var>)</code></a></h4></dt><!-- RDLabel: "NetCDF.create" -->
274
315
  <dd>
275
316
  <p>Creates a NetCDF file (class method)</p>
276
317
  <p>Arguments</p>
@@ -289,7 +330,7 @@ exist, a new file is created.</p>
289
330
  <ul>
290
331
  <li>nc_create</li>
291
332
  </ul></dd>
292
- <dt><h4><a name="label:15" id="label:15"><code>NetCDF.create_tmp(<var>tmpdir</var>=<var>ENV</var>['<var>TMPDIR</var>']||<var>ENV</var>['<var>TMP</var>']||<var>ENV</var>['<var>TEMP</var>']||'.', <var>share</var>=<var>false</var>)</code></a></h4></dt><!-- RDLabel: "NetCDF.create_tmp" -->
333
+ <dt><h4><a name="label-19" id="label-19"><code>NetCDF.create_tmp(<var>tmpdir</var>=<var>ENV</var>['<var>TMPDIR</var>']||<var>ENV</var>['<var>TMP</var>']||<var>ENV</var>['<var>TEMP</var>']||'.', <var>share</var>=<var>false</var>)</code></a></h4></dt><!-- RDLabel: "NetCDF.create_tmp" -->
293
334
  <dd>
294
335
  <p>Creates a temporary NetCDF file (class method).
295
336
  Its name is automatically generated, and it is deleted when closed.</p>
@@ -311,9 +352,9 @@ Its name is automatically generated, and it is deleted when closed.</p>
311
352
  <li>nc_create</li>
312
353
  </ul></dd>
313
354
  </dl>
314
- <h3><a name="label:16" id="label:16">Instance Methods</a></h3><!-- RDLabel: "Instance Methods" -->
355
+ <h3><a name="label-20" id="label-20">Instance Methods</a></h3><!-- RDLabel: "Instance Methods" -->
315
356
  <dl>
316
- <dt><h4><a name="label:17" id="label:17"><code>close</code></a></h4></dt><!-- RDLabel: "close" -->
357
+ <dt><h4><a name="label-21" id="label-21"><code>close</code></a></h4></dt><!-- RDLabel: "close" -->
317
358
  <dd>
318
359
  <p>Closes the file.</p>
319
360
  <p>Arguments</p>
@@ -328,7 +369,7 @@ Its name is automatically generated, and it is deleted when closed.</p>
328
369
  <ul>
329
370
  <li>nc_close</li>
330
371
  </ul></dd>
331
- <dt><h4><a name="label:18" id="label:18"><code>ndims</code></a></h4></dt><!-- RDLabel: "ndims" -->
372
+ <dt><h4><a name="label-22" id="label-22"><code>ndims</code></a></h4></dt><!-- RDLabel: "ndims" -->
332
373
  <dd>
333
374
  <p>Returns the number of dimensions in the file</p>
334
375
  <p>Arguments</p>
@@ -343,7 +384,7 @@ Its name is automatically generated, and it is deleted when closed.</p>
343
384
  <ul>
344
385
  <li>nc_inq_ndims</li>
345
386
  </ul></dd>
346
- <dt><h4><a name="label:19" id="label:19"><code>nvars</code></a></h4></dt><!-- RDLabel: "nvars" -->
387
+ <dt><h4><a name="label-23" id="label-23"><code>nvars</code></a></h4></dt><!-- RDLabel: "nvars" -->
347
388
  <dd>
348
389
  <p>Returns the number of variables in the file</p>
349
390
  <p>Arguments</p>
@@ -358,7 +399,7 @@ Its name is automatically generated, and it is deleted when closed.</p>
358
399
  <ul>
359
400
  <li>nc_inq_nvars</li>
360
401
  </ul></dd>
361
- <dt><h4><a name="label:20" id="label:20"><code>natts</code></a></h4></dt><!-- RDLabel: "natts" -->
402
+ <dt><h4><a name="label-24" id="label-24"><code>natts</code></a></h4></dt><!-- RDLabel: "natts" -->
362
403
  <dd>
363
404
  <p>Returns the number of global attributes in the file</p>
364
405
  <p>Arguments</p>
@@ -373,7 +414,7 @@ Its name is automatically generated, and it is deleted when closed.</p>
373
414
  <ul>
374
415
  <li>nc_inq_natts</li>
375
416
  </ul></dd>
376
- <dt><h4><a name="label:21" id="label:21"><code>unlimited</code></a></h4></dt><!-- RDLabel: "unlimited" -->
417
+ <dt><h4><a name="label-25" id="label-25"><code>unlimited</code></a></h4></dt><!-- RDLabel: "unlimited" -->
377
418
  <dd>
378
419
  <p>Returns the unlimited dimension in the file</p>
379
420
  <p>Arguments</p>
@@ -388,7 +429,7 @@ Its name is automatically generated, and it is deleted when closed.</p>
388
429
  <ul>
389
430
  <li>nc_inq_unlimdim</li>
390
431
  </ul></dd>
391
- <dt><h4><a name="label:22" id="label:22"><code>path</code></a></h4></dt><!-- RDLabel: "path" -->
432
+ <dt><h4><a name="label-26" id="label-26"><code>path</code></a></h4></dt><!-- RDLabel: "path" -->
392
433
  <dd>
393
434
  <p>Returns the path of the file (contents of the filename specified when opened/created)</p>
394
435
  <p>Arguments</p>
@@ -403,7 +444,7 @@ Its name is automatically generated, and it is deleted when closed.</p>
403
444
  <ul>
404
445
  <li>(none)</li>
405
446
  </ul></dd>
406
- <dt><h4><a name="label:23" id="label:23"><code>redef</code></a></h4></dt><!-- RDLabel: "redef" -->
447
+ <dt><h4><a name="label-27" id="label-27"><code>redef</code></a></h4></dt><!-- RDLabel: "redef" -->
407
448
  <dd>
408
449
  <p>Switches to the define mode. Does nothing if already in it (nil returned).</p>
409
450
  <p>Arguments</p>
@@ -412,15 +453,15 @@ Its name is automatically generated, and it is deleted when closed.</p>
412
453
  </ul>
413
454
  <p>Return value</p>
414
455
  <ul>
415
- <li>true if successfully switched to the define mode;</li>
456
+ <li>true if successfully switched to the define mode;
457
+ nil if the file is already in the define mode.
458
+ Exception is raised if unsuccessful for other reasons.</li>
459
+ </ul>
460
+ <p>Corresponding (dependent) function(s) in the C library of NetCDF</p>
461
+ <ul>
462
+ <li>nc_redef</li>
416
463
  </ul></dd>
417
- </dl>
418
- <pre>nil if the file is already in the define mode.
419
- Exception is raised if unsuccessful for other reasons.</pre>
420
- <pre>Corresponding (dependent) function(s) in the C library of NetCDF
421
- * nc_redef</pre>
422
- <dl>
423
- <dt><h4><a name="label:24" id="label:24"><code>enddef</code></a></h4></dt><!-- RDLabel: "enddef" -->
464
+ <dt><h4><a name="label-28" id="label-28"><code>enddef</code></a></h4></dt><!-- RDLabel: "enddef" -->
424
465
  <dd>
425
466
  <p>Switches to the data mode. Does nothing if already in it (nil returned).</p>
426
467
  <p>Arguments</p>
@@ -429,15 +470,15 @@ Exception is raised if unsuccessful for other reasons.</pre>
429
470
  </ul>
430
471
  <p>Return value</p>
431
472
  <ul>
432
- <li>true if successfully switched to the data mode;</li>
473
+ <li>true if successfully switched to the data mode;
474
+ nil if the file is already in the data mode.
475
+ Exception is raised if unsuccessful for other reasons.</li>
476
+ </ul>
477
+ <p>Corresponding (dependent) function(s) in the C library of NetCDF</p>
478
+ <ul>
479
+ <li>nc_enddef</li>
433
480
  </ul></dd>
434
- </dl>
435
- <pre>nil if the file is already in the data mode.
436
- Exception is raised if unsuccessful for other reasons.</pre>
437
- <pre>Corresponding (dependent) function(s) in the C library of NetCDF
438
- * nc_enddef</pre>
439
- <dl>
440
- <dt><h4><a name="label:25" id="label:25"><code>define_mode?</code></a></h4></dt><!-- RDLabel: "define_mode?" -->
481
+ <dt><h4><a name="label-29" id="label-29"><code>define_mode?</code></a></h4></dt><!-- RDLabel: "define_mode?" -->
441
482
  <dd>
442
483
  <p>Inquire whether the file is in the define mode.</p>
443
484
  <p>Arguments</p>
@@ -446,15 +487,15 @@ Exception is raised if unsuccessful for other reasons.</pre>
446
487
  </ul>
447
488
  <p>Return value</p>
448
489
  <ul>
449
- <li>true if the data is in the define mode;</li>
490
+ <li>true if the data is in the define mode;
491
+ false if the file is in the data mode;
492
+ nil otherwise (possibly the file is read-only).</li>
493
+ </ul>
494
+ <p>Corresponding (dependent) function(s) in the C library of NetCDF</p>
495
+ <ul>
496
+ <li>combination of nc_redef and nc_enddef</li>
450
497
  </ul></dd>
451
- </dl>
452
- <pre>false if the file is in the data mode;
453
- nil otherwise (possibly the file is read-only).</pre>
454
- <pre>Corresponding (dependent) function(s) in the C library of NetCDF
455
- * combination of nc_redef and nc_enddef</pre>
456
- <dl>
457
- <dt><h4><a name="label:26" id="label:26"><code>sync</code></a></h4></dt><!-- RDLabel: "sync" -->
498
+ <dt><h4><a name="label-30" id="label-30"><code>sync</code></a></h4></dt><!-- RDLabel: "sync" -->
458
499
  <dd>
459
500
  <p>Synchronizes the disk copy of a netCDF dataset with in-memory buffer</p>
460
501
  <p>Arguments</p>
@@ -469,7 +510,7 @@ nil otherwise (possibly the file is read-only).</pre>
469
510
  <ul>
470
511
  <li>nc_sync</li>
471
512
  </ul></dd>
472
- <dt><h4><a name="label:27" id="label:27"><code>def_dim(<var>dimension_name</var>, <var>length</var>)</code></a></h4></dt><!-- RDLabel: "def_dim" -->
513
+ <dt><h4><a name="label-31" id="label-31"><code>def_dim(<var>dimension_name</var>, <var>length</var>)</code></a></h4></dt><!-- RDLabel: "def_dim" -->
473
514
  <dd>
474
515
  <p>Define a dimension</p>
475
516
  <p>Arguments</p>
@@ -485,7 +526,7 @@ nil otherwise (possibly the file is read-only).</pre>
485
526
  <ul>
486
527
  <li>nc_def_dim</li>
487
528
  </ul></dd>
488
- <dt><h4><a name="label:28" id="label:28"><code>put_att(<var>attribute_name</var>, <var>value</var>, <var>atttype</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "put_att" -->
529
+ <dt><h4><a name="label-32" id="label-32"><code>put_att(<var>attribute_name</var>, <var>value</var>, <var>atttype</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "put_att" -->
489
530
  <dd>
490
531
  <p>Sets a global attribute</p>
491
532
  <p>Arguments</p>
@@ -505,7 +546,7 @@ nil otherwise (possibly the file is read-only).</pre>
505
546
  <ul>
506
547
  <li>nc_put_att_&lt;type&gt;</li>
507
548
  </ul></dd>
508
- <dt><h4><a name="label:29" id="label:29"><code>def_var(<var>name</var>, <var>vartype</var>, <var>dimensions</var>)</code></a></h4></dt><!-- RDLabel: "def_var" -->
549
+ <dt><h4><a name="label-33" id="label-33"><code>def_var(<var>name</var>, <var>vartype</var>, <var>dimensions</var>)</code></a></h4></dt><!-- RDLabel: "def_var" -->
509
550
  <dd>
510
551
  <p>Defines a variable</p>
511
552
  <p>Arguments</p>
@@ -526,7 +567,7 @@ nil otherwise (possibly the file is read-only).</pre>
526
567
  <ul>
527
568
  <li>nc_def_var</li>
528
569
  </ul></dd>
529
- <dt><h4><a name="label:30" id="label:30"><code>def_var_with_dim(<var>name</var>, <var>vartype</var>, <var>shape_ul0</var>, <var>dimnames</var>)</code></a></h4></dt><!-- RDLabel: "def_var_with_dim" -->
570
+ <dt><h4><a name="label-34" id="label-34"><code>def_var_with_dim(<var>name</var>, <var>vartype</var>, <var>shape_ul0</var>, <var>dimnames</var>)</code></a></h4></dt><!-- RDLabel: "def_var_with_dim" -->
530
571
  <dd>
531
572
  <p>Same as def_var but defines dimensions first if needed.
532
573
  Raise exception if it conflicts with the lengths of existing dimensions.</p>
@@ -549,7 +590,7 @@ Raise exception if it conflicts with the lengths of existing dimensions.</p>
549
590
  <ul>
550
591
  <li>(nc_def_var)</li>
551
592
  </ul></dd>
552
- <dt><h4><a name="label:31" id="label:31"><code>var(<var>var_name</var>)</code></a></h4></dt><!-- RDLabel: "var" -->
593
+ <dt><h4><a name="label-35" id="label-35"><code>var(<var>var_name</var>)</code></a></h4></dt><!-- RDLabel: "var" -->
553
594
  <dd>
554
595
  <p>Opens an existing variable in the file</p>
555
596
  <p>Arguments</p>
@@ -564,7 +605,7 @@ Raise exception if it conflicts with the lengths of existing dimensions.</p>
564
605
  <ul>
565
606
  <li>nc_inq_varid</li>
566
607
  </ul></dd>
567
- <dt><h4><a name="label:32" id="label:32"><code>vars(<var>names</var>)</code></a></h4></dt><!-- RDLabel: "vars" -->
608
+ <dt><h4><a name="label-36" id="label-36"><code>vars(<var>names</var>)</code></a></h4></dt><!-- RDLabel: "vars" -->
568
609
  <dd>
569
610
  <p>Opens existing variables in the file</p>
570
611
  <p>Arguments</p>
@@ -581,7 +622,7 @@ Raise exception if it conflicts with the lengths of existing dimensions.</p>
581
622
  <ul>
582
623
  <li>nc_inq_varid</li>
583
624
  </ul></dd>
584
- <dt><h4><a name="label:33" id="label:33"><code>dim(<var>dimension_name</var>)</code></a></h4></dt><!-- RDLabel: "dim" -->
625
+ <dt><h4><a name="label-37" id="label-37"><code>dim(<var>dimension_name</var>)</code></a></h4></dt><!-- RDLabel: "dim" -->
585
626
  <dd>
586
627
  <p>Opens an existing dimension in the file</p>
587
628
  <p>Arguments</p>
@@ -596,7 +637,7 @@ Raise exception if it conflicts with the lengths of existing dimensions.</p>
596
637
  <ul>
597
638
  <li>nc_inq_dimid</li>
598
639
  </ul></dd>
599
- <dt><h4><a name="label:34" id="label:34"><code>dims(<var>names</var>)</code></a></h4></dt><!-- RDLabel: "dims" -->
640
+ <dt><h4><a name="label-38" id="label-38"><code>dims(<var>names</var>)</code></a></h4></dt><!-- RDLabel: "dims" -->
600
641
  <dd>
601
642
  <p>Opens existing dimensions in the file</p>
602
643
  <p>Arguments</p>
@@ -613,7 +654,7 @@ Raise exception if it conflicts with the lengths of existing dimensions.</p>
613
654
  <ul>
614
655
  <li>nc_inq_dimid</li>
615
656
  </ul></dd>
616
- <dt><h4><a name="label:35" id="label:35"><code>att(<var>attribute_name</var>)</code></a></h4></dt><!-- RDLabel: "att" -->
657
+ <dt><h4><a name="label-39" id="label-39"><code>att(<var>attribute_name</var>)</code></a></h4></dt><!-- RDLabel: "att" -->
617
658
  <dd>
618
659
  <p>Opens an existing global attribute in the file</p>
619
660
  <p>Arguments</p>
@@ -628,7 +669,7 @@ Raise exception if it conflicts with the lengths of existing dimensions.</p>
628
669
  <ul>
629
670
  <li>(nc_inq_attid used for inquiry)</li>
630
671
  </ul></dd>
631
- <dt><h4><a name="label:36" id="label:36"><code>fill=(<var>filemode</var>)</code></a></h4></dt><!-- RDLabel: "fill=" -->
672
+ <dt><h4><a name="label-40" id="label-40"><code>fill=(<var>filemode</var>)</code></a></h4></dt><!-- RDLabel: "fill=" -->
632
673
  <dd>
633
674
  <p>Sets a fill mode. (Default behavior of NetCDF is FILL.)</p>
634
675
  <p>Arguments</p>
@@ -643,7 +684,7 @@ Raise exception if it conflicts with the lengths of existing dimensions.</p>
643
684
  <ul>
644
685
  <li>nc_set_fill</li>
645
686
  </ul></dd>
646
- <dt><h4><a name="label:37" id="label:37"><code>each_dim{ ... }</code></a></h4></dt><!-- RDLabel: "each_dim" -->
687
+ <dt><h4><a name="label-41" id="label-41"><code>each_dim{ ... }</code></a></h4></dt><!-- RDLabel: "each_dim" -->
647
688
  <dd>
648
689
  <p>Iterator regarding the dimensions in the file.
649
690
  Ex.: {|i| print i.name,"\n"} prints names of all dimensions</p>
@@ -659,7 +700,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all dimensions</p>
659
700
  <ul>
660
701
  <li>(dependent on nc_inq_ndims)</li>
661
702
  </ul></dd>
662
- <dt><h4><a name="label:38" id="label:38"><code>each_var{ ... }</code></a></h4></dt><!-- RDLabel: "each_var" -->
703
+ <dt><h4><a name="label-42" id="label-42"><code>each_var{ ... }</code></a></h4></dt><!-- RDLabel: "each_var" -->
663
704
  <dd>
664
705
  <p>Iterator regarding the variables in the file.
665
706
  Ex.: {|i| print i.name,"\n"} prints names of all variables</p>
@@ -675,7 +716,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all variables</p>
675
716
  <ul>
676
717
  <li>(dependent on nc_inq_nvars)</li>
677
718
  </ul></dd>
678
- <dt><h4><a name="label:39" id="label:39"><code>each_att{ ... }</code></a></h4></dt><!-- RDLabel: "each_att" -->
719
+ <dt><h4><a name="label-43" id="label-43"><code>each_att{ ... }</code></a></h4></dt><!-- RDLabel: "each_att" -->
679
720
  <dd>
680
721
  <p>Iterator regarding the global attributes of the file.
681
722
  Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
@@ -691,7 +732,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
691
732
  <ul>
692
733
  <li>(dependent on nc_inq_natts, nc_inq_attname)</li>
693
734
  </ul></dd>
694
- <dt><h4><a name="label:40" id="label:40"><code>dim_names</code></a></h4></dt><!-- RDLabel: "dim_names" -->
735
+ <dt><h4><a name="label-44" id="label-44"><code>dim_names</code></a></h4></dt><!-- RDLabel: "dim_names" -->
695
736
  <dd>
696
737
  <p>Returns the names of all dimensions in the file</p>
697
738
  <p>Arguments</p>
@@ -706,7 +747,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
706
747
  <ul>
707
748
  <li>(nc_inq_ndims, nc_inq_dimname)</li>
708
749
  </ul></dd>
709
- <dt><h4><a name="label:41" id="label:41"><code>var_names</code></a></h4></dt><!-- RDLabel: "var_names" -->
750
+ <dt><h4><a name="label-45" id="label-45"><code>var_names</code></a></h4></dt><!-- RDLabel: "var_names" -->
710
751
  <dd>
711
752
  <p>Returns the names of all variables in the file</p>
712
753
  <p>Arguments</p>
@@ -721,7 +762,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
721
762
  <ul>
722
763
  <li>(dependent on nc_inq_nvars, nc_inq_varname)</li>
723
764
  </ul></dd>
724
- <dt><h4><a name="label:42" id="label:42"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
765
+ <dt><h4><a name="label-46" id="label-46"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
725
766
  <dd>
726
767
  <p>Returns the names of all the global attributes of the file</p>
727
768
  <p>Arguments</p>
@@ -738,11 +779,11 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
738
779
  </ul></dd>
739
780
  </dl>
740
781
  <p>---------------------------------------------</p>
741
- <h1><a name="label:43" id="label:43">class NetCDFDim</a></h1><!-- RDLabel: "class NetCDFDim" -->
742
- <h3><a name="label:44" id="label:44">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
743
- <h3><a name="label:45" id="label:45">Instance Methods</a></h3><!-- RDLabel: "Instance Methods" -->
782
+ <h1><a name="label-47" id="label-47">class NetCDFDim</a></h1><!-- RDLabel: "class NetCDFDim" -->
783
+ <h3><a name="label-48" id="label-48">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
784
+ <h3><a name="label-49" id="label-49">Instance Methods</a></h3><!-- RDLabel: "Instance Methods" -->
744
785
  <dl>
745
- <dt><h4><a name="label:46" id="label:46"><code>length</code></a></h4></dt><!-- RDLabel: "length" -->
786
+ <dt><h4><a name="label-50" id="label-50"><code>length</code></a></h4></dt><!-- RDLabel: "length" -->
746
787
  <dd>
747
788
  <p>Returns the length of the dimension</p>
748
789
  <p>Arguments</p>
@@ -757,7 +798,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
757
798
  <ul>
758
799
  <li>nc_inq_dimlen</li>
759
800
  </ul></dd>
760
- <dt><h4><a name="label:47" id="label:47"><code>length_ul0</code></a></h4></dt><!-- RDLabel: "length_ul0" -->
801
+ <dt><h4><a name="label-51" id="label-51"><code>length_ul0</code></a></h4></dt><!-- RDLabel: "length_ul0" -->
761
802
  <dd>
762
803
  <p>Same as length but returns 0 for the unlimited dimension</p>
763
804
  <p>Arguments</p>
@@ -772,7 +813,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
772
813
  <ul>
773
814
  <li>nc_inq_dimlen</li>
774
815
  </ul></dd>
775
- <dt><h4><a name="label:48" id="label:48"><code>name=(<var>dimension_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
816
+ <dt><h4><a name="label-52" id="label-52"><code>name=(<var>dimension_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
776
817
  <dd>
777
818
  <p>Rename the dimension</p>
778
819
  <p>Arguments</p>
@@ -787,7 +828,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
787
828
  <ul>
788
829
  <li>nc_rename_dim</li>
789
830
  </ul></dd>
790
- <dt><h4><a name="label:49" id="label:49"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
831
+ <dt><h4><a name="label-53" id="label-53"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
791
832
  <dd>
792
833
  <p>Returns the name of the dimension</p>
793
834
  <p>Arguments</p>
@@ -802,7 +843,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
802
843
  <ul>
803
844
  <li>nc_inq_dimname</li>
804
845
  </ul></dd>
805
- <dt><h4><a name="label:50" id="label:50"><code>unlimited?</code></a></h4></dt><!-- RDLabel: "unlimited?" -->
846
+ <dt><h4><a name="label-54" id="label-54"><code>unlimited?</code></a></h4></dt><!-- RDLabel: "unlimited?" -->
806
847
  <dd>
807
848
  <p>Inquires whether the dimension is unlimited or not</p>
808
849
  <p>Arguments</p>
@@ -819,10 +860,10 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
819
860
  </ul></dd>
820
861
  </dl>
821
862
  <p>---------------------------------------------</p>
822
- <h1><a name="label:51" id="label:51">class NetCDFVar</a></h1><!-- RDLabel: "class NetCDFVar" -->
823
- <h3><a name="label:52" id="label:52">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
863
+ <h1><a name="label-55" id="label-55">class NetCDFVar</a></h1><!-- RDLabel: "class NetCDFVar" -->
864
+ <h3><a name="label-56" id="label-56">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
824
865
  <dl>
825
- <dt><h4><a name="label:53" id="label:53"><code>NetCDFVar.new(<var>file</var>,<var>varname</var>,<var>mode</var>="<var>r</var>",<var>share</var>=<var>false</var>)</code></a></h4></dt><!-- RDLabel: "NetCDFVar.new" -->
866
+ <dt><h4><a name="label-57" id="label-57"><code>NetCDFVar.new(<var>file</var>,<var>varname</var>,<var>mode</var>="<var>r</var>",<var>share</var>=<var>false</var>)</code></a></h4></dt><!-- RDLabel: "NetCDFVar.new" -->
826
867
  <dd>
827
868
  <p>open a NetCDF variable. This can also be done with NetCDF#var
828
869
  (instance method of NetCDF class), which is recommended over
@@ -844,9 +885,9 @@ this method.</p>
844
885
  <ul>
845
886
  <li>(dependent on nc_open, nc_create, nc_inq_varid etc.)</li>
846
887
  </ul></dd>
847
- <dt><h4><a name="label:54" id="label:54"><code>NetCDFVar.unpack_type=(<var>na_type</var>)</code></a></h4></dt><!-- RDLabel: "NetCDFVar.unpack_type=" -->
888
+ <dt><h4><a name="label-58" id="label-58"><code>NetCDFVar.unpack_type=(<var>na_type</var>)</code></a></h4></dt><!-- RDLabel: "NetCDFVar.unpack_type=" -->
848
889
  <dd>
849
- <p>Fix the NArray type to be used in <a href="#label:81">unpack</a>.</p>
890
+ <p>Fix the NArray type to be used in <a href="#label-89">unpack</a>.</p>
850
891
  <p>Arguments</p>
851
892
  <ul>
852
893
  <li>na_type (Integer) : NArray::BYTE, NArray::SINT, NArray::INT,
@@ -856,18 +897,78 @@ this method.</p>
856
897
  <ul>
857
898
  <li>na_type (the argument)</li>
858
899
  </ul></dd>
859
- <dt><h4><a name="label:55" id="label:55"><code>NetCDFVar.unpack_type</code></a></h4></dt><!-- RDLabel: "NetCDFVar.unpack_type" -->
900
+ <dt><h4><a name="label-59" id="label-59"><code>NetCDFVar.unpack_type</code></a></h4></dt><!-- RDLabel: "NetCDFVar.unpack_type" -->
860
901
  <dd>
861
- <p>Returns the NArray type set by <a href="#label:54">NetCDFVar.unpack_type=</a>.</p>
902
+ <p>Returns the NArray type set by <a href="#label-58">NetCDFVar.unpack_type=</a>.</p>
862
903
  <p>Return value</p>
863
904
  <ul>
864
905
  <li>nil, NArray::BYTE, NArray::SINT, NArray::INT,
865
906
  NArray::SFLOAT, or NArray::FLOAT</li>
866
907
  </ul></dd>
867
908
  </dl>
868
- <h3><a name="label:56" id="label:56">Instance Methods</a></h3><!-- RDLabel: "Instance Methods" -->
909
+ <h3><a name="label-60" id="label-60">Instance Methods</a></h3><!-- RDLabel: "Instance Methods" -->
869
910
  <dl>
870
- <dt><h4><a name="label:57" id="label:57"><code>dim(<var>dim_num</var>)</code></a></h4></dt><!-- RDLabel: "dim" -->
911
+ <dt><h4><a name="label-61" id="label-61"><code>deflate(<var>deflate_level</var>, <var>shuffle</var>=<var>false</var>)</code></a></h4></dt><!-- RDLabel: "deflate" -->
912
+ <dd>
913
+ <p>(Available only when NetCDF version 4 is used. Error is raised if not.)
914
+ Makes the current (newly created) variable "deflated" (=compressed).
915
+ This method must be called after
916
+ defining a variable (NetCDF#<a href="#label-33">def_var</a>) and before calling NetCDF#<a href="#label-28">enddef</a>.</p>
917
+ <p>Arguments</p>
918
+ <ul>
919
+ <li>deflate_level (Integer) :: 0 to 9. (0: no compression; 9:
920
+ highest compression; recommended: 1 or 2).</li>
921
+ <li>shuffle (optional; true or false; default: false) if true,
922
+ turn on the shuffle filter.
923
+ <ul>
924
+ <li><a href="http://www.unidata.ucar.edu/software/netcdf/papers/AMS_2008.pdf">&lt;URL:http://www.unidata.ucar.edu/software/netcdf/papers/AMS_2008.pdf&gt;</a>:
925
+ ``The shuffle algorithm changes the byte order in the data stream;
926
+ when used with integers that are all close together, this
927
+ results in a better compression ratio. There is no benefit
928
+ from using the shuffle filter without also using
929
+ compression.''</li>
930
+ <li>Note: shuffle is effective for float variables too (tested by horinouchi).</li>
931
+ </ul></li>
932
+ </ul>
933
+ <p>Return value</p>
934
+ <ul>
935
+ <li>self</li>
936
+ </ul></dd>
937
+ <dt><h4><a name="label-62" id="label-62"><code>deflate_params</code></a></h4></dt><!-- RDLabel: "deflate_params" -->
938
+ <dd>
939
+ <p>(Available only when NetCDF version 4 is used. Error is raised if not.)
940
+ Returns the present deflation parameters.</p>
941
+ <p>Return value</p>
942
+ <ul>
943
+ <li>[shuffle, deflate, deflate_level] (a 3-element Array),
944
+ where the values of shuffle and deflate are
945
+ true or false, and deflate_level is an Integer (0-9).</li>
946
+ </ul></dd>
947
+ <dt><h4><a name="label-63" id="label-63"><code>endian=(<var>endian</var>)</code></a></h4></dt><!-- RDLabel: "endian=" -->
948
+ <dd>
949
+ <p>(Available only when NetCDF version 4 is used. Error is raised if not.)
950
+ Sets (changes) the endian. See <a href="#label-61">deflate</a> for when to use it.</p>
951
+ <p>Arguments</p>
952
+ <ul>
953
+ <li>endian : one of the following constants:
954
+ NetCDF::NC_ENDIAN_NATIVE (=0) (default),
955
+ NetCDF::NC_ENDIAN_LITTLE (=1), or NetCDF::NC_ENDIAN_BIG (=2).</li>
956
+ </ul>
957
+ <p>Return value</p>
958
+ <ul>
959
+ <li>self</li>
960
+ </ul></dd>
961
+ <dt><h4><a name="label-64" id="label-64"><code>endian</code></a></h4></dt><!-- RDLabel: "endian" -->
962
+ <dd>
963
+ <p>(Available only when NetCDF version 4 is used. Error is raised if not.)
964
+ Returns the current endian setting.</p>
965
+ <p>Return value</p>
966
+ <ul>
967
+ <li>one of the following constants:
968
+ NetCDF::NC_ENDIAN_NATIVE (=0) (default),
969
+ NetCDF::NC_ENDIAN_LITTLE (=1), or NetCDF::NC_ENDIAN_BIG (=2).</li>
970
+ </ul></dd>
971
+ <dt><h4><a name="label-65" id="label-65"><code>dim(<var>dim_num</var>)</code></a></h4></dt><!-- RDLabel: "dim" -->
871
972
  <dd>
872
973
  <p>Inquires the dim_num-th dimension of the variable (dim_num=0,1,2,..)</p>
873
974
  <p>Arguments</p>
@@ -882,7 +983,7 @@ this method.</p>
882
983
  <ul>
883
984
  <li>(dependent on nc_inq_vardimid)</li>
884
985
  </ul></dd>
885
- <dt><h4><a name="label:58" id="label:58"><code>dims</code></a></h4></dt><!-- RDLabel: "dims" -->
986
+ <dt><h4><a name="label-66" id="label-66"><code>dims</code></a></h4></dt><!-- RDLabel: "dims" -->
886
987
  <dd>
887
988
  <p>Returns an array of all the dimensions of the variable</p>
888
989
  <p>Arguments</p>
@@ -897,7 +998,7 @@ this method.</p>
897
998
  <ul>
898
999
  <li>nc_inq_vardimid</li>
899
1000
  </ul></dd>
900
- <dt><h4><a name="label:59" id="label:59"><code>shape_ul0</code></a></h4></dt><!-- RDLabel: "shape_ul0" -->
1001
+ <dt><h4><a name="label-67" id="label-67"><code>shape_ul0</code></a></h4></dt><!-- RDLabel: "shape_ul0" -->
901
1002
  <dd>
902
1003
  <p>Returns the shape of the variable, but the length of the unlimited dimension is set to zero.
903
1004
  Good to define another variable.</p>
@@ -913,7 +1014,7 @@ Good to define another variable.</p>
913
1014
  <ul>
914
1015
  <li>(dependent on nc_inq_vardimid, nc_inq_unlimdim etc)</li>
915
1016
  </ul></dd>
916
- <dt><h4><a name="label:60" id="label:60"><code>shape_current</code></a></h4></dt><!-- RDLabel: "shape_current" -->
1017
+ <dt><h4><a name="label-68" id="label-68"><code>shape_current</code></a></h4></dt><!-- RDLabel: "shape_current" -->
917
1018
  <dd>
918
1019
  <p>Returns the current shape of the variable.</p>
919
1020
  <p>Arguments</p>
@@ -928,7 +1029,7 @@ Good to define another variable.</p>
928
1029
  <ul>
929
1030
  <li>(dependent on nc_inq_vardimid etc)</li>
930
1031
  </ul></dd>
931
- <dt><h4><a name="label:61" id="label:61"><code>each_att{ ... }</code></a></h4></dt><!-- RDLabel: "each_att" -->
1032
+ <dt><h4><a name="label-69" id="label-69"><code>each_att{ ... }</code></a></h4></dt><!-- RDLabel: "each_att" -->
932
1033
  <dd>
933
1034
  <p>Iterator regarding the global attributes of the variables.
934
1035
  Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
@@ -944,7 +1045,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
944
1045
  <ul>
945
1046
  <li>(dependent on nc_inq_natts, nc_inq_attname)</li>
946
1047
  </ul></dd>
947
- <dt><h4><a name="label:62" id="label:62"><code>dim_names</code></a></h4></dt><!-- RDLabel: "dim_names" -->
1048
+ <dt><h4><a name="label-70" id="label-70"><code>dim_names</code></a></h4></dt><!-- RDLabel: "dim_names" -->
948
1049
  <dd>
949
1050
  <p>Returns the names of all the dimensions of the variable</p>
950
1051
  <p>Arguments</p>
@@ -959,7 +1060,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
959
1060
  <ul>
960
1061
  <li>(dependent on nc_inq_varndims, nc_inq_vardimid, nc_inq_dimname)</li>
961
1062
  </ul></dd>
962
- <dt><h4><a name="label:63" id="label:63"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
1063
+ <dt><h4><a name="label-71" id="label-71"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
963
1064
  <dd>
964
1065
  <p>Returns the names of all the attributes of the variable</p>
965
1066
  <p>Arguments</p>
@@ -974,7 +1075,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
974
1075
  <ul>
975
1076
  <li>(dependent on nc_inq_natts, nc_inq_attname)</li>
976
1077
  </ul></dd>
977
- <dt><h4><a name="label:64" id="label:64"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
1078
+ <dt><h4><a name="label-72" id="label-72"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
978
1079
  <dd>
979
1080
  <p>Returns the name of the variable</p>
980
1081
  <p>Arguments</p>
@@ -989,7 +1090,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
989
1090
  <ul>
990
1091
  <li>nc_inq_varname</li>
991
1092
  </ul></dd>
992
- <dt><h4><a name="label:65" id="label:65"><code>name=(<var>variable_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
1093
+ <dt><h4><a name="label-73" id="label-73"><code>name=(<var>variable_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
993
1094
  <dd>
994
1095
  <p>Rename the variable</p>
995
1096
  <p>Arguments</p>
@@ -1004,7 +1105,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
1004
1105
  <ul>
1005
1106
  <li>nc_rename_var</li>
1006
1107
  </ul></dd>
1007
- <dt><h4><a name="label:66" id="label:66"><code>ndims</code></a></h4></dt><!-- RDLabel: "ndims" -->
1108
+ <dt><h4><a name="label-74" id="label-74"><code>ndims</code></a></h4></dt><!-- RDLabel: "ndims" -->
1008
1109
  <dd>
1009
1110
  <p>Number of dimensions of the variable (which is rank of the variable).</p>
1010
1111
  <p>Arguments</p>
@@ -1019,13 +1120,13 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
1019
1120
  <ul>
1020
1121
  <li>nc_inq_varndims</li>
1021
1122
  </ul></dd>
1022
- <dt><h4><a name="label:67" id="label:67"><code>rank</code></a></h4></dt><!-- RDLabel: "rank" -->
1123
+ <dt><h4><a name="label-75" id="label-75"><code>rank</code></a></h4></dt><!-- RDLabel: "rank" -->
1023
1124
  <dd>
1024
- <p>Aliased to ndims</p></dd>
1025
- <dt><h4><a name="label:68" id="label:68"><code>ntype</code></a></h4></dt><!-- RDLabel: "ntype" -->
1125
+ Aliased to ndims</dd>
1126
+ <dt><h4><a name="label-76" id="label-76"><code>ntype</code></a></h4></dt><!-- RDLabel: "ntype" -->
1026
1127
  <dd>
1027
- <p>Aliased to vartype</p></dd>
1028
- <dt><h4><a name="label:69" id="label:69"><code>vartype</code></a></h4></dt><!-- RDLabel: "vartype" -->
1128
+ Aliased to vartype</dd>
1129
+ <dt><h4><a name="label-77" id="label-77"><code>vartype</code></a></h4></dt><!-- RDLabel: "vartype" -->
1029
1130
  <dd>
1030
1131
  <p>Inquires the data value type of the variable</p>
1031
1132
  <p>Arguments</p>
@@ -1040,7 +1141,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
1040
1141
  <ul>
1041
1142
  <li>nc_inq_vartype</li>
1042
1143
  </ul></dd>
1043
- <dt><h4><a name="label:70" id="label:70"><code>typecode</code></a></h4></dt><!-- RDLabel: "typecode" -->
1144
+ <dt><h4><a name="label-78" id="label-78"><code>typecode</code></a></h4></dt><!-- RDLabel: "typecode" -->
1044
1145
  <dd>
1045
1146
  <p>Inquires the data type of the variable (returns a typecode of NArray)</p>
1046
1147
  <p>Arguments</p>
@@ -1055,7 +1156,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
1055
1156
  <ul>
1056
1157
  <li>nc_inq_vartype</li>
1057
1158
  </ul></dd>
1058
- <dt><h4><a name="label:71" id="label:71"><code>natts</code></a></h4></dt><!-- RDLabel: "natts" -->
1159
+ <dt><h4><a name="label-79" id="label-79"><code>natts</code></a></h4></dt><!-- RDLabel: "natts" -->
1059
1160
  <dd>
1060
1161
  <p>Returns the number of the attributes of the variable</p>
1061
1162
  <p>Arguments</p>
@@ -1070,7 +1171,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
1070
1171
  <ul>
1071
1172
  <li>nc_inq_varnatts</li>
1072
1173
  </ul></dd>
1073
- <dt><h4><a name="label:72" id="label:72"><code>file</code></a></h4></dt><!-- RDLabel: "file" -->
1174
+ <dt><h4><a name="label-80" id="label-80"><code>file</code></a></h4></dt><!-- RDLabel: "file" -->
1074
1175
  <dd>
1075
1176
  <p>Inquires the file that the variable is in</p>
1076
1177
  <p>Arguments</p>
@@ -1085,7 +1186,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
1085
1186
  <ul>
1086
1187
  <li>(none)</li>
1087
1188
  </ul></dd>
1088
- <dt><h4><a name="label:73" id="label:73"><code>att(<var>attribute_name</var>)</code></a></h4></dt><!-- RDLabel: "att" -->
1189
+ <dt><h4><a name="label-81" id="label-81"><code>att(<var>attribute_name</var>)</code></a></h4></dt><!-- RDLabel: "att" -->
1089
1190
  <dd>
1090
1191
  <p>Returns the attribute specified by its name</p>
1091
1192
  <p>Arguments</p>
@@ -1100,7 +1201,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
1100
1201
  <ul>
1101
1202
  <li>(nc_inq_attid is used for inquiry)</li>
1102
1203
  </ul></dd>
1103
- <dt><h4><a name="label:74" id="label:74"><code>put_att(<var>attribute_name</var>, <var>value</var>, <var>atttype</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "put_att" -->
1204
+ <dt><h4><a name="label-82" id="label-82"><code>put_att(<var>attribute_name</var>, <var>value</var>, <var>atttype</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "put_att" -->
1104
1205
  <dd>
1105
1206
  <p>Sets an attribute</p>
1106
1207
  <p>Arguments</p>
@@ -1120,10 +1221,10 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
1120
1221
  <ul>
1121
1222
  <li>nc_put_att_&lt;type&gt;</li>
1122
1223
  </ul></dd>
1123
- <dt><h4><a name="label:75" id="label:75"><code>put(<var>value</var>, <var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "put" -->
1224
+ <dt><h4><a name="label-83" id="label-83"><code>put(<var>value</var>, <var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "put" -->
1124
1225
  <dd>
1125
- <p>Aliased to <a href="#label:76">simple_put</a></p></dd>
1126
- <dt><h4><a name="label:76" id="label:76"><code>simple_put(<var>value</var>, <var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "simple_put" -->
1226
+ Aliased to <a href="#label-84">simple_put</a></dd>
1227
+ <dt><h4><a name="label-84" id="label-84"><code>simple_put(<var>value</var>, <var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "simple_put" -->
1127
1228
  <dd>
1128
1229
  <p>Set the values of the variable</p>
1129
1230
  <p>Arguments</p>
@@ -1163,7 +1264,7 @@ with respect to the 2nd dimension</p></li>
1163
1264
  <ul>
1164
1265
  <li>nc_put_var_&lt;type&gt;, nc_put_vars_&lt;type&gt;, nc_put_var1_&lt;type&gt;</li>
1165
1266
  </ul></dd>
1166
- <dt><h4><a name="label:77" id="label:77"><code>pack(<var>na</var>)</code></a></h4></dt><!-- RDLabel: "pack" -->
1267
+ <dt><h4><a name="label-85" id="label-85"><code>pack(<var>na</var>)</code></a></h4></dt><!-- RDLabel: "pack" -->
1167
1268
  <dd>
1168
1269
  <p>Pack a NArray (etc) using the attributes scale_factor and/or add_offset of self.</p>
1169
1270
  <p>If scale_factor and/or add_offset is defined, returns
@@ -1176,14 +1277,14 @@ with respect to the 2nd dimension</p></li>
1176
1277
  <ul>
1177
1278
  <li>a NArray or NArrayMiss</li>
1178
1279
  </ul></dd>
1179
- <dt><h4><a name="label:78" id="label:78"><code>scaled_put(<var>value</var>, <var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "scaled_put" -->
1280
+ <dt><h4><a name="label-86" id="label-86"><code>scaled_put(<var>value</var>, <var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "scaled_put" -->
1180
1281
  <dd>
1181
- <p>Same as <a href="#label:76">simple_put</a> but interprets the attributes scale_factor and/or add_offset using <a href="#label:77">pack</a>.</p>
1182
- <p>See the document for <a href="#label:76">simple_put</a> for arguments etc.</p></dd>
1183
- <dt><h4><a name="label:79" id="label:79"><code>get(<var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "get" -->
1282
+ <p>Same as <a href="#label-84">simple_put</a> but interprets the attributes scale_factor and/or add_offset using <a href="#label-85">pack</a>.</p>
1283
+ <p>See the document for <a href="#label-84">simple_put</a> for arguments etc.</p></dd>
1284
+ <dt><h4><a name="label-87" id="label-87"><code>get(<var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "get" -->
1184
1285
  <dd>
1185
- <p>Aliased to <a href="#label:80">simple_get</a>.</p></dd>
1186
- <dt><h4><a name="label:80" id="label:80"><code>simple_get(<var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "simple_get" -->
1286
+ Aliased to <a href="#label-88">simple_get</a>.</dd>
1287
+ <dt><h4><a name="label-88" id="label-88"><code>simple_get(<var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "simple_get" -->
1187
1288
  <dd>
1188
1289
  <p>Returns values of the variable</p>
1189
1290
  <p>Arguments</p>
@@ -1200,7 +1301,7 @@ with respect to the 2nd dimension</p></li>
1200
1301
  <ul>
1201
1302
  <li>nc_get_var_&lt;type&gt;, nc_get_vars_&lt;type&gt;, nc_get_var1_&lt;type&gt;</li>
1202
1303
  </ul></dd>
1203
- <dt><h4><a name="label:81" id="label:81"><code>unpack(<var>na</var>)</code></a></h4></dt><!-- RDLabel: "unpack" -->
1304
+ <dt><h4><a name="label-89" id="label-89"><code>unpack(<var>na</var>)</code></a></h4></dt><!-- RDLabel: "unpack" -->
1204
1305
  <dd>
1205
1306
  <p>Unpack a NArray (etc) using the attributes scale_factor and/or add_offset of self.</p>
1206
1307
  <p>If scale_factor and/or add_offset is defined, returns
@@ -1208,7 +1309,7 @@ na * scale_factor + add_offset. Returns na if not.
1208
1309
  Type conversion is made by the coercing -- for example
1209
1310
  if na is sint and scale_factor and add_offset is sfloat,
1210
1311
  return value is sfloat. The type of the return value can be specified
1211
- explicitly with <a href="#label:54">NetCDFVar.unpack_type=</a>.</p>
1312
+ explicitly with <a href="#label-58">NetCDFVar.unpack_type=</a>.</p>
1212
1313
  <p>Arguments</p>
1213
1314
  <ul>
1214
1315
  <li>na : a numeric array to unpack (NArray, or NArrayMiss)</li>
@@ -1217,11 +1318,11 @@ explicitly with <a href="#label:54">NetCDFVar.unpack_type=</a>.</p>
1217
1318
  <ul>
1218
1319
  <li>a NArray or NArrayMiss</li>
1219
1320
  </ul></dd>
1220
- <dt><h4><a name="label:82" id="label:82"><code>scaled_get(<var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "scaled_get" -->
1321
+ <dt><h4><a name="label-90" id="label-90"><code>scaled_get(<var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "scaled_get" -->
1221
1322
  <dd>
1222
- <p>Same as <a href="#label:80">simple_get</a> but interprets the attributes scale_factor and/or add_offset using <a href="#label:81">unpack</a>.</p>
1223
- <p>See the document for <a href="#label:80">simple_get</a> for arguments etc.</p></dd>
1224
- <dt><h4><a name="label:83" id="label:83"><code>[]</code></a></h4></dt><!-- RDLabel: "[]" -->
1323
+ <p>Same as <a href="#label-88">simple_get</a> but interprets the attributes scale_factor and/or add_offset using <a href="#label-89">unpack</a>.</p>
1324
+ <p>See the document for <a href="#label-88">simple_get</a> for arguments etc.</p></dd>
1325
+ <dt><h4><a name="label-91" id="label-91"><code>[]</code></a></h4></dt><!-- RDLabel: "[]" -->
1225
1326
  <dd>
1226
1327
  <p>Same as NetCDFVar#get but a subset is specified as in the method [] of NArray. </p>
1227
1328
  <p>In addition to the subset specifications supported by NArray,
@@ -1230,7 +1331,7 @@ like {0..-1, 3}, i.e., a 1-element Hash with the key and value
1230
1331
  representing the range (Range) and the step (Integer), respectively.
1231
1332
  Unlike NArray, 1-dimensional indexing of multi-dimensional
1232
1333
  variables is not support.</p></dd>
1233
- <dt><h4><a name="label:84" id="label:84"><code>[] = </code></a></h4></dt><!-- RDLabel: "[]=" -->
1334
+ <dt><h4><a name="label-92" id="label-92"><code>[] = </code></a></h4></dt><!-- RDLabel: "[]=" -->
1234
1335
  <dd>
1235
1336
  <p>Same as NetCDFVar#put but a subset is specified as in the method []= of NArray. </p>
1236
1337
  <p>In addition to the subset specifications supported by NArray,
@@ -1240,11 +1341,11 @@ representing the range (Range) and the step (Integer), respectively.
1240
1341
  Unlike NArray, 1-dimensional indexing of multi-dimensional
1241
1342
  variables is not support.</p></dd>
1242
1343
  </dl>
1243
- <h3><a name="label:85" id="label:85">Instance Methods added by requiring "numru/netcdf_miss"</a></h3><!-- RDLabel: "Instance Methods added by requiring "numru/netcdf_miss"" -->
1344
+ <h3><a name="label-93" id="label-93">Instance Methods added by requiring "numru/netcdf_miss"</a></h3><!-- RDLabel: "Instance Methods added by requiring "numru/netcdf_miss"" -->
1244
1345
  <dl>
1245
- <dt><h4><a name="label:86" id="label:86"><code>get_with_miss(<var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "get_with_miss" -->
1346
+ <dt><h4><a name="label-94" id="label-94"><code>get_with_miss(<var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "get_with_miss" -->
1246
1347
  <dd>
1247
- <p>Same as <a href="#label:79">get</a> but interprets data missing.</p>
1348
+ <p>Same as <a href="#label-87">get</a> but interprets data missing.</p>
1248
1349
  <p>Data missing is specified by the standard attributes valid_range,
1249
1350
  (valid_min and/or valid_max), or missing_value, with the precedence being
1250
1351
  this order. Unlike the
@@ -1257,7 +1358,7 @@ If not, it returns a NArray. Thus, you can use this whether
1257
1358
  data missing is defined or not. </p>
1258
1359
  <p>Arguments</p>
1259
1360
  <ul>
1260
- <li>See <a href="#label:79">get</a>.</li>
1361
+ <li>See <a href="#label-87">get</a>.</li>
1261
1362
  </ul>
1262
1363
  <p>Return value</p>
1263
1364
  <ul>
@@ -1270,12 +1371,12 @@ data missing is defined or not. </p>
1270
1371
  </ul>
1271
1372
  <p>Corresponding (dependent) function(s) in the C library of NetCDF</p>
1272
1373
  <ul>
1273
- <li>See <a href="#label:79">get</a>. This method is written in Ruby.</li>
1374
+ <li>See <a href="#label-87">get</a>. This method is written in Ruby.</li>
1274
1375
  </ul>
1275
1376
  <p>EXAMPLE</p>
1276
1377
  <ul>
1277
- <li><p>The following is an example to replace <a href="#label:79">get</a> with <a href="#label:86">get_with_miss</a>.
1278
- It will also make <a href="#label:83">[]</a> interpret data missing,
1378
+ <li><p>The following is an example to replace <a href="#label-87">get</a> with <a href="#label-94">get_with_miss</a>.
1379
+ It will also make <a href="#label-91">[]</a> interpret data missing,
1279
1380
  since it calls <code>get</code> internally.</p>
1280
1381
  <pre>file = NetCDF.open('hogehoge.nc')
1281
1382
  var = file.var('var')
@@ -1283,9 +1384,9 @@ def var.get(*args); get_with_miss(*args); end
1283
1384
  p var.get # --&gt; interprets data missing if defined
1284
1385
  p var[0..-1,0] # --&gt; interprets data missing if defined (assumed 2D)</pre></li>
1285
1386
  </ul></dd>
1286
- <dt><h4><a name="label:87" id="label:87"><code>get_with_miss_and_scaling(<var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "get_with_miss_and_scaling" -->
1387
+ <dt><h4><a name="label-95" id="label-95"><code>get_with_miss_and_scaling(<var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "get_with_miss_and_scaling" -->
1287
1388
  <dd>
1288
- <p>Same as <a href="#label:86">get_with_miss</a> but handles data scaling too using <a href="#label:81">unpack</a>.</p>
1389
+ <p>Same as <a href="#label-94">get_with_miss</a> but handles data scaling too using <a href="#label-89">unpack</a>.</p>
1289
1390
  <p>Missing data handling using valid_* / missing_value is applied
1290
1391
  basically to packed data, which is consistent with most
1291
1392
  conventions. However, it is applied to unpacked data
@@ -1296,13 +1397,13 @@ This treatment can handle all conventions.</p>
1296
1397
  <ul>
1297
1398
  <li>See above. The same thing applies.</li>
1298
1399
  </ul></dd>
1299
- <dt><h4><a name="label:88" id="label:88"><code>put_with_miss(<var>value</var>, <var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "put_with_miss" -->
1400
+ <dt><h4><a name="label-96" id="label-96"><code>put_with_miss(<var>value</var>, <var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "put_with_miss" -->
1300
1401
  <dd>
1301
- <p>Same as <a href="#label:75">put</a> but interprets data missing.</p>
1302
- <p>If <code>value</code> is an NArray, the methods behaves as <a href="#label:75">put</a>.
1402
+ <p>Same as <a href="#label-83">put</a> but interprets data missing.</p>
1403
+ <p>If <code>value</code> is an NArray, the methods behaves as <a href="#label-83">put</a>.
1303
1404
  Data missing in <code>value</code> is interpreted if it is an NArrayMiss
1304
1405
  and data missing is specified by attributes in <code>self</code>
1305
- (see <a href="#label:86">get_with_miss</a> ).
1406
+ (see <a href="#label-94">get_with_miss</a> ).
1306
1407
  Namely, the data which are "invalid" in the <code>value</code> is replaced
1307
1408
  with a missing value when written in the file.
1308
1409
  (missing_value or _FillValue or a value outside
@@ -1310,8 +1411,8 @@ the valid range). No check is made whether "valid" values in the
1310
1411
  NArrayMiss is within the valid range of <code>self</code>.</p>
1311
1412
  <p>Arguments</p>
1312
1413
  <ul>
1313
- <li>value : NArrayMiss or what is allowed in <a href="#label:75">put</a>.</li>
1314
- <li>option (Hash) : See <a href="#label:75">put</a>.</li>
1414
+ <li>value : NArrayMiss or what is allowed in <a href="#label-83">put</a>.</li>
1415
+ <li>option (Hash) : See <a href="#label-83">put</a>.</li>
1315
1416
  </ul>
1316
1417
  <p>Return value</p>
1317
1418
  <ul>
@@ -1319,12 +1420,12 @@ NArrayMiss is within the valid range of <code>self</code>.</p>
1319
1420
  </ul>
1320
1421
  <p>Corresponding (dependent) function(s) in the C library of NetCDF</p>
1321
1422
  <ul>
1322
- <li>See <a href="#label:75">put</a>. This method is written in Ruby.</li>
1423
+ <li>See <a href="#label-83">put</a>. This method is written in Ruby.</li>
1323
1424
  </ul>
1324
1425
  <p>EXAMPLE</p>
1325
1426
  <ul>
1326
- <li><p>The following is an example to replace <a href="#label:75">put</a> with <a href="#label:88">put_with_miss</a>.
1327
- It will also make <a href="#label:84">[]=</a> interpret data missing,
1427
+ <li><p>The following is an example to replace <a href="#label-83">put</a> with <a href="#label-96">put_with_miss</a>.
1428
+ It will also make <a href="#label-92">[]=</a> interpret data missing,
1328
1429
  since it calls <code>put</code> internally.</p>
1329
1430
  <pre>file = NetCDF.open('hogehoge.nc')
1330
1431
  var = file.var('var')
@@ -1332,9 +1433,9 @@ def var.put(*args); put_with_miss(*args); end
1332
1433
  var.put = narray_miss # --&gt; interprets data missing if defined
1333
1434
  var[0..-1,0] = narray_miss # --&gt; interprets data missing if defined (assumed 2D)</pre></li>
1334
1435
  </ul></dd>
1335
- <dt><h4><a name="label:89" id="label:89"><code>put_with_miss_and_scaling(<var>value</var>, <var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "put_with_miss_and_scaling" -->
1436
+ <dt><h4><a name="label-97" id="label-97"><code>put_with_miss_and_scaling(<var>value</var>, <var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "put_with_miss_and_scaling" -->
1336
1437
  <dd>
1337
- <p>Same as <a href="#label:88">put_with_miss</a> but handles data scaling too using <a href="#label:77">pack</a>.</p>
1438
+ <p>Same as <a href="#label-96">put_with_miss</a> but handles data scaling too using <a href="#label-85">pack</a>.</p>
1338
1439
  <p>Missing data handling using valid_* / missing_value is applied
1339
1440
  basically to packed data, which is consistent with most
1340
1441
  conventions. However, it is applied to unpacked data
@@ -1347,11 +1448,11 @@ This treatment can handle all conventions.</p>
1347
1448
  </ul></dd>
1348
1449
  </dl>
1349
1450
  <p>---------------------------------------------</p>
1350
- <h1><a name="label:90" id="label:90">class NetCDFAtt</a></h1><!-- RDLabel: "class NetCDFAtt" -->
1351
- <h3><a name="label:91" id="label:91">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
1352
- <h3><a name="label:92" id="label:92">Instance Methods</a></h3><!-- RDLabel: "Instance Methods" -->
1451
+ <h1><a name="label-98" id="label-98">class NetCDFAtt</a></h1><!-- RDLabel: "class NetCDFAtt" -->
1452
+ <h3><a name="label-99" id="label-99">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
1453
+ <h3><a name="label-100" id="label-100">Instance Methods</a></h3><!-- RDLabel: "Instance Methods" -->
1353
1454
  <dl>
1354
- <dt><h4><a name="label:93" id="label:93"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
1455
+ <dt><h4><a name="label-101" id="label-101"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
1355
1456
  <dd>
1356
1457
  <p>Returns the name of the attribute</p>
1357
1458
  <p>Arguments</p>
@@ -1366,7 +1467,7 @@ This treatment can handle all conventions.</p>
1366
1467
  <ul>
1367
1468
  <li>(none)</li>
1368
1469
  </ul></dd>
1369
- <dt><h4><a name="label:94" id="label:94"><code>name=(<var>attribute_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
1470
+ <dt><h4><a name="label-102" id="label-102"><code>name=(<var>attribute_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
1370
1471
  <dd>
1371
1472
  <p>Rename the attribute</p>
1372
1473
  <p>Arguments</p>
@@ -1381,7 +1482,7 @@ This treatment can handle all conventions.</p>
1381
1482
  <ul>
1382
1483
  <li>nc_rename_att</li>
1383
1484
  </ul></dd>
1384
- <dt><h4><a name="label:95" id="label:95"><code>copy(<var>var_or_file</var>)</code></a></h4></dt><!-- RDLabel: "copy" -->
1485
+ <dt><h4><a name="label-103" id="label-103"><code>copy(<var>var_or_file</var>)</code></a></h4></dt><!-- RDLabel: "copy" -->
1385
1486
  <dd>
1386
1487
  <p>Copies an attribute to a variable or a file. If file, becomes an global attribute</p>
1387
1488
  <p>Arguments</p>
@@ -1396,7 +1497,7 @@ This treatment can handle all conventions.</p>
1396
1497
  <ul>
1397
1498
  <li>nc_copy_att</li>
1398
1499
  </ul></dd>
1399
- <dt><h4><a name="label:96" id="label:96"><code>delete</code></a></h4></dt><!-- RDLabel: "delete" -->
1500
+ <dt><h4><a name="label-104" id="label-104"><code>delete</code></a></h4></dt><!-- RDLabel: "delete" -->
1400
1501
  <dd>
1401
1502
  <p>Delete an attribute</p>
1402
1503
  <p>Arguments</p>
@@ -1411,7 +1512,7 @@ This treatment can handle all conventions.</p>
1411
1512
  <ul>
1412
1513
  <li>nc_del_att</li>
1413
1514
  </ul></dd>
1414
- <dt><h4><a name="label:97" id="label:97"><code>put(<var>value</var>, <var>atttype</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "put" -->
1515
+ <dt><h4><a name="label-105" id="label-105"><code>put(<var>value</var>, <var>atttype</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "put" -->
1415
1516
  <dd>
1416
1517
  <p>Sets the value of the attribute</p>
1417
1518
  <p>Arguments</p>
@@ -1430,7 +1531,7 @@ This treatment can handle all conventions.</p>
1430
1531
  <ul>
1431
1532
  <li>nc_put_att_&lt;type&gt;</li>
1432
1533
  </ul></dd>
1433
- <dt><h4><a name="label:98" id="label:98"><code>get</code></a></h4></dt><!-- RDLabel: "get" -->
1534
+ <dt><h4><a name="label-106" id="label-106"><code>get</code></a></h4></dt><!-- RDLabel: "get" -->
1434
1535
  <dd>
1435
1536
  <p>Returns the values of the attribute</p>
1436
1537
  <p>Arguments</p>
@@ -1446,7 +1547,7 @@ This treatment can handle all conventions.</p>
1446
1547
  <ul>
1447
1548
  <li>nc_get_att_&lt;type&gt;</li>
1448
1549
  </ul></dd>
1449
- <dt><h4><a name="label:99" id="label:99"><code>atttype</code></a></h4></dt><!-- RDLabel: "atttype" -->
1550
+ <dt><h4><a name="label-107" id="label-107"><code>atttype</code></a></h4></dt><!-- RDLabel: "atttype" -->
1450
1551
  <dd>
1451
1552
  <p>Inquires the type of attribute values</p>
1452
1553
  <p>Arguments</p>
@@ -1461,7 +1562,7 @@ This treatment can handle all conventions.</p>
1461
1562
  <ul>
1462
1563
  <li>nc_inq_atttype</li>
1463
1564
  </ul></dd>
1464
- <dt><h4><a name="label:100" id="label:100"><code>atttype</code></a></h4></dt><!-- RDLabel: "atttype" -->
1565
+ <dt><h4><a name="label-108" id="label-108"><code>atttype</code></a></h4></dt><!-- RDLabel: "atttype" -->
1465
1566
  <dd>
1466
1567
  <p>Inquires the type of attribute values (returns a NArray typecode)</p>
1467
1568
  <p>Arguments</p>