[ruby-netcdf] 02/07: Imported Upstream version 0.7.1.1

Youhei SASAKI uwabami-guest at moszumanska.debian.org
Thu Jul 30 10:56:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

uwabami-guest pushed a commit to branch master
in repository ruby-netcdf.

commit e8902dbf3193e7506f0b5919e93a13d4b0dd78eb
Author: Youhei SASAKI <uwabami at gfd-dennou.org>
Date:   Thu Jul 30 18:49:01 2015 +0900

    Imported Upstream version 0.7.1.1
---
 .gitignore            |    8 +
 .rspec                |    2 +
 .travis.yml           |    3 +
 ChangeLog             |   51 ++
 Gemfile               |    4 +
 Rakefile              |    2 +
 bin/console           |   14 +
 bin/setup             |    7 +
 demo/demo5-netcdf4.rb |   44 ++
 doc/Ref_man.html      |  579 +++++++++-------
 doc/Ref_man.rd        |   91 +++
 doc/Ref_man_jp.html   | 1775 ++++++++++++++++++++++++++-----------------------
 doc/Ref_man_jp.rd     |   95 +++
 doc/to_html           |    6 +-
 extconf.rb            |  181 +++--
 lib/netcdf.rb         |  162 +++--
 lib/version.rb        |    5 +
 metadata.yml          |  138 ++++
 netcdfraw.c           |  445 ++++++++-----
 ruby-netcdf.gemspec   |   34 +
 20 files changed, 2261 insertions(+), 1385 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..359a4c0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+/.bundle/
+/.yardoc
+/Gemfile.lock
+/_yardoc/
+/coverage/
+/pkg/
+/spec/reports/
+/tmp/
diff --git a/.rspec b/.rspec
new file mode 100644
index 0000000..8c18f1a
--- /dev/null
+++ b/.rspec
@@ -0,0 +1,2 @@
+--format documentation
+--color
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..11a115a
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,3 @@
+language: ruby
+rvm:
+  - 1.9.3
diff --git a/ChangeLog b/ChangeLog
index 79857f6..2277260 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,54 @@
+Tue Jan 27  2015  T Horinouchi
+	* ruby-netcdf-0.7.1 released (relase tag: ruby-netcdf-0_7_1)
+Tue Jan 27  2015  T Horinouchi
+	* doc/ updated
+	* demo/demo5-netcdf4.rb: created
+	* netcdfraw.c:
+	  * added new NetCDF-4 methods:
+	    * NetCDFVar::deflate : to set compression
+	    * NetCDFVar::deflate_params : returns current values of
+	      compression parameters
+	    * NetCDFVar::endian= : set (change) the endian
+	    * NetCDFVar::endian : returns the current endian setting
+	   * added new constants: NC_ENDIAN_NATIVE (=0),
+	     NC_ENDIAN_LITTLE (=1), NC_ENDIAN_BIG (=2)
+	   * updated the safe-level condition, which was missed in the
+	     change on Jan 22.
+Fri Jan 23  2015  T Horinouchi
+	* doc/ updated
+Thu Jan 22  2015  T Horinouchi
+	* ruby-netcdf-0.7.0 released (relase tag: ruby-netcdf-0_7_0)
+Thu Jan 22  2015  T Horinouchi
+	* netcdfraw.c:
+	  * revised based on the patch posted by seiya with
+	    [dennou-ruby:003705] but adopted the typedef in the latest
+	    narray-bigmem (namely, used na_shape_t).
+	  * changed rb_secure(4) to rb_secure(3), since security
+	    level 4 is abolished in ruby 2.
+	  * further type update to na_shape_t (not covered
+	    by the patch)
+	  * deleted the unused variable nc_tlen in many methods.
+	* lib/netcdf.rb: revised along the patch [dennou-ruby:003705].
+	* extconf.rb: supported to configure gem-installed narray
+Mon Sep  8  2014  T Horinouchi
+	* lib/netcdf.rb: Tentative treatment of the very slow netcdf-4's
+	  strided reading.
+Sat Sep  6  2014  T Horinouchi
+	* netcdfraw.c: Added constants such as NC_NETCDF4;
+	  This enables one to individually specify the creation format by
+	  using the low level interface NetCDF.nc_create
+	* lib/netcdf.rb: Supported the "default" file creation format
+	  by adding NetCDF.creation_format= and NetCDF.creation_format.
+	* lib/netcdf.rb: Refactoring of NetCDF#simple_get.
+Sat Sep  6  2014  T Horinouchi
+	* extconf.rb
+	  * introduced the macro NCVER
+	  * changed to give a higer priority to NetCDF 4;
+	  * added $vendorarchdir to dir_config
+	* netcdfraw.c: Added the class method NetCDF.libvers (<- nc_inq_libvers)
+	* lib/netcdf.rb: Added the class constant NCVERSION (<- NetCDF.libvers)
+Mon Aug 25  2014  T Horinouchi
+	* netcdfraw.c: to avoid a compile error when -Werror=format-security
 Sun Feb 19  2011  T Horinouchi
 	* ruby-netcdf-0.6.6 released (relase tag: ruby-netcdf-0_6_6)
 	* lib/netcdf.rb: method pack: debug of enbug made 
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..b6c363e
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,4 @@
+source 'https://rubygems.org'
+
+# Specify your gem's dependencies in ruby-netcdf.gemspec
+gemspec
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..809eb56
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,2 @@
+require "bundler/gem_tasks"
+
diff --git a/bin/console b/bin/console
new file mode 100644
index 0000000..05ba4f4
--- /dev/null
+++ b/bin/console
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+
+require "bundler/setup"
+require "ruby/netcdf"
+
+# You can add fixtures and/or initialization code here to make experimenting
+# with your gem easier. You can also use a different console, if you like.
+
+# (If you use this, don't forget to add pry to your Gemfile!)
+# require "pry"
+# Pry.start
+
+require "irb"
+IRB.start
diff --git a/bin/setup b/bin/setup
new file mode 100644
index 0000000..b65ed50
--- /dev/null
+++ b/bin/setup
@@ -0,0 +1,7 @@
+#!/bin/bash
+set -euo pipefail
+IFS=$'\n\t'
+
+bundle install
+
+# Do any other automated setup that you need to do here
diff --git a/demo/demo5-netcdf4.rb b/demo/demo5-netcdf4.rb
new file mode 100644
index 0000000..af7726b
--- /dev/null
+++ b/demo/demo5-netcdf4.rb
@@ -0,0 +1,44 @@
+require "numru/netcdf"
+include NumRu
+
+file3 = NetCDF.create("test_nc3.nc")
+
+NetCDF.creation_format = ( NetCDF::NC_NETCDF4 | NetCDF::NC_CLASSIC_MODEL )
+file4 = NetCDF.create("test_nc4.nc")
+
+nx, ny = 100, 50
+
+[ file3, file4 ].each do |file|
+  xdim = file.def_dim("x",nx)
+  ydim = file.def_dim("y",ny)
+  x = file.def_var("x","sfloat",[xdim])
+  y = file.def_var("y","sfloat",[ydim])
+
+  v1 = file.def_var("v1","sfloat",[xdim,ydim])
+  v2 = file.def_var("v2","int",[xdim,ydim])
+
+  if /nc4/ =~ file.path
+    v1.deflate(2)       # set the deflation (compression) level 2
+    v2.deflate(2,true)  # set the deflation level 2 with the shuffle filter
+
+    puts "v1 deflate params:"
+    p v1.deflate_params
+    puts "v2 deflate params:"
+    p v2.deflate_params
+  end
+
+  file.enddef
+
+  x.put( NArray.float(nx).indgen! )
+  y.put( NArray.float(ny).indgen! )
+
+  z = NArray.float(nx,ny).indgen! + 1000000
+  z[true,ny/2..-1] = 0  # to see the impac
+  
+  v1.put(z)
+  v2.put(z)
+  file.close
+end
+
+puts "Created test_nc3.nc test_nc4.nc.", "File size comparison:"
+print `ls -l test_nc3.nc test_nc4.nc`
diff --git a/doc/Ref_man.html b/doc/Ref_man.html
index 00edb4d..82c8eb0 100644
--- a/doc/Ref_man.html
+++ b/doc/Ref_man.html
@@ -4,15 +4,16 @@
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<title>Ref_man.rd</title>
+<title>Untitled</title>
 </head>
 <body>
-<h1><a name="label:0" id="label:0">RubyNetCDF Reference Manual</a></h1><!-- RDLabel: "RubyNetCDF Reference Manual" -->
+<h1><a name="label-0" id="label-0">RubyNetCDF Reference Manual</a></h1><!-- RDLabel: "RubyNetCDF Reference Manual" -->
+<p>RubyNetCDF version : 0.7.1</p>
 <ul>
-<li><a href="#label:9">Method Index</a></li>
+<li><a href="#label-9">Method Index</a></li>
 </ul>
 <p>---------------------------------------------</p>
-<h2><a name="label:1" id="label:1">Overview</a></h2><!-- RDLabel: "Overview" -->
+<h2><a name="label-1" id="label-1">Overview</a></h2><!-- RDLabel: "Overview" -->
 <p>RubyNetCDF is the Ruby interface of the NetCDF library. Ruby is a free 
 object-oriented scripting language and is freely available from
 <a href="http://www.ruby-lang.org/">the Ruby homepage</a>. 
@@ -26,26 +27,28 @@ tests suggests that NArray is more efficient than NumPy.
 Optionally, RubyNetCDF offers methods to handle data missing 
 automatically. To use it, you will also
 need <a href="http://ruby.gfd-dennou.org/products/narray_miss/">NArrayMiss</a>. 
-See <a href="#label:6">Usage</a> for details.</p>
-<h3><a name="label:2" id="label:2">Structure</a></h3><!-- RDLabel: "Structure" -->
+See <a href="#label-6">Usage</a> for details.</p>
+<p>Currently, NetCDF-4 support is partial (the new data models have not been
+supported).</p>
+<h3><a name="label-2" id="label-2">Structure</a></h3><!-- RDLabel: "Structure" -->
 <p>RubyNetCDF consists of the four classes in the following.</p>
 <ul>
-<li><p><a href="#label:10">class NetCDF</a> -- the file class</p>
+<li><p><a href="#label-10">class NetCDF</a> -- the file class</p>
 <p>An NetCDF object represents a NetCDF file</p></li>
-<li><p><a href="#label:43">class NetCDFDim</a> -- the dimension class</p>
+<li><p><a href="#label-47">class NetCDFDim</a> -- the dimension class</p>
 <p>Although in its C version a NetCDF dimension is represented by a
 combination of a file ID and a dimension ID, it is represented by
 only one NetCDFDim object in RubyNetCDF.</p></li>
-<li><p><a href="#label:51">class NetCDFVar</a> -- the variable class</p>
+<li><p><a href="#label-55">class NetCDFVar</a> -- the variable class</p>
 <p>Although in its C version a NetCDF variable is represented by a
 combination of a file ID and a variable ID, it is represented by
 only one NetCDFVar object in RubyNetCDF.</p></li>
-<li><p><a href="#label:90">class NetCDFAtt</a> -- the attribute class</p>
+<li><p><a href="#label-98">class NetCDFAtt</a> -- the attribute class</p>
 <p>Although in its C version a NetCDF attribute is represented by a
 combination of file ID, variable ID, and its name, it is represented
 by only one NetCDFAtt object in RubyNetCDF.</p></li>
 </ul>
-<h3><a name="label:3" id="label:3">Data type</a></h3><!-- RDLabel: "Data type" -->
+<h3><a name="label-3" id="label-3">Data type</a></h3><!-- RDLabel: "Data type" -->
 <p>All the NetCDF variable types char, byte, short, int, float, and
 double are supported in this Ruby interface. These types are called,
 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
 into a "byte".  This is because NArray does not have a "char" type.
 However, it not is not supposed to be a problem, since a byte NArray
 can easily handle string data.</p>
-<h3><a name="label:4" id="label:4">Error handling</a></h3><!-- RDLabel: "Error handling" -->
+<h3><a name="label-4" id="label-4">Error handling</a></h3><!-- RDLabel: "Error handling" -->
 <p>Errors are basically handled by raising exceptions. However, light
 errors in value-returning methods are handled by returning nil (e.g.,
 if a non-existent attribute name is specified in attribute reading).
 Those methods that return nil on error are explicitly written as such 
 in the following.</p>
-<h3><a name="label:5" id="label:5">Security features</a></h3><!-- RDLabel: "Security features" -->
+<h3><a name="label-5" id="label-5">Security features</a></h3><!-- RDLabel: "Security features" -->
 <p>Security handling is done just as in the pre-defined File class.</p>
-<h3><a name="label:6" id="label:6">Usage</a></h3><!-- RDLabel: "Usage" -->
+<h3><a name="label-6" id="label-6">Usage</a></h3><!-- RDLabel: "Usage" -->
 <p>To use the RubyNetCDF library, load the library first by placing the
 following line in your Ruby program to load the library:</p>
 <pre>require 'numru/netcdf'</pre>
@@ -105,9 +108,9 @@ file = NetCDF.create('tmp.nc')
 <p>For more examples, see demo and test programs included in the
 distribution package.</p>
 <p>---------------------------------------------</p>
-<h2><a name="label:7" id="label:7">How to read this manual</a></h2><!-- RDLabel: "How to read this manual" -->
+<h2><a name="label-7" id="label-7">How to read this manual</a></h2><!-- RDLabel: "How to read this manual" -->
 <dl>
-<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" -->
+<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" -->
 <dd>
 <p>Explanation of its function</p>
 <p>Arguments</p>
@@ -128,120 +131,158 @@ distribution package.</p>
 </ul></dd>
 </dl>
 <p>---------------------------------------------</p>
-<h2><a name="label:9" id="label:9">Method Index</a></h2><!-- RDLabel: "Method Index" -->
+<h2><a name="label-9" id="label-9">Method Index</a></h2><!-- RDLabel: "Method Index" -->
 <ul>
-<li><p><a href="#label:10">class NetCDF</a></p>
+<li><p><a href="#label-10">class NetCDF</a></p>
 <p>Class Methods</p>
 <ul>
-<li><a href="#label:12">NetCDF.open</a>     Opens a file (class method). If mode="w" and non-existent, a new</li>
-<li><a href="#label:13">NetCDF.new</a>     Aliased to NetCDF.open</li>
-<li><a href="#label:14">NetCDF.create</a>     Creates a NetCDF file (class method)</li>
-<li><a href="#label:15">NetCDF.create_tmp</a>     Creates a temporary NetCDF file (class method)</li>
+<li><a href="#label-13">NetCDF.nc4?</a> returens wheather the linked library is NetCDF-4 (true/false)</li>
+<li><a href="#label-14">NetCDF.creation_format=</a> Set the file format created by NetCDF.create (for NetCDF-4 only).</li>
+<li><a href="#label-15">NetCDF.creation_format</a> Returns the current setting of the creation format (for NetCDF-4 only).</li>
+<li><a href="#label-16">NetCDF.open</a>     Opens a file (class method). If mode="w" and non-existent, a new</li>
+<li><a href="#label-17">NetCDF.new</a>     Aliased to NetCDF.open</li>
+<li><a href="#label-18">NetCDF.create</a>     Creates a NetCDF file (class method)</li>
+<li><a href="#label-19">NetCDF.create_tmp</a>     Creates a temporary NetCDF file (class method)</li>
 </ul>
 <p>Instance Methods</p>
 <ul>
-<li><a href="#label:17">close</a>     Closes the file.</li>
-<li><a href="#label:18">ndims</a>     Returns the number of dimensions in the file</li>
-<li><a href="#label:19">nvars</a>     Returns the number of variables in the file</li>
-<li><a href="#label:20">natts</a>     Returns the number of global attributes in the file</li>
-<li><a href="#label:21">unlimited</a>     Returns the unlimited dimension in the file</li>
-<li><a href="#label:22">path</a>     Returns the path of the file (contents of the filename specified when opened/created)</li>
-<li><a href="#label:23">redef</a>     Switches to the define mode. Does nothing if already in it (nil returned).</li>
-<li><a href="#label:24">enddef</a>     Switches to the data mode. Does nothing if already in it (nil returned).</li>
-<li><a href="#label:25">define_mode?</a>     Inquire whether the file is in the define mode.</li>
-<li><a href="#label:26">sync</a>     Synchronizes the disk copy of a netCDF dataset with in-memory buffer</li>
-<li><a href="#label:27">def_dim</a>     Define a dimension</li>
-<li><a href="#label:28">put_att</a>     Sets a global attribute</li>
-<li><a href="#label:29">def_var</a>     Defines a variable</li>
-<li><a href="#label:30">def_var_with_dim</a>     Same as def_var but defines dimensions first if needed</li>
-<li><a href="#label:31">var</a>     Opens an existing variable in the file</li>
-<li><a href="#label:32">vars</a>    Opens existing variables in the file</li>
-<li><a href="#label:33">dim</a>     Opens an existing dimension in the file</li>
-<li><a href="#label:34">dims</a>     Opens existing dimensions in the file</li>
-<li><a href="#label:35">att</a>     Opens an existing global attribute in the file</li>
-<li><a href="#label:36">fill=</a>     Sets a fill mode. (Default behavior of NetCDF is FILL.)</li>
-<li><a href="#label:37">each_dim</a>     Iterator regarding the dimensions in the file.</li>
-<li><a href="#label:38">each_var</a>     Iterator regarding the variables in the file.</li>
-<li><a href="#label:39">each_att</a>     Iterator regarding the global attributes of the file.</li>
-<li><a href="#label:40">dim_names</a>     Returns the names of all dimensions in the file</li>
-<li><a href="#label:41">var_names</a>     Returns the names of all variables in the file</li>
-<li><a href="#label:42">att_names</a>     Returns the names of all the global attributes of the file</li>
+<li><a href="#label-21">close</a>     Closes the file.</li>
+<li><a href="#label-22">ndims</a>     Returns the number of dimensions in the file</li>
+<li><a href="#label-23">nvars</a>     Returns the number of variables in the file</li>
+<li><a href="#label-24">natts</a>     Returns the number of global attributes in the file</li>
+<li><a href="#label-25">unlimited</a>     Returns the unlimited dimension in the file</li>
+<li><a href="#label-26">path</a>     Returns the path of the file (contents of the filename specified when opened/created)</li>
+<li><a href="#label-27">redef</a>     Switches to the define mode. Does nothing if already in it (nil returned).</li>
+<li><a href="#label-28">enddef</a>     Switches to the data mode. Does nothing if already in it (nil returned).</li>
+<li><a href="#label-29">define_mode?</a>     Inquire whether the file is in the define mode.</li>
+<li><a href="#label-30">sync</a>     Synchronizes the disk copy of a netCDF dataset with in-memory buffer</li>
+<li><a href="#label-31">def_dim</a>     Define a dimension</li>
+<li><a href="#label-32">put_att</a>     Sets a global attribute</li>
+<li><a href="#label-33">def_var</a>     Defines a variable</li>
+<li><a href="#label-34">def_var_with_dim</a>     Same as def_var but defines dimensions first if needed</li>
+<li><a href="#label-35">var</a>     Opens an existing variable in the file</li>
+<li><a href="#label-36">vars</a>    Opens existing variables in the file</li>
+<li><a href="#label-37">dim</a>     Opens an existing dimension in the file</li>
+<li><a href="#label-38">dims</a>     Opens existing dimensions in the file</li>
+<li><a href="#label-39">att</a>     Opens an existing global attribute in the file</li>
+<li><a href="#label-40">fill=</a>     Sets a fill mode. (Default behavior of NetCDF is FILL.)</li>
+<li><a href="#label-41">each_dim</a>     Iterator regarding the dimensions in the file.</li>
+<li><a href="#label-42">each_var</a>     Iterator regarding the variables in the file.</li>
+<li><a href="#label-43">each_att</a>     Iterator regarding the global attributes of the file.</li>
+<li><a href="#label-44">dim_names</a>     Returns the names of all dimensions in the file</li>
+<li><a href="#label-45">var_names</a>     Returns the names of all variables in the file</li>
+<li><a href="#label-46">att_names</a>     Returns the names of all the global attributes of the file</li>
 </ul></li>
-<li><p><a href="#label:43">class NetCDFDim</a></p>
+<li><p><a href="#label-47">class NetCDFDim</a></p>
 <p>Class Methods</p>
 <p>Instance Methods</p>
 <ul>
-<li><a href="#label:46">length</a>     Returns the length of the dimension</li>
-<li><a href="#label:47">length_ul0</a>     Same as length but returns 0 for the unlimited dimension</li>
-<li><a href="#label:48">name=</a>     Rename the dimension</li>
-<li><a href="#label:49">name</a>     Returns the name of the  dimension</li>
-<li><a href="#label:50">unlimited?</a>     Inquires whether the dimension is unlimited or not</li>
+<li><a href="#label-50">length</a>     Returns the length of the dimension</li>
+<li><a href="#label-51">length_ul0</a>     Same as length but returns 0 for the unlimited dimension</li>
+<li><a href="#label-52">name=</a>     Rename the dimension</li>
+<li><a href="#label-53">name</a>     Returns the name of the  dimension</li>
+<li><a href="#label-54">unlimited?</a>     Inquires whether the dimension is unlimited or not</li>
 </ul></li>
-<li><p><a href="#label:51">class NetCDFVar</a></p>
+<li><p><a href="#label-55">class NetCDFVar</a></p>
 <p>Class Methods</p>
 <ul>
-<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>
-<li><a href="#label:54">NetCDFVar.unpack_type=</a>    Fix the NArray type to be used
-      in <a href="#label:81">unpack</a></li>
-<li><a href="#label:55">NetCDFVar.unpack_type</a>     Returns the NArray type set by <a href="#label:54">NetCDFVar.unpack_type=</a>.</li>
+<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>
+<li><a href="#label-58">NetCDFVar.unpack_type=</a>    Fix the NArray type to be used
+      in <a href="#label-89">unpack</a></li>
+<li><a href="#label-59">NetCDFVar.unpack_type</a>     Returns the NArray type set by <a href="#label-58">NetCDFVar.unpack_type=</a>.</li>
 </ul>
 <p>Instance Methods</p>
 <ul>
-<li><a href="#label:33">dim</a>     Inquires the dim_num-th dimension of the variable (dim_num=0,1,2,..)</li>
-<li><a href="#label:34">dims</a>     Returns an array of all the dimensions of the variable</li>
-<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>
-<li><a href="#label:60">shape_current</a>     Returns the current shape of the variable.</li>
-<li><a href="#label:39">each_att</a>     Iterator regarding the global attributes of the variables.</li>
-<li><a href="#label:40">dim_names</a>     Returns the names of all the dimensions of the variable</li>
-<li><a href="#label:42">att_names</a>     Returns the names of all the attributes of the variable</li>
-<li><a href="#label:49">name</a>     Returns the name of the variable</li>
-<li><a href="#label:48">name=</a>     Rename the variable</li>
-<li><a href="#label:18">ndims</a>     Number of dimensions of the variable (which is rank of the variable).</li>
-<li><a href="#label:67">rank</a>     aliased to ndims</li>
-<li><a href="#label:68">ntype</a>      Aliased to vartype</li>
-<li><a href="#label:69">vartype</a>     Inquires the data value type of the variable</li>
-<li><a href="#label:70">typecode</a>     Inquires the data type of the variable (returns a typecode of NArray)</li>
-<li><a href="#label:20">natts</a>     Returns the number of the attributes of the variable</li>
-<li><a href="#label:72">file</a>     Inquires the file that the variable is in</li>
-<li><a href="#label:35">att</a>     Returns the attribute specified by its name</li>
-<li><a href="#label:28">put_att</a>     Sets an attribute</li>
-<li><a href="#label:75">put</a>     Aliased to <a href="#label:76">simple_put</a></li>
-<li><a href="#label:76">simple_put</a>     Set the values of the variable</li>
-<li><a href="#label:77">pack</a> Pack a NArray (etc) using the attributes scale_factor and/or add_offset of self.</li>
-<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>
-<li><a href="#label:79">get</a>     Aliased to <a href="#label:80">simple_get</a></li>
-<li><a href="#label:80">simple_get</a>     Returns values of the variable</li>
-<li><a href="#label:81">unpack</a> Unpack a NArray (etc) using the attributes scale_factor and/or add_offset of self.</li>
-<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>
-<li><a href="#label:83">[]</a>     Same as NetCDFVar#get but a subset is specified as in the method [] of NArray. </li>
-<li><a href="#label:84">[]=</a>     Same as NetCDFVar#put but a subset is specified as in the method []= of NArray. </li>
+<li><a href="#label-61">deflate</a> Sets "deflation" (compression). (netCDF-4 only)</li>
+<li><a href="#label-62">deflate_params</a> Retuns present deflation parameters. (netCDF-4 only)</li>
+<li><a href="#label-63">endian=</a> Sets (changes) the endian. (netCDF-4 only)</li>
+<li><a href="#label-64">endian</a> Retunrs the present endian setting. (netCDF-4 only)</li>
+<li><a href="#label-37">dim</a>     Inquires the dim_num-th dimension of the variable (dim_num=0,1,2,..)</li>
+<li><a href="#label-38">dims</a>     Returns an array of all the dimensions of the variable</li>
+<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>
+<li><a href="#label-68">shape_current</a>     Returns the current shape of the variable.</li>
+<li><a href="#label-43">each_att</a>     Iterator regarding the global attributes of the variables.</li>
+<li><a href="#label-44">dim_names</a>     Returns the names of all the dimensions of the variable</li>
+<li><a href="#label-46">att_names</a>     Returns the names of all the attributes of the variable</li>
+<li><a href="#label-53">name</a>     Returns the name of the variable</li>
+<li><a href="#label-52">name=</a>     Rename the variable</li>
+<li><a href="#label-22">ndims</a>     Number of dimensions of the variable (which is rank of the variable).</li>
+<li><a href="#label-75">rank</a>     aliased to ndims</li>
+<li><a href="#label-76">ntype</a>      Aliased to vartype</li>
+<li><a href="#label-77">vartype</a>     Inquires the data value type of the variable</li>
+<li><a href="#label-78">typecode</a>     Inquires the data type of the variable (returns a typecode of NArray)</li>
+<li><a href="#label-24">natts</a>     Returns the number of the attributes of the variable</li>
+<li><a href="#label-80">file</a>     Inquires the file that the variable is in</li>
+<li><a href="#label-39">att</a>     Returns the attribute specified by its name</li>
+<li><a href="#label-32">put_att</a>     Sets an attribute</li>
+<li><a href="#label-83">put</a>     Aliased to <a href="#label-84">simple_put</a></li>
+<li><a href="#label-84">simple_put</a>     Set the values of the variable</li>
+<li><a href="#label-85">pack</a> Pack a NArray (etc) using the attributes scale_factor and/or add_offset of self.</li>
+<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>
+<li><a href="#label-87">get</a>     Aliased to <a href="#label-88">simple_get</a></li>
+<li><a href="#label-88">simple_get</a>     Returns values of the variable</li>
+<li><a href="#label-89">unpack</a> Unpack a NArray (etc) using the attributes scale_factor and/or add_offset of self.</li>
+<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>
+<li><a href="#label-91">[]</a>     Same as NetCDFVar#get but a subset is specified as in the method [] of NArray. </li>
+<li><a href="#label-92">[]=</a>     Same as NetCDFVar#put but a subset is specified as in the method []= of NArray. </li>
 </ul>
 <p>Instance Methods added by requiring "numru/netcdf_miss"</p>
 <ul>
-<li><a href="#label:86">get_with_miss</a>     Same as <a href="#label:79">get</a> but interprets data missing.</li>
-<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>
-<li><a href="#label:88">put_with_miss</a>     Same as <a href="#label:75">put</a> but interprets data missing.</li>
-<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>
+<li><a href="#label-94">get_with_miss</a>     Same as <a href="#label-87">get</a> but interprets data missing.</li>
+<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>
+<li><a href="#label-96">put_with_miss</a>     Same as <a href="#label-83">put</a> but interprets data missing.</li>
+<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>
 </ul></li>
-<li><p><a href="#label:90">class NetCDFAtt</a></p>
+<li><p><a href="#label-98">class NetCDFAtt</a></p>
 <p>Class Methods</p>
 <p>Instance Methods</p>
 <ul>
-<li><a href="#label:49">name</a>     Returns the name of the attribute</li>
-<li><a href="#label:48">name=</a>     Rename the attribute</li>
-<li><a href="#label:95">copy</a>     Copies an attribute to a variable or a file. If file, becomes an global attribute</li>
-<li><a href="#label:96">delete</a>     Delete an attribute</li>
-<li><a href="#label:75">put</a>     Sets the value of the attribute</li>
-<li><a href="#label:79">get</a>     Returns the values of the attribute</li>
-<li><a href="#label:99">atttype</a>     Inquires the type of attribute values</li>
-<li><a href="#label:70">typecode</a>    Inquires the type of attribute values (returns a NArray typecode)</li>
+<li><a href="#label-53">name</a>     Returns the name of the attribute</li>
+<li><a href="#label-52">name=</a>     Rename the attribute</li>
+<li><a href="#label-103">copy</a>     Copies an attribute to a variable or a file. If file, becomes an global attribute</li>
+<li><a href="#label-104">delete</a>     Delete an attribute</li>
+<li><a href="#label-83">put</a>     Sets the value of the attribute</li>
+<li><a href="#label-87">get</a>     Returns the values of the attribute</li>
+<li><a href="#label-107">atttype</a>     Inquires the type of attribute values</li>
+<li><a href="#label-78">typecode</a>    Inquires the type of attribute values (returns a NArray typecode)</li>
 </ul></li>
 </ul>
 <p>---------------------------------------------</p>
-<h1><a name="label:10" id="label:10">class NetCDF</a></h1><!-- RDLabel: "class NetCDF" -->
-<h3><a name="label:11" id="label:11">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
+<h1><a name="label-10" id="label-10">class NetCDF</a></h1><!-- RDLabel: "class NetCDF" -->
+<h3><a name="label-11" id="label-11">constants</a></h3><!-- RDLabel: "constants" -->
+<ul>
+<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>
+</ul>
+<h3><a name="label-12" id="label-12">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
 <dl>
-<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" -->
+<dt><h4><a name="label-13" id="label-13"><code>NetCDF.nc4?</code></a></h4></dt><!-- RDLabel: "NetCDF.nc4?" -->
+<dd>
+Returens wheather the linked NetCDF library is NetCDF-4 (true/false).
+false means that it is version 3.</dd>
+<dt><h4><a name="label-14" id="label-14"><code>NetCDF.creation_format=(<var>cmode</var>)</code></a></h4></dt><!-- RDLabel: "NetCDF.creation_format=" -->
+<dd>
+<p>(Available only when NetCDF version 4 is used. Error is raised if not.)
+Set the file format created by NetCDF.create. The initial setting is
+"classic" (conventional netcdf 3 format).</p>
+<p>Arguments</p>
+<ul>
+<li>cmode : one of the following:
+<ul>
+<li>0, nil, or NetCDF::NC_CLASSIC_MODEL : the classic format
+         (original NetCDF-3 format). This is the default setting of
+         RubyNetCDF. </li>
+<li>NetCDF::NC_64BIT_OFFSET : classic but supports larger variables</li>
+<li>NetCDF::NC_NETCDF4 : The new NetCDF-4 format based on HDF5</li>
+<li>( NetCDF::NC_NETCDF4 | NetCDF::NC_CLASSIC_MODEL) [bit "or" of
+         NetCDF::NC_NETCDF4 and NetCDF::NC_CLASSIC_MODEL ]: the new
+         NetCDF-4 format but new data models are disabled.</li>
+</ul></li>
+</ul></dd>
+<dt><h4><a name="label-15" id="label-15"><code>NetCDF.creation_format</code></a></h4></dt><!-- RDLabel: "NetCDF.creation_format" -->
+<dd>
+(Available only when NetCDF version 4 is used. Error is raised if not.)
+Returns the current setting of the creation format.</dd>
+<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" -->
 <dd>
 <p>Opens a file (class method). If mode="w" and the file does not
 exist, a new file is created.</p>
@@ -267,10 +308,10 @@ exist, a new file is created.</p>
 <ul>
 <li>nc_open, nc_create</li>
 </ul></dd>
-<dt><h4><a name="label:13" id="label:13"><code>NetCDF.new</code></a></h4></dt><!-- RDLabel: "NetCDF.new" -->
+<dt><h4><a name="label-17" id="label-17"><code>NetCDF.new</code></a></h4></dt><!-- RDLabel: "NetCDF.new" -->
 <dd>
-<p>Aliased to NetCDF.open</p></dd>
-<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" -->
+Aliased to NetCDF.open</dd>
+<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" -->
 <dd>
 <p>Creates a NetCDF file (class method)</p>
 <p>Arguments</p>
@@ -289,7 +330,7 @@ exist, a new file is created.</p>
 <ul>
 <li>nc_create</li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
 <p>Creates a temporary NetCDF file (class method).
 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>
 <li>nc_create</li>
 </ul></dd>
 </dl>
-<h3><a name="label:16" id="label:16">Instance Methods</a></h3><!-- RDLabel: "Instance Methods" -->
+<h3><a name="label-20" id="label-20">Instance Methods</a></h3><!-- RDLabel: "Instance Methods" -->
 <dl>
-<dt><h4><a name="label:17" id="label:17"><code>close</code></a></h4></dt><!-- RDLabel: "close" -->
+<dt><h4><a name="label-21" id="label-21"><code>close</code></a></h4></dt><!-- RDLabel: "close" -->
 <dd>
 <p>Closes the file.</p>
 <p>Arguments</p>
@@ -328,7 +369,7 @@ Its name is automatically generated, and it is deleted when closed.</p>
 <ul>
 <li>nc_close</li>
 </ul></dd>
-<dt><h4><a name="label:18" id="label:18"><code>ndims</code></a></h4></dt><!-- RDLabel: "ndims" -->
+<dt><h4><a name="label-22" id="label-22"><code>ndims</code></a></h4></dt><!-- RDLabel: "ndims" -->
 <dd>
 <p>Returns the number of dimensions in the file</p>
 <p>Arguments</p>
@@ -343,7 +384,7 @@ Its name is automatically generated, and it is deleted when closed.</p>
 <ul>
 <li>nc_inq_ndims</li>
 </ul></dd>
-<dt><h4><a name="label:19" id="label:19"><code>nvars</code></a></h4></dt><!-- RDLabel: "nvars" -->
+<dt><h4><a name="label-23" id="label-23"><code>nvars</code></a></h4></dt><!-- RDLabel: "nvars" -->
 <dd>
 <p>Returns the number of variables in the file</p>
 <p>Arguments</p>
@@ -358,7 +399,7 @@ Its name is automatically generated, and it is deleted when closed.</p>
 <ul>
 <li>nc_inq_nvars</li>
 </ul></dd>
-<dt><h4><a name="label:20" id="label:20"><code>natts</code></a></h4></dt><!-- RDLabel: "natts" -->
+<dt><h4><a name="label-24" id="label-24"><code>natts</code></a></h4></dt><!-- RDLabel: "natts" -->
 <dd>
 <p>Returns the number of global attributes in the file</p>
 <p>Arguments</p>
@@ -373,7 +414,7 @@ Its name is automatically generated, and it is deleted when closed.</p>
 <ul>
 <li>nc_inq_natts</li>
 </ul></dd>
-<dt><h4><a name="label:21" id="label:21"><code>unlimited</code></a></h4></dt><!-- RDLabel: "unlimited" -->
+<dt><h4><a name="label-25" id="label-25"><code>unlimited</code></a></h4></dt><!-- RDLabel: "unlimited" -->
 <dd>
 <p>Returns the unlimited dimension in the file</p>
 <p>Arguments</p>
@@ -388,7 +429,7 @@ Its name is automatically generated, and it is deleted when closed.</p>
 <ul>
 <li>nc_inq_unlimdim</li>
 </ul></dd>
-<dt><h4><a name="label:22" id="label:22"><code>path</code></a></h4></dt><!-- RDLabel: "path" -->
+<dt><h4><a name="label-26" id="label-26"><code>path</code></a></h4></dt><!-- RDLabel: "path" -->
 <dd>
 <p>Returns the path of the file (contents of the filename specified when opened/created)</p>
 <p>Arguments</p>
@@ -403,7 +444,7 @@ Its name is automatically generated, and it is deleted when closed.</p>
 <ul>
 <li>(none)</li>
 </ul></dd>
-<dt><h4><a name="label:23" id="label:23"><code>redef</code></a></h4></dt><!-- RDLabel: "redef" -->
+<dt><h4><a name="label-27" id="label-27"><code>redef</code></a></h4></dt><!-- RDLabel: "redef" -->
 <dd>
 <p>Switches to the define mode. Does nothing if already in it (nil returned).</p>
 <p>Arguments</p>
@@ -412,15 +453,15 @@ Its name is automatically generated, and it is deleted when closed.</p>
 </ul>
 <p>Return value</p>
 <ul>
-<li>true if successfully switched to the define mode;</li>
+<li>true if successfully switched to the define mode;
+	nil if the file is already in the define mode.
+	Exception is raised if unsuccessful for other reasons.</li>
+</ul>
+<p>Corresponding (dependent) function(s) in the C library of NetCDF</p>
+<ul>
+<li>nc_redef</li>
 </ul></dd>
-</dl>
-<pre>nil if the file is already in the define mode.
-Exception is raised if unsuccessful for other reasons.</pre>
-<pre>Corresponding (dependent) function(s) in the C library of NetCDF
-*  nc_redef</pre>
-<dl>
-<dt><h4><a name="label:24" id="label:24"><code>enddef</code></a></h4></dt><!-- RDLabel: "enddef" -->
+<dt><h4><a name="label-28" id="label-28"><code>enddef</code></a></h4></dt><!-- RDLabel: "enddef" -->
 <dd>
 <p>Switches to the data mode. Does nothing if already in it (nil returned).</p>
 <p>Arguments</p>
@@ -429,15 +470,15 @@ Exception is raised if unsuccessful for other reasons.</pre>
 </ul>
 <p>Return value</p>
 <ul>
-<li>true if successfully switched to the data mode;</li>
+<li>true if successfully switched to the data mode;
+	nil if the file is already in the data mode.
+	Exception is raised if unsuccessful for other reasons.</li>
+</ul>
+<p>Corresponding (dependent) function(s) in the C library of NetCDF</p>
+<ul>
+<li>nc_enddef</li>
 </ul></dd>
-</dl>
-<pre>nil if the file is already in the data mode.
-Exception is raised if unsuccessful for other reasons.</pre>
-<pre>Corresponding (dependent) function(s) in the C library of NetCDF
-*  nc_enddef</pre>
-<dl>
-<dt><h4><a name="label:25" id="label:25"><code>define_mode?</code></a></h4></dt><!-- RDLabel: "define_mode?" -->
+<dt><h4><a name="label-29" id="label-29"><code>define_mode?</code></a></h4></dt><!-- RDLabel: "define_mode?" -->
 <dd>
 <p>Inquire whether the file is in the define mode.</p>
 <p>Arguments</p>
@@ -446,15 +487,15 @@ Exception is raised if unsuccessful for other reasons.</pre>
 </ul>
 <p>Return value</p>
 <ul>
-<li>true if the data is in the define mode;</li>
+<li>true if the data is in the define mode;
+	false if the file is in the data mode;
+	nil otherwise (possibly the file is read-only).</li>
+</ul>
+<p>Corresponding (dependent) function(s) in the C library of NetCDF</p>
+<ul>
+<li>combination of nc_redef and nc_enddef</li>
 </ul></dd>
-</dl>
-<pre>false if the file is in the data mode;
-nil otherwise (possibly the file is read-only).</pre>
-<pre>Corresponding (dependent) function(s) in the C library of NetCDF
-*  combination of nc_redef and nc_enddef</pre>
-<dl>
-<dt><h4><a name="label:26" id="label:26"><code>sync</code></a></h4></dt><!-- RDLabel: "sync" -->
+<dt><h4><a name="label-30" id="label-30"><code>sync</code></a></h4></dt><!-- RDLabel: "sync" -->
 <dd>
 <p>Synchronizes the disk copy of a netCDF dataset with in-memory buffer</p>
 <p>Arguments</p>
@@ -469,7 +510,7 @@ nil otherwise (possibly the file is read-only).</pre>
 <ul>
 <li>nc_sync</li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
 <p>Define a dimension</p>
 <p>Arguments</p>
@@ -485,7 +526,7 @@ nil otherwise (possibly the file is read-only).</pre>
 <ul>
 <li>nc_def_dim</li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
 <p>Sets a global attribute</p>
 <p>Arguments</p>
@@ -505,7 +546,7 @@ nil otherwise (possibly the file is read-only).</pre>
 <ul>
 <li>nc_put_att_<type></li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
 <p>Defines a variable</p>
 <p>Arguments</p>
@@ -526,7 +567,7 @@ nil otherwise (possibly the file is read-only).</pre>
 <ul>
 <li>nc_def_var</li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
 <p>Same as def_var but defines dimensions first if needed.
 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>
 <ul>
 <li>(nc_def_var)</li>
 </ul></dd>
-<dt><h4><a name="label:31" id="label:31"><code>var(<var>var_name</var>)</code></a></h4></dt><!-- RDLabel: "var" -->
+<dt><h4><a name="label-35" id="label-35"><code>var(<var>var_name</var>)</code></a></h4></dt><!-- RDLabel: "var" -->
 <dd>
 <p>Opens an existing variable in the file</p>
 <p>Arguments</p>
@@ -564,7 +605,7 @@ Raise exception if it conflicts with the lengths of existing dimensions.</p>
 <ul>
 <li>nc_inq_varid</li>
 </ul></dd>
-<dt><h4><a name="label:32" id="label:32"><code>vars(<var>names</var>)</code></a></h4></dt><!-- RDLabel: "vars" -->
+<dt><h4><a name="label-36" id="label-36"><code>vars(<var>names</var>)</code></a></h4></dt><!-- RDLabel: "vars" -->
 <dd>
 <p>Opens existing variables in the file</p>
 <p>Arguments</p>
@@ -581,7 +622,7 @@ Raise exception if it conflicts with the lengths of existing dimensions.</p>
 <ul>
 <li>nc_inq_varid</li>
 </ul></dd>
-<dt><h4><a name="label:33" id="label:33"><code>dim(<var>dimension_name</var>)</code></a></h4></dt><!-- RDLabel: "dim" -->
+<dt><h4><a name="label-37" id="label-37"><code>dim(<var>dimension_name</var>)</code></a></h4></dt><!-- RDLabel: "dim" -->
 <dd>
 <p>Opens an existing dimension in the file</p>
 <p>Arguments</p>
@@ -596,7 +637,7 @@ Raise exception if it conflicts with the lengths of existing dimensions.</p>
 <ul>
 <li>nc_inq_dimid</li>
 </ul></dd>
-<dt><h4><a name="label:34" id="label:34"><code>dims(<var>names</var>)</code></a></h4></dt><!-- RDLabel: "dims" -->
+<dt><h4><a name="label-38" id="label-38"><code>dims(<var>names</var>)</code></a></h4></dt><!-- RDLabel: "dims" -->
 <dd>
 <p>Opens existing dimensions in the file</p>
 <p>Arguments</p>
@@ -613,7 +654,7 @@ Raise exception if it conflicts with the lengths of existing dimensions.</p>
 <ul>
 <li>nc_inq_dimid</li>
 </ul></dd>
-<dt><h4><a name="label:35" id="label:35"><code>att(<var>attribute_name</var>)</code></a></h4></dt><!-- RDLabel: "att" -->
+<dt><h4><a name="label-39" id="label-39"><code>att(<var>attribute_name</var>)</code></a></h4></dt><!-- RDLabel: "att" -->
 <dd>
 <p>Opens an existing global attribute in the file</p>
 <p>Arguments</p>
@@ -628,7 +669,7 @@ Raise exception if it conflicts with the lengths of existing dimensions.</p>
 <ul>
 <li>(nc_inq_attid used for inquiry)</li>
 </ul></dd>
-<dt><h4><a name="label:36" id="label:36"><code>fill=(<var>filemode</var>)</code></a></h4></dt><!-- RDLabel: "fill=" -->
+<dt><h4><a name="label-40" id="label-40"><code>fill=(<var>filemode</var>)</code></a></h4></dt><!-- RDLabel: "fill=" -->
 <dd>
 <p>Sets a fill mode. (Default behavior of NetCDF is FILL.)</p>
 <p>Arguments</p>
@@ -643,7 +684,7 @@ Raise exception if it conflicts with the lengths of existing dimensions.</p>
 <ul>
 <li>nc_set_fill</li>
 </ul></dd>
-<dt><h4><a name="label:37" id="label:37"><code>each_dim{ ... }</code></a></h4></dt><!-- RDLabel: "each_dim" -->
+<dt><h4><a name="label-41" id="label-41"><code>each_dim{ ... }</code></a></h4></dt><!-- RDLabel: "each_dim" -->
 <dd>
 <p>Iterator regarding the dimensions in the file.
 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>
 <ul>
 <li>(dependent on nc_inq_ndims)</li>
 </ul></dd>
-<dt><h4><a name="label:38" id="label:38"><code>each_var{ ... }</code></a></h4></dt><!-- RDLabel: "each_var" -->
+<dt><h4><a name="label-42" id="label-42"><code>each_var{ ... }</code></a></h4></dt><!-- RDLabel: "each_var" -->
 <dd>
 <p>Iterator regarding the variables in the file.
 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>
 <ul>
 <li>(dependent on nc_inq_nvars)</li>
 </ul></dd>
-<dt><h4><a name="label:39" id="label:39"><code>each_att{ ... }</code></a></h4></dt><!-- RDLabel: "each_att" -->
+<dt><h4><a name="label-43" id="label-43"><code>each_att{ ... }</code></a></h4></dt><!-- RDLabel: "each_att" -->
 <dd>
 <p>Iterator regarding the global attributes of the file.
 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>
 <ul>
 <li>(dependent on nc_inq_natts, nc_inq_attname)</li>
 </ul></dd>
-<dt><h4><a name="label:40" id="label:40"><code>dim_names</code></a></h4></dt><!-- RDLabel: "dim_names" -->
+<dt><h4><a name="label-44" id="label-44"><code>dim_names</code></a></h4></dt><!-- RDLabel: "dim_names" -->
 <dd>
 <p>Returns the names of all dimensions in the file</p>
 <p>Arguments</p>
@@ -706,7 +747,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>(nc_inq_ndims, nc_inq_dimname)</li>
 </ul></dd>
-<dt><h4><a name="label:41" id="label:41"><code>var_names</code></a></h4></dt><!-- RDLabel: "var_names" -->
+<dt><h4><a name="label-45" id="label-45"><code>var_names</code></a></h4></dt><!-- RDLabel: "var_names" -->
 <dd>
 <p>Returns the names of all variables in the file</p>
 <p>Arguments</p>
@@ -721,7 +762,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>(dependent on nc_inq_nvars, nc_inq_varname)</li>
 </ul></dd>
-<dt><h4><a name="label:42" id="label:42"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
+<dt><h4><a name="label-46" id="label-46"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
 <dd>
 <p>Returns the names of all the global attributes of the file</p>
 <p>Arguments</p>
@@ -738,11 +779,11 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 </ul></dd>
 </dl>
 <p>---------------------------------------------</p>
-<h1><a name="label:43" id="label:43">class NetCDFDim</a></h1><!-- RDLabel: "class NetCDFDim" -->
-<h3><a name="label:44" id="label:44">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
-<h3><a name="label:45" id="label:45">Instance Methods</a></h3><!-- RDLabel: "Instance Methods" -->
+<h1><a name="label-47" id="label-47">class NetCDFDim</a></h1><!-- RDLabel: "class NetCDFDim" -->
+<h3><a name="label-48" id="label-48">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
+<h3><a name="label-49" id="label-49">Instance Methods</a></h3><!-- RDLabel: "Instance Methods" -->
 <dl>
-<dt><h4><a name="label:46" id="label:46"><code>length</code></a></h4></dt><!-- RDLabel: "length" -->
+<dt><h4><a name="label-50" id="label-50"><code>length</code></a></h4></dt><!-- RDLabel: "length" -->
 <dd>
 <p>Returns the length of the dimension</p>
 <p>Arguments</p>
@@ -757,7 +798,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>nc_inq_dimlen</li>
 </ul></dd>
-<dt><h4><a name="label:47" id="label:47"><code>length_ul0</code></a></h4></dt><!-- RDLabel: "length_ul0" -->
+<dt><h4><a name="label-51" id="label-51"><code>length_ul0</code></a></h4></dt><!-- RDLabel: "length_ul0" -->
 <dd>
 <p>Same as length but returns 0 for the unlimited dimension</p>
 <p>Arguments</p>
@@ -772,7 +813,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>nc_inq_dimlen</li>
 </ul></dd>
-<dt><h4><a name="label:48" id="label:48"><code>name=(<var>dimension_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
+<dt><h4><a name="label-52" id="label-52"><code>name=(<var>dimension_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
 <dd>
 <p>Rename the dimension</p>
 <p>Arguments</p>
@@ -787,7 +828,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>nc_rename_dim</li>
 </ul></dd>
-<dt><h4><a name="label:49" id="label:49"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
+<dt><h4><a name="label-53" id="label-53"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
 <dd>
 <p>Returns the name of the  dimension</p>
 <p>Arguments</p>
@@ -802,7 +843,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>nc_inq_dimname</li>
 </ul></dd>
-<dt><h4><a name="label:50" id="label:50"><code>unlimited?</code></a></h4></dt><!-- RDLabel: "unlimited?" -->
+<dt><h4><a name="label-54" id="label-54"><code>unlimited?</code></a></h4></dt><!-- RDLabel: "unlimited?" -->
 <dd>
 <p>Inquires whether the dimension is unlimited or not</p>
 <p>Arguments</p>
@@ -819,10 +860,10 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 </ul></dd>
 </dl>
 <p>---------------------------------------------</p>
-<h1><a name="label:51" id="label:51">class NetCDFVar</a></h1><!-- RDLabel: "class NetCDFVar" -->
-<h3><a name="label:52" id="label:52">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
+<h1><a name="label-55" id="label-55">class NetCDFVar</a></h1><!-- RDLabel: "class NetCDFVar" -->
+<h3><a name="label-56" id="label-56">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
 <dl>
-<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" -->
+<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" -->
 <dd>
 <p>open a NetCDF variable. This can also be done with NetCDF#var
 (instance method of NetCDF class),  which is recommended over
@@ -844,9 +885,9 @@ this method.</p>
 <ul>
 <li>(dependent on nc_open, nc_create, nc_inq_varid etc.)</li>
 </ul></dd>
-<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=" -->
+<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=" -->
 <dd>
-<p>Fix the NArray type to be used in <a href="#label:81">unpack</a>.</p>
+<p>Fix the NArray type to be used in <a href="#label-89">unpack</a>.</p>
 <p>Arguments</p>
 <ul>
 <li>na_type (Integer) : NArray::BYTE, NArray::SINT, NArray::INT, 
@@ -856,18 +897,78 @@ this method.</p>
 <ul>
 <li>na_type (the argument)</li>
 </ul></dd>
-<dt><h4><a name="label:55" id="label:55"><code>NetCDFVar.unpack_type</code></a></h4></dt><!-- RDLabel: "NetCDFVar.unpack_type" -->
+<dt><h4><a name="label-59" id="label-59"><code>NetCDFVar.unpack_type</code></a></h4></dt><!-- RDLabel: "NetCDFVar.unpack_type" -->
 <dd>
-<p>Returns the NArray type set by <a href="#label:54">NetCDFVar.unpack_type=</a>.</p>
+<p>Returns the NArray type set by <a href="#label-58">NetCDFVar.unpack_type=</a>.</p>
 <p>Return value</p>
 <ul>
 <li>nil, NArray::BYTE, NArray::SINT, NArray::INT, 
        NArray::SFLOAT, or NArray::FLOAT</li>
 </ul></dd>
 </dl>
-<h3><a name="label:56" id="label:56">Instance Methods</a></h3><!-- RDLabel: "Instance Methods" -->
+<h3><a name="label-60" id="label-60">Instance Methods</a></h3><!-- RDLabel: "Instance Methods" -->
 <dl>
-<dt><h4><a name="label:57" id="label:57"><code>dim(<var>dim_num</var>)</code></a></h4></dt><!-- RDLabel: "dim" -->
+<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" -->
+<dd>
+<p>(Available only when NetCDF version 4 is used. Error is raised if not.)
+Makes the current (newly created) variable "deflated" (=compressed). 
+This method must be called after
+defining a variable (NetCDF#<a href="#label-33">def_var</a>) and before calling NetCDF#<a href="#label-28">enddef</a>.</p>
+<p>Arguments</p>
+<ul>
+<li>deflate_level (Integer) :: 0 to 9. (0: no compression; 9:
+       highest compression; recommended: 1 or 2).</li>
+<li>shuffle (optional; true or false; default: false) if true,
+       turn on the shuffle filter. 
+<ul>
+<li><a href="http://www.unidata.ucar.edu/software/netcdf/papers/AMS_2008.pdf"><URL:http://www.unidata.ucar.edu/software/netcdf/papers/AMS_2008.pdf></a>:
+         ``The shuffle algorithm changes the byte order in the data stream;
+	 when used with integers that are all close together, this
+	 results in a better compression ratio. There is no benefit
+	 from using the shuffle filter without also using
+	 compression.''</li>
+<li>Note: shuffle is effective for float variables too (tested by horinouchi).</li>
+</ul></li>
+</ul>
+<p>Return value</p>
+<ul>
+<li>self</li>
+</ul></dd>
+<dt><h4><a name="label-62" id="label-62"><code>deflate_params</code></a></h4></dt><!-- RDLabel: "deflate_params" -->
+<dd>
+<p>(Available only when NetCDF version 4 is used. Error is raised if not.)
+Returns the present deflation parameters.</p>
+<p>Return value</p>
+<ul>
+<li>[shuffle, deflate, deflate_level] (a 3-element Array),
+       where the values of shuffle and deflate are
+       true or false, and deflate_level is an Integer (0-9).</li>
+</ul></dd>
+<dt><h4><a name="label-63" id="label-63"><code>endian=(<var>endian</var>)</code></a></h4></dt><!-- RDLabel: "endian=" -->
+<dd>
+<p>(Available only when NetCDF version 4 is used. Error is raised if not.)
+Sets (changes) the endian. See <a href="#label-61">deflate</a> for when to use it.</p>
+<p>Arguments</p>
+<ul>
+<li>endian : one of the following constants:
+       NetCDF::NC_ENDIAN_NATIVE (=0) (default), 
+       NetCDF::NC_ENDIAN_LITTLE (=1), or NetCDF::NC_ENDIAN_BIG (=2).</li>
+</ul>
+<p>Return value</p>
+<ul>
+<li>self</li>
+</ul></dd>
+<dt><h4><a name="label-64" id="label-64"><code>endian</code></a></h4></dt><!-- RDLabel: "endian" -->
+<dd>
+<p>(Available only when NetCDF version 4 is used. Error is raised if not.)
+Returns the current endian setting.</p>
+<p>Return value</p>
+<ul>
+<li>one of the following constants:
+       NetCDF::NC_ENDIAN_NATIVE (=0) (default), 
+       NetCDF::NC_ENDIAN_LITTLE (=1), or NetCDF::NC_ENDIAN_BIG (=2).</li>
+</ul></dd>
+<dt><h4><a name="label-65" id="label-65"><code>dim(<var>dim_num</var>)</code></a></h4></dt><!-- RDLabel: "dim" -->
 <dd>
 <p>Inquires the dim_num-th dimension of the variable (dim_num=0,1,2,..)</p>
 <p>Arguments</p>
@@ -882,7 +983,7 @@ this method.</p>
 <ul>
 <li>(dependent on nc_inq_vardimid)</li>
 </ul></dd>
-<dt><h4><a name="label:58" id="label:58"><code>dims</code></a></h4></dt><!-- RDLabel: "dims" -->
+<dt><h4><a name="label-66" id="label-66"><code>dims</code></a></h4></dt><!-- RDLabel: "dims" -->
 <dd>
 <p>Returns an array of all the dimensions of the variable</p>
 <p>Arguments</p>
@@ -897,7 +998,7 @@ this method.</p>
 <ul>
 <li>nc_inq_vardimid</li>
 </ul></dd>
-<dt><h4><a name="label:59" id="label:59"><code>shape_ul0</code></a></h4></dt><!-- RDLabel: "shape_ul0" -->
+<dt><h4><a name="label-67" id="label-67"><code>shape_ul0</code></a></h4></dt><!-- RDLabel: "shape_ul0" -->
 <dd>
 <p>Returns the shape of the variable, but the length of the unlimited dimension is set to zero.
 Good to define another variable.</p>
@@ -913,7 +1014,7 @@ Good to define another variable.</p>
 <ul>
 <li>(dependent on nc_inq_vardimid, nc_inq_unlimdim etc)</li>
 </ul></dd>
-<dt><h4><a name="label:60" id="label:60"><code>shape_current</code></a></h4></dt><!-- RDLabel: "shape_current" -->
+<dt><h4><a name="label-68" id="label-68"><code>shape_current</code></a></h4></dt><!-- RDLabel: "shape_current" -->
 <dd>
 <p>Returns the current shape of the variable.</p>
 <p>Arguments</p>
@@ -928,7 +1029,7 @@ Good to define another variable.</p>
 <ul>
 <li>(dependent on nc_inq_vardimid etc)</li>
 </ul></dd>
-<dt><h4><a name="label:61" id="label:61"><code>each_att{ ... }</code></a></h4></dt><!-- RDLabel: "each_att" -->
+<dt><h4><a name="label-69" id="label-69"><code>each_att{ ... }</code></a></h4></dt><!-- RDLabel: "each_att" -->
 <dd>
 <p>Iterator regarding the global attributes of the variables.
 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>
 <ul>
 <li>(dependent on nc_inq_natts, nc_inq_attname)</li>
 </ul></dd>
-<dt><h4><a name="label:62" id="label:62"><code>dim_names</code></a></h4></dt><!-- RDLabel: "dim_names" -->
+<dt><h4><a name="label-70" id="label-70"><code>dim_names</code></a></h4></dt><!-- RDLabel: "dim_names" -->
 <dd>
 <p>Returns the names of all the dimensions of the variable</p>
 <p>Arguments</p>
@@ -959,7 +1060,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>(dependent on nc_inq_varndims, nc_inq_vardimid, nc_inq_dimname)</li>
 </ul></dd>
-<dt><h4><a name="label:63" id="label:63"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
+<dt><h4><a name="label-71" id="label-71"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
 <dd>
 <p>Returns the names of all the attributes of the variable</p>
 <p>Arguments</p>
@@ -974,7 +1075,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>(dependent on nc_inq_natts, nc_inq_attname)</li>
 </ul></dd>
-<dt><h4><a name="label:64" id="label:64"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
+<dt><h4><a name="label-72" id="label-72"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
 <dd>
 <p>Returns the name of the variable</p>
 <p>Arguments</p>
@@ -989,7 +1090,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>nc_inq_varname</li>
 </ul></dd>
-<dt><h4><a name="label:65" id="label:65"><code>name=(<var>variable_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
+<dt><h4><a name="label-73" id="label-73"><code>name=(<var>variable_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
 <dd>
 <p>Rename the variable</p>
 <p>Arguments</p>
@@ -1004,7 +1105,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>nc_rename_var</li>
 </ul></dd>
-<dt><h4><a name="label:66" id="label:66"><code>ndims</code></a></h4></dt><!-- RDLabel: "ndims" -->
+<dt><h4><a name="label-74" id="label-74"><code>ndims</code></a></h4></dt><!-- RDLabel: "ndims" -->
 <dd>
 <p>Number of dimensions of the variable (which is rank of the variable).</p>
 <p>Arguments</p>
@@ -1019,13 +1120,13 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>nc_inq_varndims</li>
 </ul></dd>
-<dt><h4><a name="label:67" id="label:67"><code>rank</code></a></h4></dt><!-- RDLabel: "rank" -->
+<dt><h4><a name="label-75" id="label-75"><code>rank</code></a></h4></dt><!-- RDLabel: "rank" -->
 <dd>
-<p>Aliased to ndims</p></dd>
-<dt><h4><a name="label:68" id="label:68"><code>ntype</code></a></h4></dt><!-- RDLabel: "ntype" -->
+Aliased to ndims</dd>
+<dt><h4><a name="label-76" id="label-76"><code>ntype</code></a></h4></dt><!-- RDLabel: "ntype" -->
 <dd>
-<p>Aliased to vartype</p></dd>
-<dt><h4><a name="label:69" id="label:69"><code>vartype</code></a></h4></dt><!-- RDLabel: "vartype" -->
+Aliased to vartype</dd>
+<dt><h4><a name="label-77" id="label-77"><code>vartype</code></a></h4></dt><!-- RDLabel: "vartype" -->
 <dd>
 <p>Inquires the data value type of the variable</p>
 <p>Arguments</p>
@@ -1040,7 +1141,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>nc_inq_vartype</li>
 </ul></dd>
-<dt><h4><a name="label:70" id="label:70"><code>typecode</code></a></h4></dt><!-- RDLabel: "typecode" -->
+<dt><h4><a name="label-78" id="label-78"><code>typecode</code></a></h4></dt><!-- RDLabel: "typecode" -->
 <dd>
 <p>Inquires the data type of the variable (returns a typecode of NArray)</p>
 <p>Arguments</p>
@@ -1055,7 +1156,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>nc_inq_vartype</li>
 </ul></dd>
-<dt><h4><a name="label:71" id="label:71"><code>natts</code></a></h4></dt><!-- RDLabel: "natts" -->
+<dt><h4><a name="label-79" id="label-79"><code>natts</code></a></h4></dt><!-- RDLabel: "natts" -->
 <dd>
 <p>Returns the number of the attributes of the variable</p>
 <p>Arguments</p>
@@ -1070,7 +1171,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>nc_inq_varnatts</li>
 </ul></dd>
-<dt><h4><a name="label:72" id="label:72"><code>file</code></a></h4></dt><!-- RDLabel: "file" -->
+<dt><h4><a name="label-80" id="label-80"><code>file</code></a></h4></dt><!-- RDLabel: "file" -->
 <dd>
 <p>Inquires the file that the variable is in</p>
 <p>Arguments</p>
@@ -1085,7 +1186,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>(none)</li>
 </ul></dd>
-<dt><h4><a name="label:73" id="label:73"><code>att(<var>attribute_name</var>)</code></a></h4></dt><!-- RDLabel: "att" -->
+<dt><h4><a name="label-81" id="label-81"><code>att(<var>attribute_name</var>)</code></a></h4></dt><!-- RDLabel: "att" -->
 <dd>
 <p>Returns the attribute specified by its name</p>
 <p>Arguments</p>
@@ -1100,7 +1201,7 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>(nc_inq_attid is used for inquiry)</li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
 <p>Sets an attribute</p>
 <p>Arguments</p>
@@ -1120,10 +1221,10 @@ Ex.: {|i| print i.name,"\n"} prints names of all of them.</p>
 <ul>
 <li>nc_put_att_<type></li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
-<p>Aliased to <a href="#label:76">simple_put</a></p></dd>
-<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" -->
+Aliased to <a href="#label-84">simple_put</a></dd>
+<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" -->
 <dd>
 <p>Set the values of the variable</p>
 <p>Arguments</p>
@@ -1163,7 +1264,7 @@ with respect to the 2nd dimension</p></li>
 <ul>
 <li>nc_put_var_<type>, nc_put_vars_<type>, nc_put_var1_<type></li>
 </ul></dd>
-<dt><h4><a name="label:77" id="label:77"><code>pack(<var>na</var>)</code></a></h4></dt><!-- RDLabel: "pack" -->
+<dt><h4><a name="label-85" id="label-85"><code>pack(<var>na</var>)</code></a></h4></dt><!-- RDLabel: "pack" -->
 <dd>
 <p>Pack a NArray (etc) using the attributes scale_factor and/or add_offset of self.</p>
 <p>If scale_factor and/or add_offset is defined, returns
@@ -1176,14 +1277,14 @@ with respect to the 2nd dimension</p></li>
 <ul>
 <li>a NArray or NArrayMiss</li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
-<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>
-<p>See the document for <a href="#label:76">simple_put</a> for arguments etc.</p></dd>
-<dt><h4><a name="label:79" id="label:79"><code>get(<var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "get" -->
+<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>
+<p>See the document for <a href="#label-84">simple_put</a> for arguments etc.</p></dd>
+<dt><h4><a name="label-87" id="label-87"><code>get(<var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "get" -->
 <dd>
-<p>Aliased to <a href="#label:80">simple_get</a>.</p></dd>
-<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" -->
+Aliased to <a href="#label-88">simple_get</a>.</dd>
+<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" -->
 <dd>
 <p>Returns values of the variable</p>
 <p>Arguments</p>
@@ -1200,7 +1301,7 @@ with respect to the 2nd dimension</p></li>
 <ul>
 <li>nc_get_var_<type>, nc_get_vars_<type>, nc_get_var1_<type></li>
 </ul></dd>
-<dt><h4><a name="label:81" id="label:81"><code>unpack(<var>na</var>)</code></a></h4></dt><!-- RDLabel: "unpack" -->
+<dt><h4><a name="label-89" id="label-89"><code>unpack(<var>na</var>)</code></a></h4></dt><!-- RDLabel: "unpack" -->
 <dd>
 <p>Unpack a NArray (etc) using the attributes scale_factor and/or add_offset of self.</p>
 <p>If scale_factor and/or add_offset is defined, returns
@@ -1208,7 +1309,7 @@ na * scale_factor + add_offset. Returns na if not.
 Type conversion is made by the coercing -- for example
 if na is sint and scale_factor and add_offset is sfloat,
 return value is sfloat. The type of the return value can be specified
-explicitly with <a href="#label:54">NetCDFVar.unpack_type=</a>.</p>
+explicitly with <a href="#label-58">NetCDFVar.unpack_type=</a>.</p>
 <p>Arguments</p>
 <ul>
 <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>
 <ul>
 <li>a NArray or NArrayMiss</li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
-<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>
-<p>See the document for <a href="#label:80">simple_get</a> for arguments etc.</p></dd>
-<dt><h4><a name="label:83" id="label:83"><code>[]</code></a></h4></dt><!-- RDLabel: "[]" -->
+<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>
+<p>See the document for <a href="#label-88">simple_get</a> for arguments etc.</p></dd>
+<dt><h4><a name="label-91" id="label-91"><code>[]</code></a></h4></dt><!-- RDLabel: "[]" -->
 <dd>
 <p>Same as NetCDFVar#get but a subset is specified as in the method [] of NArray. </p>
 <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
 representing the range (Range) and the step (Integer), respectively.
 Unlike NArray, 1-dimensional indexing of multi-dimensional
 variables is not support.</p></dd>
-<dt><h4><a name="label:84" id="label:84"><code>[] = </code></a></h4></dt><!-- RDLabel: "[]=" -->
+<dt><h4><a name="label-92" id="label-92"><code>[] = </code></a></h4></dt><!-- RDLabel: "[]=" -->
 <dd>
 <p>Same as NetCDFVar#put but a subset is specified as in the method []= of NArray. </p>
 <p>In addition to the subset specifications supported by NArray, 
@@ -1240,11 +1341,11 @@ representing the range (Range) and the step (Integer), respectively.
 Unlike NArray, 1-dimensional indexing of multi-dimensional
 variables is not support.</p></dd>
 </dl>
-<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"" -->
+<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"" -->
 <dl>
-<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" -->
+<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" -->
 <dd>
-<p>Same as <a href="#label:79">get</a> but interprets data missing.</p>
+<p>Same as <a href="#label-87">get</a> but interprets data missing.</p>
 <p>Data missing is specified by the standard attributes valid_range,
 (valid_min and/or valid_max), or missing_value, with the precedence being 
 this order. Unlike the
@@ -1257,7 +1358,7 @@ If not, it returns a NArray. Thus, you can use this whether
 data missing is defined or not.     </p>
 <p>Arguments</p>
 <ul>
-<li>See <a href="#label:79">get</a>.</li>
+<li>See <a href="#label-87">get</a>.</li>
 </ul>
 <p>Return value</p>
 <ul>
@@ -1270,12 +1371,12 @@ data missing is defined or not.     </p>
 </ul>
 <p>Corresponding (dependent) function(s) in the C library of NetCDF</p>
 <ul>
-<li>See <a href="#label:79">get</a>. This method is written in Ruby.</li>
+<li>See <a href="#label-87">get</a>. This method is written in Ruby.</li>
 </ul>
 <p>EXAMPLE</p>
 <ul>
-<li><p>The following is an example to replace <a href="#label:79">get</a> with <a href="#label:86">get_with_miss</a>.
-       It will also make <a href="#label:83">[]</a> interpret data missing, 
+<li><p>The following is an example to replace <a href="#label-87">get</a> with <a href="#label-94">get_with_miss</a>.
+       It will also make <a href="#label-91">[]</a> interpret data missing, 
        since it calls <code>get</code> internally.</p>
 <pre>file = NetCDF.open('hogehoge.nc')
 var = file.var('var')
@@ -1283,9 +1384,9 @@ def var.get(*args); get_with_miss(*args); end
 p var.get       # --> interprets data missing if defined
 p var[0..-1,0]  # --> interprets data missing if defined (assumed 2D)</pre></li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
-<p>Same as <a href="#label:86">get_with_miss</a> but handles data scaling too using <a href="#label:81">unpack</a>.</p>
+<p>Same as <a href="#label-94">get_with_miss</a> but handles data scaling too using <a href="#label-89">unpack</a>.</p>
 <p>Missing data handling using valid_* / missing_value is applied 
 basically to packed data, which is consistent with most
 conventions. However, it is applied to unpacked data 
@@ -1296,13 +1397,13 @@ This treatment can handle all conventions.</p>
 <ul>
 <li>See above. The same thing applies.</li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
-<p>Same as <a href="#label:75">put</a> but interprets data missing.</p>
-<p>If <code>value</code> is an NArray, the methods behaves as <a href="#label:75">put</a>.
+<p>Same as <a href="#label-83">put</a> but interprets data missing.</p>
+<p>If <code>value</code> is an NArray, the methods behaves as <a href="#label-83">put</a>.
 Data missing in <code>value</code> is interpreted if it is an NArrayMiss
 and data missing is specified by attributes in <code>self</code> 
-(see <a href="#label:86">get_with_miss</a> ).
+(see <a href="#label-94">get_with_miss</a> ).
 Namely, the data which are "invalid" in the <code>value</code> is replaced
 with a missing value when written in the file.
 (missing_value or _FillValue or a value outside
@@ -1310,8 +1411,8 @@ the valid range). No check is made whether "valid" values in the
 NArrayMiss is within the valid range of <code>self</code>.</p>
 <p>Arguments</p>
 <ul>
-<li>value : NArrayMiss or what is allowed in <a href="#label:75">put</a>.</li>
-<li>option (Hash) : See <a href="#label:75">put</a>.</li>
+<li>value : NArrayMiss or what is allowed in <a href="#label-83">put</a>.</li>
+<li>option (Hash) : See <a href="#label-83">put</a>.</li>
 </ul>
 <p>Return value</p>
 <ul>
@@ -1319,12 +1420,12 @@ NArrayMiss is within the valid range of <code>self</code>.</p>
 </ul>
 <p>Corresponding (dependent) function(s) in the C library of NetCDF</p>
 <ul>
-<li>See <a href="#label:75">put</a>. This method is written in Ruby.</li>
+<li>See <a href="#label-83">put</a>. This method is written in Ruby.</li>
 </ul>
 <p>EXAMPLE</p>
 <ul>
-<li><p>The following is an example to replace <a href="#label:75">put</a> with <a href="#label:88">put_with_miss</a>.
-       It will also make <a href="#label:84">[]=</a> interpret data missing, 
+<li><p>The following is an example to replace <a href="#label-83">put</a> with <a href="#label-96">put_with_miss</a>.
+       It will also make <a href="#label-92">[]=</a> interpret data missing, 
        since it calls <code>put</code> internally.</p>
 <pre>file = NetCDF.open('hogehoge.nc')
 var = file.var('var')
@@ -1332,9 +1433,9 @@ def var.put(*args); put_with_miss(*args); end
 var.put = narray_miss      # --> interprets data missing if defined
 var[0..-1,0] = narray_miss # --> interprets data missing if defined (assumed 2D)</pre></li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
-<p>Same as <a href="#label:88">put_with_miss</a> but handles data scaling too using <a href="#label:77">pack</a>.</p>
+<p>Same as <a href="#label-96">put_with_miss</a> but handles data scaling too using <a href="#label-85">pack</a>.</p>
 <p>Missing data handling using valid_* / missing_value is applied 
 basically to packed data, which is consistent with most
 conventions. However, it is applied to unpacked data 
@@ -1347,11 +1448,11 @@ This treatment can handle all conventions.</p>
 </ul></dd>
 </dl>
 <p>---------------------------------------------</p>
-<h1><a name="label:90" id="label:90">class NetCDFAtt</a></h1><!-- RDLabel: "class NetCDFAtt" -->
-<h3><a name="label:91" id="label:91">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
-<h3><a name="label:92" id="label:92">Instance Methods</a></h3><!-- RDLabel: "Instance Methods" -->
+<h1><a name="label-98" id="label-98">class NetCDFAtt</a></h1><!-- RDLabel: "class NetCDFAtt" -->
+<h3><a name="label-99" id="label-99">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
+<h3><a name="label-100" id="label-100">Instance Methods</a></h3><!-- RDLabel: "Instance Methods" -->
 <dl>
-<dt><h4><a name="label:93" id="label:93"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
+<dt><h4><a name="label-101" id="label-101"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
 <dd>
 <p>Returns the name of the attribute</p>
 <p>Arguments</p>
@@ -1366,7 +1467,7 @@ This treatment can handle all conventions.</p>
 <ul>
 <li>(none)</li>
 </ul></dd>
-<dt><h4><a name="label:94" id="label:94"><code>name=(<var>attribute_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
+<dt><h4><a name="label-102" id="label-102"><code>name=(<var>attribute_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
 <dd>
 <p>Rename the attribute</p>
 <p>Arguments</p>
@@ -1381,7 +1482,7 @@ This treatment can handle all conventions.</p>
 <ul>
 <li>nc_rename_att</li>
 </ul></dd>
-<dt><h4><a name="label:95" id="label:95"><code>copy(<var>var_or_file</var>)</code></a></h4></dt><!-- RDLabel: "copy" -->
+<dt><h4><a name="label-103" id="label-103"><code>copy(<var>var_or_file</var>)</code></a></h4></dt><!-- RDLabel: "copy" -->
 <dd>
 <p>Copies an attribute to a variable or a file. If file, becomes an global attribute</p>
 <p>Arguments</p>
@@ -1396,7 +1497,7 @@ This treatment can handle all conventions.</p>
 <ul>
 <li>nc_copy_att</li>
 </ul></dd>
-<dt><h4><a name="label:96" id="label:96"><code>delete</code></a></h4></dt><!-- RDLabel: "delete" -->
+<dt><h4><a name="label-104" id="label-104"><code>delete</code></a></h4></dt><!-- RDLabel: "delete" -->
 <dd>
 <p>Delete an attribute</p>
 <p>Arguments</p>
@@ -1411,7 +1512,7 @@ This treatment can handle all conventions.</p>
 <ul>
 <li>nc_del_att</li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
 <p>Sets the value of the attribute</p>
 <p>Arguments</p>
@@ -1430,7 +1531,7 @@ This treatment can handle all conventions.</p>
 <ul>
 <li>nc_put_att_<type></li>
 </ul></dd>
-<dt><h4><a name="label:98" id="label:98"><code>get</code></a></h4></dt><!-- RDLabel: "get" -->
+<dt><h4><a name="label-106" id="label-106"><code>get</code></a></h4></dt><!-- RDLabel: "get" -->
 <dd>
 <p>Returns the values of the attribute</p>
 <p>Arguments</p>
@@ -1446,7 +1547,7 @@ This treatment can handle all conventions.</p>
 <ul>
 <li>nc_get_att_<type></li>
 </ul></dd>
-<dt><h4><a name="label:99" id="label:99"><code>atttype</code></a></h4></dt><!-- RDLabel: "atttype" -->
+<dt><h4><a name="label-107" id="label-107"><code>atttype</code></a></h4></dt><!-- RDLabel: "atttype" -->
 <dd>
 <p>Inquires the type of attribute values</p>
 <p>Arguments</p>
@@ -1461,7 +1562,7 @@ This treatment can handle all conventions.</p>
 <ul>
 <li>nc_inq_atttype</li>
 </ul></dd>
-<dt><h4><a name="label:100" id="label:100"><code>atttype</code></a></h4></dt><!-- RDLabel: "atttype" -->
+<dt><h4><a name="label-108" id="label-108"><code>atttype</code></a></h4></dt><!-- RDLabel: "atttype" -->
 <dd>
 <p>Inquires the type of attribute values (returns a NArray typecode)</p>
 <p>Arguments</p>
diff --git a/doc/Ref_man.rd b/doc/Ref_man.rd
index 48963a0..b5faa31 100644
--- a/doc/Ref_man.rd
+++ b/doc/Ref_man.rd
@@ -1,6 +1,8 @@
 =begin
 =RubyNetCDF Reference Manual
 
+RubyNetCDF version : 0.7.1
+
 * ((<Method Index>))
 
 ---------------------------------------------
@@ -22,6 +24,9 @@ automatically. To use it, you will also
 need ((<NArrayMiss|URL:http://ruby.gfd-dennou.org/products/narray_miss/>)). 
 See ((<Usage>)) for details.
 
+Currently, NetCDF-4 support is partial (the new data models have not been
+supported).
+
 ===Structure
 
 RubyNetCDF consists of the four classes in the following.
@@ -154,6 +159,9 @@ distribution package.
 * ((<class NetCDF>))
 
   Class Methods
+    * ((<NetCDF.nc4?>)) returens wheather the linked library is NetCDF-4 (true/false)
+    * ((<NetCDF.creation_format=>)) Set the file format created by NetCDF.create (for NetCDF-4 only).
+    * ((<NetCDF.creation_format>)) Returns the current setting of the creation format (for NetCDF-4 only).
     * ((<NetCDF.open>))     Opens a file (class method). If mode="w" and non-existent, a new
     * ((<NetCDF.new>))     Aliased to NetCDF.open
     * ((<NetCDF.create>))     Creates a NetCDF file (class method)
@@ -207,6 +215,10 @@ distribution package.
     * ((<NetCDFVar.unpack_type>))     Returns the NArray type set by ((<NetCDFVar.unpack_type=>)).
 
   Instance Methods
+    * ((<deflate>)) Sets "deflation" (compression). (netCDF-4 only)
+    * ((<deflate_params>)) Retuns present deflation parameters. (netCDF-4 only)
+    * ((<endian=>)) Sets (changes) the endian. (netCDF-4 only)
+    * ((<endian>)) Retunrs the present endian setting. (netCDF-4 only)
     * ((<dim>))     Inquires the dim_num-th dimension of the variable (dim_num=0,1,2,..)
     * ((<dims>))     Returns an array of all the dimensions of the variable
     * ((<shape_ul0>))     Returns the shape of the variable, but the length of the unlimited dimension is set to zero.
@@ -263,7 +275,34 @@ distribution package.
 ---------------------------------------------
 
 =class NetCDF
+===constants
+* 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.
+
 ===Class Methods
+---NetCDF.nc4?
+     Returens wheather the linked NetCDF library is NetCDF-4 (true/false).
+     false means that it is version 3.
+
+---NetCDF.creation_format=(cmode)
+     (Available only when NetCDF version 4 is used. Error is raised if not.)
+     Set the file format created by NetCDF.create. The initial setting is
+     "classic" (conventional netcdf 3 format).
+
+     Arguments
+     * cmode : one of the following:
+       * 0, nil, or NetCDF::NC_CLASSIC_MODEL : the classic format
+         (original NetCDF-3 format). This is the default setting of
+         RubyNetCDF. 
+       * NetCDF::NC_64BIT_OFFSET : classic but supports larger variables
+       * NetCDF::NC_NETCDF4 : The new NetCDF-4 format based on HDF5
+       * ( NetCDF::NC_NETCDF4 | NetCDF::NC_CLASSIC_MODEL) [bit "or" of
+         NetCDF::NC_NETCDF4 and NetCDF::NC_CLASSIC_MODEL ]: the new
+         NetCDF-4 format but new data models are disabled.
+
+---NetCDF.creation_format
+     (Available only when NetCDF version 4 is used. Error is raised if not.)
+     Returns the current setting of the creation format.
+
 ---NetCDF.open(filename, mode="r", share=false)
      Opens a file (class method). If mode="w" and the file does not
      exist, a new file is created.
@@ -776,6 +815,58 @@ distribution package.
        NArray::SFLOAT, or NArray::FLOAT
 
 ===Instance Methods
+---deflate(deflate_level, shuffle=false)
+     (Available only when NetCDF version 4 is used. Error is raised if not.)
+     Makes the current (newly created) variable "deflated" (=compressed). 
+     This method must be called after
+     defining a variable (NetCDF#((<def_var>))) and before calling NetCDF#((<enddef>)).
+
+     Arguments
+     * deflate_level (Integer) :: 0 to 9. (0: no compression; 9:
+       highest compression; recommended: 1 or 2).
+     * shuffle (optional; true or false; default: false) if true,
+       turn on the shuffle filter. 
+       * ((<URL:http://www.unidata.ucar.edu/software/netcdf/papers/AMS_2008.pdf>)):
+         ``The shuffle algorithm changes the byte order in the data stream;
+	 when used with integers that are all close together, this
+	 results in a better compression ratio. There is no benefit
+	 from using the shuffle filter without also using
+	 compression.''
+       * Note: shuffle is effective for float variables too (tested by horinouchi).
+
+     Return value
+     * self
+
+---deflate_params
+     (Available only when NetCDF version 4 is used. Error is raised if not.)
+     Returns the present deflation parameters.
+
+     Return value
+     * [shuffle, deflate, deflate_level] (a 3-element Array),
+       where the values of shuffle and deflate are
+       true or false, and deflate_level is an Integer (0-9).
+
+---endian=(endian)
+     (Available only when NetCDF version 4 is used. Error is raised if not.)
+     Sets (changes) the endian. See ((<deflate>)) for when to use it.
+
+     Arguments
+     * endian : one of the following constants:
+       NetCDF::NC_ENDIAN_NATIVE (=0) (default), 
+       NetCDF::NC_ENDIAN_LITTLE (=1), or NetCDF::NC_ENDIAN_BIG (=2).
+
+     Return value
+     * self
+
+---endian
+     (Available only when NetCDF version 4 is used. Error is raised if not.)
+     Returns the current endian setting.
+
+     Return value
+     * one of the following constants:
+       NetCDF::NC_ENDIAN_NATIVE (=0) (default), 
+       NetCDF::NC_ENDIAN_LITTLE (=1), or NetCDF::NC_ENDIAN_BIG (=2).
+
 ---dim(dim_num)
      Inquires the dim_num-th dimension of the variable (dim_num=0,1,2,..)
 
diff --git a/doc/Ref_man_jp.html b/doc/Ref_man_jp.html
index f5ad734..abfc021 100644
--- a/doc/Ref_man_jp.html
+++ b/doc/Ref_man_jp.html
@@ -1,1441 +1,1546 @@
-<?xml version="1.0" ?>
+<?xml version="1.0" encoding="utf-8" ?>
 <!DOCTYPE html 
   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
 <head>
+<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
 <title>Untitled</title>
 </head>
 <body>
-<h1><a name="label:0" id="label:0">RubyNetCDF ��ե���󥹥ޥ˥奢��</a></h1><!-- RDLabel: "RubyNetCDF ��ե���󥹥ޥ˥奢��" -->
+<h1><a name="label-0" id="label-0">RubyNetCDF レファレンスマニュアル</a></h1><!-- RDLabel: "RubyNetCDF レファレンスマニュアル" -->
+<p>RubyNetCDF version : 0.7.1</p>
 <ul>
-<li><a href="#label:9">�᥽�åɥ���ǥå���</a></li>
+<li><a href="#label-9">メソッドインデックス</a></li>
 </ul>
 <p>---------------------------------------------</p>
-<h2><a name="label:1" id="label:1">����</a></h2><!-- RDLabel: "����" -->
-<p>RubyNetCDF �� NetCDF �饤�֥�꡼�� Ruby ���󥿡��ե������Ǥ��롣Ruby 
-�ϥե꡼�ʥ��֥������Ȼظ�������ץȸ���Ǥ��ꡢ
-<a href="http://www.ruby-lang.org/">����</a>
-��������Ǥ��롣RubyNetCDF �Ͽ�������Ȥ��ơ�
-Ruby �ǰ���Ū�˻Ȥ��Ƥ���¿������������饤�֥�꡼ 
+<h2><a name="label-1" id="label-1">概要</a></h2><!-- RDLabel: "概要" -->
+<p>RubyNetCDF は NetCDF ライブラリーの Ruby インターフェースである。Ruby 
+はフリーなオブジェクト指向スクリプト言語であり、
+<a href="http://www.ruby-lang.org/">ここ</a>
+から入手できる。RubyNetCDF は数値配列として、
+Ruby で一般的に使われている多次元数値配列ライブラリー 
 <a href="http://www.ruby-lang.org/en/raa-list.rhtml?name=NArray">NArray</a> 
-���Ѥ�Τǡ����餫���ᥤ�󥹥ȡ��뤷�Ƥ���ɬ�פ����롣
-NArray �ϥǡ�����C �Υݥ��󥿡����ؤ�Ϣ³�������꡼�ΰ�
-���ݻ������׻����񸻤��Ψ�褯���Ѥ��롣NArray �� Python �ˤ����� 
-NumPy �Ȼ��뤬�����Ĥ��Υƥ��Ȥ� NArray �Τۤ��� NumPy ����Ψ���ɤ�
-���Ȥ򼨺����Ƥ��롣
-���ץ����Ȥ��ơ�RubyNetCDF �ϥǡ�����»�μ�ưŪ�ʼ�갷���᥽�åɤ�
-�󶡤��롣�����Ȥ��ˤϡ�
+を用るので、あらかじめインストールしておく必要がある。
+NArray はデータを、C のポインターが指す連続したメモリー領域
+に保持し、計算機資源を効率よく利用する。NArray は Python における 
+NumPy と似るが、幾つかのテストは NArray のほうが NumPy より効率が良い
+ことを示唆している。
+オプションとして、RubyNetCDF はデータ欠損の自動的な取り扱いメソッドを
+提供する。これを使うには、
 <a href="http://ruby.gfd-dennou.org/products/narray_miss/">NArrayMiss</a> 
-��ɬ�פǤ��롣�ܤ�����<a href="#label:6">����ˡ</a>�򸫤衣</p>
-<h3><a name="label:2" id="label:2">����</a></h3><!-- RDLabel: "����" -->
-<p>RubyNetCDF �ϰʲ��Σ��ĤΥ��饹���鹽������롣</p>
-<ul>
-<li><p><a href="#label:10">���饹 NetCDF</a> -- �ե�����Υ��饹</p>
-<p>��Ĥ�NetCDF���饹�Υ��֥������Ȥϰ�Ĥ� NetCDF �ե�������б�����</p></li>
-<li><p><a href="#label:43">���饹 NetCDFDim</a> -- �����Υ��饹</p>
-<p>C �� NetCDF �Ǥϡ������ϡ��ե������ID�ȼ���ID�Ȥ������ѿ���Ȥ�ɽ����뤬��
-Ruby �ǤǤϰ�Ĥ� NetCDFDim ���֥������Ȥ���ɽ�����</p></li>
-<li><p><a href="#label:51">���饹 NetCDFVar</a> -- �ѿ�Υ��饹</p>
-<p>C �� NetCDF �Ǥϡ��ѿ�ϡ��ե������ID���ѿ�ID�Ȥ������ѿ���Ȥ�ɽ����뤬��
-Ruby �ǤǤϰ�Ĥ� NetCDFVar ���֥������Ȥ���ɽ�����</p></li>
-<li><p><a href="#label:90">���饹 NetCDFAtt</a> -- °���Υ��饹</p>
-<p>C �� NetCDF �Ǥϡ�°���ϡ��ե������ID���ѿ�ID��°��̾���Ȥ�ɽ����뤬��
-Ruby �ǤǤϰ�Ĥ� NetCDFAtt ���֥������Ȥ���ɽ�����</p></li>
-</ul>
-<h3><a name="label:3" id="label:3">�ǡ�����</a></h3><!-- RDLabel: "�ǡ�����" -->
-<p>�ܥ饤�֥�꡼�Ǥ����Ƥ� NetCDF �ѿ�η� char, byte, short, int,
-float, double �����ݡ��Ȥ���Ƥ��롣�������������� Ruby �Ρʤ������
-�˸����� NArray �Ρ˴���˽��äơ����줾�� "char", "byte", "sint",
-"int", "sfloat", "float" �ȸƤФ�롣���äơ�NetCDFVar ���饹�� vartype
-(=ntype) �Ϥ�����ʸ����ΰ�Ĥ��֤����ޤ���NetCDF���饹�� def_var ��
-���åɤϡ��ѿ���������ݡ�����������դ��롣�ä���դ���ɬ�פ�����
-�Τϡ��ܥ饤�֥�꡼�Ǥ� "float" �� C �Ǹ����Ȥ���� double ���̣����
-�Ȥ������ȤǤ��롣����� Ruby �δ���Τ����Ǥ��� -- �Ȥ߹��ߤ� Float 
-���饹�ϡ�C �� float �Ǥʤ� double ���б�����ΤǤ��롣</p>
-<p>NetCDFVar ���饹�� get �᥽�åɤϥե��������Ʊ������ NArray �ѿ����
-���ɤ߹��ब��"char" ���ѿ�ˤĤ��Ƥ� "byte" �� NArray ���ɤ߹��ޤ�롣
-����� NArray �� "char" ��������ʤ�����Ǥ��롣���������⤽�� NArray 
-�� byte ����ʸ������ñ�˰�����Τǡ��ä����Թ�Ϥʤ��ȹͤ����롣</p>
-<h3><a name="label:4" id="label:4">���顼����</a></h3><!-- RDLabel: "���顼����" -->
-<p>���顼�ϴ���Ū�ˤ��㳰��ȯ�����뤳�Ȥˤ���н褹�롣â�����ͤ��֤��᥽��
-�ɤǤϷ����ʥ��顼�� nil ���֤����Ȥ��н褹���°���ͤ����뤿��˻���
-���줿̾����°����¸�ߤ��ʤ��Ȥ��ʤɡˡ��㳰Ū�ʾ����� nil ��ȯ������
-�᥽�åɤˤĤ��Ƥϥޥ˥奢����������Ƥ��롣</p>
-<h3><a name="label:5" id="label:5">�������ƥ�</a></h3><!-- RDLabel: "�������ƥ�" -->
-<p>�Ȥ߹��ߤ� File ���饹��Ʊ���������ƥ����б��򤷤Ƥ��Ƥ롣</p>
-<h3><a name="label:6" id="label:6">����ˡ</a></h3><!-- RDLabel: "����ˡ" -->
-<p>RubyNetCDF�饤�֥�꡼�����Ѥ��뤿��ˤϡ��ޤ����ιԤ� Ruby �ץ����˽�
-�ƥ饤�֥�꡼����ɤ���ɬ�פ����롣</p>
+が必要である。詳しくは<a href="#label-6">使用法</a>を見よ。</p>
+<p>現在 NetCDF-4 のサポートは部分的である(新しいデータモデルはサポートしてない)。</p>
+<h3><a name="label-2" id="label-2">構成</a></h3><!-- RDLabel: "構成" -->
+<p>RubyNetCDF は以下の4つのクラスから構成される。</p>
+<ul>
+<li><p><a href="#label-10">クラス NetCDF</a> -- ファイルのクラス</p>
+<p>一つのNetCDFクラスのオブジェクトは一つの NetCDF ファイルに対応する</p></li>
+<li><p><a href="#label-47">クラス NetCDFDim</a> -- 次元のクラス</p>
+<p>C 版 NetCDF では、次元は、ファイルのIDと次元IDという2変数の組で表されるが、
+Ruby 版では一つの NetCDFDim オブジェクトで代表される</p></li>
+<li><p><a href="#label-55">クラス NetCDFVar</a> -- 変数のクラス</p>
+<p>C 版 NetCDF では、変数は、ファイルのIDと変数IDという2変数の組で表されるが、
+Ruby 版では一つの NetCDFVar オブジェクトで代表される</p></li>
+<li><p><a href="#label-98">クラス NetCDFAtt</a> -- 属性のクラス</p>
+<p>C 版 NetCDF では、属性は、ファイルのIDと変数IDと属性名の組で表されるが、
+Ruby 版では一つの NetCDFAtt オブジェクトで代表される</p></li>
+</ul>
+<h3><a name="label-3" id="label-3">データ型</a></h3><!-- RDLabel: "データ型" -->
+<p>本ライブラリーでは全ての NetCDF 変数の型 char, byte, short, int,
+float, double がサポートされている。しかし、これらは Ruby の(より正確
+に言うと NArray の)慣例に従って、それぞれ "char", "byte", "sint",
+"int", "sfloat", "float" と呼ばれる。従って、NetCDFVar クラスの vartype
+(=ntype) はこれらの文字列の一つを返す。また、NetCDFクラスの def_var メ
+ソッドは、変数を定義する際、これらを受け付ける。特に注意する必要がある
+のは、本ライブラリーでの "float" は C で言うところの double を意味する
+ということである。これは Ruby の慣例のせいである -- 組み込みの Float 
+クラスは、C の float でなく double に対応するのである。</p>
+<p>NetCDFVar クラスの get メソッドはファイル中と同じ型の NArray 変数に値
+を読み込むが、"char" 型変数については "byte" 型 NArray に読み込まれる。
+これは NArray が "char" 型を持たないからである。ただ、そもそも NArray 
+は byte 型で文字列を簡単に扱えるので、特に不都合はないと考えられる。</p>
+<h3><a name="label-4" id="label-4">エラー処理</a></h3><!-- RDLabel: "エラー処理" -->
+<p>エラーは基本的には例外を発生することにより対処する。但し、値を返すメソッ
+ドでは軽微なエラーは nil を返すことで対処する(属性値を得るために指定
+された名前の属性が存在しないときなど)。例外的な状況で nil を発生する
+メソッドについてはマニュアルに明記してある。</p>
+<h3><a name="label-5" id="label-5">セキュリティ</a></h3><!-- RDLabel: "セキュリティ" -->
+<p>組み込みの File クラスと同じセキュリティー対応をしていてる。</p>
+<h3><a name="label-6" id="label-6">使用法</a></h3><!-- RDLabel: "使用法" -->
+<p>RubyNetCDFライブラリーを利用するためには、まず次の行を Ruby プログラムに書い
+てライブラリーをロードする必要がある。</p>
 <pre>require 'numru/netcdf'</pre>
-<p>�⤷�� (NetCDFVar���饹��) ��ưŪ�ʥǡ�����»�����᥽�åɤ�Ȥ�������
-��ϡ��ʲ���¹Ԥ���ɬ�פ����롣</p>
+<p>もしも (NetCDFVarクラスの) 自動的なデータ欠損処理メソッドを使いたい場
+合は、以下を実行する必要がある。</p>
 <pre>require 'numru/netcdf_miss'</pre>
-<p>���������ǰ��ֺǽ�� <code>require 'numru/netcdf'</code> ��¹Ԥ���Τǡ�
-��������Ƥ٤��ɤ����ǡ�����»�ΰ�����
+<p>これは内部で一番最初に <code>require 'numru/netcdf'</code> を実行するので、
+これだけ呼べば良い。データ欠損の扱いは
 <a href="http://ruby.gfd-dennou.org/products/narray_miss/">NArrayMiss</a>
-�ˤ��Τǡ�����򥤥󥹥ȡ��뤷�Ƥ����ͤФʤ�ʤ���
-�⤷�� <code>require 'numru/netcdf'</code> ������Ƥ֤Τʤ顢NArrayMiss
-�����פǤ��롣</p>
-<p>�����ǡ�'numru' ("Numerical Ruby"������줿) �ϥ桼�����Υ饤�֥�꡼
-���ɥѥ���Υ��֥ǥ��쥯�ȥ꡼�ǡ�RubyNetCDF �饤�֥�꡼���֤���롣
-����ȡ��ʲ��Τ褦�����ѤǤ���褦�ˤʤ롣</p>
+によるので、これをインストールしておかねばならない。
+もしも <code>require 'numru/netcdf'</code> だけを呼ぶのなら、NArrayMiss
+は不要である。</p>
+<p>ここで、'numru' ("Numerical Ruby"から取られた) はユーザーのライブラリー
+ロードパス中のサブディレクトリーで、RubyNetCDF ライブラリーが置かれる。
+すると、以下のように利用できるようになる。</p>
 <pre>file = NumRu::NetCDF.create('tmp.nc')
 x = file.def_dim('x',10)
 y = file.def_dim('y',10)
 v = file.def_var('v','float',[x,y])
 file.close</pre>
-<p>�����ǡ�NumRu �Ϥ��Υ饤�֥�꡼��ޤ�⥸�塼��Ǥ��롣���Τ褦�ʥ⥸�塼
-��ˤ����Ǥ���Τϡ�̾�����֤Ǥξ��ͤ��򤱤뤿��Ǥ��롣���Τ褦�ʰ�
-���򤷤ʤ���硢�⤷��桼���������ܥ饤�֥�꡼��Υ��饹��̾��������
-���륯�饹��⥸�塼���ޤ�饤�֥�꡼��Ȥ����Ȥ���ȡ����꤬���롣</p>
-<p>���Τ褦�����꤬������ʤ��Ǥ������ϡ�"NumRu::" �Ȥ������ϡ�NumRu
-�⥸�塼���֥��󥯥롼�ɡפ��뤳�Ȥdz�����ʸ��ߤΥ������פˤ����Ƥ�
-�������Ǥ���ˡ����äƼ��Τ褦�˽񤱤롣</p>
+<p>ここで、NumRu はこのライブラリーを含むモジュールである。このようなモジュー
+ルにくるんであるのは、名前空間での衝突を避けるためである。このような扱
+いをしない場合、もしもユーザーが、本ライブラリー中のクラスと名前が衝突
+するクラスやモジュールを含むライブラリーを使おうとすると、問題が起る。</p>
+<p>このような問題が起こらないであろう場合は、"NumRu::" という冠は、NumRu
+モジュールを「インクルード」することで外せる(現在のスコープにおいてと
+いうこである)。従って次のように書ける。</p>
 <pre>include NumRu
 file = NetCDF.create('tmp.nc')
 ...</pre>
-<p>����ʤ������Ȥ��Ƥϥ���������ѥѥå������˴ޤޤ�� demo �� test 
-�ץ����򻲾Ȥ��衣</p>
+<p>さらなる使用例としてはダウンロード用パッケージに含まれる demo や test 
+プログラムを参照せよ。</p>
 <p>---------------------------------------------</p>
-<h2><a name="label:7" id="label:7">�ޥ˥奢��θ���</a></h2><!-- RDLabel: "�ޥ˥奢��θ���" -->
+<h2><a name="label-7" id="label-7">マニュアルの見方</a></h2><!-- RDLabel: "マニュアルの見方" -->
 <dl>
-<dt><h4><a name="label:8" id="label:8"><code>�᥽�å�̾(����<var>1</var>, ����<var>2</var>, ...)  -- ��ά��ǽ�ʰ���� ����̾=�ǥե������ �η��Ǽ���</code></a></h4></dt><!-- RDLabel: "�᥽�å�̾" -->
+<dt><h4><a name="label-8" id="label-8"><code>メソッド名(引数<var>1</var>, 引数<var>2</var>, ...)  -- 省略可能な引数は 引数名=デフォルト値 の形で示す</code></a></h4></dt><!-- RDLabel: "メソッド名" -->
 <dd>
-<p>��ǽ�β���</p>
-<p>����</p>
+<p>機能の解説</p>
+<p>引数</p>
 <ul>
-<li>����1��̾ (���Υ��饹�ޤ��ϼ��������): ����</li>
-<li>����2��̾ (���Υ��饹�ޤ��ϼ��������): ����</li>
+<li>引数1の名 (そのクラスまたは取り得る値): 説明</li>
+<li>引数2の名 (そのクラスまたは取り得る値): 説明</li>
 <li>...</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>����ͤ�����</li>
+<li>戻り値の説明</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>NetCDF ver 3 �δؿ�̾����̤��ʤ���硢���δؿ��Ʊ���ε�ǽ��ͭ
-       ���뤳�Ȥ򼨤���ľ��Ū���б����ʤ���硢�����˰�¸����ؿ��󤲤롣</li>
+<li>NetCDF ver 3 の関数名。括弧がない場合、その関数と同等の機能を有
+       することを示す。直接的な対応がない場合、括弧内に依存する関数を挙げる。</li>
 </ul></dd>
 </dl>
 <p>---------------------------------------------</p>
-<h2><a name="label:9" id="label:9">�᥽�åɥ���ǥå���</a></h2><!-- RDLabel: "�᥽�åɥ���ǥå���" -->
-<ul>
-<li><p><a href="#label:10">���饹 NetCDF</a></p>
-<p>���饹�᥽�å�</p>
-<ul>
-<li><a href="#label:12">NetCDF.open</a>     �ե����륪���ץ�ʥ��饹�᥽�åɡ�mode="w" �ǥե����뤬¸�ߤ��ʤ���п�������</li>
-<li><a href="#label:13">NetCDF.new</a>     NetCDF.open�᥽�åɤΥ����ꥢ���Ǥ���</li>
-<li><a href="#label:14">NetCDF.create</a>     NetCDF�ե��������ʥ��饹�᥽�å�)</li>
-<li><a href="#label:15">NetCDF.create_tmp</a>     �ƥ�ݥ�꡼NetCDF�ե��������ʥ��饹�᥽�å�)</li>
-</ul>
-<p>���󥹥��󥹥᥽�å�</p>
-<ul>
-<li><a href="#label:17">close</a>     �ե����륯����</li>
-<li><a href="#label:18">ndims</a>     �ե�������μ����ο���֤�</li>
-<li><a href="#label:19">nvars</a>     �ե���������ѿ�ο���֤�</li>
-<li><a href="#label:20">natts</a>     �ե�������Υ����Х�°���ο���֤�</li>
-<li><a href="#label:21">unlimited</a>     �ե��������unlimited dimension���֤�</li>
-<li><a href="#label:22">path</a>     �ե�����Υѥ�. open/create����filename�������Ȥ��֤�.</li>
-<li><a href="#label:23">redef</a>     define mode�ˤ��롣���ˤ����ʤ鲿�⤻��nil���֤���</li>
-<li><a href="#label:24">enddef</a>     data mode �����롣���ˤ����ʤ鲿�⤻��nil���֤���</li>
-<li><a href="#label:25">define_mode?</a>     ������⡼�ɤ��ɤ������碌��.</li>
-<li><a href="#label:26">sync</a>     ���꡼��ΥХåե�����ǥ��������ȿ�Ǥ��ƥե������Ʊ��������</li>
-<li><a href="#label:27">def_dim</a>     dimension�����</li>
-<li><a href="#label:28">put_att</a>     �����Х�°��������</li>
-<li><a href="#label:29">def_var</a>     �ѿ�����</li>
-<li><a href="#label:30">def_var_with_dim</a>     def_var��Ʊ������ɬ�פʤ�ޤ�������������롣</li>
-<li><a href="#label:31">var</a>     �ե�����˴�¸���ѿ�򥪡��ץ�</li>
-<li><a href="#label:32">vars</a>    �ե�����˴�¸���ѿ��ޤȤ�ƥ����ץ�</li>
-<li><a href="#label:33">dim</a>     ��¸�μ����򥪡��ץ�</li>
-<li><a href="#label:34">dims</a>    ��¸�μ�����ޤȤ�ƥ����ץ�</li>
-<li><a href="#label:35">att</a>     ��¸�Υ����Х�°���򥪡��ץ�</li>
-<li><a href="#label:36">fill=</a>     fillmode���ѹ���(NetCDF �Υǥե���Ȥ� FILL �Ǥ��롣)</li>
-<li><a href="#label:37">each_dim</a>     �����˴ؤ��륤�ƥ졼��. </li>
-<li><a href="#label:38">each_var</a>     �ѿ�˴ؤ��륤�ƥ졼��. </li>
-<li><a href="#label:39">each_att</a>     �����Х�°���˴ؤ��륤�ƥ졼��. </li>
-<li><a href="#label:40">dim_names</a>     �ե����������������̾���������������֤���</li>
-<li><a href="#label:41">var_names</a>     �ե�����������ѿ��̾���������������֤���</li>
-<li><a href="#label:42">att_names</a>     �ե���������������Х�°����̾���������������֤���</li>
+<h2><a name="label-9" id="label-9">メソッドインデックス</a></h2><!-- RDLabel: "メソッドインデックス" -->
+<ul>
+<li><p><a href="#label-10">クラス NetCDF</a></p>
+<p>クラスメソッド</p>
+<ul>
+<li><a href="#label-13">NetCDF.nc4?</a> リンクされた NetCDF が version 4 かどうか返す</li>
+<li><a href="#label-14">NetCDF.creation_format=</a> NetCDF.createで作られるファイルフォーマットを設定する (NetCDF-4 専用).</li>
+<li><a href="#label-15">NetCDF.creation_format</a>  NetCDF.createで作られるファイルフォーマットの設定を返す. (NetCDF-4 専用).</li>
+<li><a href="#label-16">NetCDF.open</a>     ファイルオープン(クラスメソッド)mode="w" でファイルが存在しなければ新規作成</li>
+<li><a href="#label-17">NetCDF.new</a>     NetCDF.openメソッドのエイリアスである</li>
+<li><a href="#label-18">NetCDF.create</a>     NetCDFファイルを作る(クラスメソッド)</li>
+<li><a href="#label-19">NetCDF.create_tmp</a>     テンポラリーNetCDFファイルを作る(クラスメソッド)</li>
+</ul>
+<p>インスタンスメソッド</p>
+<ul>
+<li><a href="#label-21">close</a>     ファイルクローズ</li>
+<li><a href="#label-22">ndims</a>     ファイル中の次元の数を返す</li>
+<li><a href="#label-23">nvars</a>     ファイル中の変数の数を返す</li>
+<li><a href="#label-24">natts</a>     ファイル中のグローバル属性の数を返す</li>
+<li><a href="#label-25">unlimited</a>     ファイル中のunlimited dimensionを返す</li>
+<li><a href="#label-26">path</a>     ファイルのパス. open/create時のfilename引数の中身を返す.</li>
+<li><a href="#label-27">redef</a>     define modeにする。既にそうなら何もせずnilを返す。</li>
+<li><a href="#label-28">enddef</a>     data mode に入る。既にそうなら何もせずnilを返す。</li>
+<li><a href="#label-29">define_mode?</a>     今定義モードかどうか問合わせる.</li>
+<li><a href="#label-30">sync</a>     メモリー中のバッファーをディスク上に反映してファイルを同期させる</li>
+<li><a href="#label-31">def_dim</a>     dimensionを定義</li>
+<li><a href="#label-32">put_att</a>     グローバル属性を設定</li>
+<li><a href="#label-33">def_var</a>     変数を定義</li>
+<li><a href="#label-34">def_var_with_dim</a>     def_varと同じだが必要ならまず次元を定義する。</li>
+<li><a href="#label-35">var</a>     ファイルに既存の変数をオープン</li>
+<li><a href="#label-36">vars</a>    ファイルに既存の変数をまとめてオープン</li>
+<li><a href="#label-37">dim</a>     既存の次元をオープン</li>
+<li><a href="#label-38">dims</a>    既存の次元をまとめてオープン</li>
+<li><a href="#label-39">att</a>     既存のグローバル属性をオープン</li>
+<li><a href="#label-40">fill=</a>     fillmodeの変更。(NetCDF のデフォルトは FILL である。)</li>
+<li><a href="#label-41">each_dim</a>     次元に関するイテレータ. </li>
+<li><a href="#label-42">each_var</a>     変数に関するイテレータ. </li>
+<li><a href="#label-43">each_att</a>     グローバル属性に関するイテレータ. </li>
+<li><a href="#label-44">dim_names</a>     ファイル中の全次元の名前を配列に入れて返す。</li>
+<li><a href="#label-45">var_names</a>     ファイル中の全変数の名前を配列に入れて返す。</li>
+<li><a href="#label-46">att_names</a>     ファイル中の全グローバル属性の名前を配列に入れて返す。</li>
 </ul></li>
-<li><p><a href="#label:43">���饹 NetCDFDim</a></p>
-<p>���饹�᥽�å�</p>
-<p>���󥹥��󥹥᥽�å�</p>
-<ul>
-<li><a href="#label:46">length</a>     ������Ĺ�����֤�</li>
-<li><a href="#label:47">length_ul0</a>     length ��Ʊ��������̵���¼����˴ؤ�������֤�</li>
-<li><a href="#label:48">name=</a>     ̾����Ĥ�������</li>
-<li><a href="#label:49">name</a>     ̾�����֤�</li>
-<li><a href="#label:50">unlimited?</a>     ̵���¼������ɤ�����</li>
+<li><p><a href="#label-47">クラス NetCDFDim</a></p>
+<p>クラスメソッド</p>
+<p>インスタンスメソッド</p>
+<ul>
+<li><a href="#label-50">length</a>     次元の長さを返す</li>
+<li><a href="#label-51">length_ul0</a>     length と同じだが、無制限次元に関しゼロを返す</li>
+<li><a href="#label-52">name=</a>     名前をつけかえる</li>
+<li><a href="#label-53">name</a>     名前を返す</li>
+<li><a href="#label-54">unlimited?</a>     無制限次元かどうか?</li>
 </ul></li>
-<li><p><a href="#label:51">���饹 NetCDFVar</a></p>
-<p>���饹�᥽�å�</p>
-<ul>
-<li><a href="#label:53">NetCDFVar.new</a>     NetCDF.open �� NetCDF#Var ���Ȥ߹�碌�ư�ԤǺѤޤ�(�Ȥ�ʤ����ɤ�).</li>
-<li><a href="#label:54">NetCDFVar.unpack_type=</a>    <a href="#label:81">unpack</a>�ǻȤ�NArray�η�����ꤹ��</li>
-<li><a href="#label:55">NetCDFVar.unpack_type</a>    <a href="#label:54">NetCDFVar.unpack_type=</a>�����ꤷ��NArray�η����֤�</li>
-</ul>
-<p>���󥹥��󥹥᥽�å�</p>
-<ul>
-<li><a href="#label:33">dim</a>     �����ѿ�ˤ����� dim_num ����(0�������)�μ��������碌�롣</li>
-<li><a href="#label:34">dims</a>     �����ѿ��������������ˤ�����֤�</li>
-<li><a href="#label:59">shape_ul0</a>     �ѿ�η����֤�. â��̵���¼�����Ĺ���ϥ���.</li>
-<li><a href="#label:60">shape_current</a>     �ѿ�θ��ߤη����֤�.</li>
-<li><a href="#label:39">each_att</a>     �ѿ������°��(NetCDFAtt)�˴ؤ��륤�ƥ졼��</li>
-<li><a href="#label:40">dim_names</a>     �ѿ������������̾���������������֤���</li>
-<li><a href="#label:42">att_names</a>     �ѿ������°����̾���������������֤���</li>
-<li><a href="#label:49">name</a>     �ѿ��̾�����֤�</li>
-<li><a href="#label:48">name=</a>     ̾�����դ��ؤ���</li>
-<li><a href="#label:18">ndims</a>     �����ο���䤦</li>
-<li><a href="#label:67">rank</a>     ndims�Υ��ꥢ��</li>
-<li><a href="#label:68">ntype</a>     vartype ����̾</li>
-<li><a href="#label:69">vartype</a>     �ѿ��ͤη����䤦</li>
-<li><a href="#label:70">typecode</a>     �ѿ��ͤη����䤦(NArray��typecode���֤�)</li>
-<li><a href="#label:20">natts</a>     °���ο���䤦</li>
-<li><a href="#label:72">file</a>     �����ѿ�°����ե���������碌��</li>
-<li><a href="#label:35">att</a>     ̾������ꤷ��°�����֤�</li>
-<li><a href="#label:28">put_att</a>     °��������</li>
-<li><a href="#label:75">put</a>     ��<a href="#label:76">simple_put</a>����̾(alias)</li>
-<li><a href="#label:76">simple_put</a>     �ͤ������</li>
-<li><a href="#label:77">pack</a> self��°�� scale_factor and/or add_offset ���Ѥ��� NArray ���� "pack" ����.</li>
-<li><a href="#label:78">scaled_put</a>     <a href="#label:76">simple_put</a> ��Ʊ�ͤ�����<a href="#label:77">pack</a>�ˤ��°�� scale_factor �� add_offset ���᤹��</li>
-<li><a href="#label:79">get</a>     ��<a href="#label:80">simple_get</a>����̾(alias)</li>
-<li><a href="#label:80">simple_get</a>     �ͤ���Ф�</li>
-<li><a href="#label:81">unpack</a> self��°�� scale_factor and/or add_offset ���Ѥ��� NArray ���� "unpack" ����.</li>
-<li><a href="#label:82">scaled_get</a>     <a href="#label:80">simple_get</a> ��Ʊ�ͤ�����<a href="#label:81">unpack</a>�ˤ��°�� scale_factor �� add_offset ���᤹��</li>
-<li><a href="#label:83">[]</a>     NetCDFVar#get ��Ʊ�ͤ��������֥��åȤ� NArray#[] ��Ʊ�ͤ˻��ꤹ��. </li>
-<li><a href="#label:84">[]=</a>     NetCDFVar#put ��Ʊ�ͤ��������֥��åȤ� NArray#[]= ��Ʊ�ͤ˻��ꤹ��.</li>
-</ul>
-<p>"numru/netcdf_miss" �� require ���뤳�Ȥ��ɲä���륤�󥹥��󥹥᥽�å�</p>
-<ul>
-<li><a href="#label:86">get_with_miss</a>     ��<a href="#label:79">get</a>��Ʊ�ͤ������ǡ�����»���������</li>
-<li><a href="#label:87">get_with_miss_and_scaling</a>     ��<a href="#label:86">get_with_miss</a>��Ʊ�ͤ�����<a href="#label:81">unpack</a>�ˤ�ꥹ������󥰤�Ԥ�.</li>
-<li><a href="#label:88">put_with_miss</a>     ��<a href="#label:75">put</a>��Ʊ�ͤ������ǡ�����»���������</li>
-<li><a href="#label:89">put_with_miss_and_scaling</a>     ��<a href="#label:88">put_with_miss</a>��Ʊ�ͤ�����<a href="#label:77">pack</a>�ˤ�ꥹ������󥰤�Ԥ�.</li>
+<li><p><a href="#label-55">クラス NetCDFVar</a></p>
+<p>クラスメソッド</p>
+<ul>
+<li><a href="#label-57">NetCDFVar.new</a>     NetCDF.open と NetCDF#Var を組み合わせて一行で済ます(使わなくて良い).</li>
+<li><a href="#label-58">NetCDFVar.unpack_type=</a>    <a href="#label-89">unpack</a>で使うNArrayの型を固定する</li>
+<li><a href="#label-59">NetCDFVar.unpack_type</a>    <a href="#label-58">NetCDFVar.unpack_type=</a>で設定したNArrayの型を返す</li>
+</ul>
+<p>インスタンスメソッド</p>
+<ul>
+<li><a href="#label-61">deflate</a> 圧縮 (deflation) を設定. (netCDF-4 only)</li>
+<li><a href="#label-62">deflate_params</a> 現在の圧縮設定問合せ. (netCDF-4 only)</li>
+<li><a href="#label-63">endian=</a> エンディアンを設定 (netCDF-4 only)</li>
+<li><a href="#label-64">endian</a> エンディアン設定を返す. (netCDF-4 only)</li>
+<li><a href="#label-37">dim</a>     その変数における dim_num 番目(0から数える)の次元を問合わせる。</li>
+<li><a href="#label-38">dims</a>     その変数の全次元を配列にいれて返す</li>
+<li><a href="#label-67">shape_ul0</a>     変数の形を返す. 但し無制限次元の長さはゼロ.</li>
+<li><a href="#label-68">shape_current</a>     変数の現在の形を返す.</li>
+<li><a href="#label-43">each_att</a>     変数中の全属性(NetCDFAtt)に関するイテレータ</li>
+<li><a href="#label-44">dim_names</a>     変数中の全次元の名前を配列に入れて返す。</li>
+<li><a href="#label-46">att_names</a>     変数中の全属性の名前を配列に入れて返す。</li>
+<li><a href="#label-53">name</a>     変数の名前を返す</li>
+<li><a href="#label-52">name=</a>     名前を付け替える</li>
+<li><a href="#label-22">ndims</a>     次元の数を問う</li>
+<li><a href="#label-75">rank</a>     ndimsのエリアス</li>
+<li><a href="#label-76">ntype</a>     vartype の別名</li>
+<li><a href="#label-77">vartype</a>     変数値の型を問う</li>
+<li><a href="#label-78">typecode</a>     変数値の型を問う(NArrayのtypecodeで返す)</li>
+<li><a href="#label-24">natts</a>     属性の数を問う</li>
+<li><a href="#label-80">file</a>     その変数が属するファイルを問合わせる</li>
+<li><a href="#label-39">att</a>     名前を指定した属性を返す</li>
+<li><a href="#label-32">put_att</a>     属性を設定</li>
+<li><a href="#label-83">put</a>      <a href="#label-84">simple_put</a>の別名(alias)</li>
+<li><a href="#label-84">simple_put</a>     値を入れる</li>
+<li><a href="#label-85">pack</a> selfの属性 scale_factor and/or add_offset を用いて NArray 等を "pack" する.</li>
+<li><a href="#label-86">scaled_put</a>     <a href="#label-84">simple_put</a> と同様だが、<a href="#label-85">pack</a>により属性 scale_factor と add_offset を解釈する</li>
+<li><a href="#label-87">get</a>      <a href="#label-88">simple_get</a>の別名(alias)</li>
+<li><a href="#label-88">simple_get</a>     値を取り出す</li>
+<li><a href="#label-89">unpack</a> selfの属性 scale_factor and/or add_offset を用いて NArray 等を "unpack" する.</li>
+<li><a href="#label-90">scaled_get</a>     <a href="#label-88">simple_get</a> と同様だが、<a href="#label-89">unpack</a>により属性 scale_factor と add_offset を解釈する</li>
+<li><a href="#label-91">[]</a>     NetCDFVar#get と同様だが、サブセットを NArray#[] と同様に指定する. </li>
+<li><a href="#label-92">[]=</a>     NetCDFVar#put と同様だが、サブセットを NArray#[]= と同様に指定する.</li>
+</ul>
+<p>"numru/netcdf_miss" を require することで追加されるインスタンスメソッド</p>
+<ul>
+<li><a href="#label-94">get_with_miss</a>      <a href="#label-87">get</a>と同様だが、データ欠損を処理する</li>
+<li><a href="#label-95">get_with_miss_and_scaling</a>      <a href="#label-94">get_with_miss</a>と同様だが、<a href="#label-89">unpack</a>によりスケーリングも行う.</li>
+<li><a href="#label-96">put_with_miss</a>      <a href="#label-83">put</a>と同様だが、データ欠損を処理する</li>
+<li><a href="#label-97">put_with_miss_and_scaling</a>      <a href="#label-96">put_with_miss</a>と同様だが、<a href="#label-85">pack</a>によりスケーリングも行う.</li>
 </ul></li>
-<li><p><a href="#label:90">���饹 NetCDFAtt</a></p>
-<p>���饹�᥽�å�</p>
-<p>���󥹥��󥹥᥽�å�</p>
-<ul>
-<li><a href="#label:49">name</a>     °����̾�����֤�</li>
-<li><a href="#label:48">name=</a>     °����̾�����ѹ�</li>
-<li><a href="#label:95">copy</a>     °�����̤��ѿ�ޤ��ϥե�����˥��ԡ����ե�����ξ��ϥ����Х�°���ˤʤ�</li>
-<li><a href="#label:96">delete</a>     °������</li>
-<li><a href="#label:75">put</a>     °�����ͤ�����</li>
-<li><a href="#label:79">get</a>     °������Ȥ���Ф�</li>
-<li><a href="#label:99">atttype</a>     °���ͤη����䤦</li>
-<li><a href="#label:70">typecode</a>     °���ͤη����䤦(NArray��typecode���֤�)</li>
+<li><p><a href="#label-98">クラス NetCDFAtt</a></p>
+<p>クラスメソッド</p>
+<p>インスタンスメソッド</p>
+<ul>
+<li><a href="#label-53">name</a>     属性の名前を返す</li>
+<li><a href="#label-52">name=</a>     属性の名前を変更</li>
+<li><a href="#label-103">copy</a>     属性を別の変数またはファイルにコピー。ファイルの場合はグローバル属性になる</li>
+<li><a href="#label-104">delete</a>     属性を削除</li>
+<li><a href="#label-83">put</a>     属性の値を設定</li>
+<li><a href="#label-87">get</a>     属性の中身を取り出す</li>
+<li><a href="#label-107">atttype</a>     属性値の型を問う</li>
+<li><a href="#label-78">typecode</a>     属性値の型を問う(NArrayのtypecodeで返す)</li>
 </ul></li>
 </ul>
 <p>---------------------------------------------</p>
-<h1><a name="label:10" id="label:10">���饹 NetCDF</a></h1><!-- RDLabel: "���饹 NetCDF" -->
-<h3><a name="label:11" id="label:11">���饹�᥽�å�</a></h3><!-- RDLabel: "���饹�᥽�å�" -->
+<h1><a name="label-10" id="label-10">クラス NetCDF</a></h1><!-- RDLabel: "クラス NetCDF" -->
+<h3><a name="label-11" id="label-11">定数</a></h3><!-- RDLabel: "定数" -->
+<ul>
+<li>NC_NOWRITE, NC_WRITE, NC_SHARE, NC_CLOBBER, NC_NOCLOBBER, NC_64BIT_OFFSET, NC_NETCDF4, NC_CLASSIC_MODEL, NCVERSION, SUPPORT_BIGMEM : これらは NumRu::NetCDF::NC_NOWRITE などアクセスする。</li>
+</ul>
+<h3><a name="label-12" id="label-12">クラスメソッド</a></h3><!-- RDLabel: "クラスメソッド" -->
 <dl>
-<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" -->
+<dt><h4><a name="label-13" id="label-13"><code>NetCDF.nc4?</code></a></h4></dt><!-- RDLabel: "NetCDF.nc4?" -->
+<dd>
+このライブラリが NetCDF version 4 を使うようになっていれば
+(リンクされてる NetCDF ライブラリがver 4なら)true を,
+そうでなければ (NetCDF 3なら) false を返す。</dd>
+<dt><h4><a name="label-14" id="label-14"><code>NetCDF.creation_format=(<var>cmode</var>)</code></a></h4></dt><!-- RDLabel: "NetCDF.creation_format=" -->
+<dd>
+<p>(このメソッドは NetCDF-4 が使われてるときのみ使用可能:そうでなければ
+例外が発生する). NetCDF.create で作られるファイルのフォーマットを指定する.
+初期設定は "classic".</p>
+<p>引数</p>
+<ul>
+<li>cmode : 以下のいずれか。
+<ul>
+<li>0, nil, or NetCDF::NC_CLASSIC_MODEL : classic format
+         (以前からの NetCDF-3 のフォーマット). これが初期設定.</li>
+<li>NetCDF::NC_64BIT_OFFSET : classic だが,変数のサイズを大きく出来る</li>
+<li>NetCDF::NC_NETCDF4 : HDF5 ベースの NetCDF-4 新フォーマット</li>
+<li>( NetCDF::NC_NETCDF4 | NetCDF::NC_CLASSIC_MODEL) [これは
+         NetCDF::NC_NETCDF4 と NetCDF::NC_CLASSIC_MODEL の bit "or"]: 
+         NetCDF-4 新フォーマットだが,新しいデータモデルは使えないよう制限.</li>
+</ul></li>
+</ul></dd>
+<dt><h4><a name="label-15" id="label-15"><code>NetCDF.creation_format</code></a></h4></dt><!-- RDLabel: "NetCDF.creation_format" -->
+<dd>
+(このメソッドは NetCDF-4 が使われてるときのみ使用可能:そうでなければ
+例外が発生する). 
+NetCDF.create で作られるファイルのフォーマットの現在の設定を返す.</dd>
+<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" -->
 <dd>
-<p>�ե����륪���ץ�ʥ��饹�᥽�åɡ�mode="w" �ǥե����뤬¸�ߤ��ʤ���п�������</p>
-<p>����</p>
+<p>ファイルオープン(クラスメソッド)mode="w" でファイルが存在しなければ新規作成</p>
+<p>引数</p>
 <ul>
-<li>filename (String): �ե�����̾</li>
-<li>mode (String) : �����ϥ⡼��: "r"(�ɤ߼��Τ�); "w","w+" (��
-       ���� -- ���ߤ���ȤϾ��(�ä���!)); "r+","a","a+" (�ɲ� --
-       ���ߤ����ƤϤ��Τޤޤˡ��񤭹��߲�)�� �Ȥ߹��ߤ� File ���饹��
-       �㤤���ɤΥ⡼�ɤǤ��ɤ߹��ߤϲ�ǽ����ա����ˤʤ� NetCDF�饤
-       �֥�꡼�����¤ˤ�ꡢ���ɲáפˤ�;ʬ�ʻ��֤ȥǥ��������ڡ���
-       �������롣</li>
-<li>share (true or false) : shared�⡼�ɤˤ��뤫 (�񤭹�����Υե�
-       �����¾�Υץ���������ɤ߹��ߤ������������ true �Ȥ��롣C�ǥ桼
-       ��������������5�Ϥ� nc_open �ι�򻲾ȤΤ���)</li>
+<li>filename (String): ファイル名</li>
+<li>mode (String) : 入出力モード: "r"(読み取りのみ); "w","w+" (書き
+       込み -- 現在の中身は上書き(消える!)); "r+","a","a+" (追加 --
+       現在の内容はそのままに、書き込み可)。 組み込みの File クラスと
+       違い、どのモードでも読み込みは可能。注意:元になる NetCDFライ
+       ブラリーの制限により、「追加」には余分な時間とディスクスペース
+       がかかる。</li>
+<li>share (true or false) : sharedモードにするか (書き込み中のファ
+       イルに他のプロセスからの読み込みがあり得る場合に true とする。C版ユー
+       ザーズガイド第5章の nc_open の項を参照のこと)</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>NetCDF���饹�Υ��֥�������</li>
+<li>NetCDFクラスのオブジェクト</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_open, nc_create</li>
 </ul></dd>
-<dt><h4><a name="label:13" id="label:13"><code>NetCDF.new</code></a></h4></dt><!-- RDLabel: "NetCDF.new" -->
+<dt><h4><a name="label-17" id="label-17"><code>NetCDF.new</code></a></h4></dt><!-- RDLabel: "NetCDF.new" -->
 <dd>
-<p>NetCDF.open�᥽�åɤΥ����ꥢ���Ǥ���</p></dd>
-<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" -->
+NetCDF.openメソッドのエイリアスである</dd>
+<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" -->
 <dd>
-<p>NetCDF�ե��������ʥ��饹�᥽�å�)</p>
-<p>����</p>
+<p>NetCDFファイルを作る(クラスメソッド)</p>
+<p>引数</p>
 <ul>
-<li>filename (String) : �ե�����̾</li>
-<li>noclobber (true or false) : ��񤭤��뤫���ʤ���</li>
-<li>share (true or false) : shared mode ��Ȥ��� (�񤭹�����Υե�
-       �����¾�Υץ���������ɤ߹��ߤ������������ true �Ȥ��롣C�ǥ桼
-       ��������������5�Ϥ� nc_open �ι�򻲾ȤΤ���)</li>
+<li>filename (String) : ファイル名</li>
+<li>noclobber (true or false) : 上書きするかしないか</li>
+<li>share (true or false) : shared mode を使うか (書き込み中のファ
+       イルに他のプロセスからの読み込みがあり得る場合に true とする。C版ユー
+       ザーズガイド第5章の nc_open の項を参照のこと)</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>NetCDF���饹�Υ��֥�������</li>
+<li>NetCDFクラスのオブジェクト</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_create</li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
-<p>�ƥ�ݥ�꡼NetCDF�ե��������ʥ��饹�᥽�å�)
-̾���ϼ�ư�Ƿ�ޤ롣�����������Ⱦä���롣</p>
-<p>����</p>
+<p>テンポラリーNetCDFファイルを作る(クラスメソッド)
+名前は自動で決まる。クローズされると消される。</p>
+<p>引数</p>
 <ul>
-<li>tmpdir (String) : �ƥ�ݥ�꡼�ե�������֤��ǥ��쥯�ȥ꡼̾��
-       �ǥե���ȤϴĶ��ѿ�ǻ��ꤵ�줿�ǥ��쥯�ȥ꡼��TMPDIR,TMP,or
-       TEMP�ˤޤ��� '.'�������奢���⡼�ɤǤ� '.' �Τߤ��ǥե���ȤȤ�
-       �롣</li>
-<li>share (true or false) : shared mode ��Ȥ���</li>
+<li>tmpdir (String) : テンポラリーファイルを置くディレクトリー名。
+       デフォルトは環境変数で指定されたディレクトリー(TMPDIR,TMP,or
+       TEMP)または '.'。セキュアーモードでは '.' のみがデフォルトとな
+       る。</li>
+<li>share (true or false) : shared mode を使うか</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>NetCDF���饹�Υ��֥�������</li>
+<li>NetCDFクラスのオブジェクト</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_create</li>
 </ul></dd>
 </dl>
-<h3><a name="label:16" id="label:16">���󥹥��󥹥᥽�å�</a></h3><!-- RDLabel: "���󥹥��󥹥᥽�å�" -->
+<h3><a name="label-20" id="label-20">インスタンスメソッド</a></h3><!-- RDLabel: "インスタンスメソッド" -->
 <dl>
-<dt><h4><a name="label:17" id="label:17"><code>close</code></a></h4></dt><!-- RDLabel: "close" -->
+<dt><h4><a name="label-21" id="label-21"><code>close</code></a></h4></dt><!-- RDLabel: "close" -->
 <dd>
-<p>�ե����륯����</p>
-<p>����</p>
+<p>ファイルクローズ</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>nil</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_close</li>
 </ul></dd>
-<dt><h4><a name="label:18" id="label:18"><code>ndims</code></a></h4></dt><!-- RDLabel: "ndims" -->
+<dt><h4><a name="label-22" id="label-22"><code>ndims</code></a></h4></dt><!-- RDLabel: "ndims" -->
 <dd>
-<p>�ե�������μ����ο���֤�</p>
-<p>����</p>
+<p>ファイル中の次元の数を返す</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>Integer</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_ndims</li>
 </ul></dd>
-<dt><h4><a name="label:19" id="label:19"><code>nvars</code></a></h4></dt><!-- RDLabel: "nvars" -->
+<dt><h4><a name="label-23" id="label-23"><code>nvars</code></a></h4></dt><!-- RDLabel: "nvars" -->
 <dd>
-<p>�ե���������ѿ�ο���֤�</p>
-<p>����</p>
+<p>ファイル中の変数の数を返す</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>Integer</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_nvars</li>
 </ul></dd>
-<dt><h4><a name="label:20" id="label:20"><code>natts</code></a></h4></dt><!-- RDLabel: "natts" -->
+<dt><h4><a name="label-24" id="label-24"><code>natts</code></a></h4></dt><!-- RDLabel: "natts" -->
 <dd>
-<p>�ե�������Υ����Х�°���ο���֤�</p>
-<p>����</p>
+<p>ファイル中のグローバル属性の数を返す</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>Integer</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_natts</li>
 </ul></dd>
-<dt><h4><a name="label:21" id="label:21"><code>unlimited</code></a></h4></dt><!-- RDLabel: "unlimited" -->
+<dt><h4><a name="label-25" id="label-25"><code>unlimited</code></a></h4></dt><!-- RDLabel: "unlimited" -->
 <dd>
-<p>�ե��������unlimited dimension���֤�</p>
-<p>����</p>
+<p>ファイル中のunlimited dimensionを返す</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>¸�ߤ���Ȥ�NetCDFDim���饹�Υ��֥������ȡ��ʤ��Ȥ���nil</li>
+<li>存在するときNetCDFDimクラスのオブジェクト。ないときはnil</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_unlimdim</li>
 </ul></dd>
-<dt><h4><a name="label:22" id="label:22"><code>path</code></a></h4></dt><!-- RDLabel: "path" -->
+<dt><h4><a name="label-26" id="label-26"><code>path</code></a></h4></dt><!-- RDLabel: "path" -->
 <dd>
-<p>�ե�����Υѥ�. open/create����filename�������Ȥ��֤�.</p>
-<p>����</p>
+<p>ファイルのパス. open/create時のfilename引数の中身を返す.</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>String</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul></dd>
-<dt><h4><a name="label:23" id="label:23"><code>redef</code></a></h4></dt><!-- RDLabel: "redef" -->
+<dt><h4><a name="label-27" id="label-27"><code>redef</code></a></h4></dt><!-- RDLabel: "redef" -->
 <dd>
-<p>define mode�ˤ��롣���ˤ����ʤ鲿�⤻��nil���֤���</p>
-<p>����</p>
+<p>define modeにする。既にそうなら何もせずnilを返す。</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>true (����⡼�ɤؤ��ѹ�������);</li>
+<li>true (定義モードへの変更が成功);
+	nil (既に定義モード中).
+	その他の理由で変更できない場合は例外発生.</li>
+</ul>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
+<ul>
+<li>nc_redef</li>
 </ul></dd>
-</dl>
-<pre>nil (��������⡼����).
-����¾����ͳ���ѹ��Ǥ��ʤ������㳰ȯ��.</pre>
-<pre>�б�����(���Ѥ���) C �� NetCDF �δؿ�
-*  nc_redef</pre>
-<dl>
-<dt><h4><a name="label:24" id="label:24"><code>enddef</code></a></h4></dt><!-- RDLabel: "enddef" -->
+<dt><h4><a name="label-28" id="label-28"><code>enddef</code></a></h4></dt><!-- RDLabel: "enddef" -->
 <dd>
-<p>data mode �����롣���ˤ����ʤ鲿�⤻��nil���֤���</p>
-<p>����</p>
+<p>data mode に入る。既にそうなら何もせずnilを返す。</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>true (�ǡ����⡼�ɤؤ��ѹ�������);</li>
+<li>true (データモードへの変更が成功);
+	nil (既にデータモード中).
+	その他の理由で変更できない場合は例外発生.</li>
+</ul>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
+<ul>
+<li>nc_endef</li>
 </ul></dd>
-</dl>
-<pre>nil (���˥ǡ����⡼����).
-����¾����ͳ���ѹ��Ǥ��ʤ������㳰ȯ��.</pre>
-<pre>�б�����(���Ѥ���) C �� NetCDF �δؿ�
-*  nc_endef</pre>
-<dl>
-<dt><h4><a name="label:25" id="label:25"><code>define_mode?</code></a></h4></dt><!-- RDLabel: "define_mode?" -->
+<dt><h4><a name="label-29" id="label-29"><code>define_mode?</code></a></h4></dt><!-- RDLabel: "define_mode?" -->
 <dd>
-<p>������⡼�ɤ��ɤ������碌��.</p>
-<p>����</p>
+<p>今定義モードかどうか問合わせる.</p>
+<p>引数</p>
+<ul>
+<li>なし</li>
+</ul>
+<p>戻り値</p>
 <ul>
-<li>�ʤ�</li>
+<li>true (今定義モード);
+	false (今データモード);
+	nil (その他 -- 読み出し専用など).</li>
 </ul>
-<p>�����</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>true (������⡼��);</li>
+<li>nc_redef と nc_enddef の組み合わせ</li>
 </ul></dd>
-</dl>
-<pre>false (���ǡ����⡼��);
-nil (����¾ -- �ɤ߽Ф����Ѥʤ�).</pre>
-<pre>�б�����(���Ѥ���) C �� NetCDF �δؿ�
-*  nc_redef �� nc_enddef ���Ȥ߹�碌</pre>
-<dl>
-<dt><h4><a name="label:26" id="label:26"><code>sync</code></a></h4></dt><!-- RDLabel: "sync" -->
+<dt><h4><a name="label-30" id="label-30"><code>sync</code></a></h4></dt><!-- RDLabel: "sync" -->
 <dd>
-<p>���꡼��ΥХåե�����ǥ��������ȿ�Ǥ��ƥե������Ʊ��������</p>
-<p>����</p>
+<p>メモリー中のバッファーをディスク上に反映してファイルを同期させる</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>nil</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_sync</li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
-<p>dimension�����</p>
-<p>����</p>
+<p>dimensionを定義</p>
+<p>引数</p>
 <ul>
-<li>dimension_name (String) : �������dimension��̾��</li>
-<li>length (Integer) : dimension��Ĺ����̵���¼����� 0��</li>
+<li>dimension_name (String) : 定義するdimensionの名前</li>
+<li>length (Integer) : dimensionの長さ。無制限次元は 0。</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>������줿���� (NetCDFDim���֥�������)</li>
+<li>定義された次元 (NetCDFDimオブジェクト)</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_def_dim</li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
-<p>�����Х�°��������</p>
-<p>����</p>
+<p>グローバル属性を設定</p>
+<p>引数</p>
 <ul>
-<li>attribute_name (String) : �����Х�°����̾��</li>
-<li>value (Numeric, String, Array of Numeric, or NArray) : ���ꤹ����</li>
-<li>atttype (nil or String) : °���η�.
-       "char"(="string"),"byte", "sint","int","sfloat", "float" (����
-       ����,1,1,2,4,4,8 �Х���)) �ޤ��� nil (�ĤޤꤪǤ��)</li>
+<li>attribute_name (String) : グローバル属性の名前</li>
+<li>value (Numeric, String, Array of Numeric, or NArray) : 設定する値</li>
+<li>atttype (nil or String) : 属性の型.
+       "char"(="string"),"byte", "sint","int","sfloat", "float" (それ
+       ぞれ,1,1,2,4,4,8 バイト)) または nil (つまりお任せ)</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>���ꤵ�줿°�� (NetCDFAtt���֥�������)</li>
+<li>設定された属性 (NetCDFAttオブジェクト)</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_put_att_<type></li>
 </ul></dd>
-<dt><h4><a name="label:29" id="label:29"><code>def_var(<var>variable_name</var>, <var>vartype</var>, <var>dimensions</var>)</code></a></h4></dt><!-- RDLabel: "def_var" -->
+<dt><h4><a name="label-33" id="label-33"><code>def_var(<var>variable_name</var>, <var>vartype</var>, <var>dimensions</var>)</code></a></h4></dt><!-- RDLabel: "def_var" -->
 <dd>
-<p>�ѿ�����</p>
-<p>����</p>
+<p>変数を定義</p>
+<p>引数</p>
 <ul>
-<li>variable_name (String) : �������variable��̾��</li>
-<li>vartype (String or Fixnum) : �ѿ�Υ����� ("char", "byte", "sint", "sint", "int",
-       "sfloat", "float" �Τ����줫���ޤ���NArray��typecode(Fixnum))</li>
-<li>dimensions (Array) : variable�μ�����NetCDFDim �� Array���Ǥ�
-       ��®�����׼���������٤����׼����ν�ˡ�����Ĺ�����ѿ��
-       rank �Ȥʤ롣</li>
+<li>variable_name (String) : 定義するvariableの名前</li>
+<li>vartype (String or Fixnum) : 変数のタイプ ("char", "byte", "sint", "sint", "int",
+       "sfloat", "float" のいずれか、またはNArrayのtypecode(Fixnum))</li>
+<li>dimensions (Array) : variableの次元。NetCDFDim の Array。最も
+       「速く回る」次元から「遅く回る」次元の順に。その長さが変数の
+       rank となる。</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>��������ѿ�(NetCDFVar���֥�������)</li>
+<li>定義した変数(NetCDFVarオブジェクト)</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_def_var</li>
 </ul></dd>
-<dt><h4><a name="label:30" id="label:30"><code>def_var_with_dim(<var>variable_name</var>, <var>vartype</var>, <var>shape_ul0</var>, <var>dimnames</var>)</code></a></h4></dt><!-- RDLabel: "def_var_with_dim" -->
+<dt><h4><a name="label-34" id="label-34"><code>def_var_with_dim(<var>variable_name</var>, <var>vartype</var>, <var>shape_ul0</var>, <var>dimnames</var>)</code></a></h4></dt><!-- RDLabel: "def_var_with_dim" -->
 <dd>
-<p>def_var��Ʊ������ɬ�פʤ�ޤ�������������롣
-��¸������Ĺ���ȹ��ʤ�����㳰��</p>
-<p>����</p>
+<p>def_varと同じだが必要ならまず次元を定義する。
+既存次元の長さと合わない場合例外。</p>
+<p>引数</p>
 <ul>
-<li>variable_name (String) : �������variable��̾��</li>
-<li>vartype (String) : �ѿ�Υ����� ("char", "byte", "sint", "sint", "int",
-       "sfloat", "float" �Τ����줫)</li>
-<li>shape_ul0 (Array of Integer) : �ѿ�η���¨�����Ƽ�����Ĺ����̵
-       ���¼����ϥ����ɽ����Ĺ�����ѿ�� rank �Ȥʤ롣</li>
-<li>dimnames (Array of String) : �Ƽ�����̾��. Ĺ��(=>rank) ��
-       shape_ul0 ���������ʤ���Фʤ�ʤ���</li>
+<li>variable_name (String) : 定義するvariableの名前</li>
+<li>vartype (String) : 変数のタイプ ("char", "byte", "sint", "sint", "int",
+       "sfloat", "float" のいずれか)</li>
+<li>shape_ul0 (Array of Integer) : 変数の形、即ち、各次元の長さ。無
+       制限次元はゼロで表す。長さが変数の rank となる。</li>
+<li>dimnames (Array of String) : 各次元の名前. 長さ(=>rank) は
+       shape_ul0 と等しくなければならない。</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>��������ѿ�(NetCDFVar���֥�������)</li>
+<li>定義した変数(NetCDFVarオブジェクト)</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>(nc_def_var)</li>
 </ul></dd>
-<dt><h4><a name="label:31" id="label:31"><code>var(<var>var_name</var>)</code></a></h4></dt><!-- RDLabel: "var" -->
+<dt><h4><a name="label-35" id="label-35"><code>var(<var>var_name</var>)</code></a></h4></dt><!-- RDLabel: "var" -->
 <dd>
-<p>�ե�����˴�¸���ѿ�򥪡��ץ�</p>
-<p>����</p>
+<p>ファイルに既存の変数をオープン</p>
+<p>引数</p>
 <ul>
-<li>var_name (String) : �����ץ󤹤��ѿ�̾</li>
+<li>var_name (String) : オープンする変数名</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>NetCDFVar ���饹�Υ��֥������ȡ�¸�ߤ��ʤ���� nil��</li>
+<li>NetCDFVar クラスのオブジェクト。存在しなければ nil。</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_varid</li>
 </ul></dd>
-<dt><h4><a name="label:32" id="label:32"><code>vars(<var>names</var> = <var>nil</var>)</code></a></h4></dt><!-- RDLabel: "vars" -->
+<dt><h4><a name="label-36" id="label-36"><code>vars(<var>names</var> = <var>nil</var>)</code></a></h4></dt><!-- RDLabel: "vars" -->
 <dd>
-<p>�ե���������ѿ��ޤȤ�ƥ����ץ�</p>
-<p>����</p>
+<p>ファイル中の変数をまとめてオープン</p>
+<p>引数</p>
 <ul>
-<li>names (nil or Array of String) : �����ץ󤹤��ѿ�̾. nil�ʤ�����ʥǥե���ȡ�</li>
+<li>names (nil or Array of String) : オープンする変数名. nilなら全部(デフォルト)</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>NetCDFVar���֥������Ȥ�Array��names��¸�ߤ��ʤ��ѿ�̾���ޤޤ����㳰ȯ����</li>
+<li>NetCDFVarオブジェクトのArray。namesに存在しない変数名が含まれれば例外発生。</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_varid</li>
 </ul></dd>
-<dt><h4><a name="label:33" id="label:33"><code>dim(<var>dimension_name</var>)</code></a></h4></dt><!-- RDLabel: "dim" -->
+<dt><h4><a name="label-37" id="label-37"><code>dim(<var>dimension_name</var>)</code></a></h4></dt><!-- RDLabel: "dim" -->
 <dd>
-<p>��¸�μ����򥪡��ץ�</p>
-<p>����</p>
+<p>既存の次元をオープン</p>
+<p>引数</p>
 <ul>
-<li>dimension_name (String) : �����ץ󤹤뼡��̾</li>
+<li>dimension_name (String) : オープンする次元名</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>NetCDFDim���饹�Υ��֥������ȡ�¸�ߤ��ʤ���� nil��</li>
+<li>NetCDFDimクラスのオブジェクト。存在しなければ nil。</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_dimid</li>
 </ul></dd>
-<dt><h4><a name="label:34" id="label:34"><code>dims(<var>names</var> = <var>nil</var>)</code></a></h4></dt><!-- RDLabel: "dims" -->
+<dt><h4><a name="label-38" id="label-38"><code>dims(<var>names</var> = <var>nil</var>)</code></a></h4></dt><!-- RDLabel: "dims" -->
 <dd>
-<p>�ե�������μ�����ޤȤ�ƥ����ץ�</p>
-<p>����</p>
+<p>ファイル中の次元をまとめてオープン</p>
+<p>引数</p>
 <ul>
-<li>names (nil or Array of String) : �����ץ󤹤뼡��̾. nil�ʤ�����ʥǥե���ȡ�</li>
+<li>names (nil or Array of String) : オープンする次元名. nilなら全部(デフォルト)</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>NetCDFDim���֥������Ȥ�Array��names��¸�ߤ��ʤ�����̾���ޤޤ����㳰ȯ����</li>
+<li>NetCDFDimオブジェクトのArray。namesに存在しない次元名が含まれれば例外発生。</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_dimid</li>
 </ul></dd>
-<dt><h4><a name="label:35" id="label:35"><code>att(<var>attribute_name</var>)</code></a></h4></dt><!-- RDLabel: "att" -->
+<dt><h4><a name="label-39" id="label-39"><code>att(<var>attribute_name</var>)</code></a></h4></dt><!-- RDLabel: "att" -->
 <dd>
-<p>��¸�Υ����Х�°���򥪡��ץ�</p>
-<p>����</p>
+<p>既存のグローバル属性をオープン</p>
+<p>引数</p>
 <ul>
-<li>attribute_name (String) : �����ץ󤹤륰���Х�°��̾</li>
+<li>attribute_name (String) : オープンするグローバル属性名</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>¸�ߤ���� NetCDFAtt���饹�Υ��֥������ȡ�¸�ߤ��ʤ����nil</li>
+<li>存在すれば NetCDFAttクラスのオブジェクト。存在しなければnil</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>(nc_inq_attid�򸡺�������)</li>
+<li>(nc_inq_attidを検査に利用)</li>
 </ul></dd>
-<dt><h4><a name="label:36" id="label:36"><code>fill=(<var>filemode</var>)</code></a></h4></dt><!-- RDLabel: "fill=" -->
+<dt><h4><a name="label-40" id="label-40"><code>fill=(<var>filemode</var>)</code></a></h4></dt><!-- RDLabel: "fill=" -->
 <dd>
-<p>fillmode���ѹ���(NetCDF �Υǥե���Ȥ� FILL �Ǥ��롣)</p>
-<p>����</p>
+<p>fillmodeの変更。(NetCDF のデフォルトは FILL である。)</p>
+<p>引数</p>
 <ul>
 <li>fillmode (true for FILL or false for NOFILL)</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>nil</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_set_fill</li>
 </ul></dd>
-<dt><h4><a name="label:37" id="label:37"><code>each_dim{ ... }</code></a></h4></dt><!-- RDLabel: "each_dim" -->
+<dt><h4><a name="label-41" id="label-41"><code>each_dim{ ... }</code></a></h4></dt><!-- RDLabel: "each_dim" -->
 <dd>
-<p>�����˴ؤ��륤�ƥ졼��. 
-��: {|i| print i.name,"\n"} ����������̾����ɽ��.</p>
-<p>����</p>
+<p>次元に関するイテレータ. 
+例: {|i| print i.name,"\n"} で全次元の名前を表示.</p>
+<p>引数</p>
 <ul>
-<li>{ ... } : ���ƥ졼�����ѥ֥�å���do end�֥�å��Ǥ�褤��</li>
+<li>{ ... } : イテレーター用ブロック。do endブロックでもよい。</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>self</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>(nc_inq_ndims������)</li>
+<li>(nc_inq_ndimsを利用)</li>
 </ul></dd>
-<dt><h4><a name="label:38" id="label:38"><code>each_var{ ... }</code></a></h4></dt><!-- RDLabel: "each_var" -->
+<dt><h4><a name="label-42" id="label-42"><code>each_var{ ... }</code></a></h4></dt><!-- RDLabel: "each_var" -->
 <dd>
-<p>�ѿ�˴ؤ��륤�ƥ졼��. 
-��: {|i| print i.name,"\n"} �����ѿ��̾����ɽ��.</p>
-<p>����</p>
+<p>変数に関するイテレータ. 
+例: {|i| print i.name,"\n"} で全変数の名前を表示.</p>
+<p>引数</p>
 <ul>
-<li>{ ... } : ���ƥ졼�����ѥ֥�å���do end�֥�å��Ǥ�褤��</li>
+<li>{ ... } : イテレーター用ブロック。do endブロックでもよい。</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>self</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>(nc_inq_nvars������)</li>
+<li>(nc_inq_nvarsを利用)</li>
 </ul></dd>
-<dt><h4><a name="label:39" id="label:39"><code>each_att{ ... }</code></a></h4></dt><!-- RDLabel: "each_att" -->
+<dt><h4><a name="label-43" id="label-43"><code>each_att{ ... }</code></a></h4></dt><!-- RDLabel: "each_att" -->
 <dd>
-<p>�����Х�°���˴ؤ��륤�ƥ졼��. 
-��: {|i| print i.name,"\n"} ����°����̾����ɽ��.</p>
-<p>����</p>
+<p>グローバル属性に関するイテレータ. 
+例: {|i| print i.name,"\n"} で全属性の名前を表示.</p>
+<p>引数</p>
 <ul>
-<li>{ ... } : ���ƥ졼�����ѥ֥�å���do end�֥�å��Ǥ�褤��</li>
+<li>{ ... } : イテレーター用ブロック。do endブロックでもよい。</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>self</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>(nc_inq_natts, nc_inq_attname������)</li>
+<li>(nc_inq_natts, nc_inq_attnameを利用)</li>
 </ul></dd>
-<dt><h4><a name="label:40" id="label:40"><code>dim_names</code></a></h4></dt><!-- RDLabel: "dim_names" -->
+<dt><h4><a name="label-44" id="label-44"><code>dim_names</code></a></h4></dt><!-- RDLabel: "dim_names" -->
 <dd>
-<p>�ե����������������̾���������������֤���</p>
-<p>����</p>
+<p>ファイル中の全次元の名前を配列に入れて返す。</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>String �� Array</li>
+<li>String の Array</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>(nc_inq_ndims, nc_inq_dimname������)</li>
+<li>(nc_inq_ndims, nc_inq_dimnameを利用)</li>
 </ul></dd>
-<dt><h4><a name="label:41" id="label:41"><code>var_names</code></a></h4></dt><!-- RDLabel: "var_names" -->
+<dt><h4><a name="label-45" id="label-45"><code>var_names</code></a></h4></dt><!-- RDLabel: "var_names" -->
 <dd>
-<p>�ե�����������ѿ��̾���������������֤���</p>
-<p>����</p>
+<p>ファイル中の全変数の名前を配列に入れて返す。</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>String �� Array</li>
+<li>String の Array</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>(nc_inq_nvars, nc_inq_varname������)</li>
+<li>(nc_inq_nvars, nc_inq_varnameを利用)</li>
 </ul></dd>
-<dt><h4><a name="label:42" id="label:42"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
+<dt><h4><a name="label-46" id="label-46"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
 <dd>
-<p>�ե���������������Х�°����̾���������������֤���
-����</p>
+<p>ファイル中の全グローバル属性の名前を配列に入れて返す。
+引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>String �� Array</li>
+<li>String の Array</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>(nc_inq_natts, nc_inq_attname������)</li>
+<li>(nc_inq_natts, nc_inq_attnameを利用)</li>
 </ul></dd>
 </dl>
 <p>---------------------------------------------</p>
-<h1><a name="label:43" id="label:43">���饹 NetCDFDim</a></h1><!-- RDLabel: "���饹 NetCDFDim" -->
-<h3><a name="label:44" id="label:44">���饹�᥽�å�</a></h3><!-- RDLabel: "���饹�᥽�å�" -->
-<h3><a name="label:45" id="label:45">���󥹥��󥹥᥽�å�</a></h3><!-- RDLabel: "���󥹥��󥹥᥽�å�" -->
+<h1><a name="label-47" id="label-47">クラス NetCDFDim</a></h1><!-- RDLabel: "クラス NetCDFDim" -->
+<h3><a name="label-48" id="label-48">クラスメソッド</a></h3><!-- RDLabel: "クラスメソッド" -->
+<h3><a name="label-49" id="label-49">インスタンスメソッド</a></h3><!-- RDLabel: "インスタンスメソッド" -->
 <dl>
-<dt><h4><a name="label:46" id="label:46"><code>length</code></a></h4></dt><!-- RDLabel: "length" -->
+<dt><h4><a name="label-50" id="label-50"><code>length</code></a></h4></dt><!-- RDLabel: "length" -->
 <dd>
-<p>������Ĺ�����֤�</p>
-<p>����</p>
+<p>次元の長さを返す</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>Integer</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_dimlen</li>
 </ul></dd>
-<dt><h4><a name="label:47" id="label:47"><code>length_ul0</code></a></h4></dt><!-- RDLabel: "length_ul0" -->
+<dt><h4><a name="label-51" id="label-51"><code>length_ul0</code></a></h4></dt><!-- RDLabel: "length_ul0" -->
 <dd>
-<p>length ��Ʊ��������̵���¼����˴ؤ�������֤�</p>
-<p>����</p>
+<p>length と同じだが、無制限次元に関しゼロを返す</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>Integer</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_dimlen</li>
 </ul></dd>
-<dt><h4><a name="label:48" id="label:48"><code>name=(<var>dimension_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
+<dt><h4><a name="label-52" id="label-52"><code>name=(<var>dimension_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
 <dd>
-<p>̾����Ĥ�������</p>
-<p>����</p>
+<p>名前をつけかえる</p>
+<p>引数</p>
 <ul>
-<li>dimension_newname (String) : ������̾��</li>
+<li>dimension_newname (String) : 新しい名前</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>nil</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_rename_dim</li>
 </ul></dd>
-<dt><h4><a name="label:49" id="label:49"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
+<dt><h4><a name="label-53" id="label-53"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
 <dd>
-<p>̾�����֤�</p>
-<p>����</p>
+<p>名前を返す</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>String</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_dimname</li>
 </ul></dd>
-<dt><h4><a name="label:50" id="label:50"><code>unlimited?</code></a></h4></dt><!-- RDLabel: "unlimited?" -->
+<dt><h4><a name="label-54" id="label-54"><code>unlimited?</code></a></h4></dt><!-- RDLabel: "unlimited?" -->
 <dd>
-<p>̵���¼������ɤ�����</p>
-<p>����</p>
+<p>無制限次元かどうか?</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>true or false</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>(nc_inq_unlimdim ������)</li>
+<li>(nc_inq_unlimdim を利用)</li>
 </ul></dd>
 </dl>
 <p>---------------------------------------------</p>
-<h1><a name="label:51" id="label:51">���饹 NetCDFVar</a></h1><!-- RDLabel: "���饹 NetCDFVar" -->
-<h3><a name="label:52" id="label:52">���饹�᥽�å�</a></h3><!-- RDLabel: "���饹�᥽�å�" -->
+<h1><a name="label-55" id="label-55">クラス NetCDFVar</a></h1><!-- RDLabel: "クラス NetCDFVar" -->
+<h3><a name="label-56" id="label-56">クラスメソッド</a></h3><!-- RDLabel: "クラスメソッド" -->
 <dl>
-<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" -->
+<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" -->
 <dd>
-<p>NetCDF�ѿ�򥪡��ץ󤹤롣����ϡ�NetCDF#var (NetCDF���饹�Υ���
-�����󥹥᥽�å�var) ��ȤäƤ����뤷��������Τۤ���侩���롣</p>
-<p>����</p>
+<p>NetCDF変数をオープンする。これは、NetCDF#var (NetCDFクラスのイン
+スタンスメソッドvar) を使っても出来るし、そちらのほうを推奨する。</p>
+<p>引数</p>
 <ul>
-<li>file (NetCDF or String) : NetCDF���֥�������(NetCDF)
-       �ޤ��� NetCDF �ե�����Υѥ�(String)</li>
-<li>varname (String) : file����ѿ�̾</li>
-<li>mode (String) : �����ϥ⡼�ɡ�file�� String �λ��˻Ȥ��롣
-       ��NetCDF.open�ι�򸫤��</li>
-<li>share (true or false) : shared�⡼�ɤˤ��뤫��
-       file�� String �λ��˻Ȥ��롣��NetCDF.open�ι�򸫤��</li>
+<li>file (NetCDF or String) : NetCDFオブジェクト(NetCDF)
+       または NetCDF ファイルのパス(String)</li>
+<li>varname (String) : file中の変数名</li>
+<li>mode (String) : 入出力モード。fileが String の時に使われる。
+       (NetCDF.openの項を見よ)</li>
+<li>share (true or false) : sharedモードにするか。
+       fileが String の時に使われる。(NetCDF.openの項を見よ)</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>NetCDFVar���饹�Υ��֥�������</li>
+<li>NetCDFVarクラスのオブジェクト</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>(nc_open, nc_create, nc_inq_varid �������Ѥ���)</li>
+<li>(nc_open, nc_create, nc_inq_varid 等を利用する)</li>
 </ul></dd>
-<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=" -->
+<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=" -->
 <dd>
-<p><a href="#label:82">scaled_get</a>�ǻȤ�NArray�η�����ꤹ��.</p>
-<p>����</p>
+<p><a href="#label-90">scaled_get</a>で使うNArrayの型を固定する.</p>
+<p>引数</p>
 <ul>
 <li>na_type (Integer) : NArray::BYTE, NArray::SINT, NArray::INT, 
        NArray::SFLOAT, or NArray::FLOAT</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>na_type (����)</li>
+<li>na_type (引数)</li>
 </ul></dd>
-<dt><h4><a name="label:55" id="label:55"><code>NetCDFVar.unpack_type</code></a></h4></dt><!-- RDLabel: "NetCDFVar.unpack_type" -->
+<dt><h4><a name="label-59" id="label-59"><code>NetCDFVar.unpack_type</code></a></h4></dt><!-- RDLabel: "NetCDFVar.unpack_type" -->
 <dd>
-<p><a href="#label:54">NetCDFVar.unpack_type=</a>�����ꤷ��NArray�η����֤�.</p>
-<p>�����</p>
+<p><a href="#label-58">NetCDFVar.unpack_type=</a>で設定したNArrayの型を返す.</p>
+<p>戻り値</p>
 <ul>
 <li>nil, NArray::BYTE, NArray::SINT, NArray::INT, 
        NArray::SFLOAT, or NArray::FLOAT</li>
 </ul></dd>
 </dl>
-<h3><a name="label:56" id="label:56">���󥹥��󥹥᥽�å�</a></h3><!-- RDLabel: "���󥹥��󥹥᥽�å�" -->
+<h3><a name="label-60" id="label-60">インスタンスメソッド</a></h3><!-- RDLabel: "インスタンスメソッド" -->
 <dl>
-<dt><h4><a name="label:57" id="label:57"><code>dim(<var>dim_num</var>)</code></a></h4></dt><!-- RDLabel: "dim" -->
+<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" -->
+<dd>
+<p>(このメソッドは NetCDF-4 が使われてるときのみ使用可能:そうでなければ
+例外が発生する). 
+(新しく作成された)変数が圧縮(deflate)されるようにする. このメソッドは,
+変数を作成 (NetCDF#<a href="#label-33">def_var</a>) した後,NetCDF#<a href="#label-28">enddef</a>
+を呼ぶ前に呼ばなければならない.</p>
+<p>引数</p>
+<ul>
+<li>deflate_level (Integer) :: 0 to 9. (0: no compression; 9:
+       highest compression; recommended: 1 or 2).</li>
+<li>shuffle (optional; true or false; default: false) if true,
+       turn on the shuffle filter. 
+<ul>
+<li><a href="http://www.unidata.ucar.edu/software/netcdf/papers/AMS_2008.pdf"><URL:http://www.unidata.ucar.edu/software/netcdf/papers/AMS_2008.pdf></a>:
+         ``The shuffle algorithm changes the byte order in the data stream;
+	 when used with integers that are all close together, this
+	 results in a better compression ratio. There is no benefit
+	 from using the shuffle filter without also using
+	 compression.''</li>
+<li>Note: shuffle is effective for float variables too (tested by horinouchi).</li>
+</ul></li>
+</ul>
+<p>戻り値</p>
+<ul>
+<li>self</li>
+</ul></dd>
+<dt><h4><a name="label-62" id="label-62"><code>deflate_params</code></a></h4></dt><!-- RDLabel: "deflate_params" -->
+<dd>
+<p>(このメソッドは NetCDF-4 が使われてるときのみ使用可能:そうでなければ
+例外が発生する). 
+現在の圧縮(deflation)パラメターを返す。</p>
+<p>戻り値</p>
+<ul>
+<li>[shuffle, deflate, deflate_level] (a 3-element Array).
+       shuffle と deflate は true または false. deflate_level は整数(0-9).</li>
+</ul></dd>
+<dt><h4><a name="label-63" id="label-63"><code>endian=(<var>endian</var>)</code></a></h4></dt><!-- RDLabel: "endian=" -->
 <dd>
-<p>�����ѿ�ˤ����� dim_num ����(0�������)�μ��������碌�롣</p>
-<p>����</p>
+<p>(このメソッドは NetCDF-4 が使われてるときのみ使用可能:そうでなければ
+例外が発生する). 
+エンディアンを設定する。使用タイミングは <a href="#label-61">deflate</a> と同じ。</p>
+<p>Arguments</p>
 <ul>
-<li>dim_num (Fixnum) : 0,1,2,...���Ǥ�®����뼡����0��</li>
+<li>endian : 次のいずれか:
+       NetCDF::NC_ENDIAN_NATIVE (=0) (default), 
+       NetCDF::NC_ENDIAN_LITTLE (=1), or NetCDF::NC_ENDIAN_BIG (=2).</li>
 </ul>
-<p>�����</p>
+<p>Return value</p>
+<ul>
+<li>self</li>
+</ul></dd>
+<dt><h4><a name="label-64" id="label-64"><code>endian</code></a></h4></dt><!-- RDLabel: "endian" -->
+<dd>
+<p>(このメソッドは NetCDF-4 が使われてるときのみ使用可能:そうでなければ
+例外が発生する). 
+現在のエンディアン設定を返す.</p>
+<p>Return value</p>
 <ul>
-<li>NetCDFDim���֥�������</li>
+<li>次のいずれか:
+       NetCDF::NC_ENDIAN_NATIVE (=0) (default), 
+       NetCDF::NC_ENDIAN_LITTLE (=1), or NetCDF::NC_ENDIAN_BIG (=2).</li>
+</ul></dd>
+<dt><h4><a name="label-65" id="label-65"><code>dim(<var>dim_num</var>)</code></a></h4></dt><!-- RDLabel: "dim" -->
+<dd>
+<p>その変数における dim_num 番目(0から数える)の次元を問合わせる。</p>
+<p>引数</p>
+<ul>
+<li>dim_num (Fixnum) : 0,1,2,...。最も速く回る次元が0。</li>
+</ul>
+<p>戻り値</p>
+<ul>
+<li>NetCDFDimオブジェクト</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>(nc_inq_vardimid����)</li>
+<li>(nc_inq_vardimid利用)</li>
 </ul></dd>
-<dt><h4><a name="label:58" id="label:58"><code>dims</code></a></h4></dt><!-- RDLabel: "dims" -->
+<dt><h4><a name="label-66" id="label-66"><code>dims</code></a></h4></dt><!-- RDLabel: "dims" -->
 <dd>
-<p>�����ѿ��������������ˤ�����֤�</p>
-<p>����</p>
+<p>その変数の全次元を配列にいれて返す</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>NetCDFDim���֥������Ȥ�Array</li>
+<li>NetCDFDimオブジェクトのArray</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_vardimid</li>
 </ul></dd>
-<dt><h4><a name="label:59" id="label:59"><code>shape_ul0</code></a></h4></dt><!-- RDLabel: "shape_ul0" -->
+<dt><h4><a name="label-67" id="label-67"><code>shape_ul0</code></a></h4></dt><!-- RDLabel: "shape_ul0" -->
 <dd>
-<p>�ѿ�η����֤�. â��̵���¼�����Ĺ���ϥ���.
-¾���ѿ�����������.</p>
-<p>����</p>
+<p>変数の形を返す. 但し無制限次元の長さはゼロ.
+他の変数の定義に便利.</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>Array. [0�����ܤ�Ĺ��, 1�����ܤ�Ĺ��,.. ]</li>
+<li>Array. [0次元目の長さ, 1次元目の長さ,.. ]</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>(nc_inq_vardimid, nc_inq_unlimdim ��������)</li>
+<li>(nc_inq_vardimid, nc_inq_unlimdim 等を利用)</li>
 </ul></dd>
-<dt><h4><a name="label:60" id="label:60"><code>shape_current</code></a></h4></dt><!-- RDLabel: "shape_current" -->
+<dt><h4><a name="label-68" id="label-68"><code>shape_current</code></a></h4></dt><!-- RDLabel: "shape_current" -->
 <dd>
-<p>�ѿ�θ��ߤη����֤�.</p>
-<p>����</p>
+<p>変数の現在の形を返す.</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>Array. [0�����ܤ�Ĺ��, 1�����ܤ�Ĺ��,.. ]</li>
+<li>Array. [0次元目の長さ, 1次元目の長さ,.. ]</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>(nc_inq_vardimid ��������)</li>
+<li>(nc_inq_vardimid 等を利用)</li>
 </ul></dd>
-<dt><h4><a name="label:61" id="label:61"><code>each_att{ ... }</code></a></h4></dt><!-- RDLabel: "each_att" -->
+<dt><h4><a name="label-69" id="label-69"><code>each_att{ ... }</code></a></h4></dt><!-- RDLabel: "each_att" -->
 <dd>
-<p>�ѿ������°��(NetCDFAtt)�˴ؤ��륤�ƥ졼��</p>
-<p>����</p>
+<p>変数中の全属性(NetCDFAtt)に関するイテレータ</p>
+<p>引数</p>
 <ul>
-<li>{ ... }  : �����֤��֥�å�</li>
+<li>{ ... }  : 繰り返すブロック</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>self</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>(nc_inq_natts, nc_inq_attname������)</li>
+<li>(nc_inq_natts, nc_inq_attnameを利用)</li>
 </ul></dd>
-<dt><h4><a name="label:62" id="label:62"><code>dim_names</code></a></h4></dt><!-- RDLabel: "dim_names" -->
+<dt><h4><a name="label-70" id="label-70"><code>dim_names</code></a></h4></dt><!-- RDLabel: "dim_names" -->
 <dd>
-<p>�ѿ������������̾���������������֤���</p>
-<p>����</p>
+<p>変数中の全次元の名前を配列に入れて返す。</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>String �� Array</li>
+<li>String の Array</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>(nc_inq_varndims, nc_inq_vardimid, nc_inq_dimname ������)</li>
+<li>(nc_inq_varndims, nc_inq_vardimid, nc_inq_dimname を利用)</li>
 </ul></dd>
-<dt><h4><a name="label:63" id="label:63"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
+<dt><h4><a name="label-71" id="label-71"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
 <dd>
-<p>�ѿ������°����̾���������������֤���</p>
-<p>����</p>
+<p>変数中の全属性の名前を配列に入れて返す。</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>String �� Array</li>
+<li>String の Array</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>(nc_inq_natts, nc_inq_attname������)</li>
+<li>(nc_inq_natts, nc_inq_attnameを利用)</li>
 </ul></dd>
-<dt><h4><a name="label:64" id="label:64"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
+<dt><h4><a name="label-72" id="label-72"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
 <dd>
-<p>�ѿ��̾�����֤�</p>
-<p>����</p>
+<p>変数の名前を返す</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>String</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_varname</li>
 </ul></dd>
-<dt><h4><a name="label:65" id="label:65"><code>name=(<var>variable_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
+<dt><h4><a name="label-73" id="label-73"><code>name=(<var>variable_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
 <dd>
-<p>̾�����դ��ؤ���</p>
-<p>����</p>
+<p>名前を付け替える</p>
+<p>引数</p>
 <ul>
-<li>variable_newname (String) : ������̾��</li>
+<li>variable_newname (String) : 新しい名前</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>nil</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_rename_var</li>
 </ul></dd>
-<dt><h4><a name="label:66" id="label:66"><code>ndims</code></a></h4></dt><!-- RDLabel: "ndims" -->
+<dt><h4><a name="label-74" id="label-74"><code>ndims</code></a></h4></dt><!-- RDLabel: "ndims" -->
 <dd>
-<p>�����ο���䤦</p>
-<p>����</p>
+<p>次元の数を問う</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>Integer</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_varndims</li>
 </ul></dd>
-<dt><h4><a name="label:67" id="label:67"><code>rank</code></a></h4></dt><!-- RDLabel: "rank" -->
+<dt><h4><a name="label-75" id="label-75"><code>rank</code></a></h4></dt><!-- RDLabel: "rank" -->
 <dd>
-<p>ndims�Υ��ꥢ��</p></dd>
-<dt><h4><a name="label:68" id="label:68"><code>ntype</code></a></h4></dt><!-- RDLabel: "ntype" -->
+ndimsのエリアス</dd>
+<dt><h4><a name="label-76" id="label-76"><code>ntype</code></a></h4></dt><!-- RDLabel: "ntype" -->
 <dd>
-<p>vartype����̾</p></dd>
-<dt><h4><a name="label:69" id="label:69"><code>vartype</code></a></h4></dt><!-- RDLabel: "vartype" -->
+vartypeの別名</dd>
+<dt><h4><a name="label-77" id="label-77"><code>vartype</code></a></h4></dt><!-- RDLabel: "vartype" -->
 <dd>
-<p>�ѿ��ͤη����䤦</p>
-<p>����</p>
+<p>変数値の型を問う</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>String ("char","byte","sint","int","sfloat", or "float")</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_vartype</li>
 </ul></dd>
-<dt><h4><a name="label:70" id="label:70"><code>typecode</code></a></h4></dt><!-- RDLabel: "typecode" -->
+<dt><h4><a name="label-78" id="label-78"><code>typecode</code></a></h4></dt><!-- RDLabel: "typecode" -->
 <dd>
-<p>�ѿ��ͤη����䤦(NArray��typecode���֤�)</p>
-<p>����</p>
+<p>変数値の型を問う(NArrayのtypecodeで返す)</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>Fixnum���֥������� (NArray:BYTE, NArray:SINT, NArray:LINT, NArray:SFLOAT, NArray:SFLOAT, NArray:DFLOAT)</li>
+<li>Fixnumオブジェクト (NArray:BYTE, NArray:SINT, NArray:LINT, NArray:SFLOAT, NArray:SFLOAT, NArray:DFLOAT)</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_vartype</li>
 </ul></dd>
-<dt><h4><a name="label:71" id="label:71"><code>natts</code></a></h4></dt><!-- RDLabel: "natts" -->
+<dt><h4><a name="label-79" id="label-79"><code>natts</code></a></h4></dt><!-- RDLabel: "natts" -->
 <dd>
-<p>°���ο���䤦</p>
-<p>����</p>
+<p>属性の数を問う</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>Integer</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_varnatts</li>
 </ul></dd>
-<dt><h4><a name="label:72" id="label:72"><code>file</code></a></h4></dt><!-- RDLabel: "file" -->
+<dt><h4><a name="label-80" id="label-80"><code>file</code></a></h4></dt><!-- RDLabel: "file" -->
 <dd>
-<p>�����ѿ�°����ե���������碌��</p>
-<p>����</p>
+<p>その変数が属するファイルを問合わせる</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>NetCDF���饹�Υ��֥�������</li>
+<li>NetCDFクラスのオブジェクト</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul></dd>
-<dt><h4><a name="label:73" id="label:73"><code>att(<var>attribute_name</var>)</code></a></h4></dt><!-- RDLabel: "att" -->
+<dt><h4><a name="label-81" id="label-81"><code>att(<var>attribute_name</var>)</code></a></h4></dt><!-- RDLabel: "att" -->
 <dd>
-<p>̾������ꤷ��°�����֤�</p>
-<p>����</p>
+<p>名前を指定した属性を返す</p>
+<p>引数</p>
 <ul>
-<li>attribute_name (String) : ���Ф�°��̾</li>
+<li>attribute_name (String) : 取り出す属性名</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>NetCDFAtt���֥�������. ¸�ߤ��ʤ����nil</li>
+<li>NetCDFAttオブジェクト. 存在しなければnil</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>(nc_inq_attid�򸡺�������)</li>
+<li>(nc_inq_attidを検査に利用)</li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
-<p>°��������</p>
-<p>����</p>
+<p>属性を設定</p>
+<p>引数</p>
 <ul>
-<li>attribute_name (String) : attribute̾</li>
-<li>value (Numeric, String, Array of Numeric, or NArray) : ���ꤹ����</li>
-<li>atttype (nil or String) : °���η�.
-       "char"(="string"),"byte", "sint","int","sfloat", "float" (����
-       ����,1,1,2,4,4,8 �Х���)) �ޤ��� nil (�ĤޤꤪǤ��)</li>
+<li>attribute_name (String) : attribute名</li>
+<li>value (Numeric, String, Array of Numeric, or NArray) : 設定する値</li>
+<li>atttype (nil or String) : 属性の型.
+       "char"(="string"),"byte", "sint","int","sfloat", "float" (それ
+       ぞれ,1,1,2,4,4,8 バイト)) または nil (つまりお任せ)</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>NetCDFAtt�Υ��֥�������</li>
+<li>NetCDFAttのオブジェクト</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_put_att_<type></li>
 </ul></dd>
-<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" -->
-<dd>
-<p><a href="#label:76">simple_put</a>����̾(alias)</p></dd>
-<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" -->
-<dd>
-<p>�ͤ������</p>
-<p>����</p>
-<ul>
-<li>value : ������� (Numeric,Array(Numeric��1��������)��NArray)
-       �����顼(Numeric)�ޤ���Ĺ�����ξ��ϡ������ͤ���ͤ����ꤹ�롣</li>
-<li><p>option (Hash) : �ѿ�ΰ���ʬ����ꤹ�뤿��Υ��ץ���������
-       ά����С��ѿ����Τ��оݤȤʤ롣�ϥå���Υ����Ȥ��Ƥϡ�
-       "start","end","stride"���ȡ��ޤ���"index"�����ѤǤ��롣"index"
-       ��1���ǡʥ����顼�ˤ�ؤ���"end","stride"�Ͼ�ά�ġ���ά����ˤ�
-       ���ʤ��ˤ����񤭤���٤����Ǥο� value�Τ���Ȱ��פ���褦�ˤ�
-       �ʤ���Фʤ�ʤ���start,end,index�Ǥ�Array�ξ���Ʊ�͡�����ͤǸ��
-       ����ΰ��֤����Ǥ��롣"stride"�������ͤΤ߼����դ���Τǡ���
-       �����ä����֤�������и夫�����Ӥ�뤳�Ȥˤʤ롣</p>
-<p>�㡧 �ѿ�2�����ξ��:</p>
-<p>{"start"=>[2,5],"end"=>[6,-1],"stride"=>[2,4]} -- ��1�����ܤϡ�
-���� 2 ���� 6 �ޤ� 1 �Ĥ��� (0�������Τ����� 2 �� 3 ���ܤǤ�
-�뤳�Ȥ����)����2�����ܤϡ����� 6 ���� �Ǹ�(=-1)�ޤ� 3 �Ĥ���
-�ˤȤä����֥��åȡ�</p>
-<p>{"index"=>[0,0]}: �ǽ�����Ǥˤ���
-�륹���顼��</p>
-<p>{"index"=>[0,-2]}: 1�����ܤϺǽ�, 2�����ܤϺǸ夫��2���ܤˤ���
-�륹���顼��</p></li>
-</ul>
-<p>�����</p>
+<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" -->
+<dd>
+<a href="#label-84">simple_put</a>の別名(alias)</dd>
+<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" -->
+<dd>
+<p>値を入れる</p>
+<p>引数</p>
+<ul>
+<li>value : 入れる値 (Numeric,Array(Numericの1次元配列)、NArray)
+       スカラー(Numeric)または長さ1の場合は、その値を一様に設定する。</li>
+<li><p>option (Hash) : 変数の一部分を指定するためのオプション引数。省
+       略すれば、変数全体が対象となる。ハッシュのキーとしては、
+       "start","end","stride"の組、または"index"が使用できる。"index"
+       は1要素(スカラー)を指す。"end","stride"は省略可。省略するにし
+       ろしないにしろ、書きこむべき要素の数が valueのそれと一致するようにし
+       なければならない。start,end,indexではArrayの場合と同様、負の値で後ろ
+       からの位置を指定できる。"stride"は正の値のみ受け付けるので、配
+       列を引っくり返したければ後から別途やることになる。</p>
+<p>例: 変数が2次元の場合:</p>
+<p>{"start"=>[2,5],"end"=>[6,-1],"stride"=>[2,4]} -- 第1次元目は、
+要素 2 から 6 まで 1 つおき (0から数えるので要素 2 は 3 番目であ
+ることに注意)、第2次元目は、要素 6 から 最後(=-1)まで 3 つおき
+にとったサブセット。</p>
+<p>{"index"=>[0,0]}: 最初の要素にあた
+るスカラー値</p>
+<p>{"index"=>[0,-2]}: 1次元目は最初, 2次元目は最後から2番目にあた
+るスカラー値</p></li>
+</ul>
+<p>戻り値</p>
 <ul>
 <li>nil</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_put_var_<type>, nc_put_vars_<type>, nc_put_var1_<type></li>
 </ul></dd>
-<dt><h4><a name="label:77" id="label:77"><code>pack(<var>na</var>)</code></a></h4></dt><!-- RDLabel: "pack" -->
+<dt><h4><a name="label-85" id="label-85"><code>pack(<var>na</var>)</code></a></h4></dt><!-- RDLabel: "pack" -->
 <dd>
-<p>self��°�� scale_factor and/or add_offset ���Ѥ��� NArray ���� "pack" ����.</p>
-<p>�⤷�� scale_factor and/or add_offset �����ꤵ��Ƥ����
-(na-add_offset)/scale_factor ���֤��������Ǥʤ���� na ���֤���</p>
-<p>����</p>
+<p>selfの属性 scale_factor and/or add_offset を用いて NArray 等を "pack" する.</p>
+<p>もしも scale_factor and/or add_offset が設定されていれば
+(na-add_offset)/scale_factor を返す。そうでなければ na を返す。</p>
+<p>引数</p>
 <ul>
-<li>na : pack ����������� (NArray, NArrayMiss, Array)</li>
+<li>na : pack する数値配列 (NArray, NArrayMiss, Array)</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>a NArray or NArrayMiss</li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
-<p><a href="#label:76">simple_put</a> ��Ʊ�ͤ�����<a href="#label:77">pack</a>�ˤ��°�� scale_factor �� add_offset ���᤹��</p>
-<p>�������ˤĤ��Ƥ� put �β���򻲾ȤΤ���</p></dd>
-<dt><h4><a name="label:79" id="label:79"><code>get(<var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "get" -->
+<p><a href="#label-84">simple_put</a> と同様だが、<a href="#label-85">pack</a>により属性 scale_factor と add_offset を解釈する</p>
+<p>引数等については put の解説を参照のこと</p></dd>
+<dt><h4><a name="label-87" id="label-87"><code>get(<var>option</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "get" -->
 <dd>
-<p><a href="#label:80">simple_get</a>����̾(alias)</p></dd>
-<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" -->
+<a href="#label-88">simple_get</a>の別名(alias)</dd>
+<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" -->
 <dd>
-<p>�ͤ���Ф�</p>
-<p>����</p>
+<p>値を取り出す</p>
+<p>引数</p>
 <ul>
-<li>option (Hash) : �ѿ�ΰ���ʬ����ꤹ�뤿��Υ��ץ���������
-       �ͤ� put ��Ʊ����</li>
+<li>option (Hash) : 変数の一部分を指定するためのオプション引数。仕
+       様は put に同じ。</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>NArray���饹�Υ��֥�������</li>
+<li>NArrayクラスのオブジェクト</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_get_var_<type>, nc_get_vars_<type>, nc_get_var1_<type></li>
 </ul></dd>
-<dt><h4><a name="label:81" id="label:81"><code>unpack(<var>na</var>)</code></a></h4></dt><!-- RDLabel: "unpack" -->
+<dt><h4><a name="label-89" id="label-89"><code>unpack(<var>na</var>)</code></a></h4></dt><!-- RDLabel: "unpack" -->
 <dd>
-<p>self��°�� scale_factor and/or add_offset ���Ѥ��� NArray ���� "unpack" ����.</p>
-<p>�⤷�� scale_factor and/or add_offset �����ꤵ��Ƥ����
-na * scale_factor + add_offset ���֤��������Ǥʤ���� na ���֤���
-coerce �ˤ�äƷ����Ѳ����� -- �㤨�С��⤷ na �� sint ��
-scale_factor �� add_offset �� sfloat �Ǥ���С��֤��ͤ� sfloat
-�ˤʤ롣�֤��ͤη��� <a href="#label:54">NetCDFVar.unpack_type=</a> ��Ȥä�
-�ۤ˻��ꤹ�뤳�Ȥ�Ǥ��롣</p>
-<p>����</p>
+<p>selfの属性 scale_factor and/or add_offset を用いて NArray 等を "unpack" する.</p>
+<p>もしも scale_factor and/or add_offset が設定されていれば
+na * scale_factor + add_offset を返す。そうでなければ na を返す。
+coerce によって型が変化する -- 例えば、もし na が sint で
+scale_factor と add_offset が sfloat であれば、返り値は sfloat
+になる。返り値の型は <a href="#label-58">NetCDFVar.unpack_type=</a> を使って
+陽に指定することもできる。</p>
+<p>引数</p>
 <ul>
-<li>na : unpack ����������� (NArray, or NArrayMiss)</li>
+<li>na : unpack する数値配列 (NArray, or NArrayMiss)</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>a NArray or NArrayMiss</li>
 </ul></dd>
-<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" -->
-<dd>
-<p><a href="#label:80">simple_get</a> ��Ʊ�ͤ�����<a href="#label:81">unpack</a>�ˤ��°�� scale_factor �� add_offset ���᤹��</p>
-<p>�������ˤĤ��Ƥ� put �β���򻲾ȤΤ���</p></dd>
-<dt><h4><a name="label:83" id="label:83"><code>[]</code></a></h4></dt><!-- RDLabel: "[]" -->
-<dd>
-<p>NetCDFVar#get ��Ʊ�ͤ��������֥��åȤ� NArray#[] ��Ʊ�ͤ˻��ꤹ��. </p>
-<p>NArray�ǥ��ݡ��Ȥ���Ƥ��륵�֥��åȻ�����ˡ�˲ä��ơ����ƥå���
-�����ϰϤ����Ǥ��롣����� {0..-1,2} �ʤɤȤ��롣�Ĥޤꡢ����
-�����Υϥå���Υ������ϰ�(Range)���ͤ˥��ƥå�(Integer)�����
-���롣NArray�Ȱ㤤���������ʾ���ѿ�򣱼����Υ���ǥå�����
-���ꤹ�뤳�ȤϽ���ʤ���</p></dd>
-<dt><h4><a name="label:84" id="label:84"><code>[] = </code></a></h4></dt><!-- RDLabel: "[]=" -->
-<dd>
-<p>NetCDFVar#put ��Ʊ�ͤ��������֥��åȤ� NArray#[]= ��Ʊ�ͤ˻��ꤹ��. </p>
-<p>NArray�ǥ��ݡ��Ȥ���Ƥ��륵�֥��åȻ�����ˡ�˲ä��ơ����ƥå���
-�����ϰϤ����Ǥ��롣����� {0..-1,2} �ʤɤȤ��롣�Ĥޤꡢ����
-�����Υϥå���Υ������ϰ�(Range)���ͤ˥��ƥå�(Integer)�����
-���롣NArray�Ȱ㤤���������ʾ���ѿ�򣱼����Υ���ǥå�����
-���ꤹ�뤳�ȤϽ���ʤ���</p></dd>
+<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" -->
+<dd>
+<p><a href="#label-88">simple_get</a> と同様だが、<a href="#label-89">unpack</a>により属性 scale_factor と add_offset を解釈する</p>
+<p>引数等については put の解説を参照のこと</p></dd>
+<dt><h4><a name="label-91" id="label-91"><code>[]</code></a></h4></dt><!-- RDLabel: "[]" -->
+<dd>
+<p>NetCDFVar#get と同様だが、サブセットを NArray#[] と同様に指定する. </p>
+<p>NArrayでサポートされているサブセット指定方法に加えて、ステップ付
+きの範囲を指定できる。これは {0..-1,2} などとする。つまり、要素
+数が1のハッシュのキーに範囲(Range)、値にステップ(Integer)を指定
+する。NArrayと違い、2次元以上の変数を1次元のインデックスで
+指定することは出来ない。</p></dd>
+<dt><h4><a name="label-92" id="label-92"><code>[] = </code></a></h4></dt><!-- RDLabel: "[]=" -->
+<dd>
+<p>NetCDFVar#put と同様だが、サブセットを NArray#[]= と同様に指定する. </p>
+<p>NArrayでサポートされているサブセット指定方法に加えて、ステップ付
+きの範囲を指定できる。これは {0..-1,2} などとする。つまり、要素
+数が1のハッシュのキーに範囲(Range)、値にステップ(Integer)を指定
+する。NArrayと違い、2次元以上の変数を1次元のインデックスで
+指定することは出来ない。</p></dd>
 </dl>
-<h3><a name="label:85" id="label:85">"numru/netcdf_miss" �� require ���뤳�Ȥ��ɲä���륤�󥹥��󥹥᥽�å�</a></h3><!-- RDLabel: ""numru/netcdf_miss" �� require ���뤳�Ȥ��ɲä���륤�󥹥��󥹥᥽�å�" -->
+<h3><a name="label-93" id="label-93">"numru/netcdf_miss" を require することで追加されるインスタンスメソッド</a></h3><!-- RDLabel: ""numru/netcdf_miss" を require することで追加されるインスタンスメソッド" -->
 <dl>
-<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" -->
+<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" -->
 <dd>
-<p><a href="#label:79">get</a>��Ʊ�ͤ������ǡ�����»���������</p>
-<p>�ǡ�����»��ɸ��°�� valid_range, (valid_min and/or valid_max), 
-�ޤ��� missing_value �ˤ����ꤵ��롣����ͥ���̤Ϥ��ν��֤�
-���롣�֥桼�����������ɡפο侩�Ȱ㤤�������Ǥ� missin_value ��
-��ᤵ��롣�⤷ missing_value �� valid_* ��Ʊ����¸�ߤ����硢
-missng_value ��ͭ���ǡ����ϰϳ��ˤ��äƤϤʤ�ʤ������ξ�硢�㳰
-��ȯ�����롣</p>
-<p>�嵭�Τ褦�ˤ⤷�ǡ�����»�ʤλ����ˤ����ꤵ��Ƥ���С����Υ᥽��
-�ɤ� NArrayMiss ���֥������Ȥ��֤��������Ǥʤ���� NArray ���֤���</p>
-<p>����</p>
+<p><a href="#label-87">get</a>と同様だが、データ欠損を処理する</p>
+<p>データ欠損は標準属性 valid_range, (valid_min and/or valid_max), 
+または missing_value により指定される。解釈の優先順位はこの順番で
+ある。「ユーザーズガイド」の推奨と違い、ここでは missin_value も
+解釈される。もし missing_value と valid_* が同時に存在する場合、
+missng_value は有効データ範囲外にあってはならない。その場合、例外
+が発生する。</p>
+<p>上記のようにもしデータ欠損(の仕方)が指定されていれば、このメソッ
+ドは NArrayMiss オブジェクトを返す。そうでなければ NArray を返す。</p>
+<p>引数</p>
 <ul>
-<li><a href="#label:79">get</a>�򸫤�.</li>
+<li><a href="#label-87">get</a>を見よ.</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>NArrayMiss���֥������� (�ǡ�����»�����ꤵ�Ƥ�����) �ޤ��� NArray
-       ���֥������� (�ǡ�����»�����ꤵ�Ƥʤ����)</li>
+<li>NArrayMissオブジェクト (データ欠損が指定さている場合) または NArray
+       オブジェクト (データ欠損が指定さてない場合)</li>
 </ul>
-<p>NetcdfError �ʳ����㳰ȯ��</p>
+<p>NetcdfError 以外の例外発生</p>
 <ul>
-<li>missing_value ���ǡ���ͭ���ϰϤˤʤ� (�嵭���ȤΤ���).</li>
+<li>missing_value がデータ有効範囲にない (上記参照のこと).</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li><a href="#label:79">get</a> �򸫤�. ���Υ᥽�åɤ� Ruby �Τߤǽ񤫤�Ƥ���. </li>
+<li><a href="#label-87">get</a> を見よ. このメソッドは Ruby のみで書かれている. </li>
 </ul>
-<p>��</p>
+<p>例</p>
 <ul>
-<li><p>������Ǥ� <a href="#label:79">get</a> �� <a href="#label:86">get_with_miss</a> ���֤������Ƥ���.
-       ��������� <a href="#label:83">[]</a> ��ǡ�����»���᤹��褦�ˤʤ� (����� 
-       <code>get</code> ��Ƥ�Ǥ�Τ�).</p>
+<li><p>次の例では <a href="#label-87">get</a> を <a href="#label-94">get_with_miss</a> を置き換えている.
+       こうすると <a href="#label-91">[]</a> もデータ欠損を解釈するようになる (内部で 
+       <code>get</code> を呼んでるので).</p>
 <pre>file = NetCDF.open('hogehoge.nc')
 var = file.var('var')
 def var.get(*args); get_with_miss(*args); end
 p var.get       # --> inteprets data missing if defined
 p var[0..-1,0]  # --> inteprets data missing if defined (assumed 2D)</pre></li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
-<p><a href="#label:86">get_with_miss</a>��Ʊ�ͤ�����<a href="#label:81">unpack</a>�ˤ�ꥹ������󥰤�Ԥ�.</p>
-<p>��»�ͽ����ϴ���Ū�ˤ� pack �����ǡ������оݤ˹Ԥ�(�����¿����
-����٥󥷥����Ѥ���Ƥ���)����������valid_* / missing_value
-�η��� pack �����ǡ����η��Ȱۤʤꡢ���� unpack�����ǡ����η���
-���פ���Ȥ��ʤ˸¤�� unpack �����ǡ������оݤȤ��롣
-����Ǵ���Ū�����ƤΥ���٥󥷥����б��Ǥ��롣</p>
-<p>��</p>
+<p><a href="#label-94">get_with_miss</a>と同様だが、<a href="#label-89">unpack</a>によりスケーリングも行う.</p>
+<p>欠損値処理は基本的には pack したデータを対象に行う(これは多くの
+コンベンション採用されている)。ただし、valid_* / missing_value
+の型が pack したデータの型と異なり、かつ unpackしたデータの型と
+一致するとき(に限り) unpack したデータを対象とする。
+これで基本的に全てのコンベンションに対応できる。</p>
+<p>例</p>
 <ul>
-<li>�嵭���ȡ�Ʊ�����Ȥ��Ǥ��롣</li>
+<li>上記参照。同じことができる。</li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
-<p><a href="#label:75">put</a>��Ʊ�ͤ������ǡ�����»���������</p>
-<p>�⤷�� <code>value</code> �� NArray �ʤ顢���Υ᥽�åɤ� <a href="#label:75">put</a> ��Ʊ
-��. �⤷<code>value</code> �� NArrayMiss �Ǥ��� self ��°���ˤ��ǡ�����»��
-�������Ƥ���� (<a href="#label:86">get_with_miss</a>�򻲾ȤΤ���)��<code>value</code> 
-��Υǡ�����»����ᤵ��롣¨����<code>value</code>��η�»�ǡ����ϡ�
-�����»�� (missing_value �ޤ��� _FillValue �ޤ��ϥǡ���ͭ���ϰ�
-����Ŭ������) ���֤�������줿��ǥե�����˽񤭹��ޤ�롣
-<code>value</code> ������»�ǡ����� <code>self</code> �ˤ�����ͭ���ϰϤ����ä�
-���뤫�ɤ����ϥ����å�����ʤ���</p>
-<p>����</p>
+<p><a href="#label-83">put</a>と同様だが、データ欠損を処理する</p>
+<p>もしも <code>value</code> が NArray なら、このメソッドは <a href="#label-83">put</a> に同
+じ. もし<code>value</code> が NArrayMiss でかつ self の属性によりデータ欠損が
+定義されていれば (<a href="#label-94">get_with_miss</a>を参照のこと)、<code>value</code> 
+中のデータ欠損が解釈される。即ち、<code>value</code>中の欠損データは、
+ある欠損値 (missing_value または _FillValue またはデータ有効範囲
+外の適当な値) に置き換えられた上でファイルに書き込まれる。
+<code>value</code> 中の非欠損データが <code>self</code> における有効範囲に入って
+いるかどうかはチェックされない。</p>
+<p>引数</p>
 <ul>
-<li>value : NArrayMiss �ޤ��� <a href="#label:75">put</a> �ǵ�����Ƥ��륯�饹�Υ��֥�������.</li>
-<li>option (Hash) : <a href="#label:75">put</a> �򸫤�.</li>
+<li>value : NArrayMiss または <a href="#label-83">put</a> で許されているクラスのオブジェクト.</li>
+<li>option (Hash) : <a href="#label-83">put</a> を見よ.</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>nil</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li><a href="#label:75">put</a> �򸫤�. ���Υ᥽�åɤ� Ruby �Τߤǽ񤫤�Ƥ���. </li>
+<li><a href="#label-83">put</a> を見よ. このメソッドは Ruby のみで書かれている. </li>
 </ul>
-<p>��</p>
+<p>例</p>
 <ul>
-<li><p>������Ǥ� <a href="#label:75">put</a> �� <a href="#label:88">put_with_miss</a> ���֤������Ƥ���.
-       ��������� <a href="#label:84">[]=</a> ��ǡ�����»���᤹��褦�ˤʤ� (����� 
-       <code>put</code> ��Ƥ�Ǥ�Τ�).</p>
+<li><p>次の例では <a href="#label-83">put</a> を <a href="#label-96">put_with_miss</a> を置き換えている.
+       こうすると <a href="#label-92">[]=</a> もデータ欠損を解釈するようになる (内部で 
+       <code>put</code> を呼んでるので).</p>
 <pre>file = NetCDF.open('hogehoge.nc')
 var = file.var('var')
 def var.put(*args); put_with_miss(*args); end
 var.put = narray_miss      # --> inteprets data missing if defined
 var[0..-1,0] = narray_miss # --> inteprets data missing if defined (assumed 2D)</pre></li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
-<p><a href="#label:88">put_with_miss</a>��Ʊ�ͤ�����<a href="#label:77">pack</a>�ˤ�ꥹ������󥰤�Ԥ�.</p>
-<p>��»�ͽ����ϴ���Ū�ˤ� pack �����ǡ������оݤ˹Ԥ�(�����¿����
-����٥󥷥����Ѥ���Ƥ���)����������valid_* / missing_value
-�η��� pack �����ǡ����η��Ȱۤʤꡢ���� unpack�����ǡ����η���
-���פ���Ȥ��ʤ˸¤�� unpack �����ǡ������оݤȤ��롣
-����Ǵ���Ū�����ƤΥ���٥󥷥����б��Ǥ��롣</p>
-<p>��</p>
+<p><a href="#label-96">put_with_miss</a>と同様だが、<a href="#label-85">pack</a>によりスケーリングも行う.</p>
+<p>欠損値処理は基本的には pack したデータを対象に行う(これは多くの
+コンベンション採用されている)。ただし、valid_* / missing_value
+の型が pack したデータの型と異なり、かつ unpackしたデータの型と
+一致するとき(に限り) unpack したデータを対象とする。
+これで基本的に全てのコンベンションに対応できる。</p>
+<p>例</p>
 <ul>
-<li>�嵭���ȡ�Ʊ�����Ȥ��Ǥ��롣</li>
+<li>上記参照。同じことができる。</li>
 </ul></dd>
 </dl>
 <p>---------------------------------------------</p>
-<h1><a name="label:90" id="label:90">���饹 NetCDFAtt</a></h1><!-- RDLabel: "���饹 NetCDFAtt" -->
-<h3><a name="label:91" id="label:91">���饹�᥽�å�</a></h3><!-- RDLabel: "���饹�᥽�å�" -->
-<h3><a name="label:92" id="label:92">���󥹥��󥹥᥽�å�</a></h3><!-- RDLabel: "���󥹥��󥹥᥽�å�" -->
+<h1><a name="label-98" id="label-98">クラス NetCDFAtt</a></h1><!-- RDLabel: "クラス NetCDFAtt" -->
+<h3><a name="label-99" id="label-99">クラスメソッド</a></h3><!-- RDLabel: "クラスメソッド" -->
+<h3><a name="label-100" id="label-100">インスタンスメソッド</a></h3><!-- RDLabel: "インスタンスメソッド" -->
 <dl>
-<dt><h4><a name="label:93" id="label:93"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
+<dt><h4><a name="label-101" id="label-101"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
 <dd>
-<p>°����̾�����֤�</p>
-<p>����</p>
+<p>属性の名前を返す</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>String</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul></dd>
-<dt><h4><a name="label:94" id="label:94"><code>name=(<var>attribute_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
+<dt><h4><a name="label-102" id="label-102"><code>name=(<var>attribute_newname</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
 <dd>
-<p>°����̾�����ѹ�</p>
-<p>����</p>
+<p>属性の名前を変更</p>
+<p>引数</p>
 <ul>
-<li>attribute_newname (String) : ������̾��</li>
+<li>attribute_newname (String) : 新しい名前</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>nil</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_rename_att</li>
 </ul></dd>
-<dt><h4><a name="label:95" id="label:95"><code>copy(<var>var_or_file</var>)</code></a></h4></dt><!-- RDLabel: "copy" -->
+<dt><h4><a name="label-103" id="label-103"><code>copy(<var>var_or_file</var>)</code></a></h4></dt><!-- RDLabel: "copy" -->
 <dd>
-<p>°�����̤��ѿ�ޤ��ϥե�����˥��ԡ����ե�����ξ��ϥ����Х�°���ˤʤ�</p>
-<p>����</p>
+<p>属性を別の変数またはファイルにコピー。ファイルの場合はグローバル属性になる</p>
+<p>引数</p>
 <ul>
 <li>var_or_file (NetCDFVar or NetCDF)</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>���ԡ����ƺ��줿°�� (NetCDFAtt)</li>
+<li>コピーして作られた属性 (NetCDFAtt)</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_copy_att</li>
 </ul></dd>
-<dt><h4><a name="label:96" id="label:96"><code>delete</code></a></h4></dt><!-- RDLabel: "delete" -->
+<dt><h4><a name="label-104" id="label-104"><code>delete</code></a></h4></dt><!-- RDLabel: "delete" -->
 <dd>
-<p>°������</p>
-<p>����</p>
+<p>属性を削除</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>nil</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_del_att</li>
 </ul></dd>
-<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" -->
+<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" -->
 <dd>
-<p>°�����ͤ�����</p>
-<p>����</p>
+<p>属性の値を設定</p>
+<p>引数</p>
 <ul>
-<li>value (Numeric, String, Array of Numeric, or NArray) : �������</li>
-<li>atttype (nil or String) : °���η�.
-       "char"(="string"),"byte", "sint","int","sfloat", "float" (����
-       ����,1,1,2,4,4,8 �Х���)) �ޤ��� nil (�ĤޤꤪǤ��)</li>
+<li>value (Numeric, String, Array of Numeric, or NArray) : 入れる値</li>
+<li>atttype (nil or String) : 属性の型.
+       "char"(="string"),"byte", "sint","int","sfloat", "float" (それ
+       ぞれ,1,1,2,4,4,8 バイト)) または nil (つまりお任せ)</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>nil</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_put_att_<type></li>
 </ul></dd>
-<dt><h4><a name="label:98" id="label:98"><code>get</code></a></h4></dt><!-- RDLabel: "get" -->
+<dt><h4><a name="label-106" id="label-106"><code>get</code></a></h4></dt><!-- RDLabel: "get" -->
 <dd>
-<p>°������Ȥ���Ф�</p>
-<p>����</p>
+<p>属性の中身を取り出す</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>ʸ����ޤ���NArray���֥������� (���: �����顼�ξ���Ĺ��1��</li>
+<li>文字列またはNArrayオブジェクト (注意: スカラーの場合も長さ1の
+	NArrayになる)</li>
+</ul>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
+<ul>
+<li>nc_get_att_<type></li>
 </ul></dd>
-</dl>
-<pre>NArray�ˤʤ�)</pre>
-<pre>�б�����(���Ѥ���) C �� NetCDF �δؿ�
-*  nc_get_att_<type></pre>
-<dl>
-<dt><h4><a name="label:99" id="label:99"><code>atttype</code></a></h4></dt><!-- RDLabel: "atttype" -->
+<dt><h4><a name="label-107" id="label-107"><code>atttype</code></a></h4></dt><!-- RDLabel: "atttype" -->
 <dd>
-<p>°���ͤη����䤦</p>
-<p>����</p>
+<p>属性値の型を問う</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
 <li>"char","byte","sint","int","sfloat","float"</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_atttype</li>
 </ul></dd>
-<dt><h4><a name="label:100" id="label:100"><code>typecode</code></a></h4></dt><!-- RDLabel: "typecode" -->
+<dt><h4><a name="label-108" id="label-108"><code>typecode</code></a></h4></dt><!-- RDLabel: "typecode" -->
 <dd>
-<p>°���ͤη����䤦(NArray��typecode���֤�)</p>
-<p>����</p>
+<p>属性値の型を問う(NArrayのtypecodeで返す)</p>
+<p>引数</p>
 <ul>
-<li>�ʤ�</li>
+<li>なし</li>
 </ul>
-<p>�����</p>
+<p>戻り値</p>
 <ul>
-<li>Fixnum���֥������� (NArray:BYTE, NArray:SINT, NArray:LINT, NArray:SFLOAT, NArray:SFLOAT, NArray:DFLOAT)</li>
+<li>Fixnumオブジェクト (NArray:BYTE, NArray:SINT, NArray:LINT, NArray:SFLOAT, NArray:SFLOAT, NArray:DFLOAT)</li>
 </ul>
-<p>�б�����(���Ѥ���) C �� NetCDF �δؿ�</p>
+<p>対応する(利用する) C 版 NetCDF の関数</p>
 <ul>
 <li>nc_inq_atttype</li>
 </ul></dd>
diff --git a/doc/Ref_man_jp.rd b/doc/Ref_man_jp.rd
index cfbf3e4..85bea5d 100644
--- a/doc/Ref_man_jp.rd
+++ b/doc/Ref_man_jp.rd
@@ -1,6 +1,8 @@
 =begin
 =RubyNetCDF ��ե���󥹥ޥ˥奢��
 
+RubyNetCDF version : 0.7.1
+
 * ((<�᥽�åɥ���ǥå���>))
 
 ---------------------------------------------
@@ -23,6 +25,8 @@ NumPy 
 ((<NArrayMiss|URL:http://ruby.gfd-dennou.org/products/narray_miss/>)) 
 ��ɬ�פǤ��롣�ܤ�����((<����ˡ>))�򸫤衣
 
+���� NetCDF-4 �Υ��ݡ��Ȥ���ʬŪ�Ǥ���(�������ǡ�����ǥ�ϥ��ݡ��Ȥ��Ƥʤ�)��
+
 ===����
 
 RubyNetCDF �ϰʲ��Σ��ĤΥ��饹���鹽������롣
@@ -146,6 +150,9 @@ RubyNetCDF
 * ((<���饹 NetCDF>))
 
   ���饹�᥽�å�
+    * ((<NetCDF.nc4?>)) ��󥯤��줿 NetCDF �� version 4 ���ɤ����֤�
+    * ((<NetCDF.creation_format=>)) NetCDF.create�Ǻ����ե�����ե����ޥåȤ����ꤹ�� (NetCDF-4 ����).
+    * ((<NetCDF.creation_format>))  NetCDF.create�Ǻ����ե�����ե����ޥåȤ�������֤�. (NetCDF-4 ����).
     * ((<NetCDF.open>))     �ե����륪���ץ�ʥ��饹�᥽�åɡ�mode="w" �ǥե����뤬¸�ߤ��ʤ���п�������
     * ((<NetCDF.new>))     NetCDF.open�᥽�åɤΥ����ꥢ���Ǥ���
     * ((<NetCDF.create>))     NetCDF�ե��������ʥ��饹�᥽�å�)
@@ -199,6 +206,10 @@ RubyNetCDF
 
 
   ���󥹥��󥹥᥽�å�
+    * ((<deflate>)) ���� (deflation) ������. (netCDF-4 only)
+    * ((<deflate_params>)) ���ߤΰ���������礻. (netCDF-4 only)
+    * ((<endian=>)) ����ǥ���������� (netCDF-4 only)
+    * ((<endian>)) ����ǥ�����������֤�. (netCDF-4 only)
     * ((<dim>))     �����ѿ�ˤ����� dim_num ����(0�������)�μ��������碌�롣
     * ((<dims>))     �����ѿ��������������ˤ�����֤�
     * ((<shape_ul0>))     �ѿ�η����֤�. â��̵���¼�����Ĺ���ϥ���.
@@ -254,7 +265,36 @@ RubyNetCDF
 ---------------------------------------------
 
 =���饹 NetCDF
+===���
+* NC_NOWRITE, NC_WRITE, NC_SHARE, NC_CLOBBER, NC_NOCLOBBER, NC_64BIT_OFFSET, NC_NETCDF4, NC_CLASSIC_MODEL, NCVERSION, SUPPORT_BIGMEM : ������ NumRu::NetCDF::NC_NOWRITE �ʤɥ����������롣
+
 ===���饹�᥽�å�
+---NetCDF.nc4?
+     ���Υ饤�֥�꤬ NetCDF version 4 ��Ȥ��褦�ˤʤäƤ����
+     �ʥ�󥯤���Ƥ� NetCDF �饤�֥�꤬ver 4�ʤ��true ��
+     �����Ǥʤ���� (NetCDF 3�ʤ�) false ���֤���
+
+---NetCDF.creation_format=(cmode)
+     (���Υ᥽�åɤ� NetCDF-4 ���Ȥ��Ƥ�Ȥ��Τ߻��Ѳ�ǽ�������Ǥʤ����
+     �㳰��ȯ������). NetCDF.create �Ǻ����ե�����Υե����ޥåȤ���ꤹ��.
+     �������� "classic".
+
+     ����
+     * cmode : �ʲ��Τ����줫��
+       * 0, nil, or NetCDF::NC_CLASSIC_MODEL : classic format
+         (��������� NetCDF-3 �Υե����ޥå�). ���줬�������.
+       * NetCDF::NC_64BIT_OFFSET : classic �������ѿ�Υ��������礭�������
+       * NetCDF::NC_NETCDF4 : HDF5 �١����� NetCDF-4 ���ե����ޥå�
+       * ( NetCDF::NC_NETCDF4 | NetCDF::NC_CLASSIC_MODEL) [�����
+         NetCDF::NC_NETCDF4 �� NetCDF::NC_CLASSIC_MODEL �� bit "or"]: 
+         NetCDF-4 ���ե����ޥåȤ������������ǡ�����ǥ�ϻȤ��ʤ��褦����.
+
+
+---NetCDF.creation_format
+     (���Υ᥽�åɤ� NetCDF-4 ���Ȥ��Ƥ�Ȥ��Τ߻��Ѳ�ǽ�������Ǥʤ����
+     �㳰��ȯ������). 
+     NetCDF.create �Ǻ����ե�����Υե����ޥåȤθ��ߤ�������֤�.
+
 ---NetCDF.open(filename, mode="r", share=false)
      �ե����륪���ץ�ʥ��饹�᥽�åɡ�mode="w" �ǥե����뤬¸�ߤ��ʤ���п�������
 
@@ -757,6 +797,61 @@ RubyNetCDF
        NArray::SFLOAT, or NArray::FLOAT
 
 ===���󥹥��󥹥᥽�å�
+---deflate(deflate_level, shuffle=false)
+     (���Υ᥽�åɤ� NetCDF-4 ���Ȥ��Ƥ�Ȥ��Τ߻��Ѳ�ǽ�������Ǥʤ����
+     �㳰��ȯ������). 
+     (�������������줿)�ѿ�����(deflate)�����褦�ˤ���. ���Υ᥽�åɤϡ�
+     �ѿ����� (NetCDF#((<def_var>))) �����塤NetCDF#((<enddef>))
+     ��Ƥ����˸ƤФʤ���Фʤ�ʤ�.
+
+     ����
+     * deflate_level (Integer) :: 0 to 9. (0: no compression; 9:
+       highest compression; recommended: 1 or 2).
+     * shuffle (optional; true or false; default: false) if true,
+       turn on the shuffle filter. 
+       * ((<URL:http://www.unidata.ucar.edu/software/netcdf/papers/AMS_2008.pdf>)):
+         ``The shuffle algorithm changes the byte order in the data stream;
+	 when used with integers that are all close together, this
+	 results in a better compression ratio. There is no benefit
+	 from using the shuffle filter without also using
+	 compression.''
+       * Note: shuffle is effective for float variables too (tested by horinouchi).
+
+     �����
+     * self
+
+---deflate_params
+     (���Υ᥽�åɤ� NetCDF-4 ���Ȥ��Ƥ�Ȥ��Τ߻��Ѳ�ǽ�������Ǥʤ����
+     �㳰��ȯ������). 
+     ���ߤΰ���(deflation)�ѥ�᥿�����֤���
+
+     �����
+     * [shuffle, deflate, deflate_level] (a 3-element Array).
+       shuffle �� deflate �� true �ޤ��� false. deflate_level ������(0-9).
+
+---endian=(endian)
+     (���Υ᥽�åɤ� NetCDF-4 ���Ȥ��Ƥ�Ȥ��Τ߻��Ѳ�ǽ�������Ǥʤ����
+     �㳰��ȯ������). 
+     ����ǥ���������ꤹ�롣���ѥ����ߥ󥰤� ((<deflate>)) ��Ʊ����
+
+     Arguments
+     * endian : ���Τ����줫:
+       NetCDF::NC_ENDIAN_NATIVE (=0) (default), 
+       NetCDF::NC_ENDIAN_LITTLE (=1), or NetCDF::NC_ENDIAN_BIG (=2).
+
+     Return value
+     * self
+
+---endian
+     (���Υ᥽�åɤ� NetCDF-4 ���Ȥ��Ƥ�Ȥ��Τ߻��Ѳ�ǽ�������Ǥʤ����
+     �㳰��ȯ������). 
+     ���ߤΥ���ǥ�����������֤�.
+
+     Return value
+     * ���Τ����줫:
+       NetCDF::NC_ENDIAN_NATIVE (=0) (default), 
+       NetCDF::NC_ENDIAN_LITTLE (=1), or NetCDF::NC_ENDIAN_BIG (=2).
+
 ---dim(dim_num)
      �����ѿ�ˤ����� dim_num ����(0�������)�μ��������碌�롣
 
diff --git a/doc/to_html b/doc/to_html
index 25528a2..1e3c09f 100755
--- a/doc/to_html
+++ b/doc/to_html
@@ -1,7 +1,7 @@
 #!/bin/csh
-nkf -e Ref_man_jp.rd | rd2  | \
+nkf -m Ref_man_jp.rd | rd2 --out-code=utf-8 | \
       sed -e 's/<dt>/<dt><h4>/' -e 's/<\/dt>/<\/h4><\/dt>/' \
-      >! Ref_man_jp.html
+      > Ref_man_jp.html
 rd2 Ref_man.rd  | \
       sed -e 's/<dt>/<dt><h4>/' -e 's/<\/dt>/<\/h4><\/dt>/' \
-      >! Ref_man.html
+      > Ref_man.html
diff --git a/extconf.rb b/extconf.rb
index da90b7c..1ad8b17 100644
--- a/extconf.rb
+++ b/extconf.rb
@@ -1,7 +1,30 @@
 require "mkmf"
+require "rubygems" unless defined?(Gem)
 
-dir_config('narray',$sitearchdir,$sitearchdir)
-dir_config('netcdf','/usr/local')
+ar = ARGV.grep( /^--with-netcdf-version=/ )
+if ar.length > 0
+  ncversion = ar[0].sub(/^--with-netcdf-version=/,"")
+else
+  ncversion = nil
+end
+
+if Gem.respond_to?(:find_files)
+  require "rbconfig"
+  so = RbConfig::CONFIG["DLEXT"]
+  narray_include = File.expand_path(File.dirname(Gem.find_files("narray.h")[0]))
+  narray_lib = File.expand_path(File.dirname(Gem.find_files("narray." + so)[0]))
+else
+  gem_home=(`gem environment GEM_HOME`).chomp
+  narray_dir = Dir.glob("#{gem_home}/gems/narray-*").sort[-1]
+  if narray_dir
+    narray_include = narray_lib = narray_dir
+  else
+    narray_include = narray_lib = [ $sitearchdir, $vendorarchdir]
+  end
+end
+dir_config('narray', narray_include, narray_lib)
+
+dir_config('netcdf', '/usr/local')
 
 if ( ! ( have_header("narray.h") && have_header("narray_config.h") ) ) then
 print <<EOS
@@ -15,59 +38,26 @@ EOS
    exit(-1)
 end
 
-if xsystem("ncdap-config --libs")
-  libncdods = "nc-dap"
-  cflags = `ncdap-config --cflags`.gsub(/\n/, " ")
-  libs = `ncdap-config --libs`.gsub(/\n/, " ")
-  prefix_dods = `ncdap-config --prefix`.gsub(/\n/, "")
-elsif xsystem("opendap-config --libs")
-  libncdods = "nc-dods"
-  cflags = `opendap-config --cflags`.gsub(/\n/, " ")
-  libs = `opendap-config --libs-nc`.gsub(/\n/, " ")
-  prefix_dods = `opendap-config --prefix`.gsub(/\n/, "")
-end
-
-if (enable_config('opendap',true) && ( xsystem("opendap-config --libs") ||
-                                       xsystem("ncdap-config --libs") ) )
-
-  dir_config(libncdods,prefix_dods)
-
-  if (!have_library(libncdods))
-    print <<-EOS
-    ** ERROR ** Library not found: nc-dods (OPeNDAP/DODS-enabled NetCDF lib)
-    Install it, or run extconf.rb with option --disable-opendap.
-                                              ^^^^^^^^^^^^^^^^^
-    EOS
-    exit(-1)
+unless  ncversion 
+  # configure netcdf version
+  if xsystem("nc-config --version")
+    ncversion = `nc-config --version`.chomp!.sub!(/^n.* /i,"") # rm "netCDF "
+    ncversion.sub!(/^([^\.]+\.[^\.]+\.[^\.]+).+$/,'\1') # e.g. 4.2.1.1 -> 4.2.1
   else
-    print <<-EOS
-    ** Message **  Compiling with OPeNDAP/DODS-enabled NetCDF library.
- 
-    This is because the command opendap-config is found in your system.
-    If you want to use the ordinary (non-DODS) version of NetCDF,
-    run extconf.rb with option --disable-opendap.
-                               ^^^^^^^^^^^^^^^^^
-    EOS
+    ncversion = "3.0.0"   # assume version 3 (only for compilation)
+      # For compilation, there is no difference among subversions of netcdf 3
   end
+end
 
-  $CFLAGS += ' '+cflags
-  $LOCAL_LIBS += ' ' + libs
-
-  # non portable treatments: should be improved (by Horinouchi)
-  CONFIG['LDSHARED'].sub!(/gcc/,'g++')
-  $LIBS.sub!(/-lc\s/,'') ; $LIBS.sub!(/-lc$/,'')
-  print <<-EOS
-    ** Warning **  non-portable treatments are made, 
-    which was sucessfull redhat linux 9:
-     * gcc was replaced with g++ in CONFIG['LDSHARED']
-     * -lc library was removed if in $LIBS 
-
-  EOS
-  #  p '@@@'
-  #  ary = []
-  #  CONFIG.each{|k,v| ary.push([k,v])}
-  #  ary.sort.each{|x| p x}
-else
+ncver0 = ncversion[0..0]  # "3" or "4"
+ncver = ncversion.gsub(/\./,'')
+unless /^\d\d\d$/ =~ ncver   # 3 digits
+  raise("Invalid netcdf version: #{ncversion}. Use --with-netcdf-version=") 
+end
+$CFLAGS += ' -DNCVER='+ncver
+
+case ncver0
+when "4"
   if xsystem("nc-config --libs") # for NetCDF 4
     cflags = `nc-config --cflags`.gsub(/\n/, " ")
     libs = `nc-config --libs`.gsub(/\n/, " ")
@@ -77,23 +67,82 @@ else
     $CFLAGS += ' ' + cflags
     $LOCAL_LIBS += ' ' + libs
   end
-  if ( ! ( have_header("netcdf.h") && have_library("netcdf") ) )then
-    print <<-EOS
-    ** configure error **  
-       Header netcdf.h or the compiled netcdf library is not found. 
-       If you have the library installed under /netcdfdir (that is, netcdf.h is
-       in /netcdfdir/include and the library in /netcdfdir/lib/),
-       try the following:
+when "3"
+  # for NetCDF 3, which needs external libraries for OpenDAP
+  if xsystem("ncdap-config --libs")
+    libncdods = "nc-dap"
+    cflags = `ncdap-config --cflags`.gsub(/\n/, " ")
+    libs = `ncdap-config --libs`.gsub(/\n/, " ")
+    prefix_dods = `ncdap-config --prefix`.gsub(/\n/, "")
+  elsif xsystem("opendap-config --libs")
+    libncdods = "nc-dods"
+    cflags = `opendap-config --cflags`.gsub(/\n/, " ")
+    libs = `opendap-config --libs-nc`.gsub(/\n/, " ")
+    prefix_dods = `opendap-config --prefix`.gsub(/\n/, "")
+  end
+  if (enable_config('opendap',true) && ( xsystem("opendap-config --libs") ||
+                                         xsystem("ncdap-config --libs") ) )
+
+    dir_config(libncdods,prefix_dods)
+
+    if (!have_library(libncdods))
+      print <<-EOS
+      ** ERROR ** Library not found: nc-dods (OPeNDAP/DODS-enabled NetCDF lib)
+      Install it, or run extconf.rb with option --disable-opendap.
+                                                ^^^^^^^^^^^^^^^^^
+      EOS
+      exit(-1)
+    else
+      print <<-EOS
+      ** Message **  Compiling with OPeNDAP/DODS-enabled NetCDF library.
+
+      This is because the command opendap-config is found in your system.
+      If you want to use the ordinary (non-DODS) version of NetCDF,
+      run extconf.rb with option --disable-opendap.
+                                 ^^^^^^^^^^^^^^^^^
+      EOS
+    end
+
+    $CFLAGS += ' '+cflags
+    $LOCAL_LIBS += ' ' + libs
 
-       % ruby extconf.rb --with-netcdf-dir=/netcdfdir
+    # non portable treatments: should be improved (by Horinouchi)
+    CONFIG['LDSHARED'].sub!(/gcc/,'g++')
+    $LIBS.sub!(/-lc\s/,'') ; $LIBS.sub!(/-lc$/,'')
+    print <<-EOS
+      ** Warning **  non-portable treatments are made, 
+      which was sucessfull redhat linux 9:
+       * gcc was replaced with g++ in CONFIG['LDSHARED']
+       * -lc library was removed if in $LIBS 
 
-       Alternatively, you can specify the two directory separately
-       with --with-netcdf-include and --with-netcdf-lib.
     EOS
-    exit(-1)
+    #  p '@@@'
+    #  ary = []
+    #  CONFIG.each{|k,v| ary.push([k,v])}
+    #  ary.sort.each{|x| p x}
+  else
+    if ( ! ( have_header("netcdf.h") && have_library("netcdf") ) )then
+      print <<-EOS
+      ** configure error **  
+         Header netcdf.h or the compiled netcdf library is not found. 
+         If you have the library installed under /netcdfdir (that is, netcdf.h is
+         in /netcdfdir/include and the library in /netcdfdir/lib/),
+         try the following:
+
+         % ruby extconf.rb --with-netcdf-dir=/netcdfdir
+
+         Alternatively, you can specify the two directory separately
+         with --with-netcdf-include and --with-netcdf-lib.
+      EOS
+      exit(-1)
+    end
   end
+else
+  raise "Netcdf version #{ncver0} is not supported"
 end
 
+
+
 if /cygwin|mingw/ =~ RUBY_PLATFORM
    have_library("narray") || raise("ERROR: narray library is not found")
 end
@@ -114,9 +163,9 @@ oldmkfl.each_line{ |line|
       newmkfl.puts("")         
       newmkfl.puts("test: all")            # insert the "test" target
       newmkfl.puts("\t\t at cd test && ruby test.rb && echo 'test did not fail :-p (please ignore the warnings)' && cd ..") 
-   when /lib\/netcdf/
-      line = line.chomp! + "/"
-      newmkfl.puts(line)
+#   when /lib\/netcdf/
+#      line = line.chomp! + "/"
+#      newmkfl.puts(line)
    else
       newmkfl.puts(line)
    end
diff --git a/lib/netcdf.rb b/lib/netcdf.rb
index aaba6d2..2c6a922 100644
--- a/lib/netcdf.rb
+++ b/lib/netcdf.rb
@@ -1,12 +1,67 @@
 require 'narray'
 require 'numru/netcdfraw'
 
-# NetCDFクラスに関して
+if NArray.const_defined?(:SUPPORT_BIGMEM) && NArray::SUPPORT_BIGMEM
+  unless NumRu::NetCDF::SUPPORT_BIGMEM
+    raise "Ruby-NetCDF was compiled with NArray with big memory supoort " +
+          "(NArray-bigmem). However the NArray loaded is not NArray-bigmem."
+  end
+else
+  if NumRu::NetCDF::SUPPORT_BIGMEM
+    raise "Ruby-NetCDF was compiled with NArray without big memory support. " +
+          "However the NArray loaded is with the support (NArray-bigmem)."
+  end
+end
+
 module NumRu
   class NetCDF
 
     Max_Try = 100
 
+    NCVERSION = NetCDF.libvers
+
+    if NCVERSION[0..0] >= "4"
+      @@nc4 = true
+    else
+      @@nc4 = false
+    end
+    def NetCDF.nc4?
+      @@nc4
+    end
+
+    @@cr_format = 0
+
+    def NetCDF.creation_format=(cmode)
+      raise("This method is available only for NetCDF >= 4") unless @@nc4
+      case cmode
+      when  0, nil, NC_CLASSIC_MODEL, /^CLASSIC$/i  # classic netcdf ver 3 fmt
+        @@cr_format = 0
+      when NC_64BIT_OFFSET, /^64BIT_OFFSET$/i
+        @@cr_format = NC_64BIT_OFFSET
+      when NC_NETCDF4, /^NETCDF4$/i
+        @@cr_format = NC_NETCDF4
+      when ( NC_NETCDF4 | NC_CLASSIC_MODEL), /^NETCDF4_CLASSIC$/i
+        # NetCDF4 but disabling new data models
+        @@cr_format = NC_NETCDF4 | NC_CLASSIC_MODEL
+      else
+        raise ArgumentError, "Unsupported creation mode: #{cmod.to_s}"
+      end
+    end
+
+    def NetCDF.creation_format
+      raise("This method is available only for NetCDF >= 4") unless @@nc4
+      case @@cr_format
+      when 0
+        "TRADITIONAL"
+      when NC_64BIT_OFFSET
+        "64BIT_OFFSET"
+      when NC_NETCDF4
+        "NETCDF4"
+      when NC_NETCDF4 | NC_CLASSIC_MODEL
+        "NETCDF4_CLASSIC"
+      end
+    end
+
     def NetCDF.open(filename,mode="r",share=false)
        call_create=false   # false-> nc_open; true->nc_create
        case(mode)
@@ -64,7 +119,7 @@ module NumRu
 	raise NetcdfError,"share (3rd argument) must be true or false"
       end
       
-      cmode=noclobber | share
+      cmode=noclobber | share | @@cr_format
       nc_create(filename,cmode)
     end
     
@@ -218,7 +273,6 @@ module NumRu
     
   end
   
-  #NetCDFVar class に関して
   class NetCDFVar
     
     class << NetCDFVar
@@ -522,77 +576,39 @@ module NumRu
        end
      elsif hash.key?("start")==true
        h_sta = hash["start"]
-       endq = hash.key?("end")
-       strq = hash.key?("stride")
-       if endq == false && strq == false
-	 if t_var == "char"
-	   get_vars_char(h_sta,nil,nil)
-	 elsif t_var == "byte"
-	   get_vars_byte(h_sta,nil,nil)
-	 elsif t_var == "sint" 
-	   get_vars_sint(h_sta,nil,nil)
-	 elsif t_var == "int"
-	   get_vars_int(h_sta,nil,nil)
-	 elsif t_var == "sfloat"
-	   get_vars_sfloat(h_sta,nil,nil)
-	 elsif t_var == "float"
-	   get_vars_float(h_sta,nil,nil)
-	 else 
-	   raise NetcdfError, "varialbe type #{t_var} isn't supported in netCDF"
-	 end
-       elsif endq == true && strq == false
-	 h_end = hash["end"]
- 	 if t_var == "char"
-	   get_vars_char(h_sta,h_end,nil)
- 	 elsif t_var == "byte"
-	   get_vars_byte(h_sta,h_end,nil)
-	 elsif t_var == "sint"
-	   get_vars_sint(h_sta,h_end,nil)
-	 elsif t_var == "int"
-	   get_vars_int(h_sta,h_end,nil)
-	 elsif t_var == "sfloat"
-	   get_vars_sfloat(h_sta,h_end,nil)
-	 elsif t_var == "float"
-	   get_vars_float(h_sta,h_end,nil)
-	 else
-	   raise NetcdfError, "variable type #{t_var} isn't supported in netCDF"
-	 end
-       elsif endq == false && strq == true
-	 h_str = hash["stride"]
- 	 if t_var == "char"
-	   get_vars_char(h_sta,nil,h_str)
- 	 elsif t_var == "byte"
-	   get_vars_byte(h_sta,nil,h_str)
-	 elsif t_var == "sint"
-	   get_vars_sint(h_sta,nil,h_str)
-	 elsif t_var == "int"
-	   get_vars_int(h_sta,nil,h_str)
-	 elsif t_var == "sfloat"
-	   get_vars_sfloat(h_sta,nil,h_str)
-	 elsif t_var == "float"
-	   get_vars_float(h_sta,nil,h_str)
-	 else
-	   raise NetcdfError, "variable type #{t_var} isn't supported in netCDF"
-	 end
-       else endq == true && strq == true
-	 h_end = hash["end"]
-	 h_str = hash["stride"]
-	 if t_var == "char"
-	   get_vars_char(h_sta,h_end,h_str)
-	 elsif t_var == "byte"
-	   get_vars_byte(h_sta,h_end,h_str)
-	 elsif t_var == "sint"
-	   get_vars_sint(h_sta,h_end,h_str)
-	 elsif t_var == "int"
-	   get_vars_int(h_sta,h_end,h_str)
-	 elsif t_var == "sfloat"
-	   get_vars_sfloat(h_sta,h_end,h_str)
-	 elsif t_var == "float"
-	   get_vars_float(h_sta,h_end,h_str)
-	 else
-	   raise NetcdfError, "variable type #{t_var} isn't supported in netCDF"
-	 end
+       h_end = hash["end"]     # can be nill
+       h_str = hash["stride"]  # can be nill
+       if NetCDF.nc4? && h_str && ((xstr=h_str[0]) != 1)
+         # Tentative treatment for the very slow netcdf-4 reading with step.
+         # Reading with step is generally slow with NetCDF 4, but it is
+         # particularly so for the first dimension.
+         # Ref: http://www.unidata.ucar.edu/mailing_lists/archives/netcdfgroup/2013/msg00311.html
+         h_str[0] = 1 
+         nc4remedy = true
+       else
+         nc4remedy = false
+       end
+       if t_var == "char"
+         v = get_vars_char(h_sta,h_end,h_str)
+       elsif t_var == "byte"
+         v = get_vars_byte(h_sta,h_end,h_str)
+       elsif t_var == "sint"
+         v = get_vars_sint(h_sta,h_end,h_str)
+       elsif t_var == "int"
+         v = get_vars_int(h_sta,h_end,h_str)
+       elsif t_var == "sfloat"
+         v = get_vars_sfloat(h_sta,h_end,h_str)
+       elsif t_var == "float"
+         v = get_vars_float(h_sta,h_end,h_str)
+       else
+         raise NetcdfError, "variable type #{t_var} isn't supported in netCDF"
+       end
+       if nc4remedy
+         idx = []
+         (0...v.shape[0]).step(xstr){|k| idx.push(k)}
+         v = v[idx,false]
        end
+       v
      else
        raise ArgumentError,"{'start'}=>{ARRAY} or {'index'}=>{ARRAY} is needed"
      end
diff --git a/lib/version.rb b/lib/version.rb
new file mode 100644
index 0000000..7043c9e
--- /dev/null
+++ b/lib/version.rb
@@ -0,0 +1,5 @@
+module Ruby
+  module Netcdf
+    VERSION = "0.7.1.1"
+  end
+end
diff --git a/metadata.yml b/metadata.yml
new file mode 100644
index 0000000..fb30c35
--- /dev/null
+++ b/metadata.yml
@@ -0,0 +1,138 @@
+--- !ruby/object:Gem::Specification
+name: ruby-netcdf
+version: !ruby/object:Gem::Version
+  version: 0.7.1.1
+platform: ruby
+authors:
+- Takeshi Horinouchi
+- Tsuyoshi Koshiro
+- Shigenori Otsuka
+- Seiya Nishizawa
+- T Sakakima
+autorequire: 
+bindir: bin
+cert_chain: []
+date: 2015-03-02 00:00:00.000000000 Z
+dependencies:
+- !ruby/object:Gem::Dependency
+  name: narray
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - ! '>='
+      - !ruby/object:Gem::Version
+        version: '0'
+  type: :runtime
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - ! '>='
+      - !ruby/object:Gem::Version
+        version: '0'
+- !ruby/object:Gem::Dependency
+  name: narray_miss
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - ! '>='
+      - !ruby/object:Gem::Version
+        version: '0'
+  type: :runtime
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - ! '>='
+      - !ruby/object:Gem::Version
+        version: '0'
+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. This
+  version works with Ruby2.0.
+email:
+- eriko at gfd-dennou.org
+executables: []
+extensions:
+- extconf.rb
+extra_rdoc_files: []
+files:
+- .gitignore
+- .rspec
+- .travis.yml
+- ChangeLog
+- Gemfile
+- INSTALL
+- LICENSE.txt
+- Rakefile
+- ToDo
+- bin/console
+- bin/setup
+- demo/README
+- demo/demo1-create-alt.rb
+- demo/demo1-create.rb
+- demo/demo2-graphic.rb
+- demo/demo3-ncepclim.rb
+- demo/demo4-copy.rb
+- demo/demo5-netcdf4.rb
+- doc/README_JP.txt
+- doc/Ref_man.html
+- doc/Ref_man.rd
+- doc/Ref_man_jp.html
+- doc/Ref_man_jp.rd
+- doc/to_html
+- extconf.rb
+- lib/netcdf.rb
+- lib/netcdf_miss.rb
+- lib/version.rb
+- netcdfraw.c
+- ruby-netcdf.gemspec
+- test/aref_aset.rb
+- test/char_var.rb
+- test/clone.rb
+- test/create_tmp.rb
+- test/def_var_with_dim.rb
+- test/factor_offset.rb
+- test/putatt.cdl
+- test/putatt.rb
+- test/test.cdl
+- test/test.rb
+- test/type.rb
+homepage: http://www.gfd-dennou.org/arch/ruby/products/ruby-netcdf/
+licenses:
+- GFD Dennou Club
+metadata: {}
+post_install_message: 
+rdoc_options: []
+require_paths:
+- lib
+required_ruby_version: !ruby/object:Gem::Requirement
+  requirements:
+  - - ! '>='
+    - !ruby/object:Gem::Version
+      version: '1.6'
+required_rubygems_version: !ruby/object:Gem::Requirement
+  requirements:
+  - - ! '>='
+    - !ruby/object:Gem::Version
+      version: '0'
+requirements: []
+rubyforge_project: 
+rubygems_version: 2.4.6
+signing_key: 
+specification_version: 4
+summary: Ruby interface to NetCDF
+test_files:
+- demo/README
+- demo/demo1-create-alt.rb
+- demo/demo1-create.rb
+- demo/demo2-graphic.rb
+- demo/demo3-ncepclim.rb
+- demo/demo4-copy.rb
+- demo/demo5-netcdf4.rb
+- test/aref_aset.rb
+- test/char_var.rb
+- test/clone.rb
+- test/create_tmp.rb
+- test/def_var_with_dim.rb
+- test/factor_offset.rb
+- test/putatt.cdl
+- test/putatt.rb
+- test/test.cdl
+- test/test.rb
+- test/type.rb
diff --git a/netcdfraw.c b/netcdfraw.c
index 9922d19..200e8f3 100644
--- a/netcdfraw.c
+++ b/netcdfraw.c
@@ -24,6 +24,11 @@
 #define SafeStringValue(s) Check_SafeStr(s)
 #endif
 
+/* for compatibility for NArray and NArray with big memory patch */
+#ifndef NARRAY_BIGMEM
+typedef int    na_shape_t;
+#endif
+
 /* Data to NArray */
 
 /*    memcpy(ary->ptr,nc_ptr,na_sizeof[NA_SINT]*ary->total); \ */
@@ -202,7 +207,7 @@
   ptr = (int32_t *) NA_PTR(na,0); \
 }
 
-#define NC_RAISE(status) rb_raise(err_status2class(status),(nc_strerror(status)))
+#define NC_RAISE(status) rb_raise(err_status2class(status),"%s",(nc_strerror(status)))
 #define NC_RAISE2(status, str) rb_raise(err_status2class(status),"%s (%s)",nc_strerror(status),(str) )
 
 static VALUE mNumRu = 0;
@@ -343,9 +348,8 @@ NetCDF_dim_free(struct NetCDFDim *Netcdf_dim)
 void
 NetCDF_free(struct Netcdf *Netcdffile)
 {
-  int status;
   if (!Netcdffile->closed){
-      status = nc_close(Netcdffile->ncid); /* no error check -- not to stop during GC */
+      nc_close(Netcdffile->ncid); /* no error check -- not to stop during GC */
   }
   free(Netcdffile->name); 
   free(Netcdffile);
@@ -426,6 +430,7 @@ err_status2class(int status)
     case(NC_FATAL):
       return(rb_eNetcdfFatal);break;
     }
+  return rb_eNetcdfError;
 }
 
 static const char*
@@ -556,6 +561,14 @@ NetCDF_var_clone(VALUE var)
 }
 
 VALUE
+NetCDF_inq_libvers(VALUE mod)
+{
+  VALUE str;
+  str = rb_str_new2(nc_inq_libvers());
+  return(str);
+}
+
+VALUE
 NetCDF_close(file)
      VALUE file;
 {
@@ -563,7 +576,7 @@ NetCDF_close(file)
   int ncid;
   struct Netcdf *Netcdffile;
 
-  if (rb_safe_level() >= 4 && !OBJ_TAINTED(file)) {
+  if (rb_safe_level() >= 3 && !OBJ_TAINTED(file)) {
       rb_raise(rb_eSecurityError, "Insecure: can't close");
   }
   Data_Get_Struct(file,struct Netcdf,Netcdffile);
@@ -590,7 +603,7 @@ NetCDF_def_dim(VALUE file,VALUE dim_name,VALUE length)
   struct NetCDFDim *Netcdf_dim;
   VALUE Dimension;
   
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(file,struct Netcdf,Netcdffile);
   
   Check_Type(dim_name,T_STRING);
@@ -733,7 +746,7 @@ NetCDF_put_att(VALUE file,VALUE att_name,VALUE value,VALUE atttype)
     struct Netcdf *ncfile;
     char *name;
 
-    rb_secure(4);
+    rb_secure(3);
     Data_Get_Struct(file,struct Netcdf,ncfile);
     Check_Type(att_name,T_STRING);
     name = RSTRING_PTR(att_name);
@@ -751,7 +764,7 @@ NetCDF_put_att_var(VALUE var,VALUE att_name,VALUE value,VALUE atttype)
     struct NetCDFVar *ncvar;
     char *name;
 
-    rb_secure(4);
+    rb_secure(3);
     Data_Get_Struct(var,struct NetCDFVar,ncvar);
     Check_Type(att_name,T_STRING);
     name = RSTRING_PTR(att_name);
@@ -778,7 +791,7 @@ NetCDF_def_var(VALUE file,VALUE var_name,VALUE vartype,VALUE dimensions)
   struct NetCDFDim *Netcdf_dim;
   VALUE Var;
 
-  rb_secure(4);
+  rb_secure(3);
   Check_Type(var_name,T_STRING);
   Check_Type(dimensions,T_ARRAY);
 
@@ -824,7 +837,6 @@ NetCDF_def_var(VALUE file,VALUE var_name,VALUE vartype,VALUE dimensions)
   return Var;
 }
 
-
 VALUE
 NetCDF_dim(VALUE file,VALUE dim_name)
 {
@@ -949,7 +961,7 @@ NetCDF_redef(VALUE file)
   int status;
   struct Netcdf *Netcdffile;
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(file,struct Netcdf,Netcdffile);
   ncid=Netcdffile->ncid;
   status = nc_redef(ncid);
@@ -971,7 +983,7 @@ NetCDF_enddef(VALUE file)
   int status;
   struct Netcdf *Netcdffile;
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(file,struct Netcdf,Netcdffile);
   ncid=Netcdffile->ncid;
   status = nc_enddef(ncid);
@@ -998,7 +1010,7 @@ NetCDF_whether_in_define_mode(VALUE file)
   int status;
   struct Netcdf *Netcdffile;
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(file,struct Netcdf,Netcdffile);
   ncid=Netcdffile->ncid;
   status = nc_redef(ncid);
@@ -1149,7 +1161,7 @@ NetCDF_sync(VALUE file)
   int status;
   struct Netcdf *ncfile;
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(file,struct Netcdf,ncfile);
   ncid=ncfile->ncid;
   status = nc_sync(ncid);
@@ -1196,7 +1208,7 @@ NetCDF_dim_name(VALUE Dim,VALUE dimension_newname)
   char *c_dim_name;
   struct NetCDFDim *Netcdf_dim;
   
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Dim,struct NetCDFDim,Netcdf_dim);
   ncid=Netcdf_dim->ncid;
   dimid=Netcdf_dim->dimid;
@@ -1354,6 +1366,113 @@ NetCDF_id2att(VALUE file,VALUE attnum)
 
 }
 
+#if NCVER >= 400
+/* USAGE
+    NetCDFVar#deflate(deflate_level, shuffle=false)
+ */
+VALUE
+NetCDF_var_deflate(int argc, VALUE *argv, VALUE Var)
+{
+  int ncid, varid, status;
+  struct NetCDFVar *Netcdf_var;
+
+  int shuffle;
+    /* If non-zero, turn on the shuffle filter. 
+
+       http://www.unidata.ucar.edu/software/netcdf/papers/AMS_2008.pdf :
+       The shuffle algorithm changes the byte order in the data stream;
+       when used with integers that are all close together, this
+       results in a better compression ratio. There is no benefit
+       from using the shuffle filter without also using
+       compression.
+
+       MEMO by horinouchi: shuffling filter was also effective for float
+       variables in some test (demo5-netcdf4.rb).
+     */
+  int deflate_level;
+  int deflate=1;
+        /* Always set to non-zero:
+           See https://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c/nc_005fdef_005fvar_005fdeflate.html#nc_005fdef_005fvar_005fdeflate
+           If non-zero, turn on the deflate filter at the
+           level specified by the deflate_level parameter.
+         */
+
+  if (argc>2 || argc<1) rb_raise(rb_eArgError, 
+		         "wrong # of arguments (%d). It must be 1 or 2", argc);
+
+  Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
+  ncid = Netcdf_var->ncid;
+  varid = Netcdf_var->varid;
+
+  deflate_level = NUM2INT(argv[0]);
+
+  if (argc==1) {
+      shuffle = 0;  /* default: false */
+  } else {
+      if ( argv[1] == Qnil || argv[1] == Qfalse ) {
+	  shuffle = 0;
+      } else {
+	  shuffle = 1;
+      }
+  }
+
+  status = nc_def_var_deflate(ncid, varid, shuffle, deflate, deflate_level);
+  if(status != NC_NOERR) NC_RAISE(status);
+
+  return(Var);
+}
+
+VALUE
+NetCDF_var_deflate_params(VALUE Var)
+{
+  int ncid, varid, status;
+  struct NetCDFVar *Netcdf_var;
+  int shufflep, deflatep, deflate_levelp;
+  VALUE sh, df, params;
+
+  Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
+  ncid = Netcdf_var->ncid;
+  varid = Netcdf_var->varid;
+  status = nc_inq_var_deflate(ncid, varid, &shufflep, &deflatep, 
+			      &deflate_levelp);
+  if(status != NC_NOERR) NC_RAISE(status);
+  if (shufflep==0) {sh=Qfalse;} else {sh=Qtrue;}
+  if (deflatep==0) {df=Qfalse;} else {df=Qtrue;}
+  params = rb_ary_new3(3, sh, df, INT2NUM(deflate_levelp) );
+  return(params);
+}
+
+VALUE
+NetCDF_var_set_endian(VALUE Var, VALUE endian)
+{
+  int ncid, varid, status;
+  struct NetCDFVar *Netcdf_var;
+
+  Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
+  ncid = Netcdf_var->ncid;
+  varid = Netcdf_var->varid;
+  status = nc_def_var_endian(ncid, varid, NUM2INT(endian));
+  if(status != NC_NOERR) NC_RAISE(status);
+  return(Var);
+}
+
+VALUE
+NetCDF_var_endian(VALUE Var)
+{
+  int ncid, varid, status;
+  struct NetCDFVar *Netcdf_var;
+  int endian;
+
+  Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
+  ncid = Netcdf_var->ncid;
+  varid = Netcdf_var->varid;
+  status = nc_inq_var_endian(ncid, varid, &endian);
+  if(status != NC_NOERR) NC_RAISE(status);
+  return(INT2FIX(endian));
+}
+
+#endif
+
 VALUE
 NetCDF_var_id2att(VALUE Var,VALUE attnum)
 {
@@ -1446,7 +1565,7 @@ NetCDF_att_copy(VALUE Att,VALUE Var_or_File)
   struct Netcdf    *ncfile;
   struct NetCDFAtt *Netcdf_att_out;
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Att,struct NetCDFAtt,Netcdf_att);
   ncid_in=Netcdf_att->ncid;
   varid_in=Netcdf_att->varid;
@@ -1523,7 +1642,7 @@ NetCDF_att_delete(VALUE Att)
   char *c_att_name;
   struct NetCDFAtt *Netcdf_att;
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Att,struct NetCDFAtt,Netcdf_att);
 
   ncid=Netcdf_att->ncid;
@@ -1545,7 +1664,7 @@ NetCDF_att_put(VALUE Att,VALUE value,VALUE atttype)
 {
   struct NetCDFAtt *ncatt;
  
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Att,struct NetCDFAtt,ncatt);
   return( NetCDF_put_att__(ncatt->ncid, ncatt->name, value, 
 			   atttype, ncatt->varid) );
@@ -1561,7 +1680,7 @@ NetCDF_att_get(VALUE Att)
   struct NetCDFAtt *Netcdf_att;
   nc_type xtypep;
   size_t lenp;
-  int attlen[1];    /* NArray uses int instead of size_t */
+  na_shape_t attlen[1];    /* NArray uses int instead of size_t */
   char *tp;
   unsigned char *up;
   short *sp;
@@ -1788,7 +1907,7 @@ NetCDF_var_rename(VALUE Var,VALUE var_new_name)
   char *c_var_new_name;
   struct NetCDFVar *Netcdf_var;
   
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -1937,7 +2056,7 @@ NetCDF_get_var_char(VALUE Var)
   int ndimsp;
   int *dimids;
   size_t lengthp;
-  int *shape;    /* NArray uses int instead of size_t */
+  na_shape_t *shape;    /* NArray uses int instead of size_t */
   VALUE NArray;
 
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
@@ -1947,7 +2066,7 @@ NetCDF_get_var_char(VALUE Var)
   if(status != NC_NOERR) NC_RAISE(status);
   dimids = ALLOCA_N(int,ndimsp);
   if (ndimsp != 0){
-      shape = ALLOCA_N(int,ndimsp);
+      shape = ALLOCA_N(na_shape_t,ndimsp);
       for(i=0;i<ndimsp;i++){
 	  status = nc_inq_vardimid(ncid,varid,dimids);
 	  if(status != NC_NOERR) NC_RAISE(status);
@@ -1956,7 +2075,7 @@ NetCDF_get_var_char(VALUE Var)
       }
   } else {
       ndimsp = 1;
-      shape = ALLOCA_N(int,1);
+      shape = ALLOCA_N(na_shape_t,1);
       shape[0]=1;
   }
 
@@ -1981,7 +2100,7 @@ NetCDF_get_var_byte(VALUE Var)
   int ndimsp;
   int *dimids;
   size_t lengthp;
-  int *shape;    /* NArray uses int instead of size_t */
+  na_shape_t *shape;    /* NArray uses int instead of size_t */
   VALUE NArray;
 
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
@@ -1991,7 +2110,7 @@ NetCDF_get_var_byte(VALUE Var)
   if(status != NC_NOERR) NC_RAISE(status);
   dimids = ALLOCA_N(int,ndimsp);
   if (ndimsp != 0){
-      shape = ALLOCA_N(int,ndimsp);
+      shape = ALLOCA_N(na_shape_t,ndimsp);
       for(i=0;i<ndimsp;i++){
 	  status = nc_inq_vardimid(ncid,varid,dimids);
 	  if(status != NC_NOERR) NC_RAISE(status);
@@ -2000,7 +2119,7 @@ NetCDF_get_var_byte(VALUE Var)
       }
   } else {
       ndimsp = 1;
-      shape = ALLOCA_N(int,1);
+      shape = ALLOCA_N(na_shape_t,1);
       shape[0]=1;
   }
 
@@ -2025,7 +2144,7 @@ NetCDF_get_var_sint(VALUE Var)
   int ndimsp;
   int *dimids;
   size_t lengthp;
-  int *shape;    /* NArray uses int instead of size_t */
+  na_shape_t *shape;    /* NArray uses int instead of size_t */
   VALUE NArray;
 
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
@@ -2035,7 +2154,7 @@ NetCDF_get_var_sint(VALUE Var)
   if(status != NC_NOERR) NC_RAISE(status);
   dimids = ALLOCA_N(int,ndimsp);
   if (ndimsp != 0){
-      shape = ALLOCA_N(int,ndimsp);
+      shape = ALLOCA_N(na_shape_t,ndimsp);
       for(i=0;i<ndimsp;i++){
 	  status = nc_inq_vardimid(ncid,varid,dimids);
 	  if(status != NC_NOERR) NC_RAISE(status);
@@ -2044,7 +2163,7 @@ NetCDF_get_var_sint(VALUE Var)
       }
   } else {
       ndimsp = 1;
-      shape = ALLOCA_N(int,1);
+      shape = ALLOCA_N(na_shape_t,1);
       shape[0]=1;
   }
 
@@ -2069,7 +2188,7 @@ NetCDF_get_var_int(VALUE Var)
   int ndimsp;
   int *dimids;
   size_t lengthp;
-  int *shape;    /* NArray uses int instead of size_t */
+  na_shape_t *shape;    /* NArray uses int instead of size_t */
   VALUE NArray;
 
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
@@ -2079,7 +2198,7 @@ NetCDF_get_var_int(VALUE Var)
   if(status != NC_NOERR) NC_RAISE(status);
   dimids = ALLOCA_N(int,ndimsp);
   if (ndimsp != 0){
-      shape = ALLOCA_N(int,ndimsp);
+      shape = ALLOCA_N(na_shape_t,ndimsp);
       for(i=0;i<ndimsp;i++){
 	  status = nc_inq_vardimid(ncid,varid,dimids);
 	  if(status != NC_NOERR) NC_RAISE(status);
@@ -2088,7 +2207,7 @@ NetCDF_get_var_int(VALUE Var)
       }
   } else {
       ndimsp = 1;
-      shape = ALLOCA_N(int,1);
+      shape = ALLOCA_N(na_shape_t,1);
       shape[0]=1;
   }
 
@@ -2113,7 +2232,7 @@ NetCDF_get_var_float(VALUE Var)
   int ndimsp;
   int *dimids;
   size_t lengthp;
-  int *shape;    /* NArray uses int instead of size_t */
+  na_shape_t *shape;    /* NArray uses int instead of size_t */
   VALUE NArray;
 
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
@@ -2123,7 +2242,7 @@ NetCDF_get_var_float(VALUE Var)
   if(status != NC_NOERR) NC_RAISE(status);
   dimids = ALLOCA_N(int,ndimsp);
   if (ndimsp != 0){
-      shape = ALLOCA_N(int,ndimsp);
+      shape = ALLOCA_N(na_shape_t,ndimsp);
       for(i=0;i<ndimsp;i++){
 	  status = nc_inq_vardimid(ncid,varid,dimids);
 	  if(status != NC_NOERR) NC_RAISE(status);
@@ -2132,7 +2251,7 @@ NetCDF_get_var_float(VALUE Var)
       }
   } else {
       ndimsp = 1;
-      shape = ALLOCA_N(int,1);
+      shape = ALLOCA_N(na_shape_t,1);
       shape[0]=1;
   }
 
@@ -2157,7 +2276,7 @@ NetCDF_get_var_double(VALUE Var)
   int ndimsp;
   int *dimids;
   size_t lengthp;
-  int *shape;    /* NArray uses int instead of size_t */
+  na_shape_t *shape;    /* NArray uses int instead of size_t */
   VALUE NArray;
 
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
@@ -2167,7 +2286,7 @@ NetCDF_get_var_double(VALUE Var)
   if(status != NC_NOERR) NC_RAISE(status);
   dimids = ALLOCA_N(int,ndimsp);
   if (ndimsp != 0){
-      shape = ALLOCA_N(int,ndimsp);
+      shape = ALLOCA_N(na_shape_t,ndimsp);
       for(i=0;i<ndimsp;i++){
 	  status = nc_inq_vardimid(ncid,varid,dimids);
 	  if(status != NC_NOERR) NC_RAISE(status);
@@ -2176,7 +2295,7 @@ NetCDF_get_var_double(VALUE Var)
       }
   } else {
       ndimsp = 1;
-      shape = ALLOCA_N(int,1);
+      shape = ALLOCA_N(na_shape_t,1);
       shape[0]=1;
   }
 
@@ -2198,13 +2317,12 @@ NetCDF_get_var1_char(VALUE Var,VALUE start)
   unsigned char *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start;
+  na_shape_t l_start;
   size_t *c_start;
   int ndims;
   int dimids[NC_MAX_DIMS];
   size_t dimlen;
-  int *c_count;
-  int nc_tlen=0;
+  na_shape_t *c_count;
   VALUE NArray;
 
   
@@ -2223,7 +2341,7 @@ NetCDF_get_var1_char(VALUE Var,VALUE start)
   }
   
   c_start=ALLOCA_N(size_t,ndims);
-  c_count=ALLOCA_N(int,ndims);
+  c_count=ALLOCA_N(na_shape_t,ndims);
   for(i=0;i<ndims;i++){
     l_start = NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
     status = nc_inq_vardimid(ncid,varid,dimids);
@@ -2236,7 +2354,6 @@ NetCDF_get_var1_char(VALUE Var,VALUE start)
     c_start[i]=l_start;
     
     c_count[i]=1;
-    nc_tlen = 1+nc_tlen;
   }
   
   
@@ -2260,13 +2377,12 @@ NetCDF_get_var1_byte(VALUE Var,VALUE start)
   unsigned char *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start;
+  na_shape_t l_start;
   size_t *c_start;
   int ndims;
   int dimids[NC_MAX_DIMS];
   size_t dimlen;
-  int *c_count;
-  int nc_tlen=0;
+  na_shape_t *c_count;
   VALUE NArray;
 
   
@@ -2285,7 +2401,7 @@ NetCDF_get_var1_byte(VALUE Var,VALUE start)
   }
   
   c_start=ALLOCA_N(size_t,ndims);
-  c_count=ALLOCA_N(int,ndims);
+  c_count=ALLOCA_N(na_shape_t,ndims);
   for(i=0;i<ndims;i++){
     l_start = NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
     status = nc_inq_vardimid(ncid,varid,dimids);
@@ -2298,7 +2414,6 @@ NetCDF_get_var1_byte(VALUE Var,VALUE start)
     c_start[i]=l_start;
     
     c_count[i]=1;
-    nc_tlen = 1+nc_tlen;
   }
   
   
@@ -2322,13 +2437,12 @@ NetCDF_get_var1_sint(VALUE Var,VALUE start)
   short *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start;
+  na_shape_t l_start;
   size_t *c_start;
   int ndims;
   int dimids[NC_MAX_DIMS];
   size_t dimlen;
-  int *c_count;
-  int nc_tlen=0;
+  na_shape_t *c_count;
   VALUE NArray;
 
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
@@ -2346,7 +2460,7 @@ NetCDF_get_var1_sint(VALUE Var,VALUE start)
   }
   
   c_start=ALLOCA_N(size_t,ndims);
-  c_count=ALLOCA_N(int,ndims);
+  c_count=ALLOCA_N(na_shape_t,ndims);
   for(i=0;i<ndims;i++){
     l_start = NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
     status = nc_inq_vardimid(ncid,varid,dimids);
@@ -2358,7 +2472,6 @@ NetCDF_get_var1_sint(VALUE Var,VALUE start)
     }
     c_start[i]=l_start;
     c_count[i]=1;
-    nc_tlen = nc_tlen+1;
   }
   
   Csint_to_NArray(NArray,ndims,c_count,ptr);
@@ -2380,13 +2493,12 @@ NetCDF_get_var1_int(VALUE Var,VALUE start)
   int *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start;
+  na_shape_t l_start;
   size_t *c_start;
   int ndims;
   int dimids[NC_MAX_DIMS];
   size_t dimlen;
-  int *c_count;
-  int nc_tlen=0;
+  na_shape_t *c_count;
   VALUE NArray;
 
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
@@ -2404,7 +2516,7 @@ NetCDF_get_var1_int(VALUE Var,VALUE start)
   }
   
   c_start=ALLOCA_N(size_t,ndims);
-  c_count=ALLOCA_N(int,ndims);
+  c_count=ALLOCA_N(na_shape_t,ndims);
   for(i=0;i<ndims;i++){
     l_start = NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
     status = nc_inq_vardimid(ncid,varid,dimids);
@@ -2416,7 +2528,6 @@ NetCDF_get_var1_int(VALUE Var,VALUE start)
     }
     c_start[i]=l_start;
     c_count[i]=1;
-    nc_tlen= nc_tlen+1;
   }
   
   Clint_to_NArray(NArray,ndims,c_count,ptr);
@@ -2438,13 +2549,12 @@ NetCDF_get_var1_float(VALUE Var,VALUE start)
   float *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start;
+  na_shape_t l_start;
   size_t *c_start;
   int ndims;
   int dimids[NC_MAX_DIMS];
   size_t dimlen;
-  int *c_count;
-  int nc_tlen=0;
+  na_shape_t *c_count;
   VALUE NArray;
 
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
@@ -2462,7 +2572,7 @@ NetCDF_get_var1_float(VALUE Var,VALUE start)
   }
   
   c_start=ALLOCA_N(size_t,ndims);
-  c_count=ALLOCA_N(int,ndims);
+  c_count=ALLOCA_N(na_shape_t,ndims);
   for(i=0;i<ndims;i++){
     l_start = NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
     status = nc_inq_vardimid(ncid, varid, dimids);
@@ -2474,7 +2584,6 @@ NetCDF_get_var1_float(VALUE Var,VALUE start)
     }
     c_start[i]=l_start;
     c_count[i]=1;
-    nc_tlen = nc_tlen+1;
   }
   
   Cfloat_to_NArray(NArray,ndims,c_count,ptr);
@@ -2496,13 +2605,12 @@ NetCDF_get_var1_double(VALUE Var,VALUE start)
   double *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start;
+  na_shape_t l_start;
   size_t *c_start;
   int ndims;
   int dimids[NC_MAX_DIMS];
   size_t dimlen;
-  int *c_count;
-  int nc_tlen=0;
+  na_shape_t *c_count;
   VALUE NArray;
 
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
@@ -2520,7 +2628,7 @@ NetCDF_get_var1_double(VALUE Var,VALUE start)
   }
   
   c_start=ALLOCA_N(size_t,ndims);
-  c_count=ALLOCA_N(int,ndims);
+  c_count=ALLOCA_N(na_shape_t,ndims);
   for(i=0;i<ndims;i++){
     l_start = NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
     status = nc_inq_vardimid(ncid,varid,dimids);
@@ -2532,7 +2640,6 @@ NetCDF_get_var1_double(VALUE Var,VALUE start)
     }
     c_start[i]=l_start;
     c_count[i]=1;
-    nc_tlen = nc_tlen+1;
   }
   
   Cdouble_to_NArray(NArray,ndims,c_count,ptr);
@@ -2554,14 +2661,13 @@ NetCDF_get_vars_char(VALUE Var,VALUE start,VALUE end,VALUE stride)
   unsigned char *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start, l_end;
+  na_shape_t l_start, l_end;
   size_t *c_start;
   size_t *c_count;
   ptrdiff_t *c_stride;
-  int *shape;    /* NArray uses int instead of size_t */
+  na_shape_t *shape;    /* NArray uses int instead of size_t */
   int ndims;
   int *dimids;
-  int nc_tlen=1;
   size_t dimlen;
   VALUE NArray;
 
@@ -2638,12 +2744,9 @@ NetCDF_get_vars_char(VALUE Var,VALUE start,VALUE end,VALUE stride)
       c_count[i]=(l_end-c_start[i])/c_stride[i]+1;
     }
   }
-  for(i=0;i<ndims;i++){
-    nc_tlen = nc_tlen*c_count[i];
-  }
 
   
-  shape = ALLOCA_N(int,ndims);
+  shape = ALLOCA_N(na_shape_t,ndims);
   for(i=0;i<ndims;i++){
     shape[ndims-1-i]=c_count[i];
   }
@@ -2666,14 +2769,13 @@ NetCDF_get_vars_byte(VALUE Var,VALUE start,VALUE end,VALUE stride)
   unsigned char *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start, l_end;
+  na_shape_t l_start, l_end;
   size_t *c_start;
   size_t *c_count;
   ptrdiff_t *c_stride;
-  int *shape;    /* NArray uses int instead of size_t */
+  na_shape_t *shape;    /* NArray uses int instead of size_t */
   int ndims;
   int *dimids;
-  int nc_tlen=1;
   size_t dimlen;
   VALUE NArray;
 
@@ -2750,12 +2852,9 @@ NetCDF_get_vars_byte(VALUE Var,VALUE start,VALUE end,VALUE stride)
       c_count[i]=(l_end-c_start[i])/c_stride[i]+1;
     }
   }
-  for(i=0;i<ndims;i++){
-    nc_tlen = nc_tlen*c_count[i];
-  }
 
   
-  shape = ALLOCA_N(int,ndims);
+  shape = ALLOCA_N(na_shape_t,ndims);
   for(i=0;i<ndims;i++){
     shape[ndims-1-i]=c_count[i];
   }
@@ -2778,14 +2877,13 @@ NetCDF_get_vars_sint(VALUE Var,VALUE start,VALUE end,VALUE stride)
   short *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start, l_end;
+  na_shape_t l_start, l_end;
   size_t *c_start;
   size_t *c_count;
   ptrdiff_t *c_stride;
-  int *shape;    /* NArray uses int instead of size_t */
+  na_shape_t *shape;    /* NArray uses int instead of size_t */
   int ndims;
   int *dimids;
-  int nc_tlen=1;
   size_t dimlen;
   VALUE NArray;
 
@@ -2863,11 +2961,8 @@ NetCDF_get_vars_sint(VALUE Var,VALUE start,VALUE end,VALUE stride)
     }
   }
   
-  for(i=0;i<ndims;i++){
-    nc_tlen = nc_tlen*c_count[i];
-  }
   
-  shape = ALLOCA_N(int,ndims);
+  shape = ALLOCA_N(na_shape_t,ndims);
   for(i=0;i<ndims;i++){
     shape[ndims-1-i]=c_count[i];
   }
@@ -2891,14 +2986,13 @@ NetCDF_get_vars_int(VALUE Var,VALUE start,VALUE end,VALUE stride)
   int *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start, l_end;
+  na_shape_t l_start, l_end;
   size_t *c_start;
   size_t *c_count;
   ptrdiff_t *c_stride;
-  int *shape;    /* NArray uses int instead of size_t */
+  na_shape_t *shape;    /* NArray uses int instead of size_t */
   int ndims;
   int *dimids;
-  int nc_tlen=1;
   size_t dimlen;
   VALUE NArray;
 
@@ -2976,11 +3070,8 @@ NetCDF_get_vars_int(VALUE Var,VALUE start,VALUE end,VALUE stride)
     }
   }
 
-  for(i=0;i<ndims;i++){
-    nc_tlen = nc_tlen*c_count[i];
-  }
   
-  shape = ALLOCA_N(int,ndims);
+  shape = ALLOCA_N(na_shape_t,ndims);
   for(i=0;i<ndims;i++){
     shape[ndims-1-i]=c_count[i];
   }
@@ -3004,14 +3095,13 @@ NetCDF_get_vars_float(VALUE Var,VALUE start,VALUE end,VALUE stride)
   float *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start, l_end;
+  na_shape_t l_start, l_end;
   size_t *c_start;
   size_t *c_count;
   ptrdiff_t *c_stride;
-  int *shape;    /* NArray uses int instead of size_t */
+  na_shape_t *shape;    /* NArray uses int instead of size_t */
   int ndims;
   int *dimids;
-  int nc_tlen=1;
   size_t dimlen;
   VALUE NArray;
 
@@ -3089,11 +3179,8 @@ NetCDF_get_vars_float(VALUE Var,VALUE start,VALUE end,VALUE stride)
     }
   }
   
-  for(i=0;i<ndims;i++){
-    nc_tlen = nc_tlen*c_count[i];
-  }
 
-  shape = ALLOCA_N(int,ndims);
+  shape = ALLOCA_N(na_shape_t,ndims);
   for(i=0;i<ndims;i++){
     shape[ndims-1-i]=c_count[i];
   }
@@ -3117,14 +3204,13 @@ NetCDF_get_vars_double(VALUE Var,VALUE start,VALUE end,VALUE stride)
   double *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start, l_end;
+  na_shape_t l_start, l_end;
   size_t *c_start;
   size_t *c_count;
   ptrdiff_t *c_stride;
-  int *shape;    /* NArray uses int instead of size_t */
+  na_shape_t *shape;    /* NArray uses int instead of size_t */
   int ndims;
   int *dimids;
-  int nc_tlen=1;
   size_t dimlen;
   VALUE NArray;
 
@@ -3202,11 +3288,8 @@ NetCDF_get_vars_double(VALUE Var,VALUE start,VALUE end,VALUE stride)
     }
   }
   
-  for(i=0;i<ndims;i++){
-    nc_tlen = nc_tlen*c_count[i];
-  }
 
-  shape = ALLOCA_N(int,ndims);
+  shape = ALLOCA_N(na_shape_t,ndims);
   for(i=0;i<ndims;i++){
     shape[ndims-1-i]=c_count[i];
   }
@@ -3228,15 +3311,15 @@ NetCDF_put_var_char(VALUE Var,VALUE NArray)
   int varid;
   int status;
   unsigned char *ptr,scalar;
-  int len,i=0;
+  na_shape_t len,i=0;
   struct NetCDFVar *Netcdf_var;
-  int nc_tlen=1;
+  na_shape_t nc_tlen=1;
   int ndimsp;
   int dimids[NC_MAX_DIMS];
   size_t lengthp;
   char *var_name;
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -3273,15 +3356,15 @@ NetCDF_put_var_byte(VALUE Var,VALUE NArray)
   int varid;
   int status;
   unsigned char *ptr,scalar;
-  int len,i=0;
+  na_shape_t len,i=0;
   struct NetCDFVar *Netcdf_var;
-  int nc_tlen=1;
+  na_shape_t nc_tlen=1;
   int ndimsp;
   int dimids[NC_MAX_DIMS];
   size_t lengthp;
   char *var_name;
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -3318,15 +3401,15 @@ NetCDF_put_var_short(VALUE Var,VALUE NArray)
   int varid;
   int status;
   short *ptr,scalar;
-  int len,i=0;
+  na_shape_t len,i=0;
   struct NetCDFVar *Netcdf_var;
-  int nc_tlen=1;
+  na_shape_t nc_tlen=1;
   int ndimsp;
   int dimids[NC_MAX_DIMS];
   size_t lengthp;
   char *var_name;
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -3363,15 +3446,15 @@ NetCDF_put_var_int(VALUE Var,VALUE NArray)
   int varid;
   int status;
   int *ptr,scalar;
-  int len,i=0;
+  na_shape_t len,i=0;
   struct NetCDFVar *Netcdf_var;
-  int nc_tlen=1;
+  na_shape_t nc_tlen=1;
   int ndimsp;
   int dimids[NC_MAX_DIMS];
   size_t lengthp;
   char *var_name;
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -3411,16 +3494,16 @@ NetCDF_put_var_float(VALUE Var,VALUE NArray)
   int varid;
   int status;
   float *ptr,scalar;
-  int len,i=0;
+  na_shape_t len,i=0;
   struct NetCDFVar *Netcdf_var;
-  int nc_tlen=1;
+  na_shape_t nc_tlen=1;
   int ndimsp;
   int dimids[NC_MAX_DIMS];
   size_t lengthp;
   char *var_name;
   
   
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -3458,16 +3541,16 @@ NetCDF_put_var_double(VALUE Var,VALUE NArray)
   int varid;
   int status;
   double *ptr,scalar;
-  int len,i=0;
+  na_shape_t len,i=0;
   struct NetCDFVar *Netcdf_var;
-  int nc_tlen=1;
+  na_shape_t nc_tlen=1;
   int ndimsp;
   int dimids[NC_MAX_DIMS];
   size_t lengthp;
   char *var_name;
 
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -3507,13 +3590,13 @@ NetCDF_put_var1_char(VALUE Var,VALUE NArray,VALUE start)
   unsigned char *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start;
+  na_shape_t l_start;
   size_t *c_start;
   int ndims;
   int   *dimids;
   size_t dimlen;
   
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -3558,13 +3641,13 @@ NetCDF_put_var1_byte(VALUE Var,VALUE NArray,VALUE start)
   unsigned char *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start;
+  na_shape_t l_start;
   size_t *c_start;
   int ndims;
   int   *dimids;
   size_t dimlen;
   
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -3609,13 +3692,13 @@ NetCDF_put_var1_sint(VALUE Var,VALUE NArray,VALUE start)
   short *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start;
+  na_shape_t l_start;
   size_t *c_start;
   int ndims;
   int   *dimids;
   size_t dimlen;
   
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -3659,13 +3742,13 @@ NetCDF_put_var1_int(VALUE Var,VALUE NArray,VALUE start)
   int *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start;
+  na_shape_t l_start;
   size_t *c_start;
   int ndims;
   int   *dimids;
   size_t dimlen;
   
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -3710,13 +3793,13 @@ NetCDF_put_var1_float(VALUE Var,VALUE NArray,VALUE start)
   float *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start;
+  na_shape_t l_start;
   size_t *c_start;
   int ndims;
   int   *dimids;
   size_t dimlen;
   
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -3761,13 +3844,13 @@ NetCDF_put_var1_double(VALUE Var,VALUE NArray,VALUE start)
   double *ptr;
   int i;
   struct NetCDFVar *Netcdf_var;
-  long l_start;
+  na_shape_t l_start;
   size_t *c_start;
   int ndims;
   int   *dimids;
   size_t dimlen;
   
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -3811,19 +3894,19 @@ NetCDF_put_vars_char(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
   int varid;
   int status;
   unsigned char *ptr,scalar;
-  int len,i;
+  na_shape_t len;
   int c_count_all=1;
   struct NetCDFVar *Netcdf_var;
-  long l_start, l_end;
+  na_shape_t l_start, l_end;
   size_t *c_start;
   size_t *c_count;
   ptrdiff_t *c_stride;
-  int ndims;
-  int   *shape;
+  int ndims,i;
+  na_shape_t *shape;
   int   *dimids;
   size_t dimlen;
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -3917,19 +4000,19 @@ NetCDF_put_vars_byte(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
   int varid;
   int status;
   unsigned char *ptr,scalar;
-  int len,i;
+  na_shape_t len;
   int c_count_all=1;
   struct NetCDFVar *Netcdf_var;
-  long l_start, l_end;
+  na_shape_t l_start, l_end;
   size_t *c_start;
   size_t *c_count;
   ptrdiff_t *c_stride;
-  int ndims;
-  int   *shape;
+  int ndims,i;
+  na_shape_t *shape;
   int   *dimids;
   size_t dimlen;
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -4023,19 +4106,19 @@ NetCDF_put_vars_sint(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
   int varid;
   int status;
   short *ptr,scalar;
-  int len,i;
+  na_shape_t len;
   int c_count_all=1;
   struct NetCDFVar *Netcdf_var;
-  long l_start, l_end;
+  na_shape_t l_start, l_end;
   size_t *c_start;
   size_t *c_count;
   ptrdiff_t *c_stride;
-  int ndims;
-  int   *shape;
+  int ndims,i;
+  na_shape_t *shape;
   int   *dimids;
   size_t dimlen;
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -4130,19 +4213,19 @@ NetCDF_put_vars_int(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
   int varid;
   int status;
   int *ptr,scalar;
-  int len,i;
+  na_shape_t len;
   int c_count_all=1;
   struct NetCDFVar *Netcdf_var;
-  long l_start, l_end;
+  na_shape_t l_start, l_end;
   size_t *c_start;
   size_t *c_count;
   ptrdiff_t *c_stride;
-  int ndims;
-  int   *shape;
+  int ndims,i;
+  na_shape_t *shape;
   int   *dimids;
   size_t dimlen;
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -4237,19 +4320,19 @@ NetCDF_put_vars_float(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
   int varid;
   int status;
   float *ptr,scalar;
-  int len,i;
+  na_shape_t len;
   int c_count_all=1;
   struct NetCDFVar *Netcdf_var;
-  long l_start, l_end;
+  na_shape_t l_start, l_end;
   size_t *c_start;
   size_t *c_count;
   ptrdiff_t *c_stride;
-  int ndims;
-  int   *shape;
+  int ndims,i;
+  na_shape_t *shape;
   int   *dimids;
   size_t dimlen;
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -4344,19 +4427,19 @@ NetCDF_put_vars_double(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride
   int varid;
   int status;
   double *ptr,scalar;
-  int len,i;
+  na_shape_t len;
   int c_count_all=1;
   struct NetCDFVar *Netcdf_var;
-  long l_start, l_end;
+  na_shape_t l_start, l_end;
   size_t *c_start;
   size_t *c_count;
   ptrdiff_t *c_stride;
-  int ndims;
-  int   *shape;
+  int ndims,i;
+  na_shape_t *shape;
   int   *dimids;
   size_t dimlen;
 
-  rb_secure(4);
+  rb_secure(3);
   Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
   ncid=Netcdf_var->ncid;
   varid=Netcdf_var->varid;
@@ -4498,9 +4581,27 @@ Init_netcdfraw(void)
   rb_define_const(cNetCDF, "NC_SHARE", INT2FIX(NC_SHARE));
   rb_define_const(cNetCDF, "NC_CLOBBER", INT2FIX(NC_CLOBBER));
   rb_define_const(cNetCDF, "NC_NOCLOBBER", INT2FIX(NC_NOCLOBBER));
+#if NCVER >= 400
+  rb_define_const(cNetCDF, "NC_64BIT_OFFSET", INT2FIX(NC_64BIT_OFFSET));
+     /* NC_64BIT_OFFSET supports large files in the class data format */ 
+  rb_define_const(cNetCDF, "NC_NETCDF4", INT2FIX(NC_NETCDF4));
+  rb_define_const(cNetCDF, "NC_CLASSIC_MODEL", INT2FIX(NC_CLASSIC_MODEL));
+     /* for use as ( NC_NETCDF4 | NC_CLASSIC_MODEL ) to ensure the classic 
+        data model in NetCDF4 by disabling new features like groups */
+  rb_define_const(cNetCDF, "NC_ENDIAN_NATIVE", INT2FIX(NC_ENDIAN_NATIVE));
+  rb_define_const(cNetCDF, "NC_ENDIAN_LITTLE", INT2FIX(NC_ENDIAN_LITTLE));
+  rb_define_const(cNetCDF, "NC_ENDIAN_BIG", INT2FIX(NC_ENDIAN_BIG));
+#endif
+ 
+#ifdef NARRAY_BIGMEM
+  rb_define_const(cNetCDF, "SUPPORT_BIGMEM", Qtrue);
+#else
+  rb_define_const(cNetCDF, "SUPPORT_BIGMEM", Qfalse);
+#endif
 
   /* Difinitions of the ruby methods */
   /* The methods of the NetCDF class */
+  rb_define_singleton_method(cNetCDF,"libvers",NetCDF_inq_libvers,0);
   rb_define_singleton_method(cNetCDF,"nc_open",NetCDF_open,2);
   rb_define_method(cNetCDF,"clone",NetCDF_clone,0);
   rb_define_method(cNetCDF,"close",NetCDF_close,0);
@@ -4551,6 +4652,12 @@ Init_netcdfraw(void)
   rb_define_method(cNetCDFAtt,"get",NetCDF_att_get,0);
 
   /* The methods of the NetCDFVar class */
+#if NCVER >= 400
+  rb_define_method(cNetCDFVar,"deflate",NetCDF_var_deflate,-1);
+  rb_define_method(cNetCDFVar,"deflate_params",NetCDF_var_deflate_params,0);
+  rb_define_method(cNetCDFVar,"endian=",NetCDF_var_set_endian,1);
+  rb_define_method(cNetCDFVar,"endian",NetCDF_var_endian,0);
+#endif
   rb_define_method(cNetCDFVar,"clone",NetCDF_var_clone,0);
   rb_define_method(cNetCDFVar,"name",NetCDF_var_inq_name,0);
   rb_define_method(cNetCDFVar,"ndims",NetCDF_var_ndims,0);
diff --git a/ruby-netcdf.gemspec b/ruby-netcdf.gemspec
new file mode 100644
index 0000000..a6025bc
--- /dev/null
+++ b/ruby-netcdf.gemspec
@@ -0,0 +1,34 @@
+# coding: utf-8
+lib = File.expand_path('../lib', __FILE__)
+$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
+require 'version'
+
+Gem::Specification.new do |spec|
+  spec.name          = "ruby-netcdf"
+  spec.version       = Ruby::Netcdf::VERSION
+  spec.authors           = ["Takeshi Horinouchi", "Tsuyoshi Koshiro",\
+    "Shigenori Otsuka", "Seiya Nishizawa", "T Sakakima"]
+  spec.email            = ['eriko at gfd-dennou.org']
+
+  #if spec.respond_to?(:metadata)
+  #  spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com' to prevent pushes to rubygems.org, or delete to allow pushes to any server."
+  #end
+
+  spec.summary          = %q{Ruby interface to NetCDF}
+  spec.description      = %q{RubyNetCDF is the Ruby interface to the NetCDF library built on the NArray library, which is an efficient multi-dimensional numeric array class for Ruby. This version works with Ruby2.0.}
+
+  spec.homepage         = 'http://www.gfd-dennou.org/arch/ruby/products/ruby-netcdf/'
+  spec.licenses         = ["GFD Dennou Club"]
+
+  spec.files         = `git ls-files -z`.split("\x0")
+  spec.test_files    = spec.files.grep(%r{^(test|demo)/})
+  #spec.bindir        = "exe"
+  #spec.executables   = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+  spec.require_paths = ["lib"]
+
+  spec.required_ruby_version = Gem::Requirement.new(">= 1.6")
+  spec.add_runtime_dependency(%q<narray>, [">= 0"])
+  spec.add_runtime_dependency(%q<narray_miss>, [">= 0"])
+
+  spec.extensions << "extconf.rb"
+end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/ruby-netcdf.git



More information about the Pkg-grass-devel mailing list