[netcdf4-python] 01/03: Imported Upstream version 1.1.4.1

Ross Gammon ross-guest at moszumanska.debian.org
Fri Mar 20 14:10:14 UTC 2015


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

ross-guest pushed a commit to branch master
in repository netcdf4-python.

commit c687e47ab8d259d3c1b68d5dc54e70d7eb534cc2
Author: Ross Gammon <rossgammon at mail.dk>
Date:   Tue Feb 24 21:07:45 2015 +0100

    Imported Upstream version 1.1.4.1
---
 COPYING                                        |    39 +
 Changelog                                      |   971 +
 MANIFEST.in                                    |    23 +
 PKG-INFO                                       |    20 +
 README.macosx                                  |    18 +
 README.md                                      |    28 +
 constants.pyx                                  |     3 +
 docs/api-objects.txt                           |   272 +
 docs/class-tree.html                           |   140 +
 docs/crarr.png                                 |   Bin 0 -> 340 bytes
 docs/epydoc.css                                |   322 +
 docs/epydoc.js                                 |   293 +
 docs/help.html                                 |   262 +
 docs/identifier-index.html                     |   652 +
 docs/index.html                                |  1625 +
 docs/module-tree.html                          |    99 +
 docs/netCDF3-module.html                       |   965 +
 docs/netCDF3.Dataset-class.html                |   919 +
 docs/netCDF3.Dimension-class.html              |   306 +
 docs/netCDF3.MFDataset-class.html              |   437 +
 docs/netCDF3.Variable-class.html               |   842 +
 docs/netCDF4-module.html                       |  1625 +
 docs/netCDF4.CompoundType-class.html           |   357 +
 docs/netCDF4.Dataset-class.html                |  1698 +
 docs/netCDF4.Dimension-class.html              |   394 +
 docs/netCDF4.Group-class.html                  |   386 +
 docs/netCDF4.MFDataset-class.html              |   527 +
 docs/netCDF4.MFTime-class.html                 |   307 +
 docs/netCDF4.VLType-class.html                 |   344 +
 docs/netCDF4.Variable-class.html               |  1442 +
 docs/netcdftime.netcdftime-module.html         |   548 +
 docs/netcdftime.netcdftime-pysrc.html          |  1199 +
 docs/netcdftime.netcdftime.datetime-class.html |   185 +
 docs/netcdftime.netcdftime.utime-class.html    |   467 +
 docs/redirect.html                             |    38 +
 examples/bench.py                              |    41 +
 examples/bench_compress.py                     |    47 +
 examples/bench_compress2.py                    |    50 +
 examples/bench_compress3.py                    |    50 +
 examples/bench_diskless.py                     |    67 +
 examples/test_stringarr.py                     |    48 +
 examples/tutorial.py                           |   279 +
 netCDF4.c                                      | 66301 +++++++++++++++++++++++
 netCDF4.egg-info/PKG-INFO                      |    20 +
 netCDF4.egg-info/SOURCES.txt                   |    94 +
 netCDF4.egg-info/dependency_links.txt          |     1 +
 netCDF4.egg-info/requires.txt                  |     1 +
 netCDF4.egg-info/top_level.txt                 |     3 +
 netCDF4.pxi                                    |   717 +
 netCDF4.pyx                                    |  4139 ++
 netCDF4_utils.py                               |   401 +
 netcdftime/__init__.py                         |     2 +
 netcdftime/_datetime.c                         |  5094 ++
 netcdftime/_datetime.pyx                       |   126 +
 netcdftime/netcdftime.py                       |  1189 +
 ports/README                                   |    14 +
 ports/python/py-netcdf4/Portfile               |    28 +
 setup.cfg                                      |     5 +
 setup.cfg.template                             |    48 +
 setup.py                                       |   374 +
 test/run_all.py                                |    42 +
 test/tst_atts.py                               |   156 +
 test/tst_compound_alignment.py                 |   111 +
 test/tst_compoundatt.py                        |    76 +
 test/tst_compoundvar.py                        |    94 +
 test/tst_compression.py                        |   116 +
 test/tst_dap.py                                |    32 +
 test/tst_dims.py                               |   119 +
 test/tst_diskless.py                           |    81 +
 test/tst_endian.py                             |    86 +
 test/tst_fancyslicing.py                       |   186 +
 test/tst_grps.py                               |    85 +
 test/tst_masked.py                             |   103 +
 test/tst_masked2.py                            |   123 +
 test/tst_masked3.py                            |   201 +
 test/tst_multifile.py                          |   125 +
 test/tst_multifile2.py                         |   127 +
 test/tst_netcdftime.py                         |   453 +
 test/tst_refcount.py                           |    28 +
 test/tst_rename.py                             |   143 +
 test/tst_scalarvar.py                          |    59 +
 test/tst_scaled.py                             |   196 +
 test/tst_shape.py                              |    38 +
 test/tst_slicing.py                            |   175 +
 test/tst_stringarr.py                          |    50 +
 test/tst_types.py                              |    89 +
 test/tst_unicode.py                            |    42 +
 test/tst_unicode3.py                           |    42 +
 test/tst_unlimdim.py                           |    66 +
 test/tst_utils.py                              |   271 +
 test/tst_vars.py                               |    94 +
 test/tst_vlen.py                               |   123 +
 utils.pyx                                      |   820 +
 utils/nc3tonc4                                 |   280 +
 utils/nc4tonc3                                 |   127 +
 utils/ncinfo                                   |    82 +
 96 files changed, 101933 insertions(+)

diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..2cc338a
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,39 @@
+copyright: 2008 by Jeffrey Whitaker.
+
+Permission to use, copy, modify, and distribute this software and
+its documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both the copyright notice and this permission notice appear in
+supporting documentation.
+
+THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
+EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+
+parts of pyiso8601 are included in netcdftime under the following license:
+
+Copyright (c) 2007 Michael Twomey
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/Changelog b/Changelog
new file mode 100644
index 0000000..ccbb07e
--- /dev/null
+++ b/Changelog
@@ -0,0 +1,971 @@
+ version 1.1.4 (tag v1.1.4rel)
+ =============================
+
+ * speedup conversion of array indices to slices (issue #325).
+ * fix for issue #330 (incorrect values for seconds returned by netcdftime).
+ * fix reading of scalar vlen variables (issue #333).
+ * setting fill_value=False in createVariable for vlen and compound variables 
+   now does nothing, instead of causing an error when the Dataset is closed
+   (issue #331).
+ * cython will regenerate netCDF4.c when install is run, not just build.
+   Makes 'pip install' do the right thing when cython is installed (issue #263).
+
+ version 1.1.3 (tag v1.1.3rel)
+ =============================
+
+ * checked in _datetime.c to git (resolves issue #315).  Note - _datetime.c
+   was *not* included in the 1.1.2 release.
+ * Changed __str__ to __repr__ in MFDataset, to be consistent with Dataset
+   (issue #317). IPython uses __repr__ to make use-friendly human-readable summaries
+   of objects in the terminal.
+
+ version 1.1.2 (tag v1.1.2rel)
+ =============================
+
+ * fix for issue 312 (allow slicing with objects that can be cast to ints).
+ * indexing netCDF variables with integer sequences and boolean arrays now
+   behave the same way (integer sequences are converted to boolean arrays
+   internally). Addresses issue #300.  Since indexing using integer sequences
+   does not behave exactly as before, some client code may break.  For example,
+   previously when integer index arrays had the same length, and that length
+   was equal to the number of dimensions of the array being indexed,
+   netcdf4-python mirrored the numpy indexing behavior and treated the elements
+   of the index arrays as individual sets of integer indices.  This special
+   case has been removed. An IndexError is now raised when the new behavior
+   would produce a different result than the old, i.e. when the
+   indices in an integer sequence are not sorted, or there are duplicate
+   indices in the sequence.
+ * fix for issue #310 (masked arrays not returned correctly when variable
+   has non native endian-ness).
+ * fix for issue #306 (slicing variable with "-1" when there is only
+   one element along that dimension).
+ * Improved speed of num2date and date2num for standard, julian, gregorian
+   and proleptic gregorian calendars by vectorizing the functions. See Issue #296
+ * Fix for issue #301 ("Datestring parser chokes on years with extra space").
+ * Add name property for Dimension, Variable and Group instances (to access string
+   name associated with instance).
+ * Allow for null byte attributes (so _FillValue='\x00' can be set manually).
+   Issue 273.
+ * Added __repr__ (matching __str__) for all types (pull request #291).
+   IPython uses __repr__ to make use-friendly human-readable summaries
+   of objects in the terminal.
+
+
+ version 1.1.1 (tag v1.1.1rel)
+ ==============================
+
+ * make sure _FillValue is a byte for character arrays in Python 3 (issue
+   271).
+ * add numpy to install_requires in setup.py (issue #282, fixes issue #211).
+   'pip install netcdf4-python' will no longer fail if numpy not installed.
+ * Fix for issue 278 (UnicodeDecodeError reading netcdf.h from setup.py with
+   Python 3.4).
+ * Make netcdftime.datetime immutable and hashable (issue 255).
+ * Fix issue with slicing of scalar VLEN arrays (issue 270).
+ * Add set_auto_mask and set_auto_scale methods to control auto scaling and
+   auto masking separately. (issue 269).  Also added set_auto_maskandscale,
+   set_auto_scale, set_auto_mask Dataset/Group methods that recursively walk
+   through all variables in the Dataset/Group.
+ * Make sure file_format attribute propagated to Group instances (issue 265).
+ * Fix for issue #259 ("Cannot use broadcasting to set all elements of a
+   Variable to a given value").
+
+ version 1.1.0 (tag v1.1.0rel)
+ =============================
+
+ * revert weakref change, so that previous behaviour (Dimensions and Variables
+   keep strong references to parent Dataset) is the default.  New keyword
+   argument 'keepweakref' for Dataset.__init__ can be set to true to get
+   weak references.
+
+ version 1.0.9 (tag v1.0.9rel)
+ =============================
+
+ * speed up the creation of new Group instances (issue 239).
+
+ * fix logic errors in setup.py (issue 236).
+
+ * it is now possible to create and set variable length string variables with
+   numpy string datatypes (pull request 224).
+
+ * add .travis.yml (for travis-ci testing on github), silence warnings from
+   test output (issue 225).
+
+ * modify __unicode__ for Variable and Dimension to return more useful error
+   message when Dataset object has been garbage collected.
+
+ * use weak references to group instances when creating Dimension and Variable
+   objects. This prevents cyclic references messing up garbage collection (issue
+   218, pull request 219).
+
+ * accessing values from a 0-dimensional Variable now returns a 0-dimensional
+   numpy array, not a 1-dimensional array (issue 220). To write code
+   compatible with both the old and new (fixed) behavior, wrap values accessed
+   from a 0-dimensional Variable with numpy.asscalar.
+
+ * add an __array__ method to Variable to make numpy ufuncs faster (issue 216).
+
+ * change download_url in setup.py to point to pypi instead of googlecode.
+
+ * fix for date2index error when time variable has only one entry (issue 215).
+
+ * silence warnings ("Non-trivial type declarators in shared declaration (e.g.
+   mix of pointers and values). Each pointer declaration should be on its own
+   line") with Cython 0.2.
+
+ * reduced memory usage for Variable.__getitem__ under Python 2.
+
+ version 1.0.8 (tag v1.0.8rel)
+ =============================
+
+ * change file_format Dataset attribute to data_model (keeping file_format
+   for backward compatibility).  Add disk_format attribute (underlying
+   disk format, one of NETCDF3, HDF4, HDF5, DAP2, DAP4, PNETCDF or UNDEFINED).
+   Uses nc_inq_format_extended, added in version 4.3.1 of library.  If using
+   earlier version of lib, disk_format will be set to UNDEFINED.
+
+ * default _FillValue now ignored for byte data types (int8 and uint8) as per
+   http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c/Fill-Values.html#Fill-Values
+   "If you need a fill value for a byte variable, it is recommended that you
+   explicitly define an appropriate _FillValue attribute, as generic utilities
+   such as ncdump will not assume a default fill value for byte variables".
+   ncinfo now returns fill mode information (issue 209).
+
+ * check to see if filling was disabled before masking data equal to
+   default fill value (issue 209).
+
+ * add variable type information to Dataset.__repr__ (output of ncinfo).
+
+ version 1.0.7 (tag v1.0.7rel)
+ =============================
+
+ * add the ability to specify the locations of hdf4,jpeg and curl libs, in
+   case netCDF4 was built statically with HDF4 and/or OpenDAP support (issue
+   207).
+
+ * add 'ncinfo' utility (like 'ncdump -h' but less verbose).
+
+ * more information displayed when Dataset or Group instance is printed.
+
+ * fix for issue 194 (versions after 1.0.5 fail for netcdf 4.1.1, due to
+   call to nc_inq_path, which was added in netcdf 4.1.2).  Fixed by adding
+   compile time API check similar to what was done for nc_rename_grp.  If
+   filepath Dataset method is called an exception will be raised at runtime
+   if the module was built with netcdf < 4.1.2, or cython was not installed
+   at build time.
+
+ * fix for issues 202 and 206 (exception raised by numpy.isnan for character data types).
+
+ * if dateutils not installed and time unit accuracy < 1 second requested, have
+   netcdftime raise an ImportError.
+
+ version 1.0.6 (svn revision 1312)
+ ================================
+
+ * issue warning of endian-ness of dtype argument does not match endian kwarg in
+   createVariable.
+
+ * make sure netcdf type NC_CHAR always returned in numpy array dtype 'S1'
+   (sometimes arrays of type 'U1' were being returned). Fixes intermittently failing
+   test tst_compoundatt.py on python 3.3.
+
+ * fix for issue 201 (if data associated with numpy array not the
+   same endian-ness as dtype, data was written incorrectly).  Now
+   bytes are swapped if necessary.  Variable.endian() now returns
+   'native' instead of None for NETCDF3 formatted files.  createVariable
+   now enforces endian='native' for NETCDF3 files. Added tst_endian.py
+   test case.
+
+ * fix for issue 200 (library version detection failed on cygwin).
+
+ * fix for issue 199 (nc4tonc3 utility not copying global attributes).
+
+ * fix for issue 198 (setup.py chokes when no arguments given).
+
+ * fix for issue 197 (slicing of netCDF variables using lists of integers).
+
+ * create 'path' attribute for group instance using posixpath, instead
+   of os.path (to ensure the unix path is used on all platforms). Issue 196.
+
+ * fix for issue 196 (test failures on win32 due to files being deleted
+   before they are closed).
+
+ version 1.0.5 (svn revision 1278)
+ ================================
+
+ * change setup.py to compile the Cython sources directly, if
+   cython is available.
+   This allows for "ifdef" like capability to modify source at compile time to
+   account for changes in netcdf API (e.g. the forthcoming addition of the
+   nc_rename_grp in version 4.3.1).
+
+ * added a "renameGroup" method, which raises an exception if
+   the netcdf lib version linked does not support it. Requires
+   netcdf >= 4.3.1.
+
+ * support for more than one missing value (missing_value attribute
+   is a vector) when converting to masked array.
+
+ * add 'renameAttribute' method to Dataset, Group and Variable.
+
+ * fix so that var[:] = x works if x is a scalar, and var is a netcdf variable
+   with an unlimited dimension that has shape () - i.e. no data has been
+   written to it yet.  Before this change, var[:] = x did not write any data.
+   Now the scalar x will be written as the first entry in var along the
+   unlimited dimension.
+
+ * remove dos line feeds from nc3tonc4 (issue 181).
+
+ * add datatype property for Variable that returns numpy dtype for primitive
+   datatypes (same as dtype attribute) but returns CompoundType or VLType
+   instance for compound or vlen variables (issue 178).
+
+ * fix logic for deciding where to look for nc-config in setup.py (issue 177).
+
+ * issue a warning and don't try to apply scale_factor or add_offset if these
+   attributes are not convertible to floats (issue 176).
+
+ * add filepath method to Dataset instance to return file path (or opendap
+   URL) used to create Dataset (issue 172).
+
+ * fix for issue 170 (opening a remote DAP dataset fails after creating
+   a NETCDF4 formatted file).
+
+ * fix for issue 169 (error in chartostring function on 64-bit windows).
+
+ * add support for missing_value or _FillValue == NaN (issue 168).
+
+ * added a Dimension.group() method (issue 165).
+
+ version 1.0.4 (svn revision 1229)
+ =================================
+
+ * fixed alignment bug that could cause memory corruption
+   when reading compound type variables. All users of compound
+   types should upgrade.
+
+ version 1.0.3 (svn revision 1219)
+ =================================
+
+ * don't try to write empty data array to netcdf file (fixed failing
+   test with netcdf 4.3.0rc2).
+
+ * date2num, num2date and date2index now can handle units of microseconds and milliseconds
+   (for proleptic_gregorian calendar, or gregorian and standard calendars
+    as long as the time origin is after 1582-10-15). Issue 159.
+
+ * Added a _grp attribute to Dimension (issue 165).
+
+ * don't bundle ordereddict (issue 164).
+
+ * support reading of vlen string attributes (issue 156).
+
+ * add --vars option to nc3tonc4 (issue 154).
+
+ * Don't try to set fletcher32 checksum on scalar variables (it causes HDF5
+   to crash).  Fixes issue 150.
+
+ * Add --istart/--istop options to nc3tonc4 (issue 148, courtesy of
+   Rich Signell).
+
+ * fix for proleptic_gregorian in netcdftime.py (courtesy of Matthias Cuntz).
+
+ version 1.0.2 (svn revision 1196)
+ =================================
+
+ * disable version check for HDF5, which is broken by hdf5 1.8.10.
+
+ * make sure all files have a calendar attribute in MFTime (issue 144).
+
+ * more robust fix to issue 90 (array shape modified by assignment to
+   a netCDF variable with one more dimension), including test case.
+
+ version 1.0.1 (svn revision 1190)
+ =================================
+
+ * fix error that occurred when retrieving data from a variable that has a
+   missing_value attribute specified as a string (issue 142).
+
+ * automatically close netcdf files when there are no references
+   left to Dataset object (using __dealloc__ method).  Fixes issue 137.
+
+ * fix for slicing of scalar vlen string variables (issue 140).
+
+ * fix to allow writing of unicode data to a NC_CHAR variable.
+
+ * allow for writing of large variables (> 2**32 elements). Fixes issue 130.
+
+ version 1.0fix1
+ ===============
+
+ * fix python 3 incompatibility in setup.py (issue 125).
+
+ version 1.0 (svn revision 1164)
+ ===============================
+ * add 'aggdim' keyword to MFDataset, so the name of the dimension
+   to aggregate over can be specified (instead of using the unlimited
+   dimension).  aggdim=None by default, which results in the previous
+   behavior.  aggdim must be the leftmost dimension of all the variables
+   to be aggregated.
+
+ * raise IndexError when indexing a netcdf variable out of range
+   so iterating over a variable in a for loop behaves as expected
+   (as described in http://effbot.org/zone/python-for-statement.htm).
+   Fixes issue 121.
+
+ * added MacPorts portfile (so it can be installed via MacPorts
+   on macosx using a "local Portfile repository"). Installs
+   from svn HEAD using 'port install netcdf4-python'.
+
+ * added experimental 'diskless' file capability (only added to the C
+   lib after the 4.2 release).  Controlled by kwarg 'diskless' to
+   netCDF4.Dataset (default False). diskless=True when creating a file
+   results in a file that exists only in memory, closing the file
+   makes the data disapper, except if persist=True keyword given in
+   which case it is persisted to a disk file on close.  diskless=True
+   when opening a file creates an in-memory copy of the file for faster access.
+
+ * add the ability to specify the location of the required libs
+   (and whether to use nc-config) with setup.cfg,
+   instead of using environment variables.
+
+ * fix ISO9601 date parser so it recognizes time zone offsets in time unit
+   strings (contributed by David Hassel, issue 114, r1117).
+
+ * add setncatts Dataset,Group and Variable method to add a bunch of
+   attributes (given in a python dictionary) at once.  Speeds things
+   up for NETCDF3 and NETCDF4_CLASSIC files a lot, since nc_redef/nc_enddef
+   not need to be called for each attribute (issue 85, r1113). Adding 1000
+   attributes is about 35 times faster using setncatts to add them all at once.
+   Makes no difference for NETCDF4 formatted files, since nc_redef/nc_enddef
+   is not called.
+
+ * only round after apply scale_factor and add_offset if variable type is
+   integer (issue 111, r1109).
+
+ * Fixed bug with all False Boolean index (r1107).
+
+ * added support for after, before and nearest selection method to date2index
+   fast "first guess" indexing (r1106).
+
+ * Remove white space in time units string (netcdftime._parse_date).
+   An extra space in the time units of one CMIP3 model caused an error
+   (r1105).
+
+ * based on results with examples/bench_compress2.py, change
+   default complevel for zlib compression from 6 to 4. If complevel=0,
+   turn compression off entirely (set zlib=False) (r1102).
+
+ version 0.9.9 (svn revision 1099)
+ ================================
+ * changed default unicode encoding from "latin-1" to "utf-8", since
+   this is the python 3 default, and the only encoding that appears to
+   work for dimension and variable names.
+
+ * added test case for unicode attributes, variable and dimension names.
+
+ * fixes for unicode variable, dimension and group names.
+
+ * fix for unicode attributes in python3 (ncdump did not intrepret them as
+   text strings). Issue 107.
+
+ * add --format option to nc4tonc3 utility (can be either NETCDF3_CLASSIC or
+   NETCDF3_64BIT). Fixes issue 104.
+
+ version 0.9.8 (svn revision 1080)
+ ================================
+ * use numpy.ma.isMA to check for masked array (instead of checking
+   for presence of 'mask' attribute).
+
+ * fixes for AIX with ibm xlc compiler.
+
+ * make sure unicode attributes don't get converted to ascii strings (issue
+   98).
+
+ version 0.9.7 (svn revision 1073)
+ ================================
+ * Added __str__ methods to Dataset, Variable, Dimension, CompoundType,
+   VLType and MFDataset, so useful human-readable information is provided when these
+   objects are printed in an interactive session.
+
+ * don't try to apply scale_factor and offset if scale_factor=1 and
+   add_offset=0 (to avoid making copies of large arrays).
+
+ * changed netCDF4._default_fillvals to netCDF4.default_fillvals (to make part
+   of public API).  Added to docs (issue 94).
+
+ version 0.9.6 (svn revision 1043)
+ =================================
+ * changed default unicode encoding from "ascii" to "latin-1" (iso-8859-1).
+
+ * add "unicode_error" module variable to control what happens when characters
+   cannot be decoded by the encoding specified by the "default_encoding" module
+   variable (which is "ascii" by default).  unicode_error = "replace" by default
+   which means bad characters are replace by "?".  Previously an error was
+   raised, the old behavior can be obtained by setting unicode_error = 'strict'.
+   Fixes issue 92.
+
+ * add __enter__ and __exit__ methods so you can do "with Dataset(url) as f:"
+   (issue 89).
+
+ * don't add extra singleton dimensions to rhs numpy arrays when assigning to
+   a netcdf variable. Fixes issue 90.
+
+ * coerce missing_value attribute to same type as variable (for primitive
+   types). Fixes issue 91.
+
+ version 0.9.5 (svn revision 1031)
+ ================================
+ * fix for compound variables on python 3.2.
+
+ * fix slicing of masked MFDataset variables (issue 83).
+
+ * round to nearest integer after packing with scale_factor and add_offset
+   (instead of truncation) (issue 84).
+
+ * if add_offset missing, but scale_factor present, assume add_offset zero.
+   if scale_factor missing, but add_offset present, assume scale_factor one.
+   (this is consistent with unidata recommendations - issue 86).
+
+ * only try to convert strings to bytes for python 3 so Dataset can
+   be subclassed (issue 87).
+
+ version 0.9.4 (svn revision 1018)
+ ================================
+ * tested with python 2.7.1/3.1.3 using netcdf 4.1.2 and hdf5 1.8.6.
+
+ * Added a 'default_encoding' module variable that controls how unicode
+ strings are encoded into bytes. Default is 'ascii'.
+
+ * now works on Python 3.
+
+ * netCDF3 module removed. If you still need it, get it from netCDF4 0.9.3.
+
+ * regenerated C source with Cython 0.14.1.
+
+ * Added a MFTime class. Provide a unified interface to MFDataset time
+ variable using different time units.
+
+ * Fixed bug in netcdftime (issue 75) that occurs when time specified is within
+ one second of the end of the month.
+
+ * on unix-like systems, the environment variable USE_NCCONFIG can be set to
+ tell setup.py to use the nc-config script installed by netcdf to figure out
+ where all the libs and headers are (without having to specify NETCDF_DIR,
+ HDF5_DIR, etc).  Only works with netcdf 4.1.2.
+
+ version 0.9.3 (svn revision 930)
+ ================================
+ * fix chunk sizes bug (chunk sizes pointer should be size_t, not int).  Fixes
+ issue 66. Added test in tst_compression.py
+
+ * fixed writing of data with missing values with scale/offset packing. Added
+ test (tst_masked2.py).
+
+ * fix iso8601 regex in netcdftime date parser so it can parse 'hours since 1-1-1 ...'
+ (year had to be 4 digits previously)
+
+ version 0.9.2 (svn revision 907)
+ ================================
+ * fix netcdftime bug with '360_day' calendar. Fixes issue 59.
+
+ * make sure scalar slice of 1d variable returns array scalar (not array of
+   shape (1,)). Fixes issue 57.
+
+ * updated date parser in netcdftime.  Can now handle units like
+   "seconds since 1970-01-01T00:00:00Z".
+
+ * added support in setup.py for specifying the locations of the HDF5/netcdf-4 headers
+   and libs separately with environment variables (HDF5_INCDIR, HDF5_LIBDIR).i
+   Patch contributed by Patrice Dumas.
+
+ * add masked array support to num2date (dates for missing times set to None).
+
+ * add chunk_cache keyword to createVariable.  HDF5 default is 1mb, which can
+   cause problems when creating 1000's of variables.  In such cases,
+   chunk_cache can be reduced, or set to zero.
+
+ * add set_var_chunk_cache and get_var_chunk_cache Variable methods.
+
+ * raise AttributeError when trying to set _FillValue attribute (it can only
+   be reliably set on variable creation, using the fill_value keyword to
+   createVariable).
+
+version 0.9.1 (svn revision 879)
+================================
+ * raise ImportError if netcdf-4 < 4.1.1 or hdf5 <= 1.8.4.
+
+ * add __netcdf4libversion__ and __hdf5libversion__ module variables.
+
+ * make sure data is not truncated to integers before scale_factor and
+   add_offset is applied (issue 46).
+
+ * fix bug in date2num with noleap calendar in netcdftime (issue 45).
+
+ * fix bug in 360day calendar in netcdftime (issue 44).
+
+ * python 2.4 compatibility restored (by modifying OrderedDict).  Fixes issue
+   37.
+
+ * make sure int64 attributes cast to int32 when format=NETCDF4_CLASSIC. This
+   was causing tst_multifile.py to fail on 64-bit platforms.
+
+ * fix tutorial.py to cast 64 bit integers to 32 bit when writing to 32-bit
+   integer vlen (was causing tutorial.py to fail on 64-bit platforms).
+
+ * remove nose dependency from tst_netcdftime.py.
+
+version 0.9 (svn revision 846)
+==============================
+ * fixed bug (issue 30) with date2index occurring with dates outside the support.
+
+ * make sure that auto masking works with MFDataset.
+
+ * fix bug (issue 34) when slicing MFDataset variables with dimensions of
+   length 1.
+
+ * used ordered dictionaries for variables, dimensions, groups etc to
+   preserve creation order (makes it easier to copy files, fixes issue 28).
+
+ * change auto_maskandscale default to True.  This means data will
+   automatically be converted to and from masked arrays.  Data scaled as short
+   integers using the scale_factor and add_offset attributes will also be
+   automatically converted to/from float arrays.
+
+ * add setncattr, getncattr, delncattr methods (for setting/getting/deleting netcdf
+   attributes with names that clash with the reserved python attributes).
+
+version 0.8.2 (svn revision 769)
+================================
+ * compound type tests re-enabled. Compound and vlen types now fully
+   supported in netcdf-4.1-beta2.
+
+ * make sure data retrieved from a netCDF variable is not coerced to a python
+   scalar (it should remain a numpy scalar array).
+
+ * fix docs to point out that an unlimited dimension can be created by setting
+   size to *either* None or 0 in createDimension.
+
+ * fix another slicing corner case.
+
+ * remove auto pickling/unpickling into vlen strings (too cute, sometimes
+   produced surprising results).
+
+version 0.8.1 (svn revision 744)
+================================
+ * added 'cmptypes' and 'vltypes' Group/Dataset attributes, which contain
+   dictionaries that map the names of compound and vlen types to
+   CompoundType and VLType instances.
+
+ * Experimental variable-length (vlen) data type support added.
+
+ * changes to accomodate compound types in netcdf-4.1-beta snapshots.
+   Compound types now work correctly for snapshots >= 20090603.
+
+ * Added __len__ method and 'size' property to Variable class.
+
+ * In date2index, replaced the brute force method by the bisection method and
+   added a 'select' keyword to find the index of the date before, after or
+   nearest the given date.
+
+ * Fixed bug occurring when indexing with a numpy array of length 1.
+
+ * Fixed bug that occured when -1 was used as a variable index.
+
+ * enabled 'shared access' mode for NETCDF3 formatted files (mode='ws',
+   'r+s' or 'as'). Writes in shared mode are unbuffered, which can
+   improve performance for non-sequential access.
+
+ * fixed bug in renameVariable that caused failure when new name is longer
+   than old name, and file format is NETCDF3_64BIT or NETCDF3_CLASSIC.
+
+version 0.8 (svn revision 685)
+==============================
+ * added 'stringtoarr' utility function for converting python strings
+   to numpy character arrays of a specified size.
+
+ * initial support for compound data types (which are mapped to structured
+   numpy arrays). Compound data types are created with the createCompoundTYpe
+   Dataset or Group method. Both attributes and variables can be compound
+   types.
+
+ * make sure 64-bit integer attributes converted to 32 bits when writing to
+   a NETCDF3 formatted file.
+
+ * added nc4tonc3 utility for converted NETCDF4_CLASSIC files to NETCDF3_64BIT
+   files (useful for sharing data with colleagues that don't have netcdf-4
+   capable clients).
+
+version 0.7.7 (svn revision 626)
+================================
+
+ * David Huard reworked fancy indexing - it is now much more efficient and
+   less of a memory hog. Now works differently than numpy fancy indexing - 1d
+   arrays of boolean or integer indices work independently on each dimension.
+   This enables things like:
+   >>> tempdat = temp[[0,1,3],lats>0,lons>0]
+   (retrieves 1st, 2nd and 4th levels, all Northern Hem. and Eastern
+    Hem. grid points - note that this would raise an IndexError in numpy)
+
+* added opendap test (tst_dap.py).
+
+* bugfix for nc3tonc4 utility.
+
+* fix MFDataset.Variable. __getattr__ to raise AttributeError instead of
+  KeyError when attribute not found.
+
+* netcdftime version number upped to 0.7.
+
+version 0.7.6 (svn revision 574)
+================================
+
+* added date2index function, courtesy of David Huard, which finds the indices
+  in a netCDF time variable corresponding to a sequence of datetime instances.
+
+* make _get_att/_set_att raise AttributeError instead of RuntimeError, so that
+  getattr(object, 'nonexistantattribute', None) works.  (thanks David Huard)
+
+* v[:] = data now works along unlim dim, i.e. you can do this:
+
+  file = Dataset('test.nc', "w")
+  file.createDimension("time", None)     # unlimited dimension
+  var = file.createVariable("var", 'd', ("time",))
+  # you used to have to do this
+  #var[0:10] = numpy.arange(10)
+  # but now you can simply do this
+  var[:] = numpy.arange(10)
+
+version 0.7.5 (svn revision 549)
+================================
+* return a scalar array, not a python scalar, when a slice returns a single
+  number. This is more consistent with numpy behavior, and fixes a bug
+  in MFDataset slicing.
+* added 'exclude' parameter to MFDataset.__init__
+* added set_auto_maskandscale method to MFDataset variables.
+
+version 0.7.4 (svn revision 540)
+================================
+* ensure all arithmetic is done with float64 in netcdftime (Rob Hetland).
+* fixes for netcdf-4.0-beta2 ('chunking' keyword to createVariable
+  replaced by 'contiguous').  Now works with netcdf-4.0-beta2 and hdf5-1.8.0
+  final, but is incompatible with netcdf-4.0-beta1.
+
+version 0.7.3.1 (svn revision 507)
+==================================
+* netCDF3 docs were missing from 0.7.3.
+* make sure quantization function preserves fill_value of masked arrays.
+
+version 0.7.3 (svn revision 501)
+================================
+* MFnetCDF4 module merged into netCDF4 and netCDF3 (now
+  called MFDataset).
+* added netCDF3 module for those who can't install the netCDF 4 lib.
+* added set_auto_maskandscale Variable method to enable automatic
+  packing and unpacking of short integers (using scale_factor
+  and add_offset attributes) and automatic conversion to/from
+  masked arrays (using missing_value or _FillValue attribute)
+  on a per-variable basis.
+  var.set_auto_maskandscale(True) turns automatic
+  conversion on (it is off by default).
+* automatically pack/unpack short integer variables
+  if scale_factor and add_offset variable attributes are set.
+* added support for masked arrays.  If you try to write a masked
+  array to a variable with the missing_value or _FillValue attributes
+  set, the masked array is filled with that value before being written
+  to the file.  If you read data from a variable with the missing_value
+  or _FillValue attribute set, a masked array is returned with the
+  appropriate values masked.
+* added date2num and num2date functions.
+* added capability to use 'fancy indexing' with variable objects
+  (i.e. using sequences of integers or booleans in slices). WARNING:
+  if a sequence of integers or booleans is used to slice a netCDF4
+  variable, all of the data in that dimension is read into a numpy
+  array, and then the sequence is used to slice the numpy array,
+  returning just the requested elements to the user.  This can
+  potentially gobble a lot of memory and degrade performance
+  (especially if 'fancy indexing' is done on the left-most dimension).
+* added convenience functions stringtochar and chartostring for
+  converting character arrays to arrays of fixed-length strings and
+  vice-versa.   Example usage in examples/test_stringarr.py.
+
+20070826 - version 0.7.1 (svn revision 400)
+===========================================
+* added 'endian()' and 'chunking()' Variable methods (to inquire about
+  endian and chunking variable settings).
+
+* 'ndim' attribute was not public (so it couldn't be accessed from python).
+  Fixed.
+
+* added 'endian' kwarg to createVariable (to set the endian-ness
+  used in the HDF5 file).
+
+* can now manually set HDF5 chunksizes for each dimension at
+  variable creation, using 'chunksizes' kwarg to createVariable.
+
+* added "getlibversion()" function to get info about version
+  of netcdf-4 library used to build module.
+
+* if a variable has an unsupported datatype (such as 'compound', or
+  'vlen'), then instead of raising an exception, just skip it.
+  Print a useful error message when an attribute with an unsupported
+  datatype is accessed.
+
+* if variable dimension is specified as 'dimname' or ('dimname')
+  in createVariable, it is automatically converted to a tuple ('dimname',).
+  Better error messages when specified dimension can't be found.
+
+* createVariable accepts numpy dtype object as datatype.  dtype variable
+  attribute is now a numpy dtype object.
+
+20070723 - version 0.7 (svn revision 361)
+=========================================
+* renamed MFnetCDF4_classic --> MFnetCDF4.
+
+* eliminated netCDF4_classic module (all file formats handled by
+  netCDF4 module now).
+
+* removed all user-defined data type stuff (it was hacky and made
+  the code too complex - wait till there is a real use case to
+  refactor and put back in).
+
+* added 'ndim' variable attribute (number of variable dimensions).
+
+20070424 - version 0.6.3 (svn revision 302)
+===========================================
+* passes all tests with netcdf-4.0-beta1/hdf5-1.8.0-beta1.
+
+* if slice index is not a slice object, assume it's an integer (and
+  try to convert to one if it is not).  This allows numpy scalar arrays
+  to work as slice indices.
+
+* (netCDF4_classic only) try to make sure file is not left in 'define mode'
+  when execption is raised.
+
+* if slicing a variable results in a array with shape (1,), just return
+  a scalar (except for compound types).
+
+* added instructions for using the netCDF4_classic module to serve
+  data over http with the DAP using pydap (http://pydap.org).
+
+* added --quiet and --chunk options to nc3tonc4.
+
+* Turned off zlib compression by default so as not to violate the
+  'principle of least surprise'.  Shuffle filter still activated
+  by default when zlib compression turned on.
+
+* Fixed bug in fletcher32 checksum activation call.  Renamed compression()
+  variable method to filters(), include fletcher32 checksum flag in output.
+
+* added utility for converting GRIB1 files to compressed
+  NETCDF4_CLASSIC files (requires PyNIO).
+
+* added 'compression()' variable method that returns a dict with
+  compression filter parameter settings for that variable. (rev 237)
+
+* reimplemented 'shape' and 'dimensions' variable attributes as
+  properties.
+
+* fixed bug when 'chunking' keyword in createVariable was set to 'sub'
+  (caused Bus Error on MacOS X).
+
+* Setting 'shuffle=0' keyword in createVariable was turning off
+  zlib compression filter instead of shuffle filter.  Fixed.
+
+20070213 - version 0.6.2
+========================
+* updated for compatibility with netcdf-4.0-alpha18 and hdf5 1.8.0alpha5
+  (shared dimensions actually work now).
+
+* netCDF4.createVariable can now use old single character Numeric typecodes
+  for datatype specification.
+
+* Improvements to MFDataset (now called MFnetCDF4_classic) by Rob Hetland.
+
+20061121 - version 0.6.1
+========================
+* bugfixes for negative strides.
+
+* bugfix for empty string attributes.
+
+* support for shared dimensions (variables can use dimensions defined
+  only in a parent group).  This doesn't actually work yet, because of
+  a bug in netcdf-4.0-alpha17.
+
+* now requires Pyrex (C source files generated on the fly when setup.py
+  is run).
+
+20061003 - version 0.6
+======================
+* if fill_value keyword to createVariable is set to the Boolean
+  False (not an integer that evaluates to False), no pre-filling
+  is done for that variable.
+
+* updated to be compatible with netcdf-4.0-alpha17.
+  Can now install pure-python netcdftime separately with setup-netcdftime.py.
+  netcdftime will try to use numpy, but fall back to Numeric if numpy
+  not installed.
+
+* generated source files with a version of pyrex
+  (from http://codespeak.net/svn/lxml/pyrex/) that produces
+  extensions compatible with python 2.5.
+
+* added new module for multi-file access of NETCDF3 and NETCDF4_CLASSIC
+  files (MFDataset). Based on CDFMF from pycdf.
+
+* implement negative strides in variable slicing
+  (feature missing from Scientific.IO.NetCDF). Now variables support
+  full python extended slicing syntax.
+
+20060925 - version 0.5.1
+========================
+* on 64-bit systems integer attributes in netCDF4_classic failed, since there
+  is no 64-bit integer data type. Fixed by downcasting to 32-bit integer.
+
+20060920 - version 0.5
+======================
+* Compound type support! (members must be fixed data primitive types -
+  no user-defined types or NC_STRING variables allowed).  Attributes
+  are still restricted to primitive data types (no vlen or compound
+  type attributes).
+
+* Assigning single values to a slice now does the Right Thing, i.e.
+  >>> data[:] = 1
+  fills all the elements with 1 (instead of raising an IndexError).
+
+* Tested with numpy 1.0b5, netcdf-4.0-alpha16, HDF5 1.7.52 alpha.
+
+* Added renameDimension and renameVariable methods to Dataset and Group classes.
+
+* netCDF attributes can be deleted using python del (i.e. 'del dset.foo').
+
+* Moved examples from test and test_classic to examples and
+  examples_classic directories.
+
+* Added proper unit tests (in test and test_classic directories).
+
+* NULL characters are removed from text attributes.
+
+* Variable _FillValue can be set using new keyword argument 'fill_value'
+  to createVariable Dataset and Group method.
+
+* docstrings now formatted with epydoc (http://epydoc.sf.net).
+
+* improved Scientific.IO.NetCDF compatibility for netCDF4_classic
+  (typecode method, ability to use old Numeric typecodes).
+
+* zlib=False or complevel=0 disables shuffle filter in createVariable.
+
+* subversion repository hosted on Google projects
+  (http://code.google.com/p/netcdf4-python/).
+
+* examples_classic/bench2.py is a performance comparison with
+  Scientific.IO.NetCDF (the numpy version provided by pynetcdf).
+
+* __dict__ attribute of Dataset, Group or Variable provides a python
+  dictionary with all netCDF attribute name/value pairs (just like
+  Scientific.IO.NetCDF).
+
+20060710 - version 0.4.5
+========================
+* fixed to work with recent svn versions of numpy
+
+* Now requires at least numpy 0.9.8.
+
+* Raise a AttributeError if user tries to rebind a private attribute
+  (like 'variables', 'dimensions' or 'dtype').
+
+20060629 - version 0.4.4
+========================
+* fixed to work with netcdf-4.0-alpha14.
+
+* automatically cast _FillValue attribute to variable type, to
+  avoid surprising error message.
+
+20060320 - version 0.4.3
+========================
+updated netcdftime module yet again
+added 'all_leap'/'366_day' and '360_day' calendars.
+netCDFTime class renamed utime, fwd and inv methods
+renamed date2num and num2date. These methods can now handle
+numpy arrays as well as scalars.
+a 'real' python datetime instance is returned if calendar
+is gregorian, otherwise a 'datetime-like' instance is returned
+(python datetime can't handle funky dates in 'all_leap' and '360_day'
+calendars).
+
+20060316 - version 0.4.2
+========================
+udunits module replaced by pure python version, renamed 'netcdftime'
+No longer requires udunits library. Includes 4 calendars
+('julian','standard'/'gregorian','proleptic_gregorian','noleap'/'365_day').
+Calendar names and their interpretations follow the CF metadata convention.
+
+20060310 - version 0.4.1
+========================
+udunits module included for doing time conversions.
+
+20060306 - version 0.4
+======================
+
+netCDF4_classic module can now write NETCDF3_CLASSIC, NETCDF4_64BIT
+as well as NETCDF4_CLASSIC files.  The file format is given as
+an optional keyword to the Dataset constructor ('NETCDF4_CLASSIC'
+is the default).  Preliminary work on compound types done - but
+awaiting the next alpha of the netCDF 4 library to complete (bugs
+in alpha12 prevent it from working properly if the compound type
+has fields which are arrays).
+
+20060217 - version 0.3.1
+========================
+refactored user-defined data type support - user-defined
+data types are now described by an instance of the class
+UserType.  usertype and usertype_name keyword args
+eliminated from createVariable.
+
+20060214 - version 0.3
+======================
+support for variable length strengths (typecode = 'S') and
+variable-length, or 'ragged' arrays (vlen user-defined datatype).
+Arrays of python objects can be saved as pickled strings with
+datatype = 'S'.
+
+20050128 - version 0.2.5
+========================
+added support for scalar variables (and assignValue, getValue
+Variable methods for Scientific.IO.NetCDF compatibility).
+
+20051123 - version 0.2.4
+========================
+numpy 0.9.4 compatibility
+Changed data type codes from ('d', 'f', 'i', 'h', ...) to
+('f8', 'f4', 'i4', 'i2', ...).
+
+20050110 - version 0.2.3
+========================
+added ellipsis slicing capability
+
+20050106 - version 0.2.2
+========================
+changed scipy_core to numpy.
+
+20051228 - version 0.2.1
+========================
+bugfixes, added 'nc3tonc4' utility to convert netCDF version 3 files
+to NETCDF4_CLASSIC files (with compression).  The converted files
+can be read from netCDF 3 clients that have been re-linked to the netCDF 4
+library. 'chunking' keyword added to createVariable in netCDF4 module.
+
+20051224 - version 0.2
+======================
+Added netCDF4_classic module - which creates files in NETCDF4_CLASSIC
+format.  These files are compatible with netCDF 3 clients which have
+been linked against the netCDF 4 lib.  This module does not use any
+new features of the netCDF 4 API except zlib compression.  Unlike
+any other netCDF 3 python client, it can transparently compress data
+with zlib compression and the HDF5 shuffle filter.
+
+20051222 - version 0.1
+======================
+First release.  Supports groups, multiple unlimited dimensions, zlib
+compression (plus shuffle filter and fletcher32 checksum) and all new
+primitive data types.  No support for user-defined data types yet.
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..fd4193d
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,23 @@
+recursive-include docs *
+recursive-include ports *
+include MANIFEST.in
+include README.md
+include README.macosx
+include COPYING
+include Changelog
+include setup.cfg.template
+include netCDF4.pyx
+include netCDF4_utils.py
+include netCDF4.pxi
+include netCDF4.c
+include utils.pyx
+include constants.pyx
+include examples/*py
+include test/*py
+include utils/nc3tonc4
+include utils/nc4tonc3
+include utils/ncinfo
+include netcdftime/__init__.py
+include netcdftime/_datetime.pyx
+include netcdftime/netcdftime.py
+include netcdftime/_datetime.c
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..b878864
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,20 @@
+Metadata-Version: 1.1
+Name: netCDF4
+Version: 1.1.4.1
+Summary: Provides an object-oriented python interface to the netCDF version 4 library.
+Home-page: http://github.com/Unidata/netcdf4-python
+Author: Jeff Whitaker
+Author-email: jeffrey.s.whitaker at noaa.gov
+License: OSI Approved
+Download-URL: http://python.org/pypi/netCDF4
+Description: netCDF version 4 has many features not found in earlier versions of the library, such as hierarchical groups, zlib compression, multiple unlimited dimensions, and new data types.  It is implemented on top of HDF5.  This module implements most of the new features, and can read and write netCDF files compatible with older versions of the library.  The API is modelled after Scientific.IO.NetCDF, and should be familiar to users of that module.
+        
+        This project has a `Subversion repository <http://code.google.com/p/netcdf4-python/source>`_ where you may access the most up-to-date source.
+Keywords: numpy,netcdf,data,science,network,oceanography,meteorology,climate
+Platform: any
+Classifier: Development Status :: 3 - Alpha
+Classifier: Intended Audience :: Science/Research
+Classifier: License :: OSI Approved
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: System :: Archiving :: Compression
+Classifier: Operating System :: OS Independent
diff --git a/README.macosx b/README.macosx
new file mode 100644
index 0000000..34e443e
--- /dev/null
+++ b/README.macosx
@@ -0,0 +1,18 @@
+netcdf4-python is now available in macports (py-netcdf4 package), so the 
+instructions below are obsolete (unless you want to keep up to date with the 
+latest netcdf4-python and let macports manage the installation).
+
+--------------------
+
+Although netcdf4-python is not yet part of MacPorts (http://www.macports.org), you 
+can use the included Portfile to install it using a local Portfile repository.  
+See ports/README for more details.  Once macports is installed, and your local 
+Portfile repo is set up, all you have to do to install netcdf4-python and it's 
+dependencies is run "sudo port install py27-netcdf4".
+
+This will install netcdf4-python from svn HEAD. To periodically upgrade, just do
+   - sudo port uninstall py27-netcdf4
+   - sudo port install py27-netcdf4 (this will re-download from svn and rebuild)
+
+google "macports local portfile" for more information on creating a local Portfile 
+repository.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..419e8ec
--- /dev/null
+++ b/README.md
@@ -0,0 +1,28 @@
+Python/numpy interface to the netCDF version 4 library.
+
+News
+----
+
+2/19/2015: Version 1.1.4 released. Fixes serious bug in netcdftime that caused errors in num2date and date2num when units contains "seconds since".  Users of 1.1.2 and 1.1.3 should upgrade.  For other changes see https://github.com/Unidata/netcdf4-python/blob/master/Changelog.
+
+Quick Start
+-----------
+
+* clone github repository, or get source tarball (or Windows binary installers) from
+  https://pypi.python.org/pypi/netCDF4.
+
+* make sure numpy (required) and Cython (recommended) are installed and
+  you have python 2.5 or newer.
+
+* make sure HDF5 and netcdf-4 are installed.
+
+* copy setup.cfg.template to setup.cfg, open with a text editor
+  and follow the instructions in the comments for editing.
+
+* run 'python setup.py build, then 'python setup.py install' (with sudo
+  if necessary).
+
+* To run all the tests, execute 'cd test; python run_all.py'.
+
+More detailed documentation is available at docs/index.html, or
+http://unidata.github.io/netcdf4-python.
diff --git a/constants.pyx b/constants.pyx
new file mode 100644
index 0000000..6f2da58
--- /dev/null
+++ b/constants.pyx
@@ -0,0 +1,3 @@
+DEF HAS_RENAME_GRP = 0
+DEF HAS_NC_INQ_PATH = 0
+DEF HAS_NC_INQ_FORMAT_EXTENDED = 0
diff --git a/docs/api-objects.txt b/docs/api-objects.txt
new file mode 100644
index 0000000..c5b8db9
--- /dev/null
+++ b/docs/api-objects.txt
@@ -0,0 +1,272 @@
+netCDF4	netCDF4-module.html
+netCDF4._set_default_format	netCDF4-module.html#_set_default_format
+netCDF4.default_encoding	netCDF4-module.html#default_encoding
+netCDF4.num2date	netCDF4-module.html#num2date
+netCDF4.is_native_big	netCDF4-module.html#is_native_big
+netCDF4._private_atts	netCDF4-module.html#_private_atts
+netCDF4._gethdf5libversion	netCDF4-module.html#_gethdf5libversion
+netCDF4.__has_nc_inq_format_extended__	netCDF4-module.html#__has_nc_inq_format_extended__
+netCDF4.__package__	netCDF4-module.html#__package__
+netCDF4.stringtochar	netCDF4-module.html#stringtochar
+netCDF4.chartostring	netCDF4-module.html#chartostring
+netCDF4.date2index	netCDF4-module.html#date2index
+netCDF4.getlibversion	netCDF4-module.html#getlibversion
+netCDF4.__netcdf4libversion__	netCDF4-module.html#__netcdf4libversion__
+netCDF4.__has_nc_inq_path__	netCDF4-module.html#__has_nc_inq_path__
+netCDF4.date2num	netCDF4-module.html#date2num
+netCDF4.stringtoarr	netCDF4-module.html#stringtoarr
+netCDF4._value	netCDF4-module.html#_value
+netCDF4._nptonctype	netCDF4-module.html#_nptonctype
+netCDF4.gregorian	netCDF4-module.html#gregorian
+netCDF4.is_native_little	netCDF4-module.html#is_native_little
+netCDF4.python3	netCDF4-module.html#python3
+netCDF4._dateparse	netCDF4-module.html#_dateparse
+netCDF4._supportedtypes	netCDF4-module.html#_supportedtypes
+netCDF4.NC_DISKLESS	netCDF4-module.html#NC_DISKLESS
+netCDF4._key	netCDF4-module.html#_key
+netCDF4.default_fillvals	netCDF4-module.html#default_fillvals
+netCDF4._nctonptype	netCDF4-module.html#_nctonptype
+netCDF4.__has_rename_grp__	netCDF4-module.html#__has_rename_grp__
+netCDF4._npversion	netCDF4-module.html#_npversion
+netCDF4.__hdf5libversion__	netCDF4-module.html#__hdf5libversion__
+netCDF4.unicode_error	netCDF4-module.html#unicode_error
+netCDF4.CompoundType	netCDF4.CompoundType-class.html
+netCDF4.CompoundType.__new__	netCDF4.CompoundType-class.html#__new__
+netCDF4.CompoundType.dtype	netCDF4.CompoundType-class.html#dtype
+netCDF4.CompoundType._nc_type	netCDF4.CompoundType-class.html#_nc_type
+netCDF4.CompoundType.__repr__	netCDF4.CompoundType-class.html#__repr__
+netCDF4.CompoundType.__init__	netCDF4.CompoundType-class.html#__init__
+netCDF4.CompoundType.__unicode__	netCDF4.CompoundType-class.html#__unicode__
+netCDF4.CompoundType.name	netCDF4.CompoundType-class.html#name
+netCDF4.Dataset	netCDF4.Dataset-class.html
+netCDF4.Dataset._enddef	netCDF4.Dataset-class.html#_enddef
+netCDF4.Dataset.variables	netCDF4.Dataset-class.html#variables
+netCDF4.Dataset.__getattribute__	netCDF4.Dataset-class.html#__getattribute__
+netCDF4.Dataset.sync	netCDF4.Dataset-class.html#sync
+netCDF4.Dataset.createCompoundType	netCDF4.Dataset-class.html#createCompoundType
+netCDF4.Dataset.set_auto_maskandscale	netCDF4.Dataset-class.html#set_auto_maskandscale
+netCDF4.Dataset.close	netCDF4.Dataset-class.html#close
+netCDF4.Dataset._isopen	netCDF4.Dataset-class.html#_isopen
+netCDF4.Dataset.getncattr	netCDF4.Dataset-class.html#getncattr
+netCDF4.Dataset.__init__	netCDF4.Dataset-class.html#__init__
+netCDF4.Dataset.__setattr__	netCDF4.Dataset-class.html#__setattr__
+netCDF4.Dataset.__new__	netCDF4.Dataset-class.html#__new__
+netCDF4.Dataset.filepath	netCDF4.Dataset-class.html#filepath
+netCDF4.Dataset.createVariable	netCDF4.Dataset-class.html#createVariable
+netCDF4.Dataset.__enter__	netCDF4.Dataset-class.html#__enter__
+netCDF4.Dataset.disk_format	netCDF4.Dataset-class.html#disk_format
+netCDF4.Dataset.__getattr__	netCDF4.Dataset-class.html#__getattr__
+netCDF4.Dataset.set_auto_mask	netCDF4.Dataset-class.html#set_auto_mask
+netCDF4.Dataset.__unicode__	netCDF4.Dataset-class.html#__unicode__
+netCDF4.Dataset._redef	netCDF4.Dataset-class.html#_redef
+netCDF4.Dataset.setncatts	netCDF4.Dataset-class.html#setncatts
+netCDF4.Dataset.setncattr	netCDF4.Dataset-class.html#setncattr
+netCDF4.Dataset.cmptypes	netCDF4.Dataset-class.html#cmptypes
+netCDF4.Dataset.set_fill_off	netCDF4.Dataset-class.html#set_fill_off
+netCDF4.Dataset.renameGroup	netCDF4.Dataset-class.html#renameGroup
+netCDF4.Dataset.vltypes	netCDF4.Dataset-class.html#vltypes
+netCDF4.Dataset.ncattrs	netCDF4.Dataset-class.html#ncattrs
+netCDF4.Dataset.__exit__	netCDF4.Dataset-class.html#__exit__
+netCDF4.Dataset.renameAttribute	netCDF4.Dataset-class.html#renameAttribute
+netCDF4.Dataset.parent	netCDF4.Dataset-class.html#parent
+netCDF4.Dataset.createVLType	netCDF4.Dataset-class.html#createVLType
+netCDF4.Dataset.keepweakref	netCDF4.Dataset-class.html#keepweakref
+netCDF4.Dataset.renameDimension	netCDF4.Dataset-class.html#renameDimension
+netCDF4.Dataset.groups	netCDF4.Dataset-class.html#groups
+netCDF4.Dataset.path	netCDF4.Dataset-class.html#path
+netCDF4.Dataset.delncattr	netCDF4.Dataset-class.html#delncattr
+netCDF4.Dataset.dimensions	netCDF4.Dataset-class.html#dimensions
+netCDF4.Dataset.set_auto_scale	netCDF4.Dataset-class.html#set_auto_scale
+netCDF4.Dataset.file_format	netCDF4.Dataset-class.html#file_format
+netCDF4.Dataset.renameVariable	netCDF4.Dataset-class.html#renameVariable
+netCDF4.Dataset._grpid	netCDF4.Dataset-class.html#_grpid
+netCDF4.Dataset.__delattr__	netCDF4.Dataset-class.html#__delattr__
+netCDF4.Dataset.set_fill_on	netCDF4.Dataset-class.html#set_fill_on
+netCDF4.Dataset.data_model	netCDF4.Dataset-class.html#data_model
+netCDF4.Dataset.__repr__	netCDF4.Dataset-class.html#__repr__
+netCDF4.Dataset.createGroup	netCDF4.Dataset-class.html#createGroup
+netCDF4.Dataset.createDimension	netCDF4.Dataset-class.html#createDimension
+netCDF4.Dimension	netCDF4.Dimension-class.html
+netCDF4.Dimension.isunlimited	netCDF4.Dimension-class.html#isunlimited
+netCDF4.Dimension.__init__	netCDF4.Dimension-class.html#__init__
+netCDF4.Dimension.group	netCDF4.Dimension-class.html#group
+netCDF4.Dimension.__new__	netCDF4.Dimension-class.html#__new__
+netCDF4.Dimension.__len__	netCDF4.Dimension-class.html#__len__
+netCDF4.Dimension._dimid	netCDF4.Dimension-class.html#_dimid
+netCDF4.Dimension.__unicode__	netCDF4.Dimension-class.html#__unicode__
+netCDF4.Dimension._grp	netCDF4.Dimension-class.html#_grp
+netCDF4.Dimension.name	netCDF4.Dimension-class.html#name
+netCDF4.Dimension._data_model	netCDF4.Dimension-class.html#_data_model
+netCDF4.Dimension._grpid	netCDF4.Dimension-class.html#_grpid
+netCDF4.Dimension._name	netCDF4.Dimension-class.html#_name
+netCDF4.Dimension.__repr__	netCDF4.Dimension-class.html#__repr__
+netCDF4.Dimension._getname	netCDF4.Dimension-class.html#_getname
+netCDF4.Group	netCDF4.Group-class.html
+netCDF4.Dataset._enddef	netCDF4.Dataset-class.html#_enddef
+netCDF4.Dataset.renameVariable	netCDF4.Dataset-class.html#renameVariable
+netCDF4.Dataset.variables	netCDF4.Dataset-class.html#variables
+netCDF4.Dataset.__getattribute__	netCDF4.Dataset-class.html#__getattribute__
+netCDF4.Dataset.sync	netCDF4.Dataset-class.html#sync
+netCDF4.Dataset.createCompoundType	netCDF4.Dataset-class.html#createCompoundType
+netCDF4.Dataset.set_auto_maskandscale	netCDF4.Dataset-class.html#set_auto_maskandscale
+netCDF4.Group.close	netCDF4.Group-class.html#close
+netCDF4.Dataset._isopen	netCDF4.Dataset-class.html#_isopen
+netCDF4.Group.__init__	netCDF4.Group-class.html#__init__
+netCDF4.Dataset.__setattr__	netCDF4.Dataset-class.html#__setattr__
+netCDF4.Group.__new__	netCDF4.Group-class.html#__new__
+netCDF4.Dataset.filepath	netCDF4.Dataset-class.html#filepath
+netCDF4.Dataset.createVariable	netCDF4.Dataset-class.html#createVariable
+netCDF4.Dataset.__enter__	netCDF4.Dataset-class.html#__enter__
+netCDF4.Dataset.disk_format	netCDF4.Dataset-class.html#disk_format
+netCDF4.Dataset.file_format	netCDF4.Dataset-class.html#file_format
+netCDF4.Dataset.__getattr__	netCDF4.Dataset-class.html#__getattr__
+netCDF4.Dataset.set_auto_mask	netCDF4.Dataset-class.html#set_auto_mask
+netCDF4.Dataset._redef	netCDF4.Dataset-class.html#_redef
+netCDF4.Dataset.setncatts	netCDF4.Dataset-class.html#setncatts
+netCDF4.Dataset.setncattr	netCDF4.Dataset-class.html#setncattr
+netCDF4.Dataset.set_fill_off	netCDF4.Dataset-class.html#set_fill_off
+netCDF4.Dataset.renameGroup	netCDF4.Dataset-class.html#renameGroup
+netCDF4.Dataset.vltypes	netCDF4.Dataset-class.html#vltypes
+netCDF4.Dataset.ncattrs	netCDF4.Dataset-class.html#ncattrs
+netCDF4.Dataset.__exit__	netCDF4.Dataset-class.html#__exit__
+netCDF4.Dataset.renameAttribute	netCDF4.Dataset-class.html#renameAttribute
+netCDF4.Dataset.parent	netCDF4.Dataset-class.html#parent
+netCDF4.Dataset.delncattr	netCDF4.Dataset-class.html#delncattr
+netCDF4.Dataset.keepweakref	netCDF4.Dataset-class.html#keepweakref
+netCDF4.Dataset.getncattr	netCDF4.Dataset-class.html#getncattr
+netCDF4.Dataset.groups	netCDF4.Dataset-class.html#groups
+netCDF4.Dataset.path	netCDF4.Dataset-class.html#path
+netCDF4.Dataset.__unicode__	netCDF4.Dataset-class.html#__unicode__
+netCDF4.Dataset.dimensions	netCDF4.Dataset-class.html#dimensions
+netCDF4.Group.name	netCDF4.Group-class.html#name
+netCDF4.Dataset.cmptypes	netCDF4.Dataset-class.html#cmptypes
+netCDF4.Dataset.set_auto_scale	netCDF4.Dataset-class.html#set_auto_scale
+netCDF4.Dataset.renameDimension	netCDF4.Dataset-class.html#renameDimension
+netCDF4.Dataset._grpid	netCDF4.Dataset-class.html#_grpid
+netCDF4.Dataset.__delattr__	netCDF4.Dataset-class.html#__delattr__
+netCDF4.Dataset.set_fill_on	netCDF4.Dataset-class.html#set_fill_on
+netCDF4.Dataset.data_model	netCDF4.Dataset-class.html#data_model
+netCDF4.Dataset.__repr__	netCDF4.Dataset-class.html#__repr__
+netCDF4.Dataset.createVLType	netCDF4.Dataset-class.html#createVLType
+netCDF4.Dataset.createGroup	netCDF4.Dataset-class.html#createGroup
+netCDF4.Dataset.createDimension	netCDF4.Dataset-class.html#createDimension
+netCDF4.Group._getname	netCDF4.Group-class.html#_getname
+netCDF4.MFDataset	netCDF4.MFDataset-class.html
+netCDF4.Dataset._enddef	netCDF4.Dataset-class.html#_enddef
+netCDF4.Dataset.renameVariable	netCDF4.Dataset-class.html#renameVariable
+netCDF4.MFDataset.__str__	netCDF4.MFDataset-class.html#__str__
+netCDF4.MFDataset.__getattribute__	netCDF4.MFDataset-class.html#__getattribute__
+netCDF4.Dataset.sync	netCDF4.Dataset-class.html#sync
+netCDF4.Dataset.createCompoundType	netCDF4.Dataset-class.html#createCompoundType
+netCDF4.Dataset.set_auto_maskandscale	netCDF4.Dataset-class.html#set_auto_maskandscale
+netCDF4.MFDataset.close	netCDF4.MFDataset-class.html#close
+netCDF4.Dataset._isopen	netCDF4.Dataset-class.html#_isopen
+netCDF4.MFDataset.__init__	netCDF4.MFDataset-class.html#__init__
+netCDF4.MFDataset.__setattr__	netCDF4.MFDataset-class.html#__setattr__
+netCDF4.Dataset.__new__	netCDF4.Dataset-class.html#__new__
+netCDF4.Dataset.filepath	netCDF4.Dataset-class.html#filepath
+netCDF4.Dataset.createVariable	netCDF4.Dataset-class.html#createVariable
+netCDF4.Dataset.__enter__	netCDF4.Dataset-class.html#__enter__
+netCDF4.Dataset.disk_format	netCDF4.Dataset-class.html#disk_format
+netCDF4.Dataset.file_format	netCDF4.Dataset-class.html#file_format
+netCDF4.Dataset.__getattr__	netCDF4.Dataset-class.html#__getattr__
+netCDF4.Dataset.set_auto_mask	netCDF4.Dataset-class.html#set_auto_mask
+netCDF4.Dataset._redef	netCDF4.Dataset-class.html#_redef
+netCDF4.Dataset.setncatts	netCDF4.Dataset-class.html#setncatts
+netCDF4.Dataset.setncattr	netCDF4.Dataset-class.html#setncattr
+netCDF4.Dataset.set_fill_off	netCDF4.Dataset-class.html#set_fill_off
+netCDF4.Dataset.renameGroup	netCDF4.Dataset-class.html#renameGroup
+netCDF4.Dataset.variables	netCDF4.Dataset-class.html#variables
+netCDF4.Dataset.vltypes	netCDF4.Dataset-class.html#vltypes
+netCDF4.MFDataset.ncattrs	netCDF4.MFDataset-class.html#ncattrs
+netCDF4.Dataset.__exit__	netCDF4.Dataset-class.html#__exit__
+netCDF4.Dataset.renameAttribute	netCDF4.Dataset-class.html#renameAttribute
+netCDF4.Dataset.parent	netCDF4.Dataset-class.html#parent
+netCDF4.Dataset.delncattr	netCDF4.Dataset-class.html#delncattr
+netCDF4.Dataset.keepweakref	netCDF4.Dataset-class.html#keepweakref
+netCDF4.Dataset.getncattr	netCDF4.Dataset-class.html#getncattr
+netCDF4.Dataset.groups	netCDF4.Dataset-class.html#groups
+netCDF4.Dataset.path	netCDF4.Dataset-class.html#path
+netCDF4.Dataset.__unicode__	netCDF4.Dataset-class.html#__unicode__
+netCDF4.Dataset.dimensions	netCDF4.Dataset-class.html#dimensions
+netCDF4.Dataset.cmptypes	netCDF4.Dataset-class.html#cmptypes
+netCDF4.Dataset.set_auto_scale	netCDF4.Dataset-class.html#set_auto_scale
+netCDF4.Dataset.renameDimension	netCDF4.Dataset-class.html#renameDimension
+netCDF4.Dataset._grpid	netCDF4.Dataset-class.html#_grpid
+netCDF4.MFDataset.__qualname__	netCDF4.MFDataset-class.html#__qualname__
+netCDF4.Dataset.__delattr__	netCDF4.Dataset-class.html#__delattr__
+netCDF4.Dataset.set_fill_on	netCDF4.Dataset-class.html#set_fill_on
+netCDF4.Dataset.data_model	netCDF4.Dataset-class.html#data_model
+netCDF4.Dataset.__repr__	netCDF4.Dataset-class.html#__repr__
+netCDF4.Dataset.createVLType	netCDF4.Dataset-class.html#createVLType
+netCDF4.Dataset.createGroup	netCDF4.Dataset-class.html#createGroup
+netCDF4.Dataset.createDimension	netCDF4.Dataset-class.html#createDimension
+netCDF4.MFTime	netCDF4.MFTime-class.html
+netCDF4.MFTime.__init__	netCDF4.MFTime-class.html#__init__
+netCDF4.MFTime.__getitem__	netCDF4.MFTime-class.html#__getitem__
+netCDF4.MFTime.__qualname__	netCDF4.MFTime-class.html#__qualname__
+netCDF4.VLType	netCDF4.VLType-class.html
+netCDF4.VLType.__new__	netCDF4.VLType-class.html#__new__
+netCDF4.VLType.dtype	netCDF4.VLType-class.html#dtype
+netCDF4.VLType._nc_type	netCDF4.VLType-class.html#_nc_type
+netCDF4.VLType.__repr__	netCDF4.VLType-class.html#__repr__
+netCDF4.VLType.__init__	netCDF4.VLType-class.html#__init__
+netCDF4.VLType.__unicode__	netCDF4.VLType-class.html#__unicode__
+netCDF4.VLType.name	netCDF4.VLType-class.html#name
+netCDF4.Variable	netCDF4.Variable-class.html
+netCDF4.Variable.ndim	netCDF4.Variable-class.html#ndim
+netCDF4.Variable.dtype	netCDF4.Variable-class.html#dtype
+netCDF4.Variable.__getattribute__	netCDF4.Variable-class.html#__getattribute__
+netCDF4.Variable._grpid	netCDF4.Variable-class.html#_grpid
+netCDF4.Variable.shape	netCDF4.Variable-class.html#shape
+netCDF4.Variable.set_auto_maskandscale	netCDF4.Variable-class.html#set_auto_maskandscale
+netCDF4.Variable.filters	netCDF4.Variable-class.html#filters
+netCDF4.Variable._toma	netCDF4.Variable-class.html#_toma
+netCDF4.Variable.getValue	netCDF4.Variable-class.html#getValue
+netCDF4.Variable.__init__	netCDF4.Variable-class.html#__init__
+netCDF4.Variable.size	netCDF4.Variable-class.html#size
+netCDF4.Variable.assignValue	netCDF4.Variable-class.html#assignValue
+netCDF4.Variable.__setattr__	netCDF4.Variable-class.html#__setattr__
+netCDF4.Variable.scale	netCDF4.Variable-class.html#scale
+netCDF4.Variable.group	netCDF4.Variable-class.html#group
+netCDF4.Variable.__new__	netCDF4.Variable-class.html#__new__
+netCDF4.Variable._iscompound	netCDF4.Variable-class.html#_iscompound
+netCDF4.Variable.__array__	netCDF4.Variable-class.html#__array__
+netCDF4.Variable.__getattr__	netCDF4.Variable-class.html#__getattr__
+netCDF4.Variable.name	netCDF4.Variable-class.html#name
+netCDF4.Variable.set_auto_mask	netCDF4.Variable-class.html#set_auto_mask
+netCDF4.Variable.setncatts	netCDF4.Variable-class.html#setncatts
+netCDF4.Variable.setncattr	netCDF4.Variable-class.html#setncattr
+netCDF4.Variable.__len__	netCDF4.Variable-class.html#__len__
+netCDF4.Variable._varid	netCDF4.Variable-class.html#_varid
+netCDF4.Variable.ncattrs	netCDF4.Variable-class.html#ncattrs
+netCDF4.Variable.get_var_chunk_cache	netCDF4.Variable-class.html#get_var_chunk_cache
+netCDF4.Variable.set_var_chunk_cache	netCDF4.Variable-class.html#set_var_chunk_cache
+netCDF4.Variable.renameAttribute	netCDF4.Variable-class.html#renameAttribute
+netCDF4.Variable.__getitem__	netCDF4.Variable-class.html#__getitem__
+netCDF4.Variable._assign_vlen	netCDF4.Variable-class.html#_assign_vlen
+netCDF4.Variable.chunking	netCDF4.Variable-class.html#chunking
+netCDF4.Variable.delncattr	netCDF4.Variable-class.html#delncattr
+netCDF4.Variable.least_significant_digit	netCDF4.Variable-class.html#least_significant_digit
+netCDF4.Variable._get	netCDF4.Variable-class.html#_get
+netCDF4.Variable._vltype	netCDF4.Variable-class.html#_vltype
+netCDF4.Variable.__unicode__	netCDF4.Variable-class.html#__unicode__
+netCDF4.Variable.dimensions	netCDF4.Variable-class.html#dimensions
+netCDF4.Variable._grp	netCDF4.Variable-class.html#_grp
+netCDF4.Variable.__delitem__	netCDF4.Variable-class.html#__delitem__
+netCDF4.Variable._cmptype	netCDF4.Variable-class.html#_cmptype
+netCDF4.Variable._put	netCDF4.Variable-class.html#_put
+netCDF4.Variable.getncattr	netCDF4.Variable-class.html#getncattr
+netCDF4.Variable.datatype	netCDF4.Variable-class.html#datatype
+netCDF4.Variable.set_auto_scale	netCDF4.Variable-class.html#set_auto_scale
+netCDF4.Variable.mask	netCDF4.Variable-class.html#mask
+netCDF4.Variable.__setitem__	netCDF4.Variable-class.html#__setitem__
+netCDF4.Variable._name	netCDF4.Variable-class.html#_name
+netCDF4.Variable.__delattr__	netCDF4.Variable-class.html#__delattr__
+netCDF4.Variable._getdims	netCDF4.Variable-class.html#_getdims
+netCDF4.Variable.__repr__	netCDF4.Variable-class.html#__repr__
+netCDF4.Variable.endian	netCDF4.Variable-class.html#endian
+netCDF4.Variable._nunlimdim	netCDF4.Variable-class.html#_nunlimdim
+netCDF4.Variable._isprimitive	netCDF4.Variable-class.html#_isprimitive
+netCDF4.Variable._getname	netCDF4.Variable-class.html#_getname
+netCDF4.Variable._isvlen	netCDF4.Variable-class.html#_isvlen
diff --git a/docs/class-tree.html b/docs/class-tree.html
new file mode 100644
index 0000000..28d86f2
--- /dev/null
+++ b/docs/class-tree.html
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Class Hierarchy</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th bgcolor="#70b0f0" class="navbar-select"
+          >   Trees   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%"> </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<center><b>
+ [ <a href="module-tree.html">Module Hierarchy</a>
+ | <a href="class-tree.html">Class Hierarchy</a> ]
+</b></center><br />
+<h1 class="epydoc">Class Hierarchy</h1>
+<ul class="nomargin-top">
+    <li> <strong class="uidlink">object</strong>:
+      <em class="summary">The most base type</em>
+    <ul>
+    <li> <strong class="uidlink"><a href="netCDF4.CompoundType-class.html">netCDF4.CompoundType</a></strong>:
+      <em class="summary">A <a href="netCDF4.CompoundType-class.html" 
+        class="link">CompoundType</a> instance is used to describe a 
+        compound data type.</em>
+    </li>
+    <li> <strong class="uidlink"><a href="netCDF4.Dataset-class.html">netCDF4.Dataset</a></strong>:
+      <em class="summary">Dataset(self, filename, mode="r", clobber=True, 
+        diskless=False, persist=False, keepweakref=False, format='NETCDF4')</em>
+    <ul>
+    <li> <strong class="uidlink"><a href="netCDF4.Group-class.html">netCDF4.Group</a></strong>:
+      <em class="summary">Group(self, parent, name)</em>
+    </li>
+    <li> <strong class="uidlink"><a href="netCDF4.MFDataset-class.html">netCDF4.MFDataset</a></strong>:
+      <em class="summary">MFDataset(self, files, check=False, aggdim=None, exclude=[])</em>
+    </li>
+    </ul>
+    </li>
+    <li> <strong class="uidlink"><a href="netCDF4.Dimension-class.html">netCDF4.Dimension</a></strong>:
+      <em class="summary">Dimension(self, group, name, size=None)</em>
+    </li>
+    <li> <strong class="uidlink"><a href="netCDF4.VLType-class.html">netCDF4.VLType</a></strong>:
+      <em class="summary">A <a href="netCDF4.VLType-class.html" class="link">VLType</a> 
+        instance is used to describe a variable length (VLEN) data type.</em>
+    </li>
+    <li> <strong class="uidlink"><a href="netCDF4.Variable-class.html">netCDF4.Variable</a></strong>:
+      <em class="summary">Variable(self, group, name, datatype, dimensions=(), zlib=False, 
+        complevel=4, shuffle=True, fletcher32=False, contiguous=False, 
+        chunksizes=None, endian='native', 
+        least_significant_digit=None,fill_value=None)</em>
+    </li>
+    <li> <strong class="uidlink">netCDF4._Variable</strong>
+    <ul>
+    <li> <strong class="uidlink"><a href="netCDF4.MFTime-class.html">netCDF4.MFTime</a></strong>:
+      <em class="summary">MFTime(self, time, units=None)</em>
+    </li>
+    </ul>
+    </li>
+    </ul>
+    </li>
+</ul>
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th bgcolor="#70b0f0" class="navbar-select"
+          >   Trees   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Fri Dec  5 15:19:52 2014
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/crarr.png b/docs/crarr.png
new file mode 100644
index 0000000..26b43c5
Binary files /dev/null and b/docs/crarr.png differ
diff --git a/docs/epydoc.css b/docs/epydoc.css
new file mode 100644
index 0000000..86d4170
--- /dev/null
+++ b/docs/epydoc.css
@@ -0,0 +1,322 @@
+
+
+/* Epydoc CSS Stylesheet
+ *
+ * This stylesheet can be used to customize the appearance of epydoc's
+ * HTML output.
+ *
+ */
+
+/* Default Colors & Styles
+ *   - Set the default foreground & background color with 'body'; and 
+ *     link colors with 'a:link' and 'a:visited'.
+ *   - Use bold for decision list terms.
+ *   - The heading styles defined here are used for headings *within*
+ *     docstring descriptions.  All headings used by epydoc itself use
+ *     either class='epydoc' or class='toc' (CSS styles for both
+ *     defined below).
+ */
+body                        { background: #ffffff; color: #000000; }
+p                           { margin-top: 0.5em; margin-bottom: 0.5em; }
+a:link                      { color: #0000ff; }
+a:visited                   { color: #204080; }
+dt                          { font-weight: bold; }
+h1                          { font-size: +140%; font-style: italic;
+                              font-weight: bold; }
+h2                          { font-size: +125%; font-style: italic;
+                              font-weight: bold; }
+h3                          { font-size: +110%; font-style: italic;
+                              font-weight: normal; }
+code                        { font-size: 100%; }
+/* N.B.: class, not pseudoclass */
+a.link                      { font-family: monospace; }
+ 
+/* Page Header & Footer
+ *   - The standard page header consists of a navigation bar (with
+ *     pointers to standard pages such as 'home' and 'trees'); a
+ *     breadcrumbs list, which can be used to navigate to containing
+ *     classes or modules; options links, to show/hide private
+ *     variables and to show/hide frames; and a page title (using
+ *     <h1>).  The page title may be followed by a link to the
+ *     corresponding source code (using 'span.codelink').
+ *   - The footer consists of a navigation bar, a timestamp, and a
+ *     pointer to epydoc's homepage.
+ */ 
+h1.epydoc                   { margin: 0; font-size: +140%; font-weight: bold; }
+h2.epydoc                   { font-size: +130%; font-weight: bold; }
+h3.epydoc                   { font-size: +115%; font-weight: bold;
+                              margin-top: 0.2em; }
+td h3.epydoc                { font-size: +115%; font-weight: bold;
+                              margin-bottom: 0; }
+table.navbar                { background: #a0c0ff; color: #000000;
+                              border: 2px groove #c0d0d0; }
+table.navbar table          { color: #000000; }
+th.navbar-select            { background: #70b0ff;
+                              color: #000000; } 
+table.navbar a              { text-decoration: none; }  
+table.navbar a:link         { color: #0000ff; }
+table.navbar a:visited      { color: #204080; }
+span.breadcrumbs            { font-size: 85%; font-weight: bold; }
+span.options                { font-size: 70%; }
+span.codelink               { font-size: 85%; }
+td.footer                   { font-size: 85%; }
+
+/* Table Headers
+ *   - Each summary table and details section begins with a 'header'
+ *     row.  This row contains a section title (marked by
+ *     'span.table-header') as well as a show/hide private link
+ *     (marked by 'span.options', defined above).
+ *   - Summary tables that contain user-defined groups mark those
+ *     groups using 'group header' rows.
+ */
+td.table-header             { background: #70b0ff; color: #000000;
+                              border: 1px solid #608090; }
+td.table-header table       { color: #000000; }
+td.table-header table a:link      { color: #0000ff; }
+td.table-header table a:visited   { color: #204080; }
+span.table-header           { font-size: 120%; font-weight: bold; }
+th.group-header             { background: #c0e0f8; color: #000000;
+                              text-align: left; font-style: italic; 
+                              font-size: 115%; 
+                              border: 1px solid #608090; }
+
+/* Summary Tables (functions, variables, etc)
+ *   - Each object is described by a single row of the table with
+ *     two cells.  The left cell gives the object's type, and is
+ *     marked with 'code.summary-type'.  The right cell gives the
+ *     object's name and a summary description.
+ *   - CSS styles for the table's header and group headers are
+ *     defined above, under 'Table Headers'
+ */
+table.summary               { border-collapse: collapse;
+                              background: #e8f0f8; color: #000000;
+                              border: 1px solid #608090;
+                              margin-bottom: 0.5em; }
+td.summary                  { border: 1px solid #608090; }
+code.summary-type           { font-size: 85%; }
+table.summary a:link        { color: #0000ff; }
+table.summary a:visited     { color: #204080; }
+
+
+/* Details Tables (functions, variables, etc)
+ *   - Each object is described in its own div.
+ *   - A single-row summary table w/ table-header is used as
+ *     a header for each details section (CSS style for table-header
+ *     is defined above, under 'Table Headers').
+ */
+table.details               { border-collapse: collapse;
+                              background: #e8f0f8; color: #000000;
+                              border: 1px solid #608090;
+                              margin: .2em 0 0 0; }
+table.details table         { color: #000000; }
+table.details a:link        { color: #0000ff; }
+table.details a:visited     { color: #204080; }
+
+/* Fields */
+dl.fields                   { margin-left: 2em; margin-top: 1em;
+                              margin-bottom: 1em; }
+dl.fields dd ul             { margin-left: 0em; padding-left: 0em; }
+dl.fields dd ul li ul       { margin-left: 2em; padding-left: 0em; }
+div.fields                  { margin-left: 2em; }
+div.fields p                { margin-bottom: 0.5em; }
+
+/* Index tables (identifier index, term index, etc)
+ *   - link-index is used for indices containing lists of links
+ *     (namely, the identifier index & term index).
+ *   - index-where is used in link indices for the text indicating
+ *     the container/source for each link.
+ *   - metadata-index is used for indices containing metadata
+ *     extracted from fields (namely, the bug index & todo index).
+ */
+table.link-index            { border-collapse: collapse;
+                              background: #e8f0f8; color: #000000;
+                              border: 1px solid #608090; }
+td.link-index               { border-width: 0px; }
+table.link-index a:link     { color: #0000ff; }
+table.link-index a:visited  { color: #204080; }
+span.index-where            { font-size: 70%; }
+table.metadata-index        { border-collapse: collapse;
+                              background: #e8f0f8; color: #000000;
+                              border: 1px solid #608090; 
+                              margin: .2em 0 0 0; }
+td.metadata-index           { border-width: 1px; border-style: solid; }
+table.metadata-index a:link { color: #0000ff; }
+table.metadata-index a:visited  { color: #204080; }
+
+/* Function signatures
+ *   - sig* is used for the signature in the details section.
+ *   - .summary-sig* is used for the signature in the summary 
+ *     table, and when listing property accessor functions.
+ * */
+.sig-name                   { color: #006080; }
+.sig-arg                    { color: #008060; }
+.sig-default                { color: #602000; }
+.summary-sig                { font-family: monospace; }
+.summary-sig-name           { color: #006080; font-weight: bold; }
+table.summary a.summary-sig-name:link
+                            { color: #006080; font-weight: bold; }
+table.summary a.summary-sig-name:visited
+                            { color: #006080; font-weight: bold; }
+.summary-sig-arg            { color: #006040; }
+.summary-sig-default        { color: #501800; }
+
+/* Subclass list
+ */
+ul.subclass-list { display: inline; }
+ul.subclass-list li { display: inline; }
+
+/* To render variables, classes etc. like functions */
+table.summary .summary-name { color: #006080; font-weight: bold;
+                              font-family: monospace; }
+table.summary
+     a.summary-name:link    { color: #006080; font-weight: bold;
+                              font-family: monospace; }
+table.summary
+    a.summary-name:visited  { color: #006080; font-weight: bold;
+                              font-family: monospace; }
+
+/* Variable values
+ *   - In the 'variable details' sections, each varaible's value is
+ *     listed in a 'pre.variable' box.  The width of this box is
+ *     restricted to 80 chars; if the value's repr is longer than
+ *     this it will be wrapped, using a backslash marked with
+ *     class 'variable-linewrap'.  If the value's repr is longer
+ *     than 3 lines, the rest will be ellided; and an ellipsis
+ *     marker ('...' marked with 'variable-ellipsis') will be used.
+ *   - If the value is a string, its quote marks will be marked
+ *     with 'variable-quote'.
+ *   - If the variable is a regexp, it is syntax-highlighted using
+ *     the re* CSS classes.
+ */
+pre.variable                { padding: .5em; margin: 0;
+                              background: #dce4ec; color: #000000;
+                              border: 1px solid #708890; }
+.variable-linewrap          { color: #604000; font-weight: bold; }
+.variable-ellipsis          { color: #604000; font-weight: bold; }
+.variable-quote             { color: #604000; font-weight: bold; }
+.variable-group             { color: #008000; font-weight: bold; }
+.variable-op                { color: #604000; font-weight: bold; }
+.variable-string            { color: #006030; }
+.variable-unknown           { color: #a00000; font-weight: bold; }
+.re                         { color: #000000; }
+.re-char                    { color: #006030; }
+.re-op                      { color: #600000; }
+.re-group                   { color: #003060; }
+.re-ref                     { color: #404040; }
+
+/* Base tree
+ *   - Used by class pages to display the base class hierarchy.
+ */
+pre.base-tree               { font-size: 80%; margin: 0; }
+
+/* Frames-based table of contents headers
+ *   - Consists of two frames: one for selecting modules; and
+ *     the other listing the contents of the selected module.
+ *   - h1.toc is used for each frame's heading
+ *   - h2.toc is used for subheadings within each frame.
+ */
+h1.toc                      { text-align: center; font-size: 105%;
+                              margin: 0; font-weight: bold;
+                              padding: 0; }
+h2.toc                      { font-size: 100%; font-weight: bold; 
+                              margin: 0.5em 0 0 -0.3em; }
+
+/* Syntax Highlighting for Source Code
+ *   - doctest examples are displayed in a 'pre.py-doctest' block.
+ *     If the example is in a details table entry, then it will use
+ *     the colors specified by the 'table pre.py-doctest' line.
+ *   - Source code listings are displayed in a 'pre.py-src' block.
+ *     Each line is marked with 'span.py-line' (used to draw a line
+ *     down the left margin, separating the code from the line
+ *     numbers).  Line numbers are displayed with 'span.py-lineno'.
+ *     The expand/collapse block toggle button is displayed with
+ *     'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not
+ *     modify the font size of the text.)
+ *   - If a source code page is opened with an anchor, then the
+ *     corresponding code block will be highlighted.  The code
+ *     block's header is highlighted with 'py-highlight-hdr'; and
+ *     the code block's body is highlighted with 'py-highlight'.
+ *   - The remaining py-* classes are used to perform syntax
+ *     highlighting (py-string for string literals, py-name for names,
+ *     etc.)
+ */
+pre.py-doctest              { padding: .5em; margin: 1em;
+                              background: #e8f0f8; color: #000000;
+                              border: 1px solid #708890; }
+table pre.py-doctest        { background: #dce4ec;
+                              color: #000000; }
+pre.py-src                  { border: 2px solid #000000; 
+                              background: #f0f0f0; color: #000000; }
+.py-line                    { border-left: 2px solid #000000; 
+                              margin-left: .2em; padding-left: .4em; }
+.py-lineno                  { font-style: italic; font-size: 90%;
+                              padding-left: .5em; }
+a.py-toggle                 { text-decoration: none; }
+div.py-highlight-hdr        { border-top: 2px solid #000000;
+                              border-bottom: 2px solid #000000;
+                              background: #d8e8e8; }
+div.py-highlight            { border-bottom: 2px solid #000000;
+                              background: #d0e0e0; }
+.py-prompt                  { color: #005050; font-weight: bold;}
+.py-more                    { color: #005050; font-weight: bold;}
+.py-string                  { color: #006030; }
+.py-comment                 { color: #003060; }
+.py-keyword                 { color: #600000; }
+.py-output                  { color: #404040; }
+.py-name                    { color: #000050; }
+.py-name:link               { color: #000050 !important; }
+.py-name:visited            { color: #000050 !important; }
+.py-number                  { color: #005000; }
+.py-defname                 { color: #000060; font-weight: bold; }
+.py-def-name                { color: #000060; font-weight: bold; }
+.py-base-class              { color: #000060; }
+.py-param                   { color: #000060; }
+.py-docstring               { color: #006030; }
+.py-decorator               { color: #804020; }
+/* Use this if you don't want links to names underlined: */
+/*a.py-name                   { text-decoration: none; }*/
+
+/* Graphs & Diagrams
+ *   - These CSS styles are used for graphs & diagrams generated using
+ *     Graphviz dot.  'img.graph-without-title' is used for bare
+ *     diagrams (to remove the border created by making the image
+ *     clickable).
+ */
+img.graph-without-title     { border: none; }
+img.graph-with-title        { border: 1px solid #000000; }
+span.graph-title            { font-weight: bold; }
+span.graph-caption          { }
+
+/* General-purpose classes
+ *   - 'p.indent-wrapped-lines' defines a paragraph whose first line
+ *     is not indented, but whose subsequent lines are.
+ *   - The 'nomargin-top' class is used to remove the top margin (e.g.
+ *     from lists).  The 'nomargin' class is used to remove both the
+ *     top and bottom margin (but not the left or right margin --
+ *     for lists, that would cause the bullets to disappear.)
+ */
+p.indent-wrapped-lines      { padding: 0 0 0 7em; text-indent: -7em; 
+                              margin: 0; }
+.nomargin-top               { margin-top: 0; }
+.nomargin                   { margin-top: 0; margin-bottom: 0; }
+
+/* HTML Log */
+div.log-block               { padding: 0; margin: .5em 0 .5em 0;
+                              background: #e8f0f8; color: #000000;
+                              border: 1px solid #000000; }
+div.log-error               { padding: .1em .3em .1em .3em; margin: 4px;
+                              background: #ffb0b0; color: #000000;
+                              border: 1px solid #000000; }
+div.log-warning             { padding: .1em .3em .1em .3em; margin: 4px;
+                              background: #ffffb0; color: #000000;
+                              border: 1px solid #000000; }
+div.log-info               { padding: .1em .3em .1em .3em; margin: 4px;
+                              background: #b0ffb0; color: #000000;
+                              border: 1px solid #000000; }
+h2.log-hdr                  { background: #70b0ff; color: #000000;
+                              margin: 0; padding: 0em 0.5em 0em 0.5em;
+                              border-bottom: 1px solid #000000; font-size: 110%; }
+p.log                       { font-weight: bold; margin: .5em 0 .5em 0; }
+tr.opt-changed              { color: #000000; font-weight: bold; }
+tr.opt-default              { color: #606060; }
+pre.log                     { margin: 0; padding: 0; padding-left: 1em; }
diff --git a/docs/epydoc.js b/docs/epydoc.js
new file mode 100644
index 0000000..e787dbc
--- /dev/null
+++ b/docs/epydoc.js
@@ -0,0 +1,293 @@
+function toggle_private() {
+        // Search for any private/public links on this page.  Store
+        // their old text in "cmd," so we will know what action to
+        // take; and change their text to the opposite action.
+        var cmd = "?";
+        var elts = document.getElementsByTagName("a");
+        for(var i=0; i<elts.length; i++) {
+          if (elts[i].className == "privatelink") {
+            cmd = elts[i].innerHTML;
+            elts[i].innerHTML = ((cmd && cmd.substr(0,4)=="show")?
+                                    "hide private":"show private");
+          }
+        }
+        // Update all DIVs containing private objects.
+        var elts = document.getElementsByTagName("div");
+        for(var i=0; i<elts.length; i++) {
+          if (elts[i].className == "private") {
+            elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
+          }
+          else if (elts[i].className == "public") {
+            elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"block":"none");
+          }
+        }
+        // Update all table rows containing private objects.  Note, we
+        // use "" instead of "block" becaue IE & firefox disagree on what
+        // this should be (block vs table-row), and "" just gives the
+        // default for both browsers.
+        var elts = document.getElementsByTagName("tr");
+        for(var i=0; i<elts.length; i++) {
+          if (elts[i].className == "private") {
+            elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"");
+          }
+        }
+        // Update all list items containing private objects.
+        var elts = document.getElementsByTagName("li");
+        for(var i=0; i<elts.length; i++) {
+          if (elts[i].className == "private") {
+            elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?
+                                        "none":"");
+          }
+        }
+        // Update all list items containing private objects.
+        var elts = document.getElementsByTagName("ul");
+        for(var i=0; i<elts.length; i++) {
+          if (elts[i].className == "private") {
+            elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
+          }
+        }
+        // Set a cookie to remember the current option.
+        document.cookie = "EpydocPrivate="+cmd;
+      }
+function show_private() {
+        var elts = document.getElementsByTagName("a");
+        for(var i=0; i<elts.length; i++) {
+          if (elts[i].className == "privatelink") {
+            cmd = elts[i].innerHTML;
+            if (cmd && cmd.substr(0,4)=="show")
+                toggle_private();
+          }
+        }
+      }
+function getCookie(name) {
+        var dc = document.cookie;
+        var prefix = name + "=";
+        var begin = dc.indexOf("; " + prefix);
+        if (begin == -1) {
+          begin = dc.indexOf(prefix);
+          if (begin != 0) return null;
+        } else
+        { begin += 2; }
+        var end = document.cookie.indexOf(";", begin);
+        if (end == -1)
+        { end = dc.length; }
+        return unescape(dc.substring(begin + prefix.length, end));
+      }
+function setFrame(url1, url2) {
+          parent.frames[1].location.href = url1;
+          parent.frames[2].location.href = url2;
+      }
+function checkCookie() {
+        var cmd=getCookie("EpydocPrivate");
+        if (cmd && cmd.substr(0,4)!="show" && location.href.indexOf("#_") < 0)
+            toggle_private();
+      }
+function toggleCallGraph(id) {
+        var elt = document.getElementById(id);
+        if (elt.style.display == "none")
+            elt.style.display = "block";
+        else
+            elt.style.display = "none";
+      }
+function expand(id) {
+  var elt = document.getElementById(id+"-expanded");
+  if (elt) elt.style.display = "block";
+  var elt = document.getElementById(id+"-expanded-linenums");
+  if (elt) elt.style.display = "block";
+  var elt = document.getElementById(id+"-collapsed");
+  if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
+  var elt = document.getElementById(id+"-collapsed-linenums");
+  if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
+  var elt = document.getElementById(id+"-toggle");
+  if (elt) { elt.innerHTML = "-"; }
+}
+
+function collapse(id) {
+  var elt = document.getElementById(id+"-expanded");
+  if (elt) elt.style.display = "none";
+  var elt = document.getElementById(id+"-expanded-linenums");
+  if (elt) elt.style.display = "none";
+  var elt = document.getElementById(id+"-collapsed-linenums");
+  if (elt) { elt.innerHTML = "<br />"; elt.style.display="block"; }
+  var elt = document.getElementById(id+"-toggle");
+  if (elt) { elt.innerHTML = "+"; }
+  var elt = document.getElementById(id+"-collapsed");
+  if (elt) {
+    elt.style.display = "block";
+    
+    var indent = elt.getAttribute("indent");
+    var pad = elt.getAttribute("pad");
+    var s = "<tt class='py-lineno'>";
+    for (var i=0; i<pad.length; i++) { s += " " }
+    s += "</tt>";
+    s += "  <tt class='py-line'>";
+    for (var i=0; i<indent.length; i++) { s += " " }
+    s += "<a href='#' onclick='expand(\"" + id;
+    s += "\");return false'>...</a></tt><br />";
+    elt.innerHTML = s;
+  }
+}
+
+function toggle(id) {
+  elt = document.getElementById(id+"-toggle");
+  if (elt.innerHTML == "-")
+      collapse(id); 
+  else
+      expand(id);
+  return false;
+}
+
+function highlight(id) {
+  var elt = document.getElementById(id+"-def");
+  if (elt) elt.className = "py-highlight-hdr";
+  var elt = document.getElementById(id+"-expanded");
+  if (elt) elt.className = "py-highlight";
+  var elt = document.getElementById(id+"-collapsed");
+  if (elt) elt.className = "py-highlight";
+}
+
+function num_lines(s) {
+  var n = 1;
+  var pos = s.indexOf("\n");
+  while ( pos > 0) {
+    n += 1;
+    pos = s.indexOf("\n", pos+1);
+  }
+  return n;
+}
+
+// Collapse all blocks that mave more than `min_lines` lines.
+function collapse_all(min_lines) {
+  var elts = document.getElementsByTagName("div");
+  for (var i=0; i<elts.length; i++) {
+    var elt = elts[i];
+    var split = elt.id.indexOf("-");
+    if (split > 0)
+      if (elt.id.substring(split, elt.id.length) == "-expanded")
+        if (num_lines(elt.innerHTML) > min_lines)
+          collapse(elt.id.substring(0, split));
+  }
+}
+
+function expandto(href) {
+  var start = href.indexOf("#")+1;
+  if (start != 0 && start != href.length) {
+    if (href.substring(start, href.length) != "-") {
+      collapse_all(4);
+      pos = href.indexOf(".", start);
+      while (pos != -1) {
+        var id = href.substring(start, pos);
+        expand(id);
+        pos = href.indexOf(".", pos+1);
+      }
+      var id = href.substring(start, href.length);
+      expand(id);
+      highlight(id);
+    }
+  }
+}
+
+function kill_doclink(id) {
+  var parent = document.getElementById(id);
+  parent.removeChild(parent.childNodes.item(0));
+}
+function auto_kill_doclink(ev) {
+  if (!ev) var ev = window.event;
+  if (!this.contains(ev.toElement)) {
+    var parent = document.getElementById(this.parentID);
+    parent.removeChild(parent.childNodes.item(0));
+  }
+}
+
+function doclink(id, name, targets_id) {
+  var elt = document.getElementById(id);
+
+  // If we already opened the box, then destroy it.
+  // (This case should never occur, but leave it in just in case.)
+  if (elt.childNodes.length > 1) {
+    elt.removeChild(elt.childNodes.item(0));
+  }
+  else {
+    // The outer box: relative + inline positioning.
+    var box1 = document.createElement("div");
+    box1.style.position = "relative";
+    box1.style.display = "inline";
+    box1.style.top = 0;
+    box1.style.left = 0;
+  
+    // A shadow for fun
+    var shadow = document.createElement("div");
+    shadow.style.position = "absolute";
+    shadow.style.left = "-1.3em";
+    shadow.style.top = "-1.3em";
+    shadow.style.background = "#404040";
+    
+    // The inner box: absolute positioning.
+    var box2 = document.createElement("div");
+    box2.style.position = "relative";
+    box2.style.border = "1px solid #a0a0a0";
+    box2.style.left = "-.2em";
+    box2.style.top = "-.2em";
+    box2.style.background = "white";
+    box2.style.padding = ".3em .4em .3em .4em";
+    box2.style.fontStyle = "normal";
+    box2.onmouseout=auto_kill_doclink;
+    box2.parentID = id;
+
+    // Get the targets
+    var targets_elt = document.getElementById(targets_id);
+    var targets = targets_elt.getAttribute("targets");
+    var links = "";
+    target_list = targets.split(",");
+    for (var i=0; i<target_list.length; i++) {
+        var target = target_list[i].split("=");
+        links += "<li><a href='" + target[1] + 
+               "' style='text-decoration:none'>" +
+               target[0] + "</a></li>";
+    }
+  
+    // Put it all together.
+    elt.insertBefore(box1, elt.childNodes.item(0));
+    //box1.appendChild(box2);
+    box1.appendChild(shadow);
+    shadow.appendChild(box2);
+    box2.innerHTML =
+        "Which <b>"+name+"</b> do you want to see documentation for?" +
+        "<ul style='margin-bottom: 0;'>" +
+        links + 
+        "<li><a href='#' style='text-decoration:none' " +
+        "onclick='kill_doclink(\""+id+"\");return false;'>"+
+        "<i>None of the above</i></a></li></ul>";
+  }
+  return false;
+}
+
+function get_anchor() {
+          var href = location.href;
+          var start = href.indexOf("#")+1;
+          if ((start != 0) && (start != href.length))
+              return href.substring(start, href.length);
+      }
+function redirect_url(dottedName) {
+          // Scan through each element of the "pages" list, and check
+          // if "name" matches with any of them.
+          for (var i=0; i<pages.length; i++) {
+
+              // Each page has the form "<pagename>-m" or "<pagename>-c";
+              // extract the <pagename> portion & compare it to dottedName.
+              var pagename = pages[i].substring(0, pages[i].length-2);
+              if (pagename == dottedName.substring(0,pagename.length)) {
+
+                  // We've found a page that matches `dottedName`;
+                  // construct its URL, using leftover `dottedName`
+                  // content to form an anchor.
+                  var pagetype = pages[i].charAt(pages[i].length-1);
+                  var url = pagename + ((pagetype=="m")?"-module.html":
+                                                        "-class.html");
+                  if (dottedName.length > pagename.length)
+                      url += "#" + dottedName.substring(pagename.length+1,
+                                                        dottedName.length);
+                  return url;
+              }
+          }
+      }
diff --git a/docs/help.html b/docs/help.html
new file mode 100644
index 0000000..f3b828f
--- /dev/null
+++ b/docs/help.html
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Help</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th bgcolor="#70b0f0" class="navbar-select"
+          >   Help   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%"> </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+
+<h1 class="epydoc"> API Documentation </h1>
+
+<p> This document contains the API (Application Programming Interface)
+documentation for this project.  Documentation for the Python
+objects defined by the project is divided into separate pages for each
+package, module, and class.  The API documentation also includes two
+pages containing information about the project as a whole: a trees
+page, and an index page.  </p>
+
+<h2> Object Documentation </h2>
+
+  <p>Each <strong>Package Documentation</strong> page contains: </p>
+  <ul>
+    <li> A description of the package. </li>
+    <li> A list of the modules and sub-packages contained by the
+    package.  </li>
+    <li> A summary of the classes defined by the package. </li>
+    <li> A summary of the functions defined by the package. </li>
+    <li> A summary of the variables defined by the package. </li>
+    <li> A detailed description of each function defined by the
+    package. </li>
+    <li> A detailed description of each variable defined by the
+    package. </li>
+  </ul>
+  
+  <p>Each <strong>Module Documentation</strong> page contains:</p>
+  <ul>
+    <li> A description of the module. </li>
+    <li> A summary of the classes defined by the module. </li>
+    <li> A summary of the functions defined by the module. </li>
+    <li> A summary of the variables defined by the module. </li>
+    <li> A detailed description of each function defined by the
+    module. </li>
+    <li> A detailed description of each variable defined by the
+    module. </li>
+  </ul>
+  
+  <p>Each <strong>Class Documentation</strong> page contains: </p>
+  <ul>
+    <li> A class inheritance diagram. </li>
+    <li> A list of known subclasses. </li>
+    <li> A description of the class. </li>
+    <li> A summary of the methods defined by the class. </li>
+    <li> A summary of the instance variables defined by the class. </li>
+    <li> A summary of the class (static) variables defined by the
+    class. </li> 
+    <li> A detailed description of each method defined by the
+    class. </li>
+    <li> A detailed description of each instance variable defined by the
+    class. </li> 
+    <li> A detailed description of each class (static) variable defined
+    by the class. </li> 
+  </ul>
+
+<h2> Project Documentation </h2>
+
+  <p> The <strong>Trees</strong> page contains the module and class hierarchies: </p>
+  <ul>
+    <li> The <em>module hierarchy</em> lists every package and module, with
+    modules grouped into packages.  At the top level, and within each
+    package, modules and sub-packages are listed alphabetically. </li>
+    <li> The <em>class hierarchy</em> lists every class, grouped by base
+    class.  If a class has more than one base class, then it will be
+    listed under each base class.  At the top level, and under each base
+    class, classes are listed alphabetically. </li>
+  </ul>
+  
+  <p> The <strong>Index</strong> page contains indices of terms and
+  identifiers: </p>
+  <ul>
+    <li> The <em>term index</em> lists every term indexed by any object's
+    documentation.  For each term, the index provides links to each
+    place where the term is indexed. </li>
+    <li> The <em>identifier index</em> lists the (short) name of every package,
+    module, class, method, function, variable, and parameter.  For each
+    identifier, the index provides a short description, and a link to
+    its documentation. </li>
+  </ul>
+
+<h2> The Table of Contents </h2>
+
+<p> The table of contents occupies the two frames on the left side of
+the window.  The upper-left frame displays the <em>project
+contents</em>, and the lower-left frame displays the <em>module
+contents</em>: </p>
+
+<table class="help summary" border="1" cellspacing="0" cellpadding="3">
+  <tr style="height: 30%">
+    <td align="center" style="font-size: small">
+       Project<br />Contents<hr />...</td>
+    <td align="center" style="font-size: small" rowspan="2" width="70%">
+      API<br />Documentation<br />Frame<br /><br /><br />
+    </td>
+  </tr>
+  <tr>
+    <td align="center" style="font-size: small">
+      Module<br />Contents<hr /> <br />...<br /> 
+    </td>
+  </tr>
+</table><br />
+
+<p> The <strong>project contents frame</strong> contains a list of all packages
+and modules that are defined by the project.  Clicking on an entry
+will display its contents in the module contents frame.  Clicking on a
+special entry, labeled "Everything," will display the contents of
+the entire project. </p>
+
+<p> The <strong>module contents frame</strong> contains a list of every
+submodule, class, type, exception, function, and variable defined by a
+module or package.  Clicking on an entry will display its
+documentation in the API documentation frame.  Clicking on the name of
+the module, at the top of the frame, will display the documentation
+for the module itself. </p>
+
+<p> The "<strong>frames</strong>" and "<strong>no frames</strong>" buttons below the top
+navigation bar can be used to control whether the table of contents is
+displayed or not. </p>
+
+<h2> The Navigation Bar </h2>
+
+<p> A navigation bar is located at the top and bottom of every page.
+It indicates what type of page you are currently viewing, and allows
+you to go to related pages.  The following table describes the labels
+on the navigation bar.  Note that not some labels (such as
+[Parent]) are not displayed on all pages. </p>
+
+<table class="summary" border="1" cellspacing="0" cellpadding="3" width="100%">
+<tr class="summary">
+  <th>Label</th>
+  <th>Highlighted when...</th>
+  <th>Links to...</th>
+</tr>
+  <tr><td valign="top"><strong>[Parent]</strong></td>
+      <td valign="top"><em>(never highlighted)</em></td>
+      <td valign="top"> the parent of the current package </td></tr>
+  <tr><td valign="top"><strong>[Package]</strong></td>
+      <td valign="top">viewing a package</td>
+      <td valign="top">the package containing the current object
+      </td></tr>
+  <tr><td valign="top"><strong>[Module]</strong></td>
+      <td valign="top">viewing a module</td>
+      <td valign="top">the module containing the current object
+      </td></tr> 
+  <tr><td valign="top"><strong>[Class]</strong></td>
+      <td valign="top">viewing a class </td>
+      <td valign="top">the class containing the current object</td></tr>
+  <tr><td valign="top"><strong>[Trees]</strong></td>
+      <td valign="top">viewing the trees page</td>
+      <td valign="top"> the trees page </td></tr>
+  <tr><td valign="top"><strong>[Index]</strong></td>
+      <td valign="top">viewing the index page</td>
+      <td valign="top"> the index page </td></tr>
+  <tr><td valign="top"><strong>[Help]</strong></td>
+      <td valign="top">viewing the help page</td>
+      <td valign="top"> the help page </td></tr>
+</table>
+
+<p> The "<strong>show private</strong>" and "<strong>hide private</strong>" buttons below
+the top navigation bar can be used to control whether documentation
+for private objects is displayed.  Private objects are usually defined
+as objects whose (short) names begin with a single underscore, but do
+not end with an underscore.  For example, "<code>_x</code>",
+"<code>__pprint</code>", and "<code>epydoc.epytext._tokenize</code>"
+are private objects; but "<code>re.sub</code>",
+"<code>__init__</code>", and "<code>type_</code>" are not.  However,
+if a module defines the "<code>__all__</code>" variable, then its
+contents are used to decide which objects are private. </p>
+
+<p> A timestamp below the bottom navigation bar indicates when each
+page was last updated. </p>
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th bgcolor="#70b0f0" class="navbar-select"
+          >   Help   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Fri Dec  5 15:19:52 2014
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/identifier-index.html b/docs/identifier-index.html
new file mode 100644
index 0000000..cc934a8
--- /dev/null
+++ b/docs/identifier-index.html
@@ -0,0 +1,652 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Identifier Index</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th bgcolor="#70b0f0" class="navbar-select"
+          >   Indices   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%"> </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<table border="0" width="100%">
+<tr valign="bottom"><td>
+<h1 class="epydoc">Identifier Index</h1>
+</td><td>
+[
+ <a href="#A">A</a>
+  B
+ <a href="#C">C</a>
+ <a href="#D">D</a>
+ <a href="#E">E</a>
+ <a href="#F">F</a>
+ <a href="#G">G</a>
+  H
+ <a href="#I">I</a>
+  J
+ <a href="#K">K</a>
+  L
+ <a href="#M">M</a>
+ <a href="#N">N</a>
+  O
+ <a href="#P">P</a>
+  Q
+ <a href="#R">R</a>
+ <a href="#S">S</a>
+  T
+ <a href="#U">U</a>
+ <a href="#V">V</a>
+  W
+  X
+  Y
+  Z
+ <a href="#_">_</a>
+]
+</td></table>
+<table border="0" width="100%">
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="A">A</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#assignValue">assignValue()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"> </td>
+<td width="33%" class="link-index"> </td>
+</tr>
+<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="C">C</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#chartostring">chartostring()</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.MFDataset-class.html#close">close()</a><br />
+<span class="index-where">(in <a href="netCDF4.MFDataset-class.html">MFDataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#createDimension">createDimension()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#chunking">chunking()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#cmptypes">cmptypes</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#createGroup">createGroup()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#close">close()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.CompoundType-class.html">CompoundType</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#createVariable">createVariable()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Group-class.html#close">close()</a><br />
+<span class="index-where">(in <a href="netCDF4.Group-class.html">Group</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#createCompoundType">createCompoundType()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#createVLType">createVLType()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+</tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="D">D</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#data_model">data_model</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#default_fillvals">default_fillvals</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#disk_format">disk_format</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html">Dataset</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#delncattr">delncattr()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.CompoundType-class.html#dtype">dtype</a><br />
+<span class="index-where">(in <a href="netCDF4.CompoundType-class.html">CompoundType</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#datatype">datatype</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#delncattr">delncattr()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.VLType-class.html#dtype">dtype</a><br />
+<span class="index-where">(in <a href="netCDF4.VLType-class.html">VLType</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#date2index">date2index()</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dimension-class.html">Dimension</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#dtype">dtype</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#date2num">date2num()</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#dimensions">dimensions</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"> </td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#default_encoding">default_encoding</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#dimensions">dimensions</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"> </td>
+</tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="E">E</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#endian">endian()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"> </td>
+<td width="33%" class="link-index"> </td>
+</tr>
+<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="F">F</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#file_format">file_format</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#filepath">filepath()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#filters">filters()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+</tr>
+<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="G">G</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#get_var_chunk_cache">get_var_chunk_cache()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#getValue">getValue()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#group">group()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#getlibversion">getlibversion()</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#gregorian">gregorian</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#groups">groups</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#getncattr">getncattr()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Group-class.html">Group</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"> </td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#getncattr">getncattr()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dimension-class.html#group">group()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dimension-class.html">Dimension</a>)</span></td>
+<td width="33%" class="link-index"> </td>
+</tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="I">I</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#is_native_big">is_native_big</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#is_native_little">is_native_little</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dimension-class.html#isunlimited">isunlimited()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dimension-class.html">Dimension</a>)</span></td>
+</tr>
+<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="K">K</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#keepweakref">keepweakref</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"> </td>
+<td width="33%" class="link-index"> </td>
+</tr>
+<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="M">M</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#mask">mask</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.MFDataset-class.html">MFDataset</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.MFTime-class.html">MFTime</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+</tr>
+<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="N">N</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.CompoundType-class.html#name">name</a><br />
+<span class="index-where">(in <a href="netCDF4.CompoundType-class.html">CompoundType</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#name">name</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#ncattrs">ncattrs()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dimension-class.html#name">name</a><br />
+<span class="index-where">(in <a href="netCDF4.Dimension-class.html">Dimension</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#NC_DISKLESS">NC_DISKLESS</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#ndim">ndim</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Group-class.html#name">name</a><br />
+<span class="index-where">(in <a href="netCDF4.Group-class.html">Group</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#ncattrs">ncattrs()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html">netCDF4</a></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.VLType-class.html#name">name</a><br />
+<span class="index-where">(in <a href="netCDF4.VLType-class.html">VLType</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.MFDataset-class.html#ncattrs">ncattrs()</a><br />
+<span class="index-where">(in <a href="netCDF4.MFDataset-class.html">MFDataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#num2date">num2date()</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+</tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="P">P</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#parent">parent</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#path">path</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#python3">python3</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+</tr>
+<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="R">R</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#renameAttribute">renameAttribute()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#renameDimension">renameDimension()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#renameVariable">renameVariable()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#renameAttribute">renameAttribute()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#renameGroup">renameGroup()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"> </td>
+</tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="S">S</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#scale">scale</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#set_fill_off">set_fill_off()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#shape">shape</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#set_auto_mask">set_auto_mask()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#set_fill_on">set_fill_on()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#size">size</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#set_auto_mask">set_auto_mask()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#set_var_chunk_cache">set_var_chunk_cache()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#stringtoarr">stringtoarr()</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#set_auto_maskandscale">set_auto_maskandscale()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#setncattr">setncattr()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#stringtochar">stringtochar()</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#set_auto_maskandscale">set_auto_maskandscale()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#setncattr">setncattr()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#sync">sync()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#set_auto_scale">set_auto_scale()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#setncatts">setncatts()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"> </td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#set_auto_scale">set_auto_scale()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#setncatts">setncatts()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"> </td>
+</tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="U">U</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#unicode_error">unicode_error</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"> </td>
+<td width="33%" class="link-index"> </td>
+</tr>
+<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="V">V</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html">Variable</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.VLType-class.html">VLType</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"> </td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#variables">variables</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#vltypes">vltypes</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"> </td>
+</tr>
+</table>
+</td></tr>
+<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="_">_</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#__array__">__array__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Group-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Group-class.html">Group</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.VLType-class.html#__repr__">__repr__()</a><br />
+<span class="index-where">(in <a href="netCDF4.VLType-class.html">VLType</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#__delattr__">__delattr__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.MFDataset-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in <a href="netCDF4.MFDataset-class.html">MFDataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#__repr__">__repr__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#__delattr__">__delattr__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.MFTime-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in <a href="netCDF4.MFTime-class.html">MFTime</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#__setattr__">__setattr__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#__delitem__">__delitem__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.VLType-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in <a href="netCDF4.VLType-class.html">VLType</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.MFDataset-class.html#__setattr__">__setattr__()</a><br />
+<span class="index-where">(in <a href="netCDF4.MFDataset-class.html">MFDataset</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#__enter__">__enter__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#__setattr__">__setattr__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#__exit__">__exit__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dimension-class.html#__len__">__len__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dimension-class.html">Dimension</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#__setitem__">__setitem__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#__getattr__">__getattr__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#__len__">__len__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.MFDataset-class.html#__str__">__str__()</a><br />
+<span class="index-where">(in <a href="netCDF4.MFDataset-class.html">MFDataset</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#__getattr__">__getattr__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#__netcdf4libversion__">__netcdf4libversion__</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.CompoundType-class.html#__unicode__">__unicode__()</a><br />
+<span class="index-where">(in <a href="netCDF4.CompoundType-class.html">CompoundType</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#__getattribute__">__getattribute__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.CompoundType-class.html#__new__">__new__()</a><br />
+<span class="index-where">(in <a href="netCDF4.CompoundType-class.html">CompoundType</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#__unicode__">__unicode__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.MFDataset-class.html#__getattribute__">__getattribute__()</a><br />
+<span class="index-where">(in <a href="netCDF4.MFDataset-class.html">MFDataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#__new__">__new__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dimension-class.html#__unicode__">__unicode__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dimension-class.html">Dimension</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#__getattribute__">__getattribute__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dimension-class.html#__new__">__new__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dimension-class.html">Dimension</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.VLType-class.html#__unicode__">__unicode__()</a><br />
+<span class="index-where">(in <a href="netCDF4.VLType-class.html">VLType</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.MFTime-class.html#__getitem__">__getitem__()</a><br />
+<span class="index-where">(in <a href="netCDF4.MFTime-class.html">MFTime</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Group-class.html#__new__">__new__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Group-class.html">Group</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#__unicode__">__unicode__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#__getitem__">__getitem__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.VLType-class.html#__new__">__new__()</a><br />
+<span class="index-where">(in <a href="netCDF4.VLType-class.html">VLType</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#_key">_key</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#__has_nc_inq_format_extended__">__has_nc_inq_format_extended__</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Variable-class.html#__new__">__new__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#_nctonptype">_nctonptype</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#__has_nc_inq_path__">__has_nc_inq_path__</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#__package__">__package__</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#_nptonctype">_nptonctype</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#__has_rename_grp__">__has_rename_grp__</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.MFDataset-class.html#__qualname__">__qualname__</a><br />
+<span class="index-where">(in <a href="netCDF4.MFDataset-class.html">MFDataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#_npversion">_npversion</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#__hdf5libversion__">__hdf5libversion__</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.MFTime-class.html#__qualname__">__qualname__</a><br />
+<span class="index-where">(in <a href="netCDF4.MFTime-class.html">MFTime</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#_private_atts">_private_atts</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.CompoundType-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in <a href="netCDF4.CompoundType-class.html">CompoundType</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.CompoundType-class.html#__repr__">__repr__()</a><br />
+<span class="index-where">(in <a href="netCDF4.CompoundType-class.html">CompoundType</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#_supportedtypes">_supportedtypes</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dataset-class.html#__repr__">__repr__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4-module.html#_value">_value</a><br />
+<span class="index-where">(in <a href="netCDF4-module.html">netCDF4</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4.Dimension-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dimension-class.html">Dimension</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4.Dimension-class.html#__repr__">__repr__()</a><br />
+<span class="index-where">(in <a href="netCDF4.Dimension-class.html">Dimension</a>)</span></td>
+<td width="33%" class="link-index"> </td>
+</tr>
+</table>
+</td></tr>
+</table>
+<br /><br /><!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th bgcolor="#70b0f0" class="navbar-select"
+          >   Indices   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Fri Dec  5 15:19:52 2014
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/index.html b/docs/index.html
new file mode 100644
index 0000000..bc76023
--- /dev/null
+++ b/docs/index.html
@@ -0,0 +1,1625 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netCDF4</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th bgcolor="#70b0f0" class="navbar-select"
+          >   Home   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        Module netCDF4
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== MODULE DESCRIPTION ==================== -->
+<h1 class="epydoc">Module netCDF4</h1><p class="nomargin-top"></p>
+<h1 class="heading">Introduction</h1>
+    <p>Python interface to the netCDF version 4 library.  <a 
+    href="http://www.unidata.ucar.edu/software/netcdf/netcdf-4" 
+    target="_top">netCDF version 4</a> has many features not found in 
+    earlier versions of the library and is implemented on top of <a 
+    href="http://www.hdfgroup.org/HDF5" target="_top">HDF5</a>. This module
+    can read and write files in both the new netCDF 4 and the old netCDF 3 
+    format, and can create files that are readable by HDF5 clients. The API
+    modelled after <a 
+    href="http://dirac.cnrs-orleans.fr/plone/software/scientificpython/" 
+    target="_top">Scientific.IO.NetCDF</a>, and should be familiar to users
+    of that module.</p>
+    <p>Most new features of netCDF 4 are implemented, such as multiple 
+    unlimited dimensions, groups and zlib data compression.  All the new 
+    numeric data types (such as 64 bit and unsigned integer types) are 
+    implemented. Compound and variable length (vlen) data types are 
+    supported, but the enum and opaque data types are not. Mixtures of 
+    compound and vlen data types (compound types containing vlens, and 
+    vlens containing compound types) are not supported.</p>
+  <h1 class="heading">Download</h1>
+    <ul>
+      <li>
+        Latest bleeding-edge code from the <a 
+        href="http://github.com/Unidata/netcdf4-python" 
+        target="_top">github repository</a>.
+      </li>
+      <li>
+        Latest <a href="https://pypi.python.org/pypi/netCDF4" 
+        target="_top">releases</a> (source code and windows installers).
+      </li>
+    </ul>
+  <h1 class="heading">Requires</h1>
+    <ul>
+      <li>
+        Python 2.5 or later (python 3 works too).
+      </li>
+      <li>
+        numpy array module <a href="http://numpy.scipy.org" 
+        target="_top">http://numpy.scipy.org</a>, version 1.3.0 or later 
+        (1.5.1 or higher recommended, required if using python 3).
+      </li>
+      <li>
+        <a href="http://cython.org" target="_top">Cython</a> is optional - 
+        if it is installed setup.py will use it to recompile the Cython 
+        source code into C, using conditional compilation to enable 
+        features in the netCDF API that have been added since version 
+        4.1.1.  If Cython is not installed, these features (such as the 
+        ability to rename Group objects) will be disabled to preserve 
+        backward compatibility with older versions of the netCDF library.
+      </li>
+      <li>
+        For python < 2.7, the ordereddict module <a 
+        href="http://python.org/pypi/ordereddict" 
+        target="_top">http://python.org/pypi/ordereddict</a>.
+      </li>
+      <li>
+        The HDF5 C library version 1.8.4-patch1 or higher (1.8.8 or higher 
+        recommended) from <a href="ftp://ftp.hdfgroup.org/HDF5/current/src"
+        target="_top">ftp://ftp.hdfgroup.org/HDF5/current/src</a>. Be sure 
+        to build with '<code>--enable-hl --enable-shared</code>'.
+      </li>
+      <li>
+        <a href="http://curl.haxx.se/libcurl/" target="_top">Libcurl</a>, 
+        if you want <a href="http://opendap.org/" target="_top">OPeNDAP</a>
+        support.
+      </li>
+      <li>
+        <a href="http://www.hdfgroup.org/products/hdf4/" 
+        target="_top">HDF4</a>, if you want to be able to read HDF4 
+        "Scientific Dataset" (SD) files.
+      </li>
+      <li>
+        The netCDF-4 C library from <a 
+        href="ftp://ftp.unidata.ucar.edu/pub/netcdf" 
+        target="_top">ftp://ftp.unidata.ucar.edu/pub/netcdf</a>. Version 
+        4.1.1 or higher is required (4.2 or higher recommended). Be sure to
+        build with '<code>--enable-netcdf-4 --enable-shared</code>', and 
+        set <code>CPPFLAGS="-I $HDF5_DIR/include"</code> and 
+        <code>LDFLAGS="-L $HDF5_DIR/lib"</code>, where 
+        <code>$HDF5_DIR</code> is the directory where HDF5 was installed. 
+        If you want <a href="http://opendap.org/" target="_top">OPeNDAP</a>
+        support, add '<code>--enable-dap</code>'. If you want HDF4 SD 
+        support, add '<code>--enable-hdf4</code>' and add the location of 
+        the HDF4 headers and library to <code>CPPFLAGS</code> and 
+        <code>LDFLAGS</code>.
+      </li>
+    </ul>
+  <h1 class="heading">Install</h1>
+    <ul>
+      <li>
+        install the requisite python modules and C libraries (see above). 
+        It's easiest if all the C libs are built as shared libraries.
+      </li>
+      <li>
+        optionally, set the <code>HDF5_DIR</code> environment variable to 
+        point to where HDF5 is installed (the libs in 
+        <code>$HDF5_DIR/lib</code>, the headers in 
+        <code>$HDF5_DIR/include</code>). If the headers and libs are 
+        installed in different places, you can use <code>HDF5_INCDIR</code>
+        and <code>HDF5_LIBDIR</code> to define the locations of the headers
+        and libraries independently.
+      </li>
+      <li>
+        optionally, set the <code>NETCDF4_DIR</code> (or 
+        <code>NETCDF4_INCDIR</code> and <code>NETCDF4_LIBDIR</code>) 
+        environment variable(s) to point to where the netCDF version 4 
+        library and headers are installed.
+      </li>
+      <li>
+        If the locations of the HDF5 and netCDF libs and headers are not 
+        specified with environment variables, some standard locations will 
+        be searched.
+      </li>
+      <li>
+        if HDF5 was built as a static library  with <a 
+        href="http://www.hdfgroup.org/doc_resource/SZIP/" 
+        target="_top">szip</a> support, you may also need to set the 
+        <code>SZIP_DIR</code> (or <code>SZIP_INCDIR</code> and 
+        <code>SZIP_LIBDIR</code>) environment variable(s) to point to where
+        szip is installed. Note that the netCDF library does not support 
+        creating szip compressed files, but can read szip compressed files 
+        if the HDF5 lib is configured to support szip.
+      </li>
+      <li>
+        if netCDF lib was built as a static library with HDF4 and/or 
+        OpenDAP support, you may also need to set <code>HDF4_DIR</code>, 
+        <code>JPEG_DIR</code> and/or <code>CURL_DIR</code>.
+      </li>
+      <li>
+        Instead of using environment variables to specify the locations of 
+        the required libraries, you can either let setup.py try to 
+        auto-detect their locations, or use the file <code>setup.cfg</code>
+        to specify them.  To use this method, copy the file 
+        <code>setup.cfg.template</code> to <code>setup.cfg</code>, then 
+        open <code>setup.cfg</code> in a text editor and follow the 
+        instructions in the comments for editing.  If you use 
+        <code>setup.cfg</code>, environment variables will be ignored.
+      </li>
+      <li>
+        If you are using netcdf 4.1.2 or higher, instead of setting all 
+        those enviroment variables defining where libs are installed, you 
+        can just set one environment variable, USE_NCCONFIG, to 1.  This 
+        will tell python to run the netcdf nc-config utility to determine 
+        where all the dependencies live.
+      </li>
+      <li>
+        run <code>python setup.py build</code>, then <code>python setup.py 
+        install</code> (as root if necessary).
+      </li>
+      <li>
+        If using environment variables to specify build options, be sure to
+        run 'python setup.py build' *without* using sudo.  sudo does not 
+        pass environment variables. If you run 'setup.py build' first 
+        without sudo, you can run 'setup.py install' with sudo.
+      </li>
+      <li>
+        run the tests in the 'test' directory by running <code>python 
+        run_all.py</code>.
+      </li>
+    </ul>
+  <h1 class="heading">Tutorial</h1>
+    <h2 class="heading">1) Creating/Opening/Closing a netCDF file</h2>
+      <p>To create a netCDF file from python, you simply call the <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      constructor. This is also the method used to open an existing netCDF 
+      file.  If the file is open for write access (<code>w, r+</code> or 
+      <code>a</code>), you may write any type of data including new 
+      dimensions, groups, variables and attributes.  netCDF files come in 
+      several flavors (<code>NETCDF3_CLASSIC, NETCDF3_64BIT, 
+      NETCDF4_CLASSIC</code>, and <code>NETCDF4</code>). The first two 
+      flavors are supported by version 3 of the netCDF library. 
+      <code>NETCDF4_CLASSIC</code> files use the version 4 disk format 
+      (HDF5), but do not use any features not found in the version 3 API. 
+      They can be read by netCDF 3 clients only if they have been relinked 
+      against the netCDF 4 library. They can also be read by HDF5 clients. 
+      <code>NETCDF4</code> files use the version 4 disk format (HDF5) and 
+      use the new features of the version 4 API.  The <code>netCDF4</code> 
+      module can read and write files in any of these formats. When 
+      creating a new file, the format may be specified using the 
+      <code>format</code> keyword in the <code>Dataset</code> constructor.
+      The default format is <code>NETCDF4</code>. To see how a given file 
+      is formatted, you can examine the <code>data_model</code> <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> attribute.
+      Closing the netCDF file is accomplished via the <a 
+      href="netCDF4.Dataset-class.html#close" class="link">close</a> method
+      of the <a href="netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      instance.</p>
+      <p>Here's an example:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">from</span> netCDF4 <span class="py-keyword">import</span> Dataset
+<span class="py-prompt">>>> </span>rootgrp = Dataset(<span class="py-string">'test.nc'</span>, <span class="py-string">'w'</span>, format=<span class="py-string">'NETCDF4'</span>)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> rootgrp.data_model
+<span class="py-output">NETCDF4</span>
+<span class="py-output"></span><span class="py-prompt">>>></span>
+<span class="py-prompt">>>> </span>rootgrp.close()</pre>
+      <p>Remote <a href="http://opendap.org" 
+      target="_top">OPeNDAP</a>-hosted datasets can be accessed for reading
+      over http if a URL is provided to the <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      constructor instead of a filename.  However, this requires that the 
+      netCDF library be built with OPenDAP support, via the 
+      <code>--enable-dap</code> configure option (added in version 
+      4.0.1).</p>
+    <h2 class="heading">2) Groups in a netCDF file</h2>
+      <p>netCDF version 4 added support for organizing data in hierarchical
+      groups, which are analagous to directories in a filesystem. Groups 
+      serve as containers for variables, dimensions and attributes, as well
+      as other groups.  A <code>netCDF4.Dataset</code> defines creates a 
+      special group, called the 'root group', which is similar to the root 
+      directory in a unix filesystem.  To create <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instances, use
+      the <a href="netCDF4.Dataset-class.html#createGroup" 
+      class="link">createGroup</a> method of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance. <a 
+      href="netCDF4.Dataset-class.html#createGroup" 
+      class="link">createGroup</a> takes a single argument, a python string
+      containing the name of the new group. The new <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instances 
+      contained within the root group can be accessed by name using the 
+      <code>groups</code> dictionary attribute of the <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> instance.
+      Only <code>NETCDF4</code> formatted files support Groups, if you try 
+      to create a Group in a netCDF 3 file you will get an error 
+      message.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>rootgrp = Dataset(<span class="py-string">'test.nc'</span>, <span class="py-string">'a'</span>)
+<span class="py-prompt">>>> </span>fcstgrp = rootgrp.createGroup(<span class="py-string">'forecasts'</span>)
+<span class="py-prompt">>>> </span>analgrp = rootgrp.createGroup(<span class="py-string">'analyses'</span>)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> rootgrp.groups
+<span class="py-output">OrderedDict([('forecasts', <netCDF4.Group object at 0x1b4b7b0>),</span>
+<span class="py-output">             ('analyses', <netCDF4.Group object at 0x1b4b970>)])</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Groups can exist within groups in a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a>, just as 
+      directories exist within directories in a unix filesystem. Each <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance has a
+      <code>'groups'</code> attribute dictionary containing all of the 
+      group instances contained within that group. Each <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance also 
+      has a <code>'path'</code> attribute that contains a simulated unix 
+      directory path to that group.</p>
+      <p>Here's an example that shows how to navigate all the groups in a 
+      <a href="netCDF4.Dataset-class.html" class="link">Dataset</a>. The 
+      function <code>walktree</code> is a Python generator that is used to 
+      walk the directory tree. Note that printing the <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> object yields 
+      summary information about it's contents.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>fcstgrp1 = fcstgrp.createGroup(<span class="py-string">'model1'</span>)
+<span class="py-prompt">>>> </span>fcstgrp2 = fcstgrp.createGroup(<span class="py-string">'model2'</span>)
+<span class="py-prompt">>>> </span><span class="py-keyword">def</span> <span class="py-defname">walktree</span>(top):
+<span class="py-prompt">>>> </span>    <span class="py-builtin">values</span> = top.groups.values()
+<span class="py-prompt">>>> </span>    yield <span class="py-builtin">values</span>
+<span class="py-prompt">>>> </span>    <span class="py-keyword">for</span> value <span class="py-keyword">in</span> top.groups.values():
+<span class="py-prompt">>>> </span>        <span class="py-keyword">for</span> children <span class="py-keyword">in</span> walktree(value):
+<span class="py-prompt">>>> </span>            yield children
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> rootgrp
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> children <span class="py-keyword">in</span> walktree(rootgrp):
+<span class="py-prompt">>>> </span>     <span class="py-keyword">for</span> child <span class="py-keyword">in</span> children:
+<span class="py-prompt">>>> </span>         <span class="py-keyword">print</span> child
+<span class="py-output"><type 'netCDF4.Dataset'></span>
+<span class="py-output">root group (NETCDF4 file format):</span>
+<span class="py-output">    dimensions: </span>
+<span class="py-output">    variables: </span>
+<span class="py-output">        groups: forecasts, analyses</span>
+<span class="py-output"><type 'netCDF4.Group'></span>
+<span class="py-output">group /forecasts:</span>
+<span class="py-output">    dimensions:</span>
+<span class="py-output">    variables:</span>
+<span class="py-output">    groups: model1, model2</span>
+<span class="py-output"><type 'netCDF4.Group'></span>
+<span class="py-output">group /analyses:</span>
+<span class="py-output">    dimensions:</span>
+<span class="py-output">    variables:</span>
+<span class="py-output">    groups:</span>
+<span class="py-output"><type 'netCDF4.Group'></span>
+<span class="py-output">group /forecasts/model1:</span>
+<span class="py-output">    dimensions:</span>
+<span class="py-output">    variables:</span>
+<span class="py-output">    groups:</span>
+<span class="py-output"><type 'netCDF4.Group'></span>
+<span class="py-output">group /forecasts/model2:</span>
+<span class="py-output">    dimensions:</span>
+<span class="py-output">    variables:</span>
+<span class="py-output">    groups:</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+    <h2 class="heading">3) Dimensions in a netCDF file</h2>
+      <p>netCDF defines the sizes of all variables in terms of dimensions, 
+      so before any variables can be created the dimensions they use must 
+      be created first. A special case, not often used in practice, is that
+      of a scalar variable, which has no dimensions. A dimension is created
+      using the <a href="netCDF4.Dataset-class.html#createDimension" 
+      class="link">createDimension</a> method of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance. A 
+      Python string is used to set the name of the dimension, and an 
+      integer value is used to set the size. To create an unlimited 
+      dimension (a dimension that can be appended to), the size value is 
+      set to <code>None</code> or 0. In this example, there both the 
+      <code>time</code> and <code>level</code> dimensions are unlimited.  
+      Having more than one unlimited dimension is a new netCDF 4 feature, 
+      in netCDF 3 files there may be only one, and it must be the first 
+      (leftmost) dimension of the variable.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>level = rootgrp.createDimension(<span class="py-string">'level'</span>, None)
+<span class="py-prompt">>>> </span>time = rootgrp.createDimension(<span class="py-string">'time'</span>, None)
+<span class="py-prompt">>>> </span>lat = rootgrp.createDimension(<span class="py-string">'lat'</span>, 73)
+<span class="py-prompt">>>> </span>lon = rootgrp.createDimension(<span class="py-string">'lon'</span>, 144)</pre>
+      <p>All of the <a href="netCDF4.Dimension-class.html" 
+      class="link">Dimension</a> instances are stored in a python 
+      dictionary.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> rootgrp.dimensions
+<span class="py-output">OrderedDict([('level', <netCDF4.Dimension object at 0x1b48030>),</span>
+<span class="py-output">             ('time', <netCDF4.Dimension object at 0x1b481c0>),</span>
+<span class="py-output">             ('lat', <netCDF4.Dimension object at 0x1b480f8>),</span>
+<span class="py-output">             ('lon', <netCDF4.Dimension object at 0x1b48a08>)])</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Calling the python <code>len</code> function with a <a 
+      href="netCDF4.Dimension-class.html" class="link">Dimension</a> 
+      instance returns the current size of that dimension. The <a 
+      href="netCDF4.Dimension-class.html#isunlimited" 
+      class="link">isunlimited</a> method of a <a 
+      href="netCDF4.Dimension-class.html" class="link">Dimension</a> 
+      instance can be used to determine if the dimensions is unlimited, or 
+      appendable.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> len(lon)
+<span class="py-output">144</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> len.is_unlimited()
+<span class="py-output">False</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> time.is_unlimited()
+<span class="py-output">True</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Printing the <a href="netCDF4.Dimension-class.html" 
+      class="link">Dimension</a> object provides useful summary info, 
+      including the name and length of the dimension, and whether it is 
+      unlimited.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> dimobj <span class="py-keyword">in</span> rootgrp.dimensions.values():
+<span class="py-prompt">>>> </span>   <span class="py-keyword">print</span> dimobj
+<span class="py-output"><type 'netCDF4.Dimension'> (unlimited): name = 'level', size = 0</span>
+<span class="py-output"><type 'netCDF4.Dimension'> (unlimited): name = 'time', size = 0</span>
+<span class="py-output"><type 'netCDF4.Dimension'>: name = 'lat', size = 73</span>
+<span class="py-output"><type 'netCDF4.Dimension'>: name = 'lon', size = 144</span>
+<span class="py-output"><type 'netCDF4.Dimension'> (unlimited): name = 'time', size = 0</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p><a href="netCDF4.Dimension-class.html" class="link">Dimension</a> 
+      names can be changed using the <a 
+      href="netCDF4.Dataset-class.html#renameDimension" 
+      class="link">renameDimension</a> method of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance.</p>
+    <h2 class="heading">4) Variables in a netCDF file</h2>
+      <p>netCDF variables behave much like python multidimensional array 
+      objects supplied by the <a href="http://numpy.scipy.org" 
+      target="_top">numpy module</a>. However, unlike numpy arrays, netCDF4
+      variables can be appended to along one or more 'unlimited' 
+      dimensions. To create a netCDF variable, use the <a 
+      href="netCDF4.Dataset-class.html#createVariable" 
+      class="link">createVariable</a> method of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance. The 
+      <a href="netCDF4.Dataset-class.html#createVariable" 
+      class="link">createVariable</a> method has two mandatory arguments, 
+      the variable name (a Python string), and the variable datatype. The 
+      variable's dimensions are given by a tuple containing the dimension 
+      names (defined previously with <a 
+      href="netCDF4.Dataset-class.html#createDimension" 
+      class="link">createDimension</a>). To create a scalar variable, 
+      simply leave out the dimensions keyword. The variable primitive 
+      datatypes correspond to the dtype attribute of a numpy array. You can
+      specify the datatype as a numpy dtype object, or anything that can be
+      converted to a numpy dtype object.  Valid datatype specifiers 
+      include: <code>'f4'</code> (32-bit floating point), <code>'f8'</code>
+      (64-bit floating point), <code>'i4'</code> (32-bit signed integer), 
+      <code>'i2'</code> (16-bit signed integer), <code>'i8'</code> (64-bit 
+      singed integer), <code>'i1'</code> (8-bit signed integer), 
+      <code>'u1'</code> (8-bit unsigned integer), <code>'u2'</code> (16-bit
+      unsigned integer), <code>'u4'</code> (32-bit unsigned integer), 
+      <code>'u8'</code> (64-bit unsigned integer), or <code>'S1'</code> 
+      (single-character string).  The old Numeric single-character 
+      typecodes (<code>'f'</code>,<code>'d'</code>,<code>'h'</code>, 
+      <code>'s'</code>,<code>'b'</code>,<code>'B'</code>,<code>'c'</code>,<code>'i'</code>,<code>'l'</code>),
+      corresponding to 
+      (<code>'f4'</code>,<code>'f8'</code>,<code>'i2'</code>,<code>'i2'</code>,<code>'i1'</code>,<code>'i1'</code>,<code>'S1'</code>,<code>'i4'</code>,<code>'i4'</code>),
+      will also work. The unsigned integer types and the 64-bit integer 
+      type can only be used if the file format is <code>NETCDF4</code>.</p>
+      <p>The dimensions themselves are usually also defined as variables, 
+      called coordinate variables. The <a 
+      href="netCDF4.Dataset-class.html#createVariable" 
+      class="link">createVariable</a> method returns an instance of the <a 
+      href="netCDF4.Variable-class.html" class="link">Variable</a> class 
+      whose methods can be used later to access and set variable data and 
+      attributes.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>times = rootgrp.createVariable(<span class="py-string">'time'</span>,<span class="py-string">'f8'</span>,(<span class="py-string">'time'</span>,))
+<span class="py-prompt">>>> </span>levels = rootgrp.createVariable(<span class="py-string">'level'</span>,<span class="py-string">'i4'</span>,(<span class="py-string">'level'</span>,))
+<span class="py-prompt">>>> </span>latitudes = rootgrp.createVariable(<span class="py-string">'latitude'</span>,<span class="py-string">'f4'</span>,(<span class="py-string">'lat'</span>,))
+<span class="py-prompt">>>> </span>longitudes = rootgrp.createVariable(<span class="py-string">'longitude'</span>,<span class="py-string">'f4'</span>,(<span class="py-string">'lon'</span>,))
+<span class="py-prompt">>>> </span><span class="py-comment"># two dimensions unlimited.</span>
+<span class="py-prompt">>>> </span>temp = rootgrp.createVariable(<span class="py-string">'temp'</span>,<span class="py-string">'f4'</span>,(<span class="py-string">'time'</span>,<span class="py-string">'level'</span>,<span class="py-string">'lat'</span>,<span class="py-string">'lon'</span>,))</pre>
+      <p>All of the variables in the <a href="netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> or <a href="netCDF4.Group-class.html" 
+      class="link">Group</a> are stored in a Python dictionary, in the same
+      way as the dimensions:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> rootgrp.variables
+<span class="py-output">OrderedDict([('time', <netCDF4.Variable object at 0x1b4ba70>),</span>
+<span class="py-output">             ('level', <netCDF4.Variable object at 0x1b4bab0>), </span>
+<span class="py-output">             ('latitude', <netCDF4.Variable object at 0x1b4baf0>),</span>
+<span class="py-output">             ('longitude', <netCDF4.Variable object at 0x1b4bb30>),</span>
+<span class="py-output">             ('temp', <netCDF4.Variable object at 0x1b4bb70>)])</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>To get summary info on a <a href="netCDF4.Variable-class.html" 
+      class="link">Variable</a> instance in an interactive session, just 
+      print it.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> rootgrp.variables[<span class="py-string">'temp'</span>]
+<span class="py-output"><type 'netCDF4.Variable'></span>
+<span class="py-output">float32 temp(time, level, lat, lon)</span>
+<span class="py-output">    least_significant_digit: 3</span>
+<span class="py-output">    units: K</span>
+<span class="py-output">unlimited dimensions: time, level</span>
+<span class="py-output">current shape = (0, 0, 73, 144)</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p><a href="netCDF4.Variable-class.html" class="link">Variable</a> 
+      names can be changed using the <a 
+      href="netCDF4.Dataset-class.html#renameVariable" 
+      class="link">renameVariable</a> method of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      instance.</p>
+    <h2 class="heading">5) Attributes in a netCDF file</h2>
+      <p>There are two types of attributes in a netCDF file, global and 
+      variable. Global attributes provide information about a group, or the
+      entire dataset, as a whole. <a href="netCDF4.Variable-class.html" 
+      class="link">Variable</a> attributes provide information about one of
+      the variables in a group. Global attributes are set by assigning 
+      values to <a href="netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> or <a href="netCDF4.Group-class.html" 
+      class="link">Group</a> instance variables. <a 
+      href="netCDF4.Variable-class.html" class="link">Variable</a> 
+      attributes are set by assigning values to <a 
+      href="netCDF4.Variable-class.html" class="link">Variable</a> 
+      instances variables. Attributes can be strings, numbers or sequences.
+      Returning to our example,</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">import</span> time
+<span class="py-prompt">>>> </span>rootgrp.description = <span class="py-string">'bogus example script'</span>
+<span class="py-prompt">>>> </span>rootgrp.history = <span class="py-string">'Created '</span> + time.ctime(time.time())
+<span class="py-prompt">>>> </span>rootgrp.source = <span class="py-string">'netCDF4 python module tutorial'</span>
+<span class="py-prompt">>>> </span>latitudes.units = <span class="py-string">'degrees north'</span>
+<span class="py-prompt">>>> </span>longitudes.units = <span class="py-string">'degrees east'</span>
+<span class="py-prompt">>>> </span>levels.units = <span class="py-string">'hPa'</span>
+<span class="py-prompt">>>> </span>temp.units = <span class="py-string">'K'</span>
+<span class="py-prompt">>>> </span>times.units = <span class="py-string">'hours since 0001-01-01 00:00:00.0'</span>
+<span class="py-prompt">>>> </span>times.calendar = <span class="py-string">'gregorian'</span></pre>
+      <p>The <a href="netCDF4.Dataset-class.html#ncattrs" 
+      class="link">ncattrs</a> method of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a>, <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> or <a 
+      href="netCDF4.Variable-class.html" class="link">Variable</a> instance
+      can be used to retrieve the names of all the netCDF attributes. This 
+      method is provided as a convenience, since using the built-in 
+      <code>dir</code> Python function will return a bunch of private 
+      methods and attributes that cannot (or should not) be modified by the
+      user.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> name <span class="py-keyword">in</span> rootgrp.ncattrs():
+<span class="py-prompt">>>> </span>    <span class="py-keyword">print</span> <span class="py-string">'Global attr'</span>, name, <span class="py-string">'='</span>, getattr(rootgrp,name)
+<span class="py-output">Global attr description = bogus example script</span>
+<span class="py-output">Global attr history = Created Mon Nov  7 10.30:56 2005</span>
+<span class="py-output">Global attr source = netCDF4 python module tutorial</span></pre>
+      <p>The <code>__dict__</code> attribute of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a>, <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> or <a 
+      href="netCDF4.Variable-class.html" class="link">Variable</a> instance
+      provides all the netCDF attribute name/value pairs in a python 
+      dictionary:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> rootgrp.__dict__
+<span class="py-output">OrderedDict([(u'description', u'bogus example script'),</span>
+<span class="py-output">             (u'history', u'Created Thu Mar  3 19:30:33 2011'), </span>
+<span class="py-output">             (u'source', u'netCDF4 python module tutorial')])</span></pre>
+      <p>Attributes can be deleted from a netCDF <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a>, <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> or <a 
+      href="netCDF4.Variable-class.html" class="link">Variable</a> using 
+      the python <code>del</code> statement (i.e. <code>del grp.foo</code> 
+      removes the attribute <code>foo</code> the the group 
+      <code>grp</code>).</p>
+    <h2 class="heading">6) Writing data to and retrieving data from a netCDF variable</h2>
+      <p>Now that you have a netCDF <a href="netCDF4.Variable-class.html" 
+      class="link">Variable</a> instance, how do you put data into it? You 
+      can just treat it like an array and assign data to a slice.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">import</span> numpy 
+<span class="py-prompt">>>> </span>lats =  numpy.arange(-90,91,2.5)
+<span class="py-prompt">>>> </span>lons =  numpy.arange(-180,180,2.5)
+<span class="py-prompt">>>> </span>latitudes[:] = lats
+<span class="py-prompt">>>> </span>longitudes[:] = lons
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'latitudes =\n'</span>,latitudes[:]
+<span class="py-output">latitudes =</span>
+<span class="py-output">[-90.  -87.5 -85.  -82.5 -80.  -77.5 -75.  -72.5 -70.  -67.5 -65.  -62.5</span>
+<span class="py-output"> -60.  -57.5 -55.  -52.5 -50.  -47.5 -45.  -42.5 -40.  -37.5 -35.  -32.5</span>
+<span class="py-output"> -30.  -27.5 -25.  -22.5 -20.  -17.5 -15.  -12.5 -10.   -7.5  -5.   -2.5</span>
+<span class="py-output">   0.    2.5   5.    7.5  10.   12.5  15.   17.5  20.   22.5  25.   27.5</span>
+<span class="py-output">  30.   32.5  35.   37.5  40.   42.5  45.   47.5  50.   52.5  55.   57.5</span>
+<span class="py-output">  60.   62.5  65.   67.5  70.   72.5  75.   77.5  80.   82.5  85.   87.5</span>
+<span class="py-output">  90. ]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Unlike NumPy's array objects, netCDF <a 
+      href="netCDF4.Variable-class.html" class="link">Variable</a> objects 
+      with unlimited dimensions will grow along those dimensions if you 
+      assign data outside the currently defined range of indices.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-comment"># append along two unlimited dimensions by assigning to slice.</span>
+<span class="py-prompt">>>> </span>nlats = len(rootgrp.dimensions[<span class="py-string">'lat'</span>])
+<span class="py-prompt">>>> </span>nlons = len(rootgrp.dimensions[<span class="py-string">'lon'</span>])
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'temp shape before adding data = '</span>,temp.shape
+<span class="py-output">temp shape before adding data =  (0, 0, 73, 144)</span>
+<span class="py-output"></span><span class="py-prompt">>>></span>
+<span class="py-prompt">>>> </span><span class="py-keyword">from</span> numpy.random <span class="py-keyword">import</span> uniform
+<span class="py-prompt">>>> </span>temp[0:5,0:10,:,:] = uniform(size=(5,10,nlats,nlons))
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'temp shape after adding data = '</span>,temp.shape
+<span class="py-output">temp shape after adding data =  (6, 10, 73, 144)</span>
+<span class="py-output"></span><span class="py-prompt">>>></span>
+<span class="py-prompt">>>> </span><span class="py-comment"># levels have grown, but no values yet assigned.</span>
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'levels shape after adding pressure data = '</span>,levels.shape
+<span class="py-output">levels shape after adding pressure data =  (10,)</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Note that the size of the levels variable grows when data is 
+      appended along the <code>level</code> dimension of the variable 
+      <code>temp</code>, even though no data has yet been assigned to 
+      levels.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-comment"># now, assign data to levels dimension variable.</span>
+<span class="py-prompt">>>> </span>levels[:] =  [1000.,850.,700.,500.,300.,250.,200.,150.,100.,50.]</pre>
+      <p>However, that there are some differences between NumPy and netCDF 
+      variable slicing rules. Slices behave as usual, being specified as a 
+      <code>start:stop:step</code> triplet. Using a scalar integer index 
+      <code>i</code> takes the ith element and reduces the rank of the 
+      output array by one. Boolean array and integer sequence indexing 
+      behaves differently for netCDF variables than for numpy arrays.  Only
+      1-d boolean arrays and integer sequences are allowed, and these 
+      indices work independently along each dimension (similar to the way 
+      vector subscripts work in fortran).  This means that</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>temp[0, 0, [0,1,2,3], [0,1,2,3]]</pre>
+      <p>returns an array of shape (4,4) when slicing a netCDF variable, 
+      but for a numpy array it returns an array of shape (4,). Similarly, a
+      netCDF variable of shape <code>(2,3,4,5)</code> indexed with 
+      <code>[0, array([True, False, True]), array([False, True, True, 
+      True]), :]</code> would return a <code>(2, 3, 5)</code> array. In 
+      NumPy, this would raise an error since it would be equivalent to 
+      <code>[0, [0,1], [1,2,3], :]</code>. When slicing with integer 
+      sequences, the indices must be sorted in increasing order and contain
+      no duplicates. While this behaviour may cause some confusion for 
+      those used to NumPy's 'fancy indexing' rules, it provides a very 
+      powerful way to extract data from multidimensional netCDF variables 
+      by using logical operations on the dimension arrays to create 
+      slices.</p>
+      <p>For example,</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>tempdat = temp[::2, [1,3,6], lats>0, lons>0]</pre>
+      <p>will extract time indices 0,2 and 4, pressure levels 850, 500 and 
+      200 hPa, all Northern Hemisphere latitudes and Eastern Hemisphere 
+      longitudes, resulting in a numpy array of shape  (3, 3, 36, 71).</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'shape of fancy temp slice = '</span>,tempdat.shape
+<span class="py-output">shape of fancy temp slice =  (3, 3, 36, 71)</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Time coordinate values pose a special challenge to netCDF users.  
+      Most metadata standards (such as CF and COARDS) specify that time 
+      should be measure relative to a fixed date using a certain calendar, 
+      with units specified like <code>hours since YY:MM:DD hh-mm-ss</code>.
+      These units can be awkward to deal with, without a utility to convert
+      the values to and from calendar dates.  The functione called <a 
+      href="netCDF4-module.html#num2date" class="link">num2date</a> and <a 
+      href="netCDF4-module.html#date2num" class="link">date2num</a> are 
+      provided with this package to do just that.  Here's an example of how
+      they can be used:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-comment"># fill in times.</span>
+<span class="py-prompt">>>> </span><span class="py-keyword">from</span> datetime <span class="py-keyword">import</span> datetime, timedelta
+<span class="py-prompt">>>> </span><span class="py-keyword">from</span> netCDF4 <span class="py-keyword">import</span> num2date, date2num
+<span class="py-prompt">>>> </span>dates = [datetime(2001,3,1)+n*timedelta(hours=12) <span class="py-keyword">for</span> n <span class="py-keyword">in</span> range(temp.shape[0])]
+<span class="py-prompt">>>> </span>times[:] = date2num(dates,units=times.units,calendar=times.calendar)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'time values (in units %s): '</span> % times.units+<span class="py-string">'\n'</span>,times[:]
+<span class="py-output">time values (in units hours since January 1, 0001): </span>
+<span class="py-output">[ 17533056.  17533068.  17533080.  17533092.  17533104.]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span>
+<span class="py-prompt">>>> </span>dates = num2date(times[:],units=times.units,calendar=times.calendar)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'dates corresponding to time values:\n'</span>,dates
+<span class="py-output">dates corresponding to time values:</span>
+<span class="py-output">[2001-03-01 00:00:00 2001-03-01 12:00:00 2001-03-02 00:00:00</span>
+<span class="py-output"> 2001-03-02 12:00:00 2001-03-03 00:00:00]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p><a href="netCDF4-module.html#num2date" class="link">num2date</a> 
+      converts numeric values of time in the specified <code>units</code> 
+      and <code>calendar</code> to datetime objects, and <a 
+      href="netCDF4-module.html#date2num" class="link">date2num</a> does 
+      the reverse. All the calendars currently defined in the <a 
+      href="http://cf-pcmdi.llnl.gov/documents/cf-conventions/" 
+      target="_top">CF metadata convention</a> are supported. A function 
+      called <a href="netCDF4-module.html#date2index" 
+      class="link">date2index</a> is also provided which returns the 
+      indices of a netCDF time variable corresponding to a sequence of 
+      datetime instances.</p>
+    <h2 class="heading">7) Reading data from a multi-file netCDF dataset.</h2>
+      <p>If you want to read data from a variable that spans multiple 
+      netCDF files, you can use the <a href="netCDF4.MFDataset-class.html" 
+      class="link">MFDataset</a> class to read the data as if it were 
+      contained in a single file. Instead of using a single filename to 
+      create a <a href="netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> instance, create a <a 
+      href="netCDF4.MFDataset-class.html" class="link">MFDataset</a> 
+      instance with either a list of filenames, or a string with a wildcard
+      (which is then converted to a sorted list of files using the python 
+      glob module). Variables in the list of files that share the same 
+      unlimited dimension are aggregated together, and can be sliced across
+      multiple files.  To illustrate this, let's first create a bunch of 
+      netCDF files with the same variable (with the same unlimited 
+      dimension).  The files must in be in <code>NETCDF3_64BIT</code>, 
+      <code>NETCDF3_CLASSIC</code> or <code>NETCDF4_CLASSIC format</code> 
+      (<code>NETCDF4</code> formatted multi-file datasets are not 
+      supported).</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> nfile <span class="py-keyword">in</span> range(10):
+<span class="py-prompt">>>> </span>    f = Dataset(<span class="py-string">'mftest'</span>+repr(nfile)+<span class="py-string">'.nc'</span>,<span class="py-string">'w'</span>,format=<span class="py-string">'NETCDF4_CLASSIC'</span>)
+<span class="py-prompt">>>> </span>    f.createDimension(<span class="py-string">'x'</span>,None)
+<span class="py-prompt">>>> </span>    x = f.createVariable(<span class="py-string">'x'</span>,<span class="py-string">'i'</span>,(<span class="py-string">'x'</span>,))
+<span class="py-prompt">>>> </span>    x[0:10] = numpy.arange(nfile*10,10*(nfile+1))
+<span class="py-prompt">>>> </span>    f.close()</pre>
+      <p>Now read all the files back in at once with <a 
+      href="netCDF4.MFDataset-class.html" class="link">MFDataset</a></p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">from</span> netCDF4 <span class="py-keyword">import</span> MFDataset
+<span class="py-prompt">>>> </span>f = MFDataset(<span class="py-string">'mftest*nc'</span>)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.variables[<span class="py-string">'x'</span>][:]
+<span class="py-output">[ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24</span>
+<span class="py-output"> 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49</span>
+<span class="py-output"> 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74</span>
+<span class="py-output"> 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Note that MFDataset can only be used to read, not write, 
+      multi-file datasets.</p>
+    <h2 class="heading">8) Efficient compression of netCDF variables</h2>
+      <p>Data stored in netCDF 4 <a href="netCDF4.Variable-class.html" 
+      class="link">Variable</a> objects can be compressed and decompressed 
+      on the fly. The parameters for the compression are determined by the 
+      <code>zlib</code>, <code>complevel</code> and <code>shuffle</code> 
+      keyword arguments to the <a 
+      href="netCDF4.Dataset-class.html#createVariable" 
+      class="link">createVariable</a> method. To turn on compression, set 
+      <code>zlib=True</code>.  The <code>complevel</code> keyword regulates
+      the speed and efficiency of the compression (1 being fastest, but 
+      lowest compression ratio, 9 being slowest but best compression 
+      ratio). The default value of <code>complevel</code> is 4. Setting 
+      <code>shuffle=False</code> will turn off the HDF5 shuffle filter, 
+      which de-interlaces a block of data before compression by reordering 
+      the bytes.  The shuffle filter can significantly improve compression 
+      ratios, and is on by default.  Setting <code>fletcher32</code> 
+      keyword argument to <a 
+      href="netCDF4.Dataset-class.html#createVariable" 
+      class="link">createVariable</a> to <code>True</code> (it's 
+      <code>False</code> by default) enables the Fletcher32 checksum 
+      algorithm for error detection. It's also possible to set the HDF5 
+      chunking parameters and endian-ness of the binary data stored in the 
+      HDF5 file with the <code>chunksizes</code> and <code>endian</code> 
+      keyword arguments to <a 
+      href="netCDF4.Dataset-class.html#createVariable" 
+      class="link">createVariable</a>.  These keyword arguments only are 
+      relevant for <code>NETCDF4</code> and <code>NETCDF4_CLASSIC</code> 
+      files (where the underlying file format is HDF5) and are silently 
+      ignored if the file format is <code>NETCDF3_CLASSIC</code> or 
+      <code>NETCDF3_64BIT</code>,</p>
+      <p>If your data only has a certain number of digits of precision (say
+      for example, it is temperature data that was measured with a 
+      precision of 0.1 degrees), you can dramatically improve zlib 
+      compression by quantizing (or truncating) the data using the 
+      <code>least_significant_digit</code> keyword argument to <a 
+      href="netCDF4.Dataset-class.html#createVariable" 
+      class="link">createVariable</a>. The least significant digit is the 
+      power of ten of the smallest decimal place in the data that is a 
+      reliable value. For example if the data has a precision of 0.1, then 
+      setting <code>least_significant_digit=1</code> will cause data the 
+      data to be quantized using 
+      <code>numpy.around(scale*data)/scale</code>, where scale = 2**bits, 
+      and bits is determined so that a precision of 0.1 is retained (in 
+      this case bits=4).  Effectively, this makes the compression 'lossy' 
+      instead of 'lossless', that is some precision in the data is 
+      sacrificed for the sake of disk space.</p>
+      <p>In our example, try replacing the line</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>temp = rootgrp.createVariable(<span class="py-string">'temp'</span>,<span class="py-string">'f4'</span>,(<span class="py-string">'time'</span>,<span class="py-string">'level'</span>,<span class="py-string">'lat'</span>,<span class="py-string">'lon'</span>,))</pre>
+      <p>with</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>temp = dataset.createVariable(<span class="py-string">'temp'</span>,<span class="py-string">'f4'</span>,(<span class="py-string">'time'</span>,<span class="py-string">'level'</span>,<span class="py-string">'lat'</span>,<span class="py-string">'lon'</span>,),zlib=True)</pre>
+      <p>and then</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>temp = dataset.createVariable(<span class="py-string">'temp'</span>,<span class="py-string">'f4'</span>,(<span class="py-string">'time'</span>,<span class="py-string">'level'</span>,<span class="py-string">'lat'</span>,<span class="py-string">'lon'</span>,),zlib=True,least_significant_digit=3)</pre>
+      <p>and see how much smaller the resulting files are.</p>
+    <h2 class="heading">9) Beyond homogenous arrays of a fixed type - compound data types</h2>
+      <p>Compound data types map directly to numpy structured (a.k.a 
+      'record' arrays).  Structured arrays are akin to C structs, or 
+      derived types in Fortran. They allow for the construction of 
+      table-like structures composed of combinations of other data types, 
+      including other compound types. Compound types might be useful for 
+      representing multiple parameter values at each point on a grid, or at
+      each time and space location for scattered (point) data. You can then
+      access all the information for a point by reading one variable, 
+      instead of reading different parameters from different variables.  
+      Compound data types are created from the corresponding numpy data 
+      type using the <a 
+      href="netCDF4.Dataset-class.html#createCompoundType" 
+      class="link">createCompoundType</a> method of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance. 
+      Since there is no native complex data type in netcdf, compound types 
+      are handy for storing numpy complex arrays.  Here's an example:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>f = Dataset(<span class="py-string">'complex.nc'</span>,<span class="py-string">'w'</span>)
+<span class="py-prompt">>>> </span>size = 3 <span class="py-comment"># length of 1-d complex array</span>
+<span class="py-prompt">>>> </span><span class="py-comment"># create sample complex data.</span>
+<span class="py-prompt">>>> </span>datac = numpy.exp(1j*(1.+numpy.linspace(0, numpy.pi, size)))
+<span class="py-prompt">>>> </span><span class="py-comment"># create complex128 compound data type.</span>
+<span class="py-prompt">>>> </span>complex128 = numpy.dtype([(<span class="py-string">'real'</span>,numpy.float64),(<span class="py-string">'imag'</span>,numpy.float64)])
+<span class="py-prompt">>>> </span>complex128_t = f.createCompoundType(complex128,<span class="py-string">'complex128'</span>)
+<span class="py-prompt">>>> </span><span class="py-comment"># create a variable with this data type, write some data to it.</span>
+<span class="py-prompt">>>> </span>f.createDimension(<span class="py-string">'x_dim'</span>,None)
+<span class="py-prompt">>>> </span>v = f.createVariable(<span class="py-string">'cmplx_var'</span>,complex128_t,<span class="py-string">'x_dim'</span>)
+<span class="py-prompt">>>> </span>data = numpy.empty(size,complex128) <span class="py-comment"># numpy structured array</span>
+<span class="py-prompt">>>> </span>data[<span class="py-string">'real'</span>] = datac.real; data[<span class="py-string">'imag'</span>] = datac.imag
+<span class="py-prompt">>>> </span>v[:] = data <span class="py-comment"># write numpy structured array to netcdf compound var</span>
+<span class="py-prompt">>>> </span><span class="py-comment"># close and reopen the file, check the contents.</span>
+<span class="py-prompt">>>> </span>f.close(); f = Dataset(<span class="py-string">'complex.nc'</span>)
+<span class="py-prompt">>>> </span>v = f.variables[<span class="py-string">'cmplx_var'</span>]
+<span class="py-prompt">>>> </span>datain = v[:] <span class="py-comment"># read in all the data into a numpy structured array</span>
+<span class="py-prompt">>>> </span><span class="py-comment"># create an empty numpy complex array</span>
+<span class="py-prompt">>>> </span>datac2 = numpy.empty(datain.shape,numpy.complex128)
+<span class="py-prompt">>>> </span><span class="py-comment"># .. fill it with contents of structured array.</span>
+<span class="py-prompt">>>> </span>datac2.real = datain[<span class="py-string">'real'</span>]; datac2.imag = datain[<span class="py-string">'imag'</span>]
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> datac.dtype,datac <span class="py-comment"># original data</span>
+<span class="py-output">complex128 [ 0.54030231+0.84147098j -0.84147098+0.54030231j  -0.54030231-0.84147098j]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span>
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> datac2.dtype,datac2 <span class="py-comment"># data from file</span>
+<span class="py-output">complex128 [ 0.54030231+0.84147098j -0.84147098+0.54030231j  -0.54030231-0.84147098j]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Compound types can be nested, but you must create the 'inner' ones
+      first. All of the compound types defined for a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> are stored in 
+      a Python dictionary, just like variables and dimensions. As always, 
+      printing objects gives useful summary information in an interactive 
+      session:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> f
+<span class="py-output"><type 'netCDF4.Dataset'></span>
+<span class="py-output">root group (NETCDF4 file format):</span>
+<span class="py-output">    dimensions: x_dim</span>
+<span class="py-output">    variables: cmplx_var</span>
+<span class="py-output">    groups:</span>
+<span class="py-output"><type 'netCDF4.Variable'></span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.variables[<span class="py-string">'cmplx_var'</span>]
+<span class="py-output">compound cmplx_var(x_dim)</span>
+<span class="py-output">compound data type: [('real', '<f8'), ('imag', '<f8')]</span>
+<span class="py-output">unlimited dimensions: x_dim</span>
+<span class="py-output">current shape = (3,)</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.cmptypes
+<span class="py-output">OrderedDict([('complex128', <netCDF4.CompoundType object at 0x1029eb7e8>)])</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.cmptypes[<span class="py-string">'complex128'</span>]
+<span class="py-output"><type 'netCDF4.CompoundType'>: name = 'complex128', numpy dtype = [(u'real','<f8'), (u'imag', '<f8')]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+    <h2 class="heading">10) Variable-length (vlen) data types.</h2>
+      <p>NetCDF 4 has support for variable-length or "ragged" 
+      arrays.  These are arrays of variable length sequences having the 
+      same type. To create a variable-length data type, use the <a 
+      href="netCDF4.Dataset-class.html#createVLType" 
+      class="link">createVLType</a> method method of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>f = Dataset(<span class="py-string">'tst_vlen.nc'</span>,<span class="py-string">'w'</span>)
+<span class="py-prompt">>>> </span>vlen_t = f.createVLType(numpy.int32, <span class="py-string">'phony_vlen'</span>)</pre>
+      <p>The numpy datatype of the variable-length sequences and the name 
+      of the new datatype must be specified. Any of the primitive datatypes
+      can be used (signed and unsigned integers, 32 and 64 bit floats, and 
+      characters), but compound data types cannot. A new variable can then 
+      be created using this datatype.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>x = f.createDimension(<span class="py-string">'x'</span>,3)
+<span class="py-prompt">>>> </span>y = f.createDimension(<span class="py-string">'y'</span>,4)
+<span class="py-prompt">>>> </span>vlvar = f.createVariable(<span class="py-string">'phony_vlen_var'</span>, vlen_t, (<span class="py-string">'y'</span>,<span class="py-string">'x'</span>))</pre>
+      <p>Since there is no native vlen datatype in numpy, vlen arrays are 
+      represented in python as object arrays (arrays of dtype 
+      <code>object</code>). These are arrays whose elements are Python 
+      object pointers, and can contain any type of python object. For this 
+      application, they must contain 1-D numpy arrays all of the same type 
+      but of varying length. In this case, they contain 1-D numpy 
+      <code>int32</code> arrays of random length betwee 1 and 10.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">import</span> random
+<span class="py-prompt">>>> </span>data = numpy.empty(len(y)*len(x),object)
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> n <span class="py-keyword">in</span> range(len(y)*len(x)):
+<span class="py-prompt">>>> </span>   data[n] = numpy.arange(random.randint(1,10),dtype=<span class="py-string">'int32'</span>)+1
+<span class="py-prompt">>>> </span>data = numpy.reshape(data,(len(y),len(x)))
+<span class="py-prompt">>>> </span>vlvar[:] = data
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'vlen variable =\n'</span>,vlvar[:]
+<span class="py-output">vlen variable =</span>
+<span class="py-output">[[[ 1  2  3  4  5  6  7  8  9 10] [1 2 3 4 5] [1 2 3 4 5 6 7 8]]</span>
+<span class="py-output"> [[1 2 3 4 5 6 7] [1 2 3 4 5 6] [1 2 3 4 5]]</span>
+<span class="py-output"> [[1 2 3 4 5] [1 2 3 4] [1]]</span>
+<span class="py-output"> [[ 1  2  3  4  5  6  7  8  9 10] [ 1  2  3  4  5  6  7  8  9 10]</span>
+<span class="py-output">  [1 2 3 4 5 6 7 8]]]</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> f
+<span class="py-output"><type 'netCDF4.Dataset'></span>
+<span class="py-output">root group (NETCDF4 file format):</span>
+<span class="py-output">    dimensions: x, y</span>
+<span class="py-output">    variables: phony_vlen_var</span>
+<span class="py-output">    groups:</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.variables[<span class="py-string">'phony_vlen_var'</span>]
+<span class="py-output"><type 'netCDF4.Variable'></span>
+<span class="py-output">vlen phony_vlen_var(y, x)</span>
+<span class="py-output">vlen data type: int32</span>
+<span class="py-output">unlimited dimensions:</span>
+<span class="py-output">current shape = (4, 3)</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.VLtypes[<span class="py-string">'phony_vlen'</span>]
+<span class="py-output"><type 'netCDF4.VLType'>: name = 'phony_vlen', numpy dtype = int32</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Numpy object arrays containing python strings can also be written 
+      as vlen variables,  For vlen strings, you don't need to create a vlen
+      data type. Instead, simply use the python <code>str</code> builtin 
+      (or a numpy string datatype with fixed length greater than 1) when 
+      calling the <a href="netCDF4.Dataset-class.html#createVariable" 
+      class="link">createVariable</a> method.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>z = f.createDimension(<span class="py-string">'z'</span>,10)
+<span class="py-prompt">>>> </span>strvar = rootgrp.createVariable(<span class="py-string">'strvar'</span>, str, <span class="py-string">'z'</span>)</pre>
+      <p>In this example, an object array is filled with random python 
+      strings with random lengths between 2 and 12 characters, and the data
+      in the object array is assigned to the vlen string variable.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>chars = <span class="py-string">'1234567890aabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'</span>
+<span class="py-prompt">>>> </span>data = numpy.empty(10,<span class="py-string">'O'</span>)
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> n <span class="py-keyword">in</span> range(10):
+<span class="py-prompt">>>> </span>    stringlen = random.randint(2,12)
+<span class="py-prompt">>>> </span>    data[n] = <span class="py-string">''</span>.join([random.choice(chars) <span class="py-keyword">for</span> i <span class="py-keyword">in</span> range(stringlen)])
+<span class="py-prompt">>>> </span>strvar[:] = data
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'variable-length string variable:\n'</span>,strvar[:]
+<span class="py-output">variable-length string variable:</span>
+<span class="py-output">[aDy29jPt jd7aplD b8t4RM jHh8hq KtaPWF9cQj Q1hHN5WoXSiT MMxsVeq td LUzvVTzj</span>
+<span class="py-output"> 5DS9X8S]</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> f
+<span class="py-output"><type 'netCDF4.Dataset'></span>
+<span class="py-output">root group (NETCDF4 file format):</span>
+<span class="py-output">    dimensions: x, y, z</span>
+<span class="py-output">    variables: phony_vlen_var, strvar</span>
+<span class="py-output">    groups:</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.variables[<span class="py-string">'strvar'</span>]
+<span class="py-output"><type 'netCDF4.Variable'></span>
+<span class="py-output">vlen strvar(z)</span>
+<span class="py-output">vlen data type: <type 'str'></span>
+<span class="py-output">unlimited dimensions:</span>
+<span class="py-output">current size = (10,)</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>It is also possible to set contents of vlen string variables with 
+      numpy arrays of any string or unicode data type. Note, however, that 
+      accessing the contents of such variables will always return numpy 
+      arrays with dtype <code>object</code>.</p>
+      <p>All of the code in this tutorial is available in 
+      <code>examples/tutorial.py</code>, Unit tests are in the 
+      <code>test</code> directory.</p>
+
+<hr />
+<div class="fields">      <p><strong>Contact:</strong>
+        Jeffrey Whitaker <jeffrey.s.whitaker at noaa.gov>
+      </p>
+      <p><strong>Copyright:</strong>
+        2008 by Jeffrey Whitaker.
+      </p>
+      <p><strong>License:</strong>
+        Permission to use, copy, modify, and distribute this software and 
+        its documentation for any purpose and without fee is hereby 
+        granted, provided that the above copyright notice appear in all 
+        copies and that both the copyright notice and this permission 
+        notice appear in supporting documentation. THE AUTHOR DISCLAIMS ALL
+        WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED 
+        WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 
+        AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
+        OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 
+        PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 
+        TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 
+        PERFORMANCE OF THIS SOFTWARE.
+      </p>
+      <p><strong>Version:</strong>
+        1.1.2
+      </p>
+</div><!-- ==================== CLASSES ==================== -->
+<a name="section-Classes"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Classes</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.CompoundType-class.html" class="summary-name">CompoundType</a><br />
+      A <a href="netCDF4.CompoundType-class.html" 
+        class="link">CompoundType</a> instance is used to describe a 
+        compound data type.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.Dataset-class.html" class="summary-name">Dataset</a><br />
+      Dataset(self, filename, mode="r", clobber=True, 
+        diskless=False, persist=False, keepweakref=False, format='NETCDF4')
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.Dimension-class.html" class="summary-name">Dimension</a><br />
+      Dimension(self, group, name, size=None)
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.Group-class.html" class="summary-name">Group</a><br />
+      Group(self, parent, name)
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.MFDataset-class.html" class="summary-name">MFDataset</a><br />
+      MFDataset(self, files, check=False, aggdim=None, exclude=[])
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.MFTime-class.html" class="summary-name">MFTime</a><br />
+      MFTime(self, time, units=None)
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.VLType-class.html" class="summary-name">VLType</a><br />
+      A <a href="netCDF4.VLType-class.html" class="link">VLType</a> 
+        instance is used to describe a variable length (VLEN) data type.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.Variable-class.html" class="summary-name">Variable</a><br />
+      Variable(self, group, name, datatype, dimensions=(), zlib=False, 
+        complevel=4, shuffle=True, fletcher32=False, contiguous=False, 
+        chunksizes=None, endian='native', 
+        least_significant_digit=None,fill_value=None)
+    </td>
+  </tr>
+</table>
+<!-- ==================== FUNCTIONS ==================== -->
+<a name="section-Functions"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Functions</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4-module.html#chartostring" class="summary-sig-name">chartostring</a>(<span class="summary-sig-arg">b</span>)</span><br />
+      convert a character array to a string array with one less dimension.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4-module.html#date2index" class="summary-sig-name">date2index</a>(<span class="summary-sig-arg">dates</span>,
+        <span class="summary-sig-arg">nctime</span>,
+        <span class="summary-sig-arg">calendar</span>=<span class="summary-sig-default">None</span>,
+        <span class="summary-sig-arg">select</span>=<span class="summary-sig-default">'exact'</span>)</span><br />
+      Return indices of a netCDF time variable corresponding to the given 
+      dates.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4-module.html#date2num" class="summary-sig-name">date2num</a>(<span class="summary-sig-arg">dates</span>,
+        <span class="summary-sig-arg">units</span>,
+        <span class="summary-sig-arg">calendar</span>=<span class="summary-sig-default">'standard'</span>)</span><br />
+      Return numeric time values given datetime objects.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="getlibversion"></a><span class="summary-sig-name">getlibversion</span>()</span><br />
+      returns a string describing the version of the netcdf library used to
+      build the module, and when it was built.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4-module.html#num2date" class="summary-sig-name">num2date</a>(<span class="summary-sig-arg">times</span>,
+        <span class="summary-sig-arg">units</span>,
+        <span class="summary-sig-arg">calendar</span>=<span class="summary-sig-default">'standard'</span>)</span><br />
+      Return datetime objects given numeric time values.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4-module.html#stringtoarr" class="summary-sig-name">stringtoarr</a>(<span class="summary-sig-arg">a</span>,
+        <span class="summary-sig-arg">NUMCHARS</span>,
+        <span class="summary-sig-arg">dtype</span>=<span class="summary-sig-default">'S'</span>)</span><br />
+      convert a string to a character array of length NUMCHARS</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4-module.html#stringtochar" class="summary-sig-name">stringtochar</a>(<span class="summary-sig-arg">a</span>)</span><br />
+      convert a string array to a character array with one extra dimension</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+</table>
+<!-- ==================== VARIABLES ==================== -->
+<a name="section-Variables"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Variables</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="NC_DISKLESS"></a><span class="summary-name">NC_DISKLESS</span> = <code title="8">8</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="__has_nc_inq_format_extended__"></a><span class="summary-name">__has_nc_inq_format_extended__</span> = <code title="0">0</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="__has_nc_inq_path__"></a><span class="summary-name">__has_nc_inq_path__</span> = <code title="0">0</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="__has_rename_grp__"></a><span class="summary-name">__has_rename_grp__</span> = <code title="0">0</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="__hdf5libversion__"></a><span class="summary-name">__hdf5libversion__</span> = <code title="'1.8.13'"><code class="variable-quote">'</code><code class="variable-string">1.8.13</code><code class="variable-quote">'</code></code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="__netcdf4libversion__"></a><span class="summary-name">__netcdf4libversion__</span> = <code title="u'4.3.3-rc2'"><code class="variable-quote">u'</code><code class="variable-string">4.3.3-rc2</code><code class="variable-quote">'</code></code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="default_encoding"></a><span class="summary-name">default_encoding</span> = <code title="'utf-8'"><code class="variable-quote">'</code><code class="variable-string">utf-8</code><code class="variable-quote">'</code></code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4-module.html#default_fillvals" class="summary-name">default_fillvals</a> = <code title="{'S1': '\x00',
+ 'U1': '\x00',
+ 'f4': 9.96920996839e+36,
+ 'f8': 9.96920996839e+36,
+ 'i1': -127,
+ 'i2': -32767,
+ 'i4': -2147483647,
+ 'i8': -9223372036854775806,
+..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">S1</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x00</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">U1</code><code class="variable-quote">'</code><code class="variable-op">: </code><cod [...]
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="gregorian"></a><span class="summary-name">gregorian</span> = <code title="datetime.datetime(1582, 10, 15, 0, 0)">datetime.datetime(1582, 10, 15, 0, 0)</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="is_native_big"></a><span class="summary-name">is_native_big</span> = <code title="False">False</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="is_native_little"></a><span class="summary-name">is_native_little</span> = <code title="True">True</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="python3"></a><span class="summary-name">python3</span> = <code title="False">False</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="unicode_error"></a><span class="summary-name">unicode_error</span> = <code title="'replace'"><code class="variable-quote">'</code><code class="variable-string">replace</code><code class="variable-quote">'</code></code>
+    </td>
+  </tr>
+</table>
+<!-- ==================== FUNCTION DETAILS ==================== -->
+<a name="section-FunctionDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Function Details</span></td>
+</tr>
+</table>
+<a name="chartostring"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">chartostring</span>(<span class="sig-arg">b</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>convert a character array to a string array with one less 
+  dimension.</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>b</code></strong> - Input character array (numpy datatype 'S1' or 'U1'). Will be 
+          converted to a array of strings, where each string has a fixed 
+          length of b.shape[-1] characters.</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>A numpy string array with datatype 'SN' or 'UN' and shape 
+          b.shape[:-1], where N=b.shape[-1].</dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="date2index"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">date2index</span>(<span class="sig-arg">dates</span>,
+        <span class="sig-arg">nctime</span>,
+        <span class="sig-arg">calendar</span>=<span class="sig-default">None</span>,
+        <span class="sig-arg">select</span>=<span class="sig-default">'exact'</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Return indices of a netCDF time variable corresponding to the given 
+  dates.</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>dates</code></strong> - A datetime object or a sequence of datetime objects. The datetime
+          objects should not include a time-zone offset.</li>
+        <li><strong class="pname"><code>nctime</code></strong> - A netCDF time variable object. The nctime object must have a 
+          <code>units</code> attribute.</li>
+        <li><strong class="pname"><code>calendar</code></strong> - Describes the calendar used in the time calculation. Valid 
+          calendars <code>'standard', 'gregorian', 'proleptic_gregorian' 
+          'noleap', '365_day', '360_day', 'julian', 'all_leap', 
+          '366_day'</code>. Default is <code>'standard'</code>, which is a 
+          mixed Julian/Gregorian calendar If <code>calendar</code> is None,
+          its value is given by <code>nctime.calendar</code> or 
+          <code>standard</code> if no such attribute exists.</li>
+        <li><strong class="pname"><code>select</code></strong> - <code>'exact', 'before', 'after', 'nearest'</code> The index 
+          selection method. <code>exact</code> will return the indices 
+          perfectly matching the dates given. <code>before</code> and 
+          <code>after</code> will return the indices corresponding to the 
+          dates just before or just after the given dates if an exact match
+          cannot be found. <code>nearest</code> will return the indices 
+          that correspond to the closest dates.</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>an index (indices) of the netCDF time variable corresponding to 
+          the given datetime object(s).</dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="date2num"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">date2num</span>(<span class="sig-arg">dates</span>,
+        <span class="sig-arg">units</span>,
+        <span class="sig-arg">calendar</span>=<span class="sig-default">'standard'</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Return numeric time values given datetime objects. The units of the 
+  numeric time values are described by the <code class="link">units</code> 
+  argument and the <code class="link">calendar</code> keyword. The datetime
+  objects must be in UTC with no time-zone offset.  If there is a time-zone
+  offset in <code>units</code>, it will be applied to the returned numeric 
+  values.</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>dates</code></strong> - A datetime object or a sequence of datetime objects. The datetime
+          objects should not include a time-zone offset.</li>
+        <li><strong class="pname"><code>units</code></strong> - a string of the form <code>'<b>time units</b> since <b>reference 
+          time</b></code>' describing the time units. <b><code>time 
+          units</code></b> can be days, hours, minutes, seconds, 
+          milliseconds or microseconds. <b><code>reference time</code></b> 
+          is the time origin. Milliseconds and microseconds can only be 
+          used with the proleptic_gregorian calendar, or the standard and 
+          gregorian calendars if the time origin is after 1582-10-15. A 
+          valid choice would be units=<code>'milliseconds since 1800-01-01 
+          00:00:00-6:00'</code>.</li>
+        <li><strong class="pname"><code>calendar</code></strong> - describes the calendar used in the time calculations. All the 
+          values currently defined in the <a 
+          href="http://cf-pcmdi.llnl.gov/documents/cf-conventions/" 
+          target="_top">CF metadata convention</a> are supported. Valid 
+          calendars <code>'standard', 'gregorian', 'proleptic_gregorian' 
+          'noleap', '365_day', '360_day', 'julian', 'all_leap', 
+          '366_day'</code>. Default is <code>'standard'</code>, which is a 
+          mixed Julian/Gregorian calendar.</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>a numeric time value, or an array of numeric time values.</dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="num2date"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">num2date</span>(<span class="sig-arg">times</span>,
+        <span class="sig-arg">units</span>,
+        <span class="sig-arg">calendar</span>=<span class="sig-default">'standard'</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Return datetime objects given numeric time values. The units of the 
+  numeric time values are described by the <code>units</code> argument and 
+  the <code>calendar</code> keyword. The returned datetime objects 
+  represent UTC with no time-zone offset, even if the specified 
+  <code>units</code> contain a time-zone offset.</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>times</code></strong> - numeric time values.</li>
+        <li><strong class="pname"><code>units</code></strong> - a string of the form <code>'<b>time units</b> since <b>reference 
+          time</b></code>' describing the time units. <b><code>time 
+          units</code></b> can be days, hours, minutes, seconds, 
+          milliseconds or microseconds. <b><code>reference time</code></b> 
+          is the time origin. Milliseconds and microseconds can only be 
+          used with the proleptic_gregorian calendar, or the standard and 
+          gregorian calendars if the time origin is after 1582-10-15. A 
+          valid choice would be units=<code>'milliseconds since 1800-01-01 
+          00:00:00-6:00'</code>.</li>
+        <li><strong class="pname"><code>calendar</code></strong> - describes the calendar used in the time calculations. All the 
+          values currently defined in the <a 
+          href="http://cf-pcmdi.llnl.gov/documents/cf-conventions/" 
+          target="_top">CF metadata convention</a> are supported. Valid 
+          calendars <code>'standard', 'gregorian', 'proleptic_gregorian' 
+          'noleap', '365_day', '360_day', 'julian', 'all_leap', 
+          '366_day'</code>. Default is <code>'standard'</code>, which is a 
+          mixed Julian/Gregorian calendar.</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>a datetime instance, or an array of datetime instances.
+          <p>The datetime instances returned are 'real' python datetime 
+          objects if the date falls in the Gregorian calendar (i.e. 
+          <code>calendar='proleptic_gregorian'</code>, or <code>calendar = 
+          'standard'</code> or <code>'gregorian'</code> and the date is 
+          after 1582-10-15). Otherwise, they are 'phony' datetime objects 
+          which support some but not all the methods of 'real' python 
+          datetime objects.  This is because the python datetime module 
+          cannot the uses the <code>'proleptic_gregorian'</code> calendar, 
+          even before the switch occured from the Julian calendar in 1582. 
+          The datetime instances do not contain a time-zone offset, even if
+          the specified <code>units</code> contains one.</p></dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="stringtoarr"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">stringtoarr</span>(<span class="sig-arg">a</span>,
+        <span class="sig-arg">NUMCHARS</span>,
+        <span class="sig-arg">dtype</span>=<span class="sig-default">'S'</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>convert a string to a character array of length NUMCHARS</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>a</code></strong> - Input python string.</li>
+        <li><strong class="pname"><code>NUMCHARS</code></strong> - number of characters used to represent string (if len(a) < 
+          NUMCHARS, it will be padded on the right with blanks).</li>
+        <li><strong class="pname"><code>dtype</code></strong> - type of numpy array to return.  Default is 'S', which means an 
+          array of dtype 'S1' will be returned.  If dtype='U', a unicode 
+          array (dtype = 'U1') will be returned.</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>A rank 1 numpy character array of length NUMCHARS with datatype 
+          'S1' (default) or 'U1' (if dtype='U')</dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="stringtochar"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">stringtochar</span>(<span class="sig-arg">a</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>convert a string array to a character array with one extra 
+  dimension</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>a</code></strong> - Input numpy string array with numpy datatype 'SN' or 'UN', where 
+          N is the number of characters in each string.  Will be converted 
+          to an array of characters (datatype 'S1' or 'U1') of shape 
+          a.shape + (N,).</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>A numpy character array with datatype 'S1' or 'U1' and shape 
+          a.shape + (N,), where N is the length of each string in a.</dd>
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== VARIABLES DETAILS ==================== -->
+<a name="section-VariablesDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Variables Details</span></td>
+</tr>
+</table>
+<a name="default_fillvals"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <h3 class="epydoc">default_fillvals</h3>
+  
+  <dl class="fields">
+  </dl>
+  <dl class="fields">
+    <dt>Value:</dt>
+      <dd><table><tr><td><pre class="variable">
+<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">S1</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x00</code><code class="variable-quote">'</code><code class="variable-op">,</code>
+ <code class="variable-quote">'</code><code class="variable-string">U1</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x00</code><code class="variable-quote">'</code><code class="variable-op">,</code>
+ <code class="variable-quote">'</code><code class="variable-string">f4</code><code class="variable-quote">'</code><code class="variable-op">: </code>9.96920996839e+36<code class="variable-op">,</code>
+ <code class="variable-quote">'</code><code class="variable-string">f8</code><code class="variable-quote">'</code><code class="variable-op">: </code>9.96920996839e+36<code class="variable-op">,</code>
+ <code class="variable-quote">'</code><code class="variable-string">i1</code><code class="variable-quote">'</code><code class="variable-op">: </code>-127<code class="variable-op">,</code>
+ <code class="variable-quote">'</code><code class="variable-string">i2</code><code class="variable-quote">'</code><code class="variable-op">: </code>-32767<code class="variable-op">,</code>
+ <code class="variable-quote">'</code><code class="variable-string">i4</code><code class="variable-quote">'</code><code class="variable-op">: </code>-2147483647<code class="variable-op">,</code>
+ <code class="variable-quote">'</code><code class="variable-string">i8</code><code class="variable-quote">'</code><code class="variable-op">: </code>-9223372036854775806<code class="variable-op">,</code>
+<code class="variable-ellipsis">...</code>
+</pre></td></tr></table>
+</dd>
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th bgcolor="#70b0f0" class="navbar-select"
+          >   Home   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Fri Dec  5 15:19:53 2014
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/module-tree.html b/docs/module-tree.html
new file mode 100644
index 0000000..a7465aa
--- /dev/null
+++ b/docs/module-tree.html
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Module Hierarchy</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th bgcolor="#70b0f0" class="navbar-select"
+          >   Trees   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%"> </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<center><b>
+ [ <a href="module-tree.html">Module Hierarchy</a>
+ | <a href="class-tree.html">Class Hierarchy</a> ]
+</b></center><br />
+<h1 class="epydoc">Module Hierarchy</h1>
+<ul class="nomargin-top">
+    <li> <strong class="uidlink"><a href="netCDF4-module.html">netCDF4</a></strong>: <em class="summary">Python interface to the netCDF version 4 library.</em>    </li>
+</ul>
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th bgcolor="#70b0f0" class="navbar-select"
+          >   Trees   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Fri Dec  5 15:19:52 2014
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netCDF3-module.html b/docs/netCDF3-module.html
new file mode 100644
index 0000000..4830b78
--- /dev/null
+++ b/docs/netCDF3-module.html
@@ -0,0 +1,965 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netCDF3</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        Module netCDF3
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== MODULE DESCRIPTION ==================== -->
+<h1 class="epydoc">Module netCDF3</h1><p class="nomargin-top"></p>
+<h1 class="heading">Introduction</h1>
+    <p>Python interface to the netCDF version 3 library. The API modelled 
+    after <a 
+    href="http://dirac.cnrs-orleans.fr/plone/software/scientificpython/" 
+    target="_top">Scientific.IO.NetCDF</a>, and should be familiar to users
+    of that module. Some new features not found in 
+    Scientific.IO.NetCDF:</p>
+    <ul>
+      <li>
+        ability to read multi-file netCDF Datasets, making variables 
+        spanning multiple files appear as if they were in one file (see <a 
+        href="netCDF3.MFDataset-class.html" class="link">MFDataset</a> for 
+        more details).
+      </li>
+      <li>
+        support for masked arrays, automatic packing and unpacking of 
+        packed integer data (see <a 
+        href="netCDF3.Variable-class.html#set_auto_maskandscale" 
+        class="link">Variable.set_auto_maskandscale</a> for details).
+      </li>
+      <li>
+        supports more complicated slicing (including numpy 'fancy 
+        indexing').
+      </li>
+      <li>
+        includes convenience functions for converting to and from datetime 
+        objects to numeric time values (see <a 
+        href="netCDF3-module.html#num2date" class="link">num2date</a> and 
+        <a href="netCDF3-module.html#date2num" class="link">date2num</a>), 
+        using all the calendars in the CF standard.
+      </li>
+      <li>
+        convenience functions for converting arrays of characters to arrays
+        of strings, and vice-versa (<a 
+        href="netCDF3-module.html#stringtochar" 
+        class="link">stringtochar</a> and <a 
+        href="netCDF3-module.html#chartostring" 
+        class="link">chartostring</a>).
+      </li>
+      <li>
+        can use numpy dtype objects to specify netCDF variable datatype.
+      </li>
+    </ul>
+  <h1 class="heading">Download</h1>
+    <ul>
+      <li>
+        <a href="http://code.google.com/p/netcdf4-python/" 
+        target="_top">Project page</a>.
+      </li>
+      <li>
+        <a href="http://code.google.com/p/netcdf4-python/source" 
+        target="_top">Subversion repository</a>.
+      </li>
+      <li>
+        <a href="http://code.google.com/p/netcdf4-python/downloads/list" 
+        target="_top">Source tar.gz</a>.
+      </li>
+    </ul>
+  <h1 class="heading">Requires</h1>
+    <ul>
+      <li>
+        numpy array module <a href="http://numpy.scipy.org" 
+        target="_top">http://numpy.scipy.org</a>, version 1.2.1 or later.
+      </li>
+      <li>
+        The netCDF-3 C library (version 3.6 or later), available at <a 
+        href="ftp://ftp.unidata.ucar.edu/pub/netcdf" 
+        target="_top">ftp://ftp.unidata.ucar.edu/pub/netcdf</a>.
+      </li>
+    </ul>
+  <h1 class="heading">Install</h1>
+    <ul>
+      <li>
+        install the requisite python modules and C libraries (see above). 
+        Optionally, set the <code>NETCDF3_DIR</code> environment variable 
+        to point to where the netCDF version 3 library and headers are 
+        installed. If <code>NETCDF3_DIR</code> is not set, some standard 
+        locations will be searched.
+      </li>
+      <li>
+        run 'python setup-nc3.py install'
+      </li>
+      <li>
+        run some of the tests in the 'test3' directory.
+      </li>
+    </ul>
+  <h1 class="heading">Tutorial</h1>
+    <h2 class="heading">1) Creating/Opening/Closing a netCDF file</h2>
+      <p>To create a netCDF file from python, you simply call the <a 
+      href="netCDF3.Dataset-class.html" class="link">Dataset</a> 
+      constructor. This is also the method used to open an existing netCDF 
+      file.  If the file is open for write access (<code>w, r+</code> or 
+      <code>a</code>), you may write any type of data including new 
+      dimensions, variables and attributes.  netCDF files come in several 
+      flavors (<code>NETCDF3_CLASSIC, NETCDF3_64BIT, 
+      NETCDF4_CLASSIC</code>, and <code>NETCDF4</code>). The first two 
+      flavors are supported by version 3 of the netCDF library, and are 
+      supported in this module. To read or write <code>NETCDF4</code> and 
+      <code>NETCDF4_CLASSIC</code> files use the companion <a 
+      href="netCDF4-module.html" class="link">netCDF4</a> python module. 
+      The default format <code>NETCDF3_64BIT</code>. To see how a given 
+      file is formatted, you can examine the <code>file_format</code> <a 
+      href="netCDF3.Dataset-class.html" class="link">Dataset</a> attribute.
+      Closing the netCDF file is accomplished via the <a 
+      href="netCDF3.Dataset-class.html#close" class="link">close</a> method
+      of the <a href="netCDF3.Dataset-class.html" class="link">Dataset</a> 
+      instance.</p>
+      <p>Here's an example:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">import</span> netCDF3
+<span class="py-prompt">>>> </span>ncfile = netCDF3.Dataset(<span class="py-string">'test.nc'</span>, <span class="py-string">'w'</span>)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> ncfile.file_format
+<span class="py-output">NETCDF3_64BIT</span>
+<span class="py-output"></span><span class="py-prompt">>>></span>
+<span class="py-prompt">>>> </span>ncfile.close()</pre>
+    <h2 class="heading">2) Dimensions in a netCDF file</h2>
+      <p>netCDF defines the sizes of all variables in terms of dimensions, 
+      so before any variables can be created the dimensions they use must 
+      be created first. A special case, not often used in practice, is that
+      of a scalar variable, which has no dimensions. A dimension is created
+      using the <a href="netCDF3.Dataset-class.html#createDimension" 
+      class="link">createDimension</a> method of a <a 
+      href="netCDF3.Dataset-class.html" class="link">Dataset</a> instance. 
+      A Python string is used to set the name of the dimension, and an 
+      integer value is used to set the size. To create an unlimited 
+      dimension (a dimension that can be appended to), the size value is 
+      set to <code>None</code> or 0. netCDF 3 files can only have one 
+      unlimited dimension, and it must be the first (leftmost) dimension of
+      the variable.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>ncfile.createDimension(<span class="py-string">'press'</span>, 10)
+<span class="py-prompt">>>> </span>ncfile.createDimension(<span class="py-string">'time'</span>, None)
+<span class="py-prompt">>>> </span>ncfile.createDimension(<span class="py-string">'lat'</span>, 73)
+<span class="py-prompt">>>> </span>ncfile.createDimension(<span class="py-string">'lon'</span>, 144)</pre>
+      <p>All of the <a href="netCDF3.Dimension-class.html" 
+      class="link">Dimension</a> instances are stored in a python 
+      dictionary.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> ncfile.dimensions
+<span class="py-output">{'lat': <netCDF3.Dimension object at 0x24a5f7b0>, </span>
+<span class="py-output"> 'time': <netCDF3.Dimension object at 0x24a5f788>, </span>
+<span class="py-output"> 'lon': <netCDF3.Dimension object at 0x24a5f7d8>, </span>
+<span class="py-output"> 'press': <netCDF3.Dimension object at 0x24a5f760>}</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Calling the python <code>len</code> function with a <a 
+      href="netCDF3.Dimension-class.html" class="link">Dimension</a> 
+      instance returns the current size of that dimension. The <a 
+      href="netCDF3.Dimension-class.html#isunlimited" 
+      class="link">isunlimited</a> method of a <a 
+      href="netCDF3.Dimension-class.html" class="link">Dimension</a> 
+      instance can be used to determine if the dimensions is unlimited, or 
+      appendable.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> dimname, dimobj <span class="py-keyword">in</span> ncfile.dimensions.iteritems():
+<span class="py-prompt">>>> </span>   <span class="py-keyword">print</span> dimname, len(dimobj), dimobj.isunlimited()
+<span class="py-output">lat 73 False</span>
+<span class="py-output">time 0 True</span>
+<span class="py-output">lon 144 False</span>
+<span class="py-output">press 10 False</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p><a href="netCDF3.Dimension-class.html" class="link">Dimension</a> 
+      names can be changed using the <a 
+      href="netCDF3.Dataset-class.html#renameDimension" 
+      class="link">renameDimension</a> method of a <a 
+      href="netCDF3.Dataset-class.html" class="link">Dataset</a> 
+      instance.</p>
+    <h2 class="heading">3) Variables in a netCDF file</h2>
+      <p>netCDF variables behave much like python multidimensional array 
+      objects supplied by the <a href="http://numpy.scipy.org" 
+      target="_top">numpy module</a>. However, unlike numpy arrays, netCDF3
+      variables can be appended to along one 'unlimited' dimension. To 
+      create a netCDF variable, use the <a 
+      href="netCDF3.Dataset-class.html#createVariable" 
+      class="link">createVariable</a> method of a <a 
+      href="netCDF3.Dataset-class.html" class="link">Dataset</a> instance. 
+      The <a href="netCDF3.Dataset-class.html#createVariable" 
+      class="link">createVariable</a> method has two mandatory arguments, 
+      the variable name (a Python string), and the variable datatype. The 
+      variable's dimensions are given by a tuple containing the dimension 
+      names (defined previously with <a 
+      href="netCDF3.Dataset-class.html#createDimension" 
+      class="link">createDimension</a>). To create a scalar variable, 
+      simply leave out the dimensions keyword. The variable primitive 
+      datatypes correspond to the dtype attribute of a numpy array. You can
+      specify the datatype as a numpy dtype object, or anything that can be
+      converted to a numpy dtype object.  Valid datatype specifiers 
+      include: <code>'f4'</code> (32-bit floating point), <code>'f8'</code>
+      (64-bit floating point), <code>'i4'</code> (32-bit signed integer), 
+      <code>'i2'</code> (16-bit signed integer), <code>'i1'</code> (8-bit 
+      signed integer), or <code>'S1'</code> (single-character string) The 
+      old Numeric single-character typecodes 
+      (<code>'f'</code>,<code>'d'</code>,<code>'h'</code>, 
+      <code>'s'</code>,<code>'b'</code>,<code>'B'</code>,<code>'c'</code>,<code>'i'</code>,<code>'l'</code>),
+      corresponding to 
+      (<code>'f4'</code>,<code>'f8'</code>,<code>'i2'</code>,<code>'i2'</code>,<code>'i1'</code>,<code>'i1'</code>,<code>'S1'</code>,<code>'i4'</code>,<code>'i4'</code>),
+      will also work.</p>
+      <p>The dimensions themselves are usually also defined as variables, 
+      called coordinate variables. The <a 
+      href="netCDF3.Dataset-class.html#createVariable" 
+      class="link">createVariable</a> method returns an instance of the <a 
+      href="netCDF3.Variable-class.html" class="link">Variable</a> class 
+      whose methods can be used later to access and set variable data and 
+      attributes.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>times = ncfile.createVariable(<span class="py-string">'time'</span>,<span class="py-string">'f8'</span>,(<span class="py-string">'time'</span>,))
+<span class="py-prompt">>>> </span>pressure = ncfile.createVariable(<span class="py-string">'press'</span>,<span class="py-string">'i4'</span>,(<span class="py-string">'press'</span>,))
+<span class="py-prompt">>>> </span>latitudes = ncfile.createVariable(<span class="py-string">'latitude'</span>,<span class="py-string">'f4'</span>,(<span class="py-string">'lat'</span>,))
+<span class="py-prompt">>>> </span>longitudes = ncfile.createVariable(<span class="py-string">'longitude'</span>,<span class="py-string">'f4'</span>,(<span class="py-string">'lon'</span>,))
+<span class="py-prompt">>>> </span><span class="py-comment"># two dimensions unlimited.</span>
+<span class="py-prompt">>>> </span>temp = ncfile.createVariable(<span class="py-string">'temp'</span>,<span class="py-string">'f4'</span>,(<span class="py-string">'time'</span>,<span class="py-string">'press'</span>,<span class="py-string">'lat'</span>,<span class="py-string">'lon'</span>,))</pre>
+      <p>All of the variables in the <a href="netCDF3.Dataset-class.html" 
+      class="link">Dataset</a> are stored in a Python dictionary, in the 
+      same way as the dimensions:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> ncfile.variables
+<span class="py-output">{'temp': <netCDF3.Variable object at 0x24a61068>,</span>
+<span class="py-output"> 'pressure': <netCDF3.Variable object at 0.35f0f80>, </span>
+<span class="py-output"> 'longitude': <netCDF3.Variable object at 0x24a61030>,</span>
+<span class="py-output"> 'pressure': <netCDF3.Variable object at 0x24a610a0>, </span>
+<span class="py-output"> 'time': <netCDF3.Variable object at 02x45f0.4.58>, </span>
+<span class="py-output"> 'latitude': <netCDF3.Variable object at 0.3f0fb8>}</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p><a href="netCDF3.Variable-class.html" class="link">Variable</a> 
+      names can be changed using the <a 
+      href="netCDF3.Dataset-class.html#renameVariable" 
+      class="link">renameVariable</a> method of a <a 
+      href="netCDF3.Dataset-class.html" class="link">Dataset</a> 
+      instance.</p>
+    <h2 class="heading">4) Attributes in a netCDF file</h2>
+      <p>There are two types of attributes in a netCDF file, global and 
+      variable. Global attributes provide information about a dataset as a 
+      whole. <a href="netCDF3.Variable-class.html" 
+      class="link">Variable</a> attributes provide information about one of
+      the variables in a dataset. Global attributes are set by assigning 
+      values to <a href="netCDF3.Dataset-class.html" 
+      class="link">Dataset</a> instance variables. <a 
+      href="netCDF3.Variable-class.html" class="link">Variable</a> 
+      attributes are set by assigning values to <a 
+      href="netCDF3.Variable-class.html" class="link">Variable</a> instance
+      variables. Attributes can be strings, numbers or sequences. Returning
+      to our example,</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">import</span> time
+<span class="py-prompt">>>> </span>ncfile.description = <span class="py-string">'bogus example script'</span>
+<span class="py-prompt">>>> </span>ncfile.history = <span class="py-string">'Created '</span> + time.ctime(time.time())
+<span class="py-prompt">>>> </span>ncfile.source = <span class="py-string">'netCDF3 python module tutorial'</span>
+<span class="py-prompt">>>> </span>latitudes.units = <span class="py-string">'degrees north'</span>
+<span class="py-prompt">>>> </span>longitudes.units = <span class="py-string">'degrees east'</span>
+<span class="py-prompt">>>> </span>pressure.units = <span class="py-string">'hPa'</span>
+<span class="py-prompt">>>> </span>temp.units = <span class="py-string">'K'</span>
+<span class="py-prompt">>>> </span>times.units = <span class="py-string">'hours since 0001-01-01 00:00:00.0'</span>
+<span class="py-prompt">>>> </span>times.calendar = <span class="py-string">'gregorian'</span></pre>
+      <p>The <a href="netCDF3.Dataset-class.html#ncattrs" 
+      class="link">ncattrs</a> method of a <a 
+      href="netCDF3.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF3.Variable-class.html" class="link">Variable</a> instance
+      can be used to retrieve the names of all the netCDF attributes. This 
+      method is provided as a convenience, since using the built-in 
+      <code>dir</code> Python function will return a bunch of private 
+      methods and attributes that cannot (or should not) be modified by the
+      user.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> name <span class="py-keyword">in</span> ncfile.ncattrs():
+<span class="py-prompt">>>> </span>    <span class="py-keyword">print</span> <span class="py-string">'Global attr'</span>, name, <span class="py-string">'='</span>, getattr(ncfile,name)
+<span class="py-output">Global attr description = bogus example script</span>
+<span class="py-output">Global attr history = Created Mon Nov  7 10.30:56 2005</span>
+<span class="py-output">Global attr source = netCDF3 python module tutorial</span></pre>
+      <p>The <code>__dict__</code> attribute of a <a 
+      href="netCDF3.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF3.Variable-class.html" class="link">Variable</a> instance
+      provides all the netCDF attribute name/value pairs in a python 
+      dictionary:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> ncfile.__dict__
+<span class="py-output">{'source': 'netCDF3 python module tutorial',</span>
+<span class="py-output">'description': 'bogus example script',</span>
+<span class="py-output">'history': 'Created Mon Nov  7 10.30:56 2005'}</span></pre>
+      <p>Attributes can be deleted from a netCDF <a 
+      href="netCDF3.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF3.Variable-class.html" class="link">Variable</a> using 
+      the python <code>del</code> statement (i.e. <code>del var.foo</code> 
+      removes the attribute <code>foo</code> the the variable 
+      <code>var</code>).</p>
+    <h2 class="heading">6) Writing data to and retrieving data from a netCDF variable</h2>
+      <p>Now that you have a netCDF <a href="netCDF3.Variable-class.html" 
+      class="link">Variable</a> instance, how do you put data into it? You 
+      can just treat it like an array and assign data to a slice.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">import</span> numpy 
+<span class="py-prompt">>>> </span>latitudes[:] = numpy.arange(-90,91,2.5)
+<span class="py-prompt">>>> </span>pressure[:] = numpy.arange(1000,90,-100)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'latitudes =\n'</span>,latitudes[:]
+<span class="py-output">latitudes =</span>
+<span class="py-output">[-90.  -87.5 -85.  -82.5 -80.  -77.5 -75.  -72.5 -70.  -67.5 -65.  -62.5</span>
+<span class="py-output"> -60.  -57.5 -55.  -52.5 -50.  -47.5 -45.  -42.5 -40.  -37.5 -35.  -32.5</span>
+<span class="py-output"> -30.  -27.5 -25.  -22.5 -20.  -17.5 -15.  -12.5 -10.   -7.5  -5.   -2.5</span>
+<span class="py-output">   0.    2.5   5.    7.5  10.   12.5  15.   17.5  20.   22.5  25.   27.5</span>
+<span class="py-output">  30.   32.5  35.   37.5  40.   42.5  45.   47.5  50.   52.5  55.   57.5</span>
+<span class="py-output">  60.   62.5  65.   67.5  70.   72.5  75.   77.5  80.   82.5  85.   87.5</span>
+<span class="py-output">  90. ]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span>
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'pressure levels =\n'</span>,pressure[:]
+<span class="py-output">[1000  900  800  700  600  500  400  300  200  100]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Unlike numpy array objects, netCDF <a 
+      href="netCDF3.Variable-class.html" class="link">Variable</a> objects 
+      with unlimited dimensions will grow along those dimensions if you 
+      assign data outside the currently defined range of indices.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-comment"># append along two unlimited dimensions by assigning to slice.</span>
+<span class="py-prompt">>>> </span>nlats = len(ncfile.dimensions[<span class="py-string">'lat'</span>])
+<span class="py-prompt">>>> </span>nlons = len(ncfile.dimensions[<span class="py-string">'lon'</span>])
+<span class="py-prompt">>>> </span>nlevs = len(ncfile.dimensions[<span class="py-string">'press'</span>])
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'temp shape before adding data = '</span>,temp.shape
+<span class="py-output">temp shape before adding data =  (0, 10, 73, 144)</span>
+<span class="py-output"></span><span class="py-prompt">>>></span>
+<span class="py-prompt">>>> </span><span class="py-keyword">from</span> numpy.random.mtrand <span class="py-keyword">import</span> uniform
+<span class="py-prompt">>>> </span>temp[0:5,:,:,:] = uniform(size=(5,nlevs,nlats,nlons))
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'temp shape after adding data = '</span>,temp.shape
+<span class="py-output">temp shape after adding data =  (5, 16, 73, 144)</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Time coordinate values pose a special challenge to netCDF users.  
+      Most metadata standards (such as CF and COARDS) specify that time 
+      should be measure relative to a fixed date using a certain calendar, 
+      with units specified like <code>hours since YY:MM:DD hh-mm-ss</code>.
+      These units can be awkward to deal with, without a utility to convert
+      the values to and from calendar dates.  The functione called <a 
+      href="netCDF3-module.html#num2date" class="link">num2date</a> and <a 
+      href="netCDF3-module.html#date2num" class="link">date2num</a> are 
+      provided with this package to do just that.  Here's an example of how
+      they can be used:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-comment"># fill in times.</span>
+<span class="py-prompt">>>> </span><span class="py-keyword">from</span> datetime <span class="py-keyword">import</span> datetime, timedelta
+<span class="py-prompt">>>> </span><span class="py-keyword">from</span> netCDF3 <span class="py-keyword">import</span> num2date, date2num
+<span class="py-prompt">>>> </span>dates = [datetime(2001,3,1)+n*timedelta(hours=12) <span class="py-keyword">for</span> n <span class="py-keyword">in</span> range(temp.shape[0])]
+<span class="py-prompt">>>> </span>times[:] = date2num(dates,units=times.units,calendar=times.calendar)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'time values (in units %s): '</span> % times.units+<span class="py-string">'\n'</span>,times[:]
+<span class="py-output">time values (in units hours since January 1, 0001): </span>
+<span class="py-output">[ 17533056.  17533068.  17533080.  17533092.  17533104.]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span>
+<span class="py-prompt">>>> </span>dates = num2date(times[:],units=times.units,calendar=times.calendar)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'dates corresponding to time values:\n'</span>,dates
+<span class="py-output">dates corresponding to time values:</span>
+<span class="py-output">[2001-03-01 00:00:00 2001-03-01 12:00:00 2001-03-02 00:00:00</span>
+<span class="py-output"> 2001-03-02 12:00:00 2001-03-03 00:00:00]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p><a href="netCDF3-module.html#num2date" class="link">num2date</a> 
+      converts numeric values of time in the specified <code>units</code> 
+      and <code>calendar</code> to datetime objects, and <a 
+      href="netCDF3-module.html#date2num" class="link">date2num</a> does 
+      the reverse. All the calendars currently defined in the <a 
+      href="http://cf-pcmdi.llnl.gov/documents/cf-conventions/" 
+      target="_top">CF metadata convention</a> are supported. A function 
+      called <a href="netCDF3-module.html#date2index" 
+      class="link">date2index</a> is also provided which returns the 
+      indices of a netCDF time variable corresponding to a sequence of 
+      datetime instances.</p>
+      <p>All of the code in this tutorial is available in 
+      <code>examples/tutorial-nc3.py</code>, Unit tests are in the 
+      <code>test3</code> directory.</p>
+    <h2 class="heading">7) Reading data from a multi-file netCDF dataset.</h2>
+      <p>If you want to read data from a variable that spans multiple 
+      netCDF files, you can use the <a href="netCDF3.MFDataset-class.html" 
+      class="link">MFDataset</a> class to read the data as if it were 
+      contained in a single file. Instead of using a single filename to 
+      create a <a href="netCDF3.Dataset-class.html" 
+      class="link">Dataset</a> instance, create a <a 
+      href="netCDF3.MFDataset-class.html" class="link">MFDataset</a> 
+      instance with either a list of filenames, or a string with a wildcard
+      (which is then converted to a sorted list of files using the python 
+      glob module). Variables in the list of files that share the same 
+      unlimited dimension are aggregated together, and can be sliced across
+      multiple files.  To illustrate this, let's first create a bunch of 
+      netCDF files with the same variable (with the same unlimited 
+      dimension).</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> nfile <span class="py-keyword">in</span> range(10):
+<span class="py-prompt">>>> </span>    f = Dataset(<span class="py-string">'mftest'</span>+repr(nfile)+<span class="py-string">'.nc'</span>,<span class="py-string">'w'</span>)
+<span class="py-prompt">>>> </span>    f.createDimension(<span class="py-string">'x'</span>,None)
+<span class="py-prompt">>>> </span>    x = f.createVariable(<span class="py-string">'x'</span>,<span class="py-string">'i'</span>,(<span class="py-string">'x'</span>,))
+<span class="py-prompt">>>> </span>    x[0:10] = numpy.arange(nfile*10,10*(nfile+1))
+<span class="py-prompt">>>> </span>    f.close()</pre>
+      <p>Now read all the files back in at once with <a 
+      href="netCDF3.MFDataset-class.html" class="link">MFDataset</a></p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>f = MFDataset(<span class="py-string">'mftest*nc'</span>)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.variables[<span class="py-string">'x'</span>][:]
+<span class="py-output">[ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24</span>
+<span class="py-output"> 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49</span>
+<span class="py-output"> 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74</span>
+<span class="py-output"> 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Note that MFDataset can only be used to read, not write, 
+      multi-file datasets.</p>
+
+<hr />
+<div class="fields">      <p><strong>Contact:</strong>
+        Jeffrey Whitaker <jeffrey.s.whitaker at noaa.gov>
+      </p>
+      <p><strong>Copyright:</strong>
+        2008 by Jeffrey Whitaker.
+      </p>
+      <p><strong>License:</strong>
+        Permission to use, copy, modify, and distribute this software and 
+        its documentation for any purpose and without fee is hereby 
+        granted, provided that the above copyright notice appear in all 
+        copies and that both the copyright notice and this permission 
+        notice appear in supporting documentation. THE AUTHOR DISCLAIMS ALL
+        WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED 
+        WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 
+        AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
+        OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 
+        PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 
+        TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 
+        PERFORMANCE OF THIS SOFTWARE.
+      </p>
+      <p><strong>Version:</strong>
+        0.9.2
+      </p>
+</div><!-- ==================== CLASSES ==================== -->
+<a name="section-Classes"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Classes</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF3.Dataset-class.html" class="summary-name">Dataset</a><br />
+      Dataset(self, filename, mode="r", clobber=True, 
+        format='NETCDF3_64BIT')
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF3.Dimension-class.html" class="summary-name">Dimension</a><br />
+      Dimension(self, dset, name, size=None)
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF3.MFDataset-class.html" class="summary-name">MFDataset</a><br />
+      MFDataset(self, files, check=False, exclude=[])
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF3.Variable-class.html" class="summary-name">Variable</a><br />
+      Variable(self, dset, name, datatype, dimensions=(), 
+        fill_value=None)
+    </td>
+  </tr>
+</table>
+<!-- ==================== FUNCTIONS ==================== -->
+<a name="section-Functions"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Functions</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3-module.html#chartostring" class="summary-sig-name">chartostring</a>(<span class="summary-sig-arg">b</span>)</span><br />
+      convert a character array to a string array with one less dimension.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3-module.html#date2index" class="summary-sig-name">date2index</a>(<span class="summary-sig-arg">dates</span>,
+        <span class="summary-sig-arg">nctime</span>,
+        <span class="summary-sig-arg">calendar</span>=<span class="summary-sig-default">None</span>,
+        <span class="summary-sig-arg">select</span>=<span class="summary-sig-default">'exact'</span>)</span><br />
+      Return indices of a netCDF time variable corresponding to the given 
+      dates.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3-module.html#date2num" class="summary-sig-name">date2num</a>(<span class="summary-sig-arg">dates</span>,
+        <span class="summary-sig-arg">units</span>,
+        <span class="summary-sig-arg">calendar</span>=<span class="summary-sig-default">'standard'</span>)</span><br />
+      Return numeric time values given datetime objects.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="getlibversion"></a><span class="summary-sig-name">getlibversion</span>()</span><br />
+      returns a string describing the version of the netcdf library used to
+      build the module, and when it was built.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3-module.html#num2date" class="summary-sig-name">num2date</a>(<span class="summary-sig-arg">times</span>,
+        <span class="summary-sig-arg">units</span>,
+        <span class="summary-sig-arg">calendar</span>=<span class="summary-sig-default">'standard'</span>)</span><br />
+      Return datetime objects given numeric time values.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3-module.html#stringtoarr" class="summary-sig-name">stringtoarr</a>(<span class="summary-sig-arg">a</span>,
+        <span class="summary-sig-arg">NUMCHARS</span>)</span><br />
+      convert a string to a character array of length NUMCHARS</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3-module.html#stringtochar" class="summary-sig-name">stringtochar</a>(<span class="summary-sig-arg">a</span>)</span><br />
+      convert a string array to a character array with one extra dimension</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+</table>
+<!-- ==================== VARIABLES ==================== -->
+<a name="section-Variables"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Variables</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code>
+    </td>
+  </tr>
+</table>
+<!-- ==================== FUNCTION DETAILS ==================== -->
+<a name="section-FunctionDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Function Details</span></td>
+</tr>
+</table>
+<a name="chartostring"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">chartostring</span>(<span class="sig-arg">b</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>convert a character array to a string array with one less 
+  dimension.</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>b</code></strong> - Input character array (numpy datatype 'S1'). Will be converted to
+          a array of strings, where each string has a fixed length of 
+          b.shape[-1] characters.</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>A numpy string array with datatype 'SN' and shape b.shape[:-1], 
+          where N=b.shape[-1].</dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="date2index"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">date2index</span>(<span class="sig-arg">dates</span>,
+        <span class="sig-arg">nctime</span>,
+        <span class="sig-arg">calendar</span>=<span class="sig-default">None</span>,
+        <span class="sig-arg">select</span>=<span class="sig-default">'exact'</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Return indices of a netCDF time variable corresponding to the given 
+  dates.</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>dates</code></strong> - A datetime object or a sequence of datetime objects. The datetime
+          objects should not include a time-zone offset.</li>
+        <li><strong class="pname"><code>nctime</code></strong> - A netCDF time variable object. The nctime object must have a 
+          <code>units</code> attribute.</li>
+        <li><strong class="pname"><code>calendar</code></strong> - Describes the calendar used in the time calculation. Valid 
+          calendars <code>'standard', 'gregorian', 'proleptic_gregorian' 
+          'noleap', '365_day', '360_day', 'julian', 'all_leap', 
+          '366_day'</code>. Default is <code>'standard'</code>, which is a 
+          mixed Julian/Gregorian calendar If <code>calendar</code> is None,
+          its value is given by <code>nctime.calendar</code> or 
+          <code>standard</code> if no such attribute exists.</li>
+        <li><strong class="pname"><code>select</code></strong> - <code>'exact', 'before', 'after', 'nearest'</code> The index 
+          selection method. <code>exact</code> will return the indices 
+          perfectly matching the dates given. <code>before</code> and 
+          <code>after</code> will return the indices corresponding to the 
+          dates just before or just after the given dates if an exact match
+          cannot be found. <code>nearest</code> will return the indices 
+          that correspond to the closest dates.</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>an index (indices) of the netCDF time variable corresponding to 
+          the given datetime object(s).</dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="date2num"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">date2num</span>(<span class="sig-arg">dates</span>,
+        <span class="sig-arg">units</span>,
+        <span class="sig-arg">calendar</span>=<span class="sig-default">'standard'</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Return numeric time values given datetime objects. The units of the 
+  numeric time values are described by the <code class="link">units</code> 
+  argument and the <code class="link">calendar</code> keyword. The datetime
+  objects must be in UTC with no time-zone offset.  If there is a time-zone
+  offset in <code>units</code>, it will be applied to the returned numeric 
+  values.</p>
+  <p>Like the matplotlib <code>date2num</code> function, except that it 
+  allows for different units and calendars.  Behaves the same if 
+  <code>units = 'days since 0001-01-01 00:00:00'</code> and <code>calendar 
+  = 'proleptic_gregorian'</code>.</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>dates</code></strong> - A datetime object or a sequence of datetime objects. The datetime
+          objects should not include a time-zone offset.</li>
+        <li><strong class="pname"><code>units</code></strong> - a string of the form <code>'<b>time units</b> since <b>reference 
+          time</b></code>' describing the time units. <b><code>time 
+          units</code></b> can be days, hours, minutes or seconds.  
+          <b><code>reference time</code></b> is the time origin. A valid 
+          choice would be units=<code>'hours since 1800-01-01 00:00:00 
+          -6:00'</code>.</li>
+        <li><strong class="pname"><code>calendar</code></strong> - describes the calendar used in the time calculations. All the 
+          values currently defined in the <a 
+          href="http://cf-pcmdi.llnl.gov/documents/cf-conventions/" 
+          target="_top">CF metadata convention</a> are supported. Valid 
+          calendars <code>'standard', 'gregorian', 'proleptic_gregorian' 
+          'noleap', '365_day', '360_day', 'julian', 'all_leap', 
+          '366_day'</code>. Default is <code>'standard'</code>, which is a 
+          mixed Julian/Gregorian calendar.</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>a numeric time value, or an array of numeric time values.
+          <p>The maximum resolution of the numeric time values is 1 
+          second.</p></dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="num2date"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">num2date</span>(<span class="sig-arg">times</span>,
+        <span class="sig-arg">units</span>,
+        <span class="sig-arg">calendar</span>=<span class="sig-default">'standard'</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Return datetime objects given numeric time values. The units of the 
+  numeric time values are described by the <code>units</code> argument and 
+  the <code>calendar</code> keyword. The returned datetime objects 
+  represent UTC with no time-zone offset, even if the specified 
+  <code>units</code> contain a time-zone offset.</p>
+  <p>Like the matplotlib <code>num2date</code> function, except that it 
+  allows for different units and calendars.  Behaves the same if 
+  <code>units = 'days since 001-01-01 00:00:00'</code> and <code>calendar =
+  'proleptic_gregorian'</code>.</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>times</code></strong> - numeric time values. Maximum resolution is 1 second.</li>
+        <li><strong class="pname"><code>units</code></strong> - a string of the form <code>'<b>time units</b> since <b>reference 
+          time</b></code>' describing the time units. <b><code>time 
+          units</code></b> can be days, hours, minutes or seconds.  
+          <b><code>reference time</code></b> is the time origin. A valid 
+          choice would be units=<code>'hours since 1800-01-01 00:00:00 
+          -6:00'</code>.</li>
+        <li><strong class="pname"><code>calendar</code></strong> - describes the calendar used in the time calculations. All the 
+          values currently defined in the <a 
+          href="http://cf-pcmdi.llnl.gov/documents/cf-conventions/" 
+          target="_top">CF metadata convention</a> are supported. Valid 
+          calendars <code>'standard', 'gregorian', 'proleptic_gregorian' 
+          'noleap', '365_day', '360_day', 'julian', 'all_leap', 
+          '366_day'</code>. Default is <code>'standard'</code>, which is a 
+          mixed Julian/Gregorian calendar.</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>a datetime instance, or an array of datetime instances.
+          <p>The datetime instances returned are 'real' python datetime 
+          objects if the date falls in the Gregorian calendar (i.e. 
+          <code>calendar='proleptic_gregorian'</code>, or <code>calendar = 
+          'standard'</code> or <code>'gregorian'</code> and the date is 
+          after 1582-10-15). Otherwise, they are 'phony' datetime objects 
+          which support some but not all the methods of 'real' python 
+          datetime objects.  This is because the python datetime module 
+          cannot the uses the <code>'proleptic_gregorian'</code> calendar, 
+          even before the switch occured from the Julian calendar in 1582. 
+          The datetime instances do not contain a time-zone offset, even if
+          the specified <code>units</code> contains one.</p></dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="stringtoarr"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">stringtoarr</span>(<span class="sig-arg">a</span>,
+        <span class="sig-arg">NUMCHARS</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>convert a string to a character array of length NUMCHARS</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>a</code></strong> - Input python string.</li>
+        <li><strong class="pname"><code>NUMCHARS</code></strong> - number of characters used to represent string (if len(a) < 
+          NUMCHARS, it will be padded on the right with blanks).</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>A rank 1 numpy character array of length NUMCHARS with datatype 
+          'S1'</dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="stringtochar"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">stringtochar</span>(<span class="sig-arg">a</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>convert a string array to a character array with one extra 
+  dimension</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>a</code></strong> - Input numpy string array with numpy datatype 'SN', where N is the
+          number of characters in each string.  Will be converted to an 
+          array of characters (datatype 'S1') of shape a.shape + (N,).</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>A numpy character array with datatype 'S1' and shape a.shape + 
+          (N,), where N is the length of each string in a.</dd>
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Thu Jul  8 10:58:35 2010
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netCDF3.Dataset-class.html b/docs/netCDF3.Dataset-class.html
new file mode 100644
index 0000000..3e51472
--- /dev/null
+++ b/docs/netCDF3.Dataset-class.html
@@ -0,0 +1,919 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netCDF3.Dataset</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        <a href="netCDF3-module.html">Module netCDF3</a> ::
+        Class Dataset
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== CLASS DESCRIPTION ==================== -->
+<h1 class="epydoc">Class Dataset</h1><p class="nomargin-top"></p>
+<pre class="base-tree">
+object --+
+         |
+        <strong class="uidshort">Dataset</strong>
+</pre>
+
+<dl><dt>Known Subclasses:</dt>
+<dd>
+      <ul class="subclass-list">
+<li><a href="netCDF3.MFDataset-class.html">MFDataset</a></li>  </ul>
+</dd></dl>
+
+<hr />
+<p>Dataset(self, filename, mode="r", clobber=True, 
+  format='NETCDF3_64BIT')</p>
+  <p>A netCDF <a href="netCDF3.Dataset-class.html" class="link">Dataset</a>
+  is a collection of dimensions, variables and attributes. Together they 
+  describe the meaning of data and relations among data fields stored in a 
+  netCDF file.</p>
+  <p><b>Parameters:</b></p>
+  <p><b><code>filename</code></b> - Name of netCDF file to hold 
+  dataset.</p>
+  <p><b>Keywords</b>:</p>
+  <p><b><code>mode</code></b> - access mode. <code>r</code> means 
+  read-only; no data can be modified. <code>w</code> means write; a new 
+  file is created, an existing file with the same name is deleted. 
+  <code>a</code> and <code>r+</code> mean append (in analogy with serial 
+  files); an existing file is opened for reading and writing. Appending 
+  <code>s</code> to modes <code>w</code>, <code>r+</code> or <code>a</code>
+  will enable unbuffered shared access.  Unbuffered acesss may be useful 
+  even if you don't need shared access, since it may be faster for programs
+  that don't access data sequentially.</p>
+  <p><b><code>clobber</code></b> - if <code>True</code> (default), opening 
+  a file with <code>mode='w'</code> will clobber an existing file with the 
+  same name.  if <code>False</code>, an exception will be raised if a file 
+  with the same name already exists.</p>
+  <p><b><code>format</code></b> - underlying file format (either 
+  <code>'NETCDF3_64BIT'</code> or <code>'NETCDF3_CLASSIC'</code>.  Only 
+  relevant if <code>mode = 'w'</code> (if <code>mode = 'r','a'</code> or 
+  <code>'r+'</code> the file format is automatically detected). Default 
+  <code>'NETCDF3_64BIT'</code> (the 64-bit offset version of the netCDF 3 
+  file format, which fully supports 2+ GB files)). 
+  <code>'NETCDF3_CLASSIC'</code> is the classic netCDF 3 file format that 
+  does not handle 2+ Gb files very well.</p>
+  <p><b>Returns:</b></p>
+  <p>a <a href="netCDF3.Dataset-class.html" class="link">Dataset</a> 
+  instance.  All further operations on the netCDF Dataset are accomplised 
+  via <a href="netCDF3.Dataset-class.html" class="link">Dataset</a> 
+  instance methods.</p>
+  <p>A list of attribute names corresponding to global netCDF attributes 
+  defined for the <a href="netCDF3.Dataset-class.html" 
+  class="link">Dataset</a> can be obtained with the <a 
+  href="netCDF3.Dataset-class.html#ncattrs" class="link">ncattrs()</a> 
+  method. These attributes can be created by assigning to an attribute of 
+  the <a href="netCDF3.Dataset-class.html" class="link">Dataset</a> 
+  instance. A dictionary containing all the netCDF attribute name/value 
+  pairs is provided by the <code>__dict__</code> attribute of a <a 
+  href="netCDF3.Dataset-class.html" class="link">Dataset</a> instance.</p>
+  <p>The instance variables <code>dimensions, variables, file_format</code>
+  and <code>path</code> are read-only (and should not be modified by the 
+  user).</p>
+
+<!-- ==================== INSTANCE METHODS ==================== -->
+<a name="section-InstanceMethods"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Methods</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Dataset-class.html#__delattr__" class="summary-sig-name">__delattr__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      x.__delattr__('name') <==> del x.name</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__getattr__"></a><span class="summary-sig-name">__getattr__</span>(<span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Dataset-class.html#__getattribute__" class="summary-sig-name">__getattribute__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      x.__getattribute__('name') <==> x.name</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Dataset-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">filename</span>,
+        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default">"r"</span>,
+        <span class="summary-sig-arg">clobber</span>=<span class="summary-sig-default">True</span>,
+        <span class="summary-sig-arg">format</span>=<span class="summary-sig-default">'NETCDF3_64BIT'</span>)</span><br />
+      x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type">a new object with type S, a subtype of T</span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Dataset-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
+        <span class="summary-sig-arg">S</span>,
+        <span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Dataset-class.html#__setattr__" class="summary-sig-name">__setattr__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      x.__setattr__('name', value) <==> x.name = value</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="close"></a><span class="summary-sig-name">close</span>(<span class="summary-sig-arg">self</span>)</span><br />
+      Close the Dataset.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Dataset-class.html#createDimension" class="summary-sig-name">createDimension</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">dimname</span>,
+        <span class="summary-sig-arg">size</span>=<span class="summary-sig-default">None</span>)</span><br />
+      Creates a new dimension with the given <code>dimname</code> and 
+      <code>size</code>.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Dataset-class.html#createVariable" class="summary-sig-name">createVariable</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">varname</span>,
+        <span class="summary-sig-arg">datatype</span>,
+        <span class="summary-sig-arg">dimensions</span>=<span class="summary-sig-default">()</span>,
+        <span class="summary-sig-arg">fill_value</span>=<span class="summary-sig-default">None</span>)</span><br />
+      Creates a new variable with the given <code>varname</code>, 
+      <code>datatype</code>, and <code>dimensions</code>.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Dataset-class.html#delncattr" class="summary-sig-name">delncattr</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">name</span>,
+        <span class="summary-sig-arg">value</span>)</span><br />
+      delete a netCDF dataset or group attribute.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Dataset-class.html#getncattr" class="summary-sig-name">getncattr</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">name</span>)</span><br />
+      retrievel a netCDF dataset attribute.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="ncattrs"></a><span class="summary-sig-name">ncattrs</span>(<span class="summary-sig-arg">self</span>)</span><br />
+      return netCDF global attribute names for this <a 
+      href="netCDF3.Dataset-class.html" class="link">Dataset</a> in a list.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="renameDimension"></a><span class="summary-sig-name">renameDimension</span>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">oldname</span>,
+        <span class="summary-sig-arg">newname</span>)</span><br />
+      rename a <a href="netCDF3.Dimension-class.html" 
+      class="link">Dimension</a> named <code>oldname</code> to 
+      <code>newname</code>.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="renameVariable"></a><span class="summary-sig-name">renameVariable</span>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">oldname</span>,
+        <span class="summary-sig-arg">newname</span>)</span><br />
+      rename a <a href="netCDF3.Variable-class.html" 
+      class="link">Variable</a> named <code>oldname</code> to 
+      <code>newname</code></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Dataset-class.html#set_fill_off" class="summary-sig-name">set_fill_off</a>(<span class="summary-sig-arg">self</span>)</span><br />
+      Sets the fill mode for a <a href="netCDF3.Dataset-class.html" 
+      class="link">Dataset</a> open for writing to <code>off</code>.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Dataset-class.html#set_fill_on" class="summary-sig-name">set_fill_on</a>(<span class="summary-sig-arg">self</span>)</span><br />
+      Sets the fill mode for a <a href="netCDF3.Dataset-class.html" 
+      class="link">Dataset</a> open for writing to <code>on</code>.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Dataset-class.html#setncattr" class="summary-sig-name">setncattr</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">name</span>,
+        <span class="summary-sig-arg">value</span>)</span><br />
+      set a netCDF dataset attribute using name,value pair.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="sync"></a><span class="summary-sig-name">sync</span>(<span class="summary-sig-arg">self</span>)</span><br />
+      Writes all buffered data in the <a href="netCDF3.Dataset-class.html" 
+      class="link">Dataset</a> to the disk file.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__format__</code>,
+      <code>__hash__</code>,
+      <code>__reduce__</code>,
+      <code>__reduce_ex__</code>,
+      <code>__repr__</code>,
+      <code>__sizeof__</code>,
+      <code>__str__</code>,
+      <code>__subclasshook__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== INSTANCE VARIABLES ==================== -->
+<a name="section-InstanceVariables"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Variables</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="dimensions"></a><span class="summary-name">dimensions</span><br />
+      The <code>dimensions</code> dictionary maps the names of dimensions 
+      defined for the <a href="netCDF3.Dataset-class.html" 
+      class="link">Dataset</a> to instances of the <a 
+      href="netCDF3.Dimension-class.html" class="link">Dimension</a> class.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="file_format"></a><span class="summary-name">file_format</span><br />
+      The <code>file_format</code> attribute describes the netCDF file 
+      format version, either <code>NETCDF3_CLASSIC</code> or or 
+      <code>NETCDF3_64BIT</code>.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="variables"></a><span class="summary-name">variables</span><br />
+      The <code>variables</code> dictionary maps the names of variables 
+      defined for this <a href="netCDF3.Dataset-class.html" 
+      class="link">Dataset</a> to instances of the <a 
+      href="netCDF3.Variable-class.html" class="link">Variable</a> class.
+    </td>
+  </tr>
+</table>
+<!-- ==================== PROPERTIES ==================== -->
+<a name="section-Properties"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Properties</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="maskanscale"></a><span class="summary-name">maskanscale</span>
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__class__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== METHOD DETAILS ==================== -->
+<a name="section-MethodDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Method Details</span></td>
+</tr>
+</table>
+<a name="__delattr__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__delattr__</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__delattr__('name') <==> del x.name</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__delattr__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__getattribute__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getattribute__</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__getattribute__('name') <==> x.name</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__getattribute__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__init__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">filename</span>,
+        <span class="sig-arg">mode</span>=<span class="sig-default">"r"</span>,
+        <span class="sig-arg">clobber</span>=<span class="sig-default">True</span>,
+        <span class="sig-arg">format</span>=<span class="sig-default">'NETCDF3_64BIT'</span>)</span>
+    <br /><em class="fname">(Constructor)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__init__(...) initializes x; see x.__class__.__doc__ for 
+  signature</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__init__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__new__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
+        <span class="sig-arg">S</span>,
+        <span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  
+  <dl class="fields">
+    <dt>Returns: a new object with type S, a subtype of T</dt>
+    <dt>Overrides:
+        object.__new__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__setattr__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__setattr__('name', value) <==> x.name = value</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__setattr__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="createDimension"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">createDimension</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">dimname</span>,
+        <span class="sig-arg">size</span>=<span class="sig-default">None</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Creates a new dimension with the given <code>dimname</code> and 
+  <code>size</code>.</p>
+  <p><code>size</code> must be a positive integer or <code>None</code>, 
+  which stands for "unlimited" (default is <code>None</code>). 
+  Specifying a size of 0 also results in an unlimited dimension. The return
+  value is the <a href="netCDF3.Dimension-class.html" 
+  class="link">Dimension</a> class instance describing the new dimension.  
+  To determine the current maximum size of the dimension, use the 
+  <code>len</code> function on the <a href="netCDF3.Dimension-class.html" 
+  class="link">Dimension</a> instance. To determine if a dimension is 
+  'unlimited', use the <code>isunlimited()</code> method of the <a 
+  href="netCDF3.Dimension-class.html" class="link">Dimension</a> 
+  instance.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="createVariable"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">createVariable</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">varname</span>,
+        <span class="sig-arg">datatype</span>,
+        <span class="sig-arg">dimensions</span>=<span class="sig-default">()</span>,
+        <span class="sig-arg">fill_value</span>=<span class="sig-default">None</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Creates a new variable with the given <code>varname</code>, 
+  <code>datatype</code>, and <code>dimensions</code>. If dimensions are not
+  given, the variable is assumed to be a scalar.</p>
+  <p>The <code>datatype</code> can be a numpy datatype object, or a string 
+  that describes a numpy dtype object (like the <code>dtype.str</code> 
+  attribue of a numpy array). Supported specifiers include: <code>'S1' or 
+  'c' (NC_CHAR), 'i1' or 'b' or 'B' (NC_BYTE), 'i2' or 'h' or 's' 
+  (NC_SHORT), 'u2' (NC_USHORT), 'i4' or 'i' or 'l' (NC_INT), 'f4' or 'f' 
+  (NC_FLOAT), 'f8' or 'd' (NC_DOUBLE)</code>.</p>
+  <p>Data from netCDF variables is presented to python as numpy arrays with
+  the corresponding data type.</p>
+  <p><code>dimensions</code> must be a tuple containing dimension names 
+  (strings) that have been defined previously using 
+  <code>createDimension</code>. The default value is an empty tuple, which 
+  means the variable is a scalar.</p>
+  <p>The optional keyword <code>fill_value</code> can be used to override 
+  the default netCDF <code>_FillValue</code> (the value that the variable 
+  gets filled with before any data is written to it).</p>
+  <p>The return value is the <a href="netCDF3.Variable-class.html" 
+  class="link">Variable</a> class instance describing the new variable.</p>
+  <p>A list of names corresponding to netCDF variable attributes can be 
+  obtained with the <a href="netCDF3.Variable-class.html" 
+  class="link">Variable</a> method <code>ncattrs()</code>. A dictionary 
+  containing all the netCDF attribute name/value pairs is provided by the 
+  <code>__dict__</code> attribute of a <a 
+  href="netCDF3.Variable-class.html" class="link">Variable</a> 
+  instance.</p>
+  <p><a href="netCDF3.Variable-class.html" class="link">Variable</a> 
+  instances behave much like array objects. Data can be assigned to or 
+  retrieved from a variable with indexing and slicing operations on the <a 
+  href="netCDF3.Variable-class.html" class="link">Variable</a> instance. A 
+  <a href="netCDF3.Variable-class.html" class="link">Variable</a> instance 
+  has four standard attributes: <code>dimensions, dtype, shape, 
+  ndim</code>. Application programs should never modify these attributes. 
+  The <code>dimensions</code> attribute is a tuple containing the names of 
+  the dimensions associated with this variable. The <code>dtype</code> 
+  attribute is a string describing the variable's data type (<code>i4, f8, 
+  S1,</code> etc). The <code>shape</code> attribute is a tuple describing 
+  the current sizes of all the variable's dimensions.  The 
+  <code>ndim</code> attribute is the number of variable dimensions.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="delncattr"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">delncattr</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">name</span>,
+        <span class="sig-arg">value</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>delete a netCDF dataset or group attribute.  Only use if you need to 
+  delete a netCDF attribute with the same name as one of the reserved 
+  python attributes.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="getncattr"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">getncattr</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">name</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>retrievel a netCDF dataset attribute.  Only use if you need to set a 
+  netCDF attribute with the same name as one of the reserved python 
+  attributes.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="set_fill_off"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_fill_off</span>(<span class="sig-arg">self</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Sets the fill mode for a <a href="netCDF3.Dataset-class.html" 
+  class="link">Dataset</a> open for writing to <code>off</code>.</p>
+  <p>This will prevent the data from being pre-filled with fill values, 
+  which may result in some performance improvements. However, you must then
+  make sure the data is actually written before being read.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="set_fill_on"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_fill_on</span>(<span class="sig-arg">self</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Sets the fill mode for a <a href="netCDF3.Dataset-class.html" 
+  class="link">Dataset</a> open for writing to <code>on</code>.</p>
+  <p>This causes data to be pre-filled with fill values. The fill values 
+  can be controlled by the variable's <code>_Fill_Value</code> attribute, 
+  but is usually sufficient to the use the netCDF default 
+  <code>_Fill_Value</code> (defined separately for each variable type). The
+  default behavior of the netCDF library correspongs to 
+  <code>set_fill_on</code>.  Data which are equal to the 
+  <code>_Fill_Value</code> indicate that the variable was created, but 
+  never written to.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="setncattr"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">setncattr</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">name</span>,
+        <span class="sig-arg">value</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>set a netCDF dataset attribute using name,value pair.  Only use if you
+  need to set a netCDF attribute with the same name as one of the reserved 
+  python attributes.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Thu Jul  8 10:58:35 2010
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netCDF3.Dimension-class.html b/docs/netCDF3.Dimension-class.html
new file mode 100644
index 0000000..de11635
--- /dev/null
+++ b/docs/netCDF3.Dimension-class.html
@@ -0,0 +1,306 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netCDF3.Dimension</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        <a href="netCDF3-module.html">Module netCDF3</a> ::
+        Class Dimension
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== CLASS DESCRIPTION ==================== -->
+<h1 class="epydoc">Class Dimension</h1><p class="nomargin-top"></p>
+<pre class="base-tree">
+object --+
+         |
+        <strong class="uidshort">Dimension</strong>
+</pre>
+
+<hr />
+<p>Dimension(self, dset, name, size=None)</p>
+  <p>A netCDF <a href="netCDF3.Dimension-class.html" 
+  class="link">Dimension</a> is used to describe the coordinates of a <a 
+  href="netCDF3.Variable-class.html" class="link">Variable</a>.</p>
+  <p><a href="netCDF3.Dimension-class.html" class="link">Dimension</a> 
+  instances should be created using the <a 
+  href="netCDF3.Dataset-class.html#createDimension" 
+  class="link">createDimension</a> method of a <a 
+  href="netCDF3.Dataset-class.html" class="link">Dataset</a> instance, not 
+  using this class directly.</p>
+  <p><b>Parameters:</b></p>
+  <p><b><code>dset</code></b>  - Dataset instance.</p>
+  <p><b><code>name</code></b>  - Name of the dimension.</p>
+  <p><b>Keywords:</b></p>
+  <p><b><code>size</code></b>  - Size of the dimension. <code>None</code> 
+  or 0 means unlimited. (Default <code>None</code>).</p>
+  <p><b>Returns:</b></p>
+  <p>a <a href="netCDF3.Dimension-class.html" class="link">Dimension</a> 
+  instance.  All further operations on the netCDF Dimension are accomplised
+  via <a href="netCDF3.Dimension-class.html" class="link">Dimension</a> 
+  instance methods.</p>
+  <p>The current maximum size of a <a href="netCDF3.Dimension-class.html" 
+  class="link">Dimension</a> instance can be obtained by calling the python
+  <code>len</code> function on the <a href="netCDF3.Dimension-class.html" 
+  class="link">Dimension</a> instance. The <code>isunlimited()</code> 
+  method of a <a href="netCDF3.Dimension-class.html" 
+  class="link">Dimension</a> instance can be used to determine if the 
+  dimension is unlimited</p>
+
+<!-- ==================== INSTANCE METHODS ==================== -->
+<a name="section-InstanceMethods"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Methods</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Dimension-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">dset</span>,
+        <span class="summary-sig-arg">name</span>,
+        <span class="summary-sig-arg">size</span>=<span class="summary-sig-default">None</span>)</span><br />
+      x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__len__"></a><span class="summary-sig-name">__len__</span>(<span class="summary-sig-arg">x</span>)</span><br />
+      len(x)</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type">a new object with type S, a subtype of T</span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Dimension-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
+        <span class="summary-sig-arg">S</span>,
+        <span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="isunlimited"></a><span class="summary-sig-name">isunlimited</span>(<span class="summary-sig-arg">self</span>)</span><br />
+      returns <code>True</code> if the <a 
+      href="netCDF3.Dimension-class.html" class="link">Dimension</a> 
+      instance is unlimited, <code>False</code> otherwise.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__delattr__</code>,
+      <code>__format__</code>,
+      <code>__getattribute__</code>,
+      <code>__hash__</code>,
+      <code>__reduce__</code>,
+      <code>__reduce_ex__</code>,
+      <code>__repr__</code>,
+      <code>__setattr__</code>,
+      <code>__sizeof__</code>,
+      <code>__str__</code>,
+      <code>__subclasshook__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== PROPERTIES ==================== -->
+<a name="section-Properties"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Properties</span></td>
+</tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__class__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== METHOD DETAILS ==================== -->
+<a name="section-MethodDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Method Details</span></td>
+</tr>
+</table>
+<a name="__init__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">dset</span>,
+        <span class="sig-arg">name</span>,
+        <span class="sig-arg">size</span>=<span class="sig-default">None</span>)</span>
+    <br /><em class="fname">(Constructor)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__init__(...) initializes x; see x.__class__.__doc__ for 
+  signature</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__init__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__new__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
+        <span class="sig-arg">S</span>,
+        <span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  
+  <dl class="fields">
+    <dt>Returns: a new object with type S, a subtype of T</dt>
+    <dt>Overrides:
+        object.__new__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Thu Jul  8 10:58:35 2010
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netCDF3.MFDataset-class.html b/docs/netCDF3.MFDataset-class.html
new file mode 100644
index 0000000..19db979
--- /dev/null
+++ b/docs/netCDF3.MFDataset-class.html
@@ -0,0 +1,437 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netCDF3.MFDataset</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        <a href="netCDF3-module.html">Module netCDF3</a> ::
+        Class MFDataset
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== CLASS DESCRIPTION ==================== -->
+<h1 class="epydoc">Class MFDataset</h1><p class="nomargin-top"></p>
+<pre class="base-tree">
+object --+    
+         |    
+   <a href="netCDF3.Dataset-class.html">Dataset</a> --+
+             |
+            <strong class="uidshort">MFDataset</strong>
+</pre>
+
+<hr />
+<p>MFDataset(self, files, check=False, exclude=[])</p>
+  <p>Class for reading multi-file netCDF Datasets, making variables 
+  spanning multiple files appear as if they were in one file.</p>
+  <p>Datasets must be in <code>NETCDF4_CLASSIC, NETCDF3_CLASSIC or 
+  NETCDF3_64BIT</code> format (<code>NETCDF4</code> Datasets won't 
+  work).</p>
+  <p>Adapted from <a href="http://pysclint.sourceforge.net/pycdf" 
+  target="_top">pycdf</a> by Andre Gosselin.</p>
+  <p>Example usage:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">import</span> numpy
+<span class="py-prompt">>>> </span><span class="py-comment"># create a series of netCDF files with a variable sharing</span>
+<span class="py-prompt">>>> </span><span class="py-comment"># the same unlimited dimension.</span>
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> nfile <span class="py-keyword">in</span> range(10):
+<span class="py-prompt">>>> </span>    f = Dataset(<span class="py-string">'mftest'</span>+repr(nfile)+<span class="py-string">'.nc'</span>,<span class="py-string">'w'</span>)
+<span class="py-prompt">>>> </span>    f.createDimension(<span class="py-string">'x'</span>,None)
+<span class="py-prompt">>>> </span>    x = f.createVariable(<span class="py-string">'x'</span>,<span class="py-string">'i'</span>,(<span class="py-string">'x'</span>,))
+<span class="py-prompt">>>> </span>    x[0:10] = numpy.arange(nfile*10,10*(nfile+1))
+<span class="py-prompt">>>> </span>    f.close()
+<span class="py-prompt">>>> </span><span class="py-comment"># now read all those files in at once, in one Dataset.</span>
+<span class="py-prompt">>>> </span>f = MFDataset(<span class="py-string">'mftest*nc'</span>)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.variables[<span class="py-string">'x'</span>][:]
+<span class="py-output">[ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24</span>
+<span class="py-output"> 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49</span>
+<span class="py-output"> 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74</span>
+<span class="py-output"> 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99]</span></pre>
+
+<!-- ==================== INSTANCE METHODS ==================== -->
+<a name="section-InstanceMethods"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Methods</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.MFDataset-class.html#__getattribute__" class="summary-sig-name">__getattribute__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      x.__getattribute__('name') <==> x.name</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.MFDataset-class.html#__init__" class="summary-sig-name">__init__</a>()</span><br />
+      Open a Dataset spanning multiple files, making it look as if it was a
+      single file.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.MFDataset-class.html#__setattr__" class="summary-sig-name">__setattr__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      override base class attribute creation</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.MFDataset-class.html#close" class="summary-sig-name">close</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      Close the Dataset.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.MFDataset-class.html#ncattrs" class="summary-sig-name">ncattrs</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      return netCDF global attribute names for this <a 
+      href="netCDF3.Dataset-class.html" class="link">Dataset</a> in a list.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="netCDF3.Dataset-class.html">Dataset</a></code></b>:
+      <code><a href="netCDF3.Dataset-class.html#__delattr__">__delattr__</a></code>,
+      <code><a href="netCDF3.Dataset-class.html#__getattr__">__getattr__</a></code>,
+      <code><a href="netCDF3.Dataset-class.html#__new__">__new__</a></code>,
+      <code><a href="netCDF3.Dataset-class.html#createDimension">createDimension</a></code>,
+      <code><a href="netCDF3.Dataset-class.html#createVariable">createVariable</a></code>,
+      <code><a href="netCDF3.Dataset-class.html#delncattr">delncattr</a></code>,
+      <code><a href="netCDF3.Dataset-class.html#getncattr">getncattr</a></code>,
+      <code><a href="netCDF3.Dataset-class.html#renameDimension">renameDimension</a></code>,
+      <code><a href="netCDF3.Dataset-class.html#renameVariable">renameVariable</a></code>,
+      <code><a href="netCDF3.Dataset-class.html#set_fill_off">set_fill_off</a></code>,
+      <code><a href="netCDF3.Dataset-class.html#set_fill_on">set_fill_on</a></code>,
+      <code><a href="netCDF3.Dataset-class.html#setncattr">setncattr</a></code>,
+      <code><a href="netCDF3.Dataset-class.html#sync">sync</a></code>
+      </p>
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__format__</code>,
+      <code>__hash__</code>,
+      <code>__reduce__</code>,
+      <code>__reduce_ex__</code>,
+      <code>__repr__</code>,
+      <code>__sizeof__</code>,
+      <code>__str__</code>,
+      <code>__subclasshook__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== INSTANCE VARIABLES ==================== -->
+<a name="section-InstanceVariables"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Variables</span></td>
+</tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="netCDF3.Dataset-class.html">Dataset</a></code></b>:
+      <code><a href="netCDF3.Dataset-class.html#dimensions">dimensions</a></code>,
+      <code><a href="netCDF3.Dataset-class.html#file_format">file_format</a></code>,
+      <code><a href="netCDF3.Dataset-class.html#variables">variables</a></code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== PROPERTIES ==================== -->
+<a name="section-Properties"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Properties</span></td>
+</tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="netCDF3.Dataset-class.html">Dataset</a></code></b>:
+      <code><a href="netCDF3.Dataset-class.html#maskanscale">maskanscale</a></code>
+      </p>
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__class__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== METHOD DETAILS ==================== -->
+<a name="section-MethodDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Method Details</span></td>
+</tr>
+</table>
+<a name="__getattribute__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getattribute__</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__getattribute__('name') <==> x.name</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__getattribute__
+        <dd><em class="note">(inherited documentation)</em></dd>
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__init__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>()</span>
+    <br /><em class="fname">(Constructor)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Open a Dataset spanning multiple files, making it look as if it was a 
+  single file. Variables in the list of files that share the same unlimited
+  dimension are aggregated.</p>
+  <p>Adapted from <a href="http://pysclint.sourceforge.net/pycdf" 
+  target="_top">pycdf</a> by Andre Gosselin.</p>
+  <p>Usage:</p>
+  <p>nc = MFDataset(files, check=False, exclude=[])</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>files</code></strong> - either a sequence of netCDF files or a string with a wildcard 
+          (converted to a sorted list of files using glob)  The first file 
+          in the list will become the "master" file, defining all
+          the record variables (variables with an unlimited dimension) 
+          which may span subsequent files. Attribute access returns 
+          attributes only from "master" file. The files are 
+          always opened in read-only mode.</li>
+        <li><strong class="pname"><code>check</code></strong> - True if you want to do consistency checking to ensure the correct
+          variables structure for all of the netcdf files.  Checking makes 
+          the initialization of the MFDataset instance much slower. Default
+          is False.</li>
+        <li><strong class="pname"><code>exclude</code></strong> - A list of variable names to exclude from aggregation. Default is 
+          an empty list.</li>
+    </ul></dd>
+    <dt>Overrides:
+        object.__init__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__setattr__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>override base class attribute creation</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__setattr__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="close"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">close</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Close the Dataset.</p>
+  <dl class="fields">
+    <dt>Overrides:
+        <a href="netCDF3.Dataset-class.html#close">Dataset.close</a>
+        <dd><em class="note">(inherited documentation)</em></dd>
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="ncattrs"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">ncattrs</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>return netCDF global attribute names for this <a 
+  href="netCDF3.Dataset-class.html" class="link">Dataset</a> in a list.</p>
+  <dl class="fields">
+    <dt>Overrides:
+        <a href="netCDF3.Dataset-class.html#ncattrs">Dataset.ncattrs</a>
+        <dd><em class="note">(inherited documentation)</em></dd>
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Thu Jul  8 10:58:35 2010
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netCDF3.Variable-class.html b/docs/netCDF3.Variable-class.html
new file mode 100644
index 0000000..28fab39
--- /dev/null
+++ b/docs/netCDF3.Variable-class.html
@@ -0,0 +1,842 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netCDF3.Variable</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        <a href="netCDF3-module.html">Module netCDF3</a> ::
+        Class Variable
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== CLASS DESCRIPTION ==================== -->
+<h1 class="epydoc">Class Variable</h1><p class="nomargin-top"></p>
+<pre class="base-tree">
+object --+
+         |
+        <strong class="uidshort">Variable</strong>
+</pre>
+
+<hr />
+<p>Variable(self, dset, name, datatype, dimensions=(), 
+  fill_value=None)</p>
+  <p>A netCDF <a href="netCDF3.Variable-class.html" 
+  class="link">Variable</a> is used to read and write netCDF data.  They 
+  are analagous to numpy array objects.</p>
+  <p><a href="netCDF3.Variable-class.html" class="link">Variable</a> 
+  instances should be created using the <a 
+  href="netCDF3.Dataset-class.html#createVariable" 
+  class="link">createVariable</a> method of a <a 
+  href="netCDF3.Dataset-class.html" class="link">Dataset</a> instance, not 
+  using this class directly.</p>
+  <p><b>Parameters:</b></p>
+  <p><b><code>dset</code></b>  - Dataset instance.</p>
+  <p><b><code>name</code></b>  - Name of the variable.</p>
+  <p><b><code>datatype</code></b> - <a href="netCDF3.Variable-class.html" 
+  class="link">Variable</a> data type. Can be specified by providing a 
+  numpy dtype object, or a string that describes a numpy dtype object. 
+  Supported values, corresponding to <code>str</code> attribute of numpy 
+  dtype objects, include <code>'f4'</code> (32-bit floating point), 
+  <code>'f8'</code> (64-bit floating point), <code>'i4'</code> (32-bit 
+  signed integer), <code>'i2'</code> (16-bit signed integer), 
+  <code>'i4'</code> (8-bit singed integer), <code>'i1'</code> (8-bit signed
+  integer), or <code>'S1'</code> (single-character string).  From 
+  compatibility with Scientific.IO.NetCDF, the old Numeric single character
+  typecodes can also be used (<code>'f'</code> instead of 
+  <code>'f4'</code>, <code>'d'</code> instead of <code>'f8'</code>, 
+  <code>'h'</code> or <code>'s'</code> instead of <code>'i2'</code>, 
+  <code>'b'</code> or <code>'B'</code> instead of <code>'i1'</code>, 
+  <code>'c'</code> instead of <code>'S1'</code>, and <code>'i'</code> or 
+  <code>'l'</code> instead of <code>'i4'</code>).</p>
+  <p><b>Keywords:</b></p>
+  <p><b><code>dimensions</code></b> - a tuple containing the variable's 
+  dimension names (defined previously with <code>createDimension</code>). 
+  Default is an empty tuple which means the variable is a scalar (and 
+  therefore has no dimensions).</p>
+  <p><b><code>fill_value</code></b> - If specified, the default netCDF 
+  <code>_FillValue</code> (the value that the variable gets filled with 
+  before any data is written to it) is replaced with this value.</p>
+  <p><b>Returns:</b></p>
+  <p>a <a href="netCDF3.Variable-class.html" class="link">Variable</a> 
+  instance.  All further operations on the netCDF Variable are accomplised 
+  via <a href="netCDF3.Variable-class.html" class="link">Variable</a> 
+  instance methods.</p>
+  <p>A list of attribute names corresponding to netCDF attributes defined 
+  for the variable can be obtained with the <code>ncattrs()</code> method. 
+  These attributes can be created by assigning to an attribute of the <a 
+  href="netCDF3.Variable-class.html" class="link">Variable</a> instance. A 
+  dictionary containing all the netCDF attribute name/value pairs is 
+  provided by the <code>__dict__</code> attribute of a <a 
+  href="netCDF3.Variable-class.html" class="link">Variable</a> 
+  instance.</p>
+  <p>The instance variables <code>dimensions, dtype, ndim, shape</code> are
+  read-only (and should not be modified by the user).</p>
+
+<!-- ==================== INSTANCE METHODS ==================== -->
+<a name="section-InstanceMethods"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Methods</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Variable-class.html#__delattr__" class="summary-sig-name">__delattr__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      x.__delattr__('name') <==> del x.name</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__delitem__"></a><span class="summary-sig-name">__delitem__</span>(<span class="summary-sig-arg">x</span>,
+        <span class="summary-sig-arg">y</span>)</span><br />
+      del x[y]</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__getattr__"></a><span class="summary-sig-name">__getattr__</span>(<span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Variable-class.html#__getattribute__" class="summary-sig-name">__getattribute__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      x.__getattribute__('name') <==> x.name</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Variable-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">dset</span>,
+        <span class="summary-sig-arg">name</span>,
+        <span class="summary-sig-arg">datatype</span>,
+        <span class="summary-sig-arg">dimensions</span>=<span class="summary-sig-default">()</span>,
+        <span class="summary-sig-arg">fill_value</span>=<span class="summary-sig-default">None</span>)</span><br />
+      x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__len__"></a><span class="summary-sig-name">__len__</span>(<span class="summary-sig-arg">x</span>)</span><br />
+      len(x)</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type">a new object with type S, a subtype of T</span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Variable-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
+        <span class="summary-sig-arg">S</span>,
+        <span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Variable-class.html#__setattr__" class="summary-sig-name">__setattr__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      x.__setattr__('name', value) <==> x.name = value</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__setitem__"></a><span class="summary-sig-name">__setitem__</span>(<span class="summary-sig-arg">x</span>,
+        <span class="summary-sig-arg">i</span>,
+        <span class="summary-sig-arg">y</span>)</span><br />
+      x[i]=y</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Variable-class.html#assignValue" class="summary-sig-name">assignValue</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">val</span>)</span><br />
+      assign a value to a scalar variable.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Variable-class.html#delncattr" class="summary-sig-name">delncattr</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">name</span>,
+        <span class="summary-sig-arg">value</span>)</span><br />
+      delete a netCDF variable attribute.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Variable-class.html#getValue" class="summary-sig-name">getValue</a>(<span class="summary-sig-arg">self</span>)</span><br />
+      get the value of a scalar variable.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Variable-class.html#getncattr" class="summary-sig-name">getncattr</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">name</span>)</span><br />
+      retrievel a netCDF variable attribute.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="ncattrs"></a><span class="summary-sig-name">ncattrs</span>(<span class="summary-sig-arg">self</span>)</span><br />
+      return netCDF attribute names for this <a 
+      href="netCDF3.Variable-class.html" class="link">Variable</a> in a 
+      list.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Variable-class.html#set_auto_maskandscale" class="summary-sig-name">set_auto_maskandscale</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">maskandscale</span>)</span><br />
+      turn on or off automatic conversion of variable data to and from 
+      masked arrays and automatic packing/unpacking of variable data using 
+      <code>scale_factor</code> and <code>add_offset</code> attributes.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF3.Variable-class.html#setncattr" class="summary-sig-name">setncattr</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">name</span>,
+        <span class="summary-sig-arg">value</span>)</span><br />
+      set a netCDF variable attribute using name,value pair.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__format__</code>,
+      <code>__hash__</code>,
+      <code>__reduce__</code>,
+      <code>__reduce_ex__</code>,
+      <code>__repr__</code>,
+      <code>__sizeof__</code>,
+      <code>__str__</code>,
+      <code>__subclasshook__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== INSTANCE VARIABLES ==================== -->
+<a name="section-InstanceVariables"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Variables</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="dimensions"></a><span class="summary-name">dimensions</span><br />
+      A tuple containing the names of the dimensions associated with this 
+      variable.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="dtype"></a><span class="summary-name">dtype</span><br />
+      A numpy dtype object describing the variable's data type.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="ndim"></a><span class="summary-name">ndim</span><br />
+      The number of variable dimensions.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="shape"></a><span class="summary-name">shape</span><br />
+      a tuple describing the current size of all the variable's dimensions.
+    </td>
+  </tr>
+</table>
+<!-- ==================== PROPERTIES ==================== -->
+<a name="section-Properties"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Properties</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="maskandscale"></a><span class="summary-name">maskandscale</span>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="size"></a><span class="summary-name">size</span><br />
+      Return the number of stored elements.
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__class__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== METHOD DETAILS ==================== -->
+<a name="section-MethodDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Method Details</span></td>
+</tr>
+</table>
+<a name="__delattr__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__delattr__</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__delattr__('name') <==> del x.name</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__delattr__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__getattribute__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getattribute__</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__getattribute__('name') <==> x.name</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__getattribute__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__init__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">dset</span>,
+        <span class="sig-arg">name</span>,
+        <span class="sig-arg">datatype</span>,
+        <span class="sig-arg">dimensions</span>=<span class="sig-default">()</span>,
+        <span class="sig-arg">fill_value</span>=<span class="sig-default">None</span>)</span>
+    <br /><em class="fname">(Constructor)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__init__(...) initializes x; see x.__class__.__doc__ for 
+  signature</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__init__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__new__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
+        <span class="sig-arg">S</span>,
+        <span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  
+  <dl class="fields">
+    <dt>Returns: a new object with type S, a subtype of T</dt>
+    <dt>Overrides:
+        object.__new__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__setattr__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__setattr__('name', value) <==> x.name = value</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__setattr__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="assignValue"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">assignValue</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">val</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>assign a value to a scalar variable.  Provided for compatibility with 
+  Scientific.IO.NetCDF, can also be done by assigning to a slice ([:]).</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="delncattr"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">delncattr</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">name</span>,
+        <span class="sig-arg">value</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>delete a netCDF variable attribute.  Only use if you need to delete a 
+  netCDF attribute with the same name as one of the reserved python 
+  attributes.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="getValue"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">getValue</span>(<span class="sig-arg">self</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>get the value of a scalar variable.  Provided for compatibility with 
+  Scientific.IO.NetCDF, can also be done by slicing ([:]).</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="getncattr"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">getncattr</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">name</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>retrievel a netCDF variable attribute.  Only use if you need to set a 
+  netCDF attribute with the same name as one of the reserved python 
+  attributes.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="set_auto_maskandscale"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_auto_maskandscale</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">maskandscale</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>turn on or off automatic conversion of variable data to and from 
+  masked arrays and automatic packing/unpacking of variable data using 
+  <code>scale_factor</code> and <code>add_offset</code> attributes.</p>
+  <p>If <code>maskandscale</code> is set to <code>True</code>, when data is
+  read from a variable it is converted to a masked array if any of the 
+  values are exactly equal to the either the netCDF _FillValue or the value
+  specified by the missing_value variable attribute. The fill_value of the 
+  masked array is set to the missing_value attribute (if it exists), 
+  otherwise the netCDF _FillValue attribute (which has a default value for 
+  each data type).  When data is written to a variable, the masked array is
+  converted back to a regular numpy array by replacing all the masked 
+  values by the fill_value of the masked array.</p>
+  <p>If <code>maskandscale</code> is set to <code>True</code>, and the 
+  variable has a <code>scale_factor</code> and an <code>add_offset</code> 
+  attribute, then data read from that variable is unpacked using:</p>
+<pre class="literalblock">
+   data = self.scale_factor*data + self.add_offset
+</pre>
+  <p>When data is written to a variable it is packed using:</p>
+<pre class="literalblock">
+   data = (data - self.add_offset)/self.scale_factor
+</pre>
+  <p>For more information on how <code>scale_factor</code> and 
+  <code>add_offset</code> can be used to provide simple compression, see <a
+  href="http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml" 
+  target="_top">http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml</a>.</p>
+  <p>The default value of <code>maskandscale</code> is <code>True</code> 
+  (automatic conversions are performed).</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="setncattr"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">setncattr</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">name</span>,
+        <span class="sig-arg">value</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>set a netCDF variable attribute using name,value pair.  Only use if 
+  you need to set a netCDF attribute with the same name as one of the 
+  reserved python attributes.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Thu Jul  8 10:58:35 2010
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netCDF4-module.html b/docs/netCDF4-module.html
new file mode 100644
index 0000000..bc76023
--- /dev/null
+++ b/docs/netCDF4-module.html
@@ -0,0 +1,1625 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netCDF4</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th bgcolor="#70b0f0" class="navbar-select"
+          >   Home   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        Module netCDF4
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== MODULE DESCRIPTION ==================== -->
+<h1 class="epydoc">Module netCDF4</h1><p class="nomargin-top"></p>
+<h1 class="heading">Introduction</h1>
+    <p>Python interface to the netCDF version 4 library.  <a 
+    href="http://www.unidata.ucar.edu/software/netcdf/netcdf-4" 
+    target="_top">netCDF version 4</a> has many features not found in 
+    earlier versions of the library and is implemented on top of <a 
+    href="http://www.hdfgroup.org/HDF5" target="_top">HDF5</a>. This module
+    can read and write files in both the new netCDF 4 and the old netCDF 3 
+    format, and can create files that are readable by HDF5 clients. The API
+    modelled after <a 
+    href="http://dirac.cnrs-orleans.fr/plone/software/scientificpython/" 
+    target="_top">Scientific.IO.NetCDF</a>, and should be familiar to users
+    of that module.</p>
+    <p>Most new features of netCDF 4 are implemented, such as multiple 
+    unlimited dimensions, groups and zlib data compression.  All the new 
+    numeric data types (such as 64 bit and unsigned integer types) are 
+    implemented. Compound and variable length (vlen) data types are 
+    supported, but the enum and opaque data types are not. Mixtures of 
+    compound and vlen data types (compound types containing vlens, and 
+    vlens containing compound types) are not supported.</p>
+  <h1 class="heading">Download</h1>
+    <ul>
+      <li>
+        Latest bleeding-edge code from the <a 
+        href="http://github.com/Unidata/netcdf4-python" 
+        target="_top">github repository</a>.
+      </li>
+      <li>
+        Latest <a href="https://pypi.python.org/pypi/netCDF4" 
+        target="_top">releases</a> (source code and windows installers).
+      </li>
+    </ul>
+  <h1 class="heading">Requires</h1>
+    <ul>
+      <li>
+        Python 2.5 or later (python 3 works too).
+      </li>
+      <li>
+        numpy array module <a href="http://numpy.scipy.org" 
+        target="_top">http://numpy.scipy.org</a>, version 1.3.0 or later 
+        (1.5.1 or higher recommended, required if using python 3).
+      </li>
+      <li>
+        <a href="http://cython.org" target="_top">Cython</a> is optional - 
+        if it is installed setup.py will use it to recompile the Cython 
+        source code into C, using conditional compilation to enable 
+        features in the netCDF API that have been added since version 
+        4.1.1.  If Cython is not installed, these features (such as the 
+        ability to rename Group objects) will be disabled to preserve 
+        backward compatibility with older versions of the netCDF library.
+      </li>
+      <li>
+        For python < 2.7, the ordereddict module <a 
+        href="http://python.org/pypi/ordereddict" 
+        target="_top">http://python.org/pypi/ordereddict</a>.
+      </li>
+      <li>
+        The HDF5 C library version 1.8.4-patch1 or higher (1.8.8 or higher 
+        recommended) from <a href="ftp://ftp.hdfgroup.org/HDF5/current/src"
+        target="_top">ftp://ftp.hdfgroup.org/HDF5/current/src</a>. Be sure 
+        to build with '<code>--enable-hl --enable-shared</code>'.
+      </li>
+      <li>
+        <a href="http://curl.haxx.se/libcurl/" target="_top">Libcurl</a>, 
+        if you want <a href="http://opendap.org/" target="_top">OPeNDAP</a>
+        support.
+      </li>
+      <li>
+        <a href="http://www.hdfgroup.org/products/hdf4/" 
+        target="_top">HDF4</a>, if you want to be able to read HDF4 
+        "Scientific Dataset" (SD) files.
+      </li>
+      <li>
+        The netCDF-4 C library from <a 
+        href="ftp://ftp.unidata.ucar.edu/pub/netcdf" 
+        target="_top">ftp://ftp.unidata.ucar.edu/pub/netcdf</a>. Version 
+        4.1.1 or higher is required (4.2 or higher recommended). Be sure to
+        build with '<code>--enable-netcdf-4 --enable-shared</code>', and 
+        set <code>CPPFLAGS="-I $HDF5_DIR/include"</code> and 
+        <code>LDFLAGS="-L $HDF5_DIR/lib"</code>, where 
+        <code>$HDF5_DIR</code> is the directory where HDF5 was installed. 
+        If you want <a href="http://opendap.org/" target="_top">OPeNDAP</a>
+        support, add '<code>--enable-dap</code>'. If you want HDF4 SD 
+        support, add '<code>--enable-hdf4</code>' and add the location of 
+        the HDF4 headers and library to <code>CPPFLAGS</code> and 
+        <code>LDFLAGS</code>.
+      </li>
+    </ul>
+  <h1 class="heading">Install</h1>
+    <ul>
+      <li>
+        install the requisite python modules and C libraries (see above). 
+        It's easiest if all the C libs are built as shared libraries.
+      </li>
+      <li>
+        optionally, set the <code>HDF5_DIR</code> environment variable to 
+        point to where HDF5 is installed (the libs in 
+        <code>$HDF5_DIR/lib</code>, the headers in 
+        <code>$HDF5_DIR/include</code>). If the headers and libs are 
+        installed in different places, you can use <code>HDF5_INCDIR</code>
+        and <code>HDF5_LIBDIR</code> to define the locations of the headers
+        and libraries independently.
+      </li>
+      <li>
+        optionally, set the <code>NETCDF4_DIR</code> (or 
+        <code>NETCDF4_INCDIR</code> and <code>NETCDF4_LIBDIR</code>) 
+        environment variable(s) to point to where the netCDF version 4 
+        library and headers are installed.
+      </li>
+      <li>
+        If the locations of the HDF5 and netCDF libs and headers are not 
+        specified with environment variables, some standard locations will 
+        be searched.
+      </li>
+      <li>
+        if HDF5 was built as a static library  with <a 
+        href="http://www.hdfgroup.org/doc_resource/SZIP/" 
+        target="_top">szip</a> support, you may also need to set the 
+        <code>SZIP_DIR</code> (or <code>SZIP_INCDIR</code> and 
+        <code>SZIP_LIBDIR</code>) environment variable(s) to point to where
+        szip is installed. Note that the netCDF library does not support 
+        creating szip compressed files, but can read szip compressed files 
+        if the HDF5 lib is configured to support szip.
+      </li>
+      <li>
+        if netCDF lib was built as a static library with HDF4 and/or 
+        OpenDAP support, you may also need to set <code>HDF4_DIR</code>, 
+        <code>JPEG_DIR</code> and/or <code>CURL_DIR</code>.
+      </li>
+      <li>
+        Instead of using environment variables to specify the locations of 
+        the required libraries, you can either let setup.py try to 
+        auto-detect their locations, or use the file <code>setup.cfg</code>
+        to specify them.  To use this method, copy the file 
+        <code>setup.cfg.template</code> to <code>setup.cfg</code>, then 
+        open <code>setup.cfg</code> in a text editor and follow the 
+        instructions in the comments for editing.  If you use 
+        <code>setup.cfg</code>, environment variables will be ignored.
+      </li>
+      <li>
+        If you are using netcdf 4.1.2 or higher, instead of setting all 
+        those enviroment variables defining where libs are installed, you 
+        can just set one environment variable, USE_NCCONFIG, to 1.  This 
+        will tell python to run the netcdf nc-config utility to determine 
+        where all the dependencies live.
+      </li>
+      <li>
+        run <code>python setup.py build</code>, then <code>python setup.py 
+        install</code> (as root if necessary).
+      </li>
+      <li>
+        If using environment variables to specify build options, be sure to
+        run 'python setup.py build' *without* using sudo.  sudo does not 
+        pass environment variables. If you run 'setup.py build' first 
+        without sudo, you can run 'setup.py install' with sudo.
+      </li>
+      <li>
+        run the tests in the 'test' directory by running <code>python 
+        run_all.py</code>.
+      </li>
+    </ul>
+  <h1 class="heading">Tutorial</h1>
+    <h2 class="heading">1) Creating/Opening/Closing a netCDF file</h2>
+      <p>To create a netCDF file from python, you simply call the <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      constructor. This is also the method used to open an existing netCDF 
+      file.  If the file is open for write access (<code>w, r+</code> or 
+      <code>a</code>), you may write any type of data including new 
+      dimensions, groups, variables and attributes.  netCDF files come in 
+      several flavors (<code>NETCDF3_CLASSIC, NETCDF3_64BIT, 
+      NETCDF4_CLASSIC</code>, and <code>NETCDF4</code>). The first two 
+      flavors are supported by version 3 of the netCDF library. 
+      <code>NETCDF4_CLASSIC</code> files use the version 4 disk format 
+      (HDF5), but do not use any features not found in the version 3 API. 
+      They can be read by netCDF 3 clients only if they have been relinked 
+      against the netCDF 4 library. They can also be read by HDF5 clients. 
+      <code>NETCDF4</code> files use the version 4 disk format (HDF5) and 
+      use the new features of the version 4 API.  The <code>netCDF4</code> 
+      module can read and write files in any of these formats. When 
+      creating a new file, the format may be specified using the 
+      <code>format</code> keyword in the <code>Dataset</code> constructor.
+      The default format is <code>NETCDF4</code>. To see how a given file 
+      is formatted, you can examine the <code>data_model</code> <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> attribute.
+      Closing the netCDF file is accomplished via the <a 
+      href="netCDF4.Dataset-class.html#close" class="link">close</a> method
+      of the <a href="netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      instance.</p>
+      <p>Here's an example:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">from</span> netCDF4 <span class="py-keyword">import</span> Dataset
+<span class="py-prompt">>>> </span>rootgrp = Dataset(<span class="py-string">'test.nc'</span>, <span class="py-string">'w'</span>, format=<span class="py-string">'NETCDF4'</span>)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> rootgrp.data_model
+<span class="py-output">NETCDF4</span>
+<span class="py-output"></span><span class="py-prompt">>>></span>
+<span class="py-prompt">>>> </span>rootgrp.close()</pre>
+      <p>Remote <a href="http://opendap.org" 
+      target="_top">OPeNDAP</a>-hosted datasets can be accessed for reading
+      over http if a URL is provided to the <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      constructor instead of a filename.  However, this requires that the 
+      netCDF library be built with OPenDAP support, via the 
+      <code>--enable-dap</code> configure option (added in version 
+      4.0.1).</p>
+    <h2 class="heading">2) Groups in a netCDF file</h2>
+      <p>netCDF version 4 added support for organizing data in hierarchical
+      groups, which are analagous to directories in a filesystem. Groups 
+      serve as containers for variables, dimensions and attributes, as well
+      as other groups.  A <code>netCDF4.Dataset</code> defines creates a 
+      special group, called the 'root group', which is similar to the root 
+      directory in a unix filesystem.  To create <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instances, use
+      the <a href="netCDF4.Dataset-class.html#createGroup" 
+      class="link">createGroup</a> method of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance. <a 
+      href="netCDF4.Dataset-class.html#createGroup" 
+      class="link">createGroup</a> takes a single argument, a python string
+      containing the name of the new group. The new <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instances 
+      contained within the root group can be accessed by name using the 
+      <code>groups</code> dictionary attribute of the <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> instance.
+      Only <code>NETCDF4</code> formatted files support Groups, if you try 
+      to create a Group in a netCDF 3 file you will get an error 
+      message.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>rootgrp = Dataset(<span class="py-string">'test.nc'</span>, <span class="py-string">'a'</span>)
+<span class="py-prompt">>>> </span>fcstgrp = rootgrp.createGroup(<span class="py-string">'forecasts'</span>)
+<span class="py-prompt">>>> </span>analgrp = rootgrp.createGroup(<span class="py-string">'analyses'</span>)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> rootgrp.groups
+<span class="py-output">OrderedDict([('forecasts', <netCDF4.Group object at 0x1b4b7b0>),</span>
+<span class="py-output">             ('analyses', <netCDF4.Group object at 0x1b4b970>)])</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Groups can exist within groups in a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a>, just as 
+      directories exist within directories in a unix filesystem. Each <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance has a
+      <code>'groups'</code> attribute dictionary containing all of the 
+      group instances contained within that group. Each <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance also 
+      has a <code>'path'</code> attribute that contains a simulated unix 
+      directory path to that group.</p>
+      <p>Here's an example that shows how to navigate all the groups in a 
+      <a href="netCDF4.Dataset-class.html" class="link">Dataset</a>. The 
+      function <code>walktree</code> is a Python generator that is used to 
+      walk the directory tree. Note that printing the <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> object yields 
+      summary information about it's contents.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>fcstgrp1 = fcstgrp.createGroup(<span class="py-string">'model1'</span>)
+<span class="py-prompt">>>> </span>fcstgrp2 = fcstgrp.createGroup(<span class="py-string">'model2'</span>)
+<span class="py-prompt">>>> </span><span class="py-keyword">def</span> <span class="py-defname">walktree</span>(top):
+<span class="py-prompt">>>> </span>    <span class="py-builtin">values</span> = top.groups.values()
+<span class="py-prompt">>>> </span>    yield <span class="py-builtin">values</span>
+<span class="py-prompt">>>> </span>    <span class="py-keyword">for</span> value <span class="py-keyword">in</span> top.groups.values():
+<span class="py-prompt">>>> </span>        <span class="py-keyword">for</span> children <span class="py-keyword">in</span> walktree(value):
+<span class="py-prompt">>>> </span>            yield children
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> rootgrp
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> children <span class="py-keyword">in</span> walktree(rootgrp):
+<span class="py-prompt">>>> </span>     <span class="py-keyword">for</span> child <span class="py-keyword">in</span> children:
+<span class="py-prompt">>>> </span>         <span class="py-keyword">print</span> child
+<span class="py-output"><type 'netCDF4.Dataset'></span>
+<span class="py-output">root group (NETCDF4 file format):</span>
+<span class="py-output">    dimensions: </span>
+<span class="py-output">    variables: </span>
+<span class="py-output">        groups: forecasts, analyses</span>
+<span class="py-output"><type 'netCDF4.Group'></span>
+<span class="py-output">group /forecasts:</span>
+<span class="py-output">    dimensions:</span>
+<span class="py-output">    variables:</span>
+<span class="py-output">    groups: model1, model2</span>
+<span class="py-output"><type 'netCDF4.Group'></span>
+<span class="py-output">group /analyses:</span>
+<span class="py-output">    dimensions:</span>
+<span class="py-output">    variables:</span>
+<span class="py-output">    groups:</span>
+<span class="py-output"><type 'netCDF4.Group'></span>
+<span class="py-output">group /forecasts/model1:</span>
+<span class="py-output">    dimensions:</span>
+<span class="py-output">    variables:</span>
+<span class="py-output">    groups:</span>
+<span class="py-output"><type 'netCDF4.Group'></span>
+<span class="py-output">group /forecasts/model2:</span>
+<span class="py-output">    dimensions:</span>
+<span class="py-output">    variables:</span>
+<span class="py-output">    groups:</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+    <h2 class="heading">3) Dimensions in a netCDF file</h2>
+      <p>netCDF defines the sizes of all variables in terms of dimensions, 
+      so before any variables can be created the dimensions they use must 
+      be created first. A special case, not often used in practice, is that
+      of a scalar variable, which has no dimensions. A dimension is created
+      using the <a href="netCDF4.Dataset-class.html#createDimension" 
+      class="link">createDimension</a> method of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance. A 
+      Python string is used to set the name of the dimension, and an 
+      integer value is used to set the size. To create an unlimited 
+      dimension (a dimension that can be appended to), the size value is 
+      set to <code>None</code> or 0. In this example, there both the 
+      <code>time</code> and <code>level</code> dimensions are unlimited.  
+      Having more than one unlimited dimension is a new netCDF 4 feature, 
+      in netCDF 3 files there may be only one, and it must be the first 
+      (leftmost) dimension of the variable.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>level = rootgrp.createDimension(<span class="py-string">'level'</span>, None)
+<span class="py-prompt">>>> </span>time = rootgrp.createDimension(<span class="py-string">'time'</span>, None)
+<span class="py-prompt">>>> </span>lat = rootgrp.createDimension(<span class="py-string">'lat'</span>, 73)
+<span class="py-prompt">>>> </span>lon = rootgrp.createDimension(<span class="py-string">'lon'</span>, 144)</pre>
+      <p>All of the <a href="netCDF4.Dimension-class.html" 
+      class="link">Dimension</a> instances are stored in a python 
+      dictionary.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> rootgrp.dimensions
+<span class="py-output">OrderedDict([('level', <netCDF4.Dimension object at 0x1b48030>),</span>
+<span class="py-output">             ('time', <netCDF4.Dimension object at 0x1b481c0>),</span>
+<span class="py-output">             ('lat', <netCDF4.Dimension object at 0x1b480f8>),</span>
+<span class="py-output">             ('lon', <netCDF4.Dimension object at 0x1b48a08>)])</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Calling the python <code>len</code> function with a <a 
+      href="netCDF4.Dimension-class.html" class="link">Dimension</a> 
+      instance returns the current size of that dimension. The <a 
+      href="netCDF4.Dimension-class.html#isunlimited" 
+      class="link">isunlimited</a> method of a <a 
+      href="netCDF4.Dimension-class.html" class="link">Dimension</a> 
+      instance can be used to determine if the dimensions is unlimited, or 
+      appendable.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> len(lon)
+<span class="py-output">144</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> len.is_unlimited()
+<span class="py-output">False</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> time.is_unlimited()
+<span class="py-output">True</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Printing the <a href="netCDF4.Dimension-class.html" 
+      class="link">Dimension</a> object provides useful summary info, 
+      including the name and length of the dimension, and whether it is 
+      unlimited.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> dimobj <span class="py-keyword">in</span> rootgrp.dimensions.values():
+<span class="py-prompt">>>> </span>   <span class="py-keyword">print</span> dimobj
+<span class="py-output"><type 'netCDF4.Dimension'> (unlimited): name = 'level', size = 0</span>
+<span class="py-output"><type 'netCDF4.Dimension'> (unlimited): name = 'time', size = 0</span>
+<span class="py-output"><type 'netCDF4.Dimension'>: name = 'lat', size = 73</span>
+<span class="py-output"><type 'netCDF4.Dimension'>: name = 'lon', size = 144</span>
+<span class="py-output"><type 'netCDF4.Dimension'> (unlimited): name = 'time', size = 0</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p><a href="netCDF4.Dimension-class.html" class="link">Dimension</a> 
+      names can be changed using the <a 
+      href="netCDF4.Dataset-class.html#renameDimension" 
+      class="link">renameDimension</a> method of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance.</p>
+    <h2 class="heading">4) Variables in a netCDF file</h2>
+      <p>netCDF variables behave much like python multidimensional array 
+      objects supplied by the <a href="http://numpy.scipy.org" 
+      target="_top">numpy module</a>. However, unlike numpy arrays, netCDF4
+      variables can be appended to along one or more 'unlimited' 
+      dimensions. To create a netCDF variable, use the <a 
+      href="netCDF4.Dataset-class.html#createVariable" 
+      class="link">createVariable</a> method of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance. The 
+      <a href="netCDF4.Dataset-class.html#createVariable" 
+      class="link">createVariable</a> method has two mandatory arguments, 
+      the variable name (a Python string), and the variable datatype. The 
+      variable's dimensions are given by a tuple containing the dimension 
+      names (defined previously with <a 
+      href="netCDF4.Dataset-class.html#createDimension" 
+      class="link">createDimension</a>). To create a scalar variable, 
+      simply leave out the dimensions keyword. The variable primitive 
+      datatypes correspond to the dtype attribute of a numpy array. You can
+      specify the datatype as a numpy dtype object, or anything that can be
+      converted to a numpy dtype object.  Valid datatype specifiers 
+      include: <code>'f4'</code> (32-bit floating point), <code>'f8'</code>
+      (64-bit floating point), <code>'i4'</code> (32-bit signed integer), 
+      <code>'i2'</code> (16-bit signed integer), <code>'i8'</code> (64-bit 
+      singed integer), <code>'i1'</code> (8-bit signed integer), 
+      <code>'u1'</code> (8-bit unsigned integer), <code>'u2'</code> (16-bit
+      unsigned integer), <code>'u4'</code> (32-bit unsigned integer), 
+      <code>'u8'</code> (64-bit unsigned integer), or <code>'S1'</code> 
+      (single-character string).  The old Numeric single-character 
+      typecodes (<code>'f'</code>,<code>'d'</code>,<code>'h'</code>, 
+      <code>'s'</code>,<code>'b'</code>,<code>'B'</code>,<code>'c'</code>,<code>'i'</code>,<code>'l'</code>),
+      corresponding to 
+      (<code>'f4'</code>,<code>'f8'</code>,<code>'i2'</code>,<code>'i2'</code>,<code>'i1'</code>,<code>'i1'</code>,<code>'S1'</code>,<code>'i4'</code>,<code>'i4'</code>),
+      will also work. The unsigned integer types and the 64-bit integer 
+      type can only be used if the file format is <code>NETCDF4</code>.</p>
+      <p>The dimensions themselves are usually also defined as variables, 
+      called coordinate variables. The <a 
+      href="netCDF4.Dataset-class.html#createVariable" 
+      class="link">createVariable</a> method returns an instance of the <a 
+      href="netCDF4.Variable-class.html" class="link">Variable</a> class 
+      whose methods can be used later to access and set variable data and 
+      attributes.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>times = rootgrp.createVariable(<span class="py-string">'time'</span>,<span class="py-string">'f8'</span>,(<span class="py-string">'time'</span>,))
+<span class="py-prompt">>>> </span>levels = rootgrp.createVariable(<span class="py-string">'level'</span>,<span class="py-string">'i4'</span>,(<span class="py-string">'level'</span>,))
+<span class="py-prompt">>>> </span>latitudes = rootgrp.createVariable(<span class="py-string">'latitude'</span>,<span class="py-string">'f4'</span>,(<span class="py-string">'lat'</span>,))
+<span class="py-prompt">>>> </span>longitudes = rootgrp.createVariable(<span class="py-string">'longitude'</span>,<span class="py-string">'f4'</span>,(<span class="py-string">'lon'</span>,))
+<span class="py-prompt">>>> </span><span class="py-comment"># two dimensions unlimited.</span>
+<span class="py-prompt">>>> </span>temp = rootgrp.createVariable(<span class="py-string">'temp'</span>,<span class="py-string">'f4'</span>,(<span class="py-string">'time'</span>,<span class="py-string">'level'</span>,<span class="py-string">'lat'</span>,<span class="py-string">'lon'</span>,))</pre>
+      <p>All of the variables in the <a href="netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> or <a href="netCDF4.Group-class.html" 
+      class="link">Group</a> are stored in a Python dictionary, in the same
+      way as the dimensions:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> rootgrp.variables
+<span class="py-output">OrderedDict([('time', <netCDF4.Variable object at 0x1b4ba70>),</span>
+<span class="py-output">             ('level', <netCDF4.Variable object at 0x1b4bab0>), </span>
+<span class="py-output">             ('latitude', <netCDF4.Variable object at 0x1b4baf0>),</span>
+<span class="py-output">             ('longitude', <netCDF4.Variable object at 0x1b4bb30>),</span>
+<span class="py-output">             ('temp', <netCDF4.Variable object at 0x1b4bb70>)])</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>To get summary info on a <a href="netCDF4.Variable-class.html" 
+      class="link">Variable</a> instance in an interactive session, just 
+      print it.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> rootgrp.variables[<span class="py-string">'temp'</span>]
+<span class="py-output"><type 'netCDF4.Variable'></span>
+<span class="py-output">float32 temp(time, level, lat, lon)</span>
+<span class="py-output">    least_significant_digit: 3</span>
+<span class="py-output">    units: K</span>
+<span class="py-output">unlimited dimensions: time, level</span>
+<span class="py-output">current shape = (0, 0, 73, 144)</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p><a href="netCDF4.Variable-class.html" class="link">Variable</a> 
+      names can be changed using the <a 
+      href="netCDF4.Dataset-class.html#renameVariable" 
+      class="link">renameVariable</a> method of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      instance.</p>
+    <h2 class="heading">5) Attributes in a netCDF file</h2>
+      <p>There are two types of attributes in a netCDF file, global and 
+      variable. Global attributes provide information about a group, or the
+      entire dataset, as a whole. <a href="netCDF4.Variable-class.html" 
+      class="link">Variable</a> attributes provide information about one of
+      the variables in a group. Global attributes are set by assigning 
+      values to <a href="netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> or <a href="netCDF4.Group-class.html" 
+      class="link">Group</a> instance variables. <a 
+      href="netCDF4.Variable-class.html" class="link">Variable</a> 
+      attributes are set by assigning values to <a 
+      href="netCDF4.Variable-class.html" class="link">Variable</a> 
+      instances variables. Attributes can be strings, numbers or sequences.
+      Returning to our example,</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">import</span> time
+<span class="py-prompt">>>> </span>rootgrp.description = <span class="py-string">'bogus example script'</span>
+<span class="py-prompt">>>> </span>rootgrp.history = <span class="py-string">'Created '</span> + time.ctime(time.time())
+<span class="py-prompt">>>> </span>rootgrp.source = <span class="py-string">'netCDF4 python module tutorial'</span>
+<span class="py-prompt">>>> </span>latitudes.units = <span class="py-string">'degrees north'</span>
+<span class="py-prompt">>>> </span>longitudes.units = <span class="py-string">'degrees east'</span>
+<span class="py-prompt">>>> </span>levels.units = <span class="py-string">'hPa'</span>
+<span class="py-prompt">>>> </span>temp.units = <span class="py-string">'K'</span>
+<span class="py-prompt">>>> </span>times.units = <span class="py-string">'hours since 0001-01-01 00:00:00.0'</span>
+<span class="py-prompt">>>> </span>times.calendar = <span class="py-string">'gregorian'</span></pre>
+      <p>The <a href="netCDF4.Dataset-class.html#ncattrs" 
+      class="link">ncattrs</a> method of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a>, <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> or <a 
+      href="netCDF4.Variable-class.html" class="link">Variable</a> instance
+      can be used to retrieve the names of all the netCDF attributes. This 
+      method is provided as a convenience, since using the built-in 
+      <code>dir</code> Python function will return a bunch of private 
+      methods and attributes that cannot (or should not) be modified by the
+      user.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> name <span class="py-keyword">in</span> rootgrp.ncattrs():
+<span class="py-prompt">>>> </span>    <span class="py-keyword">print</span> <span class="py-string">'Global attr'</span>, name, <span class="py-string">'='</span>, getattr(rootgrp,name)
+<span class="py-output">Global attr description = bogus example script</span>
+<span class="py-output">Global attr history = Created Mon Nov  7 10.30:56 2005</span>
+<span class="py-output">Global attr source = netCDF4 python module tutorial</span></pre>
+      <p>The <code>__dict__</code> attribute of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a>, <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> or <a 
+      href="netCDF4.Variable-class.html" class="link">Variable</a> instance
+      provides all the netCDF attribute name/value pairs in a python 
+      dictionary:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> rootgrp.__dict__
+<span class="py-output">OrderedDict([(u'description', u'bogus example script'),</span>
+<span class="py-output">             (u'history', u'Created Thu Mar  3 19:30:33 2011'), </span>
+<span class="py-output">             (u'source', u'netCDF4 python module tutorial')])</span></pre>
+      <p>Attributes can be deleted from a netCDF <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a>, <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> or <a 
+      href="netCDF4.Variable-class.html" class="link">Variable</a> using 
+      the python <code>del</code> statement (i.e. <code>del grp.foo</code> 
+      removes the attribute <code>foo</code> the the group 
+      <code>grp</code>).</p>
+    <h2 class="heading">6) Writing data to and retrieving data from a netCDF variable</h2>
+      <p>Now that you have a netCDF <a href="netCDF4.Variable-class.html" 
+      class="link">Variable</a> instance, how do you put data into it? You 
+      can just treat it like an array and assign data to a slice.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">import</span> numpy 
+<span class="py-prompt">>>> </span>lats =  numpy.arange(-90,91,2.5)
+<span class="py-prompt">>>> </span>lons =  numpy.arange(-180,180,2.5)
+<span class="py-prompt">>>> </span>latitudes[:] = lats
+<span class="py-prompt">>>> </span>longitudes[:] = lons
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'latitudes =\n'</span>,latitudes[:]
+<span class="py-output">latitudes =</span>
+<span class="py-output">[-90.  -87.5 -85.  -82.5 -80.  -77.5 -75.  -72.5 -70.  -67.5 -65.  -62.5</span>
+<span class="py-output"> -60.  -57.5 -55.  -52.5 -50.  -47.5 -45.  -42.5 -40.  -37.5 -35.  -32.5</span>
+<span class="py-output"> -30.  -27.5 -25.  -22.5 -20.  -17.5 -15.  -12.5 -10.   -7.5  -5.   -2.5</span>
+<span class="py-output">   0.    2.5   5.    7.5  10.   12.5  15.   17.5  20.   22.5  25.   27.5</span>
+<span class="py-output">  30.   32.5  35.   37.5  40.   42.5  45.   47.5  50.   52.5  55.   57.5</span>
+<span class="py-output">  60.   62.5  65.   67.5  70.   72.5  75.   77.5  80.   82.5  85.   87.5</span>
+<span class="py-output">  90. ]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Unlike NumPy's array objects, netCDF <a 
+      href="netCDF4.Variable-class.html" class="link">Variable</a> objects 
+      with unlimited dimensions will grow along those dimensions if you 
+      assign data outside the currently defined range of indices.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-comment"># append along two unlimited dimensions by assigning to slice.</span>
+<span class="py-prompt">>>> </span>nlats = len(rootgrp.dimensions[<span class="py-string">'lat'</span>])
+<span class="py-prompt">>>> </span>nlons = len(rootgrp.dimensions[<span class="py-string">'lon'</span>])
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'temp shape before adding data = '</span>,temp.shape
+<span class="py-output">temp shape before adding data =  (0, 0, 73, 144)</span>
+<span class="py-output"></span><span class="py-prompt">>>></span>
+<span class="py-prompt">>>> </span><span class="py-keyword">from</span> numpy.random <span class="py-keyword">import</span> uniform
+<span class="py-prompt">>>> </span>temp[0:5,0:10,:,:] = uniform(size=(5,10,nlats,nlons))
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'temp shape after adding data = '</span>,temp.shape
+<span class="py-output">temp shape after adding data =  (6, 10, 73, 144)</span>
+<span class="py-output"></span><span class="py-prompt">>>></span>
+<span class="py-prompt">>>> </span><span class="py-comment"># levels have grown, but no values yet assigned.</span>
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'levels shape after adding pressure data = '</span>,levels.shape
+<span class="py-output">levels shape after adding pressure data =  (10,)</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Note that the size of the levels variable grows when data is 
+      appended along the <code>level</code> dimension of the variable 
+      <code>temp</code>, even though no data has yet been assigned to 
+      levels.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-comment"># now, assign data to levels dimension variable.</span>
+<span class="py-prompt">>>> </span>levels[:] =  [1000.,850.,700.,500.,300.,250.,200.,150.,100.,50.]</pre>
+      <p>However, that there are some differences between NumPy and netCDF 
+      variable slicing rules. Slices behave as usual, being specified as a 
+      <code>start:stop:step</code> triplet. Using a scalar integer index 
+      <code>i</code> takes the ith element and reduces the rank of the 
+      output array by one. Boolean array and integer sequence indexing 
+      behaves differently for netCDF variables than for numpy arrays.  Only
+      1-d boolean arrays and integer sequences are allowed, and these 
+      indices work independently along each dimension (similar to the way 
+      vector subscripts work in fortran).  This means that</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>temp[0, 0, [0,1,2,3], [0,1,2,3]]</pre>
+      <p>returns an array of shape (4,4) when slicing a netCDF variable, 
+      but for a numpy array it returns an array of shape (4,). Similarly, a
+      netCDF variable of shape <code>(2,3,4,5)</code> indexed with 
+      <code>[0, array([True, False, True]), array([False, True, True, 
+      True]), :]</code> would return a <code>(2, 3, 5)</code> array. In 
+      NumPy, this would raise an error since it would be equivalent to 
+      <code>[0, [0,1], [1,2,3], :]</code>. When slicing with integer 
+      sequences, the indices must be sorted in increasing order and contain
+      no duplicates. While this behaviour may cause some confusion for 
+      those used to NumPy's 'fancy indexing' rules, it provides a very 
+      powerful way to extract data from multidimensional netCDF variables 
+      by using logical operations on the dimension arrays to create 
+      slices.</p>
+      <p>For example,</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>tempdat = temp[::2, [1,3,6], lats>0, lons>0]</pre>
+      <p>will extract time indices 0,2 and 4, pressure levels 850, 500 and 
+      200 hPa, all Northern Hemisphere latitudes and Eastern Hemisphere 
+      longitudes, resulting in a numpy array of shape  (3, 3, 36, 71).</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'shape of fancy temp slice = '</span>,tempdat.shape
+<span class="py-output">shape of fancy temp slice =  (3, 3, 36, 71)</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Time coordinate values pose a special challenge to netCDF users.  
+      Most metadata standards (such as CF and COARDS) specify that time 
+      should be measure relative to a fixed date using a certain calendar, 
+      with units specified like <code>hours since YY:MM:DD hh-mm-ss</code>.
+      These units can be awkward to deal with, without a utility to convert
+      the values to and from calendar dates.  The functione called <a 
+      href="netCDF4-module.html#num2date" class="link">num2date</a> and <a 
+      href="netCDF4-module.html#date2num" class="link">date2num</a> are 
+      provided with this package to do just that.  Here's an example of how
+      they can be used:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-comment"># fill in times.</span>
+<span class="py-prompt">>>> </span><span class="py-keyword">from</span> datetime <span class="py-keyword">import</span> datetime, timedelta
+<span class="py-prompt">>>> </span><span class="py-keyword">from</span> netCDF4 <span class="py-keyword">import</span> num2date, date2num
+<span class="py-prompt">>>> </span>dates = [datetime(2001,3,1)+n*timedelta(hours=12) <span class="py-keyword">for</span> n <span class="py-keyword">in</span> range(temp.shape[0])]
+<span class="py-prompt">>>> </span>times[:] = date2num(dates,units=times.units,calendar=times.calendar)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'time values (in units %s): '</span> % times.units+<span class="py-string">'\n'</span>,times[:]
+<span class="py-output">time values (in units hours since January 1, 0001): </span>
+<span class="py-output">[ 17533056.  17533068.  17533080.  17533092.  17533104.]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span>
+<span class="py-prompt">>>> </span>dates = num2date(times[:],units=times.units,calendar=times.calendar)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'dates corresponding to time values:\n'</span>,dates
+<span class="py-output">dates corresponding to time values:</span>
+<span class="py-output">[2001-03-01 00:00:00 2001-03-01 12:00:00 2001-03-02 00:00:00</span>
+<span class="py-output"> 2001-03-02 12:00:00 2001-03-03 00:00:00]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p><a href="netCDF4-module.html#num2date" class="link">num2date</a> 
+      converts numeric values of time in the specified <code>units</code> 
+      and <code>calendar</code> to datetime objects, and <a 
+      href="netCDF4-module.html#date2num" class="link">date2num</a> does 
+      the reverse. All the calendars currently defined in the <a 
+      href="http://cf-pcmdi.llnl.gov/documents/cf-conventions/" 
+      target="_top">CF metadata convention</a> are supported. A function 
+      called <a href="netCDF4-module.html#date2index" 
+      class="link">date2index</a> is also provided which returns the 
+      indices of a netCDF time variable corresponding to a sequence of 
+      datetime instances.</p>
+    <h2 class="heading">7) Reading data from a multi-file netCDF dataset.</h2>
+      <p>If you want to read data from a variable that spans multiple 
+      netCDF files, you can use the <a href="netCDF4.MFDataset-class.html" 
+      class="link">MFDataset</a> class to read the data as if it were 
+      contained in a single file. Instead of using a single filename to 
+      create a <a href="netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> instance, create a <a 
+      href="netCDF4.MFDataset-class.html" class="link">MFDataset</a> 
+      instance with either a list of filenames, or a string with a wildcard
+      (which is then converted to a sorted list of files using the python 
+      glob module). Variables in the list of files that share the same 
+      unlimited dimension are aggregated together, and can be sliced across
+      multiple files.  To illustrate this, let's first create a bunch of 
+      netCDF files with the same variable (with the same unlimited 
+      dimension).  The files must in be in <code>NETCDF3_64BIT</code>, 
+      <code>NETCDF3_CLASSIC</code> or <code>NETCDF4_CLASSIC format</code> 
+      (<code>NETCDF4</code> formatted multi-file datasets are not 
+      supported).</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> nfile <span class="py-keyword">in</span> range(10):
+<span class="py-prompt">>>> </span>    f = Dataset(<span class="py-string">'mftest'</span>+repr(nfile)+<span class="py-string">'.nc'</span>,<span class="py-string">'w'</span>,format=<span class="py-string">'NETCDF4_CLASSIC'</span>)
+<span class="py-prompt">>>> </span>    f.createDimension(<span class="py-string">'x'</span>,None)
+<span class="py-prompt">>>> </span>    x = f.createVariable(<span class="py-string">'x'</span>,<span class="py-string">'i'</span>,(<span class="py-string">'x'</span>,))
+<span class="py-prompt">>>> </span>    x[0:10] = numpy.arange(nfile*10,10*(nfile+1))
+<span class="py-prompt">>>> </span>    f.close()</pre>
+      <p>Now read all the files back in at once with <a 
+      href="netCDF4.MFDataset-class.html" class="link">MFDataset</a></p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">from</span> netCDF4 <span class="py-keyword">import</span> MFDataset
+<span class="py-prompt">>>> </span>f = MFDataset(<span class="py-string">'mftest*nc'</span>)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.variables[<span class="py-string">'x'</span>][:]
+<span class="py-output">[ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24</span>
+<span class="py-output"> 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49</span>
+<span class="py-output"> 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74</span>
+<span class="py-output"> 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Note that MFDataset can only be used to read, not write, 
+      multi-file datasets.</p>
+    <h2 class="heading">8) Efficient compression of netCDF variables</h2>
+      <p>Data stored in netCDF 4 <a href="netCDF4.Variable-class.html" 
+      class="link">Variable</a> objects can be compressed and decompressed 
+      on the fly. The parameters for the compression are determined by the 
+      <code>zlib</code>, <code>complevel</code> and <code>shuffle</code> 
+      keyword arguments to the <a 
+      href="netCDF4.Dataset-class.html#createVariable" 
+      class="link">createVariable</a> method. To turn on compression, set 
+      <code>zlib=True</code>.  The <code>complevel</code> keyword regulates
+      the speed and efficiency of the compression (1 being fastest, but 
+      lowest compression ratio, 9 being slowest but best compression 
+      ratio). The default value of <code>complevel</code> is 4. Setting 
+      <code>shuffle=False</code> will turn off the HDF5 shuffle filter, 
+      which de-interlaces a block of data before compression by reordering 
+      the bytes.  The shuffle filter can significantly improve compression 
+      ratios, and is on by default.  Setting <code>fletcher32</code> 
+      keyword argument to <a 
+      href="netCDF4.Dataset-class.html#createVariable" 
+      class="link">createVariable</a> to <code>True</code> (it's 
+      <code>False</code> by default) enables the Fletcher32 checksum 
+      algorithm for error detection. It's also possible to set the HDF5 
+      chunking parameters and endian-ness of the binary data stored in the 
+      HDF5 file with the <code>chunksizes</code> and <code>endian</code> 
+      keyword arguments to <a 
+      href="netCDF4.Dataset-class.html#createVariable" 
+      class="link">createVariable</a>.  These keyword arguments only are 
+      relevant for <code>NETCDF4</code> and <code>NETCDF4_CLASSIC</code> 
+      files (where the underlying file format is HDF5) and are silently 
+      ignored if the file format is <code>NETCDF3_CLASSIC</code> or 
+      <code>NETCDF3_64BIT</code>,</p>
+      <p>If your data only has a certain number of digits of precision (say
+      for example, it is temperature data that was measured with a 
+      precision of 0.1 degrees), you can dramatically improve zlib 
+      compression by quantizing (or truncating) the data using the 
+      <code>least_significant_digit</code> keyword argument to <a 
+      href="netCDF4.Dataset-class.html#createVariable" 
+      class="link">createVariable</a>. The least significant digit is the 
+      power of ten of the smallest decimal place in the data that is a 
+      reliable value. For example if the data has a precision of 0.1, then 
+      setting <code>least_significant_digit=1</code> will cause data the 
+      data to be quantized using 
+      <code>numpy.around(scale*data)/scale</code>, where scale = 2**bits, 
+      and bits is determined so that a precision of 0.1 is retained (in 
+      this case bits=4).  Effectively, this makes the compression 'lossy' 
+      instead of 'lossless', that is some precision in the data is 
+      sacrificed for the sake of disk space.</p>
+      <p>In our example, try replacing the line</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>temp = rootgrp.createVariable(<span class="py-string">'temp'</span>,<span class="py-string">'f4'</span>,(<span class="py-string">'time'</span>,<span class="py-string">'level'</span>,<span class="py-string">'lat'</span>,<span class="py-string">'lon'</span>,))</pre>
+      <p>with</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>temp = dataset.createVariable(<span class="py-string">'temp'</span>,<span class="py-string">'f4'</span>,(<span class="py-string">'time'</span>,<span class="py-string">'level'</span>,<span class="py-string">'lat'</span>,<span class="py-string">'lon'</span>,),zlib=True)</pre>
+      <p>and then</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>temp = dataset.createVariable(<span class="py-string">'temp'</span>,<span class="py-string">'f4'</span>,(<span class="py-string">'time'</span>,<span class="py-string">'level'</span>,<span class="py-string">'lat'</span>,<span class="py-string">'lon'</span>,),zlib=True,least_significant_digit=3)</pre>
+      <p>and see how much smaller the resulting files are.</p>
+    <h2 class="heading">9) Beyond homogenous arrays of a fixed type - compound data types</h2>
+      <p>Compound data types map directly to numpy structured (a.k.a 
+      'record' arrays).  Structured arrays are akin to C structs, or 
+      derived types in Fortran. They allow for the construction of 
+      table-like structures composed of combinations of other data types, 
+      including other compound types. Compound types might be useful for 
+      representing multiple parameter values at each point on a grid, or at
+      each time and space location for scattered (point) data. You can then
+      access all the information for a point by reading one variable, 
+      instead of reading different parameters from different variables.  
+      Compound data types are created from the corresponding numpy data 
+      type using the <a 
+      href="netCDF4.Dataset-class.html#createCompoundType" 
+      class="link">createCompoundType</a> method of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance. 
+      Since there is no native complex data type in netcdf, compound types 
+      are handy for storing numpy complex arrays.  Here's an example:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>f = Dataset(<span class="py-string">'complex.nc'</span>,<span class="py-string">'w'</span>)
+<span class="py-prompt">>>> </span>size = 3 <span class="py-comment"># length of 1-d complex array</span>
+<span class="py-prompt">>>> </span><span class="py-comment"># create sample complex data.</span>
+<span class="py-prompt">>>> </span>datac = numpy.exp(1j*(1.+numpy.linspace(0, numpy.pi, size)))
+<span class="py-prompt">>>> </span><span class="py-comment"># create complex128 compound data type.</span>
+<span class="py-prompt">>>> </span>complex128 = numpy.dtype([(<span class="py-string">'real'</span>,numpy.float64),(<span class="py-string">'imag'</span>,numpy.float64)])
+<span class="py-prompt">>>> </span>complex128_t = f.createCompoundType(complex128,<span class="py-string">'complex128'</span>)
+<span class="py-prompt">>>> </span><span class="py-comment"># create a variable with this data type, write some data to it.</span>
+<span class="py-prompt">>>> </span>f.createDimension(<span class="py-string">'x_dim'</span>,None)
+<span class="py-prompt">>>> </span>v = f.createVariable(<span class="py-string">'cmplx_var'</span>,complex128_t,<span class="py-string">'x_dim'</span>)
+<span class="py-prompt">>>> </span>data = numpy.empty(size,complex128) <span class="py-comment"># numpy structured array</span>
+<span class="py-prompt">>>> </span>data[<span class="py-string">'real'</span>] = datac.real; data[<span class="py-string">'imag'</span>] = datac.imag
+<span class="py-prompt">>>> </span>v[:] = data <span class="py-comment"># write numpy structured array to netcdf compound var</span>
+<span class="py-prompt">>>> </span><span class="py-comment"># close and reopen the file, check the contents.</span>
+<span class="py-prompt">>>> </span>f.close(); f = Dataset(<span class="py-string">'complex.nc'</span>)
+<span class="py-prompt">>>> </span>v = f.variables[<span class="py-string">'cmplx_var'</span>]
+<span class="py-prompt">>>> </span>datain = v[:] <span class="py-comment"># read in all the data into a numpy structured array</span>
+<span class="py-prompt">>>> </span><span class="py-comment"># create an empty numpy complex array</span>
+<span class="py-prompt">>>> </span>datac2 = numpy.empty(datain.shape,numpy.complex128)
+<span class="py-prompt">>>> </span><span class="py-comment"># .. fill it with contents of structured array.</span>
+<span class="py-prompt">>>> </span>datac2.real = datain[<span class="py-string">'real'</span>]; datac2.imag = datain[<span class="py-string">'imag'</span>]
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> datac.dtype,datac <span class="py-comment"># original data</span>
+<span class="py-output">complex128 [ 0.54030231+0.84147098j -0.84147098+0.54030231j  -0.54030231-0.84147098j]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span>
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> datac2.dtype,datac2 <span class="py-comment"># data from file</span>
+<span class="py-output">complex128 [ 0.54030231+0.84147098j -0.84147098+0.54030231j  -0.54030231-0.84147098j]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Compound types can be nested, but you must create the 'inner' ones
+      first. All of the compound types defined for a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> are stored in 
+      a Python dictionary, just like variables and dimensions. As always, 
+      printing objects gives useful summary information in an interactive 
+      session:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> f
+<span class="py-output"><type 'netCDF4.Dataset'></span>
+<span class="py-output">root group (NETCDF4 file format):</span>
+<span class="py-output">    dimensions: x_dim</span>
+<span class="py-output">    variables: cmplx_var</span>
+<span class="py-output">    groups:</span>
+<span class="py-output"><type 'netCDF4.Variable'></span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.variables[<span class="py-string">'cmplx_var'</span>]
+<span class="py-output">compound cmplx_var(x_dim)</span>
+<span class="py-output">compound data type: [('real', '<f8'), ('imag', '<f8')]</span>
+<span class="py-output">unlimited dimensions: x_dim</span>
+<span class="py-output">current shape = (3,)</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.cmptypes
+<span class="py-output">OrderedDict([('complex128', <netCDF4.CompoundType object at 0x1029eb7e8>)])</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.cmptypes[<span class="py-string">'complex128'</span>]
+<span class="py-output"><type 'netCDF4.CompoundType'>: name = 'complex128', numpy dtype = [(u'real','<f8'), (u'imag', '<f8')]</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+    <h2 class="heading">10) Variable-length (vlen) data types.</h2>
+      <p>NetCDF 4 has support for variable-length or "ragged" 
+      arrays.  These are arrays of variable length sequences having the 
+      same type. To create a variable-length data type, use the <a 
+      href="netCDF4.Dataset-class.html#createVLType" 
+      class="link">createVLType</a> method method of a <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>f = Dataset(<span class="py-string">'tst_vlen.nc'</span>,<span class="py-string">'w'</span>)
+<span class="py-prompt">>>> </span>vlen_t = f.createVLType(numpy.int32, <span class="py-string">'phony_vlen'</span>)</pre>
+      <p>The numpy datatype of the variable-length sequences and the name 
+      of the new datatype must be specified. Any of the primitive datatypes
+      can be used (signed and unsigned integers, 32 and 64 bit floats, and 
+      characters), but compound data types cannot. A new variable can then 
+      be created using this datatype.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>x = f.createDimension(<span class="py-string">'x'</span>,3)
+<span class="py-prompt">>>> </span>y = f.createDimension(<span class="py-string">'y'</span>,4)
+<span class="py-prompt">>>> </span>vlvar = f.createVariable(<span class="py-string">'phony_vlen_var'</span>, vlen_t, (<span class="py-string">'y'</span>,<span class="py-string">'x'</span>))</pre>
+      <p>Since there is no native vlen datatype in numpy, vlen arrays are 
+      represented in python as object arrays (arrays of dtype 
+      <code>object</code>). These are arrays whose elements are Python 
+      object pointers, and can contain any type of python object. For this 
+      application, they must contain 1-D numpy arrays all of the same type 
+      but of varying length. In this case, they contain 1-D numpy 
+      <code>int32</code> arrays of random length betwee 1 and 10.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">import</span> random
+<span class="py-prompt">>>> </span>data = numpy.empty(len(y)*len(x),object)
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> n <span class="py-keyword">in</span> range(len(y)*len(x)):
+<span class="py-prompt">>>> </span>   data[n] = numpy.arange(random.randint(1,10),dtype=<span class="py-string">'int32'</span>)+1
+<span class="py-prompt">>>> </span>data = numpy.reshape(data,(len(y),len(x)))
+<span class="py-prompt">>>> </span>vlvar[:] = data
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'vlen variable =\n'</span>,vlvar[:]
+<span class="py-output">vlen variable =</span>
+<span class="py-output">[[[ 1  2  3  4  5  6  7  8  9 10] [1 2 3 4 5] [1 2 3 4 5 6 7 8]]</span>
+<span class="py-output"> [[1 2 3 4 5 6 7] [1 2 3 4 5 6] [1 2 3 4 5]]</span>
+<span class="py-output"> [[1 2 3 4 5] [1 2 3 4] [1]]</span>
+<span class="py-output"> [[ 1  2  3  4  5  6  7  8  9 10] [ 1  2  3  4  5  6  7  8  9 10]</span>
+<span class="py-output">  [1 2 3 4 5 6 7 8]]]</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> f
+<span class="py-output"><type 'netCDF4.Dataset'></span>
+<span class="py-output">root group (NETCDF4 file format):</span>
+<span class="py-output">    dimensions: x, y</span>
+<span class="py-output">    variables: phony_vlen_var</span>
+<span class="py-output">    groups:</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.variables[<span class="py-string">'phony_vlen_var'</span>]
+<span class="py-output"><type 'netCDF4.Variable'></span>
+<span class="py-output">vlen phony_vlen_var(y, x)</span>
+<span class="py-output">vlen data type: int32</span>
+<span class="py-output">unlimited dimensions:</span>
+<span class="py-output">current shape = (4, 3)</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.VLtypes[<span class="py-string">'phony_vlen'</span>]
+<span class="py-output"><type 'netCDF4.VLType'>: name = 'phony_vlen', numpy dtype = int32</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>Numpy object arrays containing python strings can also be written 
+      as vlen variables,  For vlen strings, you don't need to create a vlen
+      data type. Instead, simply use the python <code>str</code> builtin 
+      (or a numpy string datatype with fixed length greater than 1) when 
+      calling the <a href="netCDF4.Dataset-class.html#createVariable" 
+      class="link">createVariable</a> method.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>z = f.createDimension(<span class="py-string">'z'</span>,10)
+<span class="py-prompt">>>> </span>strvar = rootgrp.createVariable(<span class="py-string">'strvar'</span>, str, <span class="py-string">'z'</span>)</pre>
+      <p>In this example, an object array is filled with random python 
+      strings with random lengths between 2 and 12 characters, and the data
+      in the object array is assigned to the vlen string variable.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>chars = <span class="py-string">'1234567890aabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'</span>
+<span class="py-prompt">>>> </span>data = numpy.empty(10,<span class="py-string">'O'</span>)
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> n <span class="py-keyword">in</span> range(10):
+<span class="py-prompt">>>> </span>    stringlen = random.randint(2,12)
+<span class="py-prompt">>>> </span>    data[n] = <span class="py-string">''</span>.join([random.choice(chars) <span class="py-keyword">for</span> i <span class="py-keyword">in</span> range(stringlen)])
+<span class="py-prompt">>>> </span>strvar[:] = data
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> <span class="py-string">'variable-length string variable:\n'</span>,strvar[:]
+<span class="py-output">variable-length string variable:</span>
+<span class="py-output">[aDy29jPt jd7aplD b8t4RM jHh8hq KtaPWF9cQj Q1hHN5WoXSiT MMxsVeq td LUzvVTzj</span>
+<span class="py-output"> 5DS9X8S]</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> f
+<span class="py-output"><type 'netCDF4.Dataset'></span>
+<span class="py-output">root group (NETCDF4 file format):</span>
+<span class="py-output">    dimensions: x, y, z</span>
+<span class="py-output">    variables: phony_vlen_var, strvar</span>
+<span class="py-output">    groups:</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.variables[<span class="py-string">'strvar'</span>]
+<span class="py-output"><type 'netCDF4.Variable'></span>
+<span class="py-output">vlen strvar(z)</span>
+<span class="py-output">vlen data type: <type 'str'></span>
+<span class="py-output">unlimited dimensions:</span>
+<span class="py-output">current size = (10,)</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>It is also possible to set contents of vlen string variables with 
+      numpy arrays of any string or unicode data type. Note, however, that 
+      accessing the contents of such variables will always return numpy 
+      arrays with dtype <code>object</code>.</p>
+      <p>All of the code in this tutorial is available in 
+      <code>examples/tutorial.py</code>, Unit tests are in the 
+      <code>test</code> directory.</p>
+
+<hr />
+<div class="fields">      <p><strong>Contact:</strong>
+        Jeffrey Whitaker <jeffrey.s.whitaker at noaa.gov>
+      </p>
+      <p><strong>Copyright:</strong>
+        2008 by Jeffrey Whitaker.
+      </p>
+      <p><strong>License:</strong>
+        Permission to use, copy, modify, and distribute this software and 
+        its documentation for any purpose and without fee is hereby 
+        granted, provided that the above copyright notice appear in all 
+        copies and that both the copyright notice and this permission 
+        notice appear in supporting documentation. THE AUTHOR DISCLAIMS ALL
+        WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED 
+        WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 
+        AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
+        OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 
+        PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 
+        TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 
+        PERFORMANCE OF THIS SOFTWARE.
+      </p>
+      <p><strong>Version:</strong>
+        1.1.2
+      </p>
+</div><!-- ==================== CLASSES ==================== -->
+<a name="section-Classes"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Classes</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.CompoundType-class.html" class="summary-name">CompoundType</a><br />
+      A <a href="netCDF4.CompoundType-class.html" 
+        class="link">CompoundType</a> instance is used to describe a 
+        compound data type.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.Dataset-class.html" class="summary-name">Dataset</a><br />
+      Dataset(self, filename, mode="r", clobber=True, 
+        diskless=False, persist=False, keepweakref=False, format='NETCDF4')
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.Dimension-class.html" class="summary-name">Dimension</a><br />
+      Dimension(self, group, name, size=None)
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.Group-class.html" class="summary-name">Group</a><br />
+      Group(self, parent, name)
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.MFDataset-class.html" class="summary-name">MFDataset</a><br />
+      MFDataset(self, files, check=False, aggdim=None, exclude=[])
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.MFTime-class.html" class="summary-name">MFTime</a><br />
+      MFTime(self, time, units=None)
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.VLType-class.html" class="summary-name">VLType</a><br />
+      A <a href="netCDF4.VLType-class.html" class="link">VLType</a> 
+        instance is used to describe a variable length (VLEN) data type.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.Variable-class.html" class="summary-name">Variable</a><br />
+      Variable(self, group, name, datatype, dimensions=(), zlib=False, 
+        complevel=4, shuffle=True, fletcher32=False, contiguous=False, 
+        chunksizes=None, endian='native', 
+        least_significant_digit=None,fill_value=None)
+    </td>
+  </tr>
+</table>
+<!-- ==================== FUNCTIONS ==================== -->
+<a name="section-Functions"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Functions</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4-module.html#chartostring" class="summary-sig-name">chartostring</a>(<span class="summary-sig-arg">b</span>)</span><br />
+      convert a character array to a string array with one less dimension.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4-module.html#date2index" class="summary-sig-name">date2index</a>(<span class="summary-sig-arg">dates</span>,
+        <span class="summary-sig-arg">nctime</span>,
+        <span class="summary-sig-arg">calendar</span>=<span class="summary-sig-default">None</span>,
+        <span class="summary-sig-arg">select</span>=<span class="summary-sig-default">'exact'</span>)</span><br />
+      Return indices of a netCDF time variable corresponding to the given 
+      dates.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4-module.html#date2num" class="summary-sig-name">date2num</a>(<span class="summary-sig-arg">dates</span>,
+        <span class="summary-sig-arg">units</span>,
+        <span class="summary-sig-arg">calendar</span>=<span class="summary-sig-default">'standard'</span>)</span><br />
+      Return numeric time values given datetime objects.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="getlibversion"></a><span class="summary-sig-name">getlibversion</span>()</span><br />
+      returns a string describing the version of the netcdf library used to
+      build the module, and when it was built.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4-module.html#num2date" class="summary-sig-name">num2date</a>(<span class="summary-sig-arg">times</span>,
+        <span class="summary-sig-arg">units</span>,
+        <span class="summary-sig-arg">calendar</span>=<span class="summary-sig-default">'standard'</span>)</span><br />
+      Return datetime objects given numeric time values.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4-module.html#stringtoarr" class="summary-sig-name">stringtoarr</a>(<span class="summary-sig-arg">a</span>,
+        <span class="summary-sig-arg">NUMCHARS</span>,
+        <span class="summary-sig-arg">dtype</span>=<span class="summary-sig-default">'S'</span>)</span><br />
+      convert a string to a character array of length NUMCHARS</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4-module.html#stringtochar" class="summary-sig-name">stringtochar</a>(<span class="summary-sig-arg">a</span>)</span><br />
+      convert a string array to a character array with one extra dimension</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+</table>
+<!-- ==================== VARIABLES ==================== -->
+<a name="section-Variables"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Variables</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="NC_DISKLESS"></a><span class="summary-name">NC_DISKLESS</span> = <code title="8">8</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="__has_nc_inq_format_extended__"></a><span class="summary-name">__has_nc_inq_format_extended__</span> = <code title="0">0</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="__has_nc_inq_path__"></a><span class="summary-name">__has_nc_inq_path__</span> = <code title="0">0</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="__has_rename_grp__"></a><span class="summary-name">__has_rename_grp__</span> = <code title="0">0</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="__hdf5libversion__"></a><span class="summary-name">__hdf5libversion__</span> = <code title="'1.8.13'"><code class="variable-quote">'</code><code class="variable-string">1.8.13</code><code class="variable-quote">'</code></code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="__netcdf4libversion__"></a><span class="summary-name">__netcdf4libversion__</span> = <code title="u'4.3.3-rc2'"><code class="variable-quote">u'</code><code class="variable-string">4.3.3-rc2</code><code class="variable-quote">'</code></code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="default_encoding"></a><span class="summary-name">default_encoding</span> = <code title="'utf-8'"><code class="variable-quote">'</code><code class="variable-string">utf-8</code><code class="variable-quote">'</code></code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4-module.html#default_fillvals" class="summary-name">default_fillvals</a> = <code title="{'S1': '\x00',
+ 'U1': '\x00',
+ 'f4': 9.96920996839e+36,
+ 'f8': 9.96920996839e+36,
+ 'i1': -127,
+ 'i2': -32767,
+ 'i4': -2147483647,
+ 'i8': -9223372036854775806,
+..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">S1</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x00</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">U1</code><code class="variable-quote">'</code><code class="variable-op">: </code><cod [...]
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="gregorian"></a><span class="summary-name">gregorian</span> = <code title="datetime.datetime(1582, 10, 15, 0, 0)">datetime.datetime(1582, 10, 15, 0, 0)</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="is_native_big"></a><span class="summary-name">is_native_big</span> = <code title="False">False</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="is_native_little"></a><span class="summary-name">is_native_little</span> = <code title="True">True</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="python3"></a><span class="summary-name">python3</span> = <code title="False">False</code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="unicode_error"></a><span class="summary-name">unicode_error</span> = <code title="'replace'"><code class="variable-quote">'</code><code class="variable-string">replace</code><code class="variable-quote">'</code></code>
+    </td>
+  </tr>
+</table>
+<!-- ==================== FUNCTION DETAILS ==================== -->
+<a name="section-FunctionDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Function Details</span></td>
+</tr>
+</table>
+<a name="chartostring"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">chartostring</span>(<span class="sig-arg">b</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>convert a character array to a string array with one less 
+  dimension.</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>b</code></strong> - Input character array (numpy datatype 'S1' or 'U1'). Will be 
+          converted to a array of strings, where each string has a fixed 
+          length of b.shape[-1] characters.</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>A numpy string array with datatype 'SN' or 'UN' and shape 
+          b.shape[:-1], where N=b.shape[-1].</dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="date2index"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">date2index</span>(<span class="sig-arg">dates</span>,
+        <span class="sig-arg">nctime</span>,
+        <span class="sig-arg">calendar</span>=<span class="sig-default">None</span>,
+        <span class="sig-arg">select</span>=<span class="sig-default">'exact'</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Return indices of a netCDF time variable corresponding to the given 
+  dates.</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>dates</code></strong> - A datetime object or a sequence of datetime objects. The datetime
+          objects should not include a time-zone offset.</li>
+        <li><strong class="pname"><code>nctime</code></strong> - A netCDF time variable object. The nctime object must have a 
+          <code>units</code> attribute.</li>
+        <li><strong class="pname"><code>calendar</code></strong> - Describes the calendar used in the time calculation. Valid 
+          calendars <code>'standard', 'gregorian', 'proleptic_gregorian' 
+          'noleap', '365_day', '360_day', 'julian', 'all_leap', 
+          '366_day'</code>. Default is <code>'standard'</code>, which is a 
+          mixed Julian/Gregorian calendar If <code>calendar</code> is None,
+          its value is given by <code>nctime.calendar</code> or 
+          <code>standard</code> if no such attribute exists.</li>
+        <li><strong class="pname"><code>select</code></strong> - <code>'exact', 'before', 'after', 'nearest'</code> The index 
+          selection method. <code>exact</code> will return the indices 
+          perfectly matching the dates given. <code>before</code> and 
+          <code>after</code> will return the indices corresponding to the 
+          dates just before or just after the given dates if an exact match
+          cannot be found. <code>nearest</code> will return the indices 
+          that correspond to the closest dates.</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>an index (indices) of the netCDF time variable corresponding to 
+          the given datetime object(s).</dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="date2num"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">date2num</span>(<span class="sig-arg">dates</span>,
+        <span class="sig-arg">units</span>,
+        <span class="sig-arg">calendar</span>=<span class="sig-default">'standard'</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Return numeric time values given datetime objects. The units of the 
+  numeric time values are described by the <code class="link">units</code> 
+  argument and the <code class="link">calendar</code> keyword. The datetime
+  objects must be in UTC with no time-zone offset.  If there is a time-zone
+  offset in <code>units</code>, it will be applied to the returned numeric 
+  values.</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>dates</code></strong> - A datetime object or a sequence of datetime objects. The datetime
+          objects should not include a time-zone offset.</li>
+        <li><strong class="pname"><code>units</code></strong> - a string of the form <code>'<b>time units</b> since <b>reference 
+          time</b></code>' describing the time units. <b><code>time 
+          units</code></b> can be days, hours, minutes, seconds, 
+          milliseconds or microseconds. <b><code>reference time</code></b> 
+          is the time origin. Milliseconds and microseconds can only be 
+          used with the proleptic_gregorian calendar, or the standard and 
+          gregorian calendars if the time origin is after 1582-10-15. A 
+          valid choice would be units=<code>'milliseconds since 1800-01-01 
+          00:00:00-6:00'</code>.</li>
+        <li><strong class="pname"><code>calendar</code></strong> - describes the calendar used in the time calculations. All the 
+          values currently defined in the <a 
+          href="http://cf-pcmdi.llnl.gov/documents/cf-conventions/" 
+          target="_top">CF metadata convention</a> are supported. Valid 
+          calendars <code>'standard', 'gregorian', 'proleptic_gregorian' 
+          'noleap', '365_day', '360_day', 'julian', 'all_leap', 
+          '366_day'</code>. Default is <code>'standard'</code>, which is a 
+          mixed Julian/Gregorian calendar.</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>a numeric time value, or an array of numeric time values.</dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="num2date"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">num2date</span>(<span class="sig-arg">times</span>,
+        <span class="sig-arg">units</span>,
+        <span class="sig-arg">calendar</span>=<span class="sig-default">'standard'</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Return datetime objects given numeric time values. The units of the 
+  numeric time values are described by the <code>units</code> argument and 
+  the <code>calendar</code> keyword. The returned datetime objects 
+  represent UTC with no time-zone offset, even if the specified 
+  <code>units</code> contain a time-zone offset.</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>times</code></strong> - numeric time values.</li>
+        <li><strong class="pname"><code>units</code></strong> - a string of the form <code>'<b>time units</b> since <b>reference 
+          time</b></code>' describing the time units. <b><code>time 
+          units</code></b> can be days, hours, minutes, seconds, 
+          milliseconds or microseconds. <b><code>reference time</code></b> 
+          is the time origin. Milliseconds and microseconds can only be 
+          used with the proleptic_gregorian calendar, or the standard and 
+          gregorian calendars if the time origin is after 1582-10-15. A 
+          valid choice would be units=<code>'milliseconds since 1800-01-01 
+          00:00:00-6:00'</code>.</li>
+        <li><strong class="pname"><code>calendar</code></strong> - describes the calendar used in the time calculations. All the 
+          values currently defined in the <a 
+          href="http://cf-pcmdi.llnl.gov/documents/cf-conventions/" 
+          target="_top">CF metadata convention</a> are supported. Valid 
+          calendars <code>'standard', 'gregorian', 'proleptic_gregorian' 
+          'noleap', '365_day', '360_day', 'julian', 'all_leap', 
+          '366_day'</code>. Default is <code>'standard'</code>, which is a 
+          mixed Julian/Gregorian calendar.</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>a datetime instance, or an array of datetime instances.
+          <p>The datetime instances returned are 'real' python datetime 
+          objects if the date falls in the Gregorian calendar (i.e. 
+          <code>calendar='proleptic_gregorian'</code>, or <code>calendar = 
+          'standard'</code> or <code>'gregorian'</code> and the date is 
+          after 1582-10-15). Otherwise, they are 'phony' datetime objects 
+          which support some but not all the methods of 'real' python 
+          datetime objects.  This is because the python datetime module 
+          cannot the uses the <code>'proleptic_gregorian'</code> calendar, 
+          even before the switch occured from the Julian calendar in 1582. 
+          The datetime instances do not contain a time-zone offset, even if
+          the specified <code>units</code> contains one.</p></dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="stringtoarr"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">stringtoarr</span>(<span class="sig-arg">a</span>,
+        <span class="sig-arg">NUMCHARS</span>,
+        <span class="sig-arg">dtype</span>=<span class="sig-default">'S'</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>convert a string to a character array of length NUMCHARS</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>a</code></strong> - Input python string.</li>
+        <li><strong class="pname"><code>NUMCHARS</code></strong> - number of characters used to represent string (if len(a) < 
+          NUMCHARS, it will be padded on the right with blanks).</li>
+        <li><strong class="pname"><code>dtype</code></strong> - type of numpy array to return.  Default is 'S', which means an 
+          array of dtype 'S1' will be returned.  If dtype='U', a unicode 
+          array (dtype = 'U1') will be returned.</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>A rank 1 numpy character array of length NUMCHARS with datatype 
+          'S1' (default) or 'U1' (if dtype='U')</dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="stringtochar"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">stringtochar</span>(<span class="sig-arg">a</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>convert a string array to a character array with one extra 
+  dimension</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>a</code></strong> - Input numpy string array with numpy datatype 'SN' or 'UN', where 
+          N is the number of characters in each string.  Will be converted 
+          to an array of characters (datatype 'S1' or 'U1') of shape 
+          a.shape + (N,).</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>A numpy character array with datatype 'S1' or 'U1' and shape 
+          a.shape + (N,), where N is the length of each string in a.</dd>
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== VARIABLES DETAILS ==================== -->
+<a name="section-VariablesDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Variables Details</span></td>
+</tr>
+</table>
+<a name="default_fillvals"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <h3 class="epydoc">default_fillvals</h3>
+  
+  <dl class="fields">
+  </dl>
+  <dl class="fields">
+    <dt>Value:</dt>
+      <dd><table><tr><td><pre class="variable">
+<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">S1</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x00</code><code class="variable-quote">'</code><code class="variable-op">,</code>
+ <code class="variable-quote">'</code><code class="variable-string">U1</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">\x00</code><code class="variable-quote">'</code><code class="variable-op">,</code>
+ <code class="variable-quote">'</code><code class="variable-string">f4</code><code class="variable-quote">'</code><code class="variable-op">: </code>9.96920996839e+36<code class="variable-op">,</code>
+ <code class="variable-quote">'</code><code class="variable-string">f8</code><code class="variable-quote">'</code><code class="variable-op">: </code>9.96920996839e+36<code class="variable-op">,</code>
+ <code class="variable-quote">'</code><code class="variable-string">i1</code><code class="variable-quote">'</code><code class="variable-op">: </code>-127<code class="variable-op">,</code>
+ <code class="variable-quote">'</code><code class="variable-string">i2</code><code class="variable-quote">'</code><code class="variable-op">: </code>-32767<code class="variable-op">,</code>
+ <code class="variable-quote">'</code><code class="variable-string">i4</code><code class="variable-quote">'</code><code class="variable-op">: </code>-2147483647<code class="variable-op">,</code>
+ <code class="variable-quote">'</code><code class="variable-string">i8</code><code class="variable-quote">'</code><code class="variable-op">: </code>-9223372036854775806<code class="variable-op">,</code>
+<code class="variable-ellipsis">...</code>
+</pre></td></tr></table>
+</dd>
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th bgcolor="#70b0f0" class="navbar-select"
+          >   Home   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Fri Dec  5 15:19:53 2014
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netCDF4.CompoundType-class.html b/docs/netCDF4.CompoundType-class.html
new file mode 100644
index 0000000..93b4a03
--- /dev/null
+++ b/docs/netCDF4.CompoundType-class.html
@@ -0,0 +1,357 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netCDF4.CompoundType</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        <a href="netCDF4-module.html">Module netCDF4</a> ::
+        Class CompoundType
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== CLASS DESCRIPTION ==================== -->
+<h1 class="epydoc">Class CompoundType</h1><p class="nomargin-top"></p>
+<pre class="base-tree">
+object --+
+         |
+        <strong class="uidshort">CompoundType</strong>
+</pre>
+
+<hr />
+<p>A <a href="netCDF4.CompoundType-class.html" 
+  class="link">CompoundType</a> instance is used to describe a compound 
+  data type.</p>
+  <p>Constructor: <code>CompoundType(group, datatype, 
+  datatype_name)</code></p>
+
+<hr />
+<div class="fields">      <p><strong>Attention:</strong>
+        When creating nested compound data types, the inner compound data 
+        types must already be associated with CompoundType instances (so 
+        create CompoundType instances for the innermost structures first).
+        <p><a href="netCDF4.CompoundType-class.html" 
+        class="link">CompoundType</a> instances should be created using the
+        <a href="netCDF4.Dataset-class.html#createCompoundType" 
+        class="link">createCompoundType</a> method of a Dataset or <a 
+        href="netCDF4.Group-class.html" class="link">Group</a> instance, 
+        not using this class directly.</p>
+        <p><b>Parameters:</b></p>
+        <p><b><code>group</code></b> - <a href="netCDF4.Group-class.html" 
+        class="link">Group</a> instance to associate with the compound 
+        datatype.</p>
+        <p><b><code>datatype</code></b> - A numpy dtype object describing a
+        structured (a.k.a record) array.  Can be composed of homogeneous 
+        numeric or character data types, or other structured array data 
+        types.</p>
+        <p><b><code>datatype_name</code></b> - a Python string containing a
+        description of the compound data type.</p>
+        <p><b>Returns:</b></p>
+        <p>a <a href="netCDF4.CompoundType-class.html" 
+        class="link">CompoundType</a> instance, which can be passed to the 
+        <code>createVariable</code> method of a <a 
+        href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+        href="netCDF4.Group-class.html" class="link">Group</a> 
+        instance.</p>
+        <p>The instance variables <code>dtype</code> and <code>name</code> 
+        should not be modified by the user.</p>
+      </p>
+</div><!-- ==================== INSTANCE METHODS ==================== -->
+<a name="section-InstanceMethods"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Methods</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.CompoundType-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      x.__init__(...) initializes x; see help(type(x)) for signature</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type">a new object with type S, a subtype of T</span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.CompoundType-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
+        <span class="summary-sig-arg">S</span>,
+        <span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.CompoundType-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">x</span>)</span><br />
+      repr(x)</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__unicode__"></a><span class="summary-sig-name">__unicode__</span>(<span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__delattr__</code>,
+      <code>__format__</code>,
+      <code>__getattribute__</code>,
+      <code>__hash__</code>,
+      <code>__reduce__</code>,
+      <code>__reduce_ex__</code>,
+      <code>__setattr__</code>,
+      <code>__sizeof__</code>,
+      <code>__str__</code>,
+      <code>__subclasshook__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== INSTANCE VARIABLES ==================== -->
+<a name="section-InstanceVariables"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Variables</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="dtype"></a><span class="summary-name">dtype</span><br />
+      A numpy dtype object describing the compound data type.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="name"></a><span class="summary-name">name</span><br />
+      A python string describing the compound type.
+    </td>
+  </tr>
+</table>
+<!-- ==================== PROPERTIES ==================== -->
+<a name="section-Properties"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Properties</span></td>
+</tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__class__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== METHOD DETAILS ==================== -->
+<a name="section-MethodDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Method Details</span></td>
+</tr>
+</table>
+<a name="__init__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">...</span>)</span>
+    <br /><em class="fname">(Constructor)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__init__(...) initializes x; see help(type(x)) for signature</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__init__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__new__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
+        <span class="sig-arg">S</span>,
+        <span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  
+  <dl class="fields">
+    <dt>Returns: a new object with type S, a subtype of T</dt>
+    <dt>Overrides:
+        object.__new__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__repr__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">x</span>)</span>
+    <br /><em class="fname">(Representation operator)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>repr(x)</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__repr__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Fri Dec  5 15:19:53 2014
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netCDF4.Dataset-class.html b/docs/netCDF4.Dataset-class.html
new file mode 100644
index 0000000..18e3af2
--- /dev/null
+++ b/docs/netCDF4.Dataset-class.html
@@ -0,0 +1,1698 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netCDF4.Dataset</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        <a href="netCDF4-module.html">Module netCDF4</a> ::
+        Class Dataset
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== CLASS DESCRIPTION ==================== -->
+<h1 class="epydoc">Class Dataset</h1><p class="nomargin-top"></p>
+<pre class="base-tree">
+object --+
+         |
+        <strong class="uidshort">Dataset</strong>
+</pre>
+
+<dl><dt>Known Subclasses:</dt>
+<dd>
+      <ul class="subclass-list">
+<li><a href="netCDF4.Group-class.html">Group</a></li><li>, <a href="netCDF4.MFDataset-class.html">MFDataset</a></li>  </ul>
+</dd></dl>
+
+<hr />
+<p>Dataset(self, filename, mode="r", clobber=True, 
+  diskless=False, persist=False, keepweakref=False, format='NETCDF4')</p>
+  <p>A netCDF <a href="netCDF4.Dataset-class.html" class="link">Dataset</a>
+  is a collection of dimensions, groups, variables and attributes. Together
+  they describe the meaning of data and relations among data fields stored 
+  in a netCDF file.</p>
+  <p><b>Parameters:</b></p>
+  <p><b><code>filename</code></b> - Name of netCDF file to hold 
+  dataset.</p>
+  <p><b>Keywords</b>:</p>
+  <p><b><code>mode</code></b> - access mode. <code>r</code> means 
+  read-only; no data can be modified. <code>w</code> means write; a new 
+  file is created, an existing file with the same name is deleted. 
+  <code>a</code> and <code>r+</code> mean append (in analogy with serial 
+  files); an existing file is opened for reading and writing. Appending 
+  <code>s</code> to modes <code>w</code>, <code>r+</code> or <code>a</code>
+  will enable unbuffered shared access to <code>NETCDF3_CLASSIC</code> or 
+  <code>NETCDF3_64BIT</code> formatted files. Unbuffered acesss may be 
+  useful even if you don't need shared access, since it may be faster for 
+  programs that don't access data sequentially. This option is ignored for 
+  <code>NETCDF4</code> and <code>NETCDF4_CLASSIC</code> formatted 
+  files.</p>
+  <p><b><code>clobber</code></b> - if <code>True</code> (default), opening 
+  a file with <code>mode='w'</code> will clobber an existing file with the 
+  same name.  if <code>False</code>, an exception will be raised if a file 
+  with the same name already exists.</p>
+  <p><b><code>format</code></b> - underlying file format (one of 
+  <code>'NETCDF4', 'NETCDF4_CLASSIC', 'NETCDF3_CLASSIC'</code> or 
+  <code>'NETCDF3_64BIT'</code>.  Only relevant if <code>mode = 'w'</code> 
+  (if <code>mode = 'r','a'</code> or <code>'r+'</code> the file format is 
+  automatically detected). Default <code>'NETCDF4'</code>, which means the 
+  data is stored in an HDF5 file, using netCDF 4 API features.  Setting 
+  <code>format='NETCDF4_CLASSIC'</code> will create an HDF5 file, using 
+  only netCDF 3 compatibile API features. netCDF 3 clients must be 
+  recompiled and linked against the netCDF 4 library to read files in 
+  <code>NETCDF4_CLASSIC</code> format. <code>'NETCDF3_CLASSIC'</code> is 
+  the classic netCDF 3 file format that does not handle 2+ Gb files very 
+  well. <code>'NETCDF3_64BIT'</code> is the 64-bit offset version of the 
+  netCDF 3 file format, which fully supports 2+ GB files, but is only 
+  compatible with clients linked against netCDF version 3.6.0 or later.</p>
+  <p><code>diskless</code> - create diskless (in memory) file.  This is an 
+  experimental feature added to the C library after the netcdf-4.2 
+  release.</p>
+  <p><code>persist</code> - if diskless=True, persist file to disk when 
+  closed (default False).</p>
+  <p><code>keepweakref</code> - if keepweakref=True, child Dimension and 
+  Variable instances will keep weak references to the parent Dataset or 
+  Group object.  Default is False, which means strong references will be 
+  kept.  Having Dimension and Variable instances keep a strong reference to
+  the parent Dataset instance, which in turn keeps a reference to child 
+  Dimension and Variable instances, creates circular references. Circular 
+  references complicate garbage collection, which may mean increased memory
+  usage for programs that create may Dataset instances with lots of 
+  Variables.  Setting keepweakref to True allows Dataset instances to be 
+  garbage collected as soon as they go out of scope, potential reducing 
+  memory usage.  However, in most cases this is not desirable, since the 
+  associated Variable instances may still be needed, but are rendered 
+  unusable when the parent Dataset instance is garbage collected.</p>
+  <p><b>Returns:</b></p>
+  <p>a <a href="netCDF4.Dataset-class.html" class="link">Dataset</a> 
+  instance.  All further operations on the netCDF Dataset are accomplised 
+  via <a href="netCDF4.Dataset-class.html" class="link">Dataset</a> 
+  instance methods.</p>
+  <p>A list of attribute names corresponding to global netCDF attributes 
+  defined for the <a href="netCDF4.Dataset-class.html" 
+  class="link">Dataset</a> can be obtained with the <a 
+  href="netCDF4.Dataset-class.html#ncattrs" class="link">ncattrs()</a> 
+  method. These attributes can be created by assigning to an attribute of 
+  the <a href="netCDF4.Dataset-class.html" class="link">Dataset</a> 
+  instance. A dictionary containing all the netCDF attribute name/value 
+  pairs is provided by the <code>__dict__</code> attribute of a <a 
+  href="netCDF4.Dataset-class.html" class="link">Dataset</a> instance.</p>
+  <p>The instance variables <code>dimensions, variables, groups, cmptypes, 
+  data_model, disk_format</code> and <code>path</code> are read-only (and 
+  should not be modified by the user).</p>
+
+<!-- ==================== INSTANCE METHODS ==================== -->
+<a name="section-InstanceMethods"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Methods</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#__delattr__" class="summary-sig-name">__delattr__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      x.__delattr__('name') <==> del x.name</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__enter__"></a><span class="summary-sig-name">__enter__</span>(<span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__exit__"></a><span class="summary-sig-name">__exit__</span>(<span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__getattr__"></a><span class="summary-sig-name">__getattr__</span>(<span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#__getattribute__" class="summary-sig-name">__getattribute__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      x.__getattribute__('name') <==> x.name</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">filename</span>,
+        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default">"r"</span>,
+        <span class="summary-sig-arg">clobber</span>=<span class="summary-sig-default">True</span>,
+        <span class="summary-sig-arg">diskless</span>=<span class="summary-sig-default">False</span>,
+        <span class="summary-sig-arg">persist</span>=<span class="summary-sig-default">False</span>,
+        <span class="summary-sig-arg">keepweakref</span>=<span class="summary-sig-default">False</span>,
+        <span class="summary-sig-arg">format</span>=<span class="summary-sig-default">'NETCDF4'</span>)</span><br />
+      x.__init__(...) initializes x; see help(type(x)) for signature</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type">a new object with type S, a subtype of T</span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
+        <span class="summary-sig-arg">S</span>,
+        <span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">x</span>)</span><br />
+      repr(x)</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#__setattr__" class="summary-sig-name">__setattr__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      x.__setattr__('name', value) <==> x.name = value</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__unicode__"></a><span class="summary-sig-name">__unicode__</span>(<span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="close"></a><span class="summary-sig-name">close</span>(<span class="summary-sig-arg">self</span>)</span><br />
+      Close the Dataset.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#createCompoundType" class="summary-sig-name">createCompoundType</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">datatype</span>,
+        <span class="summary-sig-arg">datatype_name</span>)</span><br />
+      Creates a new compound data type named <code>datatype_name</code> 
+      from the numpy dtype object <code>datatype</code>.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#createDimension" class="summary-sig-name">createDimension</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">dimname</span>,
+        <span class="summary-sig-arg">size</span>=<span class="summary-sig-default">None</span>)</span><br />
+      Creates a new dimension with the given <code>dimname</code> and 
+      <code>size</code>.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#createGroup" class="summary-sig-name">createGroup</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">groupname</span>)</span><br />
+      Creates a new <a href="netCDF4.Group-class.html" 
+      class="link">Group</a> with the given <code>groupname</code>.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#createVLType" class="summary-sig-name">createVLType</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">datatype</span>,
+        <span class="summary-sig-arg">datatype_name</span>)</span><br />
+      Creates a new VLEN data type named <code>datatype_name</code> from a 
+      numpy dtype object <code>datatype</code>.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#createVariable" class="summary-sig-name">createVariable</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">varname</span>,
+        <span class="summary-sig-arg">datatype</span>,
+        <span class="summary-sig-arg">dimensions</span>=<span class="summary-sig-default">()</span>,
+        <span class="summary-sig-arg">zlib</span>=<span class="summary-sig-default">False</span>,
+        <span class="summary-sig-arg">complevel</span>=<span class="summary-sig-default">4</span>,
+        <span class="summary-sig-arg">shuffle</span>=<span class="summary-sig-default">True</span>,
+        <span class="summary-sig-arg">fletcher32</span>=<span class="summary-sig-default">False</span>,
+        <span class="summary-sig-arg">contiguous</span>=<span class="summary-sig-default">False</span>,
+        <span class="summary-sig-arg">chunksizes</span>=<span class="summary-sig-default">None</span>,
+        <span class="summary-sig-arg">endian</span>=<span class="summary-sig-default">'native'</span>,
+        <span class="summary-sig-arg">least_significant_digit</span>=<span class="summary-sig-default">None</span>,
+        <span class="summary-sig-arg">fill_value</span>=<span class="summary-sig-default">None</span>)</span><br />
+      Creates a new variable with the given <code>varname</code>, 
+      <code>datatype</code>, and <code>dimensions</code>.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#delncattr" class="summary-sig-name">delncattr</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">name</span>,
+        <span class="summary-sig-arg">value</span>)</span><br />
+      delete a netCDF dataset or group attribute.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#filepath" class="summary-sig-name">filepath</a>(<span class="summary-sig-arg">self</span>)</span><br />
+      Get the file system path (or the opendap URL) which was used to 
+      open/create the Dataset.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#getncattr" class="summary-sig-name">getncattr</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">name</span>)</span><br />
+      retrievel a netCDF dataset or group attribute.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="ncattrs"></a><span class="summary-sig-name">ncattrs</span>(<span class="summary-sig-arg">self</span>)</span><br />
+      return netCDF global attribute names for this <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> in a list.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="renameAttribute"></a><span class="summary-sig-name">renameAttribute</span>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">oldname</span>,
+        <span class="summary-sig-arg">newname</span>)</span><br />
+      rename a <a href="netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> or <a href="netCDF4.Group-class.html" 
+      class="link">Group</a> attribute named <code>oldname</code> to 
+      <code>newname</code>.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="renameDimension"></a><span class="summary-sig-name">renameDimension</span>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">oldname</span>,
+        <span class="summary-sig-arg">newname</span>)</span><br />
+      rename a <a href="netCDF4.Dimension-class.html" 
+      class="link">Dimension</a> named <code>oldname</code> to 
+      <code>newname</code>.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="renameGroup"></a><span class="summary-sig-name">renameGroup</span>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">oldname</span>,
+        <span class="summary-sig-arg">newname</span>)</span><br />
+      rename a <a href="netCDF4.Group-class.html" class="link">Group</a> 
+      named <code>oldname</code> to <code>newname</code> (requires netcdf 
+      >= 4.3.1).</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="renameVariable"></a><span class="summary-sig-name">renameVariable</span>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">oldname</span>,
+        <span class="summary-sig-arg">newname</span>)</span><br />
+      rename a <a href="netCDF4.Variable-class.html" 
+      class="link">Variable</a> named <code>oldname</code> to 
+      <code>newname</code></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#set_auto_mask" class="summary-sig-name">set_auto_mask</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">True_or_False</span>)</span><br />
+      Call <a href="netCDF4.Dataset-class.html#set_auto_mask" 
+      class="link">set_auto_mask</a> for all variables contained in this <a
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a>, as well as 
+      for all variables in all its subgroups.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#set_auto_maskandscale" class="summary-sig-name">set_auto_maskandscale</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">True_or_False</span>)</span><br />
+      Call <a href="netCDF4.Dataset-class.html#set_auto_maskandscale" 
+      class="link">set_auto_maskandscale</a> for all variables contained in
+      this <a href="netCDF4.Dataset-class.html" class="link">Dataset</a> or
+      <a href="netCDF4.Group-class.html" class="link">Group</a>, as well as
+      for all variables in all its subgroups.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#set_auto_scale" class="summary-sig-name">set_auto_scale</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">True_or_False</span>)</span><br />
+      Call <a href="netCDF4.Dataset-class.html#set_auto_scale" 
+      class="link">set_auto_scale</a> for all variables contained in this 
+      <a href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a>, as well as 
+      for all variables in all its subgroups.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#set_fill_off" class="summary-sig-name">set_fill_off</a>(<span class="summary-sig-arg">self</span>)</span><br />
+      Sets the fill mode for a <a href="netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> open for writing to <code>off</code>.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#set_fill_on" class="summary-sig-name">set_fill_on</a>(<span class="summary-sig-arg">self</span>)</span><br />
+      Sets the fill mode for a <a href="netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> open for writing to <code>on</code>.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#setncattr" class="summary-sig-name">setncattr</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">name</span>,
+        <span class="summary-sig-arg">value</span>)</span><br />
+      set a netCDF dataset or group attribute using name,value pair.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dataset-class.html#setncatts" class="summary-sig-name">setncatts</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">attdict</span>)</span><br />
+      set a bunch of netCDF dataset or group attributes at once using a 
+      python dictionary.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="sync"></a><span class="summary-sig-name">sync</span>(<span class="summary-sig-arg">self</span>)</span><br />
+      Writes all buffered data in the <a href="netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> to the disk file.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__format__</code>,
+      <code>__hash__</code>,
+      <code>__reduce__</code>,
+      <code>__reduce_ex__</code>,
+      <code>__sizeof__</code>,
+      <code>__str__</code>,
+      <code>__subclasshook__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== INSTANCE VARIABLES ==================== -->
+<a name="section-InstanceVariables"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Variables</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="cmptypes"></a><span class="summary-name">cmptypes</span><br />
+      The <code>cmptypes</code> dictionary maps the names of compound types
+      defined for the <a href="netCDF4.Group-class.html" 
+      class="link">Group</a> or <a href="netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> to instances of the <a 
+      href="netCDF4.CompoundType-class.html" class="link">CompoundType</a> 
+      class.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="data_model"></a><span class="summary-name">data_model</span><br />
+      The <code>data_model</code> attribute describes the netCDF data model
+      version, one of <code>NETCDF3_CLASSIC</code>, <code>NETCDF4</code>, 
+      <code>NETCDF4_CLASSIC</code> or <code>NETCDF3_64BIT</code>.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="dimensions"></a><span class="summary-name">dimensions</span><br />
+      The <code>dimensions</code> dictionary maps the names of dimensions 
+      defined for the <a href="netCDF4.Group-class.html" 
+      class="link">Group</a> or <a href="netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> to instances of the <a 
+      href="netCDF4.Dimension-class.html" class="link">Dimension</a> class.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.Dataset-class.html#disk_format" class="summary-name">disk_format</a><br />
+      The <code>disk_format</code> attribute describes the underlying file 
+      format, one of <code>NETCDF3</code>, <code>HDF5</code>, 
+      <code>HDF4</code>, <code>PNETCDF</code>, <code>DAP2</code>, 
+      <code>DAP4</code> or <code>UNDEFINED</code>.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="file_format"></a><span class="summary-name">file_format</span><br />
+      same as <code>data_model</code>, retained for backwards 
+      compatibility.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="groups"></a><span class="summary-name">groups</span><br />
+      The groups dictionary maps the names of groups created for this <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> to instances 
+      of the <a href="netCDF4.Group-class.html" class="link">Group</a> 
+      class (the <a href="netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> class is simply a special case of the <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> class which 
+      describes the root group in the netCDF file).
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.Dataset-class.html#parent" class="summary-name">parent</a><br />
+      The <code>parent</code> attribute is a reference to the parent <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instance.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.Dataset-class.html#path" class="summary-name">path</a><br />
+      The <code>path</code> attribute shows the location of the <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> in the <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> in a unix 
+      directory format (the names of groups in the hierarchy separated by 
+      backslashes).
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="variables"></a><span class="summary-name">variables</span><br />
+      The <code>variables</code> dictionary maps the names of variables 
+      defined for this <a href="netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> or <a href="netCDF4.Group-class.html" 
+      class="link">Group</a> to instances of the <a 
+      href="netCDF4.Variable-class.html" class="link">Variable</a> class.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="vltypes"></a><span class="summary-name">vltypes</span><br />
+      The <code>vltypes</code> dictionary maps the names of variable-length
+      types defined for the <a href="netCDF4.Group-class.html" 
+      class="link">Group</a> or <a href="netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> to instances of the <a 
+      href="netCDF4.VLType-class.html" class="link">VLType</a> class.
+    </td>
+  </tr>
+</table>
+<!-- ==================== PROPERTIES ==================== -->
+<a name="section-Properties"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Properties</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="keepweakref"></a><span class="summary-name">keepweakref</span>
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__class__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== METHOD DETAILS ==================== -->
+<a name="section-MethodDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Method Details</span></td>
+</tr>
+</table>
+<a name="__delattr__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__delattr__</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__delattr__('name') <==> del x.name</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__delattr__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__getattribute__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getattribute__</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__getattribute__('name') <==> x.name</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__getattribute__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__init__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">filename</span>,
+        <span class="sig-arg">mode</span>=<span class="sig-default">"r"</span>,
+        <span class="sig-arg">clobber</span>=<span class="sig-default">True</span>,
+        <span class="sig-arg">diskless</span>=<span class="sig-default">False</span>,
+        <span class="sig-arg">persist</span>=<span class="sig-default">False</span>,
+        <span class="sig-arg">keepweakref</span>=<span class="sig-default">False</span>,
+        <span class="sig-arg">format</span>=<span class="sig-default">'NETCDF4'</span>)</span>
+    <br /><em class="fname">(Constructor)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__init__(...) initializes x; see help(type(x)) for signature</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__init__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__new__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
+        <span class="sig-arg">S</span>,
+        <span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  
+  <dl class="fields">
+    <dt>Returns: a new object with type S, a subtype of T</dt>
+    <dt>Overrides:
+        object.__new__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__repr__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">x</span>)</span>
+    <br /><em class="fname">(Representation operator)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>repr(x)</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__repr__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__setattr__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__setattr__('name', value) <==> x.name = value</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__setattr__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="createCompoundType"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">createCompoundType</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">datatype</span>,
+        <span class="sig-arg">datatype_name</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Creates a new compound data type named <code>datatype_name</code> from
+  the numpy dtype object <code>datatype</code>.</p>
+  <dl class="fields">
+  </dl>
+<div class="fields">      <p><strong>Attention:</strong>
+        If the new compound data type contains other compound data types 
+        (i.e. it is a 'nested' compound type, where not all of the elements
+        are homogenous numeric data types), then the 'inner' compound types
+        <b>must</b> be created first.
+        <p>The return value is the <a 
+        href="netCDF4.CompoundType-class.html" 
+        class="link">CompoundType</a> class instance describing the new 
+        datatype.</p>
+      </p>
+</div></td></tr></table>
+</div>
+<a name="createDimension"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">createDimension</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">dimname</span>,
+        <span class="sig-arg">size</span>=<span class="sig-default">None</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Creates a new dimension with the given <code>dimname</code> and 
+  <code>size</code>.</p>
+  <p><code>size</code> must be a positive integer or <code>None</code>, 
+  which stands for "unlimited" (default is <code>None</code>). 
+  Specifying a size of 0 also results in an unlimited dimension. The return
+  value is the <a href="netCDF4.Dimension-class.html" 
+  class="link">Dimension</a> class instance describing the new dimension.  
+  To determine the current maximum size of the dimension, use the 
+  <code>len</code> function on the <a href="netCDF4.Dimension-class.html" 
+  class="link">Dimension</a> instance. To determine if a dimension is 
+  'unlimited', use the <code>isunlimited()</code> method of the <a 
+  href="netCDF4.Dimension-class.html" class="link">Dimension</a> 
+  instance.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="createGroup"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">createGroup</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">groupname</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Creates a new <a href="netCDF4.Group-class.html" 
+  class="link">Group</a> with the given <code>groupname</code>.</p>
+  <p>The return value is a <a href="netCDF4.Group-class.html" 
+  class="link">Group</a> class instance describing the new group.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="createVLType"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">createVLType</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">datatype</span>,
+        <span class="sig-arg">datatype_name</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Creates a new VLEN data type named <code>datatype_name</code> from a 
+  numpy dtype object <code>datatype</code>.</p>
+  <p>The return value is the <a href="netCDF4.VLType-class.html" 
+  class="link">VLType</a> class instance describing the new datatype.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="createVariable"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">createVariable</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">varname</span>,
+        <span class="sig-arg">datatype</span>,
+        <span class="sig-arg">dimensions</span>=<span class="sig-default">()</span>,
+        <span class="sig-arg">zlib</span>=<span class="sig-default">False</span>,
+        <span class="sig-arg">complevel</span>=<span class="sig-default">4</span>,
+        <span class="sig-arg">shuffle</span>=<span class="sig-default">True</span>,
+        <span class="sig-arg">fletcher32</span>=<span class="sig-default">False</span>,
+        <span class="sig-arg">contiguous</span>=<span class="sig-default">False</span>,
+        <span class="sig-arg">chunksizes</span>=<span class="sig-default">None</span>,
+        <span class="sig-arg">endian</span>=<span class="sig-default">'native'</span>,
+        <span class="sig-arg">least_significant_digit</span>=<span class="sig-default">None</span>,
+        <span class="sig-arg">fill_value</span>=<span class="sig-default">None</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Creates a new variable with the given <code>varname</code>, 
+  <code>datatype</code>, and <code>dimensions</code>. If dimensions are not
+  given, the variable is assumed to be a scalar.</p>
+  <p>The <code>datatype</code> can be a numpy datatype object, or a string 
+  that describes a numpy dtype object (like the <code>dtype.str</code> 
+  attribue of a numpy array). Supported specifiers include: <code>'S1' or 
+  'c' (NC_CHAR), 'i1' or 'b' or 'B' (NC_BYTE), 'u1' (NC_UBYTE), 'i2' or 'h'
+  or 's' (NC_SHORT), 'u2' (NC_USHORT), 'i4' or 'i' or 'l' (NC_INT), 'u4' 
+  (NC_UINT), 'i8' (NC_INT64), 'u8' (NC_UINT64), 'f4' or 'f' (NC_FLOAT), 
+  'f8' or 'd' (NC_DOUBLE)</code>. <code>datatype</code> can also be a <a 
+  href="netCDF4.CompoundType-class.html" class="link">CompoundType</a> 
+  instance (for a structured, or compound array), a <a 
+  href="netCDF4.VLType-class.html" class="link">VLType</a> instance (for a 
+  variable-length array), or the python <code>str</code> builtin (for a 
+  variable-length string array). Numpy string and unicode datatypes with 
+  length greater than one are aliases for <code>str</code>.</p>
+  <p>Data from netCDF variables is presented to python as numpy arrays with
+  the corresponding data type.</p>
+  <p><code>dimensions</code> must be a tuple containing dimension names 
+  (strings) that have been defined previously using 
+  <code>createDimension</code>. The default value is an empty tuple, which 
+  means the variable is a scalar.</p>
+  <p>If the optional keyword <code>zlib</code> is <code>True</code>, the 
+  data will be compressed in the netCDF file using gzip compression 
+  (default <code>False</code>).</p>
+  <p>The optional keyword <code>complevel</code> is an integer between 1 
+  and 9 describing the level of compression desired (default 4). Ignored if
+  <code>zlib=False</code>.</p>
+  <p>If the optional keyword <code>shuffle</code> is <code>True</code>, the
+  HDF5 shuffle filter will be applied before compressing the data (default 
+  <code>True</code>).  This significantly improves compression. Default is 
+  <code>True</code>. Ignored if <code>zlib=False</code>.</p>
+  <p>If the optional keyword <code>fletcher32</code> is <code>True</code>, 
+  the Fletcher32 HDF5 checksum algorithm is activated to detect errors. 
+  Default <code>False</code>.</p>
+  <p>If the optional keyword <code>contiguous</code> is <code>True</code>, 
+  the variable data is stored contiguously on disk.  Default 
+  <code>False</code>. Setting to <code>True</code> for a variable with an 
+  unlimited dimension will trigger an error.</p>
+  <p>The optional keyword <code>chunksizes</code> can be used to manually 
+  specify the HDF5 chunksizes for each dimension of the variable. A 
+  detailed discussion of HDF chunking and I/O performance is available <a 
+  href="http://www.hdfgroup.org/HDF5/doc/H5.user/Chunking.html" 
+  target="_top">here</a>. Basically, you want the chunk size for each 
+  dimension to match as closely as possible the size of the data block that
+  users will read from the file.  <code>chunksizes</code> cannot be set if 
+  <code>contiguous=True</code>.</p>
+  <p>The optional keyword <code>endian</code> can be used to control 
+  whether the data is stored in little or big endian format on disk. 
+  Possible values are <code>little, big</code> or <code>native</code> 
+  (default). The library will automatically handle endian conversions when 
+  the data is read, but if the data is always going to be read on a 
+  computer with the opposite format as the one used to create the file, 
+  there may be some performance advantage to be gained by setting the 
+  endian-ness.</p>
+  <p>The <code>zlib, complevel, shuffle, fletcher32, contiguous, 
+  chunksizes</code> and <code>endian</code> keywords are silently ignored 
+  for netCDF 3 files that do not use HDF5.</p>
+  <p>The optional keyword <code>fill_value</code> can be used to override 
+  the default netCDF <code>_FillValue</code> (the value that the variable 
+  gets filled with before any data is written to it, defaults given in 
+  netCDF4.default_fillvals). If fill_value is set to <code>False</code>, 
+  then the variable is not pre-filled.</p>
+  <p>If the optional keyword parameter <code>least_significant_digit</code>
+  is specified, variable data will be truncated (quantized). In conjunction
+  with <code>zlib=True</code> this produces 'lossy', but significantly more
+  efficient compression. For example, if 
+  <code>least_significant_digit=1</code>, data will be quantized using 
+  <code>numpy.around(scale*data)/scale</code>, where scale = 2**bits, and 
+  bits is determined so that a precision of 0.1 is retained (in this case 
+  bits=4). From <a 
+  href="http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml" 
+  target="_top">http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml</a>:
+  "least_significant_digit -- power of ten of the smallest decimal 
+  place in unpacked data that is a reliable value." Default is 
+  <code>None</code>, or no quantization, or 'lossless' compression.</p>
+  <p>When creating variables in a <code>NETCDF4</code> or 
+  <code>NETCDF4_CLASSIC</code> formatted file, HDF5 creates something 
+  called a 'chunk cache' for each variable.  The default size of the chunk 
+  cache may be large enough to completely fill available memory when 
+  creating thousands of variables.  The optional keyword 
+  <code>chunk_cache</code> allows you to reduce (or increase) the size of 
+  the default chunk cache when creating a variable.  The setting only 
+  persists as long as the Dataset is open - you can use the 
+  set_var_chunk_cache method to change it the next time the Dataset is 
+  opened. Warning - messing with this parameter can seriously degrade 
+  performance.</p>
+  <p>The return value is the <a href="netCDF4.Variable-class.html" 
+  class="link">Variable</a> class instance describing the new variable.</p>
+  <p>A list of names corresponding to netCDF variable attributes can be 
+  obtained with the <a href="netCDF4.Variable-class.html" 
+  class="link">Variable</a> method <code>ncattrs()</code>. A dictionary 
+  containing all the netCDF attribute name/value pairs is provided by the 
+  <code>__dict__</code> attribute of a <a 
+  href="netCDF4.Variable-class.html" class="link">Variable</a> 
+  instance.</p>
+  <p><a href="netCDF4.Variable-class.html" class="link">Variable</a> 
+  instances behave much like array objects. Data can be assigned to or 
+  retrieved from a variable with indexing and slicing operations on the <a 
+  href="netCDF4.Variable-class.html" class="link">Variable</a> instance. A 
+  <a href="netCDF4.Variable-class.html" class="link">Variable</a> instance 
+  has six Dataset standard attributes: <code>dimensions, dtype, shape, 
+  ndim, name</code> and <code>least_significant_digit</code>. Application 
+  programs should never modify these attributes. The 
+  <code>dimensions</code> attribute is a tuple containing the names of the 
+  dimensions associated with this variable. The <code>dtype</code> 
+  attribute is a string describing the variable's data type (<code>i4, f8, 
+  S1,</code> etc). The <code>shape</code> attribute is a tuple describing 
+  the current sizes of all the variable's dimensions. The <code>name</code>
+  attribute is a string containing the name of the Variable instance. The 
+  <code>least_significant_digit</code> attributes describes the power of 
+  ten of the smallest decimal place in the data the contains a reliable 
+  value.  assigned to the <a href="netCDF4.Variable-class.html" 
+  class="link">Variable</a> instance. If <code>None</code>, the data is not
+  truncated. The <code>ndim</code> attribute is the number of variable 
+  dimensions.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="delncattr"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">delncattr</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">name</span>,
+        <span class="sig-arg">value</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>delete a netCDF dataset or group attribute.  Only use if you need to 
+  delete a netCDF attribute with the same name as one of the reserved 
+  python attributes.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="filepath"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">filepath</span>(<span class="sig-arg">self</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Get the file system path (or the opendap URL) which was used to 
+  open/create the Dataset. Requires netcdf >= 4.1.2</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="getncattr"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">getncattr</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">name</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>retrievel a netCDF dataset or group attribute.  Only use if you need 
+  to set a netCDF attribute with the same name as one of the reserved 
+  python attributes.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="set_auto_mask"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_auto_mask</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">True_or_False</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Call <a href="netCDF4.Dataset-class.html#set_auto_mask" 
+  class="link">set_auto_mask</a> for all variables contained in this <a 
+  href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+  href="netCDF4.Group-class.html" class="link">Group</a>, as well as for 
+  all variables in all its subgroups.</p>
+  <p><b>Parameters</b>:</p>
+  <p><b><code>True_or_False</code></b> - Boolean determining if automatic 
+  conversion to masked arrays shall be applied for all variables.</p>
+  <p><b>Notes</b>:</p>
+  <p>Calling this function only affects existing variables. Variables 
+  created after calling this function will follow the default 
+  behaviour.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="set_auto_maskandscale"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_auto_maskandscale</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">True_or_False</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Call <a href="netCDF4.Dataset-class.html#set_auto_maskandscale" 
+  class="link">set_auto_maskandscale</a> for all variables contained in 
+  this <a href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+  href="netCDF4.Group-class.html" class="link">Group</a>, as well as for 
+  all variables in all its subgroups.</p>
+  <p><b>Parameters</b>:</p>
+  <p><b><code>True_or_False</code></b> - Boolean determining if automatic 
+  conversion to masked arrays and variable scaling shall be applied for all
+  variables.</p>
+  <p><b>Notes</b>:</p>
+  <p>Calling this function only affects existing variables. Variables 
+  created after calling this function will follow the default 
+  behaviour.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="set_auto_scale"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_auto_scale</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">True_or_False</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Call <a href="netCDF4.Dataset-class.html#set_auto_scale" 
+  class="link">set_auto_scale</a> for all variables contained in this <a 
+  href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+  href="netCDF4.Group-class.html" class="link">Group</a>, as well as for 
+  all variables in all its subgroups.</p>
+  <p><b>Parameters</b>:</p>
+  <p><b><code>True_or_False</code></b> - Boolean determining if automatic 
+  variable scaling shall be applied for all variables.</p>
+  <p><b>Notes</b>:</p>
+  <p>Calling this function only affects existing variables. Variables 
+  created after calling this function will follow the default 
+  behaviour.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="set_fill_off"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_fill_off</span>(<span class="sig-arg">self</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Sets the fill mode for a <a href="netCDF4.Dataset-class.html" 
+  class="link">Dataset</a> open for writing to <code>off</code>.</p>
+  <p>This will prevent the data from being pre-filled with fill values, 
+  which may result in some performance improvements. However, you must then
+  make sure the data is actually written before being read.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="set_fill_on"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_fill_on</span>(<span class="sig-arg">self</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Sets the fill mode for a <a href="netCDF4.Dataset-class.html" 
+  class="link">Dataset</a> open for writing to <code>on</code>.</p>
+  <p>This causes data to be pre-filled with fill values. The fill values 
+  can be controlled by the variable's <code>_Fill_Value</code> attribute, 
+  but is usually sufficient to the use the netCDF default 
+  <code>_Fill_Value</code> (defined separately for each variable type). The
+  default behavior of the netCDF library correspongs to 
+  <code>set_fill_on</code>.  Data which are equal to the 
+  <code>_Fill_Value</code> indicate that the variable was created, but 
+  never written to.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="setncattr"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">setncattr</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">name</span>,
+        <span class="sig-arg">value</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>set a netCDF dataset or group attribute using name,value pair.  Only 
+  use if you need to set a netCDF attribute with the same name as one of 
+  the reserved python attributes.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="setncatts"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">setncatts</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">attdict</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>set a bunch of netCDF dataset or group attributes at once using a 
+  python dictionary. This may be faster when setting a lot of attributes 
+  for a NETCDF3 formatted file, since nc_redef/nc_enddef is not called in 
+  between setting each attribute</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== INSTANCE VARIABLE DETAILS ==================== -->
+<a name="section-InstanceVariableDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Variable Details</span></td>
+</tr>
+</table>
+<a name="disk_format"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <h3 class="epydoc">disk_format</h3>
+  The <code>disk_format</code> attribute describes the underlying file 
+  format, one of <code>NETCDF3</code>, <code>HDF5</code>, 
+  <code>HDF4</code>, <code>PNETCDF</code>, <code>DAP2</code>, 
+  <code>DAP4</code> or <code>UNDEFINED</code>. Only available if using 
+  netcdf C library version >= 4.3.1, otherwise will always return 
+  <code>UNDEFINED</code>.
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="parent"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <h3 class="epydoc">parent</h3>
+  The <code>parent</code> attribute is a reference to the parent <a 
+  href="netCDF4.Group-class.html" class="link">Group</a> instance. 
+  <code>None</code> for a the root group or <a 
+  href="netCDF4.Dataset-class.html" class="link">Dataset</a> instance
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="path"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <h3 class="epydoc">path</h3>
+  The <code>path</code> attribute shows the location of the <a 
+  href="netCDF4.Group-class.html" class="link">Group</a> in the <a 
+  href="netCDF4.Dataset-class.html" class="link">Dataset</a> in a unix 
+  directory format (the names of groups in the hierarchy separated by 
+  backslashes). A <a href="netCDF4.Dataset-class.html" 
+  class="link">Dataset</a> instance is the root group, so the path is 
+  simply <code>'/'</code>.
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Fri Dec  5 15:19:53 2014
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netCDF4.Dimension-class.html b/docs/netCDF4.Dimension-class.html
new file mode 100644
index 0000000..c8ab766
--- /dev/null
+++ b/docs/netCDF4.Dimension-class.html
@@ -0,0 +1,394 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netCDF4.Dimension</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        <a href="netCDF4-module.html">Module netCDF4</a> ::
+        Class Dimension
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== CLASS DESCRIPTION ==================== -->
+<h1 class="epydoc">Class Dimension</h1><p class="nomargin-top"></p>
+<pre class="base-tree">
+object --+
+         |
+        <strong class="uidshort">Dimension</strong>
+</pre>
+
+<hr />
+<p>Dimension(self, group, name, size=None)</p>
+  <p>A netCDF <a href="netCDF4.Dimension-class.html" 
+  class="link">Dimension</a> is used to describe the coordinates of a <a 
+  href="netCDF4.Variable-class.html" class="link">Variable</a>.</p>
+  <p><a href="netCDF4.Dimension-class.html" class="link">Dimension</a> 
+  instances should be created using the <a 
+  href="netCDF4.Dataset-class.html#createDimension" 
+  class="link">createDimension</a> method of a <a 
+  href="netCDF4.Group-class.html" class="link">Group</a> or <a 
+  href="netCDF4.Dataset-class.html" class="link">Dataset</a> instance, not 
+  using this class directly.</p>
+  <p><b>Parameters:</b></p>
+  <p><b><code>group</code></b> - <a href="netCDF4.Group-class.html" 
+  class="link">Group</a> instance to associate with dimension.</p>
+  <p><b><code>name</code></b>  - Name of the dimension.</p>
+  <p><b>Keywords:</b></p>
+  <p><b><code>size</code></b>  - Size of the dimension. <code>None</code> 
+  or 0 means unlimited. (Default <code>None</code>).</p>
+  <p><b>Returns:</b></p>
+  <p>a <a href="netCDF4.Dimension-class.html" class="link">Dimension</a> 
+  instance.  All further operations on the netCDF Dimension are accomplised
+  via <a href="netCDF4.Dimension-class.html" class="link">Dimension</a> 
+  instance methods.</p>
+  <p>The current maximum size of a <a href="netCDF4.Dimension-class.html" 
+  class="link">Dimension</a> instance can be obtained by calling the python
+  <code>len</code> function on the <a href="netCDF4.Dimension-class.html" 
+  class="link">Dimension</a> instance. The <code>isunlimited()</code> 
+  method of a <a href="netCDF4.Dimension-class.html" 
+  class="link">Dimension</a> instance can be used to determine if the 
+  dimension is unlimited</p>
+
+<!-- ==================== INSTANCE METHODS ==================== -->
+<a name="section-InstanceMethods"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Methods</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dimension-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">group</span>,
+        <span class="summary-sig-arg">name</span>,
+        <span class="summary-sig-arg">size</span>=<span class="summary-sig-default">None</span>)</span><br />
+      x.__init__(...) initializes x; see help(type(x)) for signature</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__len__"></a><span class="summary-sig-name">__len__</span>(<span class="summary-sig-arg">x</span>)</span><br />
+      len(x)</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type">a new object with type S, a subtype of T</span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dimension-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
+        <span class="summary-sig-arg">S</span>,
+        <span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Dimension-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">x</span>)</span><br />
+      repr(x)</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__unicode__"></a><span class="summary-sig-name">__unicode__</span>(<span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="group"></a><span class="summary-sig-name">group</span>(<span class="summary-sig-arg">self</span>)</span><br />
+      return the group that this <a href="netCDF4.Dimension-class.html" 
+      class="link">Dimension</a> is a member of.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="isunlimited"></a><span class="summary-sig-name">isunlimited</span>(<span class="summary-sig-arg">self</span>)</span><br />
+      returns <code>True</code> if the <a 
+      href="netCDF4.Dimension-class.html" class="link">Dimension</a> 
+      instance is unlimited, <code>False</code> otherwise.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__delattr__</code>,
+      <code>__format__</code>,
+      <code>__getattribute__</code>,
+      <code>__hash__</code>,
+      <code>__reduce__</code>,
+      <code>__reduce_ex__</code>,
+      <code>__setattr__</code>,
+      <code>__sizeof__</code>,
+      <code>__str__</code>,
+      <code>__subclasshook__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== PROPERTIES ==================== -->
+<a name="section-Properties"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Properties</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="name"></a><span class="summary-name">name</span><br />
+      string name of Dimension instance
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__class__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== METHOD DETAILS ==================== -->
+<a name="section-MethodDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Method Details</span></td>
+</tr>
+</table>
+<a name="__init__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">group</span>,
+        <span class="sig-arg">name</span>,
+        <span class="sig-arg">size</span>=<span class="sig-default">None</span>)</span>
+    <br /><em class="fname">(Constructor)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__init__(...) initializes x; see help(type(x)) for signature</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__init__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__new__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
+        <span class="sig-arg">S</span>,
+        <span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  
+  <dl class="fields">
+    <dt>Returns: a new object with type S, a subtype of T</dt>
+    <dt>Overrides:
+        object.__new__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__repr__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">x</span>)</span>
+    <br /><em class="fname">(Representation operator)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>repr(x)</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__repr__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Fri Dec  5 15:19:53 2014
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netCDF4.Group-class.html b/docs/netCDF4.Group-class.html
new file mode 100644
index 0000000..546bfed
--- /dev/null
+++ b/docs/netCDF4.Group-class.html
@@ -0,0 +1,386 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netCDF4.Group</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        <a href="netCDF4-module.html">Module netCDF4</a> ::
+        Class Group
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== CLASS DESCRIPTION ==================== -->
+<h1 class="epydoc">Class Group</h1><p class="nomargin-top"></p>
+<pre class="base-tree">
+object --+    
+         |    
+   <a href="netCDF4.Dataset-class.html">Dataset</a> --+
+             |
+            <strong class="uidshort">Group</strong>
+</pre>
+
+<hr />
+<p>Group(self, parent, name)</p>
+  <p>Groups define a hierarchical namespace within a netCDF file. They are 
+  analagous to directories in a unix filesystem. Each <a 
+  href="netCDF4.Group-class.html" class="link">Group</a> behaves like a <a 
+  href="netCDF4.Dataset-class.html" class="link">Dataset</a> within a 
+  Dataset, and can contain it's own variables, dimensions and attributes 
+  (and other Groups).</p>
+  <p><a href="netCDF4.Group-class.html" class="link">Group</a> instances 
+  should be created using the <a 
+  href="netCDF4.Dataset-class.html#createGroup" 
+  class="link">createGroup</a> method of a <a 
+  href="netCDF4.Dataset-class.html" class="link">Dataset</a> instance, or 
+  another <a href="netCDF4.Group-class.html" class="link">Group</a> 
+  instance, not using this class directly.</p>
+  <p><b>Parameters:</b></p>
+  <p><b><code>parent</code></b> - <a href="netCDF4.Group-class.html" 
+  class="link">Group</a> instance for the parent group.  If being created 
+  in the root group, use a <a href="netCDF4.Dataset-class.html" 
+  class="link">Dataset</a> instance.</p>
+  <p><b><code>name</code></b> - Name of the group.</p>
+  <p><b>Returns:</b></p>
+  <p>a <a href="netCDF4.Group-class.html" class="link">Group</a> instance.
+  All further operations on the netCDF Group are accomplished via <a 
+  href="netCDF4.Group-class.html" class="link">Group</a> instance 
+  methods.</p>
+  <p><a href="netCDF4.Group-class.html" class="link">Group</a> inherits 
+  from <a href="netCDF4.Dataset-class.html" class="link">Dataset</a>, so 
+  all the <a href="netCDF4.Dataset-class.html" class="link">Dataset</a> 
+  class methods and variables are available to a <a 
+  href="netCDF4.Group-class.html" class="link">Group</a> instance (except 
+  the <code>close</code> method).</p>
+
+<!-- ==================== INSTANCE METHODS ==================== -->
+<a name="section-InstanceMethods"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Methods</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Group-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">parent</span>,
+        <span class="summary-sig-arg">name</span>)</span><br />
+      x.__init__(...) initializes x; see help(type(x)) for signature</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type">a new object with type S, a subtype of T</span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Group-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
+        <span class="summary-sig-arg">S</span>,
+        <span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Group-class.html#close" class="summary-sig-name">close</a>(<span class="summary-sig-arg">self</span>)</span><br />
+      overrides <a href="netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> close method which does not apply to <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> instances, 
+      raises IOError.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="netCDF4.Dataset-class.html">Dataset</a></code></b>:
+      <code><a href="netCDF4.Dataset-class.html#__delattr__">__delattr__</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#__enter__">__enter__</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#__exit__">__exit__</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#__getattr__">__getattr__</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#__getattribute__">__getattribute__</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#__repr__">__repr__</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#__setattr__">__setattr__</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#__unicode__">__unicode__</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#createCompoundType">createCompoundType</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#createDimension">createDimension</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#createGroup">createGroup</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#createVLType">createVLType</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#createVariable">createVariable</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#delncattr">delncattr</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#filepath">filepath</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#getncattr">getncattr</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#ncattrs">ncattrs</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#renameAttribute">renameAttribute</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#renameDimension">renameDimension</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#renameGroup">renameGroup</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#renameVariable">renameVariable</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#set_auto_mask">set_auto_mask</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#set_auto_maskandscale">set_auto_maskandscale</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#set_auto_scale">set_auto_scale</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#set_fill_off">set_fill_off</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#set_fill_on">set_fill_on</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#setncattr">setncattr</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#setncatts">setncatts</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#sync">sync</a></code>
+      </p>
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__format__</code>,
+      <code>__hash__</code>,
+      <code>__reduce__</code>,
+      <code>__reduce_ex__</code>,
+      <code>__sizeof__</code>,
+      <code>__str__</code>,
+      <code>__subclasshook__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== INSTANCE VARIABLES ==================== -->
+<a name="section-InstanceVariables"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Variables</span></td>
+</tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="netCDF4.Dataset-class.html">Dataset</a></code></b>:
+      <code><a href="netCDF4.Dataset-class.html#cmptypes">cmptypes</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#data_model">data_model</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#dimensions">dimensions</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#disk_format">disk_format</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#file_format">file_format</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#groups">groups</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#parent">parent</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#path">path</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#variables">variables</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#vltypes">vltypes</a></code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== PROPERTIES ==================== -->
+<a name="section-Properties"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Properties</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="name"></a><span class="summary-name">name</span><br />
+      string name of Group instance
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="netCDF4.Dataset-class.html">Dataset</a></code></b>:
+      <code><a href="netCDF4.Dataset-class.html#keepweakref">keepweakref</a></code>
+      </p>
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__class__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== METHOD DETAILS ==================== -->
+<a name="section-MethodDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Method Details</span></td>
+</tr>
+</table>
+<a name="__init__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">parent</span>,
+        <span class="sig-arg">name</span>)</span>
+    <br /><em class="fname">(Constructor)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__init__(...) initializes x; see help(type(x)) for signature</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__init__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__new__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
+        <span class="sig-arg">S</span>,
+        <span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  
+  <dl class="fields">
+    <dt>Returns: a new object with type S, a subtype of T</dt>
+    <dt>Overrides:
+        object.__new__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="close"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">close</span>(<span class="sig-arg">self</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>overrides <a href="netCDF4.Dataset-class.html" 
+  class="link">Dataset</a> close method which does not apply to <a 
+  href="netCDF4.Group-class.html" class="link">Group</a> instances, raises 
+  IOError.</p>
+  <dl class="fields">
+    <dt>Overrides:
+        <a href="netCDF4.Dataset-class.html#close">Dataset.close</a>
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Fri Dec  5 15:19:53 2014
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netCDF4.MFDataset-class.html b/docs/netCDF4.MFDataset-class.html
new file mode 100644
index 0000000..4b5bba3
--- /dev/null
+++ b/docs/netCDF4.MFDataset-class.html
@@ -0,0 +1,527 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netCDF4.MFDataset</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        <a href="netCDF4-module.html">Module netCDF4</a> ::
+        Class MFDataset
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== CLASS DESCRIPTION ==================== -->
+<h1 class="epydoc">Class MFDataset</h1><p class="nomargin-top"></p>
+<pre class="base-tree">
+object --+    
+         |    
+   <a href="netCDF4.Dataset-class.html">Dataset</a> --+
+             |
+            <strong class="uidshort">MFDataset</strong>
+</pre>
+
+<hr />
+<p>MFDataset(self, files, check=False, aggdim=None, exclude=[])</p>
+  <p>Class for reading multi-file netCDF Datasets, making variables 
+  spanning multiple files appear as if they were in one file.</p>
+  <p>Datasets must be in <code>NETCDF4_CLASSIC, NETCDF3_CLASSIC or 
+  NETCDF3_64BIT</code> format (<code>NETCDF4</code> Datasets won't 
+  work).</p>
+  <p>Adapted from <a href="http://pysclint.sourceforge.net/pycdf" 
+  target="_top">pycdf</a> by Andre Gosselin.</p>
+  <p>Example usage:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">import</span> numpy
+<span class="py-prompt">>>> </span><span class="py-comment"># create a series of netCDF files with a variable sharing</span>
+<span class="py-prompt">>>> </span><span class="py-comment"># the same unlimited dimension.</span>
+<span class="py-prompt">>>> </span><span class="py-keyword">for</span> nfile <span class="py-keyword">in</span> range(10):
+<span class="py-prompt">>>> </span>    f = Dataset(<span class="py-string">'mftest'</span>+repr(nfile)+<span class="py-string">'.nc'</span>,<span class="py-string">'w'</span>)
+<span class="py-prompt">>>> </span>    f.createDimension(<span class="py-string">'x'</span>,None)
+<span class="py-prompt">>>> </span>    x = f.createVariable(<span class="py-string">'x'</span>,<span class="py-string">'i'</span>,(<span class="py-string">'x'</span>,))
+<span class="py-prompt">>>> </span>    x[0:10] = numpy.arange(nfile*10,10*(nfile+1))
+<span class="py-prompt">>>> </span>    f.close()
+<span class="py-prompt">>>> </span><span class="py-comment"># now read all those files in at once, in one Dataset.</span>
+<span class="py-prompt">>>> </span>f = MFDataset(<span class="py-string">'mftest*nc'</span>)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> f.variables[<span class="py-string">'x'</span>][:]
+<span class="py-output">[ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24</span>
+<span class="py-output"> 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49</span>
+<span class="py-output"> 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74</span>
+<span class="py-output"> 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99]</span></pre>
+
+<!-- ==================== INSTANCE METHODS ==================== -->
+<a name="section-InstanceMethods"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Methods</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.MFDataset-class.html#__getattribute__" class="summary-sig-name">__getattribute__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      x.__getattribute__('name') <==> x.name</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.MFDataset-class.html#__init__" class="summary-sig-name">__init__</a>()</span><br />
+      Open a Dataset spanning multiple files, making it look as if it was a
+      single file.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.MFDataset-class.html#__setattr__" class="summary-sig-name">__setattr__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      override base class attribute creation</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.MFDataset-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      str(x)</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.MFDataset-class.html#close" class="summary-sig-name">close</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      Close the Dataset.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.MFDataset-class.html#ncattrs" class="summary-sig-name">ncattrs</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      return netCDF global attribute names for this <a 
+      href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+      href="netCDF4.Group-class.html" class="link">Group</a> in a list.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="netCDF4.Dataset-class.html">Dataset</a></code></b>:
+      <code><a href="netCDF4.Dataset-class.html#__delattr__">__delattr__</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#__enter__">__enter__</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#__exit__">__exit__</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#__getattr__">__getattr__</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#__new__">__new__</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#__repr__">__repr__</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#__unicode__">__unicode__</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#createCompoundType">createCompoundType</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#createDimension">createDimension</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#createGroup">createGroup</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#createVLType">createVLType</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#createVariable">createVariable</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#delncattr">delncattr</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#filepath">filepath</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#getncattr">getncattr</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#renameAttribute">renameAttribute</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#renameDimension">renameDimension</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#renameGroup">renameGroup</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#renameVariable">renameVariable</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#set_auto_mask">set_auto_mask</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#set_auto_maskandscale">set_auto_maskandscale</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#set_auto_scale">set_auto_scale</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#set_fill_off">set_fill_off</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#set_fill_on">set_fill_on</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#setncattr">setncattr</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#setncatts">setncatts</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#sync">sync</a></code>
+      </p>
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__format__</code>,
+      <code>__hash__</code>,
+      <code>__reduce__</code>,
+      <code>__reduce_ex__</code>,
+      <code>__sizeof__</code>,
+      <code>__subclasshook__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== CLASS VARIABLES ==================== -->
+<a name="section-ClassVariables"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Class Variables</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="__qualname__"></a><span class="summary-name">__qualname__</span> = <code title="'MFDataset'"><code class="variable-quote">'</code><code class="variable-string">MFDataset</code><code class="variable-quote">'</code></code>
+    </td>
+  </tr>
+</table>
+<!-- ==================== INSTANCE VARIABLES ==================== -->
+<a name="section-InstanceVariables"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Variables</span></td>
+</tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="netCDF4.Dataset-class.html">Dataset</a></code></b>:
+      <code><a href="netCDF4.Dataset-class.html#cmptypes">cmptypes</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#data_model">data_model</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#dimensions">dimensions</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#disk_format">disk_format</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#file_format">file_format</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#groups">groups</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#parent">parent</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#path">path</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#variables">variables</a></code>,
+      <code><a href="netCDF4.Dataset-class.html#vltypes">vltypes</a></code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== PROPERTIES ==================== -->
+<a name="section-Properties"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Properties</span></td>
+</tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="netCDF4.Dataset-class.html">Dataset</a></code></b>:
+      <code><a href="netCDF4.Dataset-class.html#keepweakref">keepweakref</a></code>
+      </p>
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__class__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== METHOD DETAILS ==================== -->
+<a name="section-MethodDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Method Details</span></td>
+</tr>
+</table>
+<a name="__getattribute__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getattribute__</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__getattribute__('name') <==> x.name</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__getattribute__
+        <dd><em class="note">(inherited documentation)</em></dd>
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__init__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>()</span>
+    <br /><em class="fname">(Constructor)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Open a Dataset spanning multiple files, making it look as if it was a 
+  single file. Variables in the list of files that share the same dimension
+  (specified with the keyword <code>aggdim</code>) are aggregated. If 
+  <code>aggdim</code> is not specified, the unlimited is aggregated.  
+  Currently, <code>aggdim</code> must be the leftmost (slowest varying) 
+  dimension of each of the variables to be aggregated.</p>
+  <p>Adapted from <a href="http://pysclint.sourceforge.net/pycdf" 
+  target="_top">pycdf</a> by Andre Gosselin.</p>
+  <p>Usage:</p>
+  <p>nc = MFDataset(files, check=False, aggdim=None, exclude=[])</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>files</code></strong> - either a sequence of netCDF files or a string with a wildcard 
+          (converted to a sorted list of files using glob)  The first file 
+          in the list will become the "master" file, defining all
+          the variables with an aggregation dimension which may span 
+          subsequent files. Attribute access returns attributes only from 
+          "master" file. The files are always opened in read-only
+          mode.</li>
+        <li><strong class="pname"><code>check</code></strong> - True if you want to do consistency checking to ensure the correct
+          variables structure for all of the netcdf files.  Checking makes 
+          the initialization of the MFDataset instance much slower. Default
+          is False.</li>
+        <li><strong class="pname"><code>aggdim</code></strong> - The name of the dimension to aggregate over (must be the leftmost
+          dimension of each of the variables to be aggregated). If None 
+          (default), aggregate over the unlimited dimension.</li>
+        <li><strong class="pname"><code>exclude</code></strong> - A list of variable names to exclude from aggregation. Default is 
+          an empty list.</li>
+    </ul></dd>
+    <dt>Overrides:
+        object.__init__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__setattr__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>override base class attribute creation</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__setattr__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__str__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">...</span>)</span>
+    <br /><em class="fname">(Informal representation operator)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>str(x)</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__str__
+        <dd><em class="note">(inherited documentation)</em></dd>
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="close"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">close</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Close the Dataset.</p>
+  <dl class="fields">
+    <dt>Overrides:
+        <a href="netCDF4.Dataset-class.html#close">Dataset.close</a>
+        <dd><em class="note">(inherited documentation)</em></dd>
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="ncattrs"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">ncattrs</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>return netCDF global attribute names for this <a 
+  href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+  href="netCDF4.Group-class.html" class="link">Group</a> in a list.</p>
+  <dl class="fields">
+    <dt>Overrides:
+        <a href="netCDF4.Dataset-class.html#ncattrs">Dataset.ncattrs</a>
+        <dd><em class="note">(inherited documentation)</em></dd>
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Fri Dec  5 15:19:53 2014
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netCDF4.MFTime-class.html b/docs/netCDF4.MFTime-class.html
new file mode 100644
index 0000000..0499ea8
--- /dev/null
+++ b/docs/netCDF4.MFTime-class.html
@@ -0,0 +1,307 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netCDF4.MFTime</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        <a href="netCDF4-module.html">Module netCDF4</a> ::
+        Class MFTime
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== CLASS DESCRIPTION ==================== -->
+<h1 class="epydoc">Class MFTime</h1><p class="nomargin-top"></p>
+<pre class="base-tree">
+object --+    
+         |    
+ _Variable --+
+             |
+            <strong class="uidshort">MFTime</strong>
+</pre>
+
+<hr />
+<p>MFTime(self, time, units=None)</p>
+  <p>Class providing an interface to a MFDataset time Variable by imposing 
+  a unique common time unit to all files.</p>
+  <p>Example usage:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">import</span> numpy
+<span class="py-prompt">>>> </span>f1 = Dataset(<span class="py-string">'mftest_1.nc'</span>,<span class="py-string">'w'</span>, format=<span class="py-string">'NETCDF4_CLASSIC'</span>)
+<span class="py-prompt">>>> </span>f2 = Dataset(<span class="py-string">'mftest_2.nc'</span>,<span class="py-string">'w'</span>, format=<span class="py-string">'NETCDF4_CLASSIC'</span>)
+<span class="py-prompt">>>> </span>f1.createDimension(<span class="py-string">'time'</span>,None)
+<span class="py-prompt">>>> </span>f2.createDimension(<span class="py-string">'time'</span>,None)
+<span class="py-prompt">>>> </span>t1 = f1.createVariable(<span class="py-string">'time'</span>,<span class="py-string">'i'</span>,(<span class="py-string">'time'</span>,))
+<span class="py-prompt">>>> </span>t2 = f2.createVariable(<span class="py-string">'time'</span>,<span class="py-string">'i'</span>,(<span class="py-string">'time'</span>,))
+<span class="py-prompt">>>> </span>t1.units = <span class="py-string">'days since 2000-01-01'</span>
+<span class="py-prompt">>>> </span>t2.units = <span class="py-string">'days since 2000-02-01'</span>
+<span class="py-prompt">>>> </span>t1.calendar = <span class="py-string">'standard'</span>
+<span class="py-prompt">>>> </span>t2.calendar = <span class="py-string">'standard'</span>
+<span class="py-prompt">>>> </span>t1[:] = numpy.arange(31)
+<span class="py-prompt">>>> </span>t2[:] = numpy.arange(30)
+<span class="py-prompt">>>> </span>f1.close()
+<span class="py-prompt">>>> </span>f2.close()
+<span class="py-prompt">>>> </span><span class="py-comment"># Read the two files in at once, in one Dataset.</span>
+<span class="py-prompt">>>> </span>f = MFDataset(<span class="py-string">'mftest*nc'</span>)
+<span class="py-prompt">>>> </span>t = f.variables[<span class="py-string">'time'</span>]
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> t.units
+<span class="py-output">days since 2000-01-01</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> t[32] <span class="py-comment"># The value written in the file, inconsistent with the MF time units.</span>
+<span class="py-output">1</span>
+<span class="py-output"></span><span class="py-prompt">>>> </span>T = MFTime(t)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> T[32]                        
+<span class="py-output">32</span></pre>
+
+<!-- ==================== INSTANCE METHODS ==================== -->
+<a name="section-InstanceMethods"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Methods</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.MFTime-class.html#__getitem__" class="summary-sig-name">__getitem__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      Get records from a concatenated set of variables.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.MFTime-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">time</span>,
+        <span class="summary-sig-arg">units</span>=<span class="summary-sig-default">None</span>)</span><br />
+      Create a time Variable with units consistent across a multifile 
+      dataset.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>_Variable</code></b>:
+      <code>__getattr__</code>,
+      <code>__len__</code>,
+      <code>__str__</code>,
+      <code>ncattrs</code>,
+      <code>set_auto_maskandscale</code>,
+      <code>typecode</code>
+      </p>
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__delattr__</code>,
+      <code>__format__</code>,
+      <code>__getattribute__</code>,
+      <code>__hash__</code>,
+      <code>__new__</code>,
+      <code>__reduce__</code>,
+      <code>__reduce_ex__</code>,
+      <code>__repr__</code>,
+      <code>__setattr__</code>,
+      <code>__sizeof__</code>,
+      <code>__subclasshook__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== CLASS VARIABLES ==================== -->
+<a name="section-ClassVariables"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Class Variables</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="__qualname__"></a><span class="summary-name">__qualname__</span> = <code title="'MFTime'"><code class="variable-quote">'</code><code class="variable-string">MFTime</code><code class="variable-quote">'</code></code>
+    </td>
+  </tr>
+</table>
+<!-- ==================== PROPERTIES ==================== -->
+<a name="section-Properties"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Properties</span></td>
+</tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__class__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== METHOD DETAILS ==================== -->
+<a name="section-MethodDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Method Details</span></td>
+</tr>
+</table>
+<a name="__getitem__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getitem__</span>(<span class="sig-arg">...</span>)</span>
+    <br /><em class="fname">(Indexing operator)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Get records from a concatenated set of variables.</p>
+  <dl class="fields">
+    <dt>Overrides:
+        _Variable.__getitem__
+        <dd><em class="note">(inherited documentation)</em></dd>
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__init__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">time</span>,
+        <span class="sig-arg">units</span>=<span class="sig-default">None</span>)</span>
+    <br /><em class="fname">(Constructor)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>Create a time Variable with units consistent across a multifile 
+  dataset.</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>time</code></strong> - Time variable from a MFDataset.</li>
+        <li><strong class="pname"><code>units</code></strong> - Time units, for example, 'days since 1979-01-01'. If None, use 
+          the units from the master variable.</li>
+    </ul></dd>
+    <dt>Overrides:
+        object.__init__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Fri Dec  5 15:19:53 2014
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netCDF4.VLType-class.html b/docs/netCDF4.VLType-class.html
new file mode 100644
index 0000000..c16c116
--- /dev/null
+++ b/docs/netCDF4.VLType-class.html
@@ -0,0 +1,344 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netCDF4.VLType</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        <a href="netCDF4-module.html">Module netCDF4</a> ::
+        Class VLType
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== CLASS DESCRIPTION ==================== -->
+<h1 class="epydoc">Class VLType</h1><p class="nomargin-top"></p>
+<pre class="base-tree">
+object --+
+         |
+        <strong class="uidshort">VLType</strong>
+</pre>
+
+<hr />
+<p>A <a href="netCDF4.VLType-class.html" class="link">VLType</a> instance
+  is used to describe a variable length (VLEN) data type.</p>
+  <p>Constructor: <code>VLType(group, datatype, datatype_name)</code></p>
+  <p><a href="netCDF4.VLType-class.html" class="link">VLType</a> instances 
+  should be created using the <a 
+  href="netCDF4.Dataset-class.html#createVLType" 
+  class="link">createVLType</a> method of a Dataset or <a 
+  href="netCDF4.Group-class.html" class="link">Group</a> instance, not 
+  using this class directly.</p>
+  <p><b>Parameters:</b></p>
+  <p><b><code>group</code></b> - <a href="netCDF4.Group-class.html" 
+  class="link">Group</a> instance to associate with the VLEN datatype.</p>
+  <p><b><code>datatype</code></b> - An numpy dtype object describing a the 
+  component type for the variable length array.</p>
+  <p><b><code>datatype_name</code></b> - a Python string containing a 
+  description of the VLEN data type.</p>
+  <p><b>Returns:</b></p>
+  <p>a <a href="netCDF4.VLType-class.html" class="link">VLType</a> 
+  instance, which can be passed to the <code>createVariable</code> method 
+  of a <a href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+  href="netCDF4.Group-class.html" class="link">Group</a> instance.</p>
+  <p>The instance variables <code>dtype</code> and <code>name</code> should
+  not be modified by the user.</p>
+
+<!-- ==================== INSTANCE METHODS ==================== -->
+<a name="section-InstanceMethods"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Methods</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.VLType-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      x.__init__(...) initializes x; see help(type(x)) for signature</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type">a new object with type S, a subtype of T</span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.VLType-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
+        <span class="summary-sig-arg">S</span>,
+        <span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.VLType-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">x</span>)</span><br />
+      repr(x)</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__unicode__"></a><span class="summary-sig-name">__unicode__</span>(<span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__delattr__</code>,
+      <code>__format__</code>,
+      <code>__getattribute__</code>,
+      <code>__hash__</code>,
+      <code>__reduce__</code>,
+      <code>__reduce_ex__</code>,
+      <code>__setattr__</code>,
+      <code>__sizeof__</code>,
+      <code>__str__</code>,
+      <code>__subclasshook__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== INSTANCE VARIABLES ==================== -->
+<a name="section-InstanceVariables"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Variables</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="dtype"></a><span class="summary-name">dtype</span><br />
+      An object describing the VLEN type.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="name"></a><span class="summary-name">name</span><br />
+      A python string describing the VLEN type.
+    </td>
+  </tr>
+</table>
+<!-- ==================== PROPERTIES ==================== -->
+<a name="section-Properties"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Properties</span></td>
+</tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__class__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== METHOD DETAILS ==================== -->
+<a name="section-MethodDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Method Details</span></td>
+</tr>
+</table>
+<a name="__init__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">...</span>)</span>
+    <br /><em class="fname">(Constructor)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__init__(...) initializes x; see help(type(x)) for signature</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__init__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__new__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
+        <span class="sig-arg">S</span>,
+        <span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  
+  <dl class="fields">
+    <dt>Returns: a new object with type S, a subtype of T</dt>
+    <dt>Overrides:
+        object.__new__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__repr__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">x</span>)</span>
+    <br /><em class="fname">(Representation operator)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>repr(x)</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__repr__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Fri Dec  5 15:19:53 2014
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netCDF4.Variable-class.html b/docs/netCDF4.Variable-class.html
new file mode 100644
index 0000000..ae3123e
--- /dev/null
+++ b/docs/netCDF4.Variable-class.html
@@ -0,0 +1,1442 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netCDF4.Variable</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        <a href="netCDF4-module.html">Module netCDF4</a> ::
+        Class Variable
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== CLASS DESCRIPTION ==================== -->
+<h1 class="epydoc">Class Variable</h1><p class="nomargin-top"></p>
+<pre class="base-tree">
+object --+
+         |
+        <strong class="uidshort">Variable</strong>
+</pre>
+
+<hr />
+<p>Variable(self, group, name, datatype, dimensions=(), zlib=False, 
+  complevel=4, shuffle=True, fletcher32=False, contiguous=False, 
+  chunksizes=None, endian='native', 
+  least_significant_digit=None,fill_value=None)</p>
+  <p>A netCDF <a href="netCDF4.Variable-class.html" 
+  class="link">Variable</a> is used to read and write netCDF data.  They 
+  are analagous to numpy array objects.</p>
+  <p><a href="netCDF4.Variable-class.html" class="link">Variable</a> 
+  instances should be created using the <a 
+  href="netCDF4.Dataset-class.html#createVariable" 
+  class="link">createVariable</a> method of a <a 
+  href="netCDF4.Dataset-class.html" class="link">Dataset</a> or <a 
+  href="netCDF4.Group-class.html" class="link">Group</a> instance, not 
+  using this class directly.</p>
+  <p><b>Parameters:</b></p>
+  <p><b><code>group</code></b> - <a href="netCDF4.Group-class.html" 
+  class="link">Group</a> or <a href="netCDF4.Dataset-class.html" 
+  class="link">Dataset</a> instance to associate with variable.</p>
+  <p><b><code>name</code></b>  - Name of the variable.</p>
+  <p><b><code>datatype</code></b> - <a href="netCDF4.Variable-class.html" 
+  class="link">Variable</a> data type. Can be specified by providing a 
+  numpy dtype object, or a string that describes a numpy dtype object. 
+  Supported values, corresponding to <code>str</code> attribute of numpy 
+  dtype objects, include <code>'f4'</code> (32-bit floating point), 
+  <code>'f8'</code> (64-bit floating point), <code>'i4'</code> (32-bit 
+  signed integer), <code>'i2'</code> (16-bit signed integer), 
+  <code>'i8'</code> (64-bit singed integer), <code>'i4'</code> (8-bit 
+  singed integer), <code>'i1'</code> (8-bit signed integer), 
+  <code>'u1'</code> (8-bit unsigned integer), <code>'u2'</code> (16-bit 
+  unsigned integer), <code>'u4'</code> (32-bit unsigned integer), 
+  <code>'u8'</code> (64-bit unsigned integer), or <code>'S1'</code> 
+  (single-character string).  From compatibility with Scientific.IO.NetCDF,
+  the old Numeric single character typecodes can also be used 
+  (<code>'f'</code> instead of <code>'f4'</code>, <code>'d'</code> instead 
+  of <code>'f8'</code>, <code>'h'</code> or <code>'s'</code> instead of 
+  <code>'i2'</code>, <code>'b'</code> or <code>'B'</code> instead of 
+  <code>'i1'</code>, <code>'c'</code> instead of <code>'S1'</code>, and 
+  <code>'i'</code> or <code>'l'</code> instead of <code>'i4'</code>). 
+  <code>datatype</code> can also be a <a 
+  href="netCDF4.CompoundType-class.html" class="link">CompoundType</a> 
+  instance (for a structured, or compound array), a <a 
+  href="netCDF4.VLType-class.html" class="link">VLType</a> instance (for a 
+  variable-length array), or the python <code>str</code> builtin (for a 
+  variable-length string array). Numpy string and unicode datatypes with 
+  length greater than one are aliases for <code>str</code>.</p>
+  <p><b>Keywords:</b></p>
+  <p><b><code>dimensions</code></b> - a tuple containing the variable's 
+  dimension names (defined previously with <code>createDimension</code>). 
+  Default is an empty tuple which means the variable is a scalar (and 
+  therefore has no dimensions).</p>
+  <p><b><code>zlib</code></b> - if <code>True</code>, data assigned to the 
+  <a href="netCDF4.Variable-class.html" class="link">Variable</a> instance 
+  is compressed on disk. Default <code>False</code>.</p>
+  <p><b><code>complevel</code></b> - the level of zlib compression to use 
+  (1 is the fastest, but poorest compression, 9 is the slowest but best 
+  compression). Default 4. Ignored if <code>zlib=False</code>.</p>
+  <p><b><code>shuffle</code></b> - if <code>True</code>, the HDF5 shuffle 
+  filter is applied to improve compression. Default <code>True</code>. 
+  Ignored if <code>zlib=False</code>.</p>
+  <p><b><code>fletcher32</code></b> - if <code>True</code> (default 
+  <code>False</code>), the Fletcher32 checksum algorithm is used for error 
+  detection.</p>
+  <p><b><code>contiguous</code></b> - if <code>True</code> (default 
+  <code>False</code>), the variable data is stored contiguously on disk.  
+  Default <code>False</code>. Setting to <code>True</code> for a variable 
+  with an unlimited dimension will trigger an error.</p>
+  <p><b><code>chunksizes</code></b> - Can be used to specify the HDF5 
+  chunksizes for each dimension of the variable. A detailed discussion of 
+  HDF chunking and I/O performance is available <a 
+  href="http://www.hdfgroup.org/HDF5/doc/H5.user/Chunking.html" 
+  target="_top">here</a>. Basically, you want the chunk size for each 
+  dimension to match as closely as possible the size of the data block that
+  users will read from the file. <code>chunksizes</code> cannot be set if 
+  <code>contiguous=True</code>.</p>
+  <p><b><code>endian</code></b> - Can be used to control whether the data 
+  is stored in little or big endian format on disk. Possible values are 
+  <code>little, big</code> or <code>native</code> (default). The library 
+  will automatically handle endian conversions when the data is read, but 
+  if the data is always going to be read on a computer with the opposite 
+  format as the one used to create the file, there may be some performance 
+  advantage to be gained by setting the endian-ness. For netCDF 3 files 
+  (that don't use HDF5), only <code>endian='native'</code> is allowed.</p>
+  <p>The <code>zlib, complevel, shuffle, fletcher32, contiguous</code> and 
+  {chunksizes} keywords are silently ignored for netCDF 3 files that do not
+  use HDF5.</p>
+  <p><b><code>least_significant_digit</code></b> - If specified, variable 
+  data will be truncated (quantized). In conjunction with 
+  <code>zlib=True</code> this produces 'lossy', but significantly more 
+  efficient compression. For example, if 
+  <code>least_significant_digit=1</code>, data will be quantized using 
+  around(scale*data)/scale, where scale = 2**bits, and bits is determined 
+  so that a precision of 0.1 is retained (in this case bits=4). Default is 
+  <code>None</code>, or no quantization.</p>
+  <p><b><code>fill_value</code></b> - If specified, the default netCDF 
+  <code>_FillValue</code> (the value that the variable gets filled with 
+  before any data is written to it) is replaced with this value.  If 
+  fill_value is set to <code>False</code>, then the variable is not 
+  pre-filled. The default netCDF fill values can be found in 
+  netCDF4.default_fillvals.</p>
+  <p><b>Returns:</b></p>
+  <p>a <a href="netCDF4.Variable-class.html" class="link">Variable</a> 
+  instance.  All further operations on the netCDF Variable are accomplised 
+  via <a href="netCDF4.Variable-class.html" class="link">Variable</a> 
+  instance methods.</p>
+  <p>A list of attribute names corresponding to netCDF attributes defined 
+  for the variable can be obtained with the <code>ncattrs()</code> method. 
+  These attributes can be created by assigning to an attribute of the <a 
+  href="netCDF4.Variable-class.html" class="link">Variable</a> instance. A 
+  dictionary containing all the netCDF attribute name/value pairs is 
+  provided by the <code>__dict__</code> attribute of a <a 
+  href="netCDF4.Variable-class.html" class="link">Variable</a> 
+  instance.</p>
+  <p>The instance variables <code>dimensions, dtype, ndim, shape</code> and
+  <code>least_significant_digit</code> are read-only (and should not be 
+  modified by the user).</p>
+
+<!-- ==================== INSTANCE METHODS ==================== -->
+<a name="section-InstanceMethods"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Methods</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__array__"></a><span class="summary-sig-name">__array__</span>(<span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#__delattr__" class="summary-sig-name">__delattr__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      x.__delattr__('name') <==> del x.name</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__delitem__"></a><span class="summary-sig-name">__delitem__</span>(<span class="summary-sig-arg">x</span>,
+        <span class="summary-sig-arg">y</span>)</span><br />
+      del x[y]</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__getattr__"></a><span class="summary-sig-name">__getattr__</span>(<span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#__getattribute__" class="summary-sig-name">__getattribute__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      x.__getattribute__('name') <==> x.name</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">x</span>,
+        <span class="summary-sig-arg">y</span>)</span><br />
+      x[y]</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">group</span>,
+        <span class="summary-sig-arg">name</span>,
+        <span class="summary-sig-arg">datatype</span>,
+        <span class="summary-sig-arg">dimensions</span>=<span class="summary-sig-default">()</span>,
+        <span class="summary-sig-arg">zlib</span>=<span class="summary-sig-default">False</span>,
+        <span class="summary-sig-arg">complevel</span>=<span class="summary-sig-default">4</span>,
+        <span class="summary-sig-arg">shuffle</span>=<span class="summary-sig-default">True</span>,
+        <span class="summary-sig-arg">fletcher32</span>=<span class="summary-sig-default">False</span>,
+        <span class="summary-sig-arg">contiguous</span>=<span class="summary-sig-default">False</span>,
+        <span class="summary-sig-arg">chunksizes</span>=<span class="summary-sig-default">None</span>,
+        <span class="summary-sig-arg">endian</span>=<span class="summary-sig-default">'native'</span>,
+        <span class="summary-sig-arg">least_significant_digit</span>=<span class="summary-sig-default">None</span>,
+        <span class="summary-sig-arg">fill_value</span>=<span class="summary-sig-default">None</span>)</span><br />
+      x.__init__(...) initializes x; see help(type(x)) for signature</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__len__"></a><span class="summary-sig-name">__len__</span>(<span class="summary-sig-arg">x</span>)</span><br />
+      len(x)</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type">a new object with type S, a subtype of T</span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
+        <span class="summary-sig-arg">S</span>,
+        <span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">x</span>)</span><br />
+      repr(x)</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#__setattr__" class="summary-sig-name">__setattr__</a>(<span class="summary-sig-arg">...</span>)</span><br />
+      x.__setattr__('name', value) <==> x.name = value</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__setitem__"></a><span class="summary-sig-name">__setitem__</span>(<span class="summary-sig-arg">x</span>,
+        <span class="summary-sig-arg">i</span>,
+        <span class="summary-sig-arg">y</span>)</span><br />
+      x[i]=y</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__unicode__"></a><span class="summary-sig-name">__unicode__</span>(<span class="summary-sig-arg">...</span>)</span></td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#assignValue" class="summary-sig-name">assignValue</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">val</span>)</span><br />
+      assign a value to a scalar variable.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#chunking" class="summary-sig-name">chunking</a>(<span class="summary-sig-arg">self</span>)</span><br />
+      return variable chunking information.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#delncattr" class="summary-sig-name">delncattr</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">name</span>,
+        <span class="summary-sig-arg">value</span>)</span><br />
+      delete a netCDF variable attribute.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="endian"></a><span class="summary-sig-name">endian</span>(<span class="summary-sig-arg">self</span>)</span><br />
+      return endian-ness (little,big,native) of variable (as stored in HDF5
+      file).</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="filters"></a><span class="summary-sig-name">filters</span>(<span class="summary-sig-arg">self</span>)</span><br />
+      return dictionary containing HDF5 filter parameters.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#getValue" class="summary-sig-name">getValue</a>(<span class="summary-sig-arg">self</span>)</span><br />
+      get the value of a scalar variable.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#get_var_chunk_cache" class="summary-sig-name">get_var_chunk_cache</a>(<span class="summary-sig-arg">self</span>)</span><br />
+      return variable chunk cache information in a tuple 
+      (size,nelems,preemption).</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#getncattr" class="summary-sig-name">getncattr</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">name</span>)</span><br />
+      retrievel a netCDF variable attribute.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="group"></a><span class="summary-sig-name">group</span>(<span class="summary-sig-arg">self</span>)</span><br />
+      return the group that this <a href="netCDF4.Variable-class.html" 
+      class="link">Variable</a> is a member of.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="ncattrs"></a><span class="summary-sig-name">ncattrs</span>(<span class="summary-sig-arg">self</span>)</span><br />
+      return netCDF attribute names for this <a 
+      href="netCDF4.Variable-class.html" class="link">Variable</a> in a 
+      list.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="renameAttribute"></a><span class="summary-sig-name">renameAttribute</span>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">oldname</span>,
+        <span class="summary-sig-arg">newname</span>)</span><br />
+      rename a <a href="netCDF4.Variable-class.html" 
+      class="link">Variable</a> attribute named <code>oldname</code> to 
+      <code>newname</code>.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#set_auto_mask" class="summary-sig-name">set_auto_mask</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">mask</span>)</span><br />
+      turn on or off automatic conversion of variable data to and from 
+      masked arrays .</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#set_auto_maskandscale" class="summary-sig-name">set_auto_maskandscale</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">maskandscale</span>)</span><br />
+      turn on or off automatic conversion of variable data to and from 
+      masked arrays and automatic packing/unpacking of variable data using 
+      <code>scale_factor</code> and <code>add_offset</code> attributes.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#set_auto_scale" class="summary-sig-name">set_auto_scale</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">scale</span>)</span><br />
+      turn on or off automatic packing/unpacking of variable data using 
+      <code>scale_factor</code> and <code>add_offset</code> attributes.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#set_var_chunk_cache" class="summary-sig-name">set_var_chunk_cache</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">size</span>=<span class="summary-sig-default">None</span>,
+        <span class="summary-sig-arg">nelems</span>=<span class="summary-sig-default">None</span>,
+        <span class="summary-sig-arg">preemption</span>=<span class="summary-sig-default">None</span>)</span><br />
+      change variable chunk cache settings.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#setncattr" class="summary-sig-name">setncattr</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">name</span>,
+        <span class="summary-sig-arg">value</span>)</span><br />
+      set a netCDF variable attribute using name,value pair.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netCDF4.Variable-class.html#setncatts" class="summary-sig-name">setncatts</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">attdict</span>)</span><br />
+      set a bunch of netCDF variable attributes at once using a python 
+      dictionary.</td>
+          <td align="right" valign="top">
+            
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__format__</code>,
+      <code>__hash__</code>,
+      <code>__reduce__</code>,
+      <code>__reduce_ex__</code>,
+      <code>__sizeof__</code>,
+      <code>__str__</code>,
+      <code>__subclasshook__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== INSTANCE VARIABLES ==================== -->
+<a name="section-InstanceVariables"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Variables</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="dimensions"></a><span class="summary-name">dimensions</span><br />
+      A tuple containing the names of the dimensions associated with this 
+      variable.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="dtype"></a><span class="summary-name">dtype</span><br />
+      A numpy dtype object describing the variable's data type.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.Variable-class.html#least_significant_digit" class="summary-name">least_significant_digit</a><br />
+      Describes the power of ten of the smallest decimal place in the data 
+      the contains a reliable value.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.Variable-class.html#mask" class="summary-name">mask</a><br />
+      if True, data is automatically converted to/from masked arrays when 
+      missing values or fill values are present.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="ndim"></a><span class="summary-name">ndim</span><br />
+      The number of variable dimensions.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netCDF4.Variable-class.html#scale" class="summary-name">scale</a><br />
+      if True, <code>scale_factor</code> and <code>add_offset</code> are 
+      automatically applied.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="shape"></a><span class="summary-name">shape</span><br />
+      a tuple describing the current size of all the variable's dimensions.
+    </td>
+  </tr>
+</table>
+<!-- ==================== PROPERTIES ==================== -->
+<a name="section-Properties"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Properties</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="datatype"></a><span class="summary-name">datatype</span><br />
+      numpy data type (for primitive data types) or VLType/CompoundType 
+      instance (for compound or vlen data types)
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="name"></a><span class="summary-name">name</span><br />
+      string name of Variable instance
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="size"></a><span class="summary-name">size</span><br />
+      Return the number of stored elements.
+    </td>
+  </tr>
+  <tr>
+    <td colspan="2" class="summary">
+    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
+      <code>__class__</code>
+      </p>
+    </td>
+  </tr>
+</table>
+<!-- ==================== METHOD DETAILS ==================== -->
+<a name="section-MethodDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Method Details</span></td>
+</tr>
+</table>
+<a name="__delattr__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__delattr__</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__delattr__('name') <==> del x.name</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__delattr__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__getattribute__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getattribute__</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__getattribute__('name') <==> x.name</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__getattribute__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__init__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">group</span>,
+        <span class="sig-arg">name</span>,
+        <span class="sig-arg">datatype</span>,
+        <span class="sig-arg">dimensions</span>=<span class="sig-default">()</span>,
+        <span class="sig-arg">zlib</span>=<span class="sig-default">False</span>,
+        <span class="sig-arg">complevel</span>=<span class="sig-default">4</span>,
+        <span class="sig-arg">shuffle</span>=<span class="sig-default">True</span>,
+        <span class="sig-arg">fletcher32</span>=<span class="sig-default">False</span>,
+        <span class="sig-arg">contiguous</span>=<span class="sig-default">False</span>,
+        <span class="sig-arg">chunksizes</span>=<span class="sig-default">None</span>,
+        <span class="sig-arg">endian</span>=<span class="sig-default">'native'</span>,
+        <span class="sig-arg">least_significant_digit</span>=<span class="sig-default">None</span>,
+        <span class="sig-arg">fill_value</span>=<span class="sig-default">None</span>)</span>
+    <br /><em class="fname">(Constructor)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__init__(...) initializes x; see help(type(x)) for signature</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__init__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__new__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
+        <span class="sig-arg">S</span>,
+        <span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  
+  <dl class="fields">
+    <dt>Returns: a new object with type S, a subtype of T</dt>
+    <dt>Overrides:
+        object.__new__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__repr__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">x</span>)</span>
+    <br /><em class="fname">(Representation operator)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>repr(x)</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__repr__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="__setattr__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-arg">...</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>x.__setattr__('name', value) <==> x.name = value</p>
+  <dl class="fields">
+    <dt>Overrides:
+        object.__setattr__
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
+<a name="assignValue"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">assignValue</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">val</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>assign a value to a scalar variable.  Provided for compatibility with 
+  Scientific.IO.NetCDF, can also be done by assigning to a slice ([:]).</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="chunking"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">chunking</span>(<span class="sig-arg">self</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>return variable chunking information.  If the dataset is defined to be
+  contiguous (and hence there is no chunking) the word 'contiguous' is 
+  returned.  Otherwise, a sequence with the chunksize for each dimension is
+  returned.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="delncattr"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">delncattr</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">name</span>,
+        <span class="sig-arg">value</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>delete a netCDF variable attribute.  Only use if you need to delete a 
+  netCDF attribute with the same name as one of the reserved python 
+  attributes.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="getValue"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">getValue</span>(<span class="sig-arg">self</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>get the value of a scalar variable.  Provided for compatibility with 
+  Scientific.IO.NetCDF, can also be done by slicing ([:]).</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="get_var_chunk_cache"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_var_chunk_cache</span>(<span class="sig-arg">self</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>return variable chunk cache information in a tuple 
+  (size,nelems,preemption). See netcdf C library documentation for 
+  <code>nc_get_var_chunk_cache</code> for details.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="getncattr"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">getncattr</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">name</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>retrievel a netCDF variable attribute.  Only use if you need to set a 
+  netCDF attribute with the same name as one of the reserved python 
+  attributes.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="set_auto_mask"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_auto_mask</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">mask</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>turn on or off automatic conversion of variable data to and from 
+  masked arrays .</p>
+  <p>If <code>mask</code> is set to <code>True</code>, when data is read 
+  from a variable it is converted to a masked array if any of the values 
+  are exactly equal to the either the netCDF _FillValue or the value 
+  specified by the missing_value variable attribute. The fill_value of the 
+  masked array is set to the missing_value attribute (if it exists), 
+  otherwise the netCDF _FillValue attribute (which has a default value for 
+  each data type).  When data is written to a variable, the masked array is
+  converted back to a regular numpy array by replacing all the masked 
+  values by the fill_value of the masked array.</p>
+  <p>The default value of <code>mask</code> is <code>True</code> (automatic
+  conversions are performed).</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="set_auto_maskandscale"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_auto_maskandscale</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">maskandscale</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>turn on or off automatic conversion of variable data to and from 
+  masked arrays and automatic packing/unpacking of variable data using 
+  <code>scale_factor</code> and <code>add_offset</code> attributes.</p>
+  <p>If <code>maskandscale</code> is set to <code>True</code>, when data is
+  read from a variable it is converted to a masked array if any of the 
+  values are exactly equal to the either the netCDF _FillValue or the value
+  specified by the missing_value variable attribute. The fill_value of the 
+  masked array is set to the missing_value attribute (if it exists), 
+  otherwise the netCDF _FillValue attribute (which has a default value for 
+  each data type).  When data is written to a variable, the masked array is
+  converted back to a regular numpy array by replacing all the masked 
+  values by the fill_value of the masked array.</p>
+  <p>If <code>maskandscale</code> is set to <code>True</code>, and the 
+  variable has a <code>scale_factor</code> or an <code>add_offset</code> 
+  attribute, then data read from that variable is unpacked using:</p>
+<pre class="literalblock">
+   data = self.scale_factor*data + self.add_offset
+</pre>
+  <p>When data is written to a variable it is packed using:</p>
+<pre class="literalblock">
+   data = (data - self.add_offset)/self.scale_factor
+</pre>
+  <p>If either scale_factor is present, but add_offset is missing, 
+  add_offset is assumed zero.  If add_offset is present, but scale_factor 
+  is missing, scale_factor is assumed to be one. For more information on 
+  how <code>scale_factor</code> and <code>add_offset</code> can be used to 
+  provide simple compression, see <a 
+  href="http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml" 
+  target="_top">http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml</a>.</p>
+  <p>The default value of <code>maskandscale</code> is <code>True</code> 
+  (automatic conversions are performed).</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="set_auto_scale"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_auto_scale</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">scale</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>turn on or off automatic packing/unpacking of variable data using 
+  <code>scale_factor</code> and <code>add_offset</code> attributes.</p>
+  <p>If <code>scale</code> is set to <code>True</code>, and the variable 
+  has a <code>scale_factor</code> or an <code>add_offset</code> attribute, 
+  then data read from that variable is unpacked using:</p>
+<pre class="literalblock">
+   data = self.scale_factor*data + self.add_offset
+</pre>
+  <p>When data is written to a variable it is packed using:</p>
+<pre class="literalblock">
+   data = (data - self.add_offset)/self.scale_factor
+</pre>
+  <p>If either scale_factor is present, but add_offset is missing, 
+  add_offset is assumed zero.  If add_offset is present, but scale_factor 
+  is missing, scale_factor is assumed to be one. For more information on 
+  how <code>scale_factor</code> and <code>add_offset</code> can be used to 
+  provide simple compression, see <a 
+  href="http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml" 
+  target="_top">http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml</a>.</p>
+  <p>The default value of <code>scale</code> is <code>True</code> 
+  (automatic conversions are performed).</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="set_var_chunk_cache"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_var_chunk_cache</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">size</span>=<span class="sig-default">None</span>,
+        <span class="sig-arg">nelems</span>=<span class="sig-default">None</span>,
+        <span class="sig-arg">preemption</span>=<span class="sig-default">None</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>change variable chunk cache settings. See netcdf C library 
+  documentation for <code>nc_set_var_chunk_cache</code> for details.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="setncattr"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">setncattr</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">name</span>,
+        <span class="sig-arg">value</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>set a netCDF variable attribute using name,value pair.  Only use if 
+  you need to set a netCDF attribute with the same name as one of the 
+  reserved python attributes.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="setncatts"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">setncatts</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">attdict</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    > 
+    </td>
+  </tr></table>
+  
+  <p>set a bunch of netCDF variable attributes at once using a python 
+  dictionary. This may be faster when setting a lot of attributes for a 
+  NETCDF3 formatted file, since nc_redef/nc_enddef is not called in between
+  setting each attribute</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== INSTANCE VARIABLE DETAILS ==================== -->
+<a name="section-InstanceVariableDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Variable Details</span></td>
+</tr>
+</table>
+<a name="least_significant_digit"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <h3 class="epydoc">least_significant_digit</h3>
+  Describes the power of ten of the smallest decimal place in the data the 
+  contains a reliable value.  Data is truncated to this decimal place when 
+  it is assigned to the <a href="netCDF4.Variable-class.html" 
+  class="link">Variable</a> instance. If <code>None</code>, the data is not
+  truncated.
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="mask"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <h3 class="epydoc">mask</h3>
+  if True, data is automatically converted to/from masked arrays when 
+  missing values or fill values are present. Default is <code>True</code>, 
+  can be reset using <a href="netCDF4.Variable-class.html#set_auto_mask" 
+  class="link">set_auto_mask</a> and <a 
+  href="netCDF4.Variable-class.html#set_auto_maskandscale" 
+  class="link">set_auto_maskandscale</a> methods.
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="scale"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <h3 class="epydoc">scale</h3>
+  if True, <code>scale_factor</code> and <code>add_offset</code> are 
+  automatically applied. Default is <code>True</code>, can be reset using 
+  <a href="netCDF4.Variable-class.html#set_auto_scale" 
+  class="link">set_auto_scale</a> and <a 
+  href="netCDF4.Variable-class.html#set_auto_maskandscale" 
+  class="link">set_auto_maskandscale</a> methods.
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+  <!-- Home link -->
+      <th>   <a
+        href="netCDF4-module.html">Home</a>   </th>
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Fri Dec  5 15:19:53 2014
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netcdftime.netcdftime-module.html b/docs/netcdftime.netcdftime-module.html
new file mode 100644
index 0000000..05d8d18
--- /dev/null
+++ b/docs/netcdftime.netcdftime-module.html
@@ -0,0 +1,548 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netcdftime.netcdftime</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        Package netcdftime ::
+        Module netcdftime
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== MODULE DESCRIPTION ==================== -->
+<h1 class="epydoc">Module netcdftime</h1><p class="nomargin-top"><span class="codelink"><a href="netcdftime.netcdftime-pysrc.html">source code</a></span></p>
+<p>Performs conversions of netCDF time coordinate data to/from datetime 
+  objects.</p>
+
+<hr />
+<div class="fields">      <p><strong>Version:</strong>
+        0.9.2
+      </p>
+</div><!-- ==================== CLASSES ==================== -->
+<a name="section-Classes"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Classes</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netcdftime.netcdftime.datetime-class.html" class="summary-name">datetime</a><br />
+      Phony datetime object which mimics the python datetime object, but 
+        allows for dates that don't exist in the proleptic gregorian 
+        calendar.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netcdftime.netcdftime.utime-class.html" class="summary-name">utime</a><br />
+      Performs conversions of netCDF time coordinate data to/from 
+        datetime objects.
+    </td>
+  </tr>
+</table>
+<!-- ==================== FUNCTIONS ==================== -->
+<a name="section-Functions"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Functions</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netcdftime.netcdftime-module.html#DateFromJulianDay" class="summary-sig-name">DateFromJulianDay</a>(<span class="summary-sig-arg">JD</span>,
+        <span class="summary-sig-arg">calendar</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">standard</code><code class="variable-quote">'</code></span>)</span><br />
+      returns a 'datetime-like' object given Julian Day.</td>
+          <td align="right" valign="top">
+            <span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#DateFromJulianDay">source code</a></span>
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netcdftime.netcdftime-module.html#JulianDayFromDate" class="summary-sig-name">JulianDayFromDate</a>(<span class="summary-sig-arg">date</span>,
+        <span class="summary-sig-arg">calendar</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">standard</code><code class="variable-quote">'</code></span>)</span><br />
+      creates a Julian Day from a 'datetime-like' object.</td>
+          <td align="right" valign="top">
+            <span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#JulianDayFromDate">source code</a></span>
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netcdftime.netcdftime-module.html#date2index" class="summary-sig-name">date2index</a>(<span class="summary-sig-arg">dates</span>,
+        <span class="summary-sig-arg">nctime</span>,
+        <span class="summary-sig-arg">calendar</span>=<span class="summary-sig-default">None</span>,
+        <span class="summary-sig-arg">select</span>=<span class="summary-sig-default">'exact'</span>)</span><br />
+      Return indices of a netCDF time variable corresponding to the given 
+      dates.</td>
+          <td align="right" valign="top">
+            <span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#date2index">source code</a></span>
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netcdftime.netcdftime-module.html#date2num" class="summary-sig-name">date2num</a>(<span class="summary-sig-arg">dates</span>,
+        <span class="summary-sig-arg">units</span>,
+        <span class="summary-sig-arg">calendar</span>=<span class="summary-sig-default">'standard'</span>)</span><br />
+      Return numeric time values given datetime objects.</td>
+          <td align="right" valign="top">
+            <span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#date2num">source code</a></span>
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netcdftime.netcdftime-module.html#num2date" class="summary-sig-name">num2date</a>(<span class="summary-sig-arg">times</span>,
+        <span class="summary-sig-arg">units</span>,
+        <span class="summary-sig-arg">calendar</span>=<span class="summary-sig-default">'standard'</span>)</span><br />
+      Return datetime objects given numeric time values.</td>
+          <td align="right" valign="top">
+            <span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#num2date">source code</a></span>
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+</table>
+<!-- ==================== VARIABLES ==================== -->
+<a name="section-Variables"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Variables</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netcdftime.netcdftime-module.html#ISO8601_REGEX" class="summary-name">ISO8601_REGEX</a> = <code title="re.compile(r'(?P<year>[0-9]{4})(-(?P<month>[0-9]{1,2})(-(?P<day>[0-9]{\
+1,2})((?P<separator>.)(?P<hour>[0-9]{2}):(?P<minute>[0-9]{2})(:(?P<sec\
+ond>[0-9]{2})(\.(?P<fraction>[0-9]+))?)?(?P<timezone>Z|(([-\+])([0-9]{\
+2}):([0-9]{2})))?)?)?)?')">re.compile(r'<code class="re-group">(?P<</code><code class="re-ref">year</code><code class="re-group">></code><code class="re-group">[</code>0<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-op">{4}</code><code class="re-group">)</code><code class="re-group">(</code>-<code class="re-group">(?P<</code><code class="re-ref">month</code><code class="re-group">></code><code class="re-group">[</code>0<code class="re-op">-</code> [...]
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netcdftime.netcdftime-module.html#TIMEZONE_REGEX" class="summary-name">TIMEZONE_REGEX</a> = <code title="re.compile(r'(?P<prefix>[\+-])(?P<hours>[0-9]{2}).(?P<minutes>[0-9]{2}\
+)')">re.compile(r'<code class="re-group">(?P<</code><code class="re-ref">prefix</code><code class="re-group">></code><code class="re-group">[</code>\+-<code class="re-group">]</code><code class="re-group">)</code><code class="re-group">(?P<</code><code class="re-ref">hours</code><code class="re-group">></code><code class="re-group">[</code>0<code class="re-op">-</code>9<code class="re-group">]</code><code class="variable-ellipsis">...</code></code>
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'netcdftime'"><code class="variable-quote">'</code><code class="variable-string">netcdftime</code><code class="variable-quote">'</code></code>
+    </td>
+  </tr>
+</table>
+<!-- ==================== FUNCTION DETAILS ==================== -->
+<a name="section-FunctionDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Function Details</span></td>
+</tr>
+</table>
+<a name="DateFromJulianDay"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">DateFromJulianDay</span>(<span class="sig-arg">JD</span>,
+        <span class="sig-arg">calendar</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">standard</code><code class="variable-quote">'</code></span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    ><span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#DateFromJulianDay">source code</a></span> 
+    </td>
+  </tr></table>
+  
+  <p>returns a 'datetime-like' object given Julian Day. Julian Day is a 
+  fractional day with a resolution of 1 second.</p>
+  <p>if calendar='standard' or 'gregorian' (default), Julian day follows 
+  Julian Calendar on and before 1582-10-5, Gregorian calendar after  
+  1582-10-15.</p>
+  <p>if calendar='proleptic_gregorian', Julian Day follows gregorian 
+  calendar.</p>
+  <p>if calendar='julian', Julian Day follows julian calendar.</p>
+  <p>The datetime object is a 'real' datetime object if the date falls in 
+  the Gregorian calendar (i.e. calendar='proleptic_gregorian', or calendar 
+  = 'standard'/'gregorian' and the date is after 1582-10-15). Otherwise, 
+  it's a 'phony' datetime object which is actually an instance of 
+  netcdftime.datetime.</p>
+  <p>Algorithm:</p>
+  <p>Meeus, Jean (1998) Astronomical Algorithms (2nd Edition). 
+  Willmann-Bell, Virginia. p. 63</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="JulianDayFromDate"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">JulianDayFromDate</span>(<span class="sig-arg">date</span>,
+        <span class="sig-arg">calendar</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">standard</code><code class="variable-quote">'</code></span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    ><span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#JulianDayFromDate">source code</a></span> 
+    </td>
+  </tr></table>
+  
+  <p>creates a Julian Day from a 'datetime-like' object.  Returns the 
+  fractional Julian Day (resolution 1 second).</p>
+  <p>if calendar='standard' or 'gregorian' (default), Julian day follows 
+  Julian Calendar on and before 1582-10-5, Gregorian calendar after 
+  1582-10-15.</p>
+  <p>if calendar='proleptic_gregorian', Julian Day follows gregorian 
+  calendar.</p>
+  <p>if calendar='julian', Julian Day follows julian calendar.</p>
+  <p>Algorithm:</p>
+  <p>Meeus, Jean (1998) Astronomical Algorithms (2nd Edition). 
+  Willmann-Bell, Virginia. p. 63</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="date2index"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">date2index</span>(<span class="sig-arg">dates</span>,
+        <span class="sig-arg">nctime</span>,
+        <span class="sig-arg">calendar</span>=<span class="sig-default">None</span>,
+        <span class="sig-arg">select</span>=<span class="sig-default">'exact'</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    ><span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#date2index">source code</a></span> 
+    </td>
+  </tr></table>
+  
+  <p>Return indices of a netCDF time variable corresponding to the given 
+  dates.</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>dates</code></strong> - A datetime object or a sequence of datetime objects. The datetime
+          objects should not include a time-zone offset.</li>
+        <li><strong class="pname"><code>nctime</code></strong> - A netCDF time variable object. The nctime object must have a 
+          <code>units</code> attribute. The entries are assumed to be 
+          stored in increasing order.</li>
+        <li><strong class="pname"><code>calendar</code></strong> - Describes the calendar used in the time calculation. Valid 
+          calendars <code>'standard', 'gregorian', 'proleptic_gregorian' 
+          'noleap', '365_day', '360_day', 'julian', 'all_leap', 
+          '366_day'</code>. Default is <code>'standard'</code>, which is a 
+          mixed Julian/Gregorian calendar If <code>calendar</code> is None,
+          its value is given by <code>nctime.calendar</code> or 
+          <code>standard</code> if no such attribute exists.</li>
+        <li><strong class="pname"><code>select</code></strong> - <code>'exact', 'before', 'after', 'nearest'</code> The index 
+          selection method. <code>exact</code> will return the indices 
+          perfectly matching the dates given. <code>before</code> and 
+          <code>after</code> will return the indices corresponding to the 
+          dates just before or just after the given dates if an exact match
+          cannot be found. <code>nearest</code> will return the indices 
+          that correpond to the closest dates.</li>
+    </ul></dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="date2num"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">date2num</span>(<span class="sig-arg">dates</span>,
+        <span class="sig-arg">units</span>,
+        <span class="sig-arg">calendar</span>=<span class="sig-default">'standard'</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    ><span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#date2num">source code</a></span> 
+    </td>
+  </tr></table>
+  
+  <p>Return numeric time values given datetime objects. The units of the 
+  numeric time values are described by the <code class="link">units</code> 
+  argument and the <code class="link">calendar</code> keyword. The datetime
+  objects must be in UTC with no time-zone offset.  If there is a time-zone
+  offset in <code>units</code>, it will be applied to the returned numeric 
+  values.</p>
+  <p>Like the matplotlib <code>date2num</code> function, except that it 
+  allows for different units and calendars.  Behaves the same if 
+  <code>units = 'days since 0001-01-01 00:00:00'</code> and <code>calendar 
+  = 'proleptic_gregorian'</code>.</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>dates</code></strong> - A datetime object or a sequence of datetime objects. The datetime
+          objects should not include a time-zone offset.</li>
+        <li><strong class="pname"><code>units</code></strong> - a string of the form <code>'<b>time units</b> since <b>reference 
+          time</b></code>' describing the time units. <b><code>time 
+          units</code></b> can be days, hours, minutes or seconds.  
+          <b><code>reference time</code></b> is the time origin. A valid 
+          choice would be units=<code>'hours since 1800-01-01 00:00:00 
+          -6:00'</code>.</li>
+        <li><strong class="pname"><code>calendar</code></strong> - describes the calendar used in the time calculations. All the 
+          values currently defined in the <a 
+          href="http://cf-pcmdi.llnl.gov/documents/cf-conventions/" 
+          target="_top">CF metadata convention</a> are supported. Valid 
+          calendars <code>'standard', 'gregorian', 'proleptic_gregorian' 
+          'noleap', '365_day', '360_day', 'julian', 'all_leap', 
+          '366_day'</code>. Default is <code>'standard'</code>, which is a 
+          mixed Julian/Gregorian calendar.</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>a numeric time value, or an array of numeric time values.
+          <p>The maximum resolution of the numeric time values is 1 
+          second.</p></dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="num2date"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">num2date</span>(<span class="sig-arg">times</span>,
+        <span class="sig-arg">units</span>,
+        <span class="sig-arg">calendar</span>=<span class="sig-default">'standard'</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    ><span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#num2date">source code</a></span> 
+    </td>
+  </tr></table>
+  
+  <p>Return datetime objects given numeric time values. The units of the 
+  numeric time values are described by the <code>units</code> argument and 
+  the <code>calendar</code> keyword. The returned datetime objects 
+  represent UTC with no time-zone offset, even if the specified 
+  <code>units</code> contain a time-zone offset.</p>
+  <p>Like the matplotlib <code>num2date</code> function, except that it 
+  allows for different units and calendars.  Behaves the same if 
+  <code>units = 'days since 001-01-01 00:00:00'</code> and <code>calendar =
+  'proleptic_gregorian'</code>.</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>times</code></strong> - numeric time values. Maximum resolution is 1 second.</li>
+        <li><strong class="pname"><code>units</code></strong> - a string of the form <code>'<b>time units</b> since <b>reference 
+          time</b></code>' describing the time units. <b><code>time 
+          units</code></b> can be days, hours, minutes or seconds.  
+          <b><code>reference time</code></b> is the time origin. A valid 
+          choice would be units=<code>'hours since 1800-01-01 00:00:00 
+          -6:00'</code>.</li>
+        <li><strong class="pname"><code>calendar</code></strong> - describes the calendar used in the time calculations. All the 
+          values currently defined in the <a 
+          href="http://cf-pcmdi.llnl.gov/documents/cf-conventions/" 
+          target="_top">CF metadata convention</a> are supported. Valid 
+          calendars <code>'standard', 'gregorian', 'proleptic_gregorian' 
+          'noleap', '365_day', '360_day', 'julian', 'all_leap', 
+          '366_day'</code>. Default is <code>'standard'</code>, which is a 
+          mixed Julian/Gregorian calendar.</li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>a datetime instance, or an array of datetime instances.
+          <p>The datetime instances returned are 'real' python datetime 
+          objects if the date falls in the Gregorian calendar (i.e. 
+          <code>calendar='proleptic_gregorian'</code>, or <code>calendar = 
+          'standard'</code> or <code>'gregorian'</code> and the date is 
+          after 1582-10-15). Otherwise, they are 'phony' datetime objects 
+          which support some but not all the methods of 'real' python 
+          datetime objects.  This is because the python datetime module 
+          cannot the uses the <code>'proleptic_gregorian'</code> calendar, 
+          even before the switch occured from the Julian calendar in 1582. 
+          The datetime instances do not contain a time-zone offset, even if
+          the specified <code>units</code> contains one.</p></dd>
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== VARIABLES DETAILS ==================== -->
+<a name="section-VariablesDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Variables Details</span></td>
+</tr>
+</table>
+<a name="ISO8601_REGEX"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <h3 class="epydoc">ISO8601_REGEX</h3>
+  
+  <dl class="fields">
+  </dl>
+  <dl class="fields">
+    <dt>Value:</dt>
+      <dd><table><tr><td><pre class="variable">
+re.compile(r'<code class="re-group">(?P<</code><code class="re-ref">year</code><code class="re-group">></code><code class="re-group">[</code>0<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-op">{4}</code><code class="re-group">)</code><code class="re-group">(</code>-<code class="re-group">(?P<</code><code class="re-ref">month</code><code class="re-group">></code><code class="re-group">[</code>0<code class="re-op">-</code>9<code class="re-group">]</ [...]
+<code class="re-op">1,2}</code><code class="re-group">)</code><code class="re-group">(</code><code class="re-group">(?P<</code><code class="re-ref">separator</code><code class="re-group">></code>.<code class="re-group">)</code><code class="re-group">(?P<</code><code class="re-ref">hour</code><code class="re-group">></code><code class="re-group">[</code>0<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-op">{2}</code><code class="re-group">)</code>:<c [...]
+<code class="re-ref">ond</code><code class="re-group">></code><code class="re-group">[</code>0<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-op">{2}</code><code class="re-group">)</code><code class="re-group">(</code>\.<code class="re-group">(?P<</code><code class="re-ref">fraction</code><code class="re-group">></code><code class="re-group">[</code>0<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-op">+</code><code class="r [...]
+<code class="re-op">2}</code><code class="re-group">)</code>:<code class="re-group">(</code><code class="re-group">[</code>0<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-op">{2}</code><code class="re-group">)</code><code class="re-group">)</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">)</code><code class="re-op">?</code><code class="re-group">)</code><code cl [...]
+</pre></td></tr></table>
+</dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="TIMEZONE_REGEX"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <h3 class="epydoc">TIMEZONE_REGEX</h3>
+  
+  <dl class="fields">
+  </dl>
+  <dl class="fields">
+    <dt>Value:</dt>
+      <dd><table><tr><td><pre class="variable">
+re.compile(r'<code class="re-group">(?P<</code><code class="re-ref">prefix</code><code class="re-group">></code><code class="re-group">[</code>\+-<code class="re-group">]</code><code class="re-group">)</code><code class="re-group">(?P<</code><code class="re-ref">hours</code><code class="re-group">></code><code class="re-group">[</code>0<code class="re-op">-</code>9<code class="re-group">]</code><code class="re-op">{2}</code><code class="re-group">)</code>.<code class="re-grou [...]
+<code class="re-group">)</code>')
+</pre></td></tr></table>
+</dd>
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Thu Jul  8 10:58:35 2010
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netcdftime.netcdftime-pysrc.html b/docs/netcdftime.netcdftime-pysrc.html
new file mode 100644
index 0000000..af9de2c
--- /dev/null
+++ b/docs/netcdftime.netcdftime-pysrc.html
@@ -0,0 +1,1199 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netcdftime.netcdftime</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        Package netcdftime ::
+        Module netcdftime
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<h1 class="epydoc">Source Code for <a href="netcdftime.netcdftime-module.html">Module netcdftime.netcdftime</a></h1>
+<pre class="py-src">
+<a name="L1"></a><tt class="py-lineno">   1</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
+<a name="L2"></a><tt class="py-lineno">   2</tt>  <tt class="py-line"><tt class="py-docstring">Performs conversions of netCDF time coordinate data to/from datetime objects.</tt> </tt>
+<a name="L3"></a><tt class="py-lineno">   3</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
+<a name="L4"></a><tt class="py-lineno">   4</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">math</tt><tt class="py-op">,</tt> <tt class="py-name">numpy</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">,</tt> <tt class="py-name">time</tt> </tt>
+<a name="L5"></a><tt class="py-lineno">   5</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Class netcdftime.netcdftime.datetime=netcdftime.netcdftime.datetime-class.html"><a title="netcdftime.netcdftime.datetime" class="py-name" href="#" onclick="return doclink('link-0', 'datetime', 'link-0');">datetime</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name"><a title="netcdftime.netcdftime.datetime" class="py-name"  [...]
+<a name="L6"></a><tt class="py-lineno">   6</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name"><a title="netcdftime.netcdftime.datetime" class="py-name" href="#" onclick="return doclink('link-2', 'datetime', 'link-0');">datetime</a></tt> <tt class="py-keyword">import</tt> <tt class="py-name">tzinfo</tt><tt class="py-op">,</tt> <tt class="py-name">timedelta</tt> </tt>
+<a name="L7"></a><tt class="py-lineno">   7</tt>  <tt class="py-line"> </tt>
+<a name="L8"></a><tt class="py-lineno">   8</tt>  <tt class="py-line"><tt id="link-3" class="py-name" targets="Variable netcdftime.netcdftime._units=netcdftime.netcdftime-module.html#_units"><a title="netcdftime.netcdftime._units" class="py-name" href="#" onclick="return doclink('link-3', '_units', 'link-3');">_units</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'days'</tt><tt class="py-op">,</tt><tt class="py-string">'hours'</tt><tt class="py-op">,</tt> [...]
+<a name="L9"></a><tt class="py-lineno">   9</tt>  <tt class="py-line"><tt id="link-4" class="py-name" targets="Variable netcdftime.netcdftime._calendars=netcdftime.netcdftime-module.html#_calendars"><a title="netcdftime.netcdftime._calendars" class="py-name" href="#" onclick="return doclink('link-4', '_calendars', 'link-4');">_calendars</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'standard'</tt><tt class="py-op">,</tt><tt class="py-string">'gregorian'< [...]
+<a name="L10"></a><tt class="py-lineno">  10</tt>  <tt class="py-line"> </tt>
+<a name="L11"></a><tt class="py-lineno">  11</tt>  <tt class="py-line"><tt class="py-name">__version__</tt> <tt class="py-op">=</tt> <tt class="py-string">'0.9.2'</tt> </tt>
+<a name="L12"></a><tt class="py-lineno">  12</tt>  <tt class="py-line"> </tt>
+<a name="L13"></a><tt class="py-lineno">  13</tt>  <tt class="py-line"><tt class="py-comment"># Adapted from http://delete.me.uk/2005/03/iso8601.html</tt> </tt>
+<a name="L14"></a><tt class="py-lineno">  14</tt>  <tt class="py-line"><tt id="link-5" class="py-name" targets="Variable netcdftime.netcdftime.ISO8601_REGEX=netcdftime.netcdftime-module.html#ISO8601_REGEX"><a title="netcdftime.netcdftime.ISO8601_REGEX" class="py-name" href="#" onclick="return doclink('link-5', 'ISO8601_REGEX', 'link-5');">ISO8601_REGEX</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(< [...]
+<a name="L15"></a><tt class="py-lineno">  15</tt>  <tt class="py-line">    <tt class="py-string">r"((?P<separator>.)(?P<hour>[0-9]{2}):(?P<minute>[0-9]{2})(:(?P<second>[0-9]{2})(\.(?P<fraction>[0-9]+))?)?"</tt> </tt>
+<a name="L16"></a><tt class="py-lineno">  16</tt>  <tt class="py-line">    <tt class="py-string">r"(?P<timezone>Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?"</tt> </tt>
+<a name="L17"></a><tt class="py-lineno">  17</tt>  <tt class="py-line"><tt class="py-op">)</tt> </tt>
+<a name="L18"></a><tt class="py-lineno">  18</tt>  <tt class="py-line"><tt id="link-6" class="py-name" targets="Variable netcdftime.netcdftime.TIMEZONE_REGEX=netcdftime.netcdftime-module.html#TIMEZONE_REGEX"><a title="netcdftime.netcdftime.TIMEZONE_REGEX" class="py-name" href="#" onclick="return doclink('link-6', 'TIMEZONE_REGEX', 'link-6');">TIMEZONE_REGEX</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-o [...]
+<a name="L19"></a><tt class="py-lineno">  19</tt>  <tt class="py-line"> </tt>
+<a name="datetime"></a><div id="datetime-def"><a name="L20"></a><tt class="py-lineno">  20</tt> <a class="py-toggle" href="#" id="datetime-toggle" onclick="return toggle('datetime');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="netcdftime.netcdftime.datetime-class.html">datetime</a><tt class="py-op">:</tt> </tt>
+</div><div id="datetime-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="datetime-expanded"><a name="L21"></a><tt class="py-lineno">  21</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L22"></a><tt class="py-lineno">  22</tt>  <tt class="py-line"><tt class="py-docstring">Phony datetime object which mimics the python datetime object,</tt> </tt>
+<a name="L23"></a><tt class="py-lineno">  23</tt>  <tt class="py-line"><tt class="py-docstring">but allows for dates that don't exist in the proleptic gregorian calendar.</tt> </tt>
+<a name="L24"></a><tt class="py-lineno">  24</tt>  <tt class="py-line"><tt class="py-docstring">Doesn't do timedelta operations, doesn't overload + and -.</tt> </tt>
+<a name="L25"></a><tt class="py-lineno">  25</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L26"></a><tt class="py-lineno">  26</tt>  <tt class="py-line"><tt class="py-docstring">Has strftime, timetuple and __repr__ methods.  The format</tt> </tt>
+<a name="L27"></a><tt class="py-lineno">  27</tt>  <tt class="py-line"><tt class="py-docstring">of the string produced by __repr__ is controlled by self.format</tt> </tt>
+<a name="L28"></a><tt class="py-lineno">  28</tt>  <tt class="py-line"><tt class="py-docstring">(default %Y-%m-%d %H:%M:%S).</tt> </tt>
+<a name="L29"></a><tt class="py-lineno">  29</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L30"></a><tt class="py-lineno">  30</tt>  <tt class="py-line"><tt class="py-docstring">Instance variables are year,month,day,hour,minute,second,dayofwk,dayofyr</tt> </tt>
+<a name="L31"></a><tt class="py-lineno">  31</tt>  <tt class="py-line"><tt class="py-docstring">and format.</tt> </tt>
+<a name="L32"></a><tt class="py-lineno">  32</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="datetime.__init__"></a><div id="datetime.__init__-def"><a name="L33"></a><tt class="py-lineno">  33</tt> <a class="py-toggle" href="#" id="datetime.__init__-toggle" onclick="return toggle('datetime.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime.datetime-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">year</tt><tt class= [...]
+</div><div id="datetime.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="datetime.__init__-expanded"><a name="L34"></a><tt class="py-lineno">  34</tt>  <tt class="py-line">        <tt class="py-docstring">"""dayofyr set to 1 by default - otherwise time.strftime will complain"""</tt> </tt>
+<a name="L35"></a><tt class="py-lineno">  35</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">year</tt><tt class="py-op">=</tt><tt class="py-name">year</tt> </tt>
+<a name="L36"></a><tt class="py-lineno">  36</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">month</tt><tt class="py-op">=</tt><tt class="py-name">month</tt> </tt>
+<a name="L37"></a><tt class="py-lineno">  37</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">day</tt><tt class="py-op">=</tt><tt class="py-name">day</tt> </tt>
+<a name="L38"></a><tt class="py-lineno">  38</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">hour</tt><tt class="py-op">=</tt><tt class="py-name">hour</tt> </tt>
+<a name="L39"></a><tt class="py-lineno">  39</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">minute</tt><tt class="py-op">=</tt><tt class="py-name">minute</tt> </tt>
+<a name="L40"></a><tt class="py-lineno">  40</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dayofwk</tt><tt class="py-op">=</tt><tt class="py-name">dayofwk</tt> </tt>
+<a name="L41"></a><tt class="py-lineno">  41</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dayofyr</tt><tt class="py-op">=</tt><tt class="py-name">dayofyr</tt> </tt>
+<a name="L42"></a><tt class="py-lineno">  42</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">second</tt><tt class="py-op">=</tt><tt class="py-name">second</tt> </tt>
+<a name="L43"></a><tt class="py-lineno">  43</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">format</tt><tt class="py-op">=</tt><tt class="py-string">'%Y-%m-%d %H:%M:%S'</tt> </tt>
+</div><a name="datetime.strftime"></a><div id="datetime.strftime-def"><a name="L44"></a><tt class="py-lineno">  44</tt> <a class="py-toggle" href="#" id="datetime.strftime-toggle" onclick="return toggle('datetime.strftime');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime.datetime-class.html#strftime">strftime</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">format</tt><t [...]
+</div><div id="datetime.strftime-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="datetime.strftime-expanded"><a name="L45"></a><tt class="py-lineno">  45</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">format</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
+<a name="L46"></a><tt class="py-lineno">  46</tt>  <tt class="py-line">            <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">format</tt> </tt>
+<a name="L47"></a><tt class="py-lineno">  47</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">_strftime</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-name">format</tt><tt class="py-op">)</tt> </tt>
+</div><a name="datetime.timetuple"></a><div id="datetime.timetuple-def"><a name="L48"></a><tt class="py-lineno">  48</tt> <a class="py-toggle" href="#" id="datetime.timetuple-toggle" onclick="return toggle('datetime.timetuple');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime.datetime-class.html#timetuple">timetuple</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="datetime.timetuple-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="datetime.timetuple-expanded"><a name="L49"></a><tt class="py-lineno">  49</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">year</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">month</tt><tt class="py-op">,</tt>< [...]
+</div><a name="datetime.__repr__"></a><div id="datetime.__repr__-def"><a name="L50"></a><tt class="py-lineno">  50</tt> <a class="py-toggle" href="#" id="datetime.__repr__-toggle" onclick="return toggle('datetime.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime.datetime-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="datetime.__repr__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="datetime.__repr__-expanded"><a name="L51"></a><tt class="py-lineno">  51</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Method netcdftime.netcdftime.datetime.strftime()=netcdftime.netcdftime.datetime-class.html#strftime"><a title="netcdftime.netcdftime.datetime.strf [...]
+</div></div><a name="L52"></a><tt class="py-lineno">  52</tt>  <tt class="py-line"> </tt>
+<a name="JulianDayFromDate"></a><div id="JulianDayFromDate-def"><a name="L53"></a><tt class="py-lineno">  53</tt> <a class="py-toggle" href="#" id="JulianDayFromDate-toggle" onclick="return toggle('JulianDayFromDate');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#JulianDayFromDate">JulianDayFromDate</a><tt class="py-op">(</tt><tt class="py-param">date</tt><tt class="py-op">,</tt><tt class="py-param">calendar</tt> [...]
+</div><div id="JulianDayFromDate-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="JulianDayFromDate-expanded"><a name="L54"></a><tt class="py-lineno">  54</tt>  <tt class="py-line"> </tt>
+<a name="L55"></a><tt class="py-lineno">  55</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L56"></a><tt class="py-lineno">  56</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L57"></a><tt class="py-lineno">  57</tt>  <tt class="py-line"><tt class="py-docstring">creates a Julian Day from a 'datetime-like' object.  Returns the fractional</tt> </tt>
+<a name="L58"></a><tt class="py-lineno">  58</tt>  <tt class="py-line"><tt class="py-docstring">Julian Day (resolution 1 second).</tt> </tt>
+<a name="L59"></a><tt class="py-lineno">  59</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L60"></a><tt class="py-lineno">  60</tt>  <tt class="py-line"><tt class="py-docstring">if calendar='standard' or 'gregorian' (default), Julian day follows Julian </tt> </tt>
+<a name="L61"></a><tt class="py-lineno">  61</tt>  <tt class="py-line"><tt class="py-docstring">Calendar on and before 1582-10-5, Gregorian calendar after 1582-10-15.</tt> </tt>
+<a name="L62"></a><tt class="py-lineno">  62</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L63"></a><tt class="py-lineno">  63</tt>  <tt class="py-line"><tt class="py-docstring">if calendar='proleptic_gregorian', Julian Day follows gregorian calendar.</tt> </tt>
+<a name="L64"></a><tt class="py-lineno">  64</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L65"></a><tt class="py-lineno">  65</tt>  <tt class="py-line"><tt class="py-docstring">if calendar='julian', Julian Day follows julian calendar.</tt> </tt>
+<a name="L66"></a><tt class="py-lineno">  66</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L67"></a><tt class="py-lineno">  67</tt>  <tt class="py-line"><tt class="py-docstring">Algorithm:</tt> </tt>
+<a name="L68"></a><tt class="py-lineno">  68</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L69"></a><tt class="py-lineno">  69</tt>  <tt class="py-line"><tt class="py-docstring">Meeus, Jean (1998) Astronomical Algorithms (2nd Edition). Willmann-Bell,</tt> </tt>
+<a name="L70"></a><tt class="py-lineno">  70</tt>  <tt class="py-line"><tt class="py-docstring">Virginia. p. 63</tt> </tt>
+<a name="L71"></a><tt class="py-lineno">  71</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L72"></a><tt class="py-lineno">  72</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L73"></a><tt class="py-lineno">  73</tt>  <tt class="py-line">     </tt>
+<a name="L74"></a><tt class="py-lineno">  74</tt>  <tt class="py-line">    <tt class="py-comment"># based on redate.py by David Finlayson.</tt> </tt>
+<a name="L75"></a><tt class="py-lineno">  75</tt>  <tt class="py-line"> </tt>
+<a name="L76"></a><tt class="py-lineno">  76</tt>  <tt class="py-line">    <tt class="py-name">year</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">year</tt><tt class="py-op">;</tt> <tt class="py-name">month</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">month</tt><tt class="py-op">;</tt> <tt class="py-name">day</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py- [...]
+<a name="L77"></a><tt class="py-lineno">  77</tt>  <tt class="py-line">    <tt class="py-name">hour</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">hour</tt><tt class="py-op">;</tt> <tt class="py-name">minute</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">minute</tt><tt class="py-op">;</tt> <tt class="py-name">second</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class [...]
+<a name="L78"></a><tt class="py-lineno">  78</tt>  <tt class="py-line">    <tt class="py-comment"># Convert time to fractions of a day</tt> </tt>
+<a name="L79"></a><tt class="py-lineno">  79</tt>  <tt class="py-line">    <tt class="py-name">day</tt> <tt class="py-op">=</tt> <tt class="py-name">day</tt> <tt class="py-op">+</tt> <tt class="py-name">hour</tt><tt class="py-op">/</tt><tt class="py-number">24.0</tt> <tt class="py-op">+</tt> <tt class="py-name">minute</tt><tt class="py-op">/</tt><tt class="py-number">1440.0</tt> <tt class="py-op">+</tt> <tt class="py-name">second</tt><tt class="py-op">/</tt><tt class="py-number">86400.0< [...]
+<a name="L80"></a><tt class="py-lineno">  80</tt>  <tt class="py-line"> </tt>
+<a name="L81"></a><tt class="py-lineno">  81</tt>  <tt class="py-line">    <tt class="py-comment"># Start Meeus algorithm (variables are in his notation)</tt> </tt>
+<a name="L82"></a><tt class="py-lineno">  82</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">month</tt> <tt class="py-op"><</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L83"></a><tt class="py-lineno">  83</tt>  <tt class="py-line">        <tt class="py-name">month</tt> <tt class="py-op">=</tt> <tt class="py-name">month</tt> <tt class="py-op">+</tt> <tt class="py-number">12</tt> </tt>
+<a name="L84"></a><tt class="py-lineno">  84</tt>  <tt class="py-line">        <tt class="py-name">year</tt> <tt class="py-op">=</tt> <tt class="py-name">year</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt> </tt>
+<a name="L85"></a><tt class="py-lineno">  85</tt>  <tt class="py-line">         </tt>
+<a name="L86"></a><tt class="py-lineno">  86</tt>  <tt class="py-line">    <tt class="py-name">A</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">year</tt><tt class="py-op">/</tt><tt class="py-number">100</tt><tt class="py-op">)</tt> </tt>
+<a name="L87"></a><tt class="py-lineno">  87</tt>  <tt class="py-line"> </tt>
+<a name="L88"></a><tt class="py-lineno">  88</tt>  <tt class="py-line">    <tt class="py-name">jd</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-number">365.25</tt> <tt class="py-op">*</tt> <tt class="py-op">(</tt><tt class="py-name">year</tt> <tt class="py-op">+</tt> <tt class="py-number">4716</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-num [...]
+<a name="L89"></a><tt class="py-lineno">  89</tt>  <tt class="py-line">         <tt class="py-name">day</tt> <tt class="py-op">-</tt> <tt class="py-number">1524.5</tt> </tt>
+<a name="L90"></a><tt class="py-lineno">  90</tt>  <tt class="py-line"> </tt>
+<a name="L91"></a><tt class="py-lineno">  91</tt>  <tt class="py-line">    <tt class="py-comment"># optionally adjust the jd for the switch from </tt> </tt>
+<a name="L92"></a><tt class="py-lineno">  92</tt>  <tt class="py-line">    <tt class="py-comment"># the Julian to Gregorian Calendar</tt> </tt>
+<a name="L93"></a><tt class="py-lineno">  93</tt>  <tt class="py-line">    <tt class="py-comment"># here assumed to have occurred the day after 1582 October 4</tt> </tt>
+<a name="L94"></a><tt class="py-lineno">  94</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">calendar</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'standard'</tt><tt class="py-op">,</tt><tt class="py-string">'gregorian'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L95"></a><tt class="py-lineno">  95</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">jd</tt> <tt class="py-op">>=</tt> <tt class="py-number">2299170.5</tt><tt class="py-op">:</tt> </tt>
+<a name="L96"></a><tt class="py-lineno">  96</tt>  <tt class="py-line">            <tt class="py-comment"># 1582 October 15 (Gregorian Calendar)</tt> </tt>
+<a name="L97"></a><tt class="py-lineno">  97</tt>  <tt class="py-line">            <tt class="py-name">B</tt> <tt class="py-op">=</tt> <tt class="py-number">2</tt> <tt class="py-op">-</tt> <tt class="py-name">A</tt> <tt class="py-op">+</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">A</tt><tt class="py-op">/</tt><tt class="py-number">4</tt><tt class="py-op">)</tt> </tt>
+<a name="L98"></a><tt class="py-lineno">  98</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">jd</tt> <tt class="py-op"><</tt> <tt class="py-number">2299160.5</tt><tt class="py-op">:</tt> </tt>
+<a name="L99"></a><tt class="py-lineno">  99</tt>  <tt class="py-line">            <tt class="py-comment"># 1582 October 5 (Julian Calendar)</tt> </tt>
+<a name="L100"></a><tt class="py-lineno"> 100</tt>  <tt class="py-line">            <tt class="py-name">B</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L101"></a><tt class="py-lineno"> 101</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L102"></a><tt class="py-lineno"> 102</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">'impossible date (falls in gap between end of Julian calendar and beginning of Gregorian calendar'</tt> </tt>
+<a name="L103"></a><tt class="py-lineno"> 103</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">calendar</tt> <tt class="py-op">==</tt> <tt class="py-string">'proleptic_gregorian'</tt><tt class="py-op">:</tt> </tt>
+<a name="L104"></a><tt class="py-lineno"> 104</tt>  <tt class="py-line">        <tt class="py-name">B</tt> <tt class="py-op">=</tt> <tt class="py-number">2</tt> <tt class="py-op">-</tt> <tt class="py-name">A</tt> <tt class="py-op">+</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">A</tt><tt class="py-op">/</tt><tt class="py-number">4</tt><tt class="py-op">)</tt> </tt>
+<a name="L105"></a><tt class="py-lineno"> 105</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">calendar</tt> <tt class="py-op">==</tt> <tt class="py-string">'julian'</tt><tt class="py-op">:</tt> </tt>
+<a name="L106"></a><tt class="py-lineno"> 106</tt>  <tt class="py-line">        <tt class="py-name">B</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L107"></a><tt class="py-lineno"> 107</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L108"></a><tt class="py-lineno"> 108</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">'unknown calendar, must be one of julian,standard,gregorian,proleptic_gregorian, got %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">calendar</tt> </tt>
+<a name="L109"></a><tt class="py-lineno"> 109</tt>  <tt class="py-line">     </tt>
+<a name="L110"></a><tt class="py-lineno"> 110</tt>  <tt class="py-line">    <tt class="py-comment"># adjust for Julian calendar if necessary</tt> </tt>
+<a name="L111"></a><tt class="py-lineno"> 111</tt>  <tt class="py-line">    <tt class="py-name">jd</tt> <tt class="py-op">=</tt> <tt class="py-name">jd</tt> <tt class="py-op">+</tt> <tt class="py-name">B</tt> </tt>
+<a name="L112"></a><tt class="py-lineno"> 112</tt>  <tt class="py-line">     </tt>
+<a name="L113"></a><tt class="py-lineno"> 113</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">jd</tt>  </tt>
+</div><a name="L114"></a><tt class="py-lineno"> 114</tt>  <tt class="py-line"> </tt>
+<a name="_NoLeapDayFromDate"></a><div id="_NoLeapDayFromDate-def"><a name="L115"></a><tt class="py-lineno"> 115</tt> <a class="py-toggle" href="#" id="_NoLeapDayFromDate-toggle" onclick="return toggle('_NoLeapDayFromDate');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#_NoLeapDayFromDate">_NoLeapDayFromDate</a><tt class="py-op">(</tt><tt class="py-param">date</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_NoLeapDayFromDate-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_NoLeapDayFromDate-expanded"><a name="L116"></a><tt class="py-lineno"> 116</tt>  <tt class="py-line"> </tt>
+<a name="L117"></a><tt class="py-lineno"> 117</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L118"></a><tt class="py-lineno"> 118</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L119"></a><tt class="py-lineno"> 119</tt>  <tt class="py-line"><tt class="py-docstring">creates a Julian Day for a calendar with no leap years from a datetime </tt> </tt>
+<a name="L120"></a><tt class="py-lineno"> 120</tt>  <tt class="py-line"><tt class="py-docstring">instance.  Returns the fractional Julian Day (resolution 1 second).</tt> </tt>
+<a name="L121"></a><tt class="py-lineno"> 121</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L122"></a><tt class="py-lineno"> 122</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L123"></a><tt class="py-lineno"> 123</tt>  <tt class="py-line">     </tt>
+<a name="L124"></a><tt class="py-lineno"> 124</tt>  <tt class="py-line">    <tt class="py-name">year</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">year</tt><tt class="py-op">;</tt> <tt class="py-name">month</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">month</tt><tt class="py-op">;</tt> <tt class="py-name">day</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py [...]
+<a name="L125"></a><tt class="py-lineno"> 125</tt>  <tt class="py-line">    <tt class="py-name">hour</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">hour</tt><tt class="py-op">;</tt> <tt class="py-name">minute</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">minute</tt><tt class="py-op">;</tt> <tt class="py-name">second</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt clas [...]
+<a name="L126"></a><tt class="py-lineno"> 126</tt>  <tt class="py-line">    <tt class="py-comment"># Convert time to fractions of a day</tt> </tt>
+<a name="L127"></a><tt class="py-lineno"> 127</tt>  <tt class="py-line">    <tt class="py-name">day</tt> <tt class="py-op">=</tt> <tt class="py-name">day</tt> <tt class="py-op">+</tt> <tt class="py-name">hour</tt><tt class="py-op">/</tt><tt class="py-number">24.0</tt> <tt class="py-op">+</tt> <tt class="py-name">minute</tt><tt class="py-op">/</tt><tt class="py-number">1440.0</tt> <tt class="py-op">+</tt> <tt class="py-name">second</tt><tt class="py-op">/</tt><tt class="py-number">86400.0 [...]
+<a name="L128"></a><tt class="py-lineno"> 128</tt>  <tt class="py-line"> </tt>
+<a name="L129"></a><tt class="py-lineno"> 129</tt>  <tt class="py-line">    <tt class="py-comment"># Start Meeus algorithm (variables are in his notation)</tt> </tt>
+<a name="L130"></a><tt class="py-lineno"> 130</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">month</tt> <tt class="py-op"><</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L131"></a><tt class="py-lineno"> 131</tt>  <tt class="py-line">        <tt class="py-name">month</tt> <tt class="py-op">=</tt> <tt class="py-name">month</tt> <tt class="py-op">+</tt> <tt class="py-number">12</tt> </tt>
+<a name="L132"></a><tt class="py-lineno"> 132</tt>  <tt class="py-line">        <tt class="py-name">year</tt> <tt class="py-op">=</tt> <tt class="py-name">year</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt> </tt>
+<a name="L133"></a><tt class="py-lineno"> 133</tt>  <tt class="py-line">         </tt>
+<a name="L134"></a><tt class="py-lineno"> 134</tt>  <tt class="py-line">    <tt class="py-name">jd</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-number">365.</tt> <tt class="py-op">*</tt> <tt class="py-op">(</tt><tt class="py-name">year</tt> <tt class="py-op">+</tt> <tt class="py-number">4716</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-numb [...]
+<a name="L135"></a><tt class="py-lineno"> 135</tt>  <tt class="py-line">         <tt class="py-name">day</tt> <tt class="py-op">-</tt> <tt class="py-number">1524.5</tt> </tt>
+<a name="L136"></a><tt class="py-lineno"> 136</tt>  <tt class="py-line">     </tt>
+<a name="L137"></a><tt class="py-lineno"> 137</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">jd</tt>  </tt>
+</div><a name="L138"></a><tt class="py-lineno"> 138</tt>  <tt class="py-line"> </tt>
+<a name="_AllLeapFromDate"></a><div id="_AllLeapFromDate-def"><a name="L139"></a><tt class="py-lineno"> 139</tt> <a class="py-toggle" href="#" id="_AllLeapFromDate-toggle" onclick="return toggle('_AllLeapFromDate');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#_AllLeapFromDate">_AllLeapFromDate</a><tt class="py-op">(</tt><tt class="py-param">date</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_AllLeapFromDate-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_AllLeapFromDate-expanded"><a name="L140"></a><tt class="py-lineno"> 140</tt>  <tt class="py-line"> </tt>
+<a name="L141"></a><tt class="py-lineno"> 141</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L142"></a><tt class="py-lineno"> 142</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L143"></a><tt class="py-lineno"> 143</tt>  <tt class="py-line"><tt class="py-docstring">creates a Julian Day for a calendar where all years have 366 days from</tt> </tt>
+<a name="L144"></a><tt class="py-lineno"> 144</tt>  <tt class="py-line"><tt class="py-docstring">a 'datetime-like' object.</tt> </tt>
+<a name="L145"></a><tt class="py-lineno"> 145</tt>  <tt class="py-line"><tt class="py-docstring">Returns the fractional Julian Day (resolution 1 second).</tt> </tt>
+<a name="L146"></a><tt class="py-lineno"> 146</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L147"></a><tt class="py-lineno"> 147</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L148"></a><tt class="py-lineno"> 148</tt>  <tt class="py-line">     </tt>
+<a name="L149"></a><tt class="py-lineno"> 149</tt>  <tt class="py-line">    <tt class="py-name">year</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">year</tt><tt class="py-op">;</tt> <tt class="py-name">month</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">month</tt><tt class="py-op">;</tt> <tt class="py-name">day</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py [...]
+<a name="L150"></a><tt class="py-lineno"> 150</tt>  <tt class="py-line">    <tt class="py-name">hour</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">hour</tt><tt class="py-op">;</tt> <tt class="py-name">minute</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">minute</tt><tt class="py-op">;</tt> <tt class="py-name">second</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt clas [...]
+<a name="L151"></a><tt class="py-lineno"> 151</tt>  <tt class="py-line">    <tt class="py-comment"># Convert time to fractions of a day</tt> </tt>
+<a name="L152"></a><tt class="py-lineno"> 152</tt>  <tt class="py-line">    <tt class="py-name">day</tt> <tt class="py-op">=</tt> <tt class="py-name">day</tt> <tt class="py-op">+</tt> <tt class="py-name">hour</tt><tt class="py-op">/</tt><tt class="py-number">24.0</tt> <tt class="py-op">+</tt> <tt class="py-name">minute</tt><tt class="py-op">/</tt><tt class="py-number">1440.0</tt> <tt class="py-op">+</tt> <tt class="py-name">second</tt><tt class="py-op">/</tt><tt class="py-number">86400.0 [...]
+<a name="L153"></a><tt class="py-lineno"> 153</tt>  <tt class="py-line"> </tt>
+<a name="L154"></a><tt class="py-lineno"> 154</tt>  <tt class="py-line">    <tt class="py-comment"># Start Meeus algorithm (variables are in his notation)</tt> </tt>
+<a name="L155"></a><tt class="py-lineno"> 155</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">month</tt> <tt class="py-op"><</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L156"></a><tt class="py-lineno"> 156</tt>  <tt class="py-line">        <tt class="py-name">month</tt> <tt class="py-op">=</tt> <tt class="py-name">month</tt> <tt class="py-op">+</tt> <tt class="py-number">12</tt> </tt>
+<a name="L157"></a><tt class="py-lineno"> 157</tt>  <tt class="py-line">        <tt class="py-name">year</tt> <tt class="py-op">=</tt> <tt class="py-name">year</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt> </tt>
+<a name="L158"></a><tt class="py-lineno"> 158</tt>  <tt class="py-line">         </tt>
+<a name="L159"></a><tt class="py-lineno"> 159</tt>  <tt class="py-line">    <tt class="py-name">jd</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-number">366.</tt> <tt class="py-op">*</tt> <tt class="py-op">(</tt><tt class="py-name">year</tt> <tt class="py-op">+</tt> <tt class="py-number">4716</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-numb [...]
+<a name="L160"></a><tt class="py-lineno"> 160</tt>  <tt class="py-line">         <tt class="py-name">day</tt> <tt class="py-op">-</tt> <tt class="py-number">1524.5</tt> </tt>
+<a name="L161"></a><tt class="py-lineno"> 161</tt>  <tt class="py-line">     </tt>
+<a name="L162"></a><tt class="py-lineno"> 162</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">jd</tt>  </tt>
+</div><a name="L163"></a><tt class="py-lineno"> 163</tt>  <tt class="py-line"> </tt>
+<a name="_360DayFromDate"></a><div id="_360DayFromDate-def"><a name="L164"></a><tt class="py-lineno"> 164</tt> <a class="py-toggle" href="#" id="_360DayFromDate-toggle" onclick="return toggle('_360DayFromDate');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#_360DayFromDate">_360DayFromDate</a><tt class="py-op">(</tt><tt class="py-param">date</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_360DayFromDate-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_360DayFromDate-expanded"><a name="L165"></a><tt class="py-lineno"> 165</tt>  <tt class="py-line"> </tt>
+<a name="L166"></a><tt class="py-lineno"> 166</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L167"></a><tt class="py-lineno"> 167</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L168"></a><tt class="py-lineno"> 168</tt>  <tt class="py-line"><tt class="py-docstring">creates a Julian Day for a calendar where all months have 30 daysfrom</tt> </tt>
+<a name="L169"></a><tt class="py-lineno"> 169</tt>  <tt class="py-line"><tt class="py-docstring">a 'datetime-like' object.</tt> </tt>
+<a name="L170"></a><tt class="py-lineno"> 170</tt>  <tt class="py-line"><tt class="py-docstring">Returns the fractional Julian Day (resolution 1 second).</tt> </tt>
+<a name="L171"></a><tt class="py-lineno"> 171</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L172"></a><tt class="py-lineno"> 172</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L173"></a><tt class="py-lineno"> 173</tt>  <tt class="py-line">     </tt>
+<a name="L174"></a><tt class="py-lineno"> 174</tt>  <tt class="py-line">    <tt class="py-name">year</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">year</tt><tt class="py-op">;</tt> <tt class="py-name">month</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">month</tt><tt class="py-op">;</tt> <tt class="py-name">day</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py [...]
+<a name="L175"></a><tt class="py-lineno"> 175</tt>  <tt class="py-line">    <tt class="py-name">hour</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">hour</tt><tt class="py-op">;</tt> <tt class="py-name">minute</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">minute</tt><tt class="py-op">;</tt> <tt class="py-name">second</tt><tt class="py-op">=</tt><tt class="py-name">date</tt><tt clas [...]
+<a name="L176"></a><tt class="py-lineno"> 176</tt>  <tt class="py-line">    <tt class="py-comment"># Convert time to fractions of a day</tt> </tt>
+<a name="L177"></a><tt class="py-lineno"> 177</tt>  <tt class="py-line">    <tt class="py-name">day</tt> <tt class="py-op">=</tt> <tt class="py-name">day</tt> <tt class="py-op">+</tt> <tt class="py-name">hour</tt><tt class="py-op">/</tt><tt class="py-number">24.0</tt> <tt class="py-op">+</tt> <tt class="py-name">minute</tt><tt class="py-op">/</tt><tt class="py-number">1440.0</tt> <tt class="py-op">+</tt> <tt class="py-name">second</tt><tt class="py-op">/</tt><tt class="py-number">86400.0 [...]
+<a name="L178"></a><tt class="py-lineno"> 178</tt>  <tt class="py-line"> </tt>
+<a name="L179"></a><tt class="py-lineno"> 179</tt>  <tt class="py-line">    <tt class="py-name">jd</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-number">360.</tt> <tt class="py-op">*</tt> <tt class="py-op">(</tt><tt class="py-name">year</tt> <tt class="py-op">+</tt> <tt class="py-number">4716</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-numb [...]
+<a name="L180"></a><tt class="py-lineno"> 180</tt>  <tt class="py-line">     </tt>
+<a name="L181"></a><tt class="py-lineno"> 181</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">jd</tt>  </tt>
+</div><a name="L182"></a><tt class="py-lineno"> 182</tt>  <tt class="py-line"> </tt>
+<a name="DateFromJulianDay"></a><div id="DateFromJulianDay-def"><a name="L183"></a><tt class="py-lineno"> 183</tt> <a class="py-toggle" href="#" id="DateFromJulianDay-toggle" onclick="return toggle('DateFromJulianDay');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#DateFromJulianDay">DateFromJulianDay</a><tt class="py-op">(</tt><tt class="py-param">JD</tt><tt class="py-op">,</tt><tt class="py-param">calendar</tt>< [...]
+</div><div id="DateFromJulianDay-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="DateFromJulianDay-expanded"><a name="L184"></a><tt class="py-lineno"> 184</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L185"></a><tt class="py-lineno"> 185</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L186"></a><tt class="py-lineno"> 186</tt>  <tt class="py-line"><tt class="py-docstring">returns a 'datetime-like' object given Julian Day. Julian Day is a </tt> </tt>
+<a name="L187"></a><tt class="py-lineno"> 187</tt>  <tt class="py-line"><tt class="py-docstring">fractional day with a resolution of 1 second.</tt> </tt>
+<a name="L188"></a><tt class="py-lineno"> 188</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L189"></a><tt class="py-lineno"> 189</tt>  <tt class="py-line"><tt class="py-docstring">if calendar='standard' or 'gregorian' (default), Julian day follows Julian </tt> </tt>
+<a name="L190"></a><tt class="py-lineno"> 190</tt>  <tt class="py-line"><tt class="py-docstring">Calendar on and before 1582-10-5, Gregorian calendar after  1582-10-15.</tt> </tt>
+<a name="L191"></a><tt class="py-lineno"> 191</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L192"></a><tt class="py-lineno"> 192</tt>  <tt class="py-line"><tt class="py-docstring">if calendar='proleptic_gregorian', Julian Day follows gregorian calendar.</tt> </tt>
+<a name="L193"></a><tt class="py-lineno"> 193</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L194"></a><tt class="py-lineno"> 194</tt>  <tt class="py-line"><tt class="py-docstring">if calendar='julian', Julian Day follows julian calendar.</tt> </tt>
+<a name="L195"></a><tt class="py-lineno"> 195</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L196"></a><tt class="py-lineno"> 196</tt>  <tt class="py-line"><tt class="py-docstring">The datetime object is a 'real' datetime object if the date falls in</tt> </tt>
+<a name="L197"></a><tt class="py-lineno"> 197</tt>  <tt class="py-line"><tt class="py-docstring">the Gregorian calendar (i.e. calendar='proleptic_gregorian', or</tt> </tt>
+<a name="L198"></a><tt class="py-lineno"> 198</tt>  <tt class="py-line"><tt class="py-docstring">calendar = 'standard'/'gregorian' and the date is after 1582-10-15).</tt> </tt>
+<a name="L199"></a><tt class="py-lineno"> 199</tt>  <tt class="py-line"><tt class="py-docstring">Otherwise, it's a 'phony' datetime object which is actually an instance</tt> </tt>
+<a name="L200"></a><tt class="py-lineno"> 200</tt>  <tt class="py-line"><tt class="py-docstring">of netcdftime.datetime.</tt> </tt>
+<a name="L201"></a><tt class="py-lineno"> 201</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L202"></a><tt class="py-lineno"> 202</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L203"></a><tt class="py-lineno"> 203</tt>  <tt class="py-line"><tt class="py-docstring">Algorithm:</tt> </tt>
+<a name="L204"></a><tt class="py-lineno"> 204</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L205"></a><tt class="py-lineno"> 205</tt>  <tt class="py-line"><tt class="py-docstring">Meeus, Jean (1998) Astronomical Algorithms (2nd Edition). Willmann-Bell,</tt> </tt>
+<a name="L206"></a><tt class="py-lineno"> 206</tt>  <tt class="py-line"><tt class="py-docstring">Virginia. p. 63</tt> </tt>
+<a name="L207"></a><tt class="py-lineno"> 207</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L208"></a><tt class="py-lineno"> 208</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L209"></a><tt class="py-lineno"> 209</tt>  <tt class="py-line"> </tt>
+<a name="L210"></a><tt class="py-lineno"> 210</tt>  <tt class="py-line">    <tt class="py-comment"># based on redate.py by David Finlayson.</tt> </tt>
+<a name="L211"></a><tt class="py-lineno"> 211</tt>  <tt class="py-line">     </tt>
+<a name="L212"></a><tt class="py-lineno"> 212</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">JD</tt> <tt class="py-op"><</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
+<a name="L213"></a><tt class="py-lineno"> 213</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">'Julian Day must be positive'</tt> </tt>
+<a name="L214"></a><tt class="py-lineno"> 214</tt>  <tt class="py-line"> </tt>
+<a name="L215"></a><tt class="py-lineno"> 215</tt>  <tt class="py-line">    <tt class="py-name">dayofwk</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">fmod</tt><tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">JD</tt> <tt class="py-op">+</tt> <tt class="py-number">1.5</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-num [...]
+<a name="L216"></a><tt class="py-lineno"> 216</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">F</tt><tt class="py-op">,</tt> <tt class="py-name">Z</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">JD</tt> <tt class="py-op">+</tt> <tt class="py-number">0.5</tt><tt class="py-op">)</tt> </tt>
+<a name="L217"></a><tt class="py-lineno"> 217</tt>  <tt class="py-line">    <tt class="py-name">Z</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">Z</tt><tt class="py-op">)</tt> </tt>
+<a name="L218"></a><tt class="py-lineno"> 218</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">calendar</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'standard'</tt><tt class="py-op">,</tt><tt class="py-string">'gregorian'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L219"></a><tt class="py-lineno"> 219</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">JD</tt> <tt class="py-op"><</tt> <tt class="py-number">2299160.5</tt><tt class="py-op">:</tt> </tt>
+<a name="L220"></a><tt class="py-lineno"> 220</tt>  <tt class="py-line">            <tt class="py-name">A</tt> <tt class="py-op">=</tt> <tt class="py-name">Z</tt> </tt>
+<a name="L221"></a><tt class="py-lineno"> 221</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L222"></a><tt class="py-lineno"> 222</tt>  <tt class="py-line">            <tt class="py-name">alpha</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">Z</tt> <tt class="py-op">-</tt> <tt class="py-number">1867216.25</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-number">36524.25</tt><tt class="py-op">)</tt> </tt>
+<a name="L223"></a><tt class="py-lineno"> 223</tt>  <tt class="py-line">            <tt class="py-name">A</tt> <tt class="py-op">=</tt> <tt class="py-name">Z</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> <tt class="py-op">+</tt> <tt class="py-name">alpha</tt> <tt class="py-op">-</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">alpha</tt><tt class="py-op">/</tt><tt class="py-number">4</tt><tt class="py-op">)</tt> </tt>
+<a name="L224"></a><tt class="py-lineno"> 224</tt>  <tt class="py-line"> </tt>
+<a name="L225"></a><tt class="py-lineno"> 225</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">calendar</tt> <tt class="py-op">==</tt> <tt class="py-string">'proleptic_gregorian'</tt><tt class="py-op">:</tt> </tt>
+<a name="L226"></a><tt class="py-lineno"> 226</tt>  <tt class="py-line">        <tt class="py-name">alpha</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">Z</tt> <tt class="py-op">-</tt> <tt class="py-number">1867216.25</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-number">36524.25</tt><tt class="py-op">)</tt> </tt>
+<a name="L227"></a><tt class="py-lineno"> 227</tt>  <tt class="py-line">        <tt class="py-name">A</tt> <tt class="py-op">=</tt> <tt class="py-name">Z</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> <tt class="py-op">+</tt> <tt class="py-name">alpha</tt> <tt class="py-op">-</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">alpha</tt><tt class="py-op">/</tt><tt class="py-number">4</tt><tt class="py-op">)</tt> </tt>
+<a name="L228"></a><tt class="py-lineno"> 228</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">calendar</tt> <tt class="py-op">==</tt> <tt class="py-string">'julian'</tt><tt class="py-op">:</tt> </tt>
+<a name="L229"></a><tt class="py-lineno"> 229</tt>  <tt class="py-line">        <tt class="py-name">A</tt> <tt class="py-op">=</tt> <tt class="py-name">Z</tt> </tt>
+<a name="L230"></a><tt class="py-lineno"> 230</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L231"></a><tt class="py-lineno"> 231</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">'unknown calendar, must be one of julian,standard,gregorian,proleptic_gregorian, got %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">calendar</tt> </tt>
+<a name="L232"></a><tt class="py-lineno"> 232</tt>  <tt class="py-line"> </tt>
+<a name="L233"></a><tt class="py-lineno"> 233</tt>  <tt class="py-line">    <tt class="py-name">B</tt> <tt class="py-op">=</tt> <tt class="py-name">A</tt> <tt class="py-op">+</tt> <tt class="py-number">1524</tt> </tt>
+<a name="L234"></a><tt class="py-lineno"> 234</tt>  <tt class="py-line">    <tt class="py-name">C</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">B</tt> <tt class="py-op">-</tt> <tt class="py-number">122.1</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-number">365.25</tt><tt class="py-op">)</tt> </tt>
+<a name="L235"></a><tt class="py-lineno"> 235</tt>  <tt class="py-line">    <tt class="py-name">D</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-number">365.25</tt> <tt class="py-op">*</tt> <tt class="py-name">C</tt><tt class="py-op">)</tt> </tt>
+<a name="L236"></a><tt class="py-lineno"> 236</tt>  <tt class="py-line">    <tt class="py-name">E</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">B</tt> <tt class="py-op">-</tt> <tt class="py-name">D</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-number">30.6001</tt><tt class="py-op">)</tt> </tt>
+<a name="L237"></a><tt class="py-lineno"> 237</tt>  <tt class="py-line"> </tt>
+<a name="L238"></a><tt class="py-lineno"> 238</tt>  <tt class="py-line">    <tt class="py-comment"># Convert to date</tt> </tt>
+<a name="L239"></a><tt class="py-lineno"> 239</tt>  <tt class="py-line">    <tt class="py-name">day</tt> <tt class="py-op">=</tt> <tt class="py-name">B</tt> <tt class="py-op">-</tt> <tt class="py-name">D</tt> <tt class="py-op">-</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-number">30.6001</tt> <tt class="py-op">*</tt> <tt class="py-name">E</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">F</tt> </tt>
+<a name="L240"></a><tt class="py-lineno"> 240</tt>  <tt class="py-line">    <tt class="py-name">nday</tt> <tt class="py-op">=</tt> <tt class="py-name">B</tt><tt class="py-op">-</tt><tt class="py-name">D</tt><tt class="py-op">-</tt><tt class="py-number">123</tt> </tt>
+<a name="L241"></a><tt class="py-lineno"> 241</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">nday</tt> <tt class="py-op"><=</tt> <tt class="py-number">305</tt><tt class="py-op">:</tt> </tt>
+<a name="L242"></a><tt class="py-lineno"> 242</tt>  <tt class="py-line">        <tt class="py-name">dayofyr</tt> <tt class="py-op">=</tt> <tt class="py-name">nday</tt><tt class="py-op">+</tt><tt class="py-number">60</tt> </tt>
+<a name="L243"></a><tt class="py-lineno"> 243</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L244"></a><tt class="py-lineno"> 244</tt>  <tt class="py-line">        <tt class="py-name">dayofyr</tt> <tt class="py-op">=</tt> <tt class="py-name">nday</tt><tt class="py-op">-</tt><tt class="py-number">305</tt> </tt>
+<a name="L245"></a><tt class="py-lineno"> 245</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">E</tt> <tt class="py-op"><</tt> <tt class="py-number">14</tt><tt class="py-op">:</tt> </tt>
+<a name="L246"></a><tt class="py-lineno"> 246</tt>  <tt class="py-line">        <tt class="py-name">month</tt> <tt class="py-op">=</tt> <tt class="py-name">E</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt> </tt>
+<a name="L247"></a><tt class="py-lineno"> 247</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L248"></a><tt class="py-lineno"> 248</tt>  <tt class="py-line">        <tt class="py-name">month</tt> <tt class="py-op">=</tt> <tt class="py-name">E</tt> <tt class="py-op">-</tt> <tt class="py-number">13</tt> </tt>
+<a name="L249"></a><tt class="py-lineno"> 249</tt>  <tt class="py-line"> </tt>
+<a name="L250"></a><tt class="py-lineno"> 250</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">month</tt> <tt class="py-op">></tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
+<a name="L251"></a><tt class="py-lineno"> 251</tt>  <tt class="py-line">        <tt class="py-name">year</tt> <tt class="py-op">=</tt> <tt class="py-name">C</tt> <tt class="py-op">-</tt> <tt class="py-number">4716</tt> </tt>
+<a name="L252"></a><tt class="py-lineno"> 252</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L253"></a><tt class="py-lineno"> 253</tt>  <tt class="py-line">        <tt class="py-name">year</tt> <tt class="py-op">=</tt> <tt class="py-name">C</tt> <tt class="py-op">-</tt> <tt class="py-number">4715</tt> </tt>
+<a name="L254"></a><tt class="py-lineno"> 254</tt>  <tt class="py-line"> </tt>
+<a name="L255"></a><tt class="py-lineno"> 255</tt>  <tt class="py-line">    <tt class="py-comment"># a leap year?</tt> </tt>
+<a name="L256"></a><tt class="py-lineno"> 256</tt>  <tt class="py-line">    <tt class="py-name">leap</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L257"></a><tt class="py-lineno"> 257</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">year</tt> <tt class="py-op">%</tt> <tt class="py-number">4</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
+<a name="L258"></a><tt class="py-lineno"> 258</tt>  <tt class="py-line">        <tt class="py-name">leap</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
+<a name="L259"></a><tt class="py-lineno"> 259</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">calendar</tt> <tt class="py-op">==</tt> <tt class="py-string">'proleptic_gregorian'</tt> <tt class="py-keyword">or</tt> \ </tt>
+<a name="L260"></a><tt class="py-lineno"> 260</tt>  <tt class="py-line">       <tt class="py-op">(</tt><tt class="py-name">calendar</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'standard'</tt><tt class="py-op">,</tt><tt class="py-string">'gregorian'</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-name">JD</tt> <tt class="py-op">>=</tt> <tt class="py-number">2299160.5</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L261"></a><tt class="py-lineno"> 261</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">year</tt> <tt class="py-op">%</tt> <tt class="py-number">100</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt> <tt class="py-keyword">and</tt> <tt class="py-name">year</tt> <tt class="py-op">%</tt> <tt class="py-number">400</tt> <tt class="py-op">!=</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt>  </tt>
+<a name="L262"></a><tt class="py-lineno"> 262</tt>  <tt class="py-line">            <tt class="py-keyword">print</tt> <tt class="py-name">year</tt> <tt class="py-op">%</tt> <tt class="py-number">100</tt><tt class="py-op">,</tt> <tt class="py-name">year</tt> <tt class="py-op">%</tt> <tt class="py-number">400</tt> </tt>
+<a name="L263"></a><tt class="py-lineno"> 263</tt>  <tt class="py-line">            <tt class="py-name">leap</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L264"></a><tt class="py-lineno"> 264</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">leap</tt> <tt class="py-keyword">and</tt> <tt class="py-name">month</tt> <tt class="py-op">></tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
+<a name="L265"></a><tt class="py-lineno"> 265</tt>  <tt class="py-line">       <tt class="py-name">dayofyr</tt> <tt class="py-op">=</tt> <tt class="py-name">dayofyr</tt> <tt class="py-op">+</tt> <tt class="py-name">leap</tt> </tt>
+<a name="L266"></a><tt class="py-lineno"> 266</tt>  <tt class="py-line">     </tt>
+<a name="L267"></a><tt class="py-lineno"> 267</tt>  <tt class="py-line">    <tt class="py-comment"># Convert fractions of a day to time    </tt> </tt>
+<a name="L268"></a><tt class="py-lineno"> 268</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">dfrac</tt><tt class="py-op">,</tt> <tt class="py-name">days</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">day</tt><tt class="py-op">/</tt><tt class="py-number">1.0</tt><tt class="py-op">)</tt> </tt>
+<a name="L269"></a><tt class="py-lineno"> 269</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">hfrac</tt><tt class="py-op">,</tt> <tt class="py-name">hours</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">dfrac</tt> <tt class="py-op">*</tt> <tt class="py-number">24.0</tt><tt class="py-op">)</tt> </tt>
+<a name="L270"></a><tt class="py-lineno"> 270</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">mfrac</tt><tt class="py-op">,</tt> <tt class="py-name">minutes</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">hfrac</tt> <tt class="py-op">*</tt> <tt class="py-number">60.0</tt><tt class="py-op">)</tt> </tt>
+<a name="L271"></a><tt class="py-lineno"> 271</tt>  <tt class="py-line">    <tt class="py-name">seconds</tt> <tt class="py-op">=</tt> <tt class="py-name">round</tt><tt class="py-op">(</tt><tt class="py-name">mfrac</tt> <tt class="py-op">*</tt> <tt class="py-number">60.0</tt><tt class="py-op">)</tt> <tt class="py-comment"># seconds are rounded</tt> </tt>
+<a name="L272"></a><tt class="py-lineno"> 272</tt>  <tt class="py-line">     </tt>
+<a name="L273"></a><tt class="py-lineno"> 273</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">seconds</tt> <tt class="py-op">></tt> <tt class="py-number">59</tt><tt class="py-op">:</tt> </tt>
+<a name="L274"></a><tt class="py-lineno"> 274</tt>  <tt class="py-line">        <tt class="py-name">seconds</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L275"></a><tt class="py-lineno"> 275</tt>  <tt class="py-line">        <tt class="py-name">minutes</tt> <tt class="py-op">=</tt> <tt class="py-name">minutes</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> </tt>
+<a name="L276"></a><tt class="py-lineno"> 276</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">minutes</tt> <tt class="py-op">></tt> <tt class="py-number">59</tt><tt class="py-op">:</tt> </tt>
+<a name="L277"></a><tt class="py-lineno"> 277</tt>  <tt class="py-line">        <tt class="py-name">minutes</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L278"></a><tt class="py-lineno"> 278</tt>  <tt class="py-line">        <tt class="py-name">hours</tt> <tt class="py-op">=</tt> <tt class="py-name">hours</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> </tt>
+<a name="L279"></a><tt class="py-lineno"> 279</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">hours</tt> <tt class="py-op">></tt> <tt class="py-number">23</tt><tt class="py-op">:</tt> </tt>
+<a name="L280"></a><tt class="py-lineno"> 280</tt>  <tt class="py-line">        <tt class="py-name">hours</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L281"></a><tt class="py-lineno"> 281</tt>  <tt class="py-line">        <tt class="py-name">days</tt> <tt class="py-op">=</tt> <tt class="py-name">days</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> </tt>
+<a name="L282"></a><tt class="py-lineno"> 282</tt>  <tt class="py-line">     </tt>
+<a name="L283"></a><tt class="py-lineno"> 283</tt>  <tt class="py-line">    <tt class="py-comment"># return a 'real' datetime instance if calendar is gregorian.</tt> </tt>
+<a name="L284"></a><tt class="py-lineno"> 284</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">calendar</tt> <tt class="py-op">==</tt> <tt class="py-string">'proleptic_gregorian'</tt> <tt class="py-keyword">or</tt> \ </tt>
+<a name="L285"></a><tt class="py-lineno"> 285</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">calendar</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'standard'</tt><tt class="py-op">,</tt><tt class="py-string">'gregorian'</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-name">JD</tt> <tt class="py-op">>=</tt> <tt class="py-number">2299160.5</tt><tt class="py-op">)</tt><tt class="py-op">:</t [...]
+<a name="L286"></a><tt class="py-lineno"> 286</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">real_datetime</tt><tt class="py-op">(</tt><tt class="py-name">year</tt><tt class="py-op">,</tt><tt class="py-name">month</tt><tt class="py-op">,</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">days</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">hours</ [...]
+<a name="L287"></a><tt class="py-lineno"> 287</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L288"></a><tt class="py-lineno"> 288</tt>  <tt class="py-line">    <tt class="py-comment"># or else, return a 'datetime-like' instance.</tt> </tt>
+<a name="L289"></a><tt class="py-lineno"> 289</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-8" class="py-name"><a title="netcdftime.netcdftime.datetime" class="py-name" href="#" onclick="return doclink('link-8', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">(</tt><tt class="py-name">year</tt><tt class="py-op">,</tt><tt class="py-name">month</tt><tt class="py-op">,</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name"> [...]
+</div><a name="L290"></a><tt class="py-lineno"> 290</tt>  <tt class="py-line"> </tt>
+<a name="_DateFromNoLeapDay"></a><div id="_DateFromNoLeapDay-def"><a name="L291"></a><tt class="py-lineno"> 291</tt> <a class="py-toggle" href="#" id="_DateFromNoLeapDay-toggle" onclick="return toggle('_DateFromNoLeapDay');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#_DateFromNoLeapDay">_DateFromNoLeapDay</a><tt class="py-op">(</tt><tt class="py-param">JD</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_DateFromNoLeapDay-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_DateFromNoLeapDay-expanded"><a name="L292"></a><tt class="py-lineno"> 292</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L293"></a><tt class="py-lineno"> 293</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L294"></a><tt class="py-lineno"> 294</tt>  <tt class="py-line"><tt class="py-docstring">returns a 'datetime-like' object given Julian Day for a calendar with no leap </tt> </tt>
+<a name="L295"></a><tt class="py-lineno"> 295</tt>  <tt class="py-line"><tt class="py-docstring">days. Julian Day is a fractional day with a resolution of 1 second.</tt> </tt>
+<a name="L296"></a><tt class="py-lineno"> 296</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L297"></a><tt class="py-lineno"> 297</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L298"></a><tt class="py-lineno"> 298</tt>  <tt class="py-line"> </tt>
+<a name="L299"></a><tt class="py-lineno"> 299</tt>  <tt class="py-line">    <tt class="py-comment"># based on redate.py by David Finlayson.</tt> </tt>
+<a name="L300"></a><tt class="py-lineno"> 300</tt>  <tt class="py-line">     </tt>
+<a name="L301"></a><tt class="py-lineno"> 301</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">JD</tt> <tt class="py-op"><</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
+<a name="L302"></a><tt class="py-lineno"> 302</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">'Julian Day must be positive'</tt> </tt>
+<a name="L303"></a><tt class="py-lineno"> 303</tt>  <tt class="py-line"> </tt>
+<a name="L304"></a><tt class="py-lineno"> 304</tt>  <tt class="py-line">    <tt class="py-name">dayofwk</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">fmod</tt><tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">JD</tt> <tt class="py-op">+</tt> <tt class="py-number">1.5</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-num [...]
+<a name="L305"></a><tt class="py-lineno"> 305</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">F</tt><tt class="py-op">,</tt> <tt class="py-name">Z</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">JD</tt> <tt class="py-op">+</tt> <tt class="py-number">0.5</tt><tt class="py-op">)</tt> </tt>
+<a name="L306"></a><tt class="py-lineno"> 306</tt>  <tt class="py-line">    <tt class="py-name">Z</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">Z</tt><tt class="py-op">)</tt> </tt>
+<a name="L307"></a><tt class="py-lineno"> 307</tt>  <tt class="py-line">    <tt class="py-name">A</tt> <tt class="py-op">=</tt> <tt class="py-name">Z</tt> </tt>
+<a name="L308"></a><tt class="py-lineno"> 308</tt>  <tt class="py-line">    <tt class="py-name">B</tt> <tt class="py-op">=</tt> <tt class="py-name">A</tt> <tt class="py-op">+</tt> <tt class="py-number">1524</tt> </tt>
+<a name="L309"></a><tt class="py-lineno"> 309</tt>  <tt class="py-line">    <tt class="py-name">C</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">B</tt> <tt class="py-op">-</tt> <tt class="py-number">122.1</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-number">365.</tt><tt class="py-op">)</tt> </tt>
+<a name="L310"></a><tt class="py-lineno"> 310</tt>  <tt class="py-line">    <tt class="py-name">D</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-number">365.</tt> <tt class="py-op">*</tt> <tt class="py-name">C</tt><tt class="py-op">)</tt> </tt>
+<a name="L311"></a><tt class="py-lineno"> 311</tt>  <tt class="py-line">    <tt class="py-name">E</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">B</tt> <tt class="py-op">-</tt> <tt class="py-name">D</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-number">30.6001</tt><tt class="py-op">)</tt> </tt>
+<a name="L312"></a><tt class="py-lineno"> 312</tt>  <tt class="py-line"> </tt>
+<a name="L313"></a><tt class="py-lineno"> 313</tt>  <tt class="py-line">    <tt class="py-comment"># Convert to date</tt> </tt>
+<a name="L314"></a><tt class="py-lineno"> 314</tt>  <tt class="py-line">    <tt class="py-name">day</tt> <tt class="py-op">=</tt> <tt class="py-name">B</tt> <tt class="py-op">-</tt> <tt class="py-name">D</tt> <tt class="py-op">-</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-number">30.6001</tt> <tt class="py-op">*</tt> <tt class="py-name">E</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">F</tt> </tt>
+<a name="L315"></a><tt class="py-lineno"> 315</tt>  <tt class="py-line">    <tt class="py-name">nday</tt> <tt class="py-op">=</tt> <tt class="py-name">B</tt><tt class="py-op">-</tt><tt class="py-name">D</tt><tt class="py-op">-</tt><tt class="py-number">123</tt> </tt>
+<a name="L316"></a><tt class="py-lineno"> 316</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">nday</tt> <tt class="py-op"><=</tt> <tt class="py-number">305</tt><tt class="py-op">:</tt> </tt>
+<a name="L317"></a><tt class="py-lineno"> 317</tt>  <tt class="py-line">        <tt class="py-name">dayofyr</tt> <tt class="py-op">=</tt> <tt class="py-name">nday</tt><tt class="py-op">+</tt><tt class="py-number">60</tt> </tt>
+<a name="L318"></a><tt class="py-lineno"> 318</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L319"></a><tt class="py-lineno"> 319</tt>  <tt class="py-line">        <tt class="py-name">dayofyr</tt> <tt class="py-op">=</tt> <tt class="py-name">nday</tt><tt class="py-op">-</tt><tt class="py-number">305</tt> </tt>
+<a name="L320"></a><tt class="py-lineno"> 320</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">E</tt> <tt class="py-op"><</tt> <tt class="py-number">14</tt><tt class="py-op">:</tt> </tt>
+<a name="L321"></a><tt class="py-lineno"> 321</tt>  <tt class="py-line">        <tt class="py-name">month</tt> <tt class="py-op">=</tt> <tt class="py-name">E</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt> </tt>
+<a name="L322"></a><tt class="py-lineno"> 322</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L323"></a><tt class="py-lineno"> 323</tt>  <tt class="py-line">        <tt class="py-name">month</tt> <tt class="py-op">=</tt> <tt class="py-name">E</tt> <tt class="py-op">-</tt> <tt class="py-number">13</tt> </tt>
+<a name="L324"></a><tt class="py-lineno"> 324</tt>  <tt class="py-line"> </tt>
+<a name="L325"></a><tt class="py-lineno"> 325</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">month</tt> <tt class="py-op">></tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
+<a name="L326"></a><tt class="py-lineno"> 326</tt>  <tt class="py-line">        <tt class="py-name">year</tt> <tt class="py-op">=</tt> <tt class="py-name">C</tt> <tt class="py-op">-</tt> <tt class="py-number">4716</tt> </tt>
+<a name="L327"></a><tt class="py-lineno"> 327</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L328"></a><tt class="py-lineno"> 328</tt>  <tt class="py-line">        <tt class="py-name">year</tt> <tt class="py-op">=</tt> <tt class="py-name">C</tt> <tt class="py-op">-</tt> <tt class="py-number">4715</tt> </tt>
+<a name="L329"></a><tt class="py-lineno"> 329</tt>  <tt class="py-line">     </tt>
+<a name="L330"></a><tt class="py-lineno"> 330</tt>  <tt class="py-line">    <tt class="py-comment"># Convert fractions of a day to time    </tt> </tt>
+<a name="L331"></a><tt class="py-lineno"> 331</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">dfrac</tt><tt class="py-op">,</tt> <tt class="py-name">days</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">day</tt><tt class="py-op">/</tt><tt class="py-number">1.0</tt><tt class="py-op">)</tt> </tt>
+<a name="L332"></a><tt class="py-lineno"> 332</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">hfrac</tt><tt class="py-op">,</tt> <tt class="py-name">hours</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">dfrac</tt> <tt class="py-op">*</tt> <tt class="py-number">24.0</tt><tt class="py-op">)</tt> </tt>
+<a name="L333"></a><tt class="py-lineno"> 333</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">mfrac</tt><tt class="py-op">,</tt> <tt class="py-name">minutes</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">hfrac</tt> <tt class="py-op">*</tt> <tt class="py-number">60.0</tt><tt class="py-op">)</tt> </tt>
+<a name="L334"></a><tt class="py-lineno"> 334</tt>  <tt class="py-line">    <tt class="py-name">seconds</tt> <tt class="py-op">=</tt> <tt class="py-name">round</tt><tt class="py-op">(</tt><tt class="py-name">mfrac</tt> <tt class="py-op">*</tt> <tt class="py-number">60.0</tt><tt class="py-op">)</tt> <tt class="py-comment"># seconds are rounded</tt> </tt>
+<a name="L335"></a><tt class="py-lineno"> 335</tt>  <tt class="py-line">     </tt>
+<a name="L336"></a><tt class="py-lineno"> 336</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">seconds</tt> <tt class="py-op">></tt> <tt class="py-number">59</tt><tt class="py-op">:</tt> </tt>
+<a name="L337"></a><tt class="py-lineno"> 337</tt>  <tt class="py-line">        <tt class="py-name">seconds</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L338"></a><tt class="py-lineno"> 338</tt>  <tt class="py-line">        <tt class="py-name">minutes</tt> <tt class="py-op">=</tt> <tt class="py-name">minutes</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> </tt>
+<a name="L339"></a><tt class="py-lineno"> 339</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">minutes</tt> <tt class="py-op">></tt> <tt class="py-number">59</tt><tt class="py-op">:</tt> </tt>
+<a name="L340"></a><tt class="py-lineno"> 340</tt>  <tt class="py-line">        <tt class="py-name">minutes</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L341"></a><tt class="py-lineno"> 341</tt>  <tt class="py-line">        <tt class="py-name">hours</tt> <tt class="py-op">=</tt> <tt class="py-name">hours</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> </tt>
+<a name="L342"></a><tt class="py-lineno"> 342</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">hours</tt> <tt class="py-op">></tt> <tt class="py-number">23</tt><tt class="py-op">:</tt> </tt>
+<a name="L343"></a><tt class="py-lineno"> 343</tt>  <tt class="py-line">        <tt class="py-name">hours</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L344"></a><tt class="py-lineno"> 344</tt>  <tt class="py-line">        <tt class="py-name">days</tt> <tt class="py-op">=</tt> <tt class="py-name">days</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> </tt>
+<a name="L345"></a><tt class="py-lineno"> 345</tt>  <tt class="py-line">     </tt>
+<a name="L346"></a><tt class="py-lineno"> 346</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-9" class="py-name"><a title="netcdftime.netcdftime.datetime" class="py-name" href="#" onclick="return doclink('link-9', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">(</tt><tt class="py-name">year</tt><tt class="py-op">,</tt><tt class="py-name">month</tt><tt class="py-op">,</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">days [...]
+</div><a name="L347"></a><tt class="py-lineno"> 347</tt>  <tt class="py-line"> </tt>
+<a name="_DateFromAllLeap"></a><div id="_DateFromAllLeap-def"><a name="L348"></a><tt class="py-lineno"> 348</tt> <a class="py-toggle" href="#" id="_DateFromAllLeap-toggle" onclick="return toggle('_DateFromAllLeap');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#_DateFromAllLeap">_DateFromAllLeap</a><tt class="py-op">(</tt><tt class="py-param">JD</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_DateFromAllLeap-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_DateFromAllLeap-expanded"><a name="L349"></a><tt class="py-lineno"> 349</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L350"></a><tt class="py-lineno"> 350</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L351"></a><tt class="py-lineno"> 351</tt>  <tt class="py-line"><tt class="py-docstring">returns a 'datetime-like' object given Julian Day for a calendar where all</tt> </tt>
+<a name="L352"></a><tt class="py-lineno"> 352</tt>  <tt class="py-line"><tt class="py-docstring">years have 366 days.</tt> </tt>
+<a name="L353"></a><tt class="py-lineno"> 353</tt>  <tt class="py-line"><tt class="py-docstring">Julian Day is a fractional day with a resolution of 1 second.</tt> </tt>
+<a name="L354"></a><tt class="py-lineno"> 354</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L355"></a><tt class="py-lineno"> 355</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L356"></a><tt class="py-lineno"> 356</tt>  <tt class="py-line"> </tt>
+<a name="L357"></a><tt class="py-lineno"> 357</tt>  <tt class="py-line">    <tt class="py-comment"># based on redate.py by David Finlayson.</tt> </tt>
+<a name="L358"></a><tt class="py-lineno"> 358</tt>  <tt class="py-line">     </tt>
+<a name="L359"></a><tt class="py-lineno"> 359</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">JD</tt> <tt class="py-op"><</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
+<a name="L360"></a><tt class="py-lineno"> 360</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">'Julian Day must be positive'</tt> </tt>
+<a name="L361"></a><tt class="py-lineno"> 361</tt>  <tt class="py-line"> </tt>
+<a name="L362"></a><tt class="py-lineno"> 362</tt>  <tt class="py-line">    <tt class="py-name">dayofwk</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">fmod</tt><tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">JD</tt> <tt class="py-op">+</tt> <tt class="py-number">1.5</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-num [...]
+<a name="L363"></a><tt class="py-lineno"> 363</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">F</tt><tt class="py-op">,</tt> <tt class="py-name">Z</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">JD</tt> <tt class="py-op">+</tt> <tt class="py-number">0.5</tt><tt class="py-op">)</tt> </tt>
+<a name="L364"></a><tt class="py-lineno"> 364</tt>  <tt class="py-line">    <tt class="py-name">Z</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">Z</tt><tt class="py-op">)</tt> </tt>
+<a name="L365"></a><tt class="py-lineno"> 365</tt>  <tt class="py-line">    <tt class="py-name">A</tt> <tt class="py-op">=</tt> <tt class="py-name">Z</tt> </tt>
+<a name="L366"></a><tt class="py-lineno"> 366</tt>  <tt class="py-line">    <tt class="py-name">B</tt> <tt class="py-op">=</tt> <tt class="py-name">A</tt> <tt class="py-op">+</tt> <tt class="py-number">1524</tt> </tt>
+<a name="L367"></a><tt class="py-lineno"> 367</tt>  <tt class="py-line">    <tt class="py-name">C</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">B</tt> <tt class="py-op">-</tt> <tt class="py-number">122.1</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-number">366.</tt><tt class="py-op">)</tt> </tt>
+<a name="L368"></a><tt class="py-lineno"> 368</tt>  <tt class="py-line">    <tt class="py-name">D</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-number">366.</tt> <tt class="py-op">*</tt> <tt class="py-name">C</tt><tt class="py-op">)</tt> </tt>
+<a name="L369"></a><tt class="py-lineno"> 369</tt>  <tt class="py-line">    <tt class="py-name">E</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">B</tt> <tt class="py-op">-</tt> <tt class="py-name">D</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-number">30.6001</tt><tt class="py-op">)</tt> </tt>
+<a name="L370"></a><tt class="py-lineno"> 370</tt>  <tt class="py-line"> </tt>
+<a name="L371"></a><tt class="py-lineno"> 371</tt>  <tt class="py-line">    <tt class="py-comment"># Convert to date</tt> </tt>
+<a name="L372"></a><tt class="py-lineno"> 372</tt>  <tt class="py-line">    <tt class="py-name">day</tt> <tt class="py-op">=</tt> <tt class="py-name">B</tt> <tt class="py-op">-</tt> <tt class="py-name">D</tt> <tt class="py-op">-</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-number">30.6001</tt> <tt class="py-op">*</tt> <tt class="py-name">E</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">F</tt> </tt>
+<a name="L373"></a><tt class="py-lineno"> 373</tt>  <tt class="py-line">    <tt class="py-name">nday</tt> <tt class="py-op">=</tt> <tt class="py-name">B</tt><tt class="py-op">-</tt><tt class="py-name">D</tt><tt class="py-op">-</tt><tt class="py-number">123</tt> </tt>
+<a name="L374"></a><tt class="py-lineno"> 374</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">nday</tt> <tt class="py-op"><=</tt> <tt class="py-number">305</tt><tt class="py-op">:</tt> </tt>
+<a name="L375"></a><tt class="py-lineno"> 375</tt>  <tt class="py-line">        <tt class="py-name">dayofyr</tt> <tt class="py-op">=</tt> <tt class="py-name">nday</tt><tt class="py-op">+</tt><tt class="py-number">60</tt> </tt>
+<a name="L376"></a><tt class="py-lineno"> 376</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L377"></a><tt class="py-lineno"> 377</tt>  <tt class="py-line">        <tt class="py-name">dayofyr</tt> <tt class="py-op">=</tt> <tt class="py-name">nday</tt><tt class="py-op">-</tt><tt class="py-number">305</tt> </tt>
+<a name="L378"></a><tt class="py-lineno"> 378</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">E</tt> <tt class="py-op"><</tt> <tt class="py-number">14</tt><tt class="py-op">:</tt> </tt>
+<a name="L379"></a><tt class="py-lineno"> 379</tt>  <tt class="py-line">        <tt class="py-name">month</tt> <tt class="py-op">=</tt> <tt class="py-name">E</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt> </tt>
+<a name="L380"></a><tt class="py-lineno"> 380</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L381"></a><tt class="py-lineno"> 381</tt>  <tt class="py-line">        <tt class="py-name">month</tt> <tt class="py-op">=</tt> <tt class="py-name">E</tt> <tt class="py-op">-</tt> <tt class="py-number">13</tt> </tt>
+<a name="L382"></a><tt class="py-lineno"> 382</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">month</tt> <tt class="py-op">></tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
+<a name="L383"></a><tt class="py-lineno"> 383</tt>  <tt class="py-line">       <tt class="py-name">dayofyr</tt> <tt class="py-op">=</tt> <tt class="py-name">dayofyr</tt><tt class="py-op">+</tt><tt class="py-number">1</tt> </tt>
+<a name="L384"></a><tt class="py-lineno"> 384</tt>  <tt class="py-line"> </tt>
+<a name="L385"></a><tt class="py-lineno"> 385</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">month</tt> <tt class="py-op">></tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
+<a name="L386"></a><tt class="py-lineno"> 386</tt>  <tt class="py-line">        <tt class="py-name">year</tt> <tt class="py-op">=</tt> <tt class="py-name">C</tt> <tt class="py-op">-</tt> <tt class="py-number">4716</tt> </tt>
+<a name="L387"></a><tt class="py-lineno"> 387</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L388"></a><tt class="py-lineno"> 388</tt>  <tt class="py-line">        <tt class="py-name">year</tt> <tt class="py-op">=</tt> <tt class="py-name">C</tt> <tt class="py-op">-</tt> <tt class="py-number">4715</tt> </tt>
+<a name="L389"></a><tt class="py-lineno"> 389</tt>  <tt class="py-line">     </tt>
+<a name="L390"></a><tt class="py-lineno"> 390</tt>  <tt class="py-line">    <tt class="py-comment"># Convert fractions of a day to time    </tt> </tt>
+<a name="L391"></a><tt class="py-lineno"> 391</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">dfrac</tt><tt class="py-op">,</tt> <tt class="py-name">days</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">day</tt><tt class="py-op">/</tt><tt class="py-number">1.0</tt><tt class="py-op">)</tt> </tt>
+<a name="L392"></a><tt class="py-lineno"> 392</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">hfrac</tt><tt class="py-op">,</tt> <tt class="py-name">hours</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">dfrac</tt> <tt class="py-op">*</tt> <tt class="py-number">24.0</tt><tt class="py-op">)</tt> </tt>
+<a name="L393"></a><tt class="py-lineno"> 393</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">mfrac</tt><tt class="py-op">,</tt> <tt class="py-name">minutes</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">hfrac</tt> <tt class="py-op">*</tt> <tt class="py-number">60.0</tt><tt class="py-op">)</tt> </tt>
+<a name="L394"></a><tt class="py-lineno"> 394</tt>  <tt class="py-line">    <tt class="py-name">seconds</tt> <tt class="py-op">=</tt> <tt class="py-name">round</tt><tt class="py-op">(</tt><tt class="py-name">mfrac</tt> <tt class="py-op">*</tt> <tt class="py-number">60.0</tt><tt class="py-op">)</tt> <tt class="py-comment"># seconds are rounded</tt> </tt>
+<a name="L395"></a><tt class="py-lineno"> 395</tt>  <tt class="py-line">     </tt>
+<a name="L396"></a><tt class="py-lineno"> 396</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">seconds</tt> <tt class="py-op">></tt> <tt class="py-number">59</tt><tt class="py-op">:</tt> </tt>
+<a name="L397"></a><tt class="py-lineno"> 397</tt>  <tt class="py-line">        <tt class="py-name">seconds</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L398"></a><tt class="py-lineno"> 398</tt>  <tt class="py-line">        <tt class="py-name">minutes</tt> <tt class="py-op">=</tt> <tt class="py-name">minutes</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> </tt>
+<a name="L399"></a><tt class="py-lineno"> 399</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">minutes</tt> <tt class="py-op">></tt> <tt class="py-number">59</tt><tt class="py-op">:</tt> </tt>
+<a name="L400"></a><tt class="py-lineno"> 400</tt>  <tt class="py-line">        <tt class="py-name">minutes</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L401"></a><tt class="py-lineno"> 401</tt>  <tt class="py-line">        <tt class="py-name">hours</tt> <tt class="py-op">=</tt> <tt class="py-name">hours</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> </tt>
+<a name="L402"></a><tt class="py-lineno"> 402</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">hours</tt> <tt class="py-op">></tt> <tt class="py-number">23</tt><tt class="py-op">:</tt> </tt>
+<a name="L403"></a><tt class="py-lineno"> 403</tt>  <tt class="py-line">        <tt class="py-name">hours</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L404"></a><tt class="py-lineno"> 404</tt>  <tt class="py-line">        <tt class="py-name">days</tt> <tt class="py-op">=</tt> <tt class="py-name">days</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> </tt>
+<a name="L405"></a><tt class="py-lineno"> 405</tt>  <tt class="py-line">     </tt>
+<a name="L406"></a><tt class="py-lineno"> 406</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-10" class="py-name"><a title="netcdftime.netcdftime.datetime" class="py-name" href="#" onclick="return doclink('link-10', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">(</tt><tt class="py-name">year</tt><tt class="py-op">,</tt><tt class="py-name">month</tt><tt class="py-op">,</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">da [...]
+</div><a name="L407"></a><tt class="py-lineno"> 407</tt>  <tt class="py-line"> </tt>
+<a name="_DateFrom360Day"></a><div id="_DateFrom360Day-def"><a name="L408"></a><tt class="py-lineno"> 408</tt> <a class="py-toggle" href="#" id="_DateFrom360Day-toggle" onclick="return toggle('_DateFrom360Day');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#_DateFrom360Day">_DateFrom360Day</a><tt class="py-op">(</tt><tt class="py-param">JD</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_DateFrom360Day-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_DateFrom360Day-expanded"><a name="L409"></a><tt class="py-lineno"> 409</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L410"></a><tt class="py-lineno"> 410</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L411"></a><tt class="py-lineno"> 411</tt>  <tt class="py-line"><tt class="py-docstring">returns a 'datetime-like' object given Julian Day for a calendar where all</tt> </tt>
+<a name="L412"></a><tt class="py-lineno"> 412</tt>  <tt class="py-line"><tt class="py-docstring">months have 30 days.</tt> </tt>
+<a name="L413"></a><tt class="py-lineno"> 413</tt>  <tt class="py-line"><tt class="py-docstring">Julian Day is a fractional day with a resolution of 1 second.</tt> </tt>
+<a name="L414"></a><tt class="py-lineno"> 414</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L415"></a><tt class="py-lineno"> 415</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L416"></a><tt class="py-lineno"> 416</tt>  <tt class="py-line"> </tt>
+<a name="L417"></a><tt class="py-lineno"> 417</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">JD</tt> <tt class="py-op"><</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
+<a name="L418"></a><tt class="py-lineno"> 418</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">'Julian Day must be positive'</tt> </tt>
+<a name="L419"></a><tt class="py-lineno"> 419</tt>  <tt class="py-line"> </tt>
+<a name="L420"></a><tt class="py-lineno"> 420</tt>  <tt class="py-line">    <tt class="py-comment">#jd = int(360. * (year + 4716)) + int(30. * (month - 1)) + day</tt> </tt>
+<a name="L421"></a><tt class="py-lineno"> 421</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">F</tt><tt class="py-op">,</tt> <tt class="py-name">Z</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">JD</tt><tt class="py-op">)</tt> </tt>
+<a name="L422"></a><tt class="py-lineno"> 422</tt>  <tt class="py-line">    <tt class="py-name">year</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">Z</tt><tt class="py-op">-</tt><tt class="py-number">0.5</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-number">360.</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-number">4716</tt> </tt>
+<a name="L423"></a><tt class="py-lineno"> 423</tt>  <tt class="py-line">    <tt class="py-name">dayofyr</tt> <tt class="py-op">=</tt>  <tt class="py-name">Z</tt> <tt class="py-op">-</tt> <tt class="py-op">(</tt><tt class="py-name">year</tt><tt class="py-op">+</tt><tt class="py-number">4716</tt><tt class="py-op">)</tt><tt class="py-op">*</tt><tt class="py-number">360</tt>   </tt>
+<a name="L424"></a><tt class="py-lineno"> 424</tt>  <tt class="py-line">    <tt class="py-name">month</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">dayofyr</tt><tt class="py-op">-</tt><tt class="py-number">0.5</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-number">30</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-number">1</tt> </tt>
+<a name="L425"></a><tt class="py-lineno"> 425</tt>  <tt class="py-line">    <tt class="py-name">day</tt> <tt class="py-op">=</tt> <tt class="py-name">dayofyr</tt> <tt class="py-op">-</tt> <tt class="py-op">(</tt><tt class="py-name">month</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">*</tt><tt class="py-number">30</tt> <tt class="py-op">+</tt> <tt class="py-name">F</tt>   </tt>
+<a name="L426"></a><tt class="py-lineno"> 426</tt>  <tt class="py-line">     </tt>
+<a name="L427"></a><tt class="py-lineno"> 427</tt>  <tt class="py-line">    <tt class="py-comment"># Convert fractions of a day to time    </tt> </tt>
+<a name="L428"></a><tt class="py-lineno"> 428</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">dfrac</tt><tt class="py-op">,</tt> <tt class="py-name">days</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">day</tt><tt class="py-op">/</tt><tt class="py-number">1.0</tt><tt class="py-op">)</tt> </tt>
+<a name="L429"></a><tt class="py-lineno"> 429</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">hfrac</tt><tt class="py-op">,</tt> <tt class="py-name">hours</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">dfrac</tt> <tt class="py-op">*</tt> <tt class="py-number">24.0</tt><tt class="py-op">)</tt> </tt>
+<a name="L430"></a><tt class="py-lineno"> 430</tt>  <tt class="py-line">    <tt class="py-op">(</tt><tt class="py-name">mfrac</tt><tt class="py-op">,</tt> <tt class="py-name">minutes</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">modf</tt><tt class="py-op">(</tt><tt class="py-name">hfrac</tt> <tt class="py-op">*</tt> <tt class="py-number">60.0</tt><tt class="py-op">)</tt> </tt>
+<a name="L431"></a><tt class="py-lineno"> 431</tt>  <tt class="py-line">    <tt class="py-name">seconds</tt> <tt class="py-op">=</tt> <tt class="py-name">round</tt><tt class="py-op">(</tt><tt class="py-name">mfrac</tt> <tt class="py-op">*</tt> <tt class="py-number">60.0</tt><tt class="py-op">)</tt> <tt class="py-comment"># seconds are rounded</tt> </tt>
+<a name="L432"></a><tt class="py-lineno"> 432</tt>  <tt class="py-line">     </tt>
+<a name="L433"></a><tt class="py-lineno"> 433</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">seconds</tt> <tt class="py-op">></tt> <tt class="py-number">59</tt><tt class="py-op">:</tt> </tt>
+<a name="L434"></a><tt class="py-lineno"> 434</tt>  <tt class="py-line">        <tt class="py-name">seconds</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L435"></a><tt class="py-lineno"> 435</tt>  <tt class="py-line">        <tt class="py-name">minutes</tt> <tt class="py-op">=</tt> <tt class="py-name">minutes</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> </tt>
+<a name="L436"></a><tt class="py-lineno"> 436</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">minutes</tt> <tt class="py-op">></tt> <tt class="py-number">59</tt><tt class="py-op">:</tt> </tt>
+<a name="L437"></a><tt class="py-lineno"> 437</tt>  <tt class="py-line">        <tt class="py-name">minutes</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L438"></a><tt class="py-lineno"> 438</tt>  <tt class="py-line">        <tt class="py-name">hours</tt> <tt class="py-op">=</tt> <tt class="py-name">hours</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> </tt>
+<a name="L439"></a><tt class="py-lineno"> 439</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">hours</tt> <tt class="py-op">></tt> <tt class="py-number">23</tt><tt class="py-op">:</tt> </tt>
+<a name="L440"></a><tt class="py-lineno"> 440</tt>  <tt class="py-line">        <tt class="py-name">hours</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L441"></a><tt class="py-lineno"> 441</tt>  <tt class="py-line">        <tt class="py-name">days</tt> <tt class="py-op">=</tt> <tt class="py-name">days</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> </tt>
+<a name="L442"></a><tt class="py-lineno"> 442</tt>  <tt class="py-line">     </tt>
+<a name="L443"></a><tt class="py-lineno"> 443</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-11" class="py-name"><a title="netcdftime.netcdftime.datetime" class="py-name" href="#" onclick="return doclink('link-11', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">(</tt><tt class="py-name">year</tt><tt class="py-op">,</tt><tt class="py-name">month</tt><tt class="py-op">,</tt><tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">da [...]
+</div><a name="L444"></a><tt class="py-lineno"> 444</tt>  <tt class="py-line"> </tt>
+<a name="_dateparse"></a><div id="_dateparse-def"><a name="L445"></a><tt class="py-lineno"> 445</tt> <a class="py-toggle" href="#" id="_dateparse-toggle" onclick="return toggle('_dateparse');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#_dateparse">_dateparse</a><tt class="py-op">(</tt><tt class="py-param">timestr</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_dateparse-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_dateparse-expanded"><a name="L446"></a><tt class="py-lineno"> 446</tt>  <tt class="py-line">    <tt class="py-docstring">"""parse a string of the form time-units since yyyy-mm-dd hh:mm:ss</tt> </tt>
+<a name="L447"></a><tt class="py-lineno"> 447</tt>  <tt class="py-line"><tt class="py-docstring">    return a tuple (units, datetimeinstance)"""</tt> </tt>
+<a name="L448"></a><tt class="py-lineno"> 448</tt>  <tt class="py-line">    <tt class="py-name">timestr_split</tt> <tt class="py-op">=</tt> <tt class="py-name">timestr</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L449"></a><tt class="py-lineno"> 449</tt>  <tt class="py-line">    <tt class="py-name">units</tt> <tt class="py-op">=</tt> <tt class="py-name">timestr_split</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L450"></a><tt class="py-lineno"> 450</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">units</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt id="link-12" class="py-name"><a title="netcdftime.netcdftime._units" class="py-name" href="#" onclick="return doclink('link-12', '_units', 'link-3');">_units</a></tt><tt class="py-op">:</tt> </tt>
+<a name="L451"></a><tt class="py-lineno"> 451</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt><tt class="py-string">"units must be one of 'seconds', 'minutes', 'hours' or 'days' (or singular version of these), got '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-name">units</tt> </tt>
+<a name="L452"></a><tt class="py-lineno"> 452</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">timestr_split</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-string">'since'</tt><tt class="py-op">:</tt> </tt>
+<a name="L453"></a><tt class="py-lineno"> 453</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt><tt class="py-string">"no 'since' in unit_string"</tt> </tt>
+<a name="L454"></a><tt class="py-lineno"> 454</tt>  <tt class="py-line">    <tt class="py-comment"># parse the date string.</tt> </tt>
+<a name="L455"></a><tt class="py-lineno"> 455</tt>  <tt class="py-line">    <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-name">timestr</tt><tt class="py-op">.</tt><tt class="py-name">find</tt><tt class="py-op">(</tt><tt class="py-string">'since'</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-number">6</tt> </tt>
+<a name="L456"></a><tt class="py-lineno"> 456</tt>  <tt class="py-line">    <tt class="py-name">year</tt><tt class="py-op">,</tt><tt class="py-name">month</tt><tt class="py-op">,</tt><tt class="py-name">day</tt><tt class="py-op">,</tt><tt class="py-name">hour</tt><tt class="py-op">,</tt><tt class="py-name">minute</tt><tt class="py-op">,</tt><tt class="py-name">second</tt><tt class="py-op">,</tt><tt class="py-name">utc_offset</tt> <tt class="py-op">=</tt> <tt class="py-name">_parse_date</ [...]
+<a name="L457"></a><tt class="py-lineno"> 457</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">units</tt><tt class="py-op">,</tt> <tt class="py-name">utc_offset</tt><tt class="py-op">,</tt> <tt id="link-13" class="py-name"><a title="netcdftime.netcdftime.datetime" class="py-name" href="#" onclick="return doclink('link-13', 'datetime', 'link-0');">datetime</a></tt><tt class="py-op">(</tt><tt class="py-name">year</tt><tt class="py-op">,</tt> <tt class="p [...]
+</div><a name="L458"></a><tt class="py-lineno"> 458</tt>  <tt class="py-line"> </tt>
+<a name="utime"></a><div id="utime-def"><a name="L459"></a><tt class="py-lineno"> 459</tt> <a class="py-toggle" href="#" id="utime-toggle" onclick="return toggle('utime');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="netcdftime.netcdftime.utime-class.html">utime</a><tt class="py-op">:</tt> </tt>
+</div><div id="utime-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="utime-expanded"><a name="L460"></a><tt class="py-lineno"> 460</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L461"></a><tt class="py-lineno"> 461</tt>  <tt class="py-line"><tt class="py-docstring">Performs conversions of netCDF time coordinate</tt> </tt>
+<a name="L462"></a><tt class="py-lineno"> 462</tt>  <tt class="py-line"><tt class="py-docstring">data to/from datetime objects.</tt> </tt>
+<a name="L463"></a><tt class="py-lineno"> 463</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L464"></a><tt class="py-lineno"> 464</tt>  <tt class="py-line"><tt class="py-docstring">To initialize: C{t = utime(unit_string,calendar='standard')}</tt> </tt>
+<a name="L465"></a><tt class="py-lineno"> 465</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L466"></a><tt class="py-lineno"> 466</tt>  <tt class="py-line"><tt class="py-docstring">where </tt> </tt>
+<a name="L467"></a><tt class="py-lineno"> 467</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L468"></a><tt class="py-lineno"> 468</tt>  <tt class="py-line"><tt class="py-docstring">B{C{unit_string}} is a string of the form</tt> </tt>
+<a name="L469"></a><tt class="py-lineno"> 469</tt>  <tt class="py-line"><tt class="py-docstring">C{'time-units since <time-origin>'} defining the time units.</tt> </tt>
+<a name="L470"></a><tt class="py-lineno"> 470</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L471"></a><tt class="py-lineno"> 471</tt>  <tt class="py-line"><tt class="py-docstring">Valid time-units are days, hours, minutes and seconds (the singular forms </tt> </tt>
+<a name="L472"></a><tt class="py-lineno"> 472</tt>  <tt class="py-line"><tt class="py-docstring">are also accepted). An example unit_string would be C{'hours </tt> </tt>
+<a name="L473"></a><tt class="py-lineno"> 473</tt>  <tt class="py-line"><tt class="py-docstring">since 0001-01-01 00:00:00'}.</tt> </tt>
+<a name="L474"></a><tt class="py-lineno"> 474</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L475"></a><tt class="py-lineno"> 475</tt>  <tt class="py-line"><tt class="py-docstring">The B{C{calendar}} keyword describes the calendar used in the time calculations. </tt> </tt>
+<a name="L476"></a><tt class="py-lineno"> 476</tt>  <tt class="py-line"><tt class="py-docstring">All the values currently defined in the U{CF metadata convention </tt> </tt>
+<a name="L477"></a><tt class="py-lineno"> 477</tt>  <tt class="py-line"><tt class="py-docstring"><http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.1/cf-conventions.html#time-coordinate>}  </tt> </tt>
+<a name="L478"></a><tt class="py-lineno"> 478</tt>  <tt class="py-line"><tt class="py-docstring">are accepted. The default is C{'standard'}, which corresponds to the mixed </tt> </tt>
+<a name="L479"></a><tt class="py-lineno"> 479</tt>  <tt class="py-line"><tt class="py-docstring">Gregorian/Julian calendar used by the C{udunits library}. Valid calendars </tt> </tt>
+<a name="L480"></a><tt class="py-lineno"> 480</tt>  <tt class="py-line"><tt class="py-docstring">are:</tt> </tt>
+<a name="L481"></a><tt class="py-lineno"> 481</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L482"></a><tt class="py-lineno"> 482</tt>  <tt class="py-line"><tt class="py-docstring">C{'gregorian'} or C{'standard'} (default):</tt> </tt>
+<a name="L483"></a><tt class="py-lineno"> 483</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L484"></a><tt class="py-lineno"> 484</tt>  <tt class="py-line"><tt class="py-docstring">Mixed Gregorian/Julian calendar as defined by udunits.</tt> </tt>
+<a name="L485"></a><tt class="py-lineno"> 485</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L486"></a><tt class="py-lineno"> 486</tt>  <tt class="py-line"><tt class="py-docstring">C{'proleptic_gregorian'}:</tt> </tt>
+<a name="L487"></a><tt class="py-lineno"> 487</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L488"></a><tt class="py-lineno"> 488</tt>  <tt class="py-line"><tt class="py-docstring">A Gregorian calendar extended to dates before 1582-10-15. That is, a year </tt> </tt>
+<a name="L489"></a><tt class="py-lineno"> 489</tt>  <tt class="py-line"><tt class="py-docstring">is a leap year if either (i) it is divisible by 4 but not by 100 or (ii) </tt> </tt>
+<a name="L490"></a><tt class="py-lineno"> 490</tt>  <tt class="py-line"><tt class="py-docstring">it is divisible by 400.</tt> </tt>
+<a name="L491"></a><tt class="py-lineno"> 491</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L492"></a><tt class="py-lineno"> 492</tt>  <tt class="py-line"><tt class="py-docstring">C{'noleap'} or C{'365_day'}:</tt> </tt>
+<a name="L493"></a><tt class="py-lineno"> 493</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L494"></a><tt class="py-lineno"> 494</tt>  <tt class="py-line"><tt class="py-docstring">Gregorian calendar without leap years, i.e., all years are 365 days long. </tt> </tt>
+<a name="L495"></a><tt class="py-lineno"> 495</tt>  <tt class="py-line"><tt class="py-docstring">all_leap or 366_day Gregorian calendar with every year being a leap year, </tt> </tt>
+<a name="L496"></a><tt class="py-lineno"> 496</tt>  <tt class="py-line"><tt class="py-docstring">i.e., all years are 366 days long.</tt> </tt>
+<a name="L497"></a><tt class="py-lineno"> 497</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L498"></a><tt class="py-lineno"> 498</tt>  <tt class="py-line"><tt class="py-docstring">C{'360_day'}:</tt> </tt>
+<a name="L499"></a><tt class="py-lineno"> 499</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L500"></a><tt class="py-lineno"> 500</tt>  <tt class="py-line"><tt class="py-docstring">All years are 360 days divided into 30 day months. </tt> </tt>
+<a name="L501"></a><tt class="py-lineno"> 501</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L502"></a><tt class="py-lineno"> 502</tt>  <tt class="py-line"><tt class="py-docstring">C{'julian'}:</tt> </tt>
+<a name="L503"></a><tt class="py-lineno"> 503</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L504"></a><tt class="py-lineno"> 504</tt>  <tt class="py-line"><tt class="py-docstring">Proleptic Julian calendar, extended to dates after 1582-10-5. A year is a </tt> </tt>
+<a name="L505"></a><tt class="py-lineno"> 505</tt>  <tt class="py-line"><tt class="py-docstring">leap year if it is divisible by 4.</tt> </tt>
+<a name="L506"></a><tt class="py-lineno"> 506</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L507"></a><tt class="py-lineno"> 507</tt>  <tt class="py-line"><tt class="py-docstring">The C{L{num2date}} and C{L{date2num}} class methods can used to convert datetime </tt> </tt>
+<a name="L508"></a><tt class="py-lineno"> 508</tt>  <tt class="py-line"><tt class="py-docstring">instances to/from the specified time units using the specified calendar.</tt> </tt>
+<a name="L509"></a><tt class="py-lineno"> 509</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L510"></a><tt class="py-lineno"> 510</tt>  <tt class="py-line"><tt class="py-docstring">The datetime instances returned by C{num2date} are 'real' python datetime </tt> </tt>
+<a name="L511"></a><tt class="py-lineno"> 511</tt>  <tt class="py-line"><tt class="py-docstring">objects if the date falls in the Gregorian calendar (i.e. </tt> </tt>
+<a name="L512"></a><tt class="py-lineno"> 512</tt>  <tt class="py-line"><tt class="py-docstring">C{calendar='proleptic_gregorian', 'standard'} or C{'gregorian'} and </tt> </tt>
+<a name="L513"></a><tt class="py-lineno"> 513</tt>  <tt class="py-line"><tt class="py-docstring">the date is after 1582-10-15). Otherwise, they are 'phony' datetime </tt> </tt>
+<a name="L514"></a><tt class="py-lineno"> 514</tt>  <tt class="py-line"><tt class="py-docstring">objects which are actually instances of C{L{netcdftime.datetime}}.  This is </tt> </tt>
+<a name="L515"></a><tt class="py-lineno"> 515</tt>  <tt class="py-line"><tt class="py-docstring">because the python datetime module cannot handle the weird dates in some </tt> </tt>
+<a name="L516"></a><tt class="py-lineno"> 516</tt>  <tt class="py-line"><tt class="py-docstring">calendars (such as C{'360_day'} and C{'all_leap'}) which don't exist in any real </tt> </tt>
+<a name="L517"></a><tt class="py-lineno"> 517</tt>  <tt class="py-line"><tt class="py-docstring">world calendar.</tt> </tt>
+<a name="L518"></a><tt class="py-lineno"> 518</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L519"></a><tt class="py-lineno"> 519</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L520"></a><tt class="py-lineno"> 520</tt>  <tt class="py-line"><tt class="py-docstring">Example usage:</tt> </tt>
+<a name="L521"></a><tt class="py-lineno"> 521</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L522"></a><tt class="py-lineno"> 522</tt>  <tt class="py-line"><tt class="py-docstring">>>> from netcdftime import utime</tt> </tt>
+<a name="L523"></a><tt class="py-lineno"> 523</tt>  <tt class="py-line"><tt class="py-docstring">>>> from datetime import  datetime</tt> </tt>
+<a name="L524"></a><tt class="py-lineno"> 524</tt>  <tt class="py-line"><tt class="py-docstring">>>> cdftime = utime('hours since 0001-01-01 00:00:00')</tt> </tt>
+<a name="L525"></a><tt class="py-lineno"> 525</tt>  <tt class="py-line"><tt class="py-docstring">>>> date = datetime.now()</tt> </tt>
+<a name="L526"></a><tt class="py-lineno"> 526</tt>  <tt class="py-line"><tt class="py-docstring">>>> print date</tt> </tt>
+<a name="L527"></a><tt class="py-lineno"> 527</tt>  <tt class="py-line"><tt class="py-docstring">2006-03-17 16:04:02.561678</tt> </tt>
+<a name="L528"></a><tt class="py-lineno"> 528</tt>  <tt class="py-line"><tt class="py-docstring">>>></tt> </tt>
+<a name="L529"></a><tt class="py-lineno"> 529</tt>  <tt class="py-line"><tt class="py-docstring">>>> t = cdftime.date2num(date)</tt> </tt>
+<a name="L530"></a><tt class="py-lineno"> 530</tt>  <tt class="py-line"><tt class="py-docstring">>>> print t</tt> </tt>
+<a name="L531"></a><tt class="py-lineno"> 531</tt>  <tt class="py-line"><tt class="py-docstring">17577328.0672</tt> </tt>
+<a name="L532"></a><tt class="py-lineno"> 532</tt>  <tt class="py-line"><tt class="py-docstring">>>></tt> </tt>
+<a name="L533"></a><tt class="py-lineno"> 533</tt>  <tt class="py-line"><tt class="py-docstring">>>> date = cdftime.num2date(t)</tt> </tt>
+<a name="L534"></a><tt class="py-lineno"> 534</tt>  <tt class="py-line"><tt class="py-docstring">>>> print date</tt> </tt>
+<a name="L535"></a><tt class="py-lineno"> 535</tt>  <tt class="py-line"><tt class="py-docstring">2006-03-17 16:04:02</tt> </tt>
+<a name="L536"></a><tt class="py-lineno"> 536</tt>  <tt class="py-line"><tt class="py-docstring">>>></tt> </tt>
+<a name="L537"></a><tt class="py-lineno"> 537</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L538"></a><tt class="py-lineno"> 538</tt>  <tt class="py-line"><tt class="py-docstring">The resolution of the transformation operation is 1 second.</tt> </tt>
+<a name="L539"></a><tt class="py-lineno"> 539</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
+<a name="L540"></a><tt class="py-lineno"> 540</tt>  <tt class="py-line"><tt class="py-docstring">Warning:  Dates between 1582-10-5 and 1582-10-15 do not exist in the </tt> </tt>
+<a name="L541"></a><tt class="py-lineno"> 541</tt>  <tt class="py-line"><tt class="py-docstring">C{'standard'} or C{'gregorian'} calendars.  An exception will be raised if you pass </tt> </tt>
+<a name="L542"></a><tt class="py-lineno"> 542</tt>  <tt class="py-line"><tt class="py-docstring">a 'datetime-like' object in that range to the C{L{date2num}} class method.</tt> </tt>
+<a name="L543"></a><tt class="py-lineno"> 543</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L544"></a><tt class="py-lineno"> 544</tt>  <tt class="py-line"><tt class="py-docstring">Words of Wisdom from the British MetOffice concerning reference dates:</tt> </tt>
+<a name="L545"></a><tt class="py-lineno"> 545</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L546"></a><tt class="py-lineno"> 546</tt>  <tt class="py-line"><tt class="py-docstring">"udunits implements the mixed Gregorian/Julian calendar system, as </tt> </tt>
+<a name="L547"></a><tt class="py-lineno"> 547</tt>  <tt class="py-line"><tt class="py-docstring">followed in England, in which dates prior to 1582-10-15 are assumed to use </tt> </tt>
+<a name="L548"></a><tt class="py-lineno"> 548</tt>  <tt class="py-line"><tt class="py-docstring">the Julian calendar. Other software cannot be relied upon to handle the </tt> </tt>
+<a name="L549"></a><tt class="py-lineno"> 549</tt>  <tt class="py-line"><tt class="py-docstring">change of calendar in the same way, so for robustness it is recommended </tt> </tt>
+<a name="L550"></a><tt class="py-lineno"> 550</tt>  <tt class="py-line"><tt class="py-docstring">that the reference date be later than 1582. If earlier dates must be used, </tt> </tt>
+<a name="L551"></a><tt class="py-lineno"> 551</tt>  <tt class="py-line"><tt class="py-docstring">it should be noted that udunits treats 0 AD as identical to 1 AD."</tt> </tt>
+<a name="L552"></a><tt class="py-lineno"> 552</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L553"></a><tt class="py-lineno"> 553</tt>  <tt class="py-line"><tt class="py-docstring">@ivar origin: datetime instance defining the origin of the netCDF time variable.</tt> </tt>
+<a name="L554"></a><tt class="py-lineno"> 554</tt>  <tt class="py-line"><tt class="py-docstring">@ivar calendar:  the calendar used (as specified by the C{calendar} keyword).</tt> </tt>
+<a name="L555"></a><tt class="py-lineno"> 555</tt>  <tt class="py-line"><tt class="py-docstring">@ivar unit_string:  a string defining the the netCDF time variable.</tt> </tt>
+<a name="L556"></a><tt class="py-lineno"> 556</tt>  <tt class="py-line"><tt class="py-docstring">@ivar units:  the units part of C{unit_string} (i.e. 'days', 'hours', 'seconds').</tt> </tt>
+<a name="L557"></a><tt class="py-lineno"> 557</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="utime.__init__"></a><div id="utime.__init__-def"><a name="L558"></a><tt class="py-lineno"> 558</tt> <a class="py-toggle" href="#" id="utime.__init__-toggle" onclick="return toggle('utime.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime.utime-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">unit_string</tt><tt class="py-op" [...]
+</div><div id="utime.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="utime.__init__-expanded"><a name="L559"></a><tt class="py-lineno"> 559</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L560"></a><tt class="py-lineno"> 560</tt>  <tt class="py-line"><tt class="py-docstring">@param unit_string: a string of the form</tt> </tt>
+<a name="L561"></a><tt class="py-lineno"> 561</tt>  <tt class="py-line"><tt class="py-docstring">C{'time-units since <time-origin>'} defining the time units.</tt> </tt>
+<a name="L562"></a><tt class="py-lineno"> 562</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L563"></a><tt class="py-lineno"> 563</tt>  <tt class="py-line"><tt class="py-docstring">Valid time-units are days, hours, minutes and seconds (the singular forms </tt> </tt>
+<a name="L564"></a><tt class="py-lineno"> 564</tt>  <tt class="py-line"><tt class="py-docstring">are also accepted). An example unit_string would be C{'hours </tt> </tt>
+<a name="L565"></a><tt class="py-lineno"> 565</tt>  <tt class="py-line"><tt class="py-docstring">since 0001-01-01 00:00:00'}.</tt> </tt>
+<a name="L566"></a><tt class="py-lineno"> 566</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L567"></a><tt class="py-lineno"> 567</tt>  <tt class="py-line"><tt class="py-docstring">@keyword calendar: describes the calendar used in the time calculations. </tt> </tt>
+<a name="L568"></a><tt class="py-lineno"> 568</tt>  <tt class="py-line"><tt class="py-docstring">All the values currently defined in the U{CF metadata convention </tt> </tt>
+<a name="L569"></a><tt class="py-lineno"> 569</tt>  <tt class="py-line"><tt class="py-docstring"><http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.1/cf-conventions.html#time-coordinate>}</tt> </tt>
+<a name="L570"></a><tt class="py-lineno"> 570</tt>  <tt class="py-line"><tt class="py-docstring">are accepted. The default is C{'standard'}, which corresponds to the mixed </tt> </tt>
+<a name="L571"></a><tt class="py-lineno"> 571</tt>  <tt class="py-line"><tt class="py-docstring">Gregorian/Julian calendar used by the C{udunits library}. Valid calendars </tt> </tt>
+<a name="L572"></a><tt class="py-lineno"> 572</tt>  <tt class="py-line"><tt class="py-docstring">are:</tt> </tt>
+<a name="L573"></a><tt class="py-lineno"> 573</tt>  <tt class="py-line"><tt class="py-docstring"> - C{'gregorian'} or C{'standard'} (default):</tt> </tt>
+<a name="L574"></a><tt class="py-lineno"> 574</tt>  <tt class="py-line"><tt class="py-docstring"> Mixed Gregorian/Julian calendar as defined by udunits.</tt> </tt>
+<a name="L575"></a><tt class="py-lineno"> 575</tt>  <tt class="py-line"><tt class="py-docstring"> - C{'proleptic_gregorian'}:</tt> </tt>
+<a name="L576"></a><tt class="py-lineno"> 576</tt>  <tt class="py-line"><tt class="py-docstring"> A Gregorian calendar extended to dates before 1582-10-15. That is, a year </tt> </tt>
+<a name="L577"></a><tt class="py-lineno"> 577</tt>  <tt class="py-line"><tt class="py-docstring"> is a leap year if either (i) it is divisible by 4 but not by 100 or (ii) </tt> </tt>
+<a name="L578"></a><tt class="py-lineno"> 578</tt>  <tt class="py-line"><tt class="py-docstring"> it is divisible by 400.</tt> </tt>
+<a name="L579"></a><tt class="py-lineno"> 579</tt>  <tt class="py-line"><tt class="py-docstring"> - C{'noleap'} or C{'365_day'}:</tt> </tt>
+<a name="L580"></a><tt class="py-lineno"> 580</tt>  <tt class="py-line"><tt class="py-docstring"> Gregorian calendar without leap years, i.e., all years are 365 days long. </tt> </tt>
+<a name="L581"></a><tt class="py-lineno"> 581</tt>  <tt class="py-line"><tt class="py-docstring"> - C{'all_leap'} or C{'366_day'}:  </tt> </tt>
+<a name="L582"></a><tt class="py-lineno"> 582</tt>  <tt class="py-line"><tt class="py-docstring"> Gregorian calendar with every year being a leap year, i.e.,</tt> </tt>
+<a name="L583"></a><tt class="py-lineno"> 583</tt>  <tt class="py-line"><tt class="py-docstring"> all years are 366 days long.</tt> </tt>
+<a name="L584"></a><tt class="py-lineno"> 584</tt>  <tt class="py-line"><tt class="py-docstring"> -C{'360_day'}:</tt> </tt>
+<a name="L585"></a><tt class="py-lineno"> 585</tt>  <tt class="py-line"><tt class="py-docstring"> All years are 360 days divided into 30 day months. </tt> </tt>
+<a name="L586"></a><tt class="py-lineno"> 586</tt>  <tt class="py-line"><tt class="py-docstring"> -C{'julian'}:</tt> </tt>
+<a name="L587"></a><tt class="py-lineno"> 587</tt>  <tt class="py-line"><tt class="py-docstring"> Proleptic Julian calendar, extended to dates after 1582-10-5. A year is a </tt> </tt>
+<a name="L588"></a><tt class="py-lineno"> 588</tt>  <tt class="py-line"><tt class="py-docstring"> leap year if it is divisible by 4.</tt> </tt>
+<a name="L589"></a><tt class="py-lineno"> 589</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L590"></a><tt class="py-lineno"> 590</tt>  <tt class="py-line"><tt class="py-docstring">@returns: A class instance which may be used for converting times from netCDF</tt> </tt>
+<a name="L591"></a><tt class="py-lineno"> 591</tt>  <tt class="py-line"><tt class="py-docstring">units to datetime objects.</tt> </tt>
+<a name="L592"></a><tt class="py-lineno"> 592</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L593"></a><tt class="py-lineno"> 593</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">calendar</tt> <tt class="py-keyword">in</tt> <tt id="link-14" class="py-name"><a title="netcdftime.netcdftime._calendars" class="py-name" href="#" onclick="return doclink('link-14', '_calendars', 'link-4');">_calendars</a></tt><tt class="py-op">:</tt> </tt>
+<a name="L594"></a><tt class="py-lineno"> 594</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">calendar</tt> <tt class="py-op">=</tt> <tt class="py-name">calendar</tt> </tt>
+<a name="L595"></a><tt class="py-lineno"> 595</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L596"></a><tt class="py-lineno"> 596</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">"calendar must be one of %s, got '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-15" class="py-name"><a title="netcdftime.netcdftime._calendars" class="py-name" href="#" onclick="return doclink('link-15', '_calendar [...]
+<a name="L597"></a><tt class="py-lineno"> 597</tt>  <tt class="py-line">        <tt class="py-name">units</tt><tt class="py-op">,</tt> <tt class="py-name">tzoffset</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">origin</tt> <tt class="py-op">=</tt> <tt class="py-name">_dateparse</tt><tt class="py-op">(</tt><tt class="py-name">unit_string</tt><tt class="py-op">)</tt> </tt>
+<a name="L598"></a><tt class="py-lineno"> 598</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tzoffset</tt> <tt class="py-op">=</tt> <tt class="py-name">tzoffset</tt> <tt class="py-comment"># time zone offset in minutes</tt> </tt>
+<a name="L599"></a><tt class="py-lineno"> 599</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">units</tt> <tt class="py-op">=</tt> <tt class="py-name">units</tt> </tt>
+<a name="L600"></a><tt class="py-lineno"> 600</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">unit_string</tt> <tt class="py-op">=</tt> <tt class="py-name">unit_string</tt> </tt>
+<a name="L601"></a><tt class="py-lineno"> 601</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">calendar</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'noleap'</tt><tt class="py-op">,</tt><tt class="py-string">'365_day'</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">origin</tt><tt [...]
+<a name="L602"></a><tt class="py-lineno"> 602</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">'cannot specify a leap day as the reference time with the noleap calendar'</tt> </tt>
+<a name="L603"></a><tt class="py-lineno"> 603</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">calendar</tt> <tt class="py-op">==</tt> <tt class="py-string">'360_day'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">origin</tt><tt class="py-op">.</tt><tt class="py-name">day</tt> <tt class="py-op">></tt> <tt class="py-number">30</tt><tt c [...]
+<a name="L604"></a><tt class="py-lineno"> 604</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">'there are only 30 days in every month with the 360_day calendar'</tt> </tt>
+<a name="L605"></a><tt class="py-lineno"> 605</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">calendar</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'noleap'</tt><tt class="py-op">,</tt><tt class="py-string">'365_day'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L606"></a><tt class="py-lineno"> 606</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_jd0</tt> <tt class="py-op">=</tt> <tt class="py-name">_NoLeapDayFromDate</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">origin</tt><tt class="py-op">)</tt> </tt>
+<a name="L607"></a><tt class="py-lineno"> 607</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">calendar</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'all_leap'</tt><tt class="py-op">,</tt><tt class="py-string">'366_day'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L608"></a><tt class="py-lineno"> 608</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_jd0</tt> <tt class="py-op">=</tt> <tt class="py-name">_AllLeapFromDate</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">origin</tt><tt class="py-op">)</tt> </tt>
+<a name="L609"></a><tt class="py-lineno"> 609</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">calendar</tt> <tt class="py-op">==</tt> <tt class="py-string">'360_day'</tt><tt class="py-op">:</tt> </tt>
+<a name="L610"></a><tt class="py-lineno"> 610</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_jd0</tt> <tt class="py-op">=</tt> <tt class="py-name">_360DayFromDate</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">origin</tt><tt class="py-op">)</tt> </tt>
+<a name="L611"></a><tt class="py-lineno"> 611</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L612"></a><tt class="py-lineno"> 612</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_jd0</tt> <tt class="py-op">=</tt> <tt id="link-16" class="py-name" targets="Function netcdftime.netcdftime.JulianDayFromDate()=netcdftime.netcdftime-module.html#JulianDayFromDate"><a title="netcdftime.netcdftime.JulianDayFromDate" class="py-name" href="#" onclick="return doclink('link-16', 'JulianDayFromDate', 'link-16');">JulianDay [...]
+</div><a name="L613"></a><tt class="py-lineno"> 613</tt>  <tt class="py-line"> </tt>
+<a name="utime.date2num"></a><div id="utime.date2num-def"><a name="L614"></a><tt class="py-lineno"> 614</tt> <a class="py-toggle" href="#" id="utime.date2num-toggle" onclick="return toggle('utime.date2num');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime.utime-class.html#date2num">date2num</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">date</tt><tt class="py-op">)</tt> [...]
+</div><div id="utime.date2num-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="utime.date2num-expanded"><a name="L615"></a><tt class="py-lineno"> 615</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L616"></a><tt class="py-lineno"> 616</tt>  <tt class="py-line"><tt class="py-docstring">Returns C{time_value} in units described by L{unit_string}, using</tt> </tt>
+<a name="L617"></a><tt class="py-lineno"> 617</tt>  <tt class="py-line"><tt class="py-docstring">the specified L{calendar}, given a 'datetime-like' object.</tt> </tt>
+<a name="L618"></a><tt class="py-lineno"> 618</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L619"></a><tt class="py-lineno"> 619</tt>  <tt class="py-line"><tt class="py-docstring">The datetime object must represent UTC with no time-zone offset.</tt> </tt>
+<a name="L620"></a><tt class="py-lineno"> 620</tt>  <tt class="py-line"><tt class="py-docstring">If there is a time-zone offset implied by L{unit_string}, it will</tt> </tt>
+<a name="L621"></a><tt class="py-lineno"> 621</tt>  <tt class="py-line"><tt class="py-docstring">be applied to the returned numeric values.</tt> </tt>
+<a name="L622"></a><tt class="py-lineno"> 622</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L623"></a><tt class="py-lineno"> 623</tt>  <tt class="py-line"><tt class="py-docstring">Resolution is 1 second.</tt> </tt>
+<a name="L624"></a><tt class="py-lineno"> 624</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L625"></a><tt class="py-lineno"> 625</tt>  <tt class="py-line"><tt class="py-docstring">If C{calendar = 'standard'} or C{'gregorian'} (indicating</tt> </tt>
+<a name="L626"></a><tt class="py-lineno"> 626</tt>  <tt class="py-line"><tt class="py-docstring">that the mixed Julian/Gregorian calendar is to be used), an</tt> </tt>
+<a name="L627"></a><tt class="py-lineno"> 627</tt>  <tt class="py-line"><tt class="py-docstring">exception will be raised if the 'datetime-like' object describes</tt> </tt>
+<a name="L628"></a><tt class="py-lineno"> 628</tt>  <tt class="py-line"><tt class="py-docstring">a date between 1582-10-5 and 1582-10-15.</tt> </tt>
+<a name="L629"></a><tt class="py-lineno"> 629</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L630"></a><tt class="py-lineno"> 630</tt>  <tt class="py-line"><tt class="py-docstring">Works for scalars, sequences and numpy arrays.</tt> </tt>
+<a name="L631"></a><tt class="py-lineno"> 631</tt>  <tt class="py-line"><tt class="py-docstring">Returns a scalar if input is a scalar, else returns a numpy array.</tt> </tt>
+<a name="L632"></a><tt class="py-lineno"> 632</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L633"></a><tt class="py-lineno"> 633</tt>  <tt class="py-line">        <tt class="py-name">isscalar</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
+<a name="L634"></a><tt class="py-lineno"> 634</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
+<a name="L635"></a><tt class="py-lineno"> 635</tt>  <tt class="py-line">            <tt class="py-name">date</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
+<a name="L636"></a><tt class="py-lineno"> 636</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
+<a name="L637"></a><tt class="py-lineno"> 637</tt>  <tt class="py-line">            <tt class="py-name">isscalar</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
+<a name="L638"></a><tt class="py-lineno"> 638</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isscalar</tt><tt class="py-op">:</tt> </tt>
+<a name="L639"></a><tt class="py-lineno"> 639</tt>  <tt class="py-line">            <tt class="py-name">date</tt> <tt class="py-op">=</tt> <tt class="py-name">numpy</tt><tt class="py-op">.</tt><tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-name">date</tt><tt class="py-op">)</tt> </tt>
+<a name="L640"></a><tt class="py-lineno"> 640</tt>  <tt class="py-line">            <tt id="link-17" class="py-name" targets="Variable netCDF3.Variable.shape=netCDF3.Variable-class.html#shape,Variable netCDF4.Variable.shape=netCDF4.Variable-class.html#shape"><a title="netCDF3.Variable.shape
+netCDF4.Variable.shape" class="py-name" href="#" onclick="return doclink('link-17', 'shape', 'link-17');">shape</a></tt> <tt class="py-op">=</tt> <tt class="py-name">date</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name"><a title="netCDF3.Variable.shape
+netCDF4.Variable.shape" class="py-name" href="#" onclick="return doclink('link-18', 'shape', 'link-17');">shape</a></tt> </tt>
+<a name="L641"></a><tt class="py-lineno"> 641</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">calendar</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'julian'</tt><tt class="py-op">,</tt><tt class="py-string">'standard'</tt><tt class="py-op">,</tt><tt class="py-string">'gregorian'</tt><tt class="py-op">,</tt><tt class="py-string">'proleptic_gregorian'</tt><tt class [...]
+<a name="L642"></a><tt class="py-lineno"> 642</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isscalar</tt><tt class="py-op">:</tt> </tt>
+<a name="L643"></a><tt class="py-lineno"> 643</tt>  <tt class="py-line">                <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt id="link-19" class="py-name"><a title="netcdftime.netcdftime.JulianDayFromDate" class="py-name" href="#" onclick="return doclink('link-19', 'JulianDayFromDate', 'link-16');">JulianDayFromDate</a></tt><tt class="py-op">(</tt><tt class="py-name">date</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py [...]
+<a name="L644"></a><tt class="py-lineno"> 644</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L645"></a><tt class="py-lineno"> 645</tt>  <tt class="py-line">                <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-20" class="py-name"><a title="netcdftime.netcdftime.JulianDayFromDate" class="py-name" href="#" onclick="return doclink('link-20', 'JulianDayFromDate', 'link-16');">JulianDayFromDate</a></tt><tt class="py-op">(</tt><tt class="py-name">d</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op [...]
+<a name="L646"></a><tt class="py-lineno"> 646</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">calendar</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'noleap'</tt><tt class="py-op">,</tt><tt class="py-string">'365_day'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L647"></a><tt class="py-lineno"> 647</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isscalar</tt><tt class="py-op">:</tt> </tt>
+<a name="L648"></a><tt class="py-lineno"> 648</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">month</tt> <tt class="py-op">==</tt> <tt class="py-number">2</tt> <tt class="py-keyword">and</tt> <tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">day</tt> <tt class="py-op">==</tt> <tt class="py-number">29</tt><tt class="py-op">:</tt> </tt>
+<a name="L649"></a><tt class="py-lineno"> 649</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">'there is no leap day in the noleap calendar'</tt> </tt>
+<a name="L650"></a><tt class="py-lineno"> 650</tt>  <tt class="py-line">                <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt class="py-name">_NoLeapDayFromDate</tt><tt class="py-op">(</tt><tt class="py-name">date</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_jd0</tt> </tt>
+<a name="L651"></a><tt class="py-lineno"> 651</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L652"></a><tt class="py-lineno"> 652</tt>  <tt class="py-line">                <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
+<a name="L653"></a><tt class="py-lineno"> 653</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">d</tt> <tt class="py-keyword">in</tt> <tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">flat</tt><tt class="py-op">:</tt> </tt>
+<a name="L654"></a><tt class="py-lineno"> 654</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">d</tt><tt class="py-op">.</tt><tt class="py-name">month</tt> <tt class="py-op">==</tt> <tt class="py-number">2</tt> <tt class="py-keyword">and</tt> <tt class="py-name">d</tt><tt class="py-op">.</tt><tt class="py-name">day</tt> <tt class="py-op">==</tt> <tt class="py-number">29</tt><tt class="py-op">:</tt> </tt>
+<a name="L655"></a><tt class="py-lineno"> 655</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">'there is no leap day in the noleap calendar'</tt>                     </tt>
+<a name="L656"></a><tt class="py-lineno"> 656</tt>  <tt class="py-line">                    <tt class="py-name">jdelta</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">_NoLeapDayFromDate</tt><tt class="py-op">(</tt><tt class="py-name">d</tt><tt class="py-op">)</tt><tt class="py-op">-</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_jd0</tt><tt class="py-op">)</tt> </tt>
+<a name="L657"></a><tt class="py-lineno"> 657</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">calendar</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'all_leap'</tt><tt class="py-op">,</tt><tt class="py-string">'366_day'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L658"></a><tt class="py-lineno"> 658</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isscalar</tt><tt class="py-op">:</tt> </tt>
+<a name="L659"></a><tt class="py-lineno"> 659</tt>  <tt class="py-line">                <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt class="py-name">_AllLeapFromDate</tt><tt class="py-op">(</tt><tt class="py-name">date</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_jd0</tt> </tt>
+<a name="L660"></a><tt class="py-lineno"> 660</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L661"></a><tt class="py-lineno"> 661</tt>  <tt class="py-line">                <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">_AllLeapFromDate</tt><tt class="py-op">(</tt><tt class="py-name">d</tt><tt class="py-op">)</tt><tt class="py-op">-</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_jd0</tt> <tt class="py-keyword">for</tt> <tt class="py-name">d</tt> <tt class="py-keyword">in</tt> <tt class=" [...]
+<a name="L662"></a><tt class="py-lineno"> 662</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">calendar</tt> <tt class="py-op">==</tt> <tt class="py-string">'360_day'</tt><tt class="py-op">:</tt> </tt>
+<a name="L663"></a><tt class="py-lineno"> 663</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">calendar</tt> <tt class="py-op">==</tt> <tt class="py-string">'360_day'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">day</tt> <tt class="py-op">></tt> <tt class="py-number">30</tt><tt class="py-op">:</tt> </tt>
+<a name="L664"></a><tt class="py-lineno"> 664</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">'there are only 30 days in every month with the 360_day calendar'</tt> </tt>
+<a name="L665"></a><tt class="py-lineno"> 665</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isscalar</tt><tt class="py-op">:</tt> </tt>
+<a name="L666"></a><tt class="py-lineno"> 666</tt>  <tt class="py-line">                <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt class="py-name">_360DayFromDate</tt><tt class="py-op">(</tt><tt class="py-name">date</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_jd0</tt> </tt>
+<a name="L667"></a><tt class="py-lineno"> 667</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L668"></a><tt class="py-lineno"> 668</tt>  <tt class="py-line">                <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">_360DayFromDate</tt><tt class="py-op">(</tt><tt class="py-name">d</tt><tt class="py-op">)</tt><tt class="py-op">-</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_jd0</tt> <tt class="py-keyword">for</tt> <tt class="py-name">d</tt> <tt class="py-keyword">in</tt> <tt class="p [...]
+<a name="L669"></a><tt class="py-lineno"> 669</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isscalar</tt><tt class="py-op">:</tt> </tt>
+<a name="L670"></a><tt class="py-lineno"> 670</tt>  <tt class="py-line">            <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt class="py-name">numpy</tt><tt class="py-op">.</tt><tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-name">jdelta</tt><tt class="py-op">)</tt> </tt>
+<a name="L671"></a><tt class="py-lineno"> 671</tt>  <tt class="py-line">        <tt class="py-comment"># convert to desired units, add time zone offset.</tt> </tt>
+<a name="L672"></a><tt class="py-lineno"> 672</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">units</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'second'</tt><tt class="py-op">,</tt><tt class="py-string">'seconds'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L673"></a><tt class="py-lineno"> 673</tt>  <tt class="py-line">            <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt class="py-name">jdelta</tt><tt class="py-op">*</tt><tt class="py-number">86400.</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tzoffset</tt><tt class="py-op">*</tt><tt class="py-number">60.</tt> </tt>
+<a name="L674"></a><tt class="py-lineno"> 674</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">units</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'minute'</tt><tt class="py-op">,</tt><tt class="py-string">'minutes'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L675"></a><tt class="py-lineno"> 675</tt>  <tt class="py-line">            <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt class="py-name">jdelta</tt><tt class="py-op">*</tt><tt class="py-number">1440.</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tzoffset</tt> </tt>
+<a name="L676"></a><tt class="py-lineno"> 676</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">units</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'hour'</tt><tt class="py-op">,</tt><tt class="py-string">'hours'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L677"></a><tt class="py-lineno"> 677</tt>  <tt class="py-line">            <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt class="py-name">jdelta</tt><tt class="py-op">*</tt><tt class="py-number">24.</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tzoffset</tt><tt class="py-op">/</tt><tt class="py-number">60.</tt> </tt>
+<a name="L678"></a><tt class="py-lineno"> 678</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">units</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'day'</tt><tt class="py-op">,</tt><tt class="py-string">'days'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L679"></a><tt class="py-lineno"> 679</tt>  <tt class="py-line">            <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt class="py-name">jdelta</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tzoffset</tt><tt class="py-op">/</tt><tt class="py-number">1440.</tt> </tt>
+<a name="L680"></a><tt class="py-lineno"> 680</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isscalar</tt><tt class="py-op">:</tt> </tt>
+<a name="L681"></a><tt class="py-lineno"> 681</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">jdelta</tt> </tt>
+<a name="L682"></a><tt class="py-lineno"> 682</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L683"></a><tt class="py-lineno"> 683</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">numpy</tt><tt class="py-op">.</tt><tt class="py-name">reshape</tt><tt class="py-op">(</tt><tt class="py-name">jdelta</tt><tt class="py-op">,</tt><tt id="link-21" class="py-name"><a title="netCDF3.Variable.shape
+netCDF4.Variable.shape" class="py-name" href="#" onclick="return doclink('link-21', 'shape', 'link-17');">shape</a></tt><tt class="py-op">)</tt> </tt>
+</div><a name="L684"></a><tt class="py-lineno"> 684</tt>  <tt class="py-line"> </tt>
+<a name="utime.num2date"></a><div id="utime.num2date-def"><a name="L685"></a><tt class="py-lineno"> 685</tt> <a class="py-toggle" href="#" id="utime.num2date-toggle" onclick="return toggle('utime.num2date');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime.utime-class.html#num2date">num2date</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">time_value</tt><tt class="py-op"> [...]
+</div><div id="utime.num2date-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="utime.num2date-expanded"><a name="L686"></a><tt class="py-lineno"> 686</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L687"></a><tt class="py-lineno"> 687</tt>  <tt class="py-line"><tt class="py-docstring">Return a 'datetime-like' object given a C{time_value} in units</tt> </tt>
+<a name="L688"></a><tt class="py-lineno"> 688</tt>  <tt class="py-line"><tt class="py-docstring">described by L{unit_string}, using L{calendar}.</tt> </tt>
+<a name="L689"></a><tt class="py-lineno"> 689</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L690"></a><tt class="py-lineno"> 690</tt>  <tt class="py-line"><tt class="py-docstring">dates are in UTC with no offset, even if L{unit_string} contains</tt> </tt>
+<a name="L691"></a><tt class="py-lineno"> 691</tt>  <tt class="py-line"><tt class="py-docstring">a time zone offset from UTC.</tt> </tt>
+<a name="L692"></a><tt class="py-lineno"> 692</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L693"></a><tt class="py-lineno"> 693</tt>  <tt class="py-line"><tt class="py-docstring">Resolution is 1 second.</tt> </tt>
+<a name="L694"></a><tt class="py-lineno"> 694</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L695"></a><tt class="py-lineno"> 695</tt>  <tt class="py-line"><tt class="py-docstring">Works for scalars, sequences and numpy arrays.</tt> </tt>
+<a name="L696"></a><tt class="py-lineno"> 696</tt>  <tt class="py-line"><tt class="py-docstring">Returns a scalar if input is a scalar, else returns a numpy array.</tt> </tt>
+<a name="L697"></a><tt class="py-lineno"> 697</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L698"></a><tt class="py-lineno"> 698</tt>  <tt class="py-line"><tt class="py-docstring">The datetime instances returned by C{num2date} are 'real' python datetime </tt> </tt>
+<a name="L699"></a><tt class="py-lineno"> 699</tt>  <tt class="py-line"><tt class="py-docstring">objects if the date falls in the Gregorian calendar (i.e. </tt> </tt>
+<a name="L700"></a><tt class="py-lineno"> 700</tt>  <tt class="py-line"><tt class="py-docstring">C{calendar='proleptic_gregorian'}, or C{calendar = 'standard'/'gregorian'} and </tt> </tt>
+<a name="L701"></a><tt class="py-lineno"> 701</tt>  <tt class="py-line"><tt class="py-docstring">the date is after 1582-10-15). Otherwise, they are 'phony' datetime </tt> </tt>
+<a name="L702"></a><tt class="py-lineno"> 702</tt>  <tt class="py-line"><tt class="py-docstring">objects which are actually instances of netcdftime.datetime.  This is </tt> </tt>
+<a name="L703"></a><tt class="py-lineno"> 703</tt>  <tt class="py-line"><tt class="py-docstring">because the python datetime module cannot handle the weird dates in some </tt> </tt>
+<a name="L704"></a><tt class="py-lineno"> 704</tt>  <tt class="py-line"><tt class="py-docstring">calendars (such as C{'360_day'} and C{'all_leap'}) which </tt> </tt>
+<a name="L705"></a><tt class="py-lineno"> 705</tt>  <tt class="py-line"><tt class="py-docstring">do not exist in any real world calendar.</tt> </tt>
+<a name="L706"></a><tt class="py-lineno"> 706</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L707"></a><tt class="py-lineno"> 707</tt>  <tt class="py-line">        <tt class="py-name">isscalar</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
+<a name="L708"></a><tt class="py-lineno"> 708</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
+<a name="L709"></a><tt class="py-lineno"> 709</tt>  <tt class="py-line">            <tt class="py-name">time_value</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
+<a name="L710"></a><tt class="py-lineno"> 710</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
+<a name="L711"></a><tt class="py-lineno"> 711</tt>  <tt class="py-line">            <tt class="py-name">isscalar</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
+<a name="L712"></a><tt class="py-lineno"> 712</tt>  <tt class="py-line">        <tt class="py-name">ismasked</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
+<a name="L713"></a><tt class="py-lineno"> 713</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">time_value</tt><tt class="py-op">,</tt><tt class="py-string">'mask'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L714"></a><tt class="py-lineno"> 714</tt>  <tt class="py-line">            <tt class="py-name">mask</tt> <tt class="py-op">=</tt> <tt class="py-name">time_value</tt><tt class="py-op">.</tt><tt class="py-name">mask</tt> </tt>
+<a name="L715"></a><tt class="py-lineno"> 715</tt>  <tt class="py-line">            <tt class="py-name">ismasked</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
+<a name="L716"></a><tt class="py-lineno"> 716</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isscalar</tt><tt class="py-op">:</tt> </tt>
+<a name="L717"></a><tt class="py-lineno"> 717</tt>  <tt class="py-line">            <tt class="py-name">time_value</tt> <tt class="py-op">=</tt> <tt class="py-name">numpy</tt><tt class="py-op">.</tt><tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-name">time_value</tt><tt class="py-op">,</tt> <tt id="link-22" class="py-name" targets="Variable netCDF3.Variable.dtype=netCDF3.Variable-class.html#dtype,Variable netCDF4.CompoundType.dtype=netCDF4.CompoundType-class.html#dty [...]
+netCDF4.CompoundType.dtype
+netCDF4.VLType.dtype
+netCDF4.Variable.dtype" class="py-name" href="#" onclick="return doclink('link-22', 'dtype', 'link-22');">dtype</a></tt><tt class="py-op">=</tt><tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
+<a name="L718"></a><tt class="py-lineno"> 718</tt>  <tt class="py-line">            <tt id="link-23" class="py-name"><a title="netCDF3.Variable.shape
+netCDF4.Variable.shape" class="py-name" href="#" onclick="return doclink('link-23', 'shape', 'link-17');">shape</a></tt> <tt class="py-op">=</tt> <tt class="py-name">time_value</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name"><a title="netCDF3.Variable.shape
+netCDF4.Variable.shape" class="py-name" href="#" onclick="return doclink('link-24', 'shape', 'link-17');">shape</a></tt> </tt>
+<a name="L719"></a><tt class="py-lineno"> 719</tt>  <tt class="py-line">        <tt class="py-comment"># convert to desired units, remove time zone offset.</tt> </tt>
+<a name="L720"></a><tt class="py-lineno"> 720</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">units</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'second'</tt><tt class="py-op">,</tt><tt class="py-string">'seconds'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L721"></a><tt class="py-lineno"> 721</tt>  <tt class="py-line">            <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt class="py-name">time_value</tt><tt class="py-op">/</tt><tt class="py-number">86400.</tt> <tt class="py-op">-</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tzoffset</tt><tt class="py-op">/</tt><tt class="py-number">1440.</tt> </tt>
+<a name="L722"></a><tt class="py-lineno"> 722</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">units</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'minute'</tt><tt class="py-op">,</tt><tt class="py-string">'minutes'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L723"></a><tt class="py-lineno"> 723</tt>  <tt class="py-line">            <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt class="py-name">time_value</tt><tt class="py-op">/</tt><tt class="py-number">1440.</tt> <tt class="py-op">-</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tzoffset</tt><tt class="py-op">/</tt><tt class="py-number">1440.</tt> </tt>
+<a name="L724"></a><tt class="py-lineno"> 724</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">units</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'hour'</tt><tt class="py-op">,</tt><tt class="py-string">'hours'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L725"></a><tt class="py-lineno"> 725</tt>  <tt class="py-line">            <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt class="py-name">time_value</tt><tt class="py-op">/</tt><tt class="py-number">24.</tt> <tt class="py-op">-</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tzoffset</tt><tt class="py-op">/</tt><tt class="py-number">1440.</tt> </tt>
+<a name="L726"></a><tt class="py-lineno"> 726</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">units</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'day'</tt><tt class="py-op">,</tt><tt class="py-string">'days'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L727"></a><tt class="py-lineno"> 727</tt>  <tt class="py-line">            <tt class="py-name">jdelta</tt> <tt class="py-op">=</tt> <tt class="py-name">time_value</tt> <tt class="py-op">-</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tzoffset</tt><tt class="py-op">/</tt><tt class="py-number">1440.</tt> </tt>
+<a name="L728"></a><tt class="py-lineno"> 728</tt>  <tt class="py-line">        <tt class="py-name">jd</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_jd0</tt> <tt class="py-op">+</tt> <tt class="py-name">jdelta</tt> </tt>
+<a name="L729"></a><tt class="py-lineno"> 729</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">calendar</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'julian'</tt><tt class="py-op">,</tt><tt class="py-string">'standard'</tt><tt class="py-op">,</tt><tt class="py-string">'gregorian'</tt><tt class="py-op">,</tt><tt class="py-string">'proleptic_gregorian'</tt><tt class [...]
+<a name="L730"></a><tt class="py-lineno"> 730</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isscalar</tt><tt class="py-op">:</tt> </tt>
+<a name="L731"></a><tt class="py-lineno"> 731</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">ismasked</tt><tt class="py-op">:</tt> </tt>
+<a name="L732"></a><tt class="py-lineno"> 732</tt>  <tt class="py-line">                    <tt class="py-name">date</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
+<a name="L733"></a><tt class="py-lineno"> 733</tt>  <tt class="py-line">                    <tt class="py-keyword">for</tt> <tt class="py-name">j</tt><tt class="py-op">,</tt><tt class="py-name">m</tt> <tt class="py-keyword">in</tt> <tt class="py-name">zip</tt><tt class="py-op">(</tt><tt class="py-name">jd</tt><tt class="py-op">.</tt><tt class="py-name">flat</tt><tt class="py-op">,</tt> <tt class="py-name">mask</tt><tt class="py-op">.</tt><tt class="py-name">flat</tt><tt class="py-op">)</ [...]
+<a name="L734"></a><tt class="py-lineno"> 734</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">m</tt><tt class="py-op">:</tt> </tt>
+<a name="L735"></a><tt class="py-lineno"> 735</tt>  <tt class="py-line">                            <tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt id="link-25" class="py-name" targets="Function netcdftime.netcdftime.DateFromJulianDay()=netcdftime.netcdftime-module.html#DateFromJulianDay"><a title="netcdftime.netcdftime.DateFromJulianDay" class="py-name" href="#" onclick="return doclink('link-25', 'DateFromJulianDay', 'link- [...]
+<a name="L736"></a><tt class="py-lineno"> 736</tt>  <tt class="py-line">                        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L737"></a><tt class="py-lineno"> 737</tt>  <tt class="py-line">                            <tt class="py-name">date</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
+<a name="L738"></a><tt class="py-lineno"> 738</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L739"></a><tt class="py-lineno"> 739</tt>  <tt class="py-line">                    <tt class="py-name">date</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-26" class="py-name"><a title="netcdftime.netcdftime.DateFromJulianDay" class="py-name" href="#" onclick="return doclink('link-26', 'DateFromJulianDay', 'link-25');">DateFromJulianDay</a></tt><tt class="py-op">(</tt><tt class="py-name">j</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py- [...]
+<a name="L740"></a><tt class="py-lineno"> 740</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L741"></a><tt class="py-lineno"> 741</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">ismasked</tt> <tt class="py-keyword">and</tt> <tt class="py-name">mask</tt><tt class="py-op">.</tt><tt class="py-name">item</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L742"></a><tt class="py-lineno"> 742</tt>  <tt class="py-line">                    <tt class="py-name">date</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
+<a name="L743"></a><tt class="py-lineno"> 743</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L744"></a><tt class="py-lineno"> 744</tt>  <tt class="py-line">                    <tt class="py-name">date</tt> <tt class="py-op">=</tt> <tt id="link-27" class="py-name"><a title="netcdftime.netcdftime.DateFromJulianDay" class="py-name" href="#" onclick="return doclink('link-27', 'DateFromJulianDay', 'link-25');">DateFromJulianDay</a></tt><tt class="py-op">(</tt><tt class="py-name">jd</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py [...]
+<a name="L745"></a><tt class="py-lineno"> 745</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">calendar</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'noleap'</tt><tt class="py-op">,</tt><tt class="py-string">'365_day'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L746"></a><tt class="py-lineno"> 746</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isscalar</tt><tt class="py-op">:</tt> </tt>
+<a name="L747"></a><tt class="py-lineno"> 747</tt>  <tt class="py-line">                <tt class="py-name">date</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">_DateFromNoLeapDay</tt><tt class="py-op">(</tt><tt class="py-name">j</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">j</tt> <tt class="py-keyword">in</tt> <tt class="py-name">jd</tt><tt class="py-op">.</tt><tt class="py-name">flat</tt><tt class="py-op">]</tt> </tt>
+<a name="L748"></a><tt class="py-lineno"> 748</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L749"></a><tt class="py-lineno"> 749</tt>  <tt class="py-line">                <tt class="py-name">date</tt> <tt class="py-op">=</tt> <tt class="py-name">_DateFromNoLeapDay</tt><tt class="py-op">(</tt><tt class="py-name">jd</tt><tt class="py-op">)</tt> </tt>
+<a name="L750"></a><tt class="py-lineno"> 750</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">calendar</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'all_leap'</tt><tt class="py-op">,</tt><tt class="py-string">'366_day'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L751"></a><tt class="py-lineno"> 751</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isscalar</tt><tt class="py-op">:</tt> </tt>
+<a name="L752"></a><tt class="py-lineno"> 752</tt>  <tt class="py-line">                <tt class="py-name">date</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">_DateFromAllLeap</tt><tt class="py-op">(</tt><tt class="py-name">j</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">j</tt> <tt class="py-keyword">in</tt> <tt class="py-name">jd</tt><tt class="py-op">.</tt><tt class="py-name">flat</tt><tt class="py-op">]</tt> </tt>
+<a name="L753"></a><tt class="py-lineno"> 753</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L754"></a><tt class="py-lineno"> 754</tt>  <tt class="py-line">                <tt class="py-name">date</tt> <tt class="py-op">=</tt> <tt class="py-name">_DateFromAllLeap</tt><tt class="py-op">(</tt><tt class="py-name">jd</tt><tt class="py-op">)</tt> </tt>
+<a name="L755"></a><tt class="py-lineno"> 755</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">calendar</tt> <tt class="py-op">==</tt> <tt class="py-string">'360_day'</tt><tt class="py-op">:</tt> </tt>
+<a name="L756"></a><tt class="py-lineno"> 756</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isscalar</tt><tt class="py-op">:</tt> </tt>
+<a name="L757"></a><tt class="py-lineno"> 757</tt>  <tt class="py-line">                <tt class="py-name">date</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">_DateFrom360Day</tt><tt class="py-op">(</tt><tt class="py-name">j</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">j</tt> <tt class="py-keyword">in</tt> <tt class="py-name">jd</tt><tt class="py-op">.</tt><tt class="py-name">flat</tt><tt class="py-op">]</tt> </tt>
+<a name="L758"></a><tt class="py-lineno"> 758</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L759"></a><tt class="py-lineno"> 759</tt>  <tt class="py-line">                <tt class="py-name">date</tt> <tt class="py-op">=</tt> <tt class="py-name">_DateFrom360Day</tt><tt class="py-op">(</tt><tt class="py-name">jd</tt><tt class="py-op">)</tt> </tt>
+<a name="L760"></a><tt class="py-lineno"> 760</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isscalar</tt><tt class="py-op">:</tt> </tt>
+<a name="L761"></a><tt class="py-lineno"> 761</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">date</tt> </tt>
+<a name="L762"></a><tt class="py-lineno"> 762</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L763"></a><tt class="py-lineno"> 763</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">numpy</tt><tt class="py-op">.</tt><tt class="py-name">reshape</tt><tt class="py-op">(</tt><tt class="py-name">numpy</tt><tt class="py-op">.</tt><tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-name">date</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt id="link-28" class="py-name"><a title="netCDF3.Variable.shape
+netCDF4.Variable.shape" class="py-name" href="#" onclick="return doclink('link-28', 'shape', 'link-17');">shape</a></tt><tt class="py-op">)</tt> </tt>
+</div></div><a name="L764"></a><tt class="py-lineno"> 764</tt>  <tt class="py-line"> </tt>
+<a name="_parse_timezone"></a><div id="_parse_timezone-def"><a name="L765"></a><tt class="py-lineno"> 765</tt> <a class="py-toggle" href="#" id="_parse_timezone-toggle" onclick="return toggle('_parse_timezone');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#_parse_timezone">_parse_timezone</a><tt class="py-op">(</tt><tt class="py-param">tzstring</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_parse_timezone-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_parse_timezone-expanded"><a name="L766"></a><tt class="py-lineno"> 766</tt>  <tt class="py-line">    <tt class="py-docstring">"""Parses ISO 8601 time zone specs into tzinfo offsets</tt> </tt>
+<a name="L767"></a><tt class="py-lineno"> 767</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L768"></a><tt class="py-lineno"> 768</tt>  <tt class="py-line"><tt class="py-docstring">    Adapted from pyiso8601 (http://code.google.com/p/pyiso8601/)</tt> </tt>
+<a name="L769"></a><tt class="py-lineno"> 769</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L770"></a><tt class="py-lineno"> 770</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">tzstring</tt> <tt class="py-op">==</tt> <tt class="py-string">"Z"</tt><tt class="py-op">:</tt> </tt>
+<a name="L771"></a><tt class="py-lineno"> 771</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-number">0</tt> </tt>
+<a name="L772"></a><tt class="py-lineno"> 772</tt>  <tt class="py-line">    <tt class="py-comment"># This isn't strictly correct, but it's common to encounter dates without</tt> </tt>
+<a name="L773"></a><tt class="py-lineno"> 773</tt>  <tt class="py-line">    <tt class="py-comment"># timezones so I'll assume the default (which defaults to UTC).</tt> </tt>
+<a name="L774"></a><tt class="py-lineno"> 774</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">tzstring</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
+<a name="L775"></a><tt class="py-lineno"> 775</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-number">0</tt> </tt>
+<a name="L776"></a><tt class="py-lineno"> 776</tt>  <tt class="py-line">    <tt class="py-name">m</tt> <tt class="py-op">=</tt> <tt id="link-29" class="py-name"><a title="netcdftime.netcdftime.TIMEZONE_REGEX" class="py-name" href="#" onclick="return doclink('link-29', 'TIMEZONE_REGEX', 'link-6');">TIMEZONE_REGEX</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">tzstring</tt><tt class="py-op">)</tt> </tt>
+<a name="L777"></a><tt class="py-lineno"> 777</tt>  <tt class="py-line">    <tt class="py-name">prefix</tt><tt class="py-op">,</tt> <tt class="py-name">hours</tt><tt class="py-op">,</tt> <tt class="py-name">minutes</tt> <tt class="py-op">=</tt> <tt class="py-name">m</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name" targets="Variable netCDF4.Dataset.groups=netCDF4.Dataset-class.html#groups"><a title="netCDF4.Dataset.groups" class="py-name" href="#" onclick="return doclink('link [...]
+<a name="L778"></a><tt class="py-lineno"> 778</tt>  <tt class="py-line">    <tt class="py-name">hours</tt><tt class="py-op">,</tt> <tt class="py-name">minutes</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">hours</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">minutes</tt><tt class="py-op">)</tt> </tt>
+<a name="L779"></a><tt class="py-lineno"> 779</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">prefix</tt> <tt class="py-op">==</tt> <tt class="py-string">"-"</tt><tt class="py-op">:</tt> </tt>
+<a name="L780"></a><tt class="py-lineno"> 780</tt>  <tt class="py-line">        <tt class="py-name">hours</tt> <tt class="py-op">=</tt> <tt class="py-op">-</tt><tt class="py-name">hours</tt> </tt>
+<a name="L781"></a><tt class="py-lineno"> 781</tt>  <tt class="py-line">        <tt class="py-name">minutes</tt> <tt class="py-op">=</tt> <tt class="py-op">-</tt><tt class="py-name">minutes</tt> </tt>
+<a name="L782"></a><tt class="py-lineno"> 782</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">minutes</tt> <tt class="py-op">+</tt> <tt class="py-name">hours</tt><tt class="py-op">*</tt><tt class="py-number">60.</tt> </tt>
+</div><a name="L783"></a><tt class="py-lineno"> 783</tt>  <tt class="py-line"> </tt>
+<a name="_parse_date"></a><div id="_parse_date-def"><a name="L784"></a><tt class="py-lineno"> 784</tt> <a class="py-toggle" href="#" id="_parse_date-toggle" onclick="return toggle('_parse_date');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#_parse_date">_parse_date</a><tt class="py-op">(</tt><tt class="py-param">datestring</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_parse_date-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_parse_date-expanded"><a name="L785"></a><tt class="py-lineno"> 785</tt>  <tt class="py-line">    <tt class="py-docstring">"""Parses ISO 8601 dates into datetime objects</tt> </tt>
+<a name="L786"></a><tt class="py-lineno"> 786</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L787"></a><tt class="py-lineno"> 787</tt>  <tt class="py-line"><tt class="py-docstring">    The timezone is parsed from the date string, assuming UTC</tt> </tt>
+<a name="L788"></a><tt class="py-lineno"> 788</tt>  <tt class="py-line"><tt class="py-docstring">    by default.</tt> </tt>
+<a name="L789"></a><tt class="py-lineno"> 789</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L790"></a><tt class="py-lineno"> 790</tt>  <tt class="py-line"><tt class="py-docstring">    Adapted from pyiso8601 (http://code.google.com/p/pyiso8601/)</tt> </tt>
+<a name="L791"></a><tt class="py-lineno"> 791</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L792"></a><tt class="py-lineno"> 792</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">datestring</tt><tt class="py-op">,</tt> <tt class="py-name">basestring</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L793"></a><tt class="py-lineno"> 793</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Expecting a string %r"</tt> <tt class="py-op">%</tt> <tt class="py-name">datestring</tt><tt class="py-op">)</tt> </tt>
+<a name="L794"></a><tt class="py-lineno"> 794</tt>  <tt class="py-line">    <tt class="py-name">m</tt> <tt class="py-op">=</tt> <tt id="link-31" class="py-name"><a title="netcdftime.netcdftime.ISO8601_REGEX" class="py-name" href="#" onclick="return doclink('link-31', 'ISO8601_REGEX', 'link-5');">ISO8601_REGEX</a></tt><tt class="py-op">.</tt><tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">datestring</tt><tt class="py-op">)</tt> </tt>
+<a name="L795"></a><tt class="py-lineno"> 795</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">m</tt><tt class="py-op">:</tt> </tt>
+<a name="L796"></a><tt class="py-lineno"> 796</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"Unable to parse date string %r"</tt> <tt class="py-op">%</tt> <tt class="py-name">datestring</tt><tt class="py-op">)</tt> </tt>
+<a name="L797"></a><tt class="py-lineno"> 797</tt>  <tt class="py-line">    <tt id="link-32" class="py-name"><a title="netCDF4.Dataset.groups" class="py-name" href="#" onclick="return doclink('link-32', 'groups', 'link-30');">groups</a></tt> <tt class="py-op">=</tt> <tt class="py-name">m</tt><tt class="py-op">.</tt><tt class="py-name">groupdict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L798"></a><tt class="py-lineno"> 798</tt>  <tt class="py-line">    <tt class="py-name">tzoffset_mins</tt> <tt class="py-op">=</tt> <tt class="py-name">_parse_timezone</tt><tt class="py-op">(</tt><tt id="link-33" class="py-name"><a title="netCDF4.Dataset.groups" class="py-name" href="#" onclick="return doclink('link-33', 'groups', 'link-30');">groups</a></tt><tt class="py-op">[</tt><tt class="py-string">"timezone"</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
+<a name="L799"></a><tt class="py-lineno"> 799</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-34" class="py-name"><a title="netCDF4.Dataset.groups" class="py-name" href="#" onclick="return doclink('link-34', 'groups', 'link-30');">groups</a></tt><tt class="py-op">[</tt><tt class="py-string">"hour"</tt><tt class="py-op">]</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
+<a name="L800"></a><tt class="py-lineno"> 800</tt>  <tt class="py-line">        <tt id="link-35" class="py-name"><a title="netCDF4.Dataset.groups" class="py-name" href="#" onclick="return doclink('link-35', 'groups', 'link-30');">groups</a></tt><tt class="py-op">[</tt><tt class="py-string">"hour"</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-number">0</tt> </tt>
+<a name="L801"></a><tt class="py-lineno"> 801</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-36" class="py-name"><a title="netCDF4.Dataset.groups" class="py-name" href="#" onclick="return doclink('link-36', 'groups', 'link-30');">groups</a></tt><tt class="py-op">[</tt><tt class="py-string">"minute"</tt><tt class="py-op">]</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
+<a name="L802"></a><tt class="py-lineno"> 802</tt>  <tt class="py-line">        <tt id="link-37" class="py-name"><a title="netCDF4.Dataset.groups" class="py-name" href="#" onclick="return doclink('link-37', 'groups', 'link-30');">groups</a></tt><tt class="py-op">[</tt><tt class="py-string">"minute"</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-number">0</tt> </tt>
+<a name="L803"></a><tt class="py-lineno"> 803</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-38" class="py-name"><a title="netCDF4.Dataset.groups" class="py-name" href="#" onclick="return doclink('link-38', 'groups', 'link-30');">groups</a></tt><tt class="py-op">[</tt><tt class="py-string">"second"</tt><tt class="py-op">]</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
+<a name="L804"></a><tt class="py-lineno"> 804</tt>  <tt class="py-line">        <tt id="link-39" class="py-name"><a title="netCDF4.Dataset.groups" class="py-name" href="#" onclick="return doclink('link-39', 'groups', 'link-30');">groups</a></tt><tt class="py-op">[</tt><tt class="py-string">"second"</tt><tt class="py-op">]</tt><tt class="py-op">=</tt><tt class="py-number">0</tt> </tt>
+<a name="L805"></a><tt class="py-lineno"> 805</tt>  <tt class="py-line">    <tt class="py-comment">#if groups["fraction"] is None:</tt> </tt>
+<a name="L806"></a><tt class="py-lineno"> 806</tt>  <tt class="py-line">    <tt class="py-comment">#    groups["fraction"] = 0</tt> </tt>
+<a name="L807"></a><tt class="py-lineno"> 807</tt>  <tt class="py-line">    <tt class="py-comment">#else:</tt> </tt>
+<a name="L808"></a><tt class="py-lineno"> 808</tt>  <tt class="py-line">    <tt class="py-comment">#    groups["fraction"] = int(float("0.%s" % groups["fraction"]) * 1e6)</tt> </tt>
+<a name="L809"></a><tt class="py-lineno"> 809</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-40" class="py-name"><a title="netCDF4.Dataset.groups" class="py-name" href="#" onclick="return doclink('link-40', 'groups', 'link-30');">groups</a></tt><tt class="py-op">[</tt><tt class="py-string">"year"</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt cl [...]
+<a name="L810"></a><tt class="py-lineno"> 810</tt>  <tt class="py-line">        <tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link-43" class="py-name"><a title="netCDF4.Dataset.groups" class="py-name" href="#" onclick="return doclink('link-43', 'groups', 'link-30');">groups</a></tt><tt class="py-op">[</tt><tt class="py-string">"hour"</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt id="link- [...]
+<a name="L811"></a><tt class="py-lineno"> 811</tt>  <tt class="py-line">        <tt class="py-name">tzoffset_mins</tt> </tt>
+</div><a name="L812"></a><tt class="py-lineno"> 812</tt>  <tt class="py-line"> </tt>
+<a name="L813"></a><tt class="py-lineno"> 813</tt>  <tt class="py-line"><tt id="link-46" class="py-name" targets="Variable netcdftime.netcdftime._illegal_s=netcdftime.netcdftime-module.html#_illegal_s"><a title="netcdftime.netcdftime._illegal_s" class="py-name" href="#" onclick="return doclink('link-46', '_illegal_s', 'link-46');">_illegal_s</a></tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt cla [...]
+<a name="L814"></a><tt class="py-lineno"> 814</tt>  <tt class="py-line"> </tt>
+<a name="_findall"></a><div id="_findall-def"><a name="L815"></a><tt class="py-lineno"> 815</tt> <a class="py-toggle" href="#" id="_findall-toggle" onclick="return toggle('_findall');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#_findall">_findall</a><tt class="py-op">(</tt><tt class="py-param">text</tt><tt class="py-op">,</tt> <tt class="py-param">substr</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_findall-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_findall-expanded"><a name="L816"></a><tt class="py-lineno"> 816</tt>  <tt class="py-line">     <tt class="py-comment"># Also finds overlaps</tt> </tt>
+<a name="L817"></a><tt class="py-lineno"> 817</tt>  <tt class="py-line">     <tt class="py-name">sites</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
+<a name="L818"></a><tt class="py-lineno"> 818</tt>  <tt class="py-line">     <tt class="py-name">i</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L819"></a><tt class="py-lineno"> 819</tt>  <tt class="py-line">     <tt class="py-keyword">while</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
+<a name="L820"></a><tt class="py-lineno"> 820</tt>  <tt class="py-line">         <tt class="py-name">j</tt> <tt class="py-op">=</tt> <tt class="py-name">text</tt><tt class="py-op">.</tt><tt class="py-name">find</tt><tt class="py-op">(</tt><tt class="py-name">substr</tt><tt class="py-op">,</tt> <tt class="py-name">i</tt><tt class="py-op">)</tt> </tt>
+<a name="L821"></a><tt class="py-lineno"> 821</tt>  <tt class="py-line">         <tt class="py-keyword">if</tt> <tt class="py-name">j</tt> <tt class="py-op">==</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
+<a name="L822"></a><tt class="py-lineno"> 822</tt>  <tt class="py-line">             <tt class="py-keyword">break</tt> </tt>
+<a name="L823"></a><tt class="py-lineno"> 823</tt>  <tt class="py-line">         <tt class="py-name">sites</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">j</tt><tt class="py-op">)</tt> </tt>
+<a name="L824"></a><tt class="py-lineno"> 824</tt>  <tt class="py-line">         <tt class="py-name">i</tt><tt class="py-op">=</tt><tt class="py-name">j</tt><tt class="py-op">+</tt><tt class="py-number">1</tt> </tt>
+<a name="L825"></a><tt class="py-lineno"> 825</tt>  <tt class="py-line">     <tt class="py-keyword">return</tt> <tt class="py-name">sites</tt> </tt>
+</div><a name="L826"></a><tt class="py-lineno"> 826</tt>  <tt class="py-line"> </tt>
+<a name="L827"></a><tt class="py-lineno"> 827</tt>  <tt class="py-line"><tt class="py-comment"># Every 28 years the calendar repeats, except through century leap</tt> </tt>
+<a name="L828"></a><tt class="py-lineno"> 828</tt>  <tt class="py-line"><tt class="py-comment"># years where it's 6 years.  But only if you're using the Gregorian</tt> </tt>
+<a name="L829"></a><tt class="py-lineno"> 829</tt>  <tt class="py-line"><tt class="py-comment"># calendar.  ;)</tt> </tt>
+<a name="L830"></a><tt class="py-lineno"> 830</tt>  <tt class="py-line"> </tt>
+<a name="_strftime"></a><div id="_strftime-def"><a name="L831"></a><tt class="py-lineno"> 831</tt> <a class="py-toggle" href="#" id="_strftime-toggle" onclick="return toggle('_strftime');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#_strftime">_strftime</a><tt class="py-op">(</tt><tt class="py-param">dt</tt><tt class="py-op">,</tt> <tt class="py-param">fmt</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_strftime-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_strftime-expanded"><a name="L832"></a><tt class="py-lineno"> 832</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-47" class="py-name"><a title="netcdftime.netcdftime._illegal_s" class="py-name" href="#" onclick="return doclink('link-47', '_illegal_s', 'link-46');">_illegal_s</a></tt><tt class="py-op">.</tt><tt class="py-name">search</tt><tt class="py-op">(</tt><tt c [...]
+<a name="L833"></a><tt class="py-lineno"> 833</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">"This strftime implementation does not handle %s"</tt><tt class="py-op">)</tt> </tt>
+<a name="L834"></a><tt class="py-lineno"> 834</tt>  <tt class="py-line">    <tt class="py-comment"># don't use strftime method at all.</tt> </tt>
+<a name="L835"></a><tt class="py-lineno"> 835</tt>  <tt class="py-line">    <tt class="py-comment">#if dt.year > 1900:</tt> </tt>
+<a name="L836"></a><tt class="py-lineno"> 836</tt>  <tt class="py-line">    <tt class="py-comment">#    return dt.strftime(fmt)</tt> </tt>
+<a name="L837"></a><tt class="py-lineno"> 837</tt>  <tt class="py-line"> </tt>
+<a name="L838"></a><tt class="py-lineno"> 838</tt>  <tt class="py-line">    <tt class="py-name">year</tt> <tt class="py-op">=</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">year</tt> </tt>
+<a name="L839"></a><tt class="py-lineno"> 839</tt>  <tt class="py-line">    <tt class="py-comment"># For every non-leap year century, advance by</tt> </tt>
+<a name="L840"></a><tt class="py-lineno"> 840</tt>  <tt class="py-line">    <tt class="py-comment"># 6 years to get into the 28-year repeat cycle</tt> </tt>
+<a name="L841"></a><tt class="py-lineno"> 841</tt>  <tt class="py-line">    <tt class="py-name">delta</tt> <tt class="py-op">=</tt> <tt class="py-number">2000</tt> <tt class="py-op">-</tt> <tt class="py-name">year</tt> </tt>
+<a name="L842"></a><tt class="py-lineno"> 842</tt>  <tt class="py-line">    <tt class="py-name">off</tt> <tt class="py-op">=</tt> <tt class="py-number">6</tt><tt class="py-op">*</tt><tt class="py-op">(</tt><tt class="py-name">delta</tt> <tt class="py-op">//</tt> <tt class="py-number">100</tt> <tt class="py-op">+</tt> <tt class="py-name">delta</tt> <tt class="py-op">//</tt> <tt class="py-number">400</tt><tt class="py-op">)</tt> </tt>
+<a name="L843"></a><tt class="py-lineno"> 843</tt>  <tt class="py-line">    <tt class="py-name">year</tt> <tt class="py-op">=</tt> <tt class="py-name">year</tt> <tt class="py-op">+</tt> <tt class="py-name">off</tt> </tt>
+<a name="L844"></a><tt class="py-lineno"> 844</tt>  <tt class="py-line"> </tt>
+<a name="L845"></a><tt class="py-lineno"> 845</tt>  <tt class="py-line">    <tt class="py-comment"># Move to around the year 2000</tt> </tt>
+<a name="L846"></a><tt class="py-lineno"> 846</tt>  <tt class="py-line">    <tt class="py-name">year</tt> <tt class="py-op">=</tt> <tt class="py-name">year</tt> <tt class="py-op">+</tt> <tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-number">2000</tt> <tt class="py-op">-</tt> <tt class="py-name">year</tt><tt class="py-op">)</tt><tt class="py-op">//</tt><tt class="py-number">28</tt><tt class="py-op">)</tt><tt class="py-op">*</tt><tt class="py-number">28</tt> </tt>
+<a name="L847"></a><tt class="py-lineno"> 847</tt>  <tt class="py-line">    <tt id="link-48" class="py-name" targets="Method netcdftime.netcdftime.datetime.timetuple()=netcdftime.netcdftime.datetime-class.html#timetuple"><a title="netcdftime.netcdftime.datetime.timetuple" class="py-name" href="#" onclick="return doclink('link-48', 'timetuple', 'link-48');">timetuple</a></tt> <tt class="py-op">=</tt> <tt class="py-name">dt</tt><tt class="py-op">.</tt><tt id="link-49" class="py-name"><a ti [...]
+<a name="L848"></a><tt class="py-lineno"> 848</tt>  <tt class="py-line">    <tt class="py-name">s1</tt> <tt class="py-op">=</tt> <tt class="py-name">time</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="netcdftime.netcdftime.datetime.strftime" class="py-name" href="#" onclick="return doclink('link-50', 'strftime', 'link-7');">strftime</a></tt><tt class="py-op">(</tt><tt class="py-name">fmt</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">year [...]
+<a name="L849"></a><tt class="py-lineno"> 849</tt>  <tt class="py-line">    <tt class="py-name">sites1</tt> <tt class="py-op">=</tt> <tt class="py-name">_findall</tt><tt class="py-op">(</tt><tt class="py-name">s1</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">year</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+<a name="L850"></a><tt class="py-lineno"> 850</tt>  <tt class="py-line">     </tt>
+<a name="L851"></a><tt class="py-lineno"> 851</tt>  <tt class="py-line">    <tt class="py-name">s2</tt> <tt class="py-op">=</tt> <tt class="py-name">time</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name"><a title="netcdftime.netcdftime.datetime.strftime" class="py-name" href="#" onclick="return doclink('link-52', 'strftime', 'link-7');">strftime</a></tt><tt class="py-op">(</tt><tt class="py-name">fmt</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">year [...]
+<a name="L852"></a><tt class="py-lineno"> 852</tt>  <tt class="py-line">    <tt class="py-name">sites2</tt> <tt class="py-op">=</tt> <tt class="py-name">_findall</tt><tt class="py-op">(</tt><tt class="py-name">s2</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">year</tt><tt class="py-op">+</tt><tt class="py-number">28</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+<a name="L853"></a><tt class="py-lineno"> 853</tt>  <tt class="py-line"> </tt>
+<a name="L854"></a><tt class="py-lineno"> 854</tt>  <tt class="py-line">    <tt class="py-name">sites</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
+<a name="L855"></a><tt class="py-lineno"> 855</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">site</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sites1</tt><tt class="py-op">:</tt> </tt>
+<a name="L856"></a><tt class="py-lineno"> 856</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">site</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sites2</tt><tt class="py-op">:</tt> </tt>
+<a name="L857"></a><tt class="py-lineno"> 857</tt>  <tt class="py-line">            <tt class="py-name">sites</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">site</tt><tt class="py-op">)</tt> </tt>
+<a name="L858"></a><tt class="py-lineno"> 858</tt>  <tt class="py-line">             </tt>
+<a name="L859"></a><tt class="py-lineno"> 859</tt>  <tt class="py-line">    <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">s1</tt> </tt>
+<a name="L860"></a><tt class="py-lineno"> 860</tt>  <tt class="py-line">    <tt class="py-name">syear</tt> <tt class="py-op">=</tt> <tt class="py-string">"%4d"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">dt</tt><tt class="py-op">.</tt><tt class="py-name">year</tt><tt class="py-op">,</tt><tt class="py-op">)</tt> </tt>
+<a name="L861"></a><tt class="py-lineno"> 861</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">site</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sites</tt><tt class="py-op">:</tt> </tt>
+<a name="L862"></a><tt class="py-lineno"> 862</tt>  <tt class="py-line">        <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">s</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">site</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-name">syear</tt> <tt class="py-op">+</tt> <tt class="py-name">s</tt><tt class="py-op">[</tt><tt class="py-name">site</tt><tt class="py-op">+</tt><tt class="py-number">4</tt><tt class="py-op">:< [...]
+<a name="L863"></a><tt class="py-lineno"> 863</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">s</tt> </tt>
+</div><a name="L864"></a><tt class="py-lineno"> 864</tt>  <tt class="py-line"> </tt>
+<a name="date2num"></a><div id="date2num-def"><a name="L865"></a><tt class="py-lineno"> 865</tt> <a class="py-toggle" href="#" id="date2num-toggle" onclick="return toggle('date2num');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#date2num">date2num</a><tt class="py-op">(</tt><tt class="py-param">dates</tt><tt class="py-op">,</tt><tt class="py-param">units</tt><tt class="py-op">,</tt><tt class="py-param">calendar</ [...]
+</div><div id="date2num-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="date2num-expanded"><a name="L866"></a><tt class="py-lineno"> 866</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L867"></a><tt class="py-lineno"> 867</tt>  <tt class="py-line"><tt class="py-docstring">date2num(dates,units,calendar='standard')</tt> </tt>
+<a name="L868"></a><tt class="py-lineno"> 868</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L869"></a><tt class="py-lineno"> 869</tt>  <tt class="py-line"><tt class="py-docstring">Return numeric time values given datetime objects. The units</tt> </tt>
+<a name="L870"></a><tt class="py-lineno"> 870</tt>  <tt class="py-line"><tt class="py-docstring">of the numeric time values are described by the L{units} argument</tt> </tt>
+<a name="L871"></a><tt class="py-lineno"> 871</tt>  <tt class="py-line"><tt class="py-docstring">and the L{calendar} keyword. The datetime objects must</tt> </tt>
+<a name="L872"></a><tt class="py-lineno"> 872</tt>  <tt class="py-line"><tt class="py-docstring">be in UTC with no time-zone offset.  If there is a </tt> </tt>
+<a name="L873"></a><tt class="py-lineno"> 873</tt>  <tt class="py-line"><tt class="py-docstring">time-zone offset in C{units}, it will be applied to the</tt> </tt>
+<a name="L874"></a><tt class="py-lineno"> 874</tt>  <tt class="py-line"><tt class="py-docstring">returned numeric values.</tt> </tt>
+<a name="L875"></a><tt class="py-lineno"> 875</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L876"></a><tt class="py-lineno"> 876</tt>  <tt class="py-line"><tt class="py-docstring">Like the matplotlib C{date2num} function, except that it allows</tt> </tt>
+<a name="L877"></a><tt class="py-lineno"> 877</tt>  <tt class="py-line"><tt class="py-docstring">for different units and calendars.  Behaves the same if</tt> </tt>
+<a name="L878"></a><tt class="py-lineno"> 878</tt>  <tt class="py-line"><tt class="py-docstring">C{units = 'days since 0001-01-01 00:00:00'} and </tt> </tt>
+<a name="L879"></a><tt class="py-lineno"> 879</tt>  <tt class="py-line"><tt class="py-docstring">C{calendar = 'proleptic_gregorian'}.</tt> </tt>
+<a name="L880"></a><tt class="py-lineno"> 880</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L881"></a><tt class="py-lineno"> 881</tt>  <tt class="py-line"><tt class="py-docstring">@param dates: A datetime object or a sequence of datetime objects.</tt> </tt>
+<a name="L882"></a><tt class="py-lineno"> 882</tt>  <tt class="py-line"><tt class="py-docstring"> The datetime objects should not include a time-zone offset.</tt> </tt>
+<a name="L883"></a><tt class="py-lineno"> 883</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L884"></a><tt class="py-lineno"> 884</tt>  <tt class="py-line"><tt class="py-docstring">@param units: a string of the form C{'B{time units} since B{reference time}}'</tt> </tt>
+<a name="L885"></a><tt class="py-lineno"> 885</tt>  <tt class="py-line"><tt class="py-docstring"> describing the time units. B{C{time units}} can be days, hours, minutes</tt> </tt>
+<a name="L886"></a><tt class="py-lineno"> 886</tt>  <tt class="py-line"><tt class="py-docstring"> or seconds.  B{C{reference time}} is the time origin. A valid choice</tt> </tt>
+<a name="L887"></a><tt class="py-lineno"> 887</tt>  <tt class="py-line"><tt class="py-docstring"> would be units=C{'hours since 1800-01-01 00:00:00 -6:00'}.</tt> </tt>
+<a name="L888"></a><tt class="py-lineno"> 888</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L889"></a><tt class="py-lineno"> 889</tt>  <tt class="py-line"><tt class="py-docstring">@param calendar: describes the calendar used in the time calculations. </tt> </tt>
+<a name="L890"></a><tt class="py-lineno"> 890</tt>  <tt class="py-line"><tt class="py-docstring"> All the values currently defined in the U{CF metadata convention </tt> </tt>
+<a name="L891"></a><tt class="py-lineno"> 891</tt>  <tt class="py-line"><tt class="py-docstring"> <http://cf-pcmdi.llnl.gov/documents/cf-conventions/>} are supported.</tt> </tt>
+<a name="L892"></a><tt class="py-lineno"> 892</tt>  <tt class="py-line"><tt class="py-docstring"> Valid calendars C{'standard', 'gregorian', 'proleptic_gregorian'</tt> </tt>
+<a name="L893"></a><tt class="py-lineno"> 893</tt>  <tt class="py-line"><tt class="py-docstring"> 'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'}.</tt> </tt>
+<a name="L894"></a><tt class="py-lineno"> 894</tt>  <tt class="py-line"><tt class="py-docstring"> Default is C{'standard'}, which is a mixed Julian/Gregorian calendar.</tt> </tt>
+<a name="L895"></a><tt class="py-lineno"> 895</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L896"></a><tt class="py-lineno"> 896</tt>  <tt class="py-line"><tt class="py-docstring">@return: a numeric time value, or an array of numeric time values.</tt> </tt>
+<a name="L897"></a><tt class="py-lineno"> 897</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L898"></a><tt class="py-lineno"> 898</tt>  <tt class="py-line"><tt class="py-docstring">The maximum resolution of the numeric time values is 1 second.</tt> </tt>
+<a name="L899"></a><tt class="py-lineno"> 899</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L900"></a><tt class="py-lineno"> 900</tt>  <tt class="py-line">    <tt class="py-name">cdftime</tt> <tt class="py-op">=</tt> <tt id="link-54" class="py-name" targets="Class netcdftime.netcdftime.utime=netcdftime.netcdftime.utime-class.html"><a title="netcdftime.netcdftime.utime" class="py-name" href="#" onclick="return doclink('link-54', 'utime', 'link-54');">utime</a></tt><tt class="py-op">(</tt><tt class="py-name">units</tt><tt class="py-op">,</tt><tt class="py-name">calendar< [...]
+<a name="L901"></a><tt class="py-lineno"> 901</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">cdftime</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name" targets="Function netCDF3.date2num()=netCDF3-module.html#date2num,Function netCDF4.date2num()=netCDF4-module.html#date2num,Function netcdftime.netcdftime.date2num()=netcdftime.netcdftime-module.html#date2num,Method netcdftime.netcdftime.utime.date2num()=netcdftime.netcdftime.utime-class.html [...]
+netCDF4.date2num
+netcdftime.netcdftime.date2num
+netcdftime.netcdftime.utime.date2num" class="py-name" href="#" onclick="return doclink('link-55', 'date2num', 'link-55');">date2num</a></tt><tt class="py-op">(</tt><tt class="py-name">dates</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L902"></a><tt class="py-lineno"> 902</tt>  <tt class="py-line"> </tt>
+<a name="num2date"></a><div id="num2date-def"><a name="L903"></a><tt class="py-lineno"> 903</tt> <a class="py-toggle" href="#" id="num2date-toggle" onclick="return toggle('num2date');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#num2date">num2date</a><tt class="py-op">(</tt><tt class="py-param">times</tt><tt class="py-op">,</tt><tt class="py-param">units</tt><tt class="py-op">,</tt><tt class="py-param">calendar</ [...]
+</div><div id="num2date-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="num2date-expanded"><a name="L904"></a><tt class="py-lineno"> 904</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L905"></a><tt class="py-lineno"> 905</tt>  <tt class="py-line"><tt class="py-docstring">num2date(times,units,calendar='standard')</tt> </tt>
+<a name="L906"></a><tt class="py-lineno"> 906</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L907"></a><tt class="py-lineno"> 907</tt>  <tt class="py-line"><tt class="py-docstring">Return datetime objects given numeric time values. The units</tt> </tt>
+<a name="L908"></a><tt class="py-lineno"> 908</tt>  <tt class="py-line"><tt class="py-docstring">of the numeric time values are described by the C{units} argument</tt> </tt>
+<a name="L909"></a><tt class="py-lineno"> 909</tt>  <tt class="py-line"><tt class="py-docstring">and the C{calendar} keyword. The returned datetime objects represent </tt> </tt>
+<a name="L910"></a><tt class="py-lineno"> 910</tt>  <tt class="py-line"><tt class="py-docstring">UTC with no time-zone offset, even if the specified </tt> </tt>
+<a name="L911"></a><tt class="py-lineno"> 911</tt>  <tt class="py-line"><tt class="py-docstring">C{units} contain a time-zone offset.</tt> </tt>
+<a name="L912"></a><tt class="py-lineno"> 912</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L913"></a><tt class="py-lineno"> 913</tt>  <tt class="py-line"><tt class="py-docstring">Like the matplotlib C{num2date} function, except that it allows</tt> </tt>
+<a name="L914"></a><tt class="py-lineno"> 914</tt>  <tt class="py-line"><tt class="py-docstring">for different units and calendars.  Behaves the same if</tt> </tt>
+<a name="L915"></a><tt class="py-lineno"> 915</tt>  <tt class="py-line"><tt class="py-docstring">C{units = 'days since 001-01-01 00:00:00'} and </tt> </tt>
+<a name="L916"></a><tt class="py-lineno"> 916</tt>  <tt class="py-line"><tt class="py-docstring">C{calendar = 'proleptic_gregorian'}.</tt> </tt>
+<a name="L917"></a><tt class="py-lineno"> 917</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L918"></a><tt class="py-lineno"> 918</tt>  <tt class="py-line"><tt class="py-docstring">@param times: numeric time values. Maximum resolution is 1 second.</tt> </tt>
+<a name="L919"></a><tt class="py-lineno"> 919</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L920"></a><tt class="py-lineno"> 920</tt>  <tt class="py-line"><tt class="py-docstring">@param units: a string of the form C{'B{time units} since B{reference time}}'</tt> </tt>
+<a name="L921"></a><tt class="py-lineno"> 921</tt>  <tt class="py-line"><tt class="py-docstring">describing the time units. B{C{time units}} can be days, hours, minutes</tt> </tt>
+<a name="L922"></a><tt class="py-lineno"> 922</tt>  <tt class="py-line"><tt class="py-docstring">or seconds.  B{C{reference time}} is the time origin. A valid choice</tt> </tt>
+<a name="L923"></a><tt class="py-lineno"> 923</tt>  <tt class="py-line"><tt class="py-docstring">would be units=C{'hours since 1800-01-01 00:00:00 -6:00'}.</tt> </tt>
+<a name="L924"></a><tt class="py-lineno"> 924</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L925"></a><tt class="py-lineno"> 925</tt>  <tt class="py-line"><tt class="py-docstring">@param calendar: describes the calendar used in the time calculations. </tt> </tt>
+<a name="L926"></a><tt class="py-lineno"> 926</tt>  <tt class="py-line"><tt class="py-docstring">All the values currently defined in the U{CF metadata convention </tt> </tt>
+<a name="L927"></a><tt class="py-lineno"> 927</tt>  <tt class="py-line"><tt class="py-docstring"><http://cf-pcmdi.llnl.gov/documents/cf-conventions/>} are supported.</tt> </tt>
+<a name="L928"></a><tt class="py-lineno"> 928</tt>  <tt class="py-line"><tt class="py-docstring">Valid calendars C{'standard', 'gregorian', 'proleptic_gregorian'</tt> </tt>
+<a name="L929"></a><tt class="py-lineno"> 929</tt>  <tt class="py-line"><tt class="py-docstring">'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'}.</tt> </tt>
+<a name="L930"></a><tt class="py-lineno"> 930</tt>  <tt class="py-line"><tt class="py-docstring">Default is C{'standard'}, which is a mixed Julian/Gregorian calendar.</tt> </tt>
+<a name="L931"></a><tt class="py-lineno"> 931</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L932"></a><tt class="py-lineno"> 932</tt>  <tt class="py-line"><tt class="py-docstring">@return: a datetime instance, or an array of datetime instances.</tt> </tt>
+<a name="L933"></a><tt class="py-lineno"> 933</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L934"></a><tt class="py-lineno"> 934</tt>  <tt class="py-line"><tt class="py-docstring">The datetime instances returned are 'real' python datetime </tt> </tt>
+<a name="L935"></a><tt class="py-lineno"> 935</tt>  <tt class="py-line"><tt class="py-docstring">objects if the date falls in the Gregorian calendar (i.e. </tt> </tt>
+<a name="L936"></a><tt class="py-lineno"> 936</tt>  <tt class="py-line"><tt class="py-docstring">C{calendar='proleptic_gregorian'}, or C{calendar = 'standard'} or C{'gregorian'}</tt> </tt>
+<a name="L937"></a><tt class="py-lineno"> 937</tt>  <tt class="py-line"><tt class="py-docstring">and the date is after 1582-10-15). Otherwise, they are 'phony' datetime </tt> </tt>
+<a name="L938"></a><tt class="py-lineno"> 938</tt>  <tt class="py-line"><tt class="py-docstring">objects which support some but not all the methods of 'real' python</tt> </tt>
+<a name="L939"></a><tt class="py-lineno"> 939</tt>  <tt class="py-line"><tt class="py-docstring">datetime objects.  This is because the python datetime module cannot</tt> </tt>
+<a name="L940"></a><tt class="py-lineno"> 940</tt>  <tt class="py-line"><tt class="py-docstring">the uses the C{'proleptic_gregorian'} calendar, even before the switch</tt> </tt>
+<a name="L941"></a><tt class="py-lineno"> 941</tt>  <tt class="py-line"><tt class="py-docstring">occured from the Julian calendar in 1582. The datetime instances</tt> </tt>
+<a name="L942"></a><tt class="py-lineno"> 942</tt>  <tt class="py-line"><tt class="py-docstring">do not contain a time-zone offset, even if the specified C{units}</tt> </tt>
+<a name="L943"></a><tt class="py-lineno"> 943</tt>  <tt class="py-line"><tt class="py-docstring">contains one.</tt> </tt>
+<a name="L944"></a><tt class="py-lineno"> 944</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L945"></a><tt class="py-lineno"> 945</tt>  <tt class="py-line">    <tt class="py-name">cdftime</tt> <tt class="py-op">=</tt> <tt id="link-56" class="py-name"><a title="netcdftime.netcdftime.utime" class="py-name" href="#" onclick="return doclink('link-56', 'utime', 'link-54');">utime</a></tt><tt class="py-op">(</tt><tt class="py-name">units</tt><tt class="py-op">,</tt><tt class="py-name">calendar</tt><tt class="py-op">=</tt><tt class="py-name">calendar</tt><tt class="py-op">)</t [...]
+<a name="L946"></a><tt class="py-lineno"> 946</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">cdftime</tt><tt class="py-op">.</tt><tt id="link-57" class="py-name" targets="Function netCDF3.num2date()=netCDF3-module.html#num2date,Function netCDF4.num2date()=netCDF4-module.html#num2date,Function netcdftime.netcdftime.num2date()=netcdftime.netcdftime-module.html#num2date,Method netcdftime.netcdftime.utime.num2date()=netcdftime.netcdftime.utime-class.html [...]
+netCDF4.num2date
+netcdftime.netcdftime.num2date
+netcdftime.netcdftime.utime.num2date" class="py-name" href="#" onclick="return doclink('link-57', 'num2date', 'link-57');">num2date</a></tt><tt class="py-op">(</tt><tt class="py-name">times</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L947"></a><tt class="py-lineno"> 947</tt>  <tt class="py-line"> </tt>
+<a name="_check_index"></a><div id="_check_index-def"><a name="L948"></a><tt class="py-lineno"> 948</tt> <a class="py-toggle" href="#" id="_check_index-toggle" onclick="return toggle('_check_index');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#_check_index">_check_index</a><tt class="py-op">(</tt><tt class="py-param">indices</tt><tt class="py-op">,</tt> <tt class="py-param">dates</tt><tt class="py-op">,</tt> <tt [...]
+</div><div id="_check_index-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_check_index-expanded"><a name="L949"></a><tt class="py-lineno"> 949</tt>  <tt class="py-line">    <tt class="py-docstring">"""Return True if the time indices given correspond to the given dates, </tt> </tt>
+<a name="L950"></a><tt class="py-lineno"> 950</tt>  <tt class="py-line"><tt class="py-docstring">    False otherwise.</tt> </tt>
+<a name="L951"></a><tt class="py-lineno"> 951</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
+<a name="L952"></a><tt class="py-lineno"> 952</tt>  <tt class="py-line"><tt class="py-docstring">    Parameters: </tt> </tt>
+<a name="L953"></a><tt class="py-lineno"> 953</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L954"></a><tt class="py-lineno"> 954</tt>  <tt class="py-line"><tt class="py-docstring">    indices : sequence of integers</tt> </tt>
+<a name="L955"></a><tt class="py-lineno"> 955</tt>  <tt class="py-line"><tt class="py-docstring">    Positive integers indexing the time variable.</tt> </tt>
+<a name="L956"></a><tt class="py-lineno"> 956</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L957"></a><tt class="py-lineno"> 957</tt>  <tt class="py-line"><tt class="py-docstring">    dates : sequence of datetime objects</tt> </tt>
+<a name="L958"></a><tt class="py-lineno"> 958</tt>  <tt class="py-line"><tt class="py-docstring">    Reference dates.</tt> </tt>
+<a name="L959"></a><tt class="py-lineno"> 959</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L960"></a><tt class="py-lineno"> 960</tt>  <tt class="py-line"><tt class="py-docstring">    nctime : netCDF Variable object</tt> </tt>
+<a name="L961"></a><tt class="py-lineno"> 961</tt>  <tt class="py-line"><tt class="py-docstring">    NetCDF time object.</tt> </tt>
+<a name="L962"></a><tt class="py-lineno"> 962</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L963"></a><tt class="py-lineno"> 963</tt>  <tt class="py-line"><tt class="py-docstring">    calendar : string</tt> </tt>
+<a name="L964"></a><tt class="py-lineno"> 964</tt>  <tt class="py-line"><tt class="py-docstring">    Calendar of nctime.</tt> </tt>
+<a name="L965"></a><tt class="py-lineno"> 965</tt>  <tt class="py-line"><tt class="py-docstring">     """</tt> </tt>
+<a name="L966"></a><tt class="py-lineno"> 966</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt>  <tt class="py-op">(</tt><tt class="py-name">indices</tt> <tt class="py-op"><</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">any</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L967"></a><tt class="py-lineno"> 967</tt>  <tt class="py-line">       <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
+<a name="L968"></a><tt class="py-lineno"> 968</tt>  <tt class="py-line">        </tt>
+<a name="L969"></a><tt class="py-lineno"> 969</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">indices</tt> <tt class="py-op">>=</tt> <tt class="py-name">nctime</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="netCDF3.Variable.shape
+netCDF4.Variable.shape" class="py-name" href="#" onclick="return doclink('link-58', 'shape', 'link-17');">shape</a></tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">any</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L970"></a><tt class="py-lineno"> 970</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
+<a name="L971"></a><tt class="py-lineno"> 971</tt>  <tt class="py-line">         </tt>
+<a name="L972"></a><tt class="py-lineno"> 972</tt>  <tt class="py-line">    <tt class="py-name">t</tt> <tt class="py-op">=</tt> <tt class="py-name">nctime</tt><tt class="py-op">[</tt><tt class="py-name">indices</tt><tt class="py-op">]</tt>  </tt>
+<a name="L973"></a><tt class="py-lineno"> 973</tt>  <tt class="py-line"><tt class="py-comment"># if fancy indexing not available, fall back on this.</tt> </tt>
+<a name="L974"></a><tt class="py-lineno"> 974</tt>  <tt class="py-line"><tt class="py-comment">#   t=[]</tt> </tt>
+<a name="L975"></a><tt class="py-lineno"> 975</tt>  <tt class="py-line"><tt class="py-comment">#   for ind in indices:</tt> </tt>
+<a name="L976"></a><tt class="py-lineno"> 976</tt>  <tt class="py-line"><tt class="py-comment">#       t.append(nctime[ind])</tt> </tt>
+<a name="L977"></a><tt class="py-lineno"> 977</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">numpy</tt><tt class="py-op">.</tt><tt class="py-name">all</tt><tt class="py-op">(</tt> <tt id="link-59" class="py-name"><a title="netCDF3.num2date
+netCDF4.num2date
+netcdftime.netcdftime.num2date
+netcdftime.netcdftime.utime.num2date" class="py-name" href="#" onclick="return doclink('link-59', 'num2date', 'link-57');">num2date</a></tt><tt class="py-op">(</tt><tt class="py-name">t</tt><tt class="py-op">,</tt> <tt class="py-name">nctime</tt><tt class="py-op">.</tt><tt class="py-name">units</tt><tt class="py-op">,</tt> <tt class="py-name">calendar</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">dates</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L978"></a><tt class="py-lineno"> 978</tt>  <tt class="py-line"> </tt>
+<a name="L979"></a><tt class="py-lineno"> 979</tt>  <tt class="py-line"> </tt>
+<a name="L980"></a><tt class="py-lineno"> 980</tt>  <tt class="py-line"> </tt>
+<a name="date2index"></a><div id="date2index-def"><a name="L981"></a><tt class="py-lineno"> 981</tt> <a class="py-toggle" href="#" id="date2index-toggle" onclick="return toggle('date2index');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#date2index">date2index</a><tt class="py-op">(</tt><tt class="py-param">dates</tt><tt class="py-op">,</tt> <tt class="py-param">nctime</tt><tt class="py-op">,</tt> <tt class="py-pa [...]
+</div><div id="date2index-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="date2index-expanded"><a name="L982"></a><tt class="py-lineno"> 982</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L983"></a><tt class="py-lineno"> 983</tt>  <tt class="py-line"><tt class="py-docstring">    date2index(dates, nctime, calendar=None, select='exact')</tt> </tt>
+<a name="L984"></a><tt class="py-lineno"> 984</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
+<a name="L985"></a><tt class="py-lineno"> 985</tt>  <tt class="py-line"><tt class="py-docstring">    Return indices of a netCDF time variable corresponding to the given dates.</tt> </tt>
+<a name="L986"></a><tt class="py-lineno"> 986</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
+<a name="L987"></a><tt class="py-lineno"> 987</tt>  <tt class="py-line"><tt class="py-docstring">    @param dates: A datetime object or a sequence of datetime objects.</tt> </tt>
+<a name="L988"></a><tt class="py-lineno"> 988</tt>  <tt class="py-line"><tt class="py-docstring">    The datetime objects should not include a time-zone offset.</tt> </tt>
+<a name="L989"></a><tt class="py-lineno"> 989</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
+<a name="L990"></a><tt class="py-lineno"> 990</tt>  <tt class="py-line"><tt class="py-docstring">    @param nctime: A netCDF time variable object. The nctime object must have a</tt> </tt>
+<a name="L991"></a><tt class="py-lineno"> 991</tt>  <tt class="py-line"><tt class="py-docstring">    C{units} attribute. The entries are assumed to be stored in increasing </tt> </tt>
+<a name="L992"></a><tt class="py-lineno"> 992</tt>  <tt class="py-line"><tt class="py-docstring">    order.</tt> </tt>
+<a name="L993"></a><tt class="py-lineno"> 993</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
+<a name="L994"></a><tt class="py-lineno"> 994</tt>  <tt class="py-line"><tt class="py-docstring">    @param calendar: Describes the calendar used in the time calculation.</tt> </tt>
+<a name="L995"></a><tt class="py-lineno"> 995</tt>  <tt class="py-line"><tt class="py-docstring">    Valid calendars C{'standard', 'gregorian', 'proleptic_gregorian'</tt> </tt>
+<a name="L996"></a><tt class="py-lineno"> 996</tt>  <tt class="py-line"><tt class="py-docstring">    'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'}.</tt> </tt>
+<a name="L997"></a><tt class="py-lineno"> 997</tt>  <tt class="py-line"><tt class="py-docstring">    Default is C{'standard'}, which is a mixed Julian/Gregorian calendar</tt> </tt>
+<a name="L998"></a><tt class="py-lineno"> 998</tt>  <tt class="py-line"><tt class="py-docstring">    If C{calendar} is None, its value is given by C{nctime.calendar} or</tt> </tt>
+<a name="L999"></a><tt class="py-lineno"> 999</tt>  <tt class="py-line"><tt class="py-docstring">    C{standard} if no such attribute exists.</tt> </tt>
+<a name="L1000"></a><tt class="py-lineno">1000</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
+<a name="L1001"></a><tt class="py-lineno">1001</tt>  <tt class="py-line"><tt class="py-docstring">    @param select: C{'exact', 'before', 'after', 'nearest'}</tt> </tt>
+<a name="L1002"></a><tt class="py-lineno">1002</tt>  <tt class="py-line"><tt class="py-docstring">    The index selection method. C{exact} will return the indices perfectly </tt> </tt>
+<a name="L1003"></a><tt class="py-lineno">1003</tt>  <tt class="py-line"><tt class="py-docstring">    matching the dates given. C{before} and C{after} will return the indices </tt> </tt>
+<a name="L1004"></a><tt class="py-lineno">1004</tt>  <tt class="py-line"><tt class="py-docstring">    corresponding to the dates just before or just after the given dates if </tt> </tt>
+<a name="L1005"></a><tt class="py-lineno">1005</tt>  <tt class="py-line"><tt class="py-docstring">    an exact match cannot be found. C{nearest} will return the indices that </tt> </tt>
+<a name="L1006"></a><tt class="py-lineno">1006</tt>  <tt class="py-line"><tt class="py-docstring">    correpond to the closest dates. </tt> </tt>
+<a name="L1007"></a><tt class="py-lineno">1007</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L1008"></a><tt class="py-lineno">1008</tt>  <tt class="py-line">    <tt class="py-comment"># Setting the calendar.</tt> </tt>
+<a name="L1009"></a><tt class="py-lineno">1009</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">calendar</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
+<a name="L1010"></a><tt class="py-lineno">1010</tt>  <tt class="py-line">        <tt class="py-name">calendar</tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">nctime</tt><tt class="py-op">,</tt> <tt class="py-string">'calendar'</tt><tt class="py-op">,</tt> <tt class="py-string">'standard'</tt><tt class="py-op">)</tt> </tt>
+<a name="L1011"></a><tt class="py-lineno">1011</tt>  <tt class="py-line">    </tt>
+<a name="L1012"></a><tt class="py-lineno">1012</tt>  <tt class="py-line">    <tt class="py-name">num</tt> <tt class="py-op">=</tt> <tt class="py-name">numpy</tt><tt class="py-op">.</tt><tt class="py-name">atleast_1d</tt><tt class="py-op">(</tt><tt id="link-60" class="py-name"><a title="netCDF3.date2num
+netCDF4.date2num
+netcdftime.netcdftime.date2num
+netcdftime.netcdftime.utime.date2num" class="py-name" href="#" onclick="return doclink('link-60', 'date2num', 'link-55');">date2num</a></tt><tt class="py-op">(</tt><tt class="py-name">dates</tt><tt class="py-op">,</tt> <tt class="py-name">nctime</tt><tt class="py-op">.</tt><tt class="py-name">units</tt><tt class="py-op">,</tt> <tt class="py-name">calendar</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+<a name="L1013"></a><tt class="py-lineno">1013</tt>  <tt class="py-line">    <tt class="py-name">N</tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">nctime</tt><tt class="py-op">)</tt> </tt>
+<a name="L1014"></a><tt class="py-lineno">1014</tt>  <tt class="py-line">     </tt>
+<a name="L1015"></a><tt class="py-lineno">1015</tt>  <tt class="py-line">    <tt class="py-comment"># Trying to infer the correct index from the starting time and the stride.</tt> </tt>
+<a name="L1016"></a><tt class="py-lineno">1016</tt>  <tt class="py-line">    <tt class="py-comment"># This assumes that the times are increasing uniformly.</tt> </tt>
+<a name="L1017"></a><tt class="py-lineno">1017</tt>  <tt class="py-line">    <tt class="py-name">t0</tt><tt class="py-op">,</tt> <tt class="py-name">t1</tt> <tt class="py-op">=</tt> <tt class="py-name">nctime</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">2</tt><tt class="py-op">]</tt> </tt>
+<a name="L1018"></a><tt class="py-lineno">1018</tt>  <tt class="py-line">    <tt class="py-name">dt</tt> <tt class="py-op">=</tt> <tt class="py-name">t1</tt> <tt class="py-op">-</tt> <tt class="py-name">t0</tt> </tt>
+<a name="L1019"></a><tt class="py-lineno">1019</tt>  <tt class="py-line">    <tt class="py-name">index</tt> <tt class="py-op">=</tt> <tt class="py-name">numpy</tt><tt class="py-op">.</tt><tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">num</tt><tt class="py-op">-</tt><tt class="py-name">t0</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">dt</tt><tt class="py-op">,</tt> <tt class="py-name">int</tt><tt class="py-op">)< [...]
+<a name="L1020"></a><tt class="py-lineno">1020</tt>  <tt class="py-line"> </tt>
+<a name="L1021"></a><tt class="py-lineno">1021</tt>  <tt class="py-line">    <tt class="py-comment"># Checking that the index really corresponds to the given date.</tt> </tt>
+<a name="L1022"></a><tt class="py-lineno">1022</tt>  <tt class="py-line">    <tt class="py-comment"># If the times do not correspond, then it means that the times</tt> </tt>
+<a name="L1023"></a><tt class="py-lineno">1023</tt>  <tt class="py-line">    <tt class="py-comment"># are not increasing uniformly and we try the bisection method.</tt> </tt>
+<a name="L1024"></a><tt class="py-lineno">1024</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">_check_index</tt><tt class="py-op">(</tt><tt class="py-name">index</tt><tt class="py-op">,</tt> <tt class="py-name">dates</tt><tt class="py-op">,</tt> <tt class="py-name">nctime</tt><tt class="py-op">,</tt> <tt class="py-name">calendar</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L1025"></a><tt class="py-lineno">1025</tt>  <tt class="py-line">         </tt>
+<a name="L1026"></a><tt class="py-lineno">1026</tt>  <tt class="py-line">        <tt class="py-comment"># Use the bisection method. Assumes the dates are ordered.</tt> </tt>
+<a name="L1027"></a><tt class="py-lineno">1027</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt class="py-name">bisect</tt> </tt>
+<a name="L1028"></a><tt class="py-lineno">1028</tt>  <tt class="py-line">        <tt class="py-name">index</tt> <tt class="py-op">=</tt> <tt class="py-name">numpy</tt><tt class="py-op">.</tt><tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">bisect</tt><tt class="py-op">.</tt><tt class="py-name">bisect_left</tt><tt class="py-op">(</tt><tt class="py-name">nctime</tt><tt class="py-op">,</tt> <tt class="py-name">n</tt><tt class="py-op">)</tt> < [...]
+<a name="L1029"></a><tt class="py-lineno">1029</tt>  <tt class="py-line">                </tt>
+<a name="L1030"></a><tt class="py-lineno">1030</tt>  <tt class="py-line">        <tt class="py-name">after</tt> <tt class="py-op">=</tt> <tt class="py-name">index</tt> <tt class="py-op">==</tt> <tt class="py-name">N</tt> </tt>
+<a name="L1031"></a><tt class="py-lineno">1031</tt>  <tt class="py-line">        <tt class="py-name">before</tt> <tt class="py-op">=</tt> <tt class="py-name">index</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt> </tt>
+<a name="L1032"></a><tt class="py-lineno">1032</tt>  <tt class="py-line">         </tt>
+<a name="L1033"></a><tt class="py-lineno">1033</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">select</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'before'</tt><tt class="py-op">,</tt> <tt class="py-string">'exact'</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-name">numpy</tt><tt class="py-op">.</tt><tt class="py-name">any</tt><tt class="py-op">(</tt><tt class="py-name">before</tt><tt c [...]
+<a name="L1034"></a><tt class="py-lineno">1034</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">'At least one of the dates given is before the first date in `nctime`.'</tt> </tt>
+<a name="L1035"></a><tt class="py-lineno">1035</tt>  <tt class="py-line">         </tt>
+<a name="L1036"></a><tt class="py-lineno">1036</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">select</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'after'</tt><tt class="py-op">,</tt> <tt class="py-string">'exact'</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-name">numpy</tt><tt class="py-op">.</tt><tt class="py-name">any</tt><tt class="py-op">(</tt><tt class="py-name">after</tt><tt cla [...]
+<a name="L1037"></a><tt class="py-lineno">1037</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">'At least one of the dates given is after the last date in `nctime`.'</tt> </tt>
+<a name="L1038"></a><tt class="py-lineno">1038</tt>  <tt class="py-line">             </tt>
+<a name="L1039"></a><tt class="py-lineno">1039</tt>  <tt class="py-line">         </tt>
+<a name="L1040"></a><tt class="py-lineno">1040</tt>  <tt class="py-line">        <tt class="py-comment"># Find the dates for which the match is not perfect.</tt> </tt>
+<a name="L1041"></a><tt class="py-lineno">1041</tt>  <tt class="py-line">        <tt class="py-comment"># Use list comprehension instead of the simpler `nctime[index]` since</tt> </tt>
+<a name="L1042"></a><tt class="py-lineno">1042</tt>  <tt class="py-line">        <tt class="py-comment"># not all time objects support numpy integer indexing (eg dap).</tt> </tt>
+<a name="L1043"></a><tt class="py-lineno">1043</tt>  <tt class="py-line">        <tt class="py-name">index</tt><tt class="py-op">[</tt><tt class="py-name">after</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">N</tt><tt class="py-op">-</tt><tt class="py-number">1</tt> </tt>
+<a name="L1044"></a><tt class="py-lineno">1044</tt>  <tt class="py-line">        <tt class="py-name">ncnum</tt> <tt class="py-op">=</tt> <tt class="py-name">numpy</tt><tt class="py-op">.</tt><tt class="py-name">squeeze</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">nctime</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">index [...]
+<a name="L1045"></a><tt class="py-lineno">1045</tt>  <tt class="py-line">        <tt class="py-name">mismatch</tt> <tt class="py-op">=</tt> <tt class="py-name">numpy</tt><tt class="py-op">.</tt><tt class="py-name">nonzero</tt><tt class="py-op">(</tt><tt class="py-name">ncnum</tt> <tt class="py-op">!=</tt> <tt class="py-name">num</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
+<a name="L1046"></a><tt class="py-lineno">1046</tt>  <tt class="py-line">                    </tt>
+<a name="L1047"></a><tt class="py-lineno">1047</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">select</tt> <tt class="py-op">==</tt> <tt class="py-string">'exact'</tt><tt class="py-op">:</tt> </tt>
+<a name="L1048"></a><tt class="py-lineno">1048</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">mismatch</tt><tt class="py-op">)</tt> <tt class="py-op">></tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
+<a name="L1049"></a><tt class="py-lineno">1049</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">'Some of the dates specified were not found in the `nctime` variable.'</tt> </tt>
+<a name="L1050"></a><tt class="py-lineno">1050</tt>  <tt class="py-line">    </tt>
+<a name="L1051"></a><tt class="py-lineno">1051</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">select</tt> <tt class="py-op">==</tt> <tt class="py-string">'before'</tt><tt class="py-op">:</tt> </tt>
+<a name="L1052"></a><tt class="py-lineno">1052</tt>  <tt class="py-line">            <tt class="py-name">index</tt><tt class="py-op">[</tt><tt class="py-name">after</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">N</tt> </tt>
+<a name="L1053"></a><tt class="py-lineno">1053</tt>  <tt class="py-line">            <tt class="py-name">index</tt><tt class="py-op">[</tt><tt class="py-name">mismatch</tt><tt class="py-op">]</tt> <tt class="py-op">-=</tt> <tt class="py-number">1</tt> </tt>
+<a name="L1054"></a><tt class="py-lineno">1054</tt>  <tt class="py-line">                </tt>
+<a name="L1055"></a><tt class="py-lineno">1055</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">select</tt> <tt class="py-op">==</tt> <tt class="py-string">'after'</tt><tt class="py-op">:</tt> </tt>
+<a name="L1056"></a><tt class="py-lineno">1056</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
+<a name="L1057"></a><tt class="py-lineno">1057</tt>  <tt class="py-line">        </tt>
+<a name="L1058"></a><tt class="py-lineno">1058</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">select</tt> <tt class="py-op">==</tt> <tt class="py-string">'nearest'</tt><tt class="py-op">:</tt> </tt>
+<a name="L1059"></a><tt class="py-lineno">1059</tt>  <tt class="py-line">            <tt class="py-name">nearest_to_left</tt> <tt class="py-op">=</tt> <tt class="py-name">num</tt><tt class="py-op">[</tt><tt class="py-name">mismatch</tt><tt class="py-op">]</tt> <tt class="py-op"><</tt> <tt class="py-name">numpy</tt><tt class="py-op">.</tt><tt class="py-name">array</tt><tt class="py-op">(</tt> <tt class="py-op">[</tt><tt class="py-name">nctime</tt><tt class="py-op">[</tt><tt class="py-n [...]
+<a name="L1060"></a><tt class="py-lineno">1060</tt>  <tt class="py-line">            <tt class="py-name">index</tt><tt class="py-op">[</tt><tt class="py-name">mismatch</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">index</tt><tt class="py-op">[</tt><tt class="py-name">mismatch</tt><tt class="py-op">]</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt> <tt class="py-op">*</tt> <tt class="py-name">nearest_to_left</tt> </tt>
+<a name="L1061"></a><tt class="py-lineno">1061</tt>  <tt class="py-line">        </tt>
+<a name="L1062"></a><tt class="py-lineno">1062</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L1063"></a><tt class="py-lineno">1063</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"%s is not an option for the `select` argument."</tt><tt class="py-op">%</tt><tt class="py-name">select</tt><tt class="py-op">)</tt> </tt>
+<a name="L1064"></a><tt class="py-lineno">1064</tt>  <tt class="py-line">    </tt>
+<a name="L1065"></a><tt class="py-lineno">1065</tt>  <tt class="py-line"> </tt>
+<a name="L1066"></a><tt class="py-lineno">1066</tt>  <tt class="py-line">        <tt class="py-comment"># Correct for indices equal to -1</tt> </tt>
+<a name="L1067"></a><tt class="py-lineno">1067</tt>  <tt class="py-line">        <tt class="py-name">index</tt><tt class="py-op">[</tt><tt class="py-name">before</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L1068"></a><tt class="py-lineno">1068</tt>  <tt class="py-line">         </tt>
+<a name="L1069"></a><tt class="py-lineno">1069</tt>  <tt class="py-line">    <tt class="py-comment"># convert numpy scalars or single element arrays to python ints.</tt> </tt>
+<a name="L1070"></a><tt class="py-lineno">1070</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">_toscalar</tt><tt class="py-op">(</tt><tt class="py-name">index</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L1071"></a><tt class="py-lineno">1071</tt>  <tt class="py-line"> </tt>
+<a name="L1072"></a><tt class="py-lineno">1072</tt>  <tt class="py-line"> </tt>
+<a name="_toscalar"></a><div id="_toscalar-def"><a name="L1073"></a><tt class="py-lineno">1073</tt> <a class="py-toggle" href="#" id="_toscalar-toggle" onclick="return toggle('_toscalar');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="netcdftime.netcdftime-module.html#_toscalar">_toscalar</a><tt class="py-op">(</tt><tt class="py-param">a</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_toscalar-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_toscalar-expanded"><a name="L1074"></a><tt class="py-lineno">1074</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-61" class="py-name"><a title="netCDF3.Variable.shape
+netCDF4.Variable.shape" class="py-name" href="#" onclick="return doclink('link-61', 'shape', 'link-17');">shape</a></tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L1075"></a><tt class="py-lineno">1075</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">a</tt><tt class="py-op">.</tt><tt class="py-name">item</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L1076"></a><tt class="py-lineno">1076</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L1077"></a><tt class="py-lineno">1077</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">a</tt> </tt>
+</div><a name="L1078"></a><tt class="py-lineno">1078</tt>  <tt class="py-line"> </tt><script type="text/javascript">
+<!--
+expandto(location.href);
+// -->
+</script>
+</pre>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Thu Jul  8 10:58:35 2010
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netcdftime.netcdftime.datetime-class.html b/docs/netcdftime.netcdftime.datetime-class.html
new file mode 100644
index 0000000..ee6a904
--- /dev/null
+++ b/docs/netcdftime.netcdftime.datetime-class.html
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netcdftime.netcdftime.datetime</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        Package netcdftime ::
+        <a href="netcdftime.netcdftime-module.html">Module netcdftime</a> ::
+        Class datetime
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== CLASS DESCRIPTION ==================== -->
+<h1 class="epydoc">Class datetime</h1><p class="nomargin-top"><span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#datetime">source code</a></span></p>
+<p>Phony datetime object which mimics the python datetime object, but 
+  allows for dates that don't exist in the proleptic gregorian calendar. 
+  Doesn't do timedelta operations, doesn't overload + and -.</p>
+  <p>Has strftime, timetuple and __repr__ methods.  The format of the 
+  string produced by __repr__ is controlled by self.format (default 
+  %Y-%m-%d %H:%M:%S).</p>
+  <p>Instance variables are 
+  year,month,day,hour,minute,second,dayofwk,dayofyr and format.</p>
+
+<!-- ==================== INSTANCE METHODS ==================== -->
+<a name="section-InstanceMethods"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Methods</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">year</span>,
+        <span class="summary-sig-arg">month</span>,
+        <span class="summary-sig-arg">day</span>,
+        <span class="summary-sig-arg">hour</span>=<span class="summary-sig-default">0</span>,
+        <span class="summary-sig-arg">minute</span>=<span class="summary-sig-default">0</span>,
+        <span class="summary-sig-arg">second</span>=<span class="summary-sig-default">0</span>,
+        <span class="summary-sig-arg">dayofwk</span>=<span class="summary-sig-default">-1</span>,
+        <span class="summary-sig-arg">dayofyr</span>=<span class="summary-sig-default">1</span>)</span><br />
+      dayofyr set to 1 by default - otherwise time.strftime will complain</td>
+          <td align="right" valign="top">
+            <span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#datetime.__init__">source code</a></span>
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="__repr__"></a><span class="summary-sig-name">__repr__</span>(<span class="summary-sig-arg">self</span>)</span></td>
+          <td align="right" valign="top">
+            <span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#datetime.__repr__">source code</a></span>
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="strftime"></a><span class="summary-sig-name">strftime</span>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">format</span>=<span class="summary-sig-default">None</span>)</span></td>
+          <td align="right" valign="top">
+            <span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#datetime.strftime">source code</a></span>
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a name="timetuple"></a><span class="summary-sig-name">timetuple</span>(<span class="summary-sig-arg">self</span>)</span></td>
+          <td align="right" valign="top">
+            <span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#datetime.timetuple">source code</a></span>
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+</table>
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Thu Jul  8 10:58:35 2010
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/netcdftime.netcdftime.utime-class.html b/docs/netcdftime.netcdftime.utime-class.html
new file mode 100644
index 0000000..791f01b
--- /dev/null
+++ b/docs/netcdftime.netcdftime.utime-class.html
@@ -0,0 +1,467 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>netcdftime.netcdftime.utime</title>
+  <link rel="stylesheet" href="epydoc.css" type="text/css" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+
+<body bgcolor="white" text="black" link="blue" vlink="#204080"
+      alink="#204080">
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table width="100%" cellpadding="0" cellspacing="0">
+  <tr valign="top">
+    <td width="100%">
+      <span class="breadcrumbs">
+        Package netcdftime ::
+        <a href="netcdftime.netcdftime-module.html">Module netcdftime</a> ::
+        Class utime
+      </span>
+    </td>
+    <td>
+      <table cellpadding="0" cellspacing="0">
+        <!-- hide/show private -->
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- ==================== CLASS DESCRIPTION ==================== -->
+<h1 class="epydoc">Class utime</h1><p class="nomargin-top"><span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#utime">source code</a></span></p>
+<p>Performs conversions of netCDF time coordinate data to/from datetime 
+  objects.</p>
+  <p>To initialize: <code>t = 
+  utime(unit_string,calendar='standard')</code></p>
+  <p>where</p>
+  <p><b><code>unit_string</code></b> is a string of the form 
+  <code>'time-units since <time-origin>'</code> defining the time 
+  units.</p>
+  <p>Valid time-units are days, hours, minutes and seconds (the singular 
+  forms are also accepted). An example unit_string would be <code>'hours 
+  since 0001-01-01 00:00:00'</code>.</p>
+  <p>The <b><code>calendar</code></b> keyword describes the calendar used 
+  in the time calculations. All the values currently defined in the <a 
+  href="http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.1/cf-conventions.html#time-coordinate"
+  target="_top">CF metadata convention</a> are accepted. The default is 
+  <code>'standard'</code>, which corresponds to the mixed Gregorian/Julian 
+  calendar used by the <code>udunits library</code>. Valid calendars 
+  are:</p>
+  <p><code>'gregorian'</code> or <code>'standard'</code> (default):</p>
+  <p>Mixed Gregorian/Julian calendar as defined by udunits.</p>
+  <p><code>'proleptic_gregorian'</code>:</p>
+  <p>A Gregorian calendar extended to dates before 1582-10-15. That is, a 
+  year is a leap year if either (i) it is divisible by 4 but not by 100 or 
+  (ii) it is divisible by 400.</p>
+  <p><code>'noleap'</code> or <code>'365_day'</code>:</p>
+  <p>Gregorian calendar without leap years, i.e., all years are 365 days 
+  long. all_leap or 366_day Gregorian calendar with every year being a leap
+  year, i.e., all years are 366 days long.</p>
+  <p><code>'360_day'</code>:</p>
+  <p>All years are 360 days divided into 30 day months.</p>
+  <p><code>'julian'</code>:</p>
+  <p>Proleptic Julian calendar, extended to dates after 1582-10-5. A year 
+  is a leap year if it is divisible by 4.</p>
+  <p>The <code><a href="netcdftime.netcdftime.utime-class.html#num2date" 
+  class="link">num2date</a></code> and <code><a 
+  href="netcdftime.netcdftime.utime-class.html#date2num" 
+  class="link">date2num</a></code> class methods can used to convert 
+  datetime instances to/from the specified time units using the specified 
+  calendar.</p>
+  <p>The datetime instances returned by <code>num2date</code> are 'real' 
+  python datetime objects if the date falls in the Gregorian calendar (i.e.
+  <code>calendar='proleptic_gregorian', 'standard'</code> or 
+  <code>'gregorian'</code> and the date is after 1582-10-15). Otherwise, 
+  they are 'phony' datetime objects which are actually instances of 
+  <code><a href="netcdftime.netcdftime.datetime-class.html" 
+  class="link">netcdftime.datetime</a></code>.  This is because the python 
+  datetime module cannot handle the weird dates in some calendars (such as 
+  <code>'360_day'</code> and <code>'all_leap'</code>) which don't exist in 
+  any real world calendar.</p>
+  <p>Example usage:</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">from</span> netcdftime <span class="py-keyword">import</span> utime
+<span class="py-prompt">>>> </span><span class="py-keyword">from</span> datetime <span class="py-keyword">import</span>  datetime
+<span class="py-prompt">>>> </span>cdftime = utime(<span class="py-string">'hours since 0001-01-01 00:00:00'</span>)
+<span class="py-prompt">>>> </span>date = datetime.now()
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> date
+<span class="py-output">2006-03-17 16:04:02.561678</span>
+<span class="py-output"></span><span class="py-prompt">>>></span>
+<span class="py-prompt">>>> </span>t = cdftime.date2num(date)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> t
+<span class="py-output">17577328.0672</span>
+<span class="py-output"></span><span class="py-prompt">>>></span>
+<span class="py-prompt">>>> </span>date = cdftime.num2date(t)
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> date
+<span class="py-output">2006-03-17 16:04:02</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+  <p>The resolution of the transformation operation is 1 second.</p>
+  <p>Warning:  Dates between 1582-10-5 and 1582-10-15 do not exist in the 
+  <code>'standard'</code> or <code>'gregorian'</code> calendars.  An 
+  exception will be raised if you pass a 'datetime-like' object in that 
+  range to the <code><a 
+  href="netcdftime.netcdftime.utime-class.html#date2num" 
+  class="link">date2num</a></code> class method.</p>
+  <p>Words of Wisdom from the British MetOffice concerning reference 
+  dates:</p>
+  <p>"udunits implements the mixed Gregorian/Julian calendar system, 
+  as followed in England, in which dates prior to 1582-10-15 are assumed to
+  use the Julian calendar. Other software cannot be relied upon to handle 
+  the change of calendar in the same way, so for robustness it is 
+  recommended that the reference date be later than 1582. If earlier dates 
+  must be used, it should be noted that udunits treats 0 AD as identical to
+  1 AD."</p>
+
+<!-- ==================== INSTANCE METHODS ==================== -->
+<a name="section-InstanceMethods"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Methods</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netcdftime.netcdftime.utime-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">unit_string</span>,
+        <span class="summary-sig-arg">calendar</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">standard</code><code class="variable-quote">'</code></span>)</span><br />
+      Returns:
+      A class instance which may be used for converting times from netCDF 
+      units to datetime objects.</td>
+          <td align="right" valign="top">
+            <span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#utime.__init__">source code</a></span>
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netcdftime.netcdftime.utime-class.html#date2num" class="summary-sig-name">date2num</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">date</span>)</span><br />
+      Returns <code>time_value</code> in units described by <a 
+      href="netcdftime.netcdftime.utime-class.html#unit_string" 
+      class="link">unit_string</a>, using the specified <a 
+      href="netcdftime.netcdftime.utime-class.html#calendar" 
+      class="link">calendar</a>, given a 'datetime-like' object.</td>
+          <td align="right" valign="top">
+            <span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#utime.date2num">source code</a></span>
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="netcdftime.netcdftime.utime-class.html#num2date" class="summary-sig-name">num2date</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">time_value</span>)</span><br />
+      Return a 'datetime-like' object given a <code>time_value</code> in 
+      units described by <a 
+      href="netcdftime.netcdftime.utime-class.html#unit_string" 
+      class="link">unit_string</a>, using <a 
+      href="netcdftime.netcdftime.utime-class.html#calendar" 
+      class="link">calendar</a>.</td>
+          <td align="right" valign="top">
+            <span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#utime.num2date">source code</a></span>
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+</table>
+<!-- ==================== INSTANCE VARIABLES ==================== -->
+<a name="section-InstanceVariables"></a>
+<table class="summary" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Variables</span></td>
+</tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="calendar"></a><span class="summary-name">calendar</span><br />
+      the calendar used (as specified by the <code>calendar</code> 
+      keyword).
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="origin"></a><span class="summary-name">origin</span><br />
+      datetime instance defining the origin of the netCDF time variable.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="unit_string"></a><span class="summary-name">unit_string</span><br />
+      a string defining the the netCDF time variable.
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a href="netcdftime.netcdftime.utime-class.html#units" class="summary-name">units</a><br />
+      the units part of <code>unit_string</code> (i.e.
+    </td>
+  </tr>
+</table>
+<!-- ==================== METHOD DETAILS ==================== -->
+<a name="section-MethodDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Method Details</span></td>
+</tr>
+</table>
+<a name="__init__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">unit_string</span>,
+        <span class="sig-arg">calendar</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">standard</code><code class="variable-quote">'</code></span>)</span>
+    <br /><em class="fname">(Constructor)</em>
+  </h3>
+  </td><td align="right" valign="top"
+    ><span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#utime.__init__">source code</a></span> 
+    </td>
+  </tr></table>
+  
+  
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>unit_string</code></strong> - a string of the form <code>'time-units since 
+          <time-origin>'</code> defining the time units.
+          <p>Valid time-units are days, hours, minutes and seconds (the 
+          singular forms are also accepted). An example unit_string would 
+          be <code>'hours since 0001-01-01 00:00:00'</code>.</p></li>
+        <li><strong class="pname"><code>calendar</code></strong> - describes the calendar used in the time calculations. All the 
+          values currently defined in the <a 
+          href="http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.1/cf-conventions.html#time-coordinate"
+          target="_top">CF metadata convention</a> are accepted. The 
+          default is <code>'standard'</code>, which corresponds to the 
+          mixed Gregorian/Julian calendar used by the <code>udunits 
+          library</code>. Valid calendars are:
+          <ul>
+            <li>
+              <code>'gregorian'</code> or <code>'standard'</code> 
+              (default): Mixed Gregorian/Julian calendar as defined by 
+              udunits.
+            </li>
+            <li>
+              <code>'proleptic_gregorian'</code>: A Gregorian calendar 
+              extended to dates before 1582-10-15. That is, a year is a 
+              leap year if either (i) it is divisible by 4 but not by 100 
+              or (ii) it is divisible by 400.
+            </li>
+            <li>
+              <code>'noleap'</code> or <code>'365_day'</code>: Gregorian 
+              calendar without leap years, i.e., all years are 365 days 
+              long.
+            </li>
+            <li>
+              <code>'all_leap'</code> or <code>'366_day'</code>: Gregorian 
+              calendar with every year being a leap year, i.e., all years 
+              are 366 days long. -<code>'360_day'</code>: All years are 360
+              days divided into 30 day months. -<code>'julian'</code>: 
+              Proleptic Julian calendar, extended to dates after 1582-10-5.
+              A year is a leap year if it is divisible by 4.
+            </li>
+          </ul></li>
+    </ul></dd>
+    <dt>Returns:</dt>
+        <dd>A class instance which may be used for converting times from 
+          netCDF units to datetime objects.</dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="date2num"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">date2num</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">date</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    ><span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#utime.date2num">source code</a></span> 
+    </td>
+  </tr></table>
+  
+  <p>Returns <code>time_value</code> in units described by <a 
+  href="netcdftime.netcdftime.utime-class.html#unit_string" 
+  class="link">unit_string</a>, using the specified <a 
+  href="netcdftime.netcdftime.utime-class.html#calendar" 
+  class="link">calendar</a>, given a 'datetime-like' object.</p>
+  <p>The datetime object must represent UTC with no time-zone offset. If 
+  there is a time-zone offset implied by <a 
+  href="netcdftime.netcdftime.utime-class.html#unit_string" 
+  class="link">unit_string</a>, it will be applied to the returned numeric 
+  values.</p>
+  <p>Resolution is 1 second.</p>
+  <p>If <code>calendar = 'standard'</code> or <code>'gregorian'</code> 
+  (indicating that the mixed Julian/Gregorian calendar is to be used), an 
+  exception will be raised if the 'datetime-like' object describes a date 
+  between 1582-10-5 and 1582-10-15.</p>
+  <p>Works for scalars, sequences and numpy arrays. Returns a scalar if 
+  input is a scalar, else returns a numpy array.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<a name="num2date"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">num2date</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">time_value</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    ><span class="codelink"><a href="netcdftime.netcdftime-pysrc.html#utime.num2date">source code</a></span> 
+    </td>
+  </tr></table>
+  
+  <p>Return a 'datetime-like' object given a <code>time_value</code> in 
+  units described by <a 
+  href="netcdftime.netcdftime.utime-class.html#unit_string" 
+  class="link">unit_string</a>, using <a 
+  href="netcdftime.netcdftime.utime-class.html#calendar" 
+  class="link">calendar</a>.</p>
+  <p>dates are in UTC with no offset, even if <a 
+  href="netcdftime.netcdftime.utime-class.html#unit_string" 
+  class="link">unit_string</a> contains a time zone offset from UTC.</p>
+  <p>Resolution is 1 second.</p>
+  <p>Works for scalars, sequences and numpy arrays. Returns a scalar if 
+  input is a scalar, else returns a numpy array.</p>
+  <p>The datetime instances returned by <code>num2date</code> are 'real' 
+  python datetime objects if the date falls in the Gregorian calendar (i.e.
+  <code>calendar='proleptic_gregorian'</code>, or <code>calendar = 
+  'standard'/'gregorian'</code> and the date is after 1582-10-15). 
+  Otherwise, they are 'phony' datetime objects which are actually instances
+  of netcdftime.datetime.  This is because the python datetime module 
+  cannot handle the weird dates in some calendars (such as 
+  <code>'360_day'</code> and <code>'all_leap'</code>) which do not exist in
+  any real world calendar.</p>
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== INSTANCE VARIABLE DETAILS ==================== -->
+<a name="section-InstanceVariableDetails"></a>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr bgcolor="#70b0f0" class="table-header">
+  <td align="left" colspan="2" class="table-header">
+    <span class="table-header">Instance Variable Details</span></td>
+</tr>
+</table>
+<a name="units"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <h3 class="epydoc">units</h3>
+  the units part of <code>unit_string</code> (i.e. 'days', 'hours', 
+  'seconds').
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
+<br />
+<!-- ==================== NAVIGATION BAR ==================== -->
+<table class="navbar" border="0" width="100%" cellpadding="0"
+       bgcolor="#a0c0ff" cellspacing="0">
+  <tr valign="middle">
+
+  <!-- Tree link -->
+      <th>   <a
+        href="module-tree.html">Trees</a>   </th>
+
+  <!-- Index link -->
+      <th>   <a
+        href="identifier-index.html">Indices</a>   </th>
+
+  <!-- Help link -->
+      <th>   <a
+        href="help.html">Help</a>   </th>
+
+      <th class="navbar" width="100%"></th>
+  </tr>
+</table>
+<table border="0" cellpadding="0" cellspacing="0" width="100%%">
+  <tr>
+    <td align="left" class="footer">
+    Generated by Epydoc 3.0.1 on Thu Jul  8 10:58:35 2010
+    </td>
+    <td align="right" class="footer">
+      <a target="mainFrame" href="http://epydoc.sourceforge.net"
+        >http://epydoc.sourceforge.net</a>
+    </td>
+  </tr>
+</table>
+
+<script type="text/javascript">
+  <!--
+  // Private objects are initially displayed (because if
+  // javascript is turned off then we want them to be
+  // visible); but by default, we want to hide them.  So hide
+  // them unless we have a cookie that says to show them.
+  checkCookie();
+  // -->
+</script>
+</body>
+</html>
diff --git a/docs/redirect.html b/docs/redirect.html
new file mode 100644
index 0000000..747dc24
--- /dev/null
+++ b/docs/redirect.html
@@ -0,0 +1,38 @@
+<html><head><title>Epydoc Redirect Page</title>
+<meta http-equiv="cache-control" content="no-cache" />
+<meta http-equiv="expires" content="0" />
+<meta http-equiv="pragma" content="no-cache" />
+  <script type="text/javascript" src="epydoc.js"></script>
+</head>
+<body>
+<script type="text/javascript">
+<!--
+var pages = ["netCDF4.CompoundType-c", "netCDF4.Dimension-c", "netCDF4.MFDataset-c", "netCDF4.Variable-c", "netCDF4.Dataset-c", "netCDF4.MFTime-c", "netCDF4.VLType-c", "netCDF4.Group-c", "netCDF4-m"];
+var dottedName = get_anchor();
+if (dottedName) {
+    var target = redirect_url(dottedName);
+    if (target) window.location.replace(target);
+}
+// -->
+</script>
+
+<h3>Epydoc Auto-redirect page</h3>
+
+<p>When javascript is enabled, this page will redirect URLs of
+the form <tt>redirect.html#<i>dotted.name</i></tt> to the
+documentation for the object with the given fully-qualified
+dotted name.</p>
+<p><a id="message">   </a></p>
+
+<script type="text/javascript">
+<!--
+if (dottedName) {
+    var msg = document.getElementById("message");
+    msg.innerHTML = "No documentation found for <tt>"+
+                    dottedName+"</tt>";
+}
+// -->
+</script>
+
+</body>
+</html>
diff --git a/examples/bench.py b/examples/bench.py
new file mode 100644
index 0000000..49122c1
--- /dev/null
+++ b/examples/bench.py
@@ -0,0 +1,41 @@
+# benchmark reads and writes, with and without compression.
+# tests all four supported file formats.
+from numpy.random.mtrand import uniform
+import netCDF4
+from timeit import Timer
+import os, sys
+
+# create an n1dim by n2dim by n3dim random array.
+n1dim = 30   
+n2dim = 15
+n3dim = 73
+n4dim = 144
+ntrials = 10
+sys.stdout.write('reading and writing a %s by %s by %s by %s random array ..\n'%(n1dim,n2dim,n3dim,n4dim))
+array = uniform(size=(n1dim,n2dim,n3dim,n4dim))
+
+def write_netcdf(filename,zlib=False,least_significant_digit=None,format='NETCDF4'):
+    file = netCDF4.Dataset(filename,'w',format=format)
+    file.createDimension('n1', n1dim)
+    file.createDimension('n2', n2dim)
+    file.createDimension('n3', n3dim)
+    file.createDimension('n4', n4dim)
+    foo = file.createVariable('data', 'f8',('n1','n2','n3','n4'),zlib=zlib,least_significant_digit=least_significant_digit)
+    foo[:] = array
+    file.close()
+
+def read_netcdf(filename):
+    file = netCDF4.Dataset(filename)
+    data = file.variables['data'][:]
+    file.close()
+
+for format in ['NETCDF3_CLASSIC','NETCDF3_64BIT','NETCDF4_CLASSIC','NETCDF4']:
+    sys.stdout.write('testing file format %s ...\n' % format)
+    # writing, no compression. 
+    t = Timer("write_netcdf('test1.nc',format='%s')" % format,"from __main__ import write_netcdf")
+    sys.stdout.write('writing took %s seconds\n' %\
+            repr(sum(t.repeat(ntrials,1))/ntrials))
+    # test reading.
+    t = Timer("read_netcdf('test1.nc')","from __main__ import read_netcdf")
+    sys.stdout.write('reading took %s seconds\n' %
+            repr(sum(t.repeat(ntrials,1))/ntrials))
diff --git a/examples/bench_compress.py b/examples/bench_compress.py
new file mode 100644
index 0000000..d06e2b1
--- /dev/null
+++ b/examples/bench_compress.py
@@ -0,0 +1,47 @@
+# benchmark reads and writes, with and without compression.
+# tests all four supported file formats.
+from numpy.random.mtrand import uniform
+import netCDF4
+from timeit import Timer
+import os, sys
+
+# create an n1dim by n2dim by n3dim random array.
+n1dim = 30   
+n2dim = 15
+n3dim = 73
+n4dim = 144
+ntrials = 10
+sys.stdout.write('reading and writing a %s by %s by %s by %s random array ..\n'%(n1dim,n2dim,n3dim,n4dim))
+sys.stdout.write('(average of %s trials)\n' % ntrials)
+array = netCDF4._quantize(uniform(size=(n1dim,n2dim,n3dim,n4dim)),4)
+
+
+def write_netcdf(filename,zlib=False,shuffle=False,complevel=6):
+    file = netCDF4.Dataset(filename,'w',format='NETCDF4')
+    file.createDimension('n1', n1dim)
+    file.createDimension('n2', n2dim)
+    file.createDimension('n3', n3dim)
+    file.createDimension('n4', n4dim)
+    foo = file.createVariable('data',\
+                              'f8',('n1','n2','n3','n4'),zlib=zlib,shuffle=shuffle,complevel=complevel)
+    foo[:] = array
+    file.close()
+
+def read_netcdf(filename):
+    file = netCDF4.Dataset(filename)
+    data = file.variables['data'][:]
+    file.close()
+
+for compress_kwargs in ["zlib=False,shuffle=False","zlib=True,shuffle=False",
+                        "zlib=True,shuffle=True","zlib=True,shuffle=True,complevel=2"]:
+    sys.stdout.write('testing compression %s...\n' % repr(compress_kwargs))
+    # writing.
+    t = Timer("write_netcdf('test.nc',%s)" % compress_kwargs,"from __main__ import write_netcdf")
+    sys.stdout.write('writing took %s seconds\n' %\
+            repr(sum(t.repeat(ntrials,1))/ntrials))
+    # test reading.
+    t = Timer("read_netcdf('test.nc')","from __main__ import read_netcdf")
+    sys.stdout.write('reading took %s seconds\n' %
+            repr(sum(t.repeat(ntrials,1))/ntrials))
+    # print out size of resulting files.
+    sys.stdout.write('size of test.nc = %s\n'%repr(os.stat('test.nc').st_size))
diff --git a/examples/bench_compress2.py b/examples/bench_compress2.py
new file mode 100644
index 0000000..6ac3064
--- /dev/null
+++ b/examples/bench_compress2.py
@@ -0,0 +1,50 @@
+# benchmark reads and writes, with and without compression.
+# tests all four supported file formats.
+from numpy.random.mtrand import uniform
+import netCDF4
+from timeit import Timer
+import os, sys
+
+# create an n1dim by n2dim by n3dim random array.
+n1dim = 30   
+n2dim = 15
+n3dim = 73
+n4dim = 144
+ntrials = 10
+sys.stdout.write('reading and writing a %s by %s by %s by %s random array ..\n'%(n1dim,n2dim,n3dim,n4dim))
+sys.stdout.write('(average of %s trials)\n' % ntrials)
+lsd = 4
+if lsd is not None:
+    array = netCDF4._quantize(uniform(size=(n1dim,n2dim,n3dim,n4dim)),4)
+else:
+    array = uniform(size=(n1dim,n2dim,n3dim,n4dim))
+
+
+def write_netcdf(filename,complevel):
+    file = netCDF4.Dataset(filename,'w',format='NETCDF4')
+    file.createDimension('n1', n1dim)
+    file.createDimension('n2', n2dim)
+    file.createDimension('n3', n3dim)
+    file.createDimension('n4', n4dim)
+    foo = file.createVariable('data',\
+                              'f8',('n1','n2','n3','n4'),zlib=True,shuffle=True,complevel=complevel)
+    foo[:] = array
+    file.close()
+
+def read_netcdf(filename):
+    file = netCDF4.Dataset(filename)
+    data = file.variables['data'][:]
+    file.close()
+
+for complevel in range(0,10):
+    sys.stdout.write('testing compression with complevel %s...\n' % complevel)
+    # writing.
+    t = Timer("write_netcdf('test.nc',%s)" % complevel,"from __main__ import write_netcdf")
+    sys.stdout.write('writing took %s seconds\n' %\
+            repr(sum(t.repeat(ntrials,1))/ntrials))
+    # test reading.
+    t = Timer("read_netcdf('test.nc')","from __main__ import read_netcdf")
+    sys.stdout.write('reading took %s seconds\n' %
+            repr(sum(t.repeat(ntrials,1))/ntrials))
+    # print out size of resulting files.
+    sys.stdout.write('size of test.nc = %s\n'%repr(os.stat('test.nc').st_size))
diff --git a/examples/bench_compress3.py b/examples/bench_compress3.py
new file mode 100644
index 0000000..0a35dee
--- /dev/null
+++ b/examples/bench_compress3.py
@@ -0,0 +1,50 @@
+# benchmark reads and writes, with and without compression.
+# tests all four supported file formats.
+from numpy.random.mtrand import uniform
+import netCDF4
+from timeit import Timer
+import os, sys
+
+# use real data.
+URL="http://nomad1.ncep.noaa.gov:9090/dods/reanalyses/reanalysis-2/6hr/pgb/pgb"
+nc = netCDF4.Dataset(URL)
+
+# use real 500 hPa geopotential height data.
+n1dim = 100   
+n3dim = 73
+n4dim = 144
+ntrials = 10
+sys.stdout.write('reading and writing a %s by %s by %s random array ..\n'%(n1dim,n3dim,n4dim))
+sys.stdout.write('(average of %s trials)\n' % ntrials)
+print nc
+array = nc.variables['hgtprs'][0:n1dim,5,:,:]
+print array.min(), array.max(), array.shape, array.dtype
+
+
+def write_netcdf(filename,complevel):
+    file = netCDF4.Dataset(filename,'w',format='NETCDF4')
+    file.createDimension('n1', None)
+    file.createDimension('n3', n3dim)
+    file.createDimension('n4', n4dim)
+    foo = file.createVariable('data',\
+                              'f4',('n1','n3','n4'),zlib=True,shuffle=True,complevel=complevel)
+    foo[:] = array
+    file.close()
+
+def read_netcdf(filename):
+    file = netCDF4.Dataset(filename)
+    data = file.variables['data'][:]
+    file.close()
+
+for complevel in range(0,10):
+    sys.stdout.write('testing compression with complevel %s...\n' % complevel)
+    # writing.
+    t = Timer("write_netcdf('test.nc',%s)" % complevel,"from __main__ import write_netcdf")
+    sys.stdout.write('writing took %s seconds\n' %\
+            repr(sum(t.repeat(ntrials,1))/ntrials))
+    # test reading.
+    t = Timer("read_netcdf('test.nc')","from __main__ import read_netcdf")
+    sys.stdout.write('reading took %s seconds\n' %
+            repr(sum(t.repeat(ntrials,1))/ntrials))
+    # print out size of resulting files.
+    sys.stdout.write('size of test.nc = %s\n'%repr(os.stat('test.nc').st_size))
diff --git a/examples/bench_diskless.py b/examples/bench_diskless.py
new file mode 100644
index 0000000..4a8f377
--- /dev/null
+++ b/examples/bench_diskless.py
@@ -0,0 +1,67 @@
+# benchmark reads and writes, with and without compression.
+# tests all four supported file formats.
+from numpy.random.mtrand import uniform
+import netCDF4
+from timeit import Timer
+import os, sys
+
+# create an n1dim by n2dim by n3dim random array.
+n1dim = 30   
+n2dim = 15
+n3dim = 73
+n4dim = 144
+ntrials = 10
+sys.stdout.write('reading and writing a %s by %s by %s by %s random array ..\n'%(n1dim,n2dim,n3dim,n4dim))
+array = uniform(size=(n1dim,n2dim,n3dim,n4dim))
+
+def write_netcdf(filename,zlib=False,least_significant_digit=None,format='NETCDF4',closeit=False):
+    file = netCDF4.Dataset(filename,'w',format=format,diskless=True,persist=True)
+    file.createDimension('n1', n1dim)
+    file.createDimension('n2', n2dim)
+    file.createDimension('n3', n3dim)
+    file.createDimension('n4', n4dim)
+    foo = file.createVariable('data',\
+          'f8',('n1','n2','n3','n4'),zlib=zlib,least_significant_digit=None)
+    foo.testme="hi I am an attribute"
+    foo.testme1="hi I am an attribute"
+    foo.testme2="hi I am an attribute"
+    foo.testme3="hi I am an attribute"
+    foo.testme4="hi I am an attribute"
+    foo.testme5="hi I am an attribute" 
+    foo[:] = array
+    if closeit: file.close()
+    return file
+
+def read_netcdf(ncfile):
+    data = ncfile.variables['data'][:]
+
+for format in ['NETCDF4','NETCDF3_CLASSIC','NETCDF3_64BIT']:
+    sys.stdout.write('testing file format %s ...\n' % format)
+    # writing, no compression. 
+    t = Timer("write_netcdf('test1.nc',closeit=True,format='%s')" % format,"from __main__ import write_netcdf")
+    sys.stdout.write('writing took %s seconds\n' %\
+            repr(sum(t.repeat(ntrials,1))/ntrials))
+    # test reading.
+    ncfile = write_netcdf('test1.nc',format=format)
+    t = Timer("read_netcdf(ncfile)","from __main__ import read_netcdf,ncfile")
+    sys.stdout.write('reading took %s seconds\n' %
+            repr(sum(t.repeat(ntrials,1))/ntrials))
+
+# test diskless=True in nc_open
+format='NETCDF3_CLASSIC'
+trials=50
+sys.stdout.write('test caching of file in memory on open for %s\n' % format)
+sys.stdout.write('testing file format %s ...\n' % format)
+write_netcdf('test1.nc',format=format,closeit=True)
+ncfile = netCDF4.Dataset('test1.nc',diskless=False)
+t = Timer("read_netcdf(ncfile)","from __main__ import read_netcdf,ncfile")
+sys.stdout.write('reading (from disk) took %s seconds\n' %
+            repr(sum(t.repeat(ntrials,1))/ntrials))
+ncfile.close()
+ncfile = netCDF4.Dataset('test1.nc',diskless=True)
+# setting diskless=True should cache the file in memory,
+# resulting in faster reads.
+t = Timer("read_netcdf(ncfile)","from __main__ import read_netcdf,ncfile")
+sys.stdout.write('reading (cached in memory) took %s seconds\n' %
+            repr(sum(t.repeat(ntrials,1))/ntrials))
+ncfile.close()
diff --git a/examples/test_stringarr.py b/examples/test_stringarr.py
new file mode 100644
index 0000000..0d3ec74
--- /dev/null
+++ b/examples/test_stringarr.py
@@ -0,0 +1,48 @@
+from netCDF4 import Dataset, stringtochar, chartostring
+import random, numpy
+
+# test utilities for converting arrays of fixed-length strings
+# to arrays of characters (with an extra dimension), and vice-versa.
+
+# netCDF does not have a fixed-length string data-type (only characters
+# and variable length strings). The convenience function chartostring
+# converts an array of characters to an array of fixed-length strings.
+# The array of fixed length strings has one less dimension, and the
+# length of the strings is equal to the rightmost dimension of the
+# array of characters. The convenience function stringtochar goes
+# the other way, converting an array of fixed-length strings to an
+# array of characters with an extra dimension (the number of characters
+# per string) appended on the right.
+
+
+FILE_NAME = 'tst_stringarr.nc'
+FILE_FORMAT = 'NETCDF4_CLASSIC'
+chars = '1234567890aabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+
+nc = Dataset(FILE_NAME,'w',format=FILE_FORMAT)
+n2 = 10; nchar = 12; nrecs = 4
+nc.createDimension('n1',None)
+nc.createDimension('n2',n2)
+nc.createDimension('nchar',nchar)
+v = nc.createVariable('strings','S1',('n1','n2','nchar'))
+for nrec in range(nrecs):
+    data = []
+    data = numpy.empty((n2,),'S'+repr(nchar))
+    # fill data with random nchar character strings
+    for n in range(n2):
+        data[n] = ''.join([random.choice(chars) for i in range(nchar)])
+    print(nrec,data)
+    # convert data to array of characters with an extra dimension 
+    # (the number of characters per string) added to the right.
+    datac = stringtochar(data)
+    v[nrec] = datac
+nc.close()
+
+nc = Dataset(FILE_NAME)
+v = nc.variables['strings']
+print(v.shape, v.dtype)
+for nrec in range(nrecs):
+    # read character array back, convert to an array of strings
+    # of length equal to the rightmost dimension.
+    print(nrec, chartostring(v[nrec]))
+nc.close()
diff --git a/examples/tutorial.py b/examples/tutorial.py
new file mode 100644
index 0000000..033500b
--- /dev/null
+++ b/examples/tutorial.py
@@ -0,0 +1,279 @@
+from netCDF4 import Dataset
+
+# code from tutorial.
+
+# create a file (Dataset object, also the root group).
+rootgrp = Dataset('test.nc', 'w', format='NETCDF4')
+print(rootgrp.file_format)
+rootgrp.close()
+
+# create some groups.
+rootgrp = Dataset('test.nc', 'a')
+fcstgrp = rootgrp.createGroup('forecasts')
+analgrp = rootgrp.createGroup('analyses')
+fcstgrp1 = fcstgrp.createGroup('model1')
+fcstgrp2 = fcstgrp.createGroup('model2')
+
+# walk the group tree using a Python generator.
+def walktree(top):
+    values = top.groups.values()
+    yield values
+    for value in top.groups.values():
+        for children in walktree(value):
+            yield  children
+print(rootgrp)
+for children in walktree(rootgrp):
+     for child in children:
+         print(child)
+
+# dimensions.
+level = rootgrp.createDimension('level', None)
+time = rootgrp.createDimension('time', None)
+lat = rootgrp.createDimension('lat', 73)
+lon = rootgrp.createDimension('lon', 144)
+
+print(rootgrp.dimensions)
+
+print(len(lon))
+print(lon.isunlimited())
+print(time.isunlimited())
+
+for dimobj in rootgrp.dimensions.values():
+    print(dimobj)
+
+print(time)
+
+# variables.
+times = rootgrp.createVariable('time','f8',('time',))
+levels = rootgrp.createVariable('level','i4',('level',))
+latitudes = rootgrp.createVariable('latitude','f4',('lat',))
+longitudes = rootgrp.createVariable('longitude','f4',('lon',))
+# 2 unlimited dimensions.
+#temp = rootgrp.createVariable('temp','f4',('time','level','lat','lon',))
+# this makes the compression 'lossy' (preserving a precision of 1/1000)
+# try it and see how much smaller the file gets.
+temp = rootgrp.createVariable('temp','f4',('time','level','lat','lon',),least_significant_digit=3)
+
+# attributes.
+import time
+rootgrp.description = 'bogus example script'
+rootgrp.history = 'Created ' + time.ctime(time.time())
+rootgrp.source = 'netCDF4 python module tutorial'
+latitudes.units = 'degrees north'
+longitudes.units = 'degrees east'
+levels.units = 'hPa'
+temp.units = 'K'
+times.units = 'hours since 0001-01-01 00:00:00.0'
+times.calendar = 'gregorian'
+
+for name in rootgrp.ncattrs():
+    print('Global attr', name, '=', getattr(rootgrp,name))
+
+print(rootgrp)
+
+print(rootgrp.__dict__)
+
+print(rootgrp.variables)
+
+print(rootgrp.variables['temp'])
+
+import numpy
+# no unlimited dimension, just assign to slice.
+lats =  numpy.arange(-90,91,2.5)
+lons =  numpy.arange(-180,180,2.5)
+latitudes[:] = lats
+longitudes[:] = lons
+print('latitudes =\n',latitudes[:])
+print('longitudes =\n',longitudes[:])
+
+# append along two unlimited dimensions by assigning to slice.
+nlats = len(rootgrp.dimensions['lat'])
+nlons = len(rootgrp.dimensions['lon'])
+print('temp shape before adding data = ',temp.shape)
+from numpy.random.mtrand import uniform # random number generator.
+temp[0:5,0:10,:,:] = uniform(size=(5,10,nlats,nlons))
+print('temp shape after adding data = ',temp.shape)
+# levels have grown, but no values yet assigned.
+print('levels shape after adding pressure data = ',levels.shape)
+
+# assign values to levels dimension variable.
+levels[:] =  [1000.,850.,700.,500.,300.,250.,200.,150.,100.,50.]
+# fancy slicing
+tempdat = temp[::2, [1,3,6], lats>0, lons>0]
+print('shape of fancy temp slice = ',tempdat.shape)
+print(temp[0, 0, [0,1,2,3], [0,1,2,3]].shape)
+
+# fill in times.
+from datetime import datetime, timedelta
+from netCDF4 import num2date, date2num, date2index
+dates = [datetime(2001,3,1)+n*timedelta(hours=12) for n in range(temp.shape[0])]
+times[:] = date2num(dates,units=times.units,calendar=times.calendar)
+print('time values (in units %s): ' % times.units+'\\n',times[:])
+dates = num2date(times[:],units=times.units,calendar=times.calendar)
+print('dates corresponding to time values:\\n',dates)
+
+rootgrp.close()
+
+# create a series of netCDF files with a variable sharing
+# the same unlimited dimension.
+for nfile in range(10):
+    f = Dataset('mftest'+repr(nfile)+'.nc','w',format='NETCDF4_CLASSIC')
+    f.createDimension('x',None)
+    x = f.createVariable('x','i',('x',))
+    x[0:10] = numpy.arange(nfile*10,10*(nfile+1))
+    f.close()
+# now read all those files in at once, in one Dataset.
+from netCDF4 import MFDataset
+f = MFDataset('mftest*nc')
+print(f.variables['x'][:])
+
+# example showing how to save numpy complex arrays using compound types.
+f = Dataset('complex.nc','w')
+size = 3 # length of 1-d complex array
+# create sample complex data.
+datac = numpy.exp(1j*(1.+numpy.linspace(0, numpy.pi, size)))
+print(datac.dtype)
+# create complex128 compound data type.
+complex128 = numpy.dtype([('real',numpy.float64),('imag',numpy.float64)])
+complex128_t = f.createCompoundType(complex128,'complex128')
+# create a variable with this data type, write some data to it.
+f.createDimension('x_dim',None)
+v = f.createVariable('cmplx_var',complex128_t,'x_dim')
+data = numpy.empty(size,complex128) # numpy structured array
+data['real'] = datac.real; data['imag'] = datac.imag
+v[:] = data
+# close and reopen the file, check the contents.
+f.close()
+f = Dataset('complex.nc')
+print(f)
+print(f.variables['cmplx_var'])
+print(f.cmptypes)
+print(f.cmptypes['complex128'])
+v = f.variables['cmplx_var']
+print(v.shape)
+datain = v[:] # read in all the data into a numpy structured array
+# create an empty numpy complex array
+datac2 = numpy.empty(datain.shape,numpy.complex128)
+# .. fill it with contents of structured array.
+datac2.real = datain['real']
+datac2.imag = datain['imag']
+print(datac.dtype,datac)
+print(datac2.dtype,datac2)
+# more complex compound type example.
+from netCDF4 import chartostring, stringtoarr
+f = Dataset('compound_example.nc','w') # create a new dataset.
+# create an unlimited  dimension call 'station'
+f.createDimension('station',None)
+# define a compound data type (can contain arrays, or nested compound types).
+NUMCHARS = 80 # number of characters to use in fixed-length strings.
+winddtype = numpy.dtype([('speed','f4'),('direction','i4')])
+statdtype = numpy.dtype([('latitude', 'f4'), ('longitude', 'f4'),
+                         ('surface_wind',winddtype),
+                         ('temp_sounding','f4',10),('press_sounding','i4',10),
+                         ('location_name','S1',NUMCHARS)])
+# use this data type definitions to create a compound data types
+# called using the createCompoundType Dataset method.
+# create a compound type for vector wind which will be nested inside
+# the station data type. This must be done first!
+wind_data_t = f.createCompoundType(winddtype,'wind_data')
+# now that wind_data_t is defined, create the station data type.
+station_data_t = f.createCompoundType(statdtype,'station_data')
+# create nested compound data types to hold the units variable attribute.
+winddtype_units = numpy.dtype([('speed','S1',NUMCHARS),('direction','S1',NUMCHARS)])
+statdtype_units = numpy.dtype([('latitude', 'S1',NUMCHARS), ('longitude', 'S1',NUMCHARS),
+                               ('surface_wind',winddtype_units),
+                               ('temp_sounding','S1',NUMCHARS),
+                               ('location_name','S1',NUMCHARS),
+                               ('press_sounding','S1',NUMCHARS)])
+# create the wind_data_units type first, since it will nested inside
+# the station_data_units data type.
+wind_data_units_t = f.createCompoundType(winddtype_units,'wind_data_units')
+station_data_units_t =\
+f.createCompoundType(statdtype_units,'station_data_units')
+# create a variable of of type 'station_data_t'
+statdat = f.createVariable('station_obs', station_data_t, ('station',))
+# create a numpy structured array, assign data to it.
+data = numpy.empty(1,station_data_t)
+data['latitude'] = 40.
+data['longitude'] = -105.
+data['surface_wind']['speed'] = 12.5
+data['surface_wind']['direction'] = 270
+data['temp_sounding'] = (280.3,272.,270.,269.,266.,258.,254.1,250.,245.5,240.)
+data['press_sounding'] = range(800,300,-50)
+# variable-length string datatypes are not supported inside compound types, so
+# to store strings in a compound data type, each string must be 
+# stored as fixed-size (in this case 80) array of characters.
+data['location_name'] = stringtoarr('Boulder, Colorado, USA',NUMCHARS)
+# assign structured array to variable slice.
+statdat[0] = data
+# or just assign a tuple of values to variable slice
+# (will automatically be converted to a structured array).
+statdat[1] = (40.78,-73.99,(-12.5,90),
+             (290.2,282.5,279.,277.9,276.,266.,264.1,260.,255.5,243.),
+             range(900,400,-50),stringtoarr('New York, New York, USA',NUMCHARS))
+print(f.cmptypes)
+windunits = numpy.empty(1,winddtype_units)
+stationobs_units = numpy.empty(1,statdtype_units)
+windunits['speed'] = stringtoarr('m/s',NUMCHARS)
+windunits['direction'] = stringtoarr('degrees',NUMCHARS)
+stationobs_units['latitude'] = stringtoarr('degrees north',NUMCHARS)
+stationobs_units['longitude'] = stringtoarr('degrees west',NUMCHARS)
+stationobs_units['surface_wind'] = windunits
+stationobs_units['location_name'] = stringtoarr('None', NUMCHARS)
+stationobs_units['temp_sounding'] = stringtoarr('Kelvin',NUMCHARS)
+stationobs_units['press_sounding'] = stringtoarr('hPa',NUMCHARS)
+statdat.units = stationobs_units
+# close and reopen the file.
+f.close()
+f = Dataset('compound_example.nc')
+print(f)
+statdat = f.variables['station_obs']
+print(statdat)
+# print out data in variable.
+print('data in a variable of compound type:')
+print('----')
+for data in statdat[:]:
+    for name in statdat.dtype.names:
+        if data[name].dtype.kind == 'S': # a string
+            # convert array of characters back to a string for display.
+            units = chartostring(statdat.units[name])
+            print(name,': value =',chartostring(data[name]),\
+                    ': units=',units)
+        elif data[name].dtype.kind == 'V': # a nested compound type
+            units_list = [chartostring(s) for s in tuple(statdat.units[name])]
+            print(name,data[name].dtype.names,': value=',data[name],': units=',\
+            units_list)
+        else: # a numeric type.
+            units = chartostring(statdat.units[name])
+            print(name,': value=',data[name],': units=',units)
+    print('----')
+f.close()
+
+f = Dataset('tst_vlen.nc','w')
+vlen_t = f.createVLType(numpy.int32, 'phony_vlen')
+x = f.createDimension('x',3)
+y = f.createDimension('y',4)
+vlvar = f.createVariable('phony_vlen_var', vlen_t, ('y','x'))
+import random
+data = numpy.empty(len(y)*len(x),object)
+for n in range(len(y)*len(x)):
+    data[n] = numpy.arange(random.randint(1,10),dtype='int32')+1
+data = numpy.reshape(data,(len(y),len(x)))
+vlvar[:] = data
+print(vlvar)
+print('vlen variable =\n',vlvar[:])
+print(f)
+print(f.variables['phony_vlen_var'])
+print(f.vltypes['phony_vlen'])
+z = f.createDimension('z', 10)
+strvar = f.createVariable('strvar',str,'z')
+chars = '1234567890aabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+data = numpy.empty(10,object)
+for n in range(10):
+    stringlen = random.randint(2,12)
+    data[n] = ''.join([random.choice(chars) for i in range(stringlen)])
+strvar[:] = data
+print('variable-length string variable:\n',strvar[:])
+print(f)
+print(f.variables['strvar'])
+f.close()
diff --git a/netCDF4.c b/netCDF4.c
new file mode 100644
index 0000000..182ed53
--- /dev/null
+++ b/netCDF4.c
@@ -0,0 +1,66301 @@
+/* Generated by Cython 0.22 */
+
+#define PY_SSIZE_T_CLEAN
+#ifndef CYTHON_USE_PYLONG_INTERNALS
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#else
+#include "pyconfig.h"
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 1
+#else
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#endif
+#endif
+#endif
+#include "Python.h"
+#ifndef Py_PYTHON_H
+    #error Python headers needed to compile C extensions, please install development version of Python.
+#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
+    #error Cython requires Python 2.6+ or Python 3.2+.
+#else
+#define CYTHON_ABI "0_22"
+#include <stddef.h>
+#ifndef offsetof
+#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#endif
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+  #ifndef __stdcall
+    #define __stdcall
+  #endif
+  #ifndef __cdecl
+    #define __cdecl
+  #endif
+  #ifndef __fastcall
+    #define __fastcall
+  #endif
+#endif
+#ifndef DL_IMPORT
+  #define DL_IMPORT(t) t
+#endif
+#ifndef DL_EXPORT
+  #define DL_EXPORT(t) t
+#endif
+#ifndef PY_LONG_LONG
+  #define PY_LONG_LONG LONG_LONG
+#endif
+#ifndef Py_HUGE_VAL
+  #define Py_HUGE_VAL HUGE_VAL
+#endif
+#ifdef PYPY_VERSION
+#define CYTHON_COMPILING_IN_PYPY 1
+#define CYTHON_COMPILING_IN_CPYTHON 0
+#else
+#define CYTHON_COMPILING_IN_PYPY 0
+#define CYTHON_COMPILING_IN_CPYTHON 1
+#endif
+#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
+#define Py_OptimizeFlag 0
+#endif
+#define __PYX_BUILD_PY_SSIZE_T "n"
+#define CYTHON_FORMAT_SSIZE_T "z"
+#if PY_MAJOR_VERSION < 3
+  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
+  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
+          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyClass_Type
+#else
+  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
+          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyType_Type
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define Py_TPFLAGS_CHECKTYPES 0
+  #define Py_TPFLAGS_HAVE_INDEX 0
+  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
+#endif
+#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
+  #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
+#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+  #define CYTHON_PEP393_ENABLED 1
+  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
+                                              0 : _PyUnicode_Ready((PyObject *)(op)))
+  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
+  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
+  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
+  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
+#else
+  #define CYTHON_PEP393_ENABLED 0
+  #define __Pyx_PyUnicode_READY(op)       (0)
+  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
+  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
+  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
+  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
+  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
+  #define __Pyx_PyFrozenSet_Size(s)         PyObject_Size(s)
+#else
+  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
+      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+  #define __Pyx_PyFrozenSet_Size(s)         PySet_Size(s)
+#endif
+#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
+#else
+  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define PyBaseString_Type            PyUnicode_Type
+  #define PyStringObject               PyUnicodeObject
+  #define PyString_Type                PyUnicode_Type
+  #define PyString_Check               PyUnicode_Check
+  #define PyString_CheckExact          PyUnicode_CheckExact
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
+  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
+#ifndef PySet_CheckExact
+  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
+#endif
+#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#if PY_MAJOR_VERSION >= 3
+  #define PyIntObject                  PyLongObject
+  #define PyInt_Type                   PyLong_Type
+  #define PyInt_Check(op)              PyLong_Check(op)
+  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
+  #define PyInt_FromString             PyLong_FromString
+  #define PyInt_FromUnicode            PyLong_FromUnicode
+  #define PyInt_FromLong               PyLong_FromLong
+  #define PyInt_FromSize_t             PyLong_FromSize_t
+  #define PyInt_FromSsize_t            PyLong_FromSsize_t
+  #define PyInt_AsLong                 PyLong_AsLong
+  #define PyInt_AS_LONG                PyLong_AS_LONG
+  #define PyInt_AsSsize_t              PyLong_AsSsize_t
+  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
+  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+  #define PyNumber_Int                 PyNumber_Long
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define PyBoolObject                 PyLongObject
+#endif
+#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
+  #ifndef PyUnicode_InternFromString
+    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
+  #endif
+#endif
+#if PY_VERSION_HEX < 0x030200A4
+  typedef long Py_hash_t;
+  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
+  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
+#else
+  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
+  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
+#else
+  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
+#endif
+#ifndef CYTHON_INLINE
+  #if defined(__GNUC__)
+    #define CYTHON_INLINE __inline__
+  #elif defined(_MSC_VER)
+    #define CYTHON_INLINE __inline
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_INLINE inline
+  #else
+    #define CYTHON_INLINE
+  #endif
+#endif
+#ifndef CYTHON_RESTRICT
+  #if defined(__GNUC__)
+    #define CYTHON_RESTRICT __restrict__
+  #elif defined(_MSC_VER) && _MSC_VER >= 1400
+    #define CYTHON_RESTRICT __restrict
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_RESTRICT restrict
+  #else
+    #define CYTHON_RESTRICT
+  #endif
+#endif
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
+   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
+   a quiet NaN. */
+  float value;
+  memset(&value, 0xFF, sizeof(value));
+  return value;
+}
+#endif
+#define __Pyx_void_to_None(void_result) (void_result, Py_INCREF(Py_None), Py_None)
+#ifdef __cplusplus
+template<typename T>
+void __Pyx_call_destructor(T* x) {
+    x->~T();
+}
+template<typename T>
+class __Pyx_FakeReference {
+  public:
+    __Pyx_FakeReference() : ptr(NULL) { }
+    __Pyx_FakeReference(T& ref) : ptr(&ref) { }
+    T *operator->() { return ptr; }
+    operator T&() { return *ptr; }
+  private:
+    T *ptr;
+};
+#endif
+
+
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
+#else
+  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
+#endif
+
+#ifndef __PYX_EXTERN_C
+  #ifdef __cplusplus
+    #define __PYX_EXTERN_C extern "C"
+  #else
+    #define __PYX_EXTERN_C extern
+  #endif
+#endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+#define _USE_MATH_DEFINES
+#endif
+#include <math.h>
+#define __PYX_HAVE__netCDF4
+#define __PYX_HAVE_API__netCDF4
+#include "stdlib.h"
+#include "H5public.h"
+#include "netcdf.h"
+#include "numpy/arrayobject.h"
+#ifdef _OPENMP
+#include <omp.h>
+#endif /* _OPENMP */
+
+#ifdef PYREX_WITHOUT_ASSERTIONS
+#define CYTHON_WITHOUT_ASSERTIONS
+#endif
+
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
+#   else
+#     define CYTHON_UNUSED
+#   endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+#   define CYTHON_UNUSED
+# endif
+#endif
+typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
+                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (    \
+    (sizeof(type) < sizeof(Py_ssize_t))  ||             \
+    (sizeof(type) > sizeof(Py_ssize_t) &&               \
+          likely(v < (type)PY_SSIZE_T_MAX ||            \
+                 v == (type)PY_SSIZE_T_MAX)  &&         \
+          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||       \
+                                v == (type)PY_SSIZE_T_MIN)))  ||  \
+    (sizeof(type) == sizeof(Py_ssize_t) &&              \
+          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||        \
+                               v == (type)PY_SSIZE_T_MAX)))  )
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString        PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
+#if PY_MAJOR_VERSION < 3
+    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
+#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
+#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
+#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
+#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
+#if PY_MAJOR_VERSION < 3
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
+{
+    const Py_UNICODE *u_end = u;
+    while (*u_end++) ;
+    return (size_t)(u_end - u - 1);
+}
+#else
+#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
+#endif
+#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
+#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
+#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
+#else
+#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
+#endif
+#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys;
+    PyObject* default_encoding = NULL;
+    PyObject* ascii_chars_u = NULL;
+    PyObject* ascii_chars_b = NULL;
+    const char* default_encoding_c;
+    sys = PyImport_ImportModule("sys");
+    if (!sys) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
+    Py_DECREF(sys);
+    if (!default_encoding) goto bad;
+    default_encoding_c = PyBytes_AsString(default_encoding);
+    if (!default_encoding_c) goto bad;
+    if (strcmp(default_encoding_c, "ascii") == 0) {
+        __Pyx_sys_getdefaultencoding_not_ascii = 0;
+    } else {
+        char ascii_chars[128];
+        int c;
+        for (c = 0; c < 128; c++) {
+            ascii_chars[c] = c;
+        }
+        __Pyx_sys_getdefaultencoding_not_ascii = 1;
+        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+        if (!ascii_chars_u) goto bad;
+        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+            PyErr_Format(
+                PyExc_ValueError,
+                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+                default_encoding_c);
+            goto bad;
+        }
+        Py_DECREF(ascii_chars_u);
+        Py_DECREF(ascii_chars_b);
+    }
+    Py_DECREF(default_encoding);
+    return 0;
+bad:
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys;
+    PyObject* default_encoding = NULL;
+    char* default_encoding_c;
+    sys = PyImport_ImportModule("sys");
+    if (!sys) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    Py_DECREF(sys);
+    if (!default_encoding) goto bad;
+    default_encoding_c = PyBytes_AsString(default_encoding);
+    if (!default_encoding_c) goto bad;
+    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
+    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+    Py_DECREF(default_encoding);
+    return 0;
+bad:
+    Py_XDECREF(default_encoding);
+    return -1;
+}
+#endif
+#endif
+
+
+/* Test for GCC > 2.95 */
+#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
+  #define likely(x)   __builtin_expect(!!(x), 1)
+  #define unlikely(x) __builtin_expect(!!(x), 0)
+#else /* !__GNUC__ or GCC < 2.95 */
+  #define likely(x)   (x)
+  #define unlikely(x) (x)
+#endif /* __GNUC__ */
+
+static PyObject *__pyx_m;
+static PyObject *__pyx_d;
+static PyObject *__pyx_b;
+static PyObject *__pyx_empty_tuple;
+static PyObject *__pyx_empty_bytes;
+static int __pyx_lineno;
+static int __pyx_clineno = 0;
+static const char * __pyx_cfilenm= __FILE__;
+static const char *__pyx_filename;
+
+
+static const char *__pyx_f[] = {
+  "netCDF4.pyx",
+  "utils.pyx",
+  "netCDF4.pxi",
+};
+
+/*--- Type declarations ---*/
+struct __pyx_obj_7netCDF4_Dataset;
+struct __pyx_obj_7netCDF4_Group;
+struct __pyx_obj_7netCDF4_Dimension;
+struct __pyx_obj_7netCDF4_Variable;
+struct __pyx_obj_7netCDF4_CompoundType;
+struct __pyx_obj_7netCDF4_VLType;
+struct __pyx_opt_args_7netCDF4__strencode;
+struct __pyx_defaults;
+typedef struct __pyx_defaults __pyx_defaults;
+
+/* "netCDF4.pyx":4131
+ *     return VLType(group, dt, name, typeid=xtype)
+ * 
+ * cdef _strencode(pystr,encoding=None):             # <<<<<<<<<<<<<<
+ *     # encode a string into bytes.  If already bytes, do nothing.
+ *     # uses default_encoding module variable for default encoding.
+ */
+struct __pyx_opt_args_7netCDF4__strencode {
+  int __pyx_n;
+  PyObject *encoding;
+};
+struct __pyx_defaults {
+  PyObject *__pyx_arg_exclude;
+};
+
+/* "netCDF4.pyx":1284
+ * 
+ * 
+ * cdef class Dataset:             # <<<<<<<<<<<<<<
+ *     """
+ * Dataset(self, filename, mode="r", clobber=True, diskless=False, persist=False, keepweakref=False, format='NETCDF4')
+ */
+struct __pyx_obj_7netCDF4_Dataset {
+  PyObject_HEAD
+  PyObject *__weakref__;
+  int _grpid;
+  int _isopen;
+  PyObject *groups;
+  PyObject *dimensions;
+  PyObject *variables;
+  PyObject *disk_format;
+  PyObject *path;
+  PyObject *parent;
+  PyObject *file_format;
+  PyObject *data_model;
+  PyObject *cmptypes;
+  PyObject *vltypes;
+  PyObject *keepweakref;
+};
+
+
+/* "netCDF4.pyx":2070
+ * 
+ * 
+ * cdef class Group(Dataset):             # <<<<<<<<<<<<<<
+ *     """
+ * Group(self, parent, name)
+ */
+struct __pyx_obj_7netCDF4_Group {
+  struct __pyx_obj_7netCDF4_Dataset __pyx_base;
+};
+
+
+/* "netCDF4.pyx":2157
+ * 
+ * 
+ * cdef class Dimension:             # <<<<<<<<<<<<<<
+ *     """
+ * Dimension(self, group, name, size=None)
+ */
+struct __pyx_obj_7netCDF4_Dimension {
+  PyObject_HEAD
+  int _dimid;
+  int _grpid;
+  PyObject *_data_model;
+  PyObject *_name;
+  PyObject *_grp;
+};
+
+
+/* "netCDF4.pyx":2296
+ *                 return False
+ * 
+ * cdef class Variable:             # <<<<<<<<<<<<<<
+ *     """
+ * Variable(self, group, name, datatype, dimensions=(), zlib=False, complevel=4, shuffle=True, fletcher32=False, contiguous=False, chunksizes=None, endian='native', least_significant_digit=None,fill_value=None)
+ */
+struct __pyx_obj_7netCDF4_Variable {
+  PyObject_HEAD
+  int _varid;
+  int _grpid;
+  int _nunlimdim;
+  PyObject *_name;
+  PyObject *ndim;
+  PyObject *dtype;
+  PyObject *mask;
+  PyObject *scale;
+  PyObject *_isprimitive;
+  PyObject *_iscompound;
+  PyObject *_isvlen;
+  PyObject *_grp;
+  PyObject *_cmptype;
+  PyObject *_vltype;
+};
+
+
+/* "netCDF4.pyx":3797
+ * # Compound datatype support.
+ * 
+ * cdef class CompoundType:             # <<<<<<<<<<<<<<
+ *     """
+ * A L{CompoundType} instance is used to describe a compound data type.
+ */
+struct __pyx_obj_7netCDF4_CompoundType {
+  PyObject_HEAD
+  nc_type _nc_type;
+  PyObject *dtype;
+  PyObject *name;
+};
+
+
+/* "netCDF4.pyx":4021
+ * # VLEN datatype support.
+ * 
+ * cdef class VLType:             # <<<<<<<<<<<<<<
+ *     """
+ * A L{VLType} instance is used to describe a variable length (VLEN) data type.
+ */
+struct __pyx_obj_7netCDF4_VLType {
+  PyObject_HEAD
+  nc_type _nc_type;
+  PyObject *dtype;
+  PyObject *name;
+};
+
+
+/* --- Runtime support code (head) --- */
+#ifndef CYTHON_REFNANNY
+  #define CYTHON_REFNANNY 0
+#endif
+#if CYTHON_REFNANNY
+  typedef struct {
+    void (*INCREF)(void*, PyObject*, int);
+    void (*DECREF)(void*, PyObject*, int);
+    void (*GOTREF)(void*, PyObject*, int);
+    void (*GIVEREF)(void*, PyObject*, int);
+    void* (*SetupContext)(const char*, int, const char*);
+    void (*FinishContext)(void**);
+  } __Pyx_RefNannyAPIStruct;
+  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
+  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
+#ifdef WITH_THREAD
+  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+          if (acquire_gil) { \
+              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
+              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+              PyGILState_Release(__pyx_gilstate_save); \
+          } else { \
+              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+          }
+#else
+  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+#endif
+  #define __Pyx_RefNannyFinishContext() \
+          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
+  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
+  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
+  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
+#else
+  #define __Pyx_RefNannyDeclarations
+  #define __Pyx_RefNannySetupContext(name, acquire_gil)
+  #define __Pyx_RefNannyFinishContext()
+  #define __Pyx_INCREF(r) Py_INCREF(r)
+  #define __Pyx_DECREF(r) Py_DECREF(r)
+  #define __Pyx_GOTREF(r)
+  #define __Pyx_GIVEREF(r)
+  #define __Pyx_XINCREF(r) Py_XINCREF(r)
+  #define __Pyx_XDECREF(r) Py_XDECREF(r)
+  #define __Pyx_XGOTREF(r)
+  #define __Pyx_XGIVEREF(r)
+#endif
+#define __Pyx_XDECREF_SET(r, v) do {                            \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_XDECREF(tmp);                              \
+    } while (0)
+#define __Pyx_DECREF_SET(r, v) do {                             \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_DECREF(tmp);                               \
+    } while (0)
+#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
+#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_getattro))
+        return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_getattr))
+        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+    return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+static PyObject *__Pyx_GetBuiltinName(PyObject *name);
+
+static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
+
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb);
+static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);
+
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb);
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb);
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
+#endif
+
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
+#else
+#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
+#endif
+
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \
+    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \
+               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
+    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
+    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                                     int is_list, int wraparound, int boundscheck);
+
+#include <string.h>
+
+static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
+
+static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
+
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
+#else
+#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
+#endif
+
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
+        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
+        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
+        int has_cstart, int has_cstop, int wraparound);
+
+static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
+    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
+
+static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
+
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
+    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
+    const char* function_name);
+
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
+
+#define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) \
+    __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
+static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
+        PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
+        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
+        int has_cstart, int has_cstop, int wraparound);
+
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
+static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_setattro))
+        return tp->tp_setattro(obj, attr_name, value);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_setattr))
+        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
+#endif
+    return PyObject_SetAttr(obj, attr_name, value);
+}
+#else
+#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
+#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
+#endif
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
+    PyListObject* L = (PyListObject*) list;
+    Py_ssize_t len = Py_SIZE(list);
+    if (likely(L->allocated > len)) {
+        Py_INCREF(x);
+        PyList_SET_ITEM(list, len, x);
+        Py_SIZE(list) = len+1;
+        return 0;
+    }
+    return PyList_Append(list, x);
+}
+#else
+#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
+#endif
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+    PyListObject* L = (PyListObject*) list;
+    Py_ssize_t len = Py_SIZE(list);
+    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
+        Py_INCREF(x);
+        PyList_SET_ITEM(list, len, x);
+        Py_SIZE(list) = len+1;
+        return 0;
+    }
+    return PyList_Append(list, x);
+}
+#else
+#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
+#endif
+
+static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
+
+static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
+
+static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
+
+static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
+         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
+         const char* encoding, const char* errors,
+         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
+
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
+
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+
+static CYTHON_INLINE int __Pyx_IterFinish(void);
+
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
+
+static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
+    int result = PySequence_Contains(seq, item);
+    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
+
+static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d);
+
+#if PY_MAJOR_VERSION >= 3
+static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
+    PyObject *value;
+    value = PyDict_GetItemWithError(d, key);
+    if (unlikely(!value)) {
+        if (!PyErr_Occurred()) {
+            PyObject* args = PyTuple_Pack(1, key);
+            if (likely(args))
+                PyErr_SetObject(PyExc_KeyError, args);
+            Py_XDECREF(args);
+        }
+        return NULL;
+    }
+    Py_INCREF(value);
+    return value;
+}
+#else
+    #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
+#endif
+
+static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
+
+#if PY_MAJOR_VERSION < 3
+#define __Pyx_PyString_Join __Pyx_PyBytes_Join
+#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
+#else
+#define __Pyx_PyString_Join PyUnicode_Join
+#define __Pyx_PyBaseString_Join PyUnicode_Join
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+    #if PY_MAJOR_VERSION < 3
+    #define __Pyx_PyBytes_Join _PyString_Join
+    #else
+    #define __Pyx_PyBytes_Join _PyBytes_Join
+    #endif
+#else
+static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
+#endif
+
+static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject* none = _PyList_Extend((PyListObject*)L, v);
+    if (unlikely(!none))
+        return -1;
+    Py_DECREF(none);
+    return 0;
+#else
+    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
+#endif
+}
+
+#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) : \
+    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \
+               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
+static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
+static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
+                                               int is_list, int wraparound, int boundscheck);
+
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
+
+static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) {
+    int result = PyDict_Contains(dict, item);
+    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+static double __Pyx__PyObject_AsDouble(PyObject* obj);
+#if CYTHON_COMPILING_IN_PYPY
+#define __Pyx_PyObject_AsDouble(obj) \
+(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \
+ likely(PyInt_CheckExact(obj)) ? \
+ PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
+#else
+#define __Pyx_PyObject_AsDouble(obj) \
+((likely(PyFloat_CheckExact(obj))) ? \
+ PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
+#endif
+
+static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
+    const char *name, int exact);
+
+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
+
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
+
+#define __Pyx_CyFunction_USED 1
+#include <structmember.h>
+#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
+#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
+#define __Pyx_CYFUNCTION_CCLASS        0x04
+#define __Pyx_CyFunction_GetClosure(f) \
+    (((__pyx_CyFunctionObject *) (f))->func_closure)
+#define __Pyx_CyFunction_GetClassObj(f) \
+    (((__pyx_CyFunctionObject *) (f))->func_classobj)
+#define __Pyx_CyFunction_Defaults(type, f) \
+    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
+#define __Pyx_CyFunction_SetDefaultsGetter(f, g) \
+    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
+typedef struct {
+    PyCFunctionObject func;
+#if PY_VERSION_HEX < 0x030500A0
+    PyObject *func_weakreflist;
+#endif
+    PyObject *func_dict;
+    PyObject *func_name;
+    PyObject *func_qualname;
+    PyObject *func_doc;
+    PyObject *func_globals;
+    PyObject *func_code;
+    PyObject *func_closure;
+    PyObject *func_classobj;
+    void *defaults;
+    int defaults_pyobjects;
+    int flags;
+    PyObject *defaults_tuple;
+    PyObject *defaults_kwdict;
+    PyObject *(*defaults_getter)(PyObject *);
+    PyObject *func_annotations;
+} __pyx_CyFunctionObject;
+static PyTypeObject *__pyx_CyFunctionType = 0;
+#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \
+    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
+static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
+                                      int flags, PyObject* qualname,
+                                      PyObject *self,
+                                      PyObject *module, PyObject *globals,
+                                      PyObject* code);
+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
+                                                         size_t size,
+                                                         int pyobjects);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
+                                                            PyObject *tuple);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
+                                                             PyObject *dict);
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
+                                                              PyObject *dict);
+static int __Pyx_CyFunction_init(void);
+
+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
+                                           PyObject *mkw, PyObject *modname, PyObject *doc);
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
+                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
+
+typedef struct {
+    int code_line;
+    PyCodeObject* code_object;
+} __Pyx_CodeObjectCacheEntry;
+struct __Pyx_CodeObjectCache {
+    int count;
+    int max_count;
+    __Pyx_CodeObjectCacheEntry* entries;
+};
+static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
+static PyCodeObject *__pyx_find_code_object(int code_line);
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
+
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+                               int py_line, const char *filename);
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_PY_LONG_LONG(unsigned PY_LONG_LONG value);
+
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_nc_type(nc_type value);
+
+static CYTHON_INLINE nc_type __Pyx_PyInt_As_nc_type(PyObject *);
+
+static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
+
+static CYTHON_INLINE ptrdiff_t __Pyx_PyInt_As_ptrdiff_t(PyObject *);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_intp(npy_intp value);
+
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+
+static int __Pyx_check_binary_version(void);
+
+#if !defined(__Pyx_PyIdentifier_FromString)
+#if PY_MAJOR_VERSION < 3
+  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
+#else
+  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
+#endif
+#endif
+
+static PyObject *__Pyx_ImportModule(const char *name);
+
+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
+
+
+/* Module declarations from 'numpy' */
+
+/* Module declarations from 'netCDF4' */
+static PyTypeObject *__pyx_ptype_7netCDF4_ndarray = 0;
+static PyTypeObject *__pyx_ptype_7netCDF4_Dataset = 0;
+static PyTypeObject *__pyx_ptype_7netCDF4_Group = 0;
+static PyTypeObject *__pyx_ptype_7netCDF4_Dimension = 0;
+static PyTypeObject *__pyx_ptype_7netCDF4_Variable = 0;
+static PyTypeObject *__pyx_ptype_7netCDF4_CompoundType = 0;
+static PyTypeObject *__pyx_ptype_7netCDF4_VLType = 0;
+static PyObject *__pyx_f_7netCDF4__get_att_names(int, int); /*proto*/
+static PyObject *__pyx_f_7netCDF4__get_att(PyObject *, int, PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4__get_format(int); /*proto*/
+static PyObject *__pyx_f_7netCDF4__get_full_format(int); /*proto*/
+static PyObject *__pyx_f_7netCDF4__set_att(PyObject *, int, PyObject *, PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4__get_types(PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4__get_dims(PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4__get_grps(PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4__get_vars(PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4__def_compound(PyObject *, PyObject *, PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4__find_cmptype(PyObject *, PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4__read_compound(PyObject *, nc_type); /*proto*/
+static PyObject *__pyx_f_7netCDF4__def_vlen(PyObject *, PyObject *, PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4__read_vlen(PyObject *, nc_type); /*proto*/
+static PyObject *__pyx_f_7netCDF4__strencode(PyObject *, struct __pyx_opt_args_7netCDF4__strencode *__pyx_optional_args); /*proto*/
+#define __Pyx_MODULE_NAME "netCDF4"
+int __pyx_module_is_main_netCDF4 = 0;
+
+/* Implementation of 'netCDF4' */
+static PyObject *__pyx_builtin_ImportError;
+static PyObject *__pyx_builtin_object;
+static PyObject *__pyx_builtin_ValueError;
+static PyObject *__pyx_builtin_range;
+static PyObject *__pyx_builtin_IOError;
+static PyObject *__pyx_builtin_sum;
+static PyObject *__pyx_builtin_AttributeError;
+static PyObject *__pyx_builtin_enumerate;
+static PyObject *__pyx_builtin_IndexError;
+static PyObject *__pyx_builtin_RuntimeError;
+static PyObject *__pyx_builtin_KeyError;
+static PyObject *__pyx_builtin_TypeError;
+static PyObject *__pyx_builtin_UnicodeDecodeError;
+static PyObject *__pyx_pf_7netCDF4__dateparse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_timestr); /* proto */
+static PyObject *__pyx_pf_7netCDF4_2stringtoarr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string, PyObject *__pyx_v_NUMCHARS, PyObject *__pyx_v_dtype); /* proto */
+static PyObject *__pyx_pf_7netCDF4_4stringtochar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a); /* proto */
+static PyObject *__pyx_pf_7netCDF4_6chartostring(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_b); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8date2num(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dates, PyObject *__pyx_v_units, PyObject *__pyx_v_calendar); /* proto */
+static PyObject *__pyx_pf_7netCDF4_10num2date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_times, PyObject *__pyx_v_units, PyObject *__pyx_v_calendar); /* proto */
+static PyObject *__pyx_pf_7netCDF4_12date2index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dates, PyObject *__pyx_v_nctime, PyObject *__pyx_v_calendar, PyObject *__pyx_v_select); /* proto */
+static PyObject *__pyx_pf_7netCDF4_14getlibversion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9MFDataset_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9MFDataset___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_files, PyObject *__pyx_v_check, PyObject *__pyx_v_aggdim, PyObject *__pyx_v_exclude); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9MFDataset_2__setattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9MFDataset_4__getattribute__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9MFDataset_6ncattrs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9MFDataset_8close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_10_Dimension___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dimname, CYTHON_UNUSED PyObject *__pyx_v_dim, PyObject *__pyx_v_dimlens, PyObject *__pyx_v_dimtotlen); /* proto */
+static PyObject *__pyx_pf_7netCDF4_10_Dimension_2__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_10_Dimension_4isunlimited(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_10_Dimension_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9_Variable___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dset, PyObject *__pyx_v_varname, PyObject *__pyx_v_var, PyObject *__pyx_v_recdimname); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9_Variable_2typecode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9_Variable_4ncattrs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9_Variable_6__getattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9_Variable_8__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9_Variable_10__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9_Variable_12_shape(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9_Variable_14set_auto_maskandscale(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9_Variable_16__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_elem); /* proto */
+static PyObject *__pyx_pf_7netCDF4_6MFTime___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_time, PyObject *__pyx_v_units); /* proto */
+static PyObject *__pyx_pf_7netCDF4_6MFTime_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_elem); /* proto */
+static PyObject *__pyx_pf_7netCDF4_16_gethdf5libversion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_18_set_default_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_format); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset___init__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_clobber, PyObject *__pyx_v_format, PyObject *__pyx_v_diskless, PyObject *__pyx_v_persist, PyObject *__pyx_v_keepweakref, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_2__enter__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_4__exit__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_atype, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_traceback); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_6filepath(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_8__repr__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_10__unicode__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_12close(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static void __pyx_pf_7netCDF4_7Dataset_14__dealloc__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_16sync(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_18_redef(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_20_enddef(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_22set_fill_on(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_24set_fill_off(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_26createDimension(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_dimname, PyObject *__pyx_v_size); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_28renameDimension(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_30createCompoundType(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_32createVLType(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_34createVariable(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_varname, PyObject *__pyx_v_datatype, PyObject *__pyx_v_dimensions, PyObject *__pyx_v_zlib, PyObject *__pyx_v_complevel, PyObject *__pyx_v_shuffle, PyObject *__pyx_v_fletcher32, PyObject *__pyx_v_contiguous, PyObject *__pyx_v_chunksizes, PyObject *__pyx_v_endian, PyObject *__pyx_v_least_significant_digit, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_chunk_cach [...]
+static PyObject *__pyx_pf_7netCDF4_7Dataset_36renameVariable(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_38createGroup(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_groupname); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_40ncattrs(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_42setncattr(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_44setncatts(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_attdict); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_46getncattr(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_48__delattr__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_50delncattr(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_52__setattr__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_54__getattr__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_56renameAttribute(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_58renameGroup(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_oldname, CYTHON_UNUSED PyObject *__pyx_v_newname); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_60set_auto_maskandscale(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_62set_auto_mask(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_64set_auto_scale(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_6_grpid___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_6_grpid_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_7_isopen___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_7_isopen_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_6groups___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_6groups_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_6groups_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_10dimensions___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_10dimensions_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_10dimensions_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_9variables___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_9variables_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_9variables_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_11disk_format___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_11disk_format_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_11disk_format_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_4path___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_4path_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_4path_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_6parent___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_6parent_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_6parent_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_11file_format___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_11file_format_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_11file_format_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_10data_model___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_10data_model_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_10data_model_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_8cmptypes___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_8cmptypes_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_8cmptypes_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_7vltypes___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_7vltypes_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_7vltypes_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_7Dataset_11keepweakref___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_11keepweakref_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_7Dataset_11keepweakref_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_5Group___init__(struct __pyx_obj_7netCDF4_Group *__pyx_v_self, PyObject *__pyx_v_parent, PyObject *__pyx_v_name, PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_pf_7netCDF4_5Group_2close(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Group *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_5Group_4_getname(struct __pyx_obj_7netCDF4_Group *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_5Group_4name___get__(struct __pyx_obj_7netCDF4_Group *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_5Group_4name_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Group *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_9Dimension___init__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_grp, PyObject *__pyx_v_name, PyObject *__pyx_v_size, PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9Dimension_2_getname(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9Dimension_4name___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_9Dimension_4name_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9Dimension_4__repr__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9Dimension_6__unicode__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
+static Py_ssize_t __pyx_pf_7netCDF4_9Dimension_8__len__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9Dimension_10group(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9Dimension_12isunlimited(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9Dimension_6_dimid___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_9Dimension_6_dimid_2__set__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9Dimension_6_grpid___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_9Dimension_6_grpid_2__set__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9Dimension_11_data_model___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_9Dimension_11_data_model_2__set__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_9Dimension_11_data_model_4__del__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9Dimension_5_name___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_9Dimension_5_name_2__set__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_9Dimension_5_name_4__del__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_9Dimension_4_grp___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_9Dimension_4_grp_2__set__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_9Dimension_4_grp_4__del__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable___init__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_grp, PyObject *__pyx_v_name, PyObject *__pyx_v_datatype, PyObject *__pyx_v_dimensions, PyObject *__pyx_v_zlib, PyObject *__pyx_v_complevel, PyObject *__pyx_v_shuffle, PyObject *__pyx_v_fletcher32, PyObject *__pyx_v_contiguous, PyObject *__pyx_v_chunksizes, PyObject *__pyx_v_endian, PyObject *__pyx_v_least_significant_digit, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_ch [...]
+static PyObject *__pyx_pf_7netCDF4_8Variable_2__array__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_4__repr__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_6__unicode__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_8_getdims(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_10_getname(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_4name___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_4name_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_8datatype___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_5shape___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_5shape_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_4size___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_10dimensions___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_10dimensions_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_12group(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_14ncattrs(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_16setncattr(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_18setncatts(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_attdict); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_20getncattr(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_22delncattr(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_24filters(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_26endian(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_28chunking(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_30get_var_chunk_cache(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_32set_var_chunk_cache(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_size, PyObject *__pyx_v_nelems, PyObject *__pyx_v_preemption); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_34__delattr__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_36__setattr__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_38__getattr__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_40renameAttribute(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_42__getitem__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_elem); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_44_toma(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_46_assign_vlen(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_elem, PyObject *__pyx_v_data); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_48__setitem__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_elem, PyObject *__pyx_v_data); /* proto */
+static Py_ssize_t __pyx_pf_7netCDF4_8Variable_50__len__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_52assignValue(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_54getValue(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_56set_auto_maskandscale(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_maskandscale); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_58set_auto_scale(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_scale); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_60set_auto_mask(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_mask); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_62_put(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyArrayObject *__pyx_v_data, PyObject *__pyx_v_start, PyObject *__pyx_v_count, PyObject *__pyx_v_stride); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_64_get(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_count, PyObject *__pyx_v_stride); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_6_varid___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_6_varid_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_6_grpid___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_6_grpid_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_10_nunlimdim___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_10_nunlimdim_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_5_name___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_5_name_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_5_name_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_4ndim___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_4ndim_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_4ndim_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_5dtype___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_5dtype_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_5dtype_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_4mask___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_4mask_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_4mask_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_5scale___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_5scale_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_5scale_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_12_isprimitive___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_12_isprimitive_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_12_isprimitive_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_11_iscompound___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_11_iscompound_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_11_iscompound_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_7_isvlen___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_7_isvlen_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_7_isvlen_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_4_grp___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_4_grp_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_4_grp_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_8_cmptype___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_8_cmptype_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_8_cmptype_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8Variable_7_vltype___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_7_vltype_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8Variable_7_vltype_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_12CompoundType___init__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_grp, PyObject *__pyx_v_dt, PyObject *__pyx_v_dtype_name, PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_pf_7netCDF4_12CompoundType_2__repr__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_12CompoundType_4__unicode__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_12CompoundType_8_nc_type___get__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_12CompoundType_8_nc_type_2__set__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_12CompoundType_5dtype___get__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_12CompoundType_5dtype_2__set__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_12CompoundType_5dtype_4__del__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_12CompoundType_4name___get__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_12CompoundType_4name_2__set__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_12CompoundType_4name_4__del__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_6VLType___init__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_grp, PyObject *__pyx_v_dt, PyObject *__pyx_v_dtype_name, PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_pf_7netCDF4_6VLType_2__repr__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_6VLType_4__unicode__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_6VLType_8_nc_type___get__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_6VLType_8_nc_type_2__set__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_6VLType_5dtype___get__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_6VLType_5dtype_2__set__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_6VLType_5dtype_4__del__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_6VLType_4name___get__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_6VLType_4name_2__set__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_6VLType_4name_4__del__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self); /* proto */
+static PyObject *__pyx_tp_new_7netCDF4_Dataset(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_7netCDF4_Group(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_7netCDF4_Dimension(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_7netCDF4_Variable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_7netCDF4_CompoundType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_7netCDF4_VLType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static char __pyx_k_[] = "*";
+static char __pyx_k_1[] = "1";
+static char __pyx_k_O[] = "O";
+static char __pyx_k_S[] = "S";
+static char __pyx_k_U[] = "U";
+static char __pyx_k_V[] = "V";
+static char __pyx_k_a[] = "a";
+static char __pyx_k_b[] = "b";
+static char __pyx_k_f[] = "f";
+static char __pyx_k_i[] = "i";
+static char __pyx_k_k[] = "k";
+static char __pyx_k_n[] = "n";
+static char __pyx_k_r[] = "%r\n";
+static char __pyx_k_s[] = "(%s)";
+static char __pyx_k_t[] = "t";
+static char __pyx_k_u[] = "u'";
+static char __pyx_k_v[] = "v";
+static char __pyx_k_w[] = "w";
+static char __pyx_k_0m[] = "\033[0m";
+static char __pyx_k_4m[] = " \033[4m";
+static char __pyx_k_S1[] = "S1";
+static char __pyx_k_U1[] = "U1";
+static char __pyx_k_as[] = "as";
+static char __pyx_k_bs[] = "bs";
+static char __pyx_k_dt[] = "dt";
+static char __pyx_k_f4[] = "f4";
+static char __pyx_k_f8[] = "f8";
+static char __pyx_k_i0[] = "i0";
+static char __pyx_k_i1[] = "i1";
+static char __pyx_k_i2[] = "i2";
+static char __pyx_k_i4[] = "i4";
+static char __pyx_k_i8[] = "i8";
+static char __pyx_k_id[] = "id";
+static char __pyx_k_ma[] = "ma";
+static char __pyx_k_n1[] = "n1";
+static char __pyx_k_nv[] = "nv";
+static char __pyx_k_td[] = "td";
+static char __pyx_k_u1[] = "u1";
+static char __pyx_k_u2[] = "u2";
+static char __pyx_k_u4[] = "u4";
+static char __pyx_k_u8[] = "u8";
+static char __pyx_k_ws[] = "ws";
+static char __pyx_k__15[] = "/";
+static char __pyx_k__16[] = "";
+static char __pyx_k__25[] = "\000";
+static char __pyx_k__36[] = "'";
+static char __pyx_k__38[] = ", ";
+static char __pyx_k__39[] = ",";
+static char __pyx_k__41[] = ",)";
+static char __pyx_k__42[] = ")";
+static char __pyx_k__44[] = "__";
+static char __pyx_k__51[] = "=";
+static char __pyx_k__52[] = ">";
+static char __pyx_k__53[] = "<";
+static char __pyx_k__54[] = "|";
+static char __pyx_k_all[] = "all";
+static char __pyx_k_any[] = "any";
+static char __pyx_k_arr[] = "arr";
+static char __pyx_k_big[] = "big";
+static char __pyx_k_cdf[] = "_cdf";
+static char __pyx_k_cnt[] = "cnt";
+static char __pyx_k_dat[] = "dat";
+static char __pyx_k_day[] = "day";
+static char __pyx_k_dim[] = "dim";
+static char __pyx_k_doc[] = "__doc__";
+static char __pyx_k_get[] = "_get";
+static char __pyx_k_grp[] = "_grp";
+static char __pyx_k_idx[] = "idx";
+static char __pyx_k_ind[] = "ind";
+static char __pyx_k_key[] = "_key";
+static char __pyx_k_len[] = "__len__";
+static char __pyx_k_lst[] = "lst";
+static char __pyx_k_msg[] = "msg";
+static char __pyx_k_num[] = "num";
+static char __pyx_k_pop[] = "pop";
+static char __pyx_k_put[] = "put";
+static char __pyx_k_r_2[] = "r";
+static char __pyx_k_r_3[] = "r+";
+static char __pyx_k_r_s[] = "r+s";
+static char __pyx_k_s_2[] = "s";
+static char __pyx_k_s_s[] = "    %s: %s\n";
+static char __pyx_k_sta[] = "sta";
+static char __pyx_k_str[] = "str";
+static char __pyx_k_sum[] = "sum";
+static char __pyx_k_sys[] = "sys";
+static char __pyx_k_val[] = "val";
+static char __pyx_k_var[] = "var";
+static char __pyx_k_vid[] = "vid";
+static char __pyx_k_zip[] = "zip";
+static char __pyx_k__116[] = ".";
+static char __pyx_k_bool[] = "bool";
+static char __pyx_k_cdfm[] = "cdfm";
+static char __pyx_k_char[] = "char";
+static char __pyx_k_copy[] = "copy";
+static char __pyx_k_data[] = "data";
+static char __pyx_k_date[] = "date";
+static char __pyx_k_days[] = "days";
+static char __pyx_k_dict[] = "__dict__";
+static char __pyx_k_dims[] = "_dims";
+static char __pyx_k_dset[] = "dset";
+static char __pyx_k_elem[] = "elem";
+static char __pyx_k_f4_2[] = "<f4";
+static char __pyx_k_f4_3[] = ">f4";
+static char __pyx_k_find[] = "find";
+static char __pyx_k_glob[] = "glob";
+static char __pyx_k_grps[] = "_grps";
+static char __pyx_k_hour[] = "hour";
+static char __pyx_k_http[] = "http";
+static char __pyx_k_in1d[] = "in1d";
+static char __pyx_k_init[] = "__init__";
+static char __pyx_k_isMA[] = "isMA";
+static char __pyx_k_item[] = "item";
+static char __pyx_k_izip[] = "izip";
+static char __pyx_k_join[] = "join";
+static char __pyx_k_keys[] = "keys";
+static char __pyx_k_kind[] = "kind";
+static char __pyx_k_main[] = "__main__";
+static char __pyx_k_mask[] = "mask";
+static char __pyx_k_mode[] = "mode";
+static char __pyx_k_name[] = "name";
+static char __pyx_k_ndim[] = "ndim";
+static char __pyx_k_numv[] = "numv";
+static char __pyx_k_part[] = "part";
+static char __pyx_k_path[] = "_path";
+static char __pyx_k_prod[] = "prod";
+static char __pyx_k_repr[] = "__repr__";
+static char __pyx_k_secs[] = "secs";
+static char __pyx_k_self[] = "self";
+static char __pyx_k_size[] = "size";
+static char __pyx_k_slen[] = "slen";
+static char __pyx_k_step[] = "step";
+static char __pyx_k_stop[] = "stop";
+static char __pyx_k_strd[] = "strd";
+static char __pyx_k_strt[] = "strt";
+static char __pyx_k_test[] = "__test__";
+static char __pyx_k_tile[] = "tile";
+static char __pyx_k_time[] = "time";
+static char __pyx_k_toma[] = "_toma";
+static char __pyx_k_unit[] = "unit";
+static char __pyx_k_vars[] = "_vars";
+static char __pyx_k_view[] = "view";
+static char __pyx_k_vlen[] = "vlen";
+static char __pyx_k_warn[] = "warn";
+static char __pyx_k_zlib[] = "zlib";
+static char __pyx_k_1_1_4[] = "1.1.4";
+static char __pyx_k_4_2_1[] = "4.2.1";
+static char __pyx_k_align[] = "align";
+static char __pyx_k_array[] = "array";
+static char __pyx_k_attrs[] = "attrs";
+static char __pyx_k_atype[] = "atype";
+static char __pyx_k_cdf_2[] = "cdf";
+static char __pyx_k_check[] = "check";
+static char __pyx_k_close[] = "close";
+static char __pyx_k_count[] = "count";
+static char __pyx_k_d_d_d[] = "%d.%d.%d";
+static char __pyx_k_dates[] = "dates";
+static char __pyx_k_dimid[] = "_dimid";
+static char __pyx_k_dtype[] = "dtype";
+static char __pyx_k_empty[] = "empty";
+static char __pyx_k_exact[] = "exact";
+static char __pyx_k_files[] = "files";
+static char __pyx_k_float[] = "float";
+static char __pyx_k_grp_2[] = "grp";
+static char __pyx_k_grpid[] = "_grpid";
+static char __pyx_k_hours[] = "hours";
+static char __pyx_k_isnan[] = "isnan";
+static char __pyx_k_items[] = "items";
+static char __pyx_k_lower[] = "lower";
+static char __pyx_k_msecs[] = "msecs";
+static char __pyx_k_names[] = "names";
+static char __pyx_k_numpy[] = "numpy";
+static char __pyx_k_parse[] = "parse";
+static char __pyx_k_proxy[] = "proxy";
+static char __pyx_k_put_2[] = "_put";
+static char __pyx_k_range[] = "range";
+static char __pyx_k_ravel[] = "ravel";
+static char __pyx_k_redef[] = "_redef";
+static char __pyx_k_s_s_s[] = "%s %s%s\n";
+static char __pyx_k_scale[] = "scale";
+static char __pyx_k_shape[] = "shape";
+static char __pyx_k_since[] = "since";
+static char __pyx_k_split[] = "split";
+static char __pyx_k_start[] = "start";
+static char __pyx_k_times[] = "times";
+static char __pyx_k_tostr[] = "_tostr";
+static char __pyx_k_tsecs[] = "tsecs";
+static char __pyx_k_tzutc[] = "tzutc";
+static char __pyx_k_units[] = "units";
+static char __pyx_k_utf_8[] = "utf-8";
+static char __pyx_k_utime[] = "utime";
+static char __pyx_k_vInst[] = "vInst";
+static char __pyx_k_vName[] = "vName";
+static char __pyx_k_value[] = "value";
+static char __pyx_k_varid[] = "_varid";
+static char __pyx_k_zeros[] = "zeros";
+static char __pyx_k_MFTime[] = "MFTime";
+static char __pyx_k_aggdim[] = "aggdim";
+static char __pyx_k_append[] = "append";
+static char __pyx_k_around[] = "around";
+static char __pyx_k_astype[] = "astype";
+static char __pyx_k_decode[] = "decode";
+static char __pyx_k_dims_2[] = "dims";
+static char __pyx_k_dparse[] = "dparse";
+static char __pyx_k_dset_2[] = "_dset";
+static char __pyx_k_encode[] = "encode";
+static char __pyx_k_enddef[] = "_enddef";
+static char __pyx_k_endian[] = "endian";
+static char __pyx_k_fields[] = "fields";
+static char __pyx_k_filled[] = "filled";
+static char __pyx_k_format[] = "format";
+static char __pyx_k_groups[] = "groups";
+static char __pyx_k_import[] = "__import__";
+static char __pyx_k_isvlen[] = "_isvlen";
+static char __pyx_k_little[] = "little";
+static char __pyx_k_lstArr[] = "lstArr";
+static char __pyx_k_master[] = "master";
+static char __pyx_k_module[] = "__module__";
+static char __pyx_k_msecsd[] = "msecsd";
+static char __pyx_k_name_2[] = "_name";
+static char __pyx_k_native[] = "native";
+static char __pyx_k_ncdump[] = "ncdump";
+static char __pyx_k_nctime[] = "nctime";
+static char __pyx_k_nelems[] = "nelems";
+static char __pyx_k_object[] = "object";
+static char __pyx_k_parent[] = "parent";
+static char __pyx_k_path_2[] = "path";
+static char __pyx_k_path_s[] = "path = %s\n";
+static char __pyx_k_recLen[] = "_recLen";
+static char __pyx_k_recVar[] = "_recVar";
+static char __pyx_k_second[] = "second";
+static char __pyx_k_select[] = "select";
+static char __pyx_k_stride[] = "stride";
+static char __pyx_k_string[] = "string";
+static char __pyx_k_tolist[] = "tolist";
+static char __pyx_k_typeid[] = "typeid";
+static char __pyx_k_tzinfo[] = "tzinfo";
+static char __pyx_k_values[] = "values";
+static char __pyx_k_vltype[] = "_vltype";
+static char __pyx_k_IOError[] = "IOError";
+static char __pyx_k_NETCDF3[] = "NETCDF3";
+static char __pyx_k_NETCDF4[] = "NETCDF4";
+static char __pyx_k_asarray[] = "asarray";
+static char __pyx_k_cdfTLen[] = "_cdfTLen";
+static char __pyx_k_cdfVLen[] = "_cdfVLen";
+static char __pyx_k_cdftime[] = "cdftime";
+static char __pyx_k_clobber[] = "clobber";
+static char __pyx_k_cmptype[] = "_cmptype";
+static char __pyx_k_d_d_d_s[] = "%d.%d.%d-%s";
+static char __pyx_k_dimlens[] = "dimlens";
+static char __pyx_k_dimname[] = "dimname";
+static char __pyx_k_exclude[] = "exclude";
+static char __pyx_k_extDims[] = "extDims";
+static char __pyx_k_extType[] = "extType";
+static char __pyx_k_files_2[] = "_files";
+static char __pyx_k_flatten[] = "flatten";
+static char __pyx_k_formats[] = "formats";
+static char __pyx_k_getattr[] = "__getattr__";
+static char __pyx_k_getdims[] = "_getdims";
+static char __pyx_k_getitem[] = "__getitem__";
+static char __pyx_k_getname[] = "_getname";
+static char __pyx_k_group_s[] = "group %s:\n";
+static char __pyx_k_nc_type[] = "_nc_type";
+static char __pyx_k_ncattrs[] = "ncattrs";
+static char __pyx_k_netCDF4[] = "netCDF4";
+static char __pyx_k_newname[] = "newname";
+static char __pyx_k_offsets[] = "offsets";
+static char __pyx_k_oldname[] = "oldname";
+static char __pyx_k_persist[] = "persist";
+static char __pyx_k_prepare[] = "__prepare__";
+static char __pyx_k_put_ind[] = "put_ind";
+static char __pyx_k_python3[] = "python3";
+static char __pyx_k_ref_num[] = "ref_num";
+static char __pyx_k_replace[] = "replace";
+static char __pyx_k_reshape[] = "reshape";
+static char __pyx_k_s_s_s_2[] = "%s %s(%s)\n";
+static char __pyx_k_seconds[] = "seconds";
+static char __pyx_k_setattr[] = "__setattr__";
+static char __pyx_k_shape_2[] = "_shape";
+static char __pyx_k_shuffle[] = "shuffle";
+static char __pyx_k_squeeze[] = "squeeze";
+static char __pyx_k_timestr[] = "timestr";
+static char __pyx_k_unicode[] = "__unicode__";
+static char __pyx_k_value_2[] = "_value";
+static char __pyx_k_varInfo[] = "varInfo";
+static char __pyx_k_varname[] = "varname";
+static char __pyx_k_version[] = "__version__";
+static char __pyx_k_vltypes[] = "vltypes";
+static char __pyx_k_weakref[] = "weakref";
+static char __pyx_k_KeyError[] = "KeyError";
+static char __pyx_k_NUMCHARS[] = "NUMCHARS";
+static char __pyx_k_Variable[] = "_Variable";
+static char __pyx_k_aggDimId[] = "aggDimId";
+static char __pyx_k_basedate[] = "basedate";
+static char __pyx_k_byteswap[] = "byteswap";
+static char __pyx_k_calendar[] = "calendar";
+static char __pyx_k_cmptypes[] = "cmptypes";
+static char __pyx_k_compound[] = "compound";
+static char __pyx_k_datatype[] = "datatype";
+static char __pyx_k_date2num[] = "date2num";
+static char __pyx_k_datetime[] = "datetime";
+static char __pyx_k_dimnames[] = "dimnames";
+static char __pyx_k_diskless[] = "diskless";
+static char __pyx_k_endswith[] = "endswith";
+static char __pyx_k_extShape[] = "extShape";
+static char __pyx_k_filename[] = "filename";
+static char __pyx_k_find_dim[] = "_find_dim";
+static char __pyx_k_groups_s[] = "    groups = %s\n";
+static char __pyx_k_grpnames[] = "grpnames";
+static char __pyx_k_ismasked[] = "ismasked";
+static char __pyx_k_isscalar[] = "isscalar";
+static char __pyx_k_itemsize[] = "itemsize";
+static char __pyx_k_newSlice[] = "newSlice";
+static char __pyx_k_num2date[] = "num2date";
+static char __pyx_k_qualname[] = "__qualname__";
+static char __pyx_k_quantize[] = "_quantize";
+static char __pyx_k_ref_date[] = "ref_date";
+static char __pyx_k_standard[] = "standard";
+static char __pyx_k_subdtype[] = "subdtype";
+static char __pyx_k_tostring[] = "tostring";
+static char __pyx_k_typecode[] = "typecode";
+static char __pyx_k_varnames[] = "varnames";
+static char __pyx_k_warnings[] = "warnings";
+static char __pyx_k_Dimension[] = "_Dimension";
+static char __pyx_k_FillValue[] = "_FillValue";
+static char __pyx_k_MFDataset[] = "MFDataset";
+static char __pyx_k_TypeError[] = "TypeError";
+static char __pyx_k_UNDEFINED[] = "UNDEFINED";
+static char __pyx_k_byteorder[] = "byteorder";
+static char __pyx_k_cdfRecVar[] = "_cdfRecVar";
+static char __pyx_k_cdfVLen_2[] = "cdfVLen";
+static char __pyx_k_complevel[] = "complevel";
+static char __pyx_k_datashape[] = "datashape";
+static char __pyx_k_dateparse[] = "_dateparse";
+static char __pyx_k_delncattr[] = "delncattr";
+static char __pyx_k_dimtotlen[] = "dimtotlen";
+static char __pyx_k_enumerate[] = "enumerate";
+static char __pyx_k_getncattr[] = "getncattr";
+static char __pyx_k_gregorian[] = "gregorian";
+static char __pyx_k_isostring[] = "isostring";
+static char __pyx_k_itertools[] = "itertools";
+static char __pyx_k_majorvers[] = "majorvers";
+static char __pyx_k_mastervar[] = "_mastervar";
+static char __pyx_k_metaclass[] = "__metaclass__";
+static char __pyx_k_minorvers[] = "minorvers";
+static char __pyx_k_npversion[] = "_npversion";
+static char __pyx_k_nunlimdim[] = "_nunlimdim";
+static char __pyx_k_posixpath[] = "posixpath";
+static char __pyx_k_recdimlen[] = "recdimlen";
+static char __pyx_k_setncattr[] = "setncattr";
+static char __pyx_k_timedelta[] = "timedelta";
+static char __pyx_k_totaltime[] = "totaltime";
+static char __pyx_k_traceback[] = "traceback";
+static char __pyx_k_unlimdims[] = "unlimdims";
+static char __pyx_k_variables[] = "variables";
+static char __pyx_k_walk_grps[] = "_walk_grps";
+static char __pyx_k_IndexError[] = "IndexError";
+static char __pyx_k_ValueError[] = "ValueError";
+static char __pyx_k_add_offset[] = "add_offset";
+static char __pyx_k_aggDimName[] = "aggDimName";
+static char __pyx_k_chunksizes[] = "chunksizes";
+static char __pyx_k_contiguous[] = "contiguous";
+static char __pyx_k_data_model[] = "_data_model";
+static char __pyx_k_date2index[] = "date2index";
+static char __pyx_k_dimensions[] = "dimensions";
+static char __pyx_k_dtype_name[] = "dtype_name";
+static char __pyx_k_fill_value[] = "fill_value";
+static char __pyx_k_filling_on[] = "filling on";
+static char __pyx_k_fletcher32[] = "fletcher32";
+static char __pyx_k_groups_s_2[] = "    groups: %s\n";
+static char __pyx_k_iscompound[] = "_iscompound";
+static char __pyx_k_masterDims[] = "masterDims";
+static char __pyx_k_masterType[] = "masterType";
+static char __pyx_k_ncdump_var[] = "ncdump_var";
+static char __pyx_k_nctonptype[] = "_nctonptype";
+static char __pyx_k_netcdftime[] = "netcdftime";
+static char __pyx_k_nptonctype[] = "_nptonctype";
+static char __pyx_k_preemption[] = "preemption";
+static char __pyx_k_recdimname[] = "recdimname";
+static char __pyx_k_sortbylist[] = "_sortbylist";
+static char __pyx_k_startswith[] = "startswith";
+static char __pyx_k_time2index[] = "time2index";
+static char __pyx_k_ImportError[] = "ImportError";
+static char __pyx_k_NC_DISKLESS[] = "NC_DISKLESS";
+static char __pyx_k_OrderedDict[] = "OrderedDict";
+static char __pyx_k_assign_vlen[] = "_assign_vlen";
+static char __pyx_k_cdfRecVar_2[] = "cdfRecVar";
+static char __pyx_k_chunk_cache[] = "chunk_cache";
+static char __pyx_k_collections[] = "collections";
+static char __pyx_k_concatenate[] = "concatenate";
+static char __pyx_k_dateutil_tz[] = "dateutil.tz";
+static char __pyx_k_disk_format[] = "_disk_format";
+static char __pyx_k_file_format[] = "_file_format";
+static char __pyx_k_filling_off[] = "filling off\n";
+static char __pyx_k_isprimitive[] = "_isprimitive";
+static char __pyx_k_isunlimited[] = "isunlimited";
+static char __pyx_k_keepweakref[] = "keepweakref";
+static char __pyx_k_masterShape[] = "masterShape";
+static char __pyx_k_microsecond[] = "microsecond";
+static char __pyx_k_millisecond[] = "millisecond";
+static char __pyx_k_ordereddict[] = "ordereddict";
+static char __pyx_k_patchstring[] = "patchstring";
+static char __pyx_k_releasevers[] = "releasevers";
+static char __pyx_k_string_type[] = ": string type";
+static char __pyx_k_stringtoarr[] = "stringtoarr";
+static char __pyx_k_variables_s[] = "    variables = %s\n";
+static char __pyx_k_MFTime__time[] = "_MFTime__time";
+static char __pyx_k_RuntimeError[] = "RuntimeError";
+static char __pyx_k_chartostring[] = "chartostring";
+static char __pyx_k_data_model_2[] = "data_model";
+static char __pyx_k_dimensions_s[] = "    dimensions = %s\n";
+static char __pyx_k_getattribute[] = "__getattribute__";
+static char __pyx_k_masked_array[] = "masked_array";
+static char __pyx_k_masterRecVar[] = "masterRecVar";
+static char __pyx_k_microseconds[] = "microseconds";
+static char __pyx_k_milliseconds[] = "milliseconds";
+static char __pyx_k_private_atts[] = "_private_atts";
+static char __pyx_k_recdimname_2[] = "_recdimname";
+static char __pyx_k_scale_factor[] = "scale_factor";
+static char __pyx_k_stringtochar[] = "stringtochar";
+static char __pyx_k_version_info[] = "version_info";
+static char __pyx_k_Illegal_index[] = "Illegal index";
+static char __pyx_k_MFTime___init[] = "MFTime.__init__";
+static char __pyx_k_MFTime__delta[] = "_MFTime__delta";
+static char __pyx_k_NETCDF3_64BIT[] = "NETCDF3_64BIT";
+static char __pyx_k_datatype_name[] = "datatype_name";
+static char __pyx_k_disk_format_2[] = "disk_format";
+static char __pyx_k_file_format_2[] = "file_format";
+static char __pyx_k_getlibversion[] = "getlibversion";
+static char __pyx_k_is_native_big[] = "is_native_big";
+static char __pyx_k_missing_value[] = "missing_value";
+static char __pyx_k_name_s_size_s[] = ": name = '%s', size = %s\n";
+static char __pyx_k_netCDF4_utils[] = "netCDF4_utils";
+static char __pyx_k_set_auto_mask[] = "set_auto_mask";
+static char __pyx_k_timestr_split[] = "timestr_split";
+static char __pyx_k_unicode_error[] = "unicode_error";
+static char __pyx_k_AttributeError[] = "AttributeError";
+static char __pyx_k_Variable___len[] = "_Variable.__len__";
+static char __pyx_k_current_size_s[] = "current size = %s\n";
+static char __pyx_k_has_rename_grp[] = "__has_rename_grp__";
+static char __pyx_k_hdf5libversion[] = "__hdf5libversion__";
+static char __pyx_k_set_auto_scale[] = "set_auto_scale";
+static char __pyx_k_supportedtypes[] = "_supportedtypes";
+static char __pyx_k_Dimension___len[] = "_Dimension.__len__";
+static char __pyx_k_MFDataset_close[] = "MFDataset.close";
+static char __pyx_k_NETCDF3_CLASSIC[] = "NETCDF3_CLASSIC";
+static char __pyx_k_NETCDF4_CLASSIC[] = "NETCDF4_CLASSIC";
+static char __pyx_k_Variable___init[] = "_Variable.__init__";
+static char __pyx_k_Variable___repr[] = "_Variable.__repr__";
+static char __pyx_k_Variable__shape[] = "_Variable._shape";
+static char __pyx_k_current_shape_s[] = "current shape = %s\n";
+static char __pyx_k_dateutil_parser[] = "dateutil.parser";
+static char __pyx_k_has_nc_inq_path[] = "__has_nc_inq_path__";
+static char __pyx_k_out_array_shape[] = "_out_array_shape";
+static char __pyx_k_Dimension___init[] = "_Dimension.__init__";
+static char __pyx_k_Dimension___repr[] = "_Dimension.__repr__";
+static char __pyx_k_MFDataset___init[] = "MFDataset.__init__";
+static char __pyx_k_MFDataset___repr[] = "MFDataset.__repr__";
+static char __pyx_k_MFTime___getitem[] = "MFTime.__getitem__";
+static char __pyx_k_StartCountStride[] = "_StartCountStride";
+static char __pyx_k_Variable_ncattrs[] = "_Variable.ncattrs";
+static char __pyx_k_default_encoding[] = "default_encoding";
+static char __pyx_k_default_fillvals[] = "default_fillvals";
+static char __pyx_k_is_native_little[] = "is_native_little";
+static char __pyx_k_vlen_data_type_s[] = "vlen data type: %s\n";
+static char __pyx_k_MFDataset_ncattrs[] = "MFDataset.ncattrs";
+static char __pyx_k_Variable_typecode[] = "_Variable.typecode";
+static char __pyx_k_gethdf5libversion[] = "_gethdf5libversion";
+static char __pyx_k_netcdf4libversion[] = "__netcdf4libversion__";
+static char __pyx_k_UnicodeDecodeError[] = "UnicodeDecodeError";
+static char __pyx_k_Variable___getattr[] = "_Variable.__getattr__";
+static char __pyx_k_Variable___getitem[] = "_Variable.__getitem__";
+static char __pyx_k_dimensions_sizes_s[] = "    dimensions(sizes): %s\n";
+static char __pyx_k_set_default_format[] = "_set_default_format";
+static char __pyx_k_MFDataset___setattr[] = "MFDataset.__setattr__";
+static char __pyx_k_get_var_chunk_cache[] = "get_var_chunk_cache";
+static char __pyx_k_proleptic_gregorian[] = "proleptic_gregorian";
+static char __pyx_k_compound_data_type_s[] = "compound data type: %s\n";
+static char __pyx_k_name_s_numpy_dtype_s[] = ": name = '%s', numpy dtype = %s\n";
+static char __pyx_k_Dimension_isunlimited[] = "_Dimension.isunlimited";
+static char __pyx_k_set_auto_maskandscale[] = "set_auto_maskandscale";
+static char __pyx_k_name_cannot_be_altered[] = "name cannot be altered";
+static char __pyx_k_unlimited_dimensions_s[] = "unlimited dimensions = %s\n";
+static char __pyx_k_variables_dimensions_s[] = "    variables(dimensions): %s\n";
+static char __pyx_k_least_significant_digit[] = "least_significant_digit";
+static char __pyx_k_no_since_in_unit_string[] = "no 'since' in unit_string";
+static char __pyx_k_shape_cannot_be_altered[] = "shape cannot be altered";
+static char __pyx_k_unlimited_name_s_size_s[] = " (unlimited): name = '%s', size = %s\n";
+static char __pyx_k_MFDataset___getattribute[] = "MFDataset.__getattribute__";
+static char __pyx_k_unlimited_dimensions_s_2[] = "unlimited dimensions: %s\n";
+static char __pyx_k_has_nc_inq_format_extended[] = "__has_nc_inq_format_extended__";
+static char __pyx_k_s_not_a_valid_variable_name[] = "%s not a valid variable name";
+static char __pyx_k_dimensions_cannot_be_altered[] = "dimensions cannot be altered";
+static char __pyx_k_s_not_a_valid_dimension_name[] = "%s not a valid dimension name";
+static char __pyx_k_mode_must_be_w_r_a_or_r_got_s[] = "mode must be 'w', 'r', 'a' or 'r+', got '%s'";
+static char __pyx_k_string_name_of_Group_instance[] = "string name of Group instance";
+static char __pyx_k_Variable_set_auto_maskandscale[] = "_Variable.set_auto_maskandscale";
+static char __pyx_k_filepath_method_not_enabled_To[] = "\nfilepath method not enabled.  To enable, install Cython, make sure you have \nversion 4.1.2 or higher of the netcdf C lib, and rebuild netcdf4-python.";
+static char __pyx_k_renameGroup_method_not_enabled[] = "\nrenameGroup method not enabled.  To enable, install Cython, make sure you have \nversion 4.3.1 or higher of the netcdf C lib, and rebuild netcdf4-python.";
+static char __pyx_k_FillValue_attribute_must_be_set[] = "_FillValue attribute must be set when variable is ";
+static char __pyx_k_Introduction_Python_interface_t[] = "\nIntroduction\n============\n\nPython interface to the netCDF version 4 library.  U{netCDF version 4 \n<http://www.unidata.ucar.edu/software/netcdf/netcdf-4>} has many features \nnot found in earlier versions of the library and is implemented on top of \nU{HDF5 <http://www.hdfgroup.org/HDF5>}. This module can read and write \nfiles in both the new netCDF 4 and the old netCDF 3 format, and can create \nfiles that are readable by HD [...]
+static char __pyx_k_MFDataset_self_files_check_Fals[] = "\nMFDataset(self, files, check=False, aggdim=None, exclude=[])\n\nClass for reading multi-file netCDF Datasets, making variables\nspanning multiple files appear as if they were in one file.\n\nDatasets must be in C{NETCDF4_CLASSIC, NETCDF3_CLASSIC or NETCDF3_64BIT}\nformat (C{NETCDF4} Datasets won't work).\n\nAdapted from U{pycdf <http://pysclint.sourceforge.net/pycdf>} by Andre Gosselin.\n\nExample usage:\n\n>>> import numpy\n>>>  [...]
+static char __pyx_k_MFTime_self_time_units_None_Cla[] = "\nMFTime(self, time, units=None)\n\nClass providing an interface to a MFDataset time Variable by imposing a unique common\ntime unit to all files.\n\nExample usage:\n\n>>> import numpy\n>>> f1 = Dataset('mftest_1.nc','w', format='NETCDF4_CLASSIC')\n>>> f2 = Dataset('mftest_2.nc','w', format='NETCDF4_CLASSIC')\n>>> f1.createDimension('time',None)\n>>> f2.createDimension('time',None)\n>>> t1 = f1.createVariable('time','i',('time',))\ [...]
+static char __pyx_k_Users_jsw_python_netcdf4_python[] = "/Users/jsw/python/netcdf4-python.git/utils.pyx";
+static char __pyx_k_Variable_object_no_longer_valid[] = "Variable object no longer valid";
+static char __pyx_k_assign_vlen_method_only_for_use[] = "_assign_vlen method only for use with VLEN variables";
+static char __pyx_k_cannot_set__FillValue_attribute[] = "cannot set _FillValue attribute for VLEN or compound variable";
+static char __pyx_k_cannot_specify_chunksizes_for_a[] = "cannot specify chunksizes for a contiguous dataset";
+static char __pyx_k_endian_keyword_argument_must_be[] = "'endian' keyword argument must be 'little','big' or 'native', got '%s'";
+static char __pyx_k_endian_ness_of_dtype_and_endian[] = "endian-ness of dtype and endian kwarg do not match, using endian kwarg";
+static char __pyx_k_get_variables_s_dimension_names[] = "get variables's dimension names";
+static char __pyx_k_illegal_data_type_for_attribute[] = "illegal data type for attribute, must be one of %s, got %s";
+static char __pyx_k_s_is_one_of_the_reserved_attrib[] = "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead.";
+static char __pyx_k_single_element_VLEN_slices_must[] = "single element VLEN slices must be specified by integers only";
+static char __pyx_k_wrong_data_type_in_object_array[] = "wrong data type in object array: should be %s, got %s";
+static char __pyx_k_wrong_data_type_should_be_s_got[] = "wrong data type: should be %s, got %s";
+static char __pyx_k_Dimension_object_no_longer_valid[] = "Dimension object no longer valid";
+static char __pyx_k_MFNetCDF4_only_works_with_NETCDF[] = "MFNetCDF4 only works with NETCDF3_CLASSIC, NETCDF3_64BIT and NETCDF4_CLASSIC formatted files, not NETCDF4";
+static char __pyx_k_MFTime_requires_that_the_same_ti[] = "MFTime requires that the same time calendar is used by all files.";
+static char __pyx_k_MFTime_requires_that_the_time_va[] = "MFTime requires that the time variable in all files have a calendar attribute";
+static char __pyx_k_Return_the_number_of_stored_elem[] = "Return the number of stored elements.";
+static char __pyx_k_Unsupported_compound_type_elemen[] = "Unsupported compound type element";
+static char __pyx_k_Variable_length_strings_are_only[] = "Variable length strings are only supported for the NETCDF4 format. For other formats, consider using netCDF4.stringtochar to convert string arrays into character arrays with an additional dimension.";
+static char __pyx_k_aggregation_variable_s_not_defin[] = "aggregation variable %s not defined in %s";
+static char __pyx_k_attribute_s_has_unsupported_data[] = "attribute %s has unsupported datatype";
+static char __pyx_k_cannot_assign_fill_value_for_mas[] = "cannot assign fill_value for masked array when missing_value attribute is not a scalar";
+static char __pyx_k_cannot_close_a_L_Group_only_appl[] = "cannot close a L{Group} (only applies to Dataset)";
+static char __pyx_k_cannot_find_compound_type_in_thi[] = "cannot find compound type in this group or parent groups";
+static char __pyx_k_cannot_using_file_globbing_for_r[] = "cannot using file globbing for remote (OPeNDAP) datasets";
+static char __pyx_k_chunksizes_must_be_a_sequence_wi[] = "chunksizes must be a sequence with the same length as dimensions";
+static char __pyx_k_compound_field_of_an_unsupported[] = "compound field of an unsupported data type";
+static char __pyx_k_created_using_fill_value_keyword[] = "created (using fill_value keyword to createVariable)";
+static char __pyx_k_data_to_put_in_string_variable_m[] = "data to put in string variable must be an object array containing Python strings";
+static char __pyx_k_dateutil_module_required_for_acc[] = "dateutil module required for accuracy < 1 second";
+static char __pyx_k_dimension_s_not_defined_in_group[] = "dimension %s not defined in group %s or any group in it's family tree";
+static char __pyx_k_diskless_mode_requires_netcdf_li[] = "diskless mode requires netcdf lib >= 4.2.1, you have %s";
+static char __pyx_k_dtype_must_string_or_unicode_S_o[] = "dtype must string or unicode ('S' or 'U')";
+static char __pyx_k_filling_on_default__FillValue_of[] = "filling on, default _FillValue of %s ignored\n";
+static char __pyx_k_find_current_sizes_of_all_variab[] = "find current sizes of all variable dimensions";
+static char __pyx_k_format_must_be_NETCDF4_NETCDF4_C[] = "format must be 'NETCDF4', 'NETCDF4_CLASSIC', 'NETCDF3_64BIT', or 'NETCDF3_CLASSIC', got '%s'";
+static char __pyx_k_illegal_primitive_data_type_must[] = "illegal primitive data type, must be one of %s, got %s";
+static char __pyx_k_invalid_scale_factor_or_add_offs[] = "invalid scale_factor or add_offset attribute, no unpacking done...";
+static char __pyx_k_master_dataset_s_does_not_have_a[] = "master dataset %s does not have a aggregation dimension";
+static char __pyx_k_milliseconds_microseconds_not_su[] = "milliseconds/microseconds not supported for this calendar";
+static char __pyx_k_negative_strides_not_allowed_whe[] = "negative strides not allowed when slicing MFVariable Variable instance";
+static char __pyx_k_numpy_data_type_for_primitive_da[] = "numpy data type (for primitive data types) or VLType/CompoundType instance (for compound or vlen data types)";
+static char __pyx_k_only_endian_native_allowed_for_N[] = "only endian='native' allowed for NETCDF3 files";
+static char __pyx_k_only_numpy_string_unicode_or_obj[] = "only numpy string, unicode or object arrays can be assigned to VLEN str var slices";
+static char __pyx_k_please_install_ordereddict_https[] = "please install ordereddict (https://pypi.python.org/pypi/ordereddict)";
+static char __pyx_k_requires_numpy_version_1_0rc1_or[] = "requires numpy version 1.0rc1 or later";
+static char __pyx_k_root_group_s_data_model_file_for[] = "root group (%s data model, file format %s):\n";
+static char __pyx_k_size_of_data_array_does_not_conf[] = "size of data array does not conform to slice";
+static char __pyx_k_strides_must_all_be_1_for_string[] = "strides must all be 1 for string variables";
+static char __pyx_k_strides_must_all_be_1_for_vlen_v[] = "strides must all be 1 for vlen variables";
+static char __pyx_k_string_name_of_Dimension_instanc[] = "string name of Dimension instance";
+static char __pyx_k_string_name_of_Variable_instance[] = "string name of Variable instance";
+static char __pyx_k_to_assign_values_to_a_non_scalar[] = "to assign values to a non-scalar variable, use a slice";
+static char __pyx_k_to_retrieve_values_from_a_non_sc[] = "to retrieve values from a non-scalar variable, use slicing";
+static char __pyx_k_type_must_string_or_unicode_S_or[] = "type must string or unicode ('S' or 'U')";
+static char __pyx_k_unsupported_component_type_for_V[] = "unsupported component type for VLEN";
+static char __pyx_k_unsupported_datatype_specified_f[] = "unsupported datatype specified for VLEN";
+static char __pyx_k_variable_s_data_type_mismatch_be[] = "variable %s : data type mismatch between master %s (%s) and extension %s (%s)";
+static char __pyx_k_variable_s_dimensions_mismatch_b[] = "variable %s : dimensions mismatch between master %s (%s) and extension %s (%s)";
+static char __pyx_k_variable_s_rank_mismatch_between[] = "variable %s : rank mismatch between master %s (%s) and extension %s (%s)";
+static char __pyx_k_variable_s_shape_mismatch_betwee[] = "variable %s : shape mismatch between master %s (%s) and extension %s (%s)";
+static char __pyx_k_vlen_string_array_attributes_not[] = "vlen string array attributes not supported";
+static char __pyx_k_Users_jsw_python_netcdf4_python_2[] = "/Users/jsw/python/netcdf4-python.git/netCDF4.pyx";
+static char __pyx_k_s_is_one_of_the_reserved_attrib_2[] = "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead.";
+static char __pyx_k_filling_on_default__FillValue_of_2[] = "filling on, default _FillValue of %s used\n";
+static char __pyx_k_master_dataset_s_does_not_have_a_2[] = "master dataset %s does not have any variables to aggregate";
+static PyObject *__pyx_n_s_;
+static PyObject *__pyx_kp_s_0m;
+static PyObject *__pyx_kp_s_1;
+static PyObject *__pyx_kp_s_1_1_4;
+static PyObject *__pyx_kp_s_4_2_1;
+static PyObject *__pyx_kp_s_4m;
+static PyObject *__pyx_n_s_AttributeError;
+static PyObject *__pyx_n_s_Dimension;
+static PyObject *__pyx_n_s_Dimension___init;
+static PyObject *__pyx_n_s_Dimension___len;
+static PyObject *__pyx_n_s_Dimension___repr;
+static PyObject *__pyx_n_s_Dimension_isunlimited;
+static PyObject *__pyx_kp_s_Dimension_object_no_longer_valid;
+static PyObject *__pyx_n_s_FillValue;
+static PyObject *__pyx_kp_s_FillValue_attribute_must_be_set;
+static PyObject *__pyx_n_s_IOError;
+static PyObject *__pyx_kp_s_Illegal_index;
+static PyObject *__pyx_n_s_ImportError;
+static PyObject *__pyx_n_s_IndexError;
+static PyObject *__pyx_n_s_KeyError;
+static PyObject *__pyx_n_s_MFDataset;
+static PyObject *__pyx_n_s_MFDataset___getattribute;
+static PyObject *__pyx_n_s_MFDataset___init;
+static PyObject *__pyx_n_s_MFDataset___repr;
+static PyObject *__pyx_n_s_MFDataset___setattr;
+static PyObject *__pyx_n_s_MFDataset_close;
+static PyObject *__pyx_n_s_MFDataset_ncattrs;
+static PyObject *__pyx_kp_s_MFDataset_self_files_check_Fals;
+static PyObject *__pyx_kp_s_MFNetCDF4_only_works_with_NETCDF;
+static PyObject *__pyx_n_s_MFTime;
+static PyObject *__pyx_n_s_MFTime___getitem;
+static PyObject *__pyx_n_s_MFTime___init;
+static PyObject *__pyx_n_s_MFTime__delta;
+static PyObject *__pyx_n_s_MFTime__time;
+static PyObject *__pyx_kp_s_MFTime_requires_that_the_same_ti;
+static PyObject *__pyx_kp_s_MFTime_requires_that_the_time_va;
+static PyObject *__pyx_kp_s_MFTime_self_time_units_None_Cla;
+static PyObject *__pyx_n_s_NC_DISKLESS;
+static PyObject *__pyx_n_s_NETCDF3;
+static PyObject *__pyx_n_s_NETCDF3_64BIT;
+static PyObject *__pyx_n_s_NETCDF3_CLASSIC;
+static PyObject *__pyx_n_s_NETCDF4;
+static PyObject *__pyx_n_s_NETCDF4_CLASSIC;
+static PyObject *__pyx_n_s_NUMCHARS;
+static PyObject *__pyx_n_s_O;
+static PyObject *__pyx_n_s_OrderedDict;
+static PyObject *__pyx_n_s_RuntimeError;
+static PyObject *__pyx_n_s_S;
+static PyObject *__pyx_n_s_S1;
+static PyObject *__pyx_n_s_StartCountStride;
+static PyObject *__pyx_n_s_TypeError;
+static PyObject *__pyx_n_s_U;
+static PyObject *__pyx_n_s_U1;
+static PyObject *__pyx_n_s_UNDEFINED;
+static PyObject *__pyx_n_s_UnicodeDecodeError;
+static PyObject *__pyx_kp_s_Unsupported_compound_type_elemen;
+static PyObject *__pyx_kp_s_Users_jsw_python_netcdf4_python;
+static PyObject *__pyx_kp_s_Users_jsw_python_netcdf4_python_2;
+static PyObject *__pyx_n_s_V;
+static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_n_s_Variable;
+static PyObject *__pyx_n_s_Variable___getattr;
+static PyObject *__pyx_n_s_Variable___getitem;
+static PyObject *__pyx_n_s_Variable___init;
+static PyObject *__pyx_n_s_Variable___len;
+static PyObject *__pyx_n_s_Variable___repr;
+static PyObject *__pyx_n_s_Variable__shape;
+static PyObject *__pyx_kp_s_Variable_length_strings_are_only;
+static PyObject *__pyx_n_s_Variable_ncattrs;
+static PyObject *__pyx_kp_s_Variable_object_no_longer_valid;
+static PyObject *__pyx_n_s_Variable_set_auto_maskandscale;
+static PyObject *__pyx_n_s_Variable_typecode;
+static PyObject *__pyx_kp_s__116;
+static PyObject *__pyx_kp_s__15;
+static PyObject *__pyx_kp_s__16;
+static PyObject *__pyx_kp_s__25;
+static PyObject *__pyx_kp_s__36;
+static PyObject *__pyx_kp_s__38;
+static PyObject *__pyx_kp_s__39;
+static PyObject *__pyx_kp_s__41;
+static PyObject *__pyx_kp_s__42;
+static PyObject *__pyx_n_s__44;
+static PyObject *__pyx_kp_s__51;
+static PyObject *__pyx_kp_s__52;
+static PyObject *__pyx_kp_s__53;
+static PyObject *__pyx_kp_s__54;
+static PyObject *__pyx_n_s_a;
+static PyObject *__pyx_n_s_add_offset;
+static PyObject *__pyx_n_s_aggDimId;
+static PyObject *__pyx_n_s_aggDimName;
+static PyObject *__pyx_n_s_aggdim;
+static PyObject *__pyx_kp_s_aggregation_variable_s_not_defin;
+static PyObject *__pyx_n_s_align;
+static PyObject *__pyx_n_s_all;
+static PyObject *__pyx_n_s_any;
+static PyObject *__pyx_n_s_append;
+static PyObject *__pyx_n_s_around;
+static PyObject *__pyx_n_s_arr;
+static PyObject *__pyx_n_s_array;
+static PyObject *__pyx_n_s_as;
+static PyObject *__pyx_n_s_asarray;
+static PyObject *__pyx_n_s_assign_vlen;
+static PyObject *__pyx_kp_s_assign_vlen_method_only_for_use;
+static PyObject *__pyx_n_s_astype;
+static PyObject *__pyx_kp_s_attribute_s_has_unsupported_data;
+static PyObject *__pyx_n_s_attrs;
+static PyObject *__pyx_n_s_atype;
+static PyObject *__pyx_n_s_b;
+static PyObject *__pyx_n_s_basedate;
+static PyObject *__pyx_n_s_big;
+static PyObject *__pyx_n_s_bool;
+static PyObject *__pyx_n_s_bs;
+static PyObject *__pyx_n_s_byteorder;
+static PyObject *__pyx_n_s_byteswap;
+static PyObject *__pyx_n_s_calendar;
+static PyObject *__pyx_kp_s_cannot_assign_fill_value_for_mas;
+static PyObject *__pyx_kp_s_cannot_close_a_L_Group_only_appl;
+static PyObject *__pyx_kp_s_cannot_find_compound_type_in_thi;
+static PyObject *__pyx_kp_s_cannot_set__FillValue_attribute;
+static PyObject *__pyx_kp_s_cannot_specify_chunksizes_for_a;
+static PyObject *__pyx_kp_s_cannot_using_file_globbing_for_r;
+static PyObject *__pyx_n_s_cdf;
+static PyObject *__pyx_n_s_cdfRecVar;
+static PyObject *__pyx_n_s_cdfRecVar_2;
+static PyObject *__pyx_n_s_cdfTLen;
+static PyObject *__pyx_n_s_cdfVLen;
+static PyObject *__pyx_n_s_cdfVLen_2;
+static PyObject *__pyx_n_s_cdf_2;
+static PyObject *__pyx_n_s_cdfm;
+static PyObject *__pyx_n_s_cdftime;
+static PyObject *__pyx_n_s_char;
+static PyObject *__pyx_n_s_chartostring;
+static PyObject *__pyx_n_s_check;
+static PyObject *__pyx_n_s_chunk_cache;
+static PyObject *__pyx_n_s_chunksizes;
+static PyObject *__pyx_kp_s_chunksizes_must_be_a_sequence_wi;
+static PyObject *__pyx_n_s_clobber;
+static PyObject *__pyx_n_s_close;
+static PyObject *__pyx_n_s_cmptype;
+static PyObject *__pyx_n_s_cmptypes;
+static PyObject *__pyx_n_s_cnt;
+static PyObject *__pyx_n_s_collections;
+static PyObject *__pyx_n_s_complevel;
+static PyObject *__pyx_n_s_compound;
+static PyObject *__pyx_kp_s_compound_data_type_s;
+static PyObject *__pyx_kp_s_compound_field_of_an_unsupported;
+static PyObject *__pyx_n_s_concatenate;
+static PyObject *__pyx_n_s_contiguous;
+static PyObject *__pyx_n_s_copy;
+static PyObject *__pyx_n_s_count;
+static PyObject *__pyx_kp_s_created_using_fill_value_keyword;
+static PyObject *__pyx_kp_s_current_shape_s;
+static PyObject *__pyx_kp_s_current_size_s;
+static PyObject *__pyx_kp_s_d_d_d;
+static PyObject *__pyx_kp_s_d_d_d_s;
+static PyObject *__pyx_n_s_dat;
+static PyObject *__pyx_n_s_data;
+static PyObject *__pyx_n_s_data_model;
+static PyObject *__pyx_n_s_data_model_2;
+static PyObject *__pyx_kp_s_data_to_put_in_string_variable_m;
+static PyObject *__pyx_n_s_datashape;
+static PyObject *__pyx_n_s_datatype;
+static PyObject *__pyx_n_s_datatype_name;
+static PyObject *__pyx_n_s_date;
+static PyObject *__pyx_n_s_date2index;
+static PyObject *__pyx_n_s_date2num;
+static PyObject *__pyx_n_s_dateparse;
+static PyObject *__pyx_n_s_dates;
+static PyObject *__pyx_n_s_datetime;
+static PyObject *__pyx_kp_s_dateutil_module_required_for_acc;
+static PyObject *__pyx_n_s_dateutil_parser;
+static PyObject *__pyx_n_s_dateutil_tz;
+static PyObject *__pyx_n_s_day;
+static PyObject *__pyx_n_s_days;
+static PyObject *__pyx_n_s_decode;
+static PyObject *__pyx_n_s_default_encoding;
+static PyObject *__pyx_n_s_default_fillvals;
+static PyObject *__pyx_n_s_delncattr;
+static PyObject *__pyx_n_s_dict;
+static PyObject *__pyx_n_s_dim;
+static PyObject *__pyx_kp_s_dimension_s_not_defined_in_group;
+static PyObject *__pyx_n_s_dimensions;
+static PyObject *__pyx_kp_s_dimensions_cannot_be_altered;
+static PyObject *__pyx_kp_s_dimensions_s;
+static PyObject *__pyx_kp_s_dimensions_sizes_s;
+static PyObject *__pyx_n_s_dimid;
+static PyObject *__pyx_n_s_dimlens;
+static PyObject *__pyx_n_s_dimname;
+static PyObject *__pyx_n_s_dimnames;
+static PyObject *__pyx_n_s_dims;
+static PyObject *__pyx_n_s_dims_2;
+static PyObject *__pyx_n_s_dimtotlen;
+static PyObject *__pyx_n_s_disk_format;
+static PyObject *__pyx_n_s_disk_format_2;
+static PyObject *__pyx_n_s_diskless;
+static PyObject *__pyx_kp_s_diskless_mode_requires_netcdf_li;
+static PyObject *__pyx_n_s_doc;
+static PyObject *__pyx_n_s_dparse;
+static PyObject *__pyx_n_s_dset;
+static PyObject *__pyx_n_s_dset_2;
+static PyObject *__pyx_n_s_dt;
+static PyObject *__pyx_n_s_dtype;
+static PyObject *__pyx_kp_s_dtype_must_string_or_unicode_S_o;
+static PyObject *__pyx_n_s_dtype_name;
+static PyObject *__pyx_n_s_elem;
+static PyObject *__pyx_n_s_empty;
+static PyObject *__pyx_n_s_encode;
+static PyObject *__pyx_n_s_enddef;
+static PyObject *__pyx_n_s_endian;
+static PyObject *__pyx_kp_s_endian_keyword_argument_must_be;
+static PyObject *__pyx_kp_s_endian_ness_of_dtype_and_endian;
+static PyObject *__pyx_n_s_endswith;
+static PyObject *__pyx_n_s_enumerate;
+static PyObject *__pyx_n_s_exact;
+static PyObject *__pyx_n_s_exclude;
+static PyObject *__pyx_n_s_extDims;
+static PyObject *__pyx_n_s_extShape;
+static PyObject *__pyx_n_s_extType;
+static PyObject *__pyx_n_s_f;
+static PyObject *__pyx_n_s_f4;
+static PyObject *__pyx_kp_s_f4_2;
+static PyObject *__pyx_kp_s_f4_3;
+static PyObject *__pyx_n_s_f8;
+static PyObject *__pyx_n_s_fields;
+static PyObject *__pyx_n_s_file_format;
+static PyObject *__pyx_n_s_file_format_2;
+static PyObject *__pyx_n_s_filename;
+static PyObject *__pyx_kp_s_filepath_method_not_enabled_To;
+static PyObject *__pyx_n_s_files;
+static PyObject *__pyx_n_s_files_2;
+static PyObject *__pyx_n_s_fill_value;
+static PyObject *__pyx_n_s_filled;
+static PyObject *__pyx_kp_s_filling_off;
+static PyObject *__pyx_kp_s_filling_on;
+static PyObject *__pyx_kp_s_filling_on_default__FillValue_of;
+static PyObject *__pyx_kp_s_filling_on_default__FillValue_of_2;
+static PyObject *__pyx_n_s_find;
+static PyObject *__pyx_n_s_find_dim;
+static PyObject *__pyx_n_s_flatten;
+static PyObject *__pyx_n_s_fletcher32;
+static PyObject *__pyx_n_s_float;
+static PyObject *__pyx_n_s_format;
+static PyObject *__pyx_kp_s_format_must_be_NETCDF4_NETCDF4_C;
+static PyObject *__pyx_n_s_formats;
+static PyObject *__pyx_n_s_get;
+static PyObject *__pyx_n_s_get_var_chunk_cache;
+static PyObject *__pyx_n_s_getattr;
+static PyObject *__pyx_n_s_getattribute;
+static PyObject *__pyx_n_s_getdims;
+static PyObject *__pyx_n_s_gethdf5libversion;
+static PyObject *__pyx_n_s_getitem;
+static PyObject *__pyx_n_s_getlibversion;
+static PyObject *__pyx_n_s_getname;
+static PyObject *__pyx_n_s_getncattr;
+static PyObject *__pyx_n_s_glob;
+static PyObject *__pyx_n_s_gregorian;
+static PyObject *__pyx_kp_s_group_s;
+static PyObject *__pyx_n_s_groups;
+static PyObject *__pyx_kp_s_groups_s;
+static PyObject *__pyx_kp_s_groups_s_2;
+static PyObject *__pyx_n_s_grp;
+static PyObject *__pyx_n_s_grp_2;
+static PyObject *__pyx_n_s_grpid;
+static PyObject *__pyx_n_s_grpnames;
+static PyObject *__pyx_n_s_grps;
+static PyObject *__pyx_n_s_has_nc_inq_format_extended;
+static PyObject *__pyx_n_s_has_nc_inq_path;
+static PyObject *__pyx_n_s_has_rename_grp;
+static PyObject *__pyx_n_s_hdf5libversion;
+static PyObject *__pyx_n_s_hour;
+static PyObject *__pyx_n_s_hours;
+static PyObject *__pyx_n_s_http;
+static PyObject *__pyx_n_s_i;
+static PyObject *__pyx_n_s_i0;
+static PyObject *__pyx_n_s_i1;
+static PyObject *__pyx_n_s_i2;
+static PyObject *__pyx_n_s_i4;
+static PyObject *__pyx_n_s_i8;
+static PyObject *__pyx_n_s_id;
+static PyObject *__pyx_n_s_idx;
+static PyObject *__pyx_kp_s_illegal_data_type_for_attribute;
+static PyObject *__pyx_kp_s_illegal_primitive_data_type_must;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_n_s_in1d;
+static PyObject *__pyx_n_s_ind;
+static PyObject *__pyx_n_s_init;
+static PyObject *__pyx_kp_s_invalid_scale_factor_or_add_offs;
+static PyObject *__pyx_n_s_isMA;
+static PyObject *__pyx_n_s_is_native_big;
+static PyObject *__pyx_n_s_is_native_little;
+static PyObject *__pyx_n_s_iscompound;
+static PyObject *__pyx_n_s_ismasked;
+static PyObject *__pyx_n_s_isnan;
+static PyObject *__pyx_n_s_isostring;
+static PyObject *__pyx_n_s_isprimitive;
+static PyObject *__pyx_n_s_isscalar;
+static PyObject *__pyx_n_s_isunlimited;
+static PyObject *__pyx_n_s_isvlen;
+static PyObject *__pyx_n_s_item;
+static PyObject *__pyx_n_s_items;
+static PyObject *__pyx_n_s_itemsize;
+static PyObject *__pyx_n_s_itertools;
+static PyObject *__pyx_n_s_izip;
+static PyObject *__pyx_n_s_join;
+static PyObject *__pyx_n_s_k;
+static PyObject *__pyx_n_s_keepweakref;
+static PyObject *__pyx_n_s_key;
+static PyObject *__pyx_n_s_keys;
+static PyObject *__pyx_n_s_kind;
+static PyObject *__pyx_n_s_least_significant_digit;
+static PyObject *__pyx_n_s_len;
+static PyObject *__pyx_n_s_little;
+static PyObject *__pyx_n_s_lower;
+static PyObject *__pyx_n_s_lst;
+static PyObject *__pyx_n_s_lstArr;
+static PyObject *__pyx_n_s_ma;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_n_s_majorvers;
+static PyObject *__pyx_n_s_mask;
+static PyObject *__pyx_n_s_masked_array;
+static PyObject *__pyx_n_s_master;
+static PyObject *__pyx_n_s_masterDims;
+static PyObject *__pyx_n_s_masterRecVar;
+static PyObject *__pyx_n_s_masterShape;
+static PyObject *__pyx_n_s_masterType;
+static PyObject *__pyx_kp_s_master_dataset_s_does_not_have_a;
+static PyObject *__pyx_kp_s_master_dataset_s_does_not_have_a_2;
+static PyObject *__pyx_n_s_mastervar;
+static PyObject *__pyx_n_s_metaclass;
+static PyObject *__pyx_n_s_microsecond;
+static PyObject *__pyx_n_s_microseconds;
+static PyObject *__pyx_n_s_millisecond;
+static PyObject *__pyx_n_s_milliseconds;
+static PyObject *__pyx_kp_s_milliseconds_microseconds_not_su;
+static PyObject *__pyx_n_s_minorvers;
+static PyObject *__pyx_n_s_missing_value;
+static PyObject *__pyx_n_s_mode;
+static PyObject *__pyx_kp_s_mode_must_be_w_r_a_or_r_got_s;
+static PyObject *__pyx_n_s_module;
+static PyObject *__pyx_n_s_msecs;
+static PyObject *__pyx_n_s_msecsd;
+static PyObject *__pyx_n_s_msg;
+static PyObject *__pyx_n_s_n;
+static PyObject *__pyx_n_s_n1;
+static PyObject *__pyx_n_s_name;
+static PyObject *__pyx_n_s_name_2;
+static PyObject *__pyx_kp_s_name_cannot_be_altered;
+static PyObject *__pyx_kp_s_name_s_numpy_dtype_s;
+static PyObject *__pyx_kp_s_name_s_size_s;
+static PyObject *__pyx_n_s_names;
+static PyObject *__pyx_n_s_native;
+static PyObject *__pyx_n_s_nc_type;
+static PyObject *__pyx_n_s_ncattrs;
+static PyObject *__pyx_n_s_ncdump;
+static PyObject *__pyx_n_s_ncdump_var;
+static PyObject *__pyx_n_s_nctime;
+static PyObject *__pyx_n_s_nctonptype;
+static PyObject *__pyx_n_s_ndim;
+static PyObject *__pyx_kp_s_negative_strides_not_allowed_whe;
+static PyObject *__pyx_n_s_nelems;
+static PyObject *__pyx_n_s_netCDF4;
+static PyObject *__pyx_n_s_netCDF4_utils;
+static PyObject *__pyx_n_s_netcdf4libversion;
+static PyObject *__pyx_n_s_netcdftime;
+static PyObject *__pyx_n_s_newSlice;
+static PyObject *__pyx_n_s_newname;
+static PyObject *__pyx_kp_s_no_since_in_unit_string;
+static PyObject *__pyx_n_s_nptonctype;
+static PyObject *__pyx_n_s_npversion;
+static PyObject *__pyx_n_s_num;
+static PyObject *__pyx_n_s_num2date;
+static PyObject *__pyx_n_s_numpy;
+static PyObject *__pyx_n_s_numv;
+static PyObject *__pyx_n_s_nunlimdim;
+static PyObject *__pyx_n_s_nv;
+static PyObject *__pyx_n_s_object;
+static PyObject *__pyx_n_s_offsets;
+static PyObject *__pyx_n_s_oldname;
+static PyObject *__pyx_kp_s_only_endian_native_allowed_for_N;
+static PyObject *__pyx_kp_s_only_numpy_string_unicode_or_obj;
+static PyObject *__pyx_n_s_ordereddict;
+static PyObject *__pyx_n_s_out_array_shape;
+static PyObject *__pyx_n_s_parent;
+static PyObject *__pyx_n_s_parse;
+static PyObject *__pyx_n_s_part;
+static PyObject *__pyx_n_s_patchstring;
+static PyObject *__pyx_n_s_path;
+static PyObject *__pyx_n_s_path_2;
+static PyObject *__pyx_kp_s_path_s;
+static PyObject *__pyx_n_s_persist;
+static PyObject *__pyx_kp_s_please_install_ordereddict_https;
+static PyObject *__pyx_n_s_pop;
+static PyObject *__pyx_n_s_posixpath;
+static PyObject *__pyx_n_s_preemption;
+static PyObject *__pyx_n_s_prepare;
+static PyObject *__pyx_n_s_private_atts;
+static PyObject *__pyx_n_s_prod;
+static PyObject *__pyx_n_s_proleptic_gregorian;
+static PyObject *__pyx_n_s_proxy;
+static PyObject *__pyx_n_s_put;
+static PyObject *__pyx_n_s_put_2;
+static PyObject *__pyx_n_s_put_ind;
+static PyObject *__pyx_n_s_python3;
+static PyObject *__pyx_n_s_qualname;
+static PyObject *__pyx_n_s_quantize;
+static PyObject *__pyx_kp_s_r;
+static PyObject *__pyx_n_s_r_2;
+static PyObject *__pyx_kp_s_r_3;
+static PyObject *__pyx_kp_s_r_s;
+static PyObject *__pyx_n_s_range;
+static PyObject *__pyx_n_s_ravel;
+static PyObject *__pyx_n_s_recLen;
+static PyObject *__pyx_n_s_recVar;
+static PyObject *__pyx_n_s_recdimlen;
+static PyObject *__pyx_n_s_recdimname;
+static PyObject *__pyx_n_s_recdimname_2;
+static PyObject *__pyx_n_s_redef;
+static PyObject *__pyx_n_s_ref_date;
+static PyObject *__pyx_n_s_ref_num;
+static PyObject *__pyx_n_s_releasevers;
+static PyObject *__pyx_kp_s_renameGroup_method_not_enabled;
+static PyObject *__pyx_n_s_replace;
+static PyObject *__pyx_n_s_repr;
+static PyObject *__pyx_kp_s_requires_numpy_version_1_0rc1_or;
+static PyObject *__pyx_n_s_reshape;
+static PyObject *__pyx_kp_s_root_group_s_data_model_file_for;
+static PyObject *__pyx_kp_s_s;
+static PyObject *__pyx_n_s_s_2;
+static PyObject *__pyx_kp_s_s_is_one_of_the_reserved_attrib;
+static PyObject *__pyx_kp_s_s_is_one_of_the_reserved_attrib_2;
+static PyObject *__pyx_kp_s_s_not_a_valid_dimension_name;
+static PyObject *__pyx_kp_s_s_not_a_valid_variable_name;
+static PyObject *__pyx_kp_s_s_s;
+static PyObject *__pyx_kp_s_s_s_s;
+static PyObject *__pyx_kp_s_s_s_s_2;
+static PyObject *__pyx_n_s_scale;
+static PyObject *__pyx_n_s_scale_factor;
+static PyObject *__pyx_n_s_second;
+static PyObject *__pyx_n_s_seconds;
+static PyObject *__pyx_n_s_secs;
+static PyObject *__pyx_n_s_select;
+static PyObject *__pyx_n_s_self;
+static PyObject *__pyx_n_s_set_auto_mask;
+static PyObject *__pyx_n_s_set_auto_maskandscale;
+static PyObject *__pyx_n_s_set_auto_scale;
+static PyObject *__pyx_n_s_set_default_format;
+static PyObject *__pyx_n_s_setattr;
+static PyObject *__pyx_n_s_setncattr;
+static PyObject *__pyx_n_s_shape;
+static PyObject *__pyx_n_s_shape_2;
+static PyObject *__pyx_kp_s_shape_cannot_be_altered;
+static PyObject *__pyx_n_s_shuffle;
+static PyObject *__pyx_n_s_since;
+static PyObject *__pyx_kp_s_single_element_VLEN_slices_must;
+static PyObject *__pyx_n_s_size;
+static PyObject *__pyx_kp_s_size_of_data_array_does_not_conf;
+static PyObject *__pyx_n_s_slen;
+static PyObject *__pyx_n_s_sortbylist;
+static PyObject *__pyx_n_s_split;
+static PyObject *__pyx_n_s_squeeze;
+static PyObject *__pyx_n_s_sta;
+static PyObject *__pyx_n_s_standard;
+static PyObject *__pyx_n_s_start;
+static PyObject *__pyx_n_s_startswith;
+static PyObject *__pyx_n_s_step;
+static PyObject *__pyx_n_s_stop;
+static PyObject *__pyx_n_s_str;
+static PyObject *__pyx_n_s_strd;
+static PyObject *__pyx_n_s_stride;
+static PyObject *__pyx_kp_s_strides_must_all_be_1_for_string;
+static PyObject *__pyx_kp_s_strides_must_all_be_1_for_vlen_v;
+static PyObject *__pyx_n_s_string;
+static PyObject *__pyx_kp_s_string_type;
+static PyObject *__pyx_n_s_stringtoarr;
+static PyObject *__pyx_n_s_stringtochar;
+static PyObject *__pyx_n_s_strt;
+static PyObject *__pyx_n_s_subdtype;
+static PyObject *__pyx_n_s_sum;
+static PyObject *__pyx_n_s_supportedtypes;
+static PyObject *__pyx_n_s_sys;
+static PyObject *__pyx_n_s_t;
+static PyObject *__pyx_n_s_td;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_n_s_tile;
+static PyObject *__pyx_n_s_time;
+static PyObject *__pyx_n_s_time2index;
+static PyObject *__pyx_n_s_timedelta;
+static PyObject *__pyx_n_s_times;
+static PyObject *__pyx_n_s_timestr;
+static PyObject *__pyx_n_s_timestr_split;
+static PyObject *__pyx_kp_s_to_assign_values_to_a_non_scalar;
+static PyObject *__pyx_kp_s_to_retrieve_values_from_a_non_sc;
+static PyObject *__pyx_n_s_tolist;
+static PyObject *__pyx_n_s_toma;
+static PyObject *__pyx_n_s_tostr;
+static PyObject *__pyx_n_s_tostring;
+static PyObject *__pyx_n_s_totaltime;
+static PyObject *__pyx_n_s_traceback;
+static PyObject *__pyx_n_s_tsecs;
+static PyObject *__pyx_kp_s_type_must_string_or_unicode_S_or;
+static PyObject *__pyx_n_s_typecode;
+static PyObject *__pyx_n_s_typeid;
+static PyObject *__pyx_n_s_tzinfo;
+static PyObject *__pyx_n_s_tzutc;
+static PyObject *__pyx_kp_s_u;
+static PyObject *__pyx_n_s_u1;
+static PyObject *__pyx_n_s_u2;
+static PyObject *__pyx_n_s_u4;
+static PyObject *__pyx_n_s_u8;
+static PyObject *__pyx_n_s_unicode;
+static PyObject *__pyx_n_s_unicode_error;
+static PyObject *__pyx_n_s_unit;
+static PyObject *__pyx_n_s_units;
+static PyObject *__pyx_n_s_unlimdims;
+static PyObject *__pyx_kp_s_unlimited_dimensions_s;
+static PyObject *__pyx_kp_s_unlimited_dimensions_s_2;
+static PyObject *__pyx_kp_s_unlimited_name_s_size_s;
+static PyObject *__pyx_kp_s_unsupported_component_type_for_V;
+static PyObject *__pyx_kp_s_unsupported_datatype_specified_f;
+static PyObject *__pyx_kp_s_utf_8;
+static PyObject *__pyx_n_s_utime;
+static PyObject *__pyx_n_s_v;
+static PyObject *__pyx_n_s_vInst;
+static PyObject *__pyx_n_s_vName;
+static PyObject *__pyx_n_s_val;
+static PyObject *__pyx_n_s_value;
+static PyObject *__pyx_n_s_value_2;
+static PyObject *__pyx_n_s_values;
+static PyObject *__pyx_n_s_var;
+static PyObject *__pyx_n_s_varInfo;
+static PyObject *__pyx_kp_s_variable_s_data_type_mismatch_be;
+static PyObject *__pyx_kp_s_variable_s_dimensions_mismatch_b;
+static PyObject *__pyx_kp_s_variable_s_rank_mismatch_between;
+static PyObject *__pyx_kp_s_variable_s_shape_mismatch_betwee;
+static PyObject *__pyx_n_s_variables;
+static PyObject *__pyx_kp_s_variables_dimensions_s;
+static PyObject *__pyx_kp_s_variables_s;
+static PyObject *__pyx_n_s_varid;
+static PyObject *__pyx_n_s_varname;
+static PyObject *__pyx_n_s_varnames;
+static PyObject *__pyx_n_s_vars;
+static PyObject *__pyx_n_s_version;
+static PyObject *__pyx_n_s_version_info;
+static PyObject *__pyx_n_s_vid;
+static PyObject *__pyx_n_s_view;
+static PyObject *__pyx_n_s_vlen;
+static PyObject *__pyx_kp_s_vlen_data_type_s;
+static PyObject *__pyx_kp_s_vlen_string_array_attributes_not;
+static PyObject *__pyx_n_s_vltype;
+static PyObject *__pyx_n_s_vltypes;
+static PyObject *__pyx_n_s_w;
+static PyObject *__pyx_n_s_walk_grps;
+static PyObject *__pyx_n_s_warn;
+static PyObject *__pyx_n_s_warnings;
+static PyObject *__pyx_n_s_weakref;
+static PyObject *__pyx_kp_s_wrong_data_type_in_object_array;
+static PyObject *__pyx_kp_s_wrong_data_type_should_be_s_got;
+static PyObject *__pyx_n_s_ws;
+static PyObject *__pyx_n_s_zeros;
+static PyObject *__pyx_n_s_zip;
+static PyObject *__pyx_n_s_zlib;
+static PyObject *__pyx_float_0_0;
+static PyObject *__pyx_float_1_0;
+static PyObject *__pyx_float_24_;
+static PyObject *__pyx_float_1_e3;
+static PyObject *__pyx_float_1_e6;
+static PyObject *__pyx_float_3600_;
+static PyObject *__pyx_float_86400_;
+static PyObject *__pyx_int_0;
+static PyObject *__pyx_int_1;
+static PyObject *__pyx_int_2;
+static PyObject *__pyx_int_3;
+static PyObject *__pyx_int_4;
+static PyObject *__pyx_int_6;
+static PyObject *__pyx_int_8;
+static PyObject *__pyx_int_10;
+static PyObject *__pyx_int_15;
+static PyObject *__pyx_int_24;
+static PyObject *__pyx_int_1582;
+static PyObject *__pyx_int_1900;
+static PyObject *__pyx_int_3600;
+static PyObject *__pyx_int_neg_1;
+static PyObject *__pyx_slice__7;
+static PyObject *__pyx_slice__9;
+static PyObject *__pyx_tuple__2;
+static PyObject *__pyx_tuple__3;
+static PyObject *__pyx_tuple__4;
+static PyObject *__pyx_tuple__5;
+static PyObject *__pyx_tuple__6;
+static PyObject *__pyx_tuple__8;
+static PyObject *__pyx_slice__10;
+static PyObject *__pyx_slice__11;
+static PyObject *__pyx_slice__12;
+static PyObject *__pyx_slice__13;
+static PyObject *__pyx_slice__17;
+static PyObject *__pyx_slice__18;
+static PyObject *__pyx_slice__19;
+static PyObject *__pyx_slice__21;
+static PyObject *__pyx_slice__30;
+static PyObject *__pyx_slice__32;
+static PyObject *__pyx_slice__33;
+static PyObject *__pyx_slice__34;
+static PyObject *__pyx_slice__56;
+static PyObject *__pyx_slice__57;
+static PyObject *__pyx_slice__62;
+static PyObject *__pyx_slice__63;
+static PyObject *__pyx_slice__70;
+static PyObject *__pyx_slice__71;
+static PyObject *__pyx_slice__74;
+static PyObject *__pyx_slice__75;
+static PyObject *__pyx_slice__81;
+static PyObject *__pyx_slice__83;
+static PyObject *__pyx_slice__85;
+static PyObject *__pyx_slice__86;
+static PyObject *__pyx_slice__87;
+static PyObject *__pyx_slice__97;
+static PyObject *__pyx_tuple__14;
+static PyObject *__pyx_tuple__20;
+static PyObject *__pyx_tuple__22;
+static PyObject *__pyx_tuple__23;
+static PyObject *__pyx_tuple__24;
+static PyObject *__pyx_tuple__26;
+static PyObject *__pyx_tuple__27;
+static PyObject *__pyx_tuple__28;
+static PyObject *__pyx_tuple__29;
+static PyObject *__pyx_tuple__31;
+static PyObject *__pyx_tuple__35;
+static PyObject *__pyx_tuple__37;
+static PyObject *__pyx_tuple__40;
+static PyObject *__pyx_tuple__43;
+static PyObject *__pyx_tuple__45;
+static PyObject *__pyx_tuple__46;
+static PyObject *__pyx_tuple__47;
+static PyObject *__pyx_tuple__48;
+static PyObject *__pyx_tuple__49;
+static PyObject *__pyx_tuple__50;
+static PyObject *__pyx_tuple__55;
+static PyObject *__pyx_tuple__58;
+static PyObject *__pyx_tuple__59;
+static PyObject *__pyx_tuple__60;
+static PyObject *__pyx_tuple__61;
+static PyObject *__pyx_tuple__64;
+static PyObject *__pyx_tuple__65;
+static PyObject *__pyx_tuple__66;
+static PyObject *__pyx_tuple__67;
+static PyObject *__pyx_tuple__68;
+static PyObject *__pyx_tuple__69;
+static PyObject *__pyx_tuple__72;
+static PyObject *__pyx_tuple__73;
+static PyObject *__pyx_tuple__76;
+static PyObject *__pyx_tuple__77;
+static PyObject *__pyx_tuple__78;
+static PyObject *__pyx_tuple__79;
+static PyObject *__pyx_tuple__80;
+static PyObject *__pyx_tuple__82;
+static PyObject *__pyx_tuple__84;
+static PyObject *__pyx_tuple__88;
+static PyObject *__pyx_tuple__89;
+static PyObject *__pyx_tuple__90;
+static PyObject *__pyx_tuple__91;
+static PyObject *__pyx_tuple__92;
+static PyObject *__pyx_tuple__93;
+static PyObject *__pyx_tuple__94;
+static PyObject *__pyx_tuple__95;
+static PyObject *__pyx_tuple__96;
+static PyObject *__pyx_tuple__98;
+static PyObject *__pyx_tuple__99;
+static PyObject *__pyx_slice__100;
+static PyObject *__pyx_slice__101;
+static PyObject *__pyx_slice__104;
+static PyObject *__pyx_slice__106;
+static PyObject *__pyx_slice__111;
+static PyObject *__pyx_slice__112;
+static PyObject *__pyx_tuple__102;
+static PyObject *__pyx_tuple__103;
+static PyObject *__pyx_tuple__105;
+static PyObject *__pyx_tuple__107;
+static PyObject *__pyx_tuple__108;
+static PyObject *__pyx_tuple__109;
+static PyObject *__pyx_tuple__110;
+static PyObject *__pyx_tuple__113;
+static PyObject *__pyx_tuple__114;
+static PyObject *__pyx_tuple__115;
+static PyObject *__pyx_tuple__117;
+static PyObject *__pyx_tuple__118;
+static PyObject *__pyx_tuple__119;
+static PyObject *__pyx_tuple__120;
+static PyObject *__pyx_tuple__122;
+static PyObject *__pyx_tuple__124;
+static PyObject *__pyx_tuple__126;
+static PyObject *__pyx_tuple__128;
+static PyObject *__pyx_tuple__130;
+static PyObject *__pyx_tuple__132;
+static PyObject *__pyx_tuple__135;
+static PyObject *__pyx_tuple__137;
+static PyObject *__pyx_tuple__139;
+static PyObject *__pyx_tuple__141;
+static PyObject *__pyx_tuple__143;
+static PyObject *__pyx_tuple__145;
+static PyObject *__pyx_tuple__147;
+static PyObject *__pyx_tuple__149;
+static PyObject *__pyx_tuple__151;
+static PyObject *__pyx_tuple__153;
+static PyObject *__pyx_tuple__155;
+static PyObject *__pyx_tuple__157;
+static PyObject *__pyx_tuple__159;
+static PyObject *__pyx_tuple__161;
+static PyObject *__pyx_tuple__163;
+static PyObject *__pyx_tuple__165;
+static PyObject *__pyx_tuple__167;
+static PyObject *__pyx_tuple__169;
+static PyObject *__pyx_tuple__171;
+static PyObject *__pyx_tuple__173;
+static PyObject *__pyx_tuple__175;
+static PyObject *__pyx_tuple__176;
+static PyObject *__pyx_tuple__178;
+static PyObject *__pyx_tuple__180;
+static PyObject *__pyx_tuple__181;
+static PyObject *__pyx_tuple__182;
+static PyObject *__pyx_codeobj__121;
+static PyObject *__pyx_codeobj__123;
+static PyObject *__pyx_codeobj__125;
+static PyObject *__pyx_codeobj__127;
+static PyObject *__pyx_codeobj__129;
+static PyObject *__pyx_codeobj__131;
+static PyObject *__pyx_codeobj__133;
+static PyObject *__pyx_codeobj__134;
+static PyObject *__pyx_codeobj__136;
+static PyObject *__pyx_codeobj__138;
+static PyObject *__pyx_codeobj__140;
+static PyObject *__pyx_codeobj__142;
+static PyObject *__pyx_codeobj__144;
+static PyObject *__pyx_codeobj__146;
+static PyObject *__pyx_codeobj__148;
+static PyObject *__pyx_codeobj__150;
+static PyObject *__pyx_codeobj__152;
+static PyObject *__pyx_codeobj__154;
+static PyObject *__pyx_codeobj__156;
+static PyObject *__pyx_codeobj__158;
+static PyObject *__pyx_codeobj__160;
+static PyObject *__pyx_codeobj__162;
+static PyObject *__pyx_codeobj__164;
+static PyObject *__pyx_codeobj__166;
+static PyObject *__pyx_codeobj__168;
+static PyObject *__pyx_codeobj__170;
+static PyObject *__pyx_codeobj__172;
+static PyObject *__pyx_codeobj__174;
+static PyObject *__pyx_codeobj__177;
+static PyObject *__pyx_codeobj__179;
+static PyObject *__pyx_codeobj__183;
+
+/* "utils.pyx":5
+ * gregorian = datetime(1582,10,15)
+ * 
+ * def _dateparse(timestr):             # <<<<<<<<<<<<<<
+ *     """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss,
+ *     return a datetime instance"""
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_1_dateparse(PyObject *__pyx_self, PyObject *__pyx_v_timestr); /*proto*/
+static char __pyx_doc_7netCDF4__dateparse[] = "parse a string of the form time-units since yyyy-mm-dd hh:mm:ss,\n    return a datetime instance";
+static PyMethodDef __pyx_mdef_7netCDF4_1_dateparse = {"_dateparse", (PyCFunction)__pyx_pw_7netCDF4_1_dateparse, METH_O, __pyx_doc_7netCDF4__dateparse};
+static PyObject *__pyx_pw_7netCDF4_1_dateparse(PyObject *__pyx_self, PyObject *__pyx_v_timestr) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_dateparse (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4__dateparse(__pyx_self, ((PyObject *)__pyx_v_timestr));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4__dateparse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_timestr) {
+  PyObject *__pyx_v_dparse = NULL;
+  PyObject *__pyx_v_tzutc = NULL;
+  PyObject *__pyx_v_msg = NULL;
+  PyObject *__pyx_v_timestr_split = NULL;
+  CYTHON_UNUSED PyObject *__pyx_v_units = NULL;
+  PyObject *__pyx_v_n = NULL;
+  PyObject *__pyx_v_isostring = NULL;
+  PyObject *__pyx_v_basedate = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_t_6;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  int __pyx_t_10;
+  int __pyx_t_11;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_dateparse", 0);
+
+  /* "utils.pyx":8
+ *     """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss,
+ *     return a datetime instance"""
+ *     try:             # <<<<<<<<<<<<<<
+ *         import dateutil.parser as dparse
+ *         from dateutil.tz import tzutc
+ */
+  {
+    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+    __Pyx_XGOTREF(__pyx_t_1);
+    __Pyx_XGOTREF(__pyx_t_2);
+    __Pyx_XGOTREF(__pyx_t_3);
+    /*try:*/ {
+
+      /* "utils.pyx":9
+ *     return a datetime instance"""
+ *     try:
+ *         import dateutil.parser as dparse             # <<<<<<<<<<<<<<
+ *         from dateutil.tz import tzutc
+ *     except ImportError:
+ */
+      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_n_s_);
+      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_);
+      __Pyx_GIVEREF(__pyx_n_s_);
+      __pyx_t_5 = __Pyx_Import(__pyx_n_s_dateutil_parser, __pyx_t_4, -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_v_dparse = __pyx_t_5;
+      __pyx_t_5 = 0;
+
+      /* "utils.pyx":10
+ *     try:
+ *         import dateutil.parser as dparse
+ *         from dateutil.tz import tzutc             # <<<<<<<<<<<<<<
+ *     except ImportError:
+ *         msg = 'dateutil module required for accuracy < 1 second'
+ */
+      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_INCREF(__pyx_n_s_tzutc);
+      PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_tzutc);
+      __Pyx_GIVEREF(__pyx_n_s_tzutc);
+      __pyx_t_4 = __Pyx_Import(__pyx_n_s_dateutil_tz, __pyx_t_5, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_tzutc); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_5);
+      __pyx_v_tzutc = __pyx_t_5;
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    }
+    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+    goto __pyx_L10_try_end;
+    __pyx_L3_error:;
+    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "utils.pyx":11
+ *         import dateutil.parser as dparse
+ *         from dateutil.tz import tzutc
+ *     except ImportError:             # <<<<<<<<<<<<<<
+ *         msg = 'dateutil module required for accuracy < 1 second'
+ *         raise ImportError(msg)
+ */
+    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_ImportError);
+    if (__pyx_t_6) {
+      __Pyx_AddTraceback("netCDF4._dateparse", __pyx_clineno, __pyx_lineno, __pyx_filename);
+      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_GOTREF(__pyx_t_7);
+
+      /* "utils.pyx":12
+ *         from dateutil.tz import tzutc
+ *     except ImportError:
+ *         msg = 'dateutil module required for accuracy < 1 second'             # <<<<<<<<<<<<<<
+ *         raise ImportError(msg)
+ *     timestr_split = timestr.split()
+ */
+      __Pyx_INCREF(__pyx_kp_s_dateutil_module_required_for_acc);
+      __pyx_v_msg = __pyx_kp_s_dateutil_module_required_for_acc;
+
+      /* "utils.pyx":13
+ *     except ImportError:
+ *         msg = 'dateutil module required for accuracy < 1 second'
+ *         raise ImportError(msg)             # <<<<<<<<<<<<<<
+ *     timestr_split = timestr.split()
+ *     units = timestr_split[0].lower()
+ */
+      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_INCREF(__pyx_v_msg);
+      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_msg);
+      __Pyx_GIVEREF(__pyx_v_msg);
+      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+    }
+    goto __pyx_L5_except_error;
+    __pyx_L5_except_error:;
+    __Pyx_XGIVEREF(__pyx_t_1);
+    __Pyx_XGIVEREF(__pyx_t_2);
+    __Pyx_XGIVEREF(__pyx_t_3);
+    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+    goto __pyx_L1_error;
+    __pyx_L10_try_end:;
+  }
+
+  /* "utils.pyx":14
+ *         msg = 'dateutil module required for accuracy < 1 second'
+ *         raise ImportError(msg)
+ *     timestr_split = timestr.split()             # <<<<<<<<<<<<<<
+ *     units = timestr_split[0].lower()
+ *     if timestr_split[1].lower() != 'since':
+ */
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_4 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_5, function);
+    }
+  }
+  if (__pyx_t_4) {
+    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  } else {
+    __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_v_timestr_split = __pyx_t_7;
+  __pyx_t_7 = 0;
+
+  /* "utils.pyx":15
+ *         raise ImportError(msg)
+ *     timestr_split = timestr.split()
+ *     units = timestr_split[0].lower()             # <<<<<<<<<<<<<<
+ *     if timestr_split[1].lower() != 'since':
+ *         raise ValueError("no 'since' in unit_string")
+ */
+  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_timestr_split, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_5 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+    if (likely(__pyx_t_5)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_5);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_4, function);
+    }
+  }
+  if (__pyx_t_5) {
+    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  } else {
+    __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_v_units = __pyx_t_7;
+  __pyx_t_7 = 0;
+
+  /* "utils.pyx":16
+ *     timestr_split = timestr.split()
+ *     units = timestr_split[0].lower()
+ *     if timestr_split[1].lower() != 'since':             # <<<<<<<<<<<<<<
+ *         raise ValueError("no 'since' in unit_string")
+ *     # parse the date string.
+ */
+  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_timestr_split, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_5, function);
+    }
+  }
+  if (__pyx_t_4) {
+    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  } else {
+    __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_since, Py_NE)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  if (__pyx_t_10) {
+
+    /* "utils.pyx":17
+ *     units = timestr_split[0].lower()
+ *     if timestr_split[1].lower() != 'since':
+ *         raise ValueError("no 'since' in unit_string")             # <<<<<<<<<<<<<<
+ *     # parse the date string.
+ *     n = timestr.find('since')+6
+ */
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "utils.pyx":19
+ *         raise ValueError("no 'since' in unit_string")
+ *     # parse the date string.
+ *     n = timestr.find('since')+6             # <<<<<<<<<<<<<<
+ *     isostring = timestr[n:]
+ *     basedate = dparse.parse(isostring)
+ */
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_find); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_int_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_v_n = __pyx_t_7;
+  __pyx_t_7 = 0;
+
+  /* "utils.pyx":20
+ *     # parse the date string.
+ *     n = timestr.find('since')+6
+ *     isostring = timestr[n:]             # <<<<<<<<<<<<<<
+ *     basedate = dparse.parse(isostring)
+ *     if basedate.tzinfo is None:
+ */
+  __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_timestr, 0, 0, &__pyx_v_n, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_v_isostring = __pyx_t_7;
+  __pyx_t_7 = 0;
+
+  /* "utils.pyx":21
+ *     n = timestr.find('since')+6
+ *     isostring = timestr[n:]
+ *     basedate = dparse.parse(isostring)             # <<<<<<<<<<<<<<
+ *     if basedate.tzinfo is None:
+ *         basedate = basedate.replace(tzinfo=tzutc())
+ */
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dparse, __pyx_n_s_parse); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_4 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_5, function);
+    }
+  }
+  if (!__pyx_t_4) {
+    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_isostring); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+  } else {
+    __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+    __Pyx_INCREF(__pyx_v_isostring);
+    PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_isostring);
+    __Pyx_GIVEREF(__pyx_v_isostring);
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_v_basedate = __pyx_t_7;
+  __pyx_t_7 = 0;
+
+  /* "utils.pyx":22
+ *     isostring = timestr[n:]
+ *     basedate = dparse.parse(isostring)
+ *     if basedate.tzinfo is None:             # <<<<<<<<<<<<<<
+ *         basedate = basedate.replace(tzinfo=tzutc())
+ *     return basedate
+ */
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_10 = (__pyx_t_7 == Py_None);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_11 = (__pyx_t_10 != 0);
+  if (__pyx_t_11) {
+
+    /* "utils.pyx":23
+ *     basedate = dparse.parse(isostring)
+ *     if basedate.tzinfo is None:
+ *         basedate = basedate.replace(tzinfo=tzutc())             # <<<<<<<<<<<<<<
+ *     return basedate
+ * 
+ */
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_replace); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_v_tzutc);
+    __pyx_t_4 = __pyx_v_tzutc; __pyx_t_8 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_8)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_8);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (__pyx_t_8) {
+      __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    } else {
+      __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_tzinfo, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF_SET(__pyx_v_basedate, __pyx_t_9);
+    __pyx_t_9 = 0;
+    goto __pyx_L14;
+  }
+  __pyx_L14:;
+
+  /* "utils.pyx":24
+ *     if basedate.tzinfo is None:
+ *         basedate = basedate.replace(tzinfo=tzutc())
+ *     return basedate             # <<<<<<<<<<<<<<
+ * 
+ * # utility functions (visible from python).
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_basedate);
+  __pyx_r = __pyx_v_basedate;
+  goto __pyx_L0;
+
+  /* "utils.pyx":5
+ * gregorian = datetime(1582,10,15)
+ * 
+ * def _dateparse(timestr):             # <<<<<<<<<<<<<<
+ *     """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss,
+ *     return a datetime instance"""
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_AddTraceback("netCDF4._dateparse", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_dparse);
+  __Pyx_XDECREF(__pyx_v_tzutc);
+  __Pyx_XDECREF(__pyx_v_msg);
+  __Pyx_XDECREF(__pyx_v_timestr_split);
+  __Pyx_XDECREF(__pyx_v_units);
+  __Pyx_XDECREF(__pyx_v_n);
+  __Pyx_XDECREF(__pyx_v_isostring);
+  __Pyx_XDECREF(__pyx_v_basedate);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":28
+ * # utility functions (visible from python).
+ * 
+ * def stringtoarr(string,NUMCHARS,dtype='S'):             # <<<<<<<<<<<<<<
+ *     """
+ * stringtoarr(a, NUMCHARS,dtype='S')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_3stringtoarr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_2stringtoarr[] = "\nstringtoarr(a, NUMCHARS,dtype='S')\n\nconvert a string to a character array of length NUMCHARS\n\n at param a:  Input python string.\n\n at param NUMCHARS:  number of characters used to represent string \n(if len(a) < NUMCHARS, it will be padded on the right with blanks).\n\n at keyword dtype:  type of numpy array to return.  Default is 'S', which \nmeans an array of dtype 'S1' will be returned.  If dtype='U', a\nunicode array (dtype = 'U1') will [...]
+static PyMethodDef __pyx_mdef_7netCDF4_3stringtoarr = {"stringtoarr", (PyCFunction)__pyx_pw_7netCDF4_3stringtoarr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_2stringtoarr};
+static PyObject *__pyx_pw_7netCDF4_3stringtoarr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_string = 0;
+  PyObject *__pyx_v_NUMCHARS = 0;
+  PyObject *__pyx_v_dtype = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("stringtoarr (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_string,&__pyx_n_s_NUMCHARS,&__pyx_n_s_dtype,0};
+    PyObject* values[3] = {0,0,0};
+    values[2] = ((PyObject *)__pyx_n_s_S);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_string)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_NUMCHARS)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("stringtoarr", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtype);
+          if (value) { values[2] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "stringtoarr") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_string = values[0];
+    __pyx_v_NUMCHARS = values[1];
+    __pyx_v_dtype = values[2];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("stringtoarr", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.stringtoarr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_2stringtoarr(__pyx_self, __pyx_v_string, __pyx_v_NUMCHARS, __pyx_v_dtype);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_2stringtoarr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string, PyObject *__pyx_v_NUMCHARS, PyObject *__pyx_v_dtype) {
+  PyObject *__pyx_v_arr = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  Py_ssize_t __pyx_t_7;
+  PyObject *__pyx_t_8 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("stringtoarr", 0);
+
+  /* "utils.pyx":45
+ * @return: A rank 1 numpy character array of length NUMCHARS with datatype 'S1'
+ * (default) or 'U1' (if dtype='U')"""
+ *     if dtype not in ["S","U"]:             # <<<<<<<<<<<<<<
+ *         raise ValueError("dtype must string or unicode ('S' or 'U')")
+ *     arr = numpy.zeros(NUMCHARS,dtype+'1')
+ */
+  __Pyx_INCREF(__pyx_v_dtype);
+  __pyx_t_1 = __pyx_v_dtype;
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_S, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_3) {
+  } else {
+    __pyx_t_2 = __pyx_t_3;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_U, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __pyx_t_3;
+  __pyx_L4_bool_binop_done:;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = (__pyx_t_2 != 0);
+  if (__pyx_t_3) {
+
+    /* "utils.pyx":46
+ * (default) or 'U1' (if dtype='U')"""
+ *     if dtype not in ["S","U"]:
+ *         raise ValueError("dtype must string or unicode ('S' or 'U')")             # <<<<<<<<<<<<<<
+ *     arr = numpy.zeros(NUMCHARS,dtype+'1')
+ *     arr[0:len(string)] = tuple(string)
+ */
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "utils.pyx":47
+ *     if dtype not in ["S","U"]:
+ *         raise ValueError("dtype must string or unicode ('S' or 'U')")
+ *     arr = numpy.zeros(NUMCHARS,dtype+'1')             # <<<<<<<<<<<<<<
+ *     arr[0:len(string)] = tuple(string)
+ *     return arr
+ */
+  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = PyNumber_Add(__pyx_v_dtype, __pyx_kp_s_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_6 = NULL;
+  __pyx_t_7 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+    if (likely(__pyx_t_6)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_6);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_5, function);
+      __pyx_t_7 = 1;
+    }
+  }
+  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  if (__pyx_t_6) {
+    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+  }
+  __Pyx_INCREF(__pyx_v_NUMCHARS);
+  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_NUMCHARS);
+  __Pyx_GIVEREF(__pyx_v_NUMCHARS);
+  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  __pyx_t_4 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_v_arr = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "utils.pyx":48
+ *         raise ValueError("dtype must string or unicode ('S' or 'U')")
+ *     arr = numpy.zeros(NUMCHARS,dtype+'1')
+ *     arr[0:len(string)] = tuple(string)             # <<<<<<<<<<<<<<
+ *     return arr
+ * 
+ */
+  __pyx_t_1 = PySequence_Tuple(__pyx_v_string); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_7 = PyObject_Length(__pyx_v_string); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_PyObject_SetSlice(__pyx_v_arr, __pyx_t_1, 0, __pyx_t_7, NULL, NULL, NULL, 1, 1, 1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "utils.pyx":49
+ *     arr = numpy.zeros(NUMCHARS,dtype+'1')
+ *     arr[0:len(string)] = tuple(string)
+ *     return arr             # <<<<<<<<<<<<<<
+ * 
+ * def stringtochar(a):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_arr);
+  __pyx_r = __pyx_v_arr;
+  goto __pyx_L0;
+
+  /* "utils.pyx":28
+ * # utility functions (visible from python).
+ * 
+ * def stringtoarr(string,NUMCHARS,dtype='S'):             # <<<<<<<<<<<<<<
+ *     """
+ * stringtoarr(a, NUMCHARS,dtype='S')
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_AddTraceback("netCDF4.stringtoarr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_arr);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":51
+ *     return arr
+ * 
+ * def stringtochar(a):             # <<<<<<<<<<<<<<
+ *     """
+ * stringtochar(a)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_5stringtochar(PyObject *__pyx_self, PyObject *__pyx_v_a); /*proto*/
+static char __pyx_doc_7netCDF4_4stringtochar[] = "\nstringtochar(a)\n\nconvert a string array to a character array with one extra dimension\n\n at param a:  Input numpy string array with numpy datatype 'SN' or 'UN', where N\nis the number of characters in each string.  Will be converted to\nan array of characters (datatype 'S1' or 'U1') of shape a.shape + (N,).\n\n at return: A numpy character array with datatype 'S1' or 'U1'\nand shape a.shape + (N,), where N is the length of each string in a.";
+static PyMethodDef __pyx_mdef_7netCDF4_5stringtochar = {"stringtochar", (PyCFunction)__pyx_pw_7netCDF4_5stringtochar, METH_O, __pyx_doc_7netCDF4_4stringtochar};
+static PyObject *__pyx_pw_7netCDF4_5stringtochar(PyObject *__pyx_self, PyObject *__pyx_v_a) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("stringtochar (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_4stringtochar(__pyx_self, ((PyObject *)__pyx_v_a));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_4stringtochar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a) {
+  PyObject *__pyx_v_dtype = NULL;
+  PyObject *__pyx_v_b = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  Py_ssize_t __pyx_t_10;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("stringtochar", 0);
+
+  /* "utils.pyx":63
+ * @return: A numpy character array with datatype 'S1' or 'U1'
+ * and shape a.shape + (N,), where N is the length of each string in a."""
+ *     dtype = a.dtype.kind             # <<<<<<<<<<<<<<
+ *     if dtype not in ["S","U"]:
+ *         raise ValueError("type must string or unicode ('S' or 'U')")
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_dtype = __pyx_t_2;
+  __pyx_t_2 = 0;
+
+  /* "utils.pyx":64
+ * and shape a.shape + (N,), where N is the length of each string in a."""
+ *     dtype = a.dtype.kind
+ *     if dtype not in ["S","U"]:             # <<<<<<<<<<<<<<
+ *         raise ValueError("type must string or unicode ('S' or 'U')")
+ *     b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1')
+ */
+  __Pyx_INCREF(__pyx_v_dtype);
+  __pyx_t_2 = __pyx_v_dtype;
+  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_S, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_4) {
+  } else {
+    __pyx_t_3 = __pyx_t_4;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_U, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __pyx_t_4;
+  __pyx_L4_bool_binop_done:;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = (__pyx_t_3 != 0);
+  if (__pyx_t_4) {
+
+    /* "utils.pyx":65
+ *     dtype = a.dtype.kind
+ *     if dtype not in ["S","U"]:
+ *         raise ValueError("type must string or unicode ('S' or 'U')")             # <<<<<<<<<<<<<<
+ *     b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1')
+ *     b.shape = a.shape + (a.itemsize,)
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "utils.pyx":66
+ *     if dtype not in ["S","U"]:
+ *         raise ValueError("type must string or unicode ('S' or 'U')")
+ *     b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1')             # <<<<<<<<<<<<<<
+ *     b.shape = a.shape + (a.itemsize,)
+ *     return b
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_tostring); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_8 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+    if (likely(__pyx_t_8)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+      __Pyx_INCREF(__pyx_t_8);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_7, function);
+    }
+  }
+  if (__pyx_t_8) {
+    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  } else {
+    __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_8 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+    if (likely(__pyx_t_8)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+      __Pyx_INCREF(__pyx_t_8);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_7, function);
+    }
+  }
+  if (!__pyx_t_8) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_GOTREF(__pyx_t_1);
+  } else {
+    __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+    PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
+    __pyx_t_6 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_7 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyNumber_Add(__pyx_v_dtype, __pyx_kp_s_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_9 = NULL;
+  __pyx_t_10 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
+    if (likely(__pyx_t_9)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_9);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_5, function);
+      __pyx_t_10 = 1;
+    }
+  }
+  __pyx_t_6 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if (__pyx_t_9) {
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
+  }
+  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_10, __pyx_t_7);
+  __Pyx_GIVEREF(__pyx_t_7);
+  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_10, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_7 = 0;
+  __pyx_t_1 = 0;
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_v_b = __pyx_t_2;
+  __pyx_t_2 = 0;
+
+  /* "utils.pyx":67
+ *         raise ValueError("type must string or unicode ('S' or 'U')")
+ *     b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1')
+ *     b.shape = a.shape + (a.itemsize,)             # <<<<<<<<<<<<<<
+ *     return b
+ * 
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
+  __pyx_t_5 = 0;
+  __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_b, __pyx_n_s_shape, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+  /* "utils.pyx":68
+ *     b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1')
+ *     b.shape = a.shape + (a.itemsize,)
+ *     return b             # <<<<<<<<<<<<<<
+ * 
+ * def chartostring(b):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_b);
+  __pyx_r = __pyx_v_b;
+  goto __pyx_L0;
+
+  /* "utils.pyx":51
+ *     return arr
+ * 
+ * def stringtochar(a):             # <<<<<<<<<<<<<<
+ *     """
+ * stringtochar(a)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_AddTraceback("netCDF4.stringtochar", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_dtype);
+  __Pyx_XDECREF(__pyx_v_b);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":70
+ *     return b
+ * 
+ * def chartostring(b):             # <<<<<<<<<<<<<<
+ *     """
+ * chartostring(b)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7chartostring(PyObject *__pyx_self, PyObject *__pyx_v_b); /*proto*/
+static char __pyx_doc_7netCDF4_6chartostring[] = "\nchartostring(b)\n\nconvert a character array to a string array with one less dimension.\n\n at param b:  Input character array (numpy datatype 'S1' or 'U1').\nWill be converted to a array of strings, where each string has a fixed\nlength of b.shape[-1] characters.\n\n at return: A numpy string array with datatype 'SN' or 'UN' and shape b.shape[:-1],\nwhere N=b.shape[-1].";
+static PyMethodDef __pyx_mdef_7netCDF4_7chartostring = {"chartostring", (PyCFunction)__pyx_pw_7netCDF4_7chartostring, METH_O, __pyx_doc_7netCDF4_6chartostring};
+static PyObject *__pyx_pw_7netCDF4_7chartostring(PyObject *__pyx_self, PyObject *__pyx_v_b) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("chartostring (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_6chartostring(__pyx_self, ((PyObject *)__pyx_v_b));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_6chartostring(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_b) {
+  PyObject *__pyx_v_dtype = NULL;
+  PyObject *__pyx_v_bs = NULL;
+  PyObject *__pyx_v_slen = NULL;
+  PyObject *__pyx_v_a = NULL;
+  PyObject *__pyx_v_n1 = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  Py_ssize_t __pyx_t_8;
+  PyObject *(*__pyx_t_9)(PyObject *);
+  PyObject *__pyx_t_10 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("chartostring", 0);
+
+  /* "utils.pyx":82
+ * @return: A numpy string array with datatype 'SN' or 'UN' and shape b.shape[:-1],
+ * where N=b.shape[-1]."""
+ *     dtype = b.dtype.kind             # <<<<<<<<<<<<<<
+ *     if dtype not in ["S","U"]:
+ *         raise ValueError("type must string or unicode ('S' or 'U')")
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_dtype = __pyx_t_2;
+  __pyx_t_2 = 0;
+
+  /* "utils.pyx":83
+ * where N=b.shape[-1]."""
+ *     dtype = b.dtype.kind
+ *     if dtype not in ["S","U"]:             # <<<<<<<<<<<<<<
+ *         raise ValueError("type must string or unicode ('S' or 'U')")
+ *     bs = b.tostring().decode(default_encoding)
+ */
+  __Pyx_INCREF(__pyx_v_dtype);
+  __pyx_t_2 = __pyx_v_dtype;
+  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_S, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_4) {
+  } else {
+    __pyx_t_3 = __pyx_t_4;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_U, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __pyx_t_4;
+  __pyx_L4_bool_binop_done:;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = (__pyx_t_3 != 0);
+  if (__pyx_t_4) {
+
+    /* "utils.pyx":84
+ *     dtype = b.dtype.kind
+ *     if dtype not in ["S","U"]:
+ *         raise ValueError("type must string or unicode ('S' or 'U')")             # <<<<<<<<<<<<<<
+ *     bs = b.tostring().decode(default_encoding)
+ *     slen = int(b.shape[-1])
+ */
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "utils.pyx":85
+ *     if dtype not in ["S","U"]:
+ *         raise ValueError("type must string or unicode ('S' or 'U')")
+ *     bs = b.tostring().decode(default_encoding)             # <<<<<<<<<<<<<<
+ *     slen = int(b.shape[-1])
+ *     a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen))
+ */
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_tostring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_6 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+    if (likely(__pyx_t_6)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_6);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_5, function);
+    }
+  }
+  if (__pyx_t_6) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_6 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+    if (likely(__pyx_t_6)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_6);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_5, function);
+    }
+  }
+  if (!__pyx_t_6) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_GOTREF(__pyx_t_2);
+  } else {
+    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+    PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_v_bs = __pyx_t_2;
+  __pyx_t_2 = 0;
+
+  /* "utils.pyx":86
+ *         raise ValueError("type must string or unicode ('S' or 'U')")
+ *     bs = b.tostring().decode(default_encoding)
+ *     slen = int(b.shape[-1])             # <<<<<<<<<<<<<<
+ *     a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen))
+ *     a.shape = b.shape[:-1]
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_v_slen = __pyx_t_2;
+  __pyx_t_2 = 0;
+
+  /* "utils.pyx":87
+ *     bs = b.tostring().decode(default_encoding)
+ *     slen = int(b.shape[-1])
+ *     a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen))             # <<<<<<<<<<<<<<
+ *     a.shape = b.shape[:-1]
+ *     return a
+ */
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_8 = PyObject_Length(__pyx_v_bs); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(__pyx_int_0);
+  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_0);
+  __Pyx_GIVEREF(__pyx_int_0);
+  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_slen);
+  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_slen);
+  __Pyx_GIVEREF(__pyx_v_slen);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0;
+    __pyx_t_9 = NULL;
+  } else {
+    __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_9)) {
+      if (likely(PyList_CheckExact(__pyx_t_6))) {
+        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_6)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_1 = __pyx_t_9(__pyx_t_6);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_n1, __pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = PyNumber_Add(__pyx_v_n1, __pyx_v_slen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_bs, 0, 0, &__pyx_v_n1, &__pyx_t_1, NULL, 0, 0, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_6 = PyObject_Repr(__pyx_v_slen); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_10 = PyNumber_Add(__pyx_v_dtype, __pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_6 = NULL;
+  __pyx_t_8 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
+    if (likely(__pyx_t_6)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+      __Pyx_INCREF(__pyx_t_6);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_7, function);
+      __pyx_t_8 = 1;
+    }
+  }
+  __pyx_t_1 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (__pyx_t_6) {
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+  }
+  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_8, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_8, __pyx_t_10);
+  __Pyx_GIVEREF(__pyx_t_10);
+  __pyx_t_5 = 0;
+  __pyx_t_10 = 0;
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_v_a = __pyx_t_2;
+  __pyx_t_2 = 0;
+
+  /* "utils.pyx":88
+ *     slen = int(b.shape[-1])
+ *     a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen))
+ *     a.shape = b.shape[:-1]             # <<<<<<<<<<<<<<
+ *     return a
+ * 
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_2, 0, -1, NULL, NULL, &__pyx_slice__7, 0, 1, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_shape, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "utils.pyx":89
+ *     a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen))
+ *     a.shape = b.shape[:-1]
+ *     return a             # <<<<<<<<<<<<<<
+ * 
+ * def date2num(dates,units,calendar='standard'):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_a);
+  __pyx_r = __pyx_v_a;
+  goto __pyx_L0;
+
+  /* "utils.pyx":70
+ *     return b
+ * 
+ * def chartostring(b):             # <<<<<<<<<<<<<<
+ *     """
+ * chartostring(b)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4.chartostring", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_dtype);
+  __Pyx_XDECREF(__pyx_v_bs);
+  __Pyx_XDECREF(__pyx_v_slen);
+  __Pyx_XDECREF(__pyx_v_a);
+  __Pyx_XDECREF(__pyx_v_n1);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":91
+ *     return a
+ * 
+ * def date2num(dates,units,calendar='standard'):             # <<<<<<<<<<<<<<
+ *     """
+ * date2num(dates,units,calendar='standard')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9date2num(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8date2num[] = "\ndate2num(dates,units,calendar='standard')\n\nReturn numeric time values given datetime objects. The units\nof the numeric time values are described by the L{units} argument\nand the L{calendar} keyword. The datetime objects must\nbe in UTC with no time-zone offset.  If there is a \ntime-zone offset in C{units}, it will be applied to the\nreturned numeric values.\n\n at param dates: A datetime object or a sequence of datetime objects.\nThe date [...]
+static PyMethodDef __pyx_mdef_7netCDF4_9date2num = {"date2num", (PyCFunction)__pyx_pw_7netCDF4_9date2num, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8date2num};
+static PyObject *__pyx_pw_7netCDF4_9date2num(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_dates = 0;
+  PyObject *__pyx_v_units = 0;
+  PyObject *__pyx_v_calendar = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("date2num (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dates,&__pyx_n_s_units,&__pyx_n_s_calendar,0};
+    PyObject* values[3] = {0,0,0};
+    values[2] = ((PyObject *)__pyx_n_s_standard);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dates)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_units)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("date2num", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_calendar);
+          if (value) { values[2] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date2num") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_dates = values[0];
+    __pyx_v_units = values[1];
+    __pyx_v_calendar = values[2];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("date2num", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.date2num", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8date2num(__pyx_self, __pyx_v_dates, __pyx_v_units, __pyx_v_calendar);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8date2num(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dates, PyObject *__pyx_v_units, PyObject *__pyx_v_calendar) {
+  PyObject *__pyx_v_unit = NULL;
+  PyObject *__pyx_v_basedate = NULL;
+  PyObject *__pyx_v_tzutc = NULL;
+  PyObject *__pyx_v_msg = NULL;
+  int __pyx_v_isscalar;
+  int __pyx_v_ismasked;
+  CYTHON_UNUSED PyObject *__pyx_v_mask = NULL;
+  PyObject *__pyx_v_times = NULL;
+  PyObject *__pyx_v_date = NULL;
+  PyObject *__pyx_v_td = NULL;
+  PyObject *__pyx_v_totaltime = NULL;
+  PyObject *__pyx_v_cdftime = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  int __pyx_t_6;
+  int __pyx_t_7;
+  int __pyx_t_8;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  PyObject *__pyx_t_12 = NULL;
+  Py_ssize_t __pyx_t_13;
+  PyObject *(*__pyx_t_14)(PyObject *);
+  int __pyx_t_15;
+  PyObject *__pyx_t_16 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("date2num", 0);
+  __Pyx_INCREF(__pyx_v_dates);
+
+  /* "utils.pyx":122
+ * @return: a numeric time value, or an array of numeric time values.
+ *     """
+ *     unit = units.split()[0].lower()             # <<<<<<<<<<<<<<
+ *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:
+ *         basedate = _dateparse(units)
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_units, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+    }
+  }
+  if (__pyx_t_4) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  } else {
+    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_unit = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "utils.pyx":123
+ *     """
+ *     unit = units.split()[0].lower()
+ *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:             # <<<<<<<<<<<<<<
+ *         basedate = _dateparse(units)
+ *         from dateutil.tz import tzutc
+ */
+  __Pyx_INCREF(__pyx_v_unit);
+  __pyx_t_1 = __pyx_v_unit;
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_microseconds, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_6) {
+  } else {
+    __pyx_t_5 = __pyx_t_6;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_milliseconds, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_6) {
+  } else {
+    __pyx_t_5 = __pyx_t_6;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_microsecond, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_6) {
+  } else {
+    __pyx_t_5 = __pyx_t_6;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_millisecond, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __pyx_t_6;
+  __pyx_L4_bool_binop_done:;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_6 = (__pyx_t_5 != 0);
+  if (__pyx_t_6) {
+
+    /* "utils.pyx":124
+ *     unit = units.split()[0].lower()
+ *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:
+ *         basedate = _dateparse(units)             # <<<<<<<<<<<<<<
+ *         from dateutil.tz import tzutc
+ *         if calendar != 'proleptic_gregorian' and not \
+ */
+    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+      if (likely(__pyx_t_3)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+        __Pyx_INCREF(__pyx_t_3);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_2, function);
+      }
+    }
+    if (!__pyx_t_3) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_units); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+      __Pyx_INCREF(__pyx_v_units);
+      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_units);
+      __Pyx_GIVEREF(__pyx_v_units);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_v_basedate = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "utils.pyx":125
+ *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:
+ *         basedate = _dateparse(units)
+ *         from dateutil.tz import tzutc             # <<<<<<<<<<<<<<
+ *         if calendar != 'proleptic_gregorian' and not \
+ *            (calendar in ['gregorian','standard'] and \
+ */
+    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_n_s_tzutc);
+    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_tzutc);
+    __Pyx_GIVEREF(__pyx_n_s_tzutc);
+    __pyx_t_2 = __Pyx_Import(__pyx_n_s_dateutil_tz, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_tzutc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_t_1);
+    __pyx_v_tzutc = __pyx_t_1;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+    /* "utils.pyx":126
+ *         basedate = _dateparse(units)
+ *         from dateutil.tz import tzutc
+ *         if calendar != 'proleptic_gregorian' and not \             # <<<<<<<<<<<<<<
+ *            (calendar in ['gregorian','standard'] and \
+ *             basedate > gregorian.replace(tzinfo=tzutc())):
+ */
+    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_5) {
+    } else {
+      __pyx_t_6 = __pyx_t_5;
+      goto __pyx_L9_bool_binop_done;
+    }
+
+    /* "utils.pyx":127
+ *         from dateutil.tz import tzutc
+ *         if calendar != 'proleptic_gregorian' and not \
+ *            (calendar in ['gregorian','standard'] and \             # <<<<<<<<<<<<<<
+ *             basedate > gregorian.replace(tzinfo=tzutc())):
+ *             msg = 'milliseconds/microseconds not supported for this calendar'
+ */
+    __Pyx_INCREF(__pyx_v_calendar);
+    __pyx_t_2 = __pyx_v_calendar;
+    __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!__pyx_t_8) {
+    } else {
+      __pyx_t_7 = __pyx_t_8;
+      goto __pyx_L13_bool_binop_done;
+    }
+    __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __pyx_t_8;
+    __pyx_L13_bool_binop_done:;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_8 = (__pyx_t_7 != 0);
+    if (__pyx_t_8) {
+    } else {
+      __pyx_t_5 = __pyx_t_8;
+      goto __pyx_L11_bool_binop_done;
+    }
+
+    /* "utils.pyx":128
+ *         if calendar != 'proleptic_gregorian' and not \
+ *            (calendar in ['gregorian','standard'] and \
+ *             basedate > gregorian.replace(tzinfo=tzutc())):             # <<<<<<<<<<<<<<
+ *             msg = 'milliseconds/microseconds not supported for this calendar'
+ *             raise ValueError(msg)
+ */
+    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_v_tzutc);
+    __pyx_t_3 = __pyx_v_tzutc; __pyx_t_9 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_9)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_9);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (__pyx_t_9) {
+      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    } else {
+      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_tzinfo, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyObject_RichCompare(__pyx_v_basedate, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_5 = __pyx_t_8;
+    __pyx_L11_bool_binop_done:;
+
+    /* "utils.pyx":126
+ *         basedate = _dateparse(units)
+ *         from dateutil.tz import tzutc
+ *         if calendar != 'proleptic_gregorian' and not \             # <<<<<<<<<<<<<<
+ *            (calendar in ['gregorian','standard'] and \
+ *             basedate > gregorian.replace(tzinfo=tzutc())):
+ */
+    __pyx_t_8 = ((!__pyx_t_5) != 0);
+    __pyx_t_6 = __pyx_t_8;
+    __pyx_L9_bool_binop_done:;
+    if (__pyx_t_6) {
+
+      /* "utils.pyx":129
+ *            (calendar in ['gregorian','standard'] and \
+ *             basedate > gregorian.replace(tzinfo=tzutc())):
+ *             msg = 'milliseconds/microseconds not supported for this calendar'             # <<<<<<<<<<<<<<
+ *             raise ValueError(msg)
+ *         # use python datetime module,
+ */
+      __Pyx_INCREF(__pyx_kp_s_milliseconds_microseconds_not_su);
+      __pyx_v_msg = __pyx_kp_s_milliseconds_microseconds_not_su;
+
+      /* "utils.pyx":130
+ *             basedate > gregorian.replace(tzinfo=tzutc())):
+ *             msg = 'milliseconds/microseconds not supported for this calendar'
+ *             raise ValueError(msg)             # <<<<<<<<<<<<<<
+ *         # use python datetime module,
+ *         isscalar = False
+ */
+      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_v_msg);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg);
+      __Pyx_GIVEREF(__pyx_v_msg);
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "utils.pyx":132
+ *             raise ValueError(msg)
+ *         # use python datetime module,
+ *         isscalar = False             # <<<<<<<<<<<<<<
+ *         try:
+ *             dates[0]
+ */
+    __pyx_v_isscalar = 0;
+
+    /* "utils.pyx":133
+ *         # use python datetime module,
+ *         isscalar = False
+ *         try:             # <<<<<<<<<<<<<<
+ *             dates[0]
+ *         except:
+ */
+    {
+      __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
+      __Pyx_XGOTREF(__pyx_t_10);
+      __Pyx_XGOTREF(__pyx_t_11);
+      __Pyx_XGOTREF(__pyx_t_12);
+      /*try:*/ {
+
+        /* "utils.pyx":134
+ *         isscalar = False
+ *         try:
+ *             dates[0]             # <<<<<<<<<<<<<<
+ *         except:
+ *             isscalar = True
+ */
+        __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_dates, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L15_error;};
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      }
+      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+      goto __pyx_L22_try_end;
+      __pyx_L15_error:;
+      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+      /* "utils.pyx":135
+ *         try:
+ *             dates[0]
+ *         except:             # <<<<<<<<<<<<<<
+ *             isscalar = True
+ *         if isscalar: dates = [dates]
+ */
+      /*except:*/ {
+        __Pyx_AddTraceback("netCDF4.date2num", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_GOTREF(__pyx_t_1);
+
+        /* "utils.pyx":136
+ *             dates[0]
+ *         except:
+ *             isscalar = True             # <<<<<<<<<<<<<<
+ *         if isscalar: dates = [dates]
+ *         ismasked = False
+ */
+        __pyx_v_isscalar = 1;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        goto __pyx_L16_exception_handled;
+      }
+      __pyx_L17_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_10);
+      __Pyx_XGIVEREF(__pyx_t_11);
+      __Pyx_XGIVEREF(__pyx_t_12);
+      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+      goto __pyx_L1_error;
+      __pyx_L16_exception_handled:;
+      __Pyx_XGIVEREF(__pyx_t_10);
+      __Pyx_XGIVEREF(__pyx_t_11);
+      __Pyx_XGIVEREF(__pyx_t_12);
+      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+      __pyx_L22_try_end:;
+    }
+
+    /* "utils.pyx":137
+ *         except:
+ *             isscalar = True
+ *         if isscalar: dates = [dates]             # <<<<<<<<<<<<<<
+ *         ismasked = False
+ *         if hasattr(dates,'mask'):
+ */
+    __pyx_t_6 = (__pyx_v_isscalar != 0);
+    if (__pyx_t_6) {
+      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_INCREF(__pyx_v_dates);
+      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_dates);
+      __Pyx_GIVEREF(__pyx_v_dates);
+      __Pyx_DECREF_SET(__pyx_v_dates, __pyx_t_1);
+      __pyx_t_1 = 0;
+      goto __pyx_L25;
+    }
+    __pyx_L25:;
+
+    /* "utils.pyx":138
+ *             isscalar = True
+ *         if isscalar: dates = [dates]
+ *         ismasked = False             # <<<<<<<<<<<<<<
+ *         if hasattr(dates,'mask'):
+ *             mask = dates.mask
+ */
+    __pyx_v_ismasked = 0;
+
+    /* "utils.pyx":139
+ *         if isscalar: dates = [dates]
+ *         ismasked = False
+ *         if hasattr(dates,'mask'):             # <<<<<<<<<<<<<<
+ *             mask = dates.mask
+ *             ismasked = True
+ */
+    __pyx_t_6 = PyObject_HasAttr(__pyx_v_dates, __pyx_n_s_mask); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = (__pyx_t_6 != 0);
+    if (__pyx_t_8) {
+
+      /* "utils.pyx":140
+ *         ismasked = False
+ *         if hasattr(dates,'mask'):
+ *             mask = dates.mask             # <<<<<<<<<<<<<<
+ *             ismasked = True
+ *         times = []
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_mask); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_v_mask = __pyx_t_1;
+      __pyx_t_1 = 0;
+
+      /* "utils.pyx":141
+ *         if hasattr(dates,'mask'):
+ *             mask = dates.mask
+ *             ismasked = True             # <<<<<<<<<<<<<<
+ *         times = []
+ *         for date in dates:
+ */
+      __pyx_v_ismasked = 1;
+      goto __pyx_L26;
+    }
+    __pyx_L26:;
+
+    /* "utils.pyx":142
+ *             mask = dates.mask
+ *             ismasked = True
+ *         times = []             # <<<<<<<<<<<<<<
+ *         for date in dates:
+ *             if ismasked and not date:
+ */
+    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_v_times = ((PyObject*)__pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "utils.pyx":143
+ *             ismasked = True
+ *         times = []
+ *         for date in dates:             # <<<<<<<<<<<<<<
+ *             if ismasked and not date:
+ *                 times.append(None)
+ */
+    if (likely(PyList_CheckExact(__pyx_v_dates)) || PyTuple_CheckExact(__pyx_v_dates)) {
+      __pyx_t_1 = __pyx_v_dates; __Pyx_INCREF(__pyx_t_1); __pyx_t_13 = 0;
+      __pyx_t_14 = NULL;
+    } else {
+      __pyx_t_13 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_dates); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_14 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    for (;;) {
+      if (likely(!__pyx_t_14)) {
+        if (likely(PyList_CheckExact(__pyx_t_1))) {
+          if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_1)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_2); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_2); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        }
+      } else {
+        __pyx_t_2 = __pyx_t_14(__pyx_t_1);
+        if (unlikely(!__pyx_t_2)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_2);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_date, __pyx_t_2);
+      __pyx_t_2 = 0;
+
+      /* "utils.pyx":144
+ *         times = []
+ *         for date in dates:
+ *             if ismasked and not date:             # <<<<<<<<<<<<<<
+ *                 times.append(None)
+ *             else:
+ */
+      __pyx_t_6 = (__pyx_v_ismasked != 0);
+      if (__pyx_t_6) {
+      } else {
+        __pyx_t_8 = __pyx_t_6;
+        goto __pyx_L30_bool_binop_done;
+      }
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_date); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = ((!__pyx_t_6) != 0);
+      __pyx_t_8 = __pyx_t_5;
+      __pyx_L30_bool_binop_done:;
+      if (__pyx_t_8) {
+
+        /* "utils.pyx":145
+ *         for date in dates:
+ *             if ismasked and not date:
+ *                 times.append(None)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 date = date.replace(tzinfo=tzutc())
+ */
+        __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_times, Py_None); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        goto __pyx_L29;
+      }
+      /*else*/ {
+
+        /* "utils.pyx":147
+ *                 times.append(None)
+ *             else:
+ *                 date = date.replace(tzinfo=tzutc())             # <<<<<<<<<<<<<<
+ *                 td = date - basedate
+ *                 totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6
+ */
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_replace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_INCREF(__pyx_v_tzutc);
+        __pyx_t_9 = __pyx_v_tzutc; __pyx_t_16 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
+          __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_9);
+          if (likely(__pyx_t_16)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+            __Pyx_INCREF(__pyx_t_16);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_9, function);
+          }
+        }
+        if (__pyx_t_16) {
+          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+        } else {
+          __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_tzinfo, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF_SET(__pyx_v_date, __pyx_t_3);
+        __pyx_t_3 = 0;
+
+        /* "utils.pyx":148
+ *             else:
+ *                 date = date.replace(tzinfo=tzutc())
+ *                 td = date - basedate             # <<<<<<<<<<<<<<
+ *                 totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6
+ *                 if unit == 'microseconds' or unit == 'microsecond':
+ */
+        __pyx_t_3 = PyNumber_Subtract(__pyx_v_date, __pyx_v_basedate); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_XDECREF_SET(__pyx_v_td, __pyx_t_3);
+        __pyx_t_3 = 0;
+
+        /* "utils.pyx":149
+ *                 date = date.replace(tzinfo=tzutc())
+ *                 td = date - basedate
+ *                 totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6             # <<<<<<<<<<<<<<
+ *                 if unit == 'microseconds' or unit == 'microsecond':
+ *                     times.append(totaltime)
+ */
+        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_seconds); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_days); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_9 = PyNumber_Multiply(__pyx_t_2, __pyx_int_24); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = PyNumber_Multiply(__pyx_t_9, __pyx_int_3600); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_t_9 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = PyNumber_Multiply(__pyx_t_9, __pyx_float_1_e6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __pyx_t_9 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_totaltime, __pyx_t_9);
+        __pyx_t_9 = 0;
+
+        /* "utils.pyx":150
+ *                 td = date - basedate
+ *                 totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6
+ *                 if unit == 'microseconds' or unit == 'microsecond':             # <<<<<<<<<<<<<<
+ *                     times.append(totaltime)
+ *                 elif unit == 'milliseconds' or unit == 'millisecond':
+ */
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_microseconds, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (!__pyx_t_5) {
+        } else {
+          __pyx_t_8 = __pyx_t_5;
+          goto __pyx_L33_bool_binop_done;
+        }
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_microsecond, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = __pyx_t_5;
+        __pyx_L33_bool_binop_done:;
+        if (__pyx_t_8) {
+
+          /* "utils.pyx":151
+ *                 totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6
+ *                 if unit == 'microseconds' or unit == 'microsecond':
+ *                     times.append(totaltime)             # <<<<<<<<<<<<<<
+ *                 elif unit == 'milliseconds' or unit == 'millisecond':
+ *                     times.append(totaltime/1.e3)
+ */
+          __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_times, __pyx_v_totaltime); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          goto __pyx_L32;
+        }
+
+        /* "utils.pyx":152
+ *                 if unit == 'microseconds' or unit == 'microsecond':
+ *                     times.append(totaltime)
+ *                 elif unit == 'milliseconds' or unit == 'millisecond':             # <<<<<<<<<<<<<<
+ *                     times.append(totaltime/1.e3)
+ *                 elif unit == 'seconds' or unit == 'second':
+ */
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_milliseconds, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (!__pyx_t_5) {
+        } else {
+          __pyx_t_8 = __pyx_t_5;
+          goto __pyx_L35_bool_binop_done;
+        }
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_millisecond, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = __pyx_t_5;
+        __pyx_L35_bool_binop_done:;
+        if (__pyx_t_8) {
+
+          /* "utils.pyx":153
+ *                     times.append(totaltime)
+ *                 elif unit == 'milliseconds' or unit == 'millisecond':
+ *                     times.append(totaltime/1.e3)             # <<<<<<<<<<<<<<
+ *                 elif unit == 'seconds' or unit == 'second':
+ *                     times.append(totaltime/1.e6)
+ */
+          __pyx_t_9 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_9); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          goto __pyx_L32;
+        }
+
+        /* "utils.pyx":154
+ *                 elif unit == 'milliseconds' or unit == 'millisecond':
+ *                     times.append(totaltime/1.e3)
+ *                 elif unit == 'seconds' or unit == 'second':             # <<<<<<<<<<<<<<
+ *                     times.append(totaltime/1.e6)
+ *                 elif unit == 'hours' or unit == 'hour':
+ */
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_seconds, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (!__pyx_t_5) {
+        } else {
+          __pyx_t_8 = __pyx_t_5;
+          goto __pyx_L37_bool_binop_done;
+        }
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_second, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = __pyx_t_5;
+        __pyx_L37_bool_binop_done:;
+        if (__pyx_t_8) {
+
+          /* "utils.pyx":155
+ *                     times.append(totaltime/1.e3)
+ *                 elif unit == 'seconds' or unit == 'second':
+ *                     times.append(totaltime/1.e6)             # <<<<<<<<<<<<<<
+ *                 elif unit == 'hours' or unit == 'hour':
+ *                     times.append(totaltime/1.e6/3600)
+ */
+          __pyx_t_9 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_9); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          goto __pyx_L32;
+        }
+
+        /* "utils.pyx":156
+ *                 elif unit == 'seconds' or unit == 'second':
+ *                     times.append(totaltime/1.e6)
+ *                 elif unit == 'hours' or unit == 'hour':             # <<<<<<<<<<<<<<
+ *                     times.append(totaltime/1.e6/3600)
+ *                 elif unit == 'days' or unit == 'day':
+ */
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_hours, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (!__pyx_t_5) {
+        } else {
+          __pyx_t_8 = __pyx_t_5;
+          goto __pyx_L39_bool_binop_done;
+        }
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_hour, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = __pyx_t_5;
+        __pyx_L39_bool_binop_done:;
+        if (__pyx_t_8) {
+
+          /* "utils.pyx":157
+ *                     times.append(totaltime/1.e6)
+ *                 elif unit == 'hours' or unit == 'hour':
+ *                     times.append(totaltime/1.e6/3600)             # <<<<<<<<<<<<<<
+ *                 elif unit == 'days' or unit == 'day':
+ *                     times.append(totaltime/1.e6/3600./24.)
+ */
+          __pyx_t_9 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_9, __pyx_int_3600); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_2); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          goto __pyx_L32;
+        }
+
+        /* "utils.pyx":158
+ *                 elif unit == 'hours' or unit == 'hour':
+ *                     times.append(totaltime/1.e6/3600)
+ *                 elif unit == 'days' or unit == 'day':             # <<<<<<<<<<<<<<
+ *                     times.append(totaltime/1.e6/3600./24.)
+ *         if isscalar:
+ */
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_days, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (!__pyx_t_5) {
+        } else {
+          __pyx_t_8 = __pyx_t_5;
+          goto __pyx_L41_bool_binop_done;
+        }
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_day, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = __pyx_t_5;
+        __pyx_L41_bool_binop_done:;
+        if (__pyx_t_8) {
+
+          /* "utils.pyx":159
+ *                     times.append(totaltime/1.e6/3600)
+ *                 elif unit == 'days' or unit == 'day':
+ *                     times.append(totaltime/1.e6/3600./24.)             # <<<<<<<<<<<<<<
+ *         if isscalar:
+ *             return times[0]
+ */
+          __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __pyx_t_9 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_float_3600_); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_9, __pyx_float_24_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_2); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          goto __pyx_L32;
+        }
+        __pyx_L32:;
+      }
+      __pyx_L29:;
+
+      /* "utils.pyx":143
+ *             ismasked = True
+ *         times = []
+ *         for date in dates:             # <<<<<<<<<<<<<<
+ *             if ismasked and not date:
+ *                 times.append(None)
+ */
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "utils.pyx":160
+ *                 elif unit == 'days' or unit == 'day':
+ *                     times.append(totaltime/1.e6/3600./24.)
+ *         if isscalar:             # <<<<<<<<<<<<<<
+ *             return times[0]
+ *         else:
+ */
+    __pyx_t_8 = (__pyx_v_isscalar != 0);
+    if (__pyx_t_8) {
+
+      /* "utils.pyx":161
+ *                     times.append(totaltime/1.e6/3600./24.)
+ *         if isscalar:
+ *             return times[0]             # <<<<<<<<<<<<<<
+ *         else:
+ *             return times
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_times, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_r = __pyx_t_1;
+      __pyx_t_1 = 0;
+      goto __pyx_L0;
+    }
+    /*else*/ {
+
+      /* "utils.pyx":163
+ *             return times[0]
+ *         else:
+ *             return times             # <<<<<<<<<<<<<<
+ *     else: # if only second accuracy required, can use other calendars.
+ *         cdftime = netcdftime.utime(units,calendar=calendar)
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __Pyx_INCREF(__pyx_v_times);
+      __pyx_r = __pyx_v_times;
+      goto __pyx_L0;
+    }
+  }
+  /*else*/ {
+
+    /* "utils.pyx":165
+ *             return times
+ *     else: # if only second accuracy required, can use other calendars.
+ *         cdftime = netcdftime.utime(units,calendar=calendar)             # <<<<<<<<<<<<<<
+ *         return cdftime.date2num(dates)
+ * 
+ */
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_utime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_units);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_units);
+    __Pyx_GIVEREF(__pyx_v_units);
+    __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_calendar, __pyx_v_calendar) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_v_cdftime = __pyx_t_3;
+    __pyx_t_3 = 0;
+
+    /* "utils.pyx":166
+ *     else: # if only second accuracy required, can use other calendars.
+ *         cdftime = netcdftime.utime(units,calendar=calendar)
+ *         return cdftime.date2num(dates)             # <<<<<<<<<<<<<<
+ * 
+ * def num2date(times,units,calendar='standard'):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdftime, __pyx_n_s_date2num); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_1 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
+      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
+      if (likely(__pyx_t_1)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+        __Pyx_INCREF(__pyx_t_1);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_9, function);
+      }
+    }
+    if (!__pyx_t_1) {
+      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_dates); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+    } else {
+      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+      __Pyx_INCREF(__pyx_v_dates);
+      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_dates);
+      __Pyx_GIVEREF(__pyx_v_dates);
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_r = __pyx_t_3;
+    __pyx_t_3 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "utils.pyx":91
+ *     return a
+ * 
+ * def date2num(dates,units,calendar='standard'):             # <<<<<<<<<<<<<<
+ *     """
+ * date2num(dates,units,calendar='standard')
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_16);
+  __Pyx_AddTraceback("netCDF4.date2num", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_unit);
+  __Pyx_XDECREF(__pyx_v_basedate);
+  __Pyx_XDECREF(__pyx_v_tzutc);
+  __Pyx_XDECREF(__pyx_v_msg);
+  __Pyx_XDECREF(__pyx_v_mask);
+  __Pyx_XDECREF(__pyx_v_times);
+  __Pyx_XDECREF(__pyx_v_date);
+  __Pyx_XDECREF(__pyx_v_td);
+  __Pyx_XDECREF(__pyx_v_totaltime);
+  __Pyx_XDECREF(__pyx_v_cdftime);
+  __Pyx_XDECREF(__pyx_v_dates);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":168
+ *         return cdftime.date2num(dates)
+ * 
+ * def num2date(times,units,calendar='standard'):             # <<<<<<<<<<<<<<
+ *     """
+ * num2date(times,units,calendar='standard')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_11num2date(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_10num2date[] = "\nnum2date(times,units,calendar='standard')\n\nReturn datetime objects given numeric time values. The units\nof the numeric time values are described by the C{units} argument\nand the C{calendar} keyword. The returned datetime objects represent \nUTC with no time-zone offset, even if the specified \nC{units} contain a time-zone offset.\n\n at param times: numeric time values. \n\n at param units: a string of the form C{'B{time units} since B{refer [...]
+static PyMethodDef __pyx_mdef_7netCDF4_11num2date = {"num2date", (PyCFunction)__pyx_pw_7netCDF4_11num2date, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_10num2date};
+static PyObject *__pyx_pw_7netCDF4_11num2date(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_times = 0;
+  PyObject *__pyx_v_units = 0;
+  PyObject *__pyx_v_calendar = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("num2date (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_times,&__pyx_n_s_units,&__pyx_n_s_calendar,0};
+    PyObject* values[3] = {0,0,0};
+    values[2] = ((PyObject *)__pyx_n_s_standard);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_times)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_units)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("num2date", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_calendar);
+          if (value) { values[2] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "num2date") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_times = values[0];
+    __pyx_v_units = values[1];
+    __pyx_v_calendar = values[2];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("num2date", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_10num2date(__pyx_self, __pyx_v_times, __pyx_v_units, __pyx_v_calendar);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_10num2date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_times, PyObject *__pyx_v_units, PyObject *__pyx_v_calendar) {
+  PyObject *__pyx_v_unit = NULL;
+  PyObject *__pyx_v_basedate = NULL;
+  PyObject *__pyx_v_tzutc = NULL;
+  PyObject *__pyx_v_msg = NULL;
+  int __pyx_v_isscalar;
+  int __pyx_v_ismasked;
+  CYTHON_UNUSED PyObject *__pyx_v_mask = NULL;
+  PyObject *__pyx_v_dates = NULL;
+  PyObject *__pyx_v_time = NULL;
+  PyObject *__pyx_v_tsecs = NULL;
+  PyObject *__pyx_v_days = NULL;
+  PyObject *__pyx_v_msecsd = NULL;
+  PyObject *__pyx_v_secs = NULL;
+  PyObject *__pyx_v_msecs = NULL;
+  PyObject *__pyx_v_td = NULL;
+  PyObject *__pyx_v_date = NULL;
+  PyObject *__pyx_v_cdftime = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  int __pyx_t_6;
+  int __pyx_t_7;
+  int __pyx_t_8;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  PyObject *__pyx_t_12 = NULL;
+  Py_ssize_t __pyx_t_13;
+  PyObject *(*__pyx_t_14)(PyObject *);
+  int __pyx_t_15;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("num2date", 0);
+  __Pyx_INCREF(__pyx_v_times);
+
+  /* "utils.pyx":208
+ * contains one.
+ *     """
+ *     unit = units.split()[0].lower()             # <<<<<<<<<<<<<<
+ *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:
+ *         basedate = _dateparse(units)
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_units, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+    }
+  }
+  if (__pyx_t_4) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  } else {
+    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_unit = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "utils.pyx":209
+ *     """
+ *     unit = units.split()[0].lower()
+ *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:             # <<<<<<<<<<<<<<
+ *         basedate = _dateparse(units)
+ *         from dateutil.tz import tzutc
+ */
+  __Pyx_INCREF(__pyx_v_unit);
+  __pyx_t_1 = __pyx_v_unit;
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_microseconds, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_6) {
+  } else {
+    __pyx_t_5 = __pyx_t_6;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_milliseconds, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_6) {
+  } else {
+    __pyx_t_5 = __pyx_t_6;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_microsecond, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_6) {
+  } else {
+    __pyx_t_5 = __pyx_t_6;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_millisecond, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __pyx_t_6;
+  __pyx_L4_bool_binop_done:;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_6 = (__pyx_t_5 != 0);
+  if (__pyx_t_6) {
+
+    /* "utils.pyx":210
+ *     unit = units.split()[0].lower()
+ *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:
+ *         basedate = _dateparse(units)             # <<<<<<<<<<<<<<
+ *         from dateutil.tz import tzutc
+ *         if calendar != 'proleptic_gregorian' and not \
+ */
+    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+      if (likely(__pyx_t_3)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+        __Pyx_INCREF(__pyx_t_3);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_2, function);
+      }
+    }
+    if (!__pyx_t_3) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_units); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+      __Pyx_INCREF(__pyx_v_units);
+      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_units);
+      __Pyx_GIVEREF(__pyx_v_units);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_v_basedate = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "utils.pyx":211
+ *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:
+ *         basedate = _dateparse(units)
+ *         from dateutil.tz import tzutc             # <<<<<<<<<<<<<<
+ *         if calendar != 'proleptic_gregorian' and not \
+ *            (calendar in ['gregorian','standard'] and \
+ */
+    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_n_s_tzutc);
+    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_tzutc);
+    __Pyx_GIVEREF(__pyx_n_s_tzutc);
+    __pyx_t_2 = __Pyx_Import(__pyx_n_s_dateutil_tz, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_tzutc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_t_1);
+    __pyx_v_tzutc = __pyx_t_1;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+    /* "utils.pyx":212
+ *         basedate = _dateparse(units)
+ *         from dateutil.tz import tzutc
+ *         if calendar != 'proleptic_gregorian' and not \             # <<<<<<<<<<<<<<
+ *            (calendar in ['gregorian','standard'] and \
+ *             basedate > gregorian.replace(tzinfo=tzutc())):
+ */
+    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_5) {
+    } else {
+      __pyx_t_6 = __pyx_t_5;
+      goto __pyx_L9_bool_binop_done;
+    }
+
+    /* "utils.pyx":213
+ *         from dateutil.tz import tzutc
+ *         if calendar != 'proleptic_gregorian' and not \
+ *            (calendar in ['gregorian','standard'] and \             # <<<<<<<<<<<<<<
+ *             basedate > gregorian.replace(tzinfo=tzutc())):
+ *             msg = 'milliseconds/microseconds not supported for this calendar'
+ */
+    __Pyx_INCREF(__pyx_v_calendar);
+    __pyx_t_2 = __pyx_v_calendar;
+    __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!__pyx_t_8) {
+    } else {
+      __pyx_t_7 = __pyx_t_8;
+      goto __pyx_L13_bool_binop_done;
+    }
+    __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __pyx_t_8;
+    __pyx_L13_bool_binop_done:;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_8 = (__pyx_t_7 != 0);
+    if (__pyx_t_8) {
+    } else {
+      __pyx_t_5 = __pyx_t_8;
+      goto __pyx_L11_bool_binop_done;
+    }
+
+    /* "utils.pyx":214
+ *         if calendar != 'proleptic_gregorian' and not \
+ *            (calendar in ['gregorian','standard'] and \
+ *             basedate > gregorian.replace(tzinfo=tzutc())):             # <<<<<<<<<<<<<<
+ *             msg = 'milliseconds/microseconds not supported for this calendar'
+ *             raise ValueError(msg)
+ */
+    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_v_tzutc);
+    __pyx_t_3 = __pyx_v_tzutc; __pyx_t_9 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_9)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_9);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (__pyx_t_9) {
+      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    } else {
+      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_tzinfo, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyObject_RichCompare(__pyx_v_basedate, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_5 = __pyx_t_8;
+    __pyx_L11_bool_binop_done:;
+
+    /* "utils.pyx":212
+ *         basedate = _dateparse(units)
+ *         from dateutil.tz import tzutc
+ *         if calendar != 'proleptic_gregorian' and not \             # <<<<<<<<<<<<<<
+ *            (calendar in ['gregorian','standard'] and \
+ *             basedate > gregorian.replace(tzinfo=tzutc())):
+ */
+    __pyx_t_8 = ((!__pyx_t_5) != 0);
+    __pyx_t_6 = __pyx_t_8;
+    __pyx_L9_bool_binop_done:;
+    if (__pyx_t_6) {
+
+      /* "utils.pyx":215
+ *            (calendar in ['gregorian','standard'] and \
+ *             basedate > gregorian.replace(tzinfo=tzutc())):
+ *             msg = 'milliseconds/microseconds not supported for this calendar'             # <<<<<<<<<<<<<<
+ *             raise ValueError(msg)
+ *         isscalar = False
+ */
+      __Pyx_INCREF(__pyx_kp_s_milliseconds_microseconds_not_su);
+      __pyx_v_msg = __pyx_kp_s_milliseconds_microseconds_not_su;
+
+      /* "utils.pyx":216
+ *             basedate > gregorian.replace(tzinfo=tzutc())):
+ *             msg = 'milliseconds/microseconds not supported for this calendar'
+ *             raise ValueError(msg)             # <<<<<<<<<<<<<<
+ *         isscalar = False
+ *         try:
+ */
+      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_v_msg);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg);
+      __Pyx_GIVEREF(__pyx_v_msg);
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "utils.pyx":217
+ *             msg = 'milliseconds/microseconds not supported for this calendar'
+ *             raise ValueError(msg)
+ *         isscalar = False             # <<<<<<<<<<<<<<
+ *         try:
+ *             times[0]
+ */
+    __pyx_v_isscalar = 0;
+
+    /* "utils.pyx":218
+ *             raise ValueError(msg)
+ *         isscalar = False
+ *         try:             # <<<<<<<<<<<<<<
+ *             times[0]
+ *         except:
+ */
+    {
+      __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
+      __Pyx_XGOTREF(__pyx_t_10);
+      __Pyx_XGOTREF(__pyx_t_11);
+      __Pyx_XGOTREF(__pyx_t_12);
+      /*try:*/ {
+
+        /* "utils.pyx":219
+ *         isscalar = False
+ *         try:
+ *             times[0]             # <<<<<<<<<<<<<<
+ *         except:
+ *             isscalar = True
+ */
+        __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_times, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L15_error;};
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      }
+      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+      goto __pyx_L22_try_end;
+      __pyx_L15_error:;
+      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+      /* "utils.pyx":220
+ *         try:
+ *             times[0]
+ *         except:             # <<<<<<<<<<<<<<
+ *             isscalar = True
+ *         if isscalar: times = [times]
+ */
+      /*except:*/ {
+        __Pyx_AddTraceback("netCDF4.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_GOTREF(__pyx_t_1);
+
+        /* "utils.pyx":221
+ *             times[0]
+ *         except:
+ *             isscalar = True             # <<<<<<<<<<<<<<
+ *         if isscalar: times = [times]
+ *         ismasked = False
+ */
+        __pyx_v_isscalar = 1;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        goto __pyx_L16_exception_handled;
+      }
+      __pyx_L17_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_10);
+      __Pyx_XGIVEREF(__pyx_t_11);
+      __Pyx_XGIVEREF(__pyx_t_12);
+      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+      goto __pyx_L1_error;
+      __pyx_L16_exception_handled:;
+      __Pyx_XGIVEREF(__pyx_t_10);
+      __Pyx_XGIVEREF(__pyx_t_11);
+      __Pyx_XGIVEREF(__pyx_t_12);
+      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+      __pyx_L22_try_end:;
+    }
+
+    /* "utils.pyx":222
+ *         except:
+ *             isscalar = True
+ *         if isscalar: times = [times]             # <<<<<<<<<<<<<<
+ *         ismasked = False
+ *         if hasattr(times,'mask'):
+ */
+    __pyx_t_6 = (__pyx_v_isscalar != 0);
+    if (__pyx_t_6) {
+      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_INCREF(__pyx_v_times);
+      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_times);
+      __Pyx_GIVEREF(__pyx_v_times);
+      __Pyx_DECREF_SET(__pyx_v_times, __pyx_t_1);
+      __pyx_t_1 = 0;
+      goto __pyx_L25;
+    }
+    __pyx_L25:;
+
+    /* "utils.pyx":223
+ *             isscalar = True
+ *         if isscalar: times = [times]
+ *         ismasked = False             # <<<<<<<<<<<<<<
+ *         if hasattr(times,'mask'):
+ *             mask = times.mask
+ */
+    __pyx_v_ismasked = 0;
+
+    /* "utils.pyx":224
+ *         if isscalar: times = [times]
+ *         ismasked = False
+ *         if hasattr(times,'mask'):             # <<<<<<<<<<<<<<
+ *             mask = times.mask
+ *             ismasked = True
+ */
+    __pyx_t_6 = PyObject_HasAttr(__pyx_v_times, __pyx_n_s_mask); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = (__pyx_t_6 != 0);
+    if (__pyx_t_8) {
+
+      /* "utils.pyx":225
+ *         ismasked = False
+ *         if hasattr(times,'mask'):
+ *             mask = times.mask             # <<<<<<<<<<<<<<
+ *             ismasked = True
+ *         dates = []
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_mask); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_v_mask = __pyx_t_1;
+      __pyx_t_1 = 0;
+
+      /* "utils.pyx":226
+ *         if hasattr(times,'mask'):
+ *             mask = times.mask
+ *             ismasked = True             # <<<<<<<<<<<<<<
+ *         dates = []
+ *         for time in times:
+ */
+      __pyx_v_ismasked = 1;
+      goto __pyx_L26;
+    }
+    __pyx_L26:;
+
+    /* "utils.pyx":227
+ *             mask = times.mask
+ *             ismasked = True
+ *         dates = []             # <<<<<<<<<<<<<<
+ *         for time in times:
+ *             if ismasked and not time:
+ */
+    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_v_dates = ((PyObject*)__pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "utils.pyx":228
+ *             ismasked = True
+ *         dates = []
+ *         for time in times:             # <<<<<<<<<<<<<<
+ *             if ismasked and not time:
+ *                 dates.append(None)
+ */
+    if (likely(PyList_CheckExact(__pyx_v_times)) || PyTuple_CheckExact(__pyx_v_times)) {
+      __pyx_t_1 = __pyx_v_times; __Pyx_INCREF(__pyx_t_1); __pyx_t_13 = 0;
+      __pyx_t_14 = NULL;
+    } else {
+      __pyx_t_13 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_times); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_14 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    for (;;) {
+      if (likely(!__pyx_t_14)) {
+        if (likely(PyList_CheckExact(__pyx_t_1))) {
+          if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_1)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_2); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_2); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        }
+      } else {
+        __pyx_t_2 = __pyx_t_14(__pyx_t_1);
+        if (unlikely(!__pyx_t_2)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_2);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_time, __pyx_t_2);
+      __pyx_t_2 = 0;
+
+      /* "utils.pyx":229
+ *         dates = []
+ *         for time in times:
+ *             if ismasked and not time:             # <<<<<<<<<<<<<<
+ *                 dates.append(None)
+ *             else:
+ */
+      __pyx_t_6 = (__pyx_v_ismasked != 0);
+      if (__pyx_t_6) {
+      } else {
+        __pyx_t_8 = __pyx_t_6;
+        goto __pyx_L30_bool_binop_done;
+      }
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_time); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = ((!__pyx_t_6) != 0);
+      __pyx_t_8 = __pyx_t_5;
+      __pyx_L30_bool_binop_done:;
+      if (__pyx_t_8) {
+
+        /* "utils.pyx":230
+ *         for time in times:
+ *             if ismasked and not time:
+ *                 dates.append(None)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 # convert to total seconds
+ */
+        __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_dates, Py_None); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        goto __pyx_L29;
+      }
+      /*else*/ {
+
+        /* "utils.pyx":233
+ *             else:
+ *                 # convert to total seconds
+ *                 if unit == 'microseconds' or unit == 'microsecond':             # <<<<<<<<<<<<<<
+ *                     tsecs = time/1.e6
+ *                 elif unit == 'milliseconds' or unit == 'millisecond':
+ */
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_microseconds, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (!__pyx_t_5) {
+        } else {
+          __pyx_t_8 = __pyx_t_5;
+          goto __pyx_L33_bool_binop_done;
+        }
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_microsecond, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = __pyx_t_5;
+        __pyx_L33_bool_binop_done:;
+        if (__pyx_t_8) {
+
+          /* "utils.pyx":234
+ *                 # convert to total seconds
+ *                 if unit == 'microseconds' or unit == 'microsecond':
+ *                     tsecs = time/1.e6             # <<<<<<<<<<<<<<
+ *                 elif unit == 'milliseconds' or unit == 'millisecond':
+ *                     tsecs = time/1.e3
+ */
+          __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_time, __pyx_float_1_e6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_2);
+          __pyx_t_2 = 0;
+          goto __pyx_L32;
+        }
+
+        /* "utils.pyx":235
+ *                 if unit == 'microseconds' or unit == 'microsecond':
+ *                     tsecs = time/1.e6
+ *                 elif unit == 'milliseconds' or unit == 'millisecond':             # <<<<<<<<<<<<<<
+ *                     tsecs = time/1.e3
+ *                 elif unit == 'seconds' or unit == 'second':
+ */
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_milliseconds, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (!__pyx_t_5) {
+        } else {
+          __pyx_t_8 = __pyx_t_5;
+          goto __pyx_L35_bool_binop_done;
+        }
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_millisecond, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = __pyx_t_5;
+        __pyx_L35_bool_binop_done:;
+        if (__pyx_t_8) {
+
+          /* "utils.pyx":236
+ *                     tsecs = time/1.e6
+ *                 elif unit == 'milliseconds' or unit == 'millisecond':
+ *                     tsecs = time/1.e3             # <<<<<<<<<<<<<<
+ *                 elif unit == 'seconds' or unit == 'second':
+ *                     tsecs = time
+ */
+          __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_time, __pyx_float_1_e3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_2);
+          __pyx_t_2 = 0;
+          goto __pyx_L32;
+        }
+
+        /* "utils.pyx":237
+ *                 elif unit == 'milliseconds' or unit == 'millisecond':
+ *                     tsecs = time/1.e3
+ *                 elif unit == 'seconds' or unit == 'second':             # <<<<<<<<<<<<<<
+ *                     tsecs = time
+ *                 elif unit == 'hours' or unit == 'hour':
+ */
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_seconds, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (!__pyx_t_5) {
+        } else {
+          __pyx_t_8 = __pyx_t_5;
+          goto __pyx_L37_bool_binop_done;
+        }
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_second, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = __pyx_t_5;
+        __pyx_L37_bool_binop_done:;
+        if (__pyx_t_8) {
+
+          /* "utils.pyx":238
+ *                     tsecs = time/1.e3
+ *                 elif unit == 'seconds' or unit == 'second':
+ *                     tsecs = time             # <<<<<<<<<<<<<<
+ *                 elif unit == 'hours' or unit == 'hour':
+ *                     tsecs = time*3600.
+ */
+          __Pyx_INCREF(__pyx_v_time);
+          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_v_time);
+          goto __pyx_L32;
+        }
+
+        /* "utils.pyx":239
+ *                 elif unit == 'seconds' or unit == 'second':
+ *                     tsecs = time
+ *                 elif unit == 'hours' or unit == 'hour':             # <<<<<<<<<<<<<<
+ *                     tsecs = time*3600.
+ *                 elif unit == 'days' or unit == 'day':
+ */
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_hours, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (!__pyx_t_5) {
+        } else {
+          __pyx_t_8 = __pyx_t_5;
+          goto __pyx_L39_bool_binop_done;
+        }
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_hour, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = __pyx_t_5;
+        __pyx_L39_bool_binop_done:;
+        if (__pyx_t_8) {
+
+          /* "utils.pyx":240
+ *                     tsecs = time
+ *                 elif unit == 'hours' or unit == 'hour':
+ *                     tsecs = time*3600.             # <<<<<<<<<<<<<<
+ *                 elif unit == 'days' or unit == 'day':
+ *                     tsecs = time*86400.
+ */
+          __pyx_t_2 = PyNumber_Multiply(__pyx_v_time, __pyx_float_3600_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_2);
+          __pyx_t_2 = 0;
+          goto __pyx_L32;
+        }
+
+        /* "utils.pyx":241
+ *                 elif unit == 'hours' or unit == 'hour':
+ *                     tsecs = time*3600.
+ *                 elif unit == 'days' or unit == 'day':             # <<<<<<<<<<<<<<
+ *                     tsecs = time*86400.
+ *                 # compute time delta.
+ */
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_days, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (!__pyx_t_5) {
+        } else {
+          __pyx_t_8 = __pyx_t_5;
+          goto __pyx_L41_bool_binop_done;
+        }
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_day, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = __pyx_t_5;
+        __pyx_L41_bool_binop_done:;
+        if (__pyx_t_8) {
+
+          /* "utils.pyx":242
+ *                     tsecs = time*3600.
+ *                 elif unit == 'days' or unit == 'day':
+ *                     tsecs = time*86400.             # <<<<<<<<<<<<<<
+ *                 # compute time delta.
+ *                 days = tsecs // 86400.
+ */
+          __pyx_t_2 = PyNumber_Multiply(__pyx_v_time, __pyx_float_86400_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_2);
+          __pyx_t_2 = 0;
+          goto __pyx_L32;
+        }
+        __pyx_L32:;
+
+        /* "utils.pyx":244
+ *                     tsecs = time*86400.
+ *                 # compute time delta.
+ *                 days = tsecs // 86400.             # <<<<<<<<<<<<<<
+ *                 msecsd = tsecs*1.e6 - days*86400.*1.e6
+ *                 secs = msecsd // 1.e6
+ */
+        if (unlikely(!__pyx_v_tsecs)) { __Pyx_RaiseUnboundLocalError("tsecs"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+        __pyx_t_2 = PyNumber_FloorDivide(__pyx_v_tsecs, __pyx_float_86400_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_XDECREF_SET(__pyx_v_days, __pyx_t_2);
+        __pyx_t_2 = 0;
+
+        /* "utils.pyx":245
+ *                 # compute time delta.
+ *                 days = tsecs // 86400.
+ *                 msecsd = tsecs*1.e6 - days*86400.*1.e6             # <<<<<<<<<<<<<<
+ *                 secs = msecsd // 1.e6
+ *                 msecs = int(msecsd - secs*1.e6)
+ */
+        if (unlikely(!__pyx_v_tsecs)) { __Pyx_RaiseUnboundLocalError("tsecs"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+        __pyx_t_2 = PyNumber_Multiply(__pyx_v_tsecs, __pyx_float_1_e6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_4 = PyNumber_Multiply(__pyx_v_days, __pyx_float_86400_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_float_1_e6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_t_4 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_msecsd, __pyx_t_4);
+        __pyx_t_4 = 0;
+
+        /* "utils.pyx":246
+ *                 days = tsecs // 86400.
+ *                 msecsd = tsecs*1.e6 - days*86400.*1.e6
+ *                 secs = msecsd // 1.e6             # <<<<<<<<<<<<<<
+ *                 msecs = int(msecsd - secs*1.e6)
+ *                 td = timedelta(days=days,seconds=secs,microseconds=msecs)
+ */
+        __pyx_t_4 = PyNumber_FloorDivide(__pyx_v_msecsd, __pyx_float_1_e6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_XDECREF_SET(__pyx_v_secs, __pyx_t_4);
+        __pyx_t_4 = 0;
+
+        /* "utils.pyx":247
+ *                 msecsd = tsecs*1.e6 - days*86400.*1.e6
+ *                 secs = msecsd // 1.e6
+ *                 msecs = int(msecsd - secs*1.e6)             # <<<<<<<<<<<<<<
+ *                 td = timedelta(days=days,seconds=secs,microseconds=msecs)
+ *                 # add time delta to base date.
+ */
+        __pyx_t_4 = PyNumber_Multiply(__pyx_v_secs, __pyx_float_1_e6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_3 = PyNumber_Subtract(__pyx_v_msecsd, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_t_4 = PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_msecs, __pyx_t_4);
+        __pyx_t_4 = 0;
+
+        /* "utils.pyx":248
+ *                 secs = msecsd // 1.e6
+ *                 msecs = int(msecsd - secs*1.e6)
+ *                 td = timedelta(days=days,seconds=secs,microseconds=msecs)             # <<<<<<<<<<<<<<
+ *                 # add time delta to base date.
+ *                 date = basedate + td
+ */
+        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_days, __pyx_v_days) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_seconds, __pyx_v_secs) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_microseconds, __pyx_v_msecs) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_td, __pyx_t_2);
+        __pyx_t_2 = 0;
+
+        /* "utils.pyx":250
+ *                 td = timedelta(days=days,seconds=secs,microseconds=msecs)
+ *                 # add time delta to base date.
+ *                 date = basedate + td             # <<<<<<<<<<<<<<
+ *                 dates.append(date)
+ *         if isscalar:
+ */
+        __pyx_t_2 = PyNumber_Add(__pyx_v_basedate, __pyx_v_td); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_XDECREF_SET(__pyx_v_date, __pyx_t_2);
+        __pyx_t_2 = 0;
+
+        /* "utils.pyx":251
+ *                 # add time delta to base date.
+ *                 date = basedate + td
+ *                 dates.append(date)             # <<<<<<<<<<<<<<
+ *         if isscalar:
+ *             return dates[0]
+ */
+        __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_dates, __pyx_v_date); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __pyx_L29:;
+
+      /* "utils.pyx":228
+ *             ismasked = True
+ *         dates = []
+ *         for time in times:             # <<<<<<<<<<<<<<
+ *             if ismasked and not time:
+ *                 dates.append(None)
+ */
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "utils.pyx":252
+ *                 date = basedate + td
+ *                 dates.append(date)
+ *         if isscalar:             # <<<<<<<<<<<<<<
+ *             return dates[0]
+ *         else:
+ */
+    __pyx_t_8 = (__pyx_v_isscalar != 0);
+    if (__pyx_t_8) {
+
+      /* "utils.pyx":253
+ *                 dates.append(date)
+ *         if isscalar:
+ *             return dates[0]             # <<<<<<<<<<<<<<
+ *         else:
+ *             return dates
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_dates, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_r = __pyx_t_1;
+      __pyx_t_1 = 0;
+      goto __pyx_L0;
+    }
+    /*else*/ {
+
+      /* "utils.pyx":255
+ *             return dates[0]
+ *         else:
+ *             return dates             # <<<<<<<<<<<<<<
+ *     else: # if only second accuracy required, can use other calendars.
+ *         cdftime = netcdftime.utime(units,calendar=calendar)
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __Pyx_INCREF(__pyx_v_dates);
+      __pyx_r = __pyx_v_dates;
+      goto __pyx_L0;
+    }
+  }
+  /*else*/ {
+
+    /* "utils.pyx":257
+ *             return dates
+ *     else: # if only second accuracy required, can use other calendars.
+ *         cdftime = netcdftime.utime(units,calendar=calendar)             # <<<<<<<<<<<<<<
+ *         return cdftime.num2date(times)
+ * 
+ */
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_utime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_units);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_units);
+    __Pyx_GIVEREF(__pyx_v_units);
+    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_calendar, __pyx_v_calendar) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_v_cdftime = __pyx_t_4;
+    __pyx_t_4 = 0;
+
+    /* "utils.pyx":258
+ *     else: # if only second accuracy required, can use other calendars.
+ *         cdftime = netcdftime.utime(units,calendar=calendar)
+ *         return cdftime.num2date(times)             # <<<<<<<<<<<<<<
+ * 
+ * def date2index(dates, nctime, calendar=None, select='exact'):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdftime, __pyx_n_s_num2date); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_1 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_1)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_1);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (!__pyx_t_1) {
+      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_times); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+    } else {
+      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+      __Pyx_INCREF(__pyx_v_times);
+      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_times);
+      __Pyx_GIVEREF(__pyx_v_times);
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_4;
+    __pyx_t_4 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "utils.pyx":168
+ *         return cdftime.date2num(dates)
+ * 
+ * def num2date(times,units,calendar='standard'):             # <<<<<<<<<<<<<<
+ *     """
+ * num2date(times,units,calendar='standard')
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_AddTraceback("netCDF4.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_unit);
+  __Pyx_XDECREF(__pyx_v_basedate);
+  __Pyx_XDECREF(__pyx_v_tzutc);
+  __Pyx_XDECREF(__pyx_v_msg);
+  __Pyx_XDECREF(__pyx_v_mask);
+  __Pyx_XDECREF(__pyx_v_dates);
+  __Pyx_XDECREF(__pyx_v_time);
+  __Pyx_XDECREF(__pyx_v_tsecs);
+  __Pyx_XDECREF(__pyx_v_days);
+  __Pyx_XDECREF(__pyx_v_msecsd);
+  __Pyx_XDECREF(__pyx_v_secs);
+  __Pyx_XDECREF(__pyx_v_msecs);
+  __Pyx_XDECREF(__pyx_v_td);
+  __Pyx_XDECREF(__pyx_v_date);
+  __Pyx_XDECREF(__pyx_v_cdftime);
+  __Pyx_XDECREF(__pyx_v_times);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":260
+ *         return cdftime.num2date(times)
+ * 
+ * def date2index(dates, nctime, calendar=None, select='exact'):             # <<<<<<<<<<<<<<
+ *     """
+ * date2index(dates, nctime, calendar=None, select='exact')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_13date2index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_12date2index[] = "\ndate2index(dates, nctime, calendar=None, select='exact')\n\nReturn indices of a netCDF time variable corresponding to the given dates.\n\n at param dates: A datetime object or a sequence of datetime objects.\nThe datetime objects should not include a time-zone offset.\n\n at param nctime: A netCDF time variable object. The nctime object must have a\nC{units} attribute.\n\n at keyword calendar: Describes the calendar used in the time calculation.\ [...]
+static PyMethodDef __pyx_mdef_7netCDF4_13date2index = {"date2index", (PyCFunction)__pyx_pw_7netCDF4_13date2index, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_12date2index};
+static PyObject *__pyx_pw_7netCDF4_13date2index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_dates = 0;
+  PyObject *__pyx_v_nctime = 0;
+  PyObject *__pyx_v_calendar = 0;
+  PyObject *__pyx_v_select = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("date2index (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dates,&__pyx_n_s_nctime,&__pyx_n_s_calendar,&__pyx_n_s_select,0};
+    PyObject* values[4] = {0,0,0,0};
+    values[2] = ((PyObject *)Py_None);
+    values[3] = ((PyObject *)__pyx_n_s_exact);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dates)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nctime)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("date2index", 0, 2, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_calendar);
+          if (value) { values[2] = value; kw_args--; }
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_select);
+          if (value) { values[3] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date2index") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_dates = values[0];
+    __pyx_v_nctime = values[1];
+    __pyx_v_calendar = values[2];
+    __pyx_v_select = values[3];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("date2index", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.date2index", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_12date2index(__pyx_self, __pyx_v_dates, __pyx_v_nctime, __pyx_v_calendar, __pyx_v_select);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_12date2index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dates, PyObject *__pyx_v_nctime, PyObject *__pyx_v_calendar, PyObject *__pyx_v_select) {
+  PyObject *__pyx_v_unit = NULL;
+  PyObject *__pyx_v_basedate = NULL;
+  PyObject *__pyx_v_tzutc = NULL;
+  PyObject *__pyx_v_msg = NULL;
+  PyObject *__pyx_v_times = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  int __pyx_t_6;
+  PyObject *__pyx_t_7 = NULL;
+  int __pyx_t_8;
+  int __pyx_t_9;
+  Py_ssize_t __pyx_t_10;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("date2index", 0);
+  __Pyx_INCREF(__pyx_v_calendar);
+
+  /* "utils.pyx":289
+ * to the given datetime object(s).
+ *     """
+ *     unit = nctime.units.split()[0].lower()             # <<<<<<<<<<<<<<
+ *     if calendar == None:
+ *         calendar = getattr(nctime, 'calendar', 'standard')
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_4, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_4) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_unit = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "utils.pyx":290
+ *     """
+ *     unit = nctime.units.split()[0].lower()
+ *     if calendar == None:             # <<<<<<<<<<<<<<
+ *         calendar = getattr(nctime, 'calendar', 'standard')
+ *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:
+ */
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_calendar, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_5) {
+
+    /* "utils.pyx":291
+ *     unit = nctime.units.split()[0].lower()
+ *     if calendar == None:
+ *         calendar = getattr(nctime, 'calendar', 'standard')             # <<<<<<<<<<<<<<
+ *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:
+ *         # for microsecond and/or millisecond accuracy, convert dates
+ */
+    __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_nctime, __pyx_n_s_calendar, __pyx_n_s_standard); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF_SET(__pyx_v_calendar, __pyx_t_1);
+    __pyx_t_1 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "utils.pyx":292
+ *     if calendar == None:
+ *         calendar = getattr(nctime, 'calendar', 'standard')
+ *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:             # <<<<<<<<<<<<<<
+ *         # for microsecond and/or millisecond accuracy, convert dates
+ *         # to numerical times, then use netcdftime.time2index.
+ */
+  __Pyx_INCREF(__pyx_v_unit);
+  __pyx_t_1 = __pyx_v_unit;
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_microseconds, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_6) {
+  } else {
+    __pyx_t_5 = __pyx_t_6;
+    goto __pyx_L5_bool_binop_done;
+  }
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_milliseconds, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_6) {
+  } else {
+    __pyx_t_5 = __pyx_t_6;
+    goto __pyx_L5_bool_binop_done;
+  }
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_microsecond, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_6) {
+  } else {
+    __pyx_t_5 = __pyx_t_6;
+    goto __pyx_L5_bool_binop_done;
+  }
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_millisecond, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __pyx_t_6;
+  __pyx_L5_bool_binop_done:;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_6 = (__pyx_t_5 != 0);
+  if (__pyx_t_6) {
+
+    /* "utils.pyx":295
+ *         # for microsecond and/or millisecond accuracy, convert dates
+ *         # to numerical times, then use netcdftime.time2index.
+ *         basedate = _dateparse(nctime.units)             # <<<<<<<<<<<<<<
+ *         from dateutil.tz import tzutc
+ *         # can only use certain calendars.
+ */
+    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_3 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+      if (likely(__pyx_t_3)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+        __Pyx_INCREF(__pyx_t_3);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_2, function);
+      }
+    }
+    if (!__pyx_t_3) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
+      __Pyx_GIVEREF(__pyx_t_4);
+      __pyx_t_4 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_v_basedate = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "utils.pyx":296
+ *         # to numerical times, then use netcdftime.time2index.
+ *         basedate = _dateparse(nctime.units)
+ *         from dateutil.tz import tzutc             # <<<<<<<<<<<<<<
+ *         # can only use certain calendars.
+ *         if calendar != 'proleptic_gregorian' and not \
+ */
+    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_n_s_tzutc);
+    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_tzutc);
+    __Pyx_GIVEREF(__pyx_n_s_tzutc);
+    __pyx_t_2 = __Pyx_Import(__pyx_n_s_dateutil_tz, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_tzutc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_t_1);
+    __pyx_v_tzutc = __pyx_t_1;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+    /* "utils.pyx":298
+ *         from dateutil.tz import tzutc
+ *         # can only use certain calendars.
+ *         if calendar != 'proleptic_gregorian' and not \             # <<<<<<<<<<<<<<
+ *            (calendar in ['gregorian','standard'] and \
+ *             basedate > gregorian.replace(tzinfo=tzutc())):
+ */
+    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_5) {
+    } else {
+      __pyx_t_6 = __pyx_t_5;
+      goto __pyx_L10_bool_binop_done;
+    }
+
+    /* "utils.pyx":299
+ *         # can only use certain calendars.
+ *         if calendar != 'proleptic_gregorian' and not \
+ *            (calendar in ['gregorian','standard'] and \             # <<<<<<<<<<<<<<
+ *             basedate > gregorian.replace(tzinfo=tzutc())):
+ *             msg = 'milliseconds/microseconds not supported for this calendar'
+ */
+    __Pyx_INCREF(__pyx_v_calendar);
+    __pyx_t_2 = __pyx_v_calendar;
+    __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!__pyx_t_9) {
+    } else {
+      __pyx_t_8 = __pyx_t_9;
+      goto __pyx_L14_bool_binop_done;
+    }
+    __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = __pyx_t_9;
+    __pyx_L14_bool_binop_done:;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_9 = (__pyx_t_8 != 0);
+    if (__pyx_t_9) {
+    } else {
+      __pyx_t_5 = __pyx_t_9;
+      goto __pyx_L12_bool_binop_done;
+    }
+
+    /* "utils.pyx":300
+ *         if calendar != 'proleptic_gregorian' and not \
+ *            (calendar in ['gregorian','standard'] and \
+ *             basedate > gregorian.replace(tzinfo=tzutc())):             # <<<<<<<<<<<<<<
+ *             msg = 'milliseconds/microseconds not supported for this calendar'
+ *             raise ValueError(msg)
+ */
+    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_v_tzutc);
+    __pyx_t_4 = __pyx_v_tzutc; __pyx_t_3 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_3)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_3);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (__pyx_t_3) {
+      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    } else {
+      __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_tzinfo, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyObject_RichCompare(__pyx_v_basedate, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_5 = __pyx_t_9;
+    __pyx_L12_bool_binop_done:;
+
+    /* "utils.pyx":298
+ *         from dateutil.tz import tzutc
+ *         # can only use certain calendars.
+ *         if calendar != 'proleptic_gregorian' and not \             # <<<<<<<<<<<<<<
+ *            (calendar in ['gregorian','standard'] and \
+ *             basedate > gregorian.replace(tzinfo=tzutc())):
+ */
+    __pyx_t_9 = ((!__pyx_t_5) != 0);
+    __pyx_t_6 = __pyx_t_9;
+    __pyx_L10_bool_binop_done:;
+    if (__pyx_t_6) {
+
+      /* "utils.pyx":301
+ *            (calendar in ['gregorian','standard'] and \
+ *             basedate > gregorian.replace(tzinfo=tzutc())):
+ *             msg = 'milliseconds/microseconds not supported for this calendar'             # <<<<<<<<<<<<<<
+ *             raise ValueError(msg)
+ *         times = date2num(dates,nctime.units,calendar=calendar)
+ */
+      __Pyx_INCREF(__pyx_kp_s_milliseconds_microseconds_not_su);
+      __pyx_v_msg = __pyx_kp_s_milliseconds_microseconds_not_su;
+
+      /* "utils.pyx":302
+ *             basedate > gregorian.replace(tzinfo=tzutc())):
+ *             msg = 'milliseconds/microseconds not supported for this calendar'
+ *             raise ValueError(msg)             # <<<<<<<<<<<<<<
+ *         times = date2num(dates,nctime.units,calendar=calendar)
+ *         return netcdftime.time2index(times, nctime, calendar, select)
+ */
+      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_v_msg);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg);
+      __Pyx_GIVEREF(__pyx_v_msg);
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "utils.pyx":303
+ *             msg = 'milliseconds/microseconds not supported for this calendar'
+ *             raise ValueError(msg)
+ *         times = date2num(dates,nctime.units,calendar=calendar)             # <<<<<<<<<<<<<<
+ *         return netcdftime.time2index(times, nctime, calendar, select)
+ *     else: # if only second accuracy required, can use other calendars.
+ */
+    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_dates);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dates);
+    __Pyx_GIVEREF(__pyx_v_dates);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __pyx_t_2 = 0;
+    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_calendar, __pyx_v_calendar) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_v_times = __pyx_t_4;
+    __pyx_t_4 = 0;
+
+    /* "utils.pyx":304
+ *             raise ValueError(msg)
+ *         times = date2num(dates,nctime.units,calendar=calendar)
+ *         return netcdftime.time2index(times, nctime, calendar, select)             # <<<<<<<<<<<<<<
+ *     else: # if only second accuracy required, can use other calendars.
+ *         return netcdftime.date2index(dates, nctime, calendar, select)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time2index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = NULL;
+    __pyx_t_10 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+      if (likely(__pyx_t_2)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+        __Pyx_INCREF(__pyx_t_2);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_1, function);
+        __pyx_t_10 = 1;
+      }
+    }
+    __pyx_t_7 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    if (__pyx_t_2) {
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_times);
+    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_10, __pyx_v_times);
+    __Pyx_GIVEREF(__pyx_v_times);
+    __Pyx_INCREF(__pyx_v_nctime);
+    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_10, __pyx_v_nctime);
+    __Pyx_GIVEREF(__pyx_v_nctime);
+    __Pyx_INCREF(__pyx_v_calendar);
+    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_10, __pyx_v_calendar);
+    __Pyx_GIVEREF(__pyx_v_calendar);
+    __Pyx_INCREF(__pyx_v_select);
+    PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_10, __pyx_v_select);
+    __Pyx_GIVEREF(__pyx_v_select);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_r = __pyx_t_4;
+    __pyx_t_4 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "utils.pyx":306
+ *         return netcdftime.time2index(times, nctime, calendar, select)
+ *     else: # if only second accuracy required, can use other calendars.
+ *         return netcdftime.date2index(dates, nctime, calendar, select)             # <<<<<<<<<<<<<<
+ * 
+ * def getlibversion():
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_date2index); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = NULL;
+    __pyx_t_10 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
+      if (likely(__pyx_t_1)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+        __Pyx_INCREF(__pyx_t_1);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_7, function);
+        __pyx_t_10 = 1;
+      }
+    }
+    __pyx_t_2 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    if (__pyx_t_1) {
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_dates);
+    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_10, __pyx_v_dates);
+    __Pyx_GIVEREF(__pyx_v_dates);
+    __Pyx_INCREF(__pyx_v_nctime);
+    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_10, __pyx_v_nctime);
+    __Pyx_GIVEREF(__pyx_v_nctime);
+    __Pyx_INCREF(__pyx_v_calendar);
+    PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_10, __pyx_v_calendar);
+    __Pyx_GIVEREF(__pyx_v_calendar);
+    __Pyx_INCREF(__pyx_v_select);
+    PyTuple_SET_ITEM(__pyx_t_2, 3+__pyx_t_10, __pyx_v_select);
+    __Pyx_GIVEREF(__pyx_v_select);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_r = __pyx_t_4;
+    __pyx_t_4 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "utils.pyx":260
+ *         return cdftime.num2date(times)
+ * 
+ * def date2index(dates, nctime, calendar=None, select='exact'):             # <<<<<<<<<<<<<<
+ *     """
+ * date2index(dates, nctime, calendar=None, select='exact')
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_AddTraceback("netCDF4.date2index", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_unit);
+  __Pyx_XDECREF(__pyx_v_basedate);
+  __Pyx_XDECREF(__pyx_v_tzutc);
+  __Pyx_XDECREF(__pyx_v_msg);
+  __Pyx_XDECREF(__pyx_v_times);
+  __Pyx_XDECREF(__pyx_v_calendar);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":308
+ *         return netcdftime.date2index(dates, nctime, calendar, select)
+ * 
+ * def getlibversion():             # <<<<<<<<<<<<<<
+ *     """
+ * getlibversion()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_15getlibversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_14getlibversion[] = "\ngetlibversion()\n\nreturns a string describing the version of the netcdf library\nused to build the module, and when it was built.\n    ";
+static PyMethodDef __pyx_mdef_7netCDF4_15getlibversion = {"getlibversion", (PyCFunction)__pyx_pw_7netCDF4_15getlibversion, METH_NOARGS, __pyx_doc_7netCDF4_14getlibversion};
+static PyObject *__pyx_pw_7netCDF4_15getlibversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("getlibversion (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_14getlibversion(__pyx_self);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_14getlibversion(CYTHON_UNUSED PyObject *__pyx_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  char *__pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("getlibversion", 0);
+
+  /* "utils.pyx":315
+ * used to build the module, and when it was built.
+ *     """
+ *     return (<char *>nc_inq_libvers()).decode('ascii')             # <<<<<<<<<<<<<<
+ * 
+ * class MFDataset(Dataset):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = ((char *)nc_inq_libvers());
+  __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "utils.pyx":308
+ *         return netcdftime.date2index(dates, nctime, calendar, select)
+ * 
+ * def getlibversion():             # <<<<<<<<<<<<<<
+ *     """
+ * getlibversion()
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("netCDF4.getlibversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":349
+ *     """
+ * 
+ *     def __init__(self, files, check=False, aggdim=None, exclude=[]):             # <<<<<<<<<<<<<<
+ *         """
+ * Open a Dataset spanning multiple files, making it look as if it was a
+ */
+
+static PyObject *__pyx_pf_7netCDF4_9MFDataset_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__defaults__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(((PyObject *)Py_False));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_False));
+  __Pyx_GIVEREF(((PyObject *)Py_False));
+  __Pyx_INCREF(((PyObject *)Py_None));
+  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_None));
+  __Pyx_GIVEREF(((PyObject *)Py_None));
+  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_exclude);
+  PyTuple_SET_ITEM(__pyx_t_1, 2, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_exclude);
+  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_exclude);
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __Pyx_INCREF(Py_None);
+  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __pyx_t_1 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("netCDF4.MFDataset.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9MFDataset_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_9MFDataset___init__[] = "\nOpen a Dataset spanning multiple files, making it look as if it was a \nsingle file. Variables in the list of files that share the same \ndimension (specified with the keyword C{aggdim}) are aggregated. If\nC{aggdim} is not specified, the unlimited is aggregated.  Currently,\nC{aggdim} must be the leftmost (slowest varying) dimension of each\nof the variables to be aggregated.\n\nAdapted from U{pycdf <http://pysclint.sourceforge.n [...]
+static PyMethodDef __pyx_mdef_7netCDF4_9MFDataset_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7netCDF4_9MFDataset_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_9MFDataset___init__};
+static PyObject *__pyx_pw_7netCDF4_9MFDataset_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_self = 0;
+  PyObject *__pyx_v_files = 0;
+  PyObject *__pyx_v_check = 0;
+  PyObject *__pyx_v_aggdim = 0;
+  PyObject *__pyx_v_exclude = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_files,&__pyx_n_s_check,&__pyx_n_s_aggdim,&__pyx_n_s_exclude,0};
+    PyObject* values[5] = {0,0,0,0,0};
+    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
+    values[2] = ((PyObject *)((PyObject *)Py_False));
+    values[3] = ((PyObject *)((PyObject *)Py_None));
+    values[4] = __pyx_dynamic_args->__pyx_arg_exclude;
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_files)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_check);
+          if (value) { values[2] = value; kw_args--; }
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_aggdim);
+          if (value) { values[3] = value; kw_args--; }
+        }
+        case  4:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exclude);
+          if (value) { values[4] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_self = values[0];
+    __pyx_v_files = values[1];
+    __pyx_v_check = values[2];
+    __pyx_v_aggdim = values[3];
+    __pyx_v_exclude = values[4];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.MFDataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_9MFDataset___init__(__pyx_self, __pyx_v_self, __pyx_v_files, __pyx_v_check, __pyx_v_aggdim, __pyx_v_exclude);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9MFDataset___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_files, PyObject *__pyx_v_check, PyObject *__pyx_v_aggdim, PyObject *__pyx_v_exclude) {
+  PyObject *__pyx_v_msg = NULL;
+  PyObject *__pyx_v_master = NULL;
+  struct __pyx_obj_7netCDF4_Dataset *__pyx_v_cdfm = NULL;
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_v_value = NULL;
+  PyObject *__pyx_v_aggDimId = NULL;
+  PyObject *__pyx_v_dimname = NULL;
+  PyObject *__pyx_v_dim = NULL;
+  PyObject *__pyx_v_aggDimName = NULL;
+  PyObject *__pyx_v_masterRecVar = NULL;
+  PyObject *__pyx_v_vName = NULL;
+  PyObject *__pyx_v_v = NULL;
+  PyObject *__pyx_v_dims = NULL;
+  PyObject *__pyx_v_shape = NULL;
+  PyObject *__pyx_v_dtype = NULL;
+  PyObject *__pyx_v_cdf = NULL;
+  PyObject *__pyx_v_cdfVLen = NULL;
+  PyObject *__pyx_v_cdfRecVar = NULL;
+  PyObject *__pyx_v_f = NULL;
+  struct __pyx_obj_7netCDF4_Dataset *__pyx_v_part = NULL;
+  PyObject *__pyx_v_varInfo = NULL;
+  PyObject *__pyx_v_masterDims = NULL;
+  PyObject *__pyx_v_masterShape = NULL;
+  PyObject *__pyx_v_masterType = NULL;
+  PyObject *__pyx_v_extDims = NULL;
+  PyObject *__pyx_v_extShape = NULL;
+  PyObject *__pyx_v_extType = NULL;
+  PyObject *__pyx_v_vInst = NULL;
+  PyObject *__pyx_v_varname = NULL;
+  PyObject *__pyx_v_var = NULL;
+  PyObject *__pyx_v_dset = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  int __pyx_t_8;
+  Py_ssize_t __pyx_t_9;
+  PyObject *(*__pyx_t_10)(PyObject *);
+  PyObject *(*__pyx_t_11)(PyObject *);
+  Py_ssize_t __pyx_t_12;
+  PyObject *(*__pyx_t_13)(PyObject *);
+  PyObject *__pyx_t_14 = NULL;
+  PyObject *__pyx_t_15 = NULL;
+  Py_ssize_t __pyx_t_16;
+  Py_ssize_t __pyx_t_17;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_INCREF(__pyx_v_files);
+
+  /* "utils.pyx":386
+ *         # Open the master file in the base class, so that the CDFMF instance
+ *         # can be used like a CDF instance.
+ *         if isinstance(files, str):             # <<<<<<<<<<<<<<
+ *             if files.startswith('http'):
+ *                 msg='cannot using file globbing for remote (OPeNDAP) datasets'
+ */
+  __pyx_t_1 = PyString_Check(__pyx_v_files); 
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "utils.pyx":387
+ *         # can be used like a CDF instance.
+ *         if isinstance(files, str):
+ *             if files.startswith('http'):             # <<<<<<<<<<<<<<
+ *                 msg='cannot using file globbing for remote (OPeNDAP) datasets'
+ *                 raise ValueError(msg)
+ */
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_files, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_2) {
+
+      /* "utils.pyx":388
+ *         if isinstance(files, str):
+ *             if files.startswith('http'):
+ *                 msg='cannot using file globbing for remote (OPeNDAP) datasets'             # <<<<<<<<<<<<<<
+ *                 raise ValueError(msg)
+ *             else:
+ */
+      __Pyx_INCREF(__pyx_kp_s_cannot_using_file_globbing_for_r);
+      __pyx_v_msg = __pyx_kp_s_cannot_using_file_globbing_for_r;
+
+      /* "utils.pyx":389
+ *             if files.startswith('http'):
+ *                 msg='cannot using file globbing for remote (OPeNDAP) datasets'
+ *                 raise ValueError(msg)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 files = sorted(glob(files))
+ */
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_v_msg);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_msg);
+      __Pyx_GIVEREF(__pyx_v_msg);
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    /*else*/ {
+
+      /* "utils.pyx":391
+ *                 raise ValueError(msg)
+ *             else:
+ *                 files = sorted(glob(files))             # <<<<<<<<<<<<<<
+ * 
+ *         master = files[0]
+ */
+      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_glob); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_6 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+        if (likely(__pyx_t_6)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+          __Pyx_INCREF(__pyx_t_6);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_5, function);
+        }
+      }
+      if (!__pyx_t_6) {
+        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_files); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+      } else {
+        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+        __Pyx_INCREF(__pyx_v_files);
+        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_files);
+        __Pyx_GIVEREF(__pyx_v_files);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_3 = ((PyObject*)__pyx_t_5);
+      __pyx_t_5 = 0;
+      __pyx_t_8 = PyList_Sort(__pyx_t_3); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF_SET(__pyx_v_files, __pyx_t_3);
+      __pyx_t_3 = 0;
+    }
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "utils.pyx":393
+ *                 files = sorted(glob(files))
+ * 
+ *         master = files[0]             # <<<<<<<<<<<<<<
+ * 
+ *         # Open the master again, this time as a classic CDF instance. This will avoid
+ */
+  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_files, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_master = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "utils.pyx":397
+ *         # Open the master again, this time as a classic CDF instance. This will avoid
+ *         # calling methods of the CDFMF subclass when querying the master file.
+ *         cdfm = Dataset(master)             # <<<<<<<<<<<<<<
+ *         # copy attributes from master.
+ *         for name, value in cdfm.__dict__.items():
+ */
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_INCREF(__pyx_v_master);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_master);
+  __Pyx_GIVEREF(__pyx_v_master);
+  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dataset)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_v_cdfm = ((struct __pyx_obj_7netCDF4_Dataset *)__pyx_t_5);
+  __pyx_t_5 = 0;
+
+  /* "utils.pyx":399
+ *         cdfm = Dataset(master)
+ *         # copy attributes from master.
+ *         for name, value in cdfm.__dict__.items():             # <<<<<<<<<<<<<<
+ *             self.__dict__[name] = value
+ * 
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cdfm), __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_4, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
+    __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
+    __pyx_t_10 = NULL;
+  } else {
+    __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_10)) {
+      if (likely(PyList_CheckExact(__pyx_t_4))) {
+        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_5 = __pyx_t_10(__pyx_t_4);
+      if (unlikely(!__pyx_t_5)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_5);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
+      PyObject* sequence = __pyx_t_5;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
+      } else {
+        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
+      }
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_7);
+      #else
+      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      #endif
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext;
+      index = 0; __pyx_t_3 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_3);
+      index = 1; __pyx_t_7 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L7_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_7);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = NULL;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      goto __pyx_L8_unpacking_done;
+      __pyx_L7_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_11 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L8_unpacking_done:;
+    }
+    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
+    __pyx_t_3 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
+    __pyx_t_7 = 0;
+
+    /* "utils.pyx":400
+ *         # copy attributes from master.
+ *         for name, value in cdfm.__dict__.items():
+ *             self.__dict__[name] = value             # <<<<<<<<<<<<<<
+ * 
+ *         # Make sure the master defines a dim with name aggdim,
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_name, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+    /* "utils.pyx":399
+ *         cdfm = Dataset(master)
+ *         # copy attributes from master.
+ *         for name, value in cdfm.__dict__.items():             # <<<<<<<<<<<<<<
+ *             self.__dict__[name] = value
+ * 
+ */
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "utils.pyx":404
+ *         # Make sure the master defines a dim with name aggdim,
+ *         # or an unlimited dimension.
+ *         aggDimId = None             # <<<<<<<<<<<<<<
+ *         for dimname,dim in cdfm.dimensions.items():
+ *             if aggdim is None:
+ */
+  __Pyx_INCREF(Py_None);
+  __pyx_v_aggDimId = Py_None;
+
+  /* "utils.pyx":405
+ *         # or an unlimited dimension.
+ *         aggDimId = None
+ *         for dimname,dim in cdfm.dimensions.items():             # <<<<<<<<<<<<<<
+ *             if aggdim is None:
+ *                 if dim.isunlimited():
+ */
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdfm->dimensions, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_7 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
+    if (likely(__pyx_t_7)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_7);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_5, function);
+    }
+  }
+  if (__pyx_t_7) {
+    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  } else {
+    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
+    __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_9 = 0;
+    __pyx_t_10 = NULL;
+  } else {
+    __pyx_t_9 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_10)) {
+      if (likely(PyList_CheckExact(__pyx_t_5))) {
+        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_5)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_4 = __pyx_t_10(__pyx_t_5);
+      if (unlikely(!__pyx_t_4)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_4);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+      PyObject* sequence = __pyx_t_4;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
+      } else {
+        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
+      }
+      __Pyx_INCREF(__pyx_t_7);
+      __Pyx_INCREF(__pyx_t_3);
+      #else
+      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      #endif
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext;
+      index = 0; __pyx_t_7 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L11_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_7);
+      index = 1; __pyx_t_3 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L11_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_3);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = NULL;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      goto __pyx_L12_unpacking_done;
+      __pyx_L11_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_11 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L12_unpacking_done:;
+    }
+    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_7);
+    __pyx_t_7 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_3);
+    __pyx_t_3 = 0;
+
+    /* "utils.pyx":406
+ *         aggDimId = None
+ *         for dimname,dim in cdfm.dimensions.items():
+ *             if aggdim is None:             # <<<<<<<<<<<<<<
+ *                 if dim.isunlimited():
+ *                     aggDimId = dim
+ */
+    __pyx_t_2 = (__pyx_v_aggdim == Py_None);
+    __pyx_t_1 = (__pyx_t_2 != 0);
+    if (__pyx_t_1) {
+
+      /* "utils.pyx":407
+ *         for dimname,dim in cdfm.dimensions.items():
+ *             if aggdim is None:
+ *                 if dim.isunlimited():             # <<<<<<<<<<<<<<
+ *                     aggDimId = dim
+ *                     aggDimName = dimname
+ */
+      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_7 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+        if (likely(__pyx_t_7)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+          __Pyx_INCREF(__pyx_t_7);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_3, function);
+        }
+      }
+      if (__pyx_t_7) {
+        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      } else {
+        __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (__pyx_t_1) {
+
+        /* "utils.pyx":408
+ *             if aggdim is None:
+ *                 if dim.isunlimited():
+ *                     aggDimId = dim             # <<<<<<<<<<<<<<
+ *                     aggDimName = dimname
+ *             else:
+ */
+        __Pyx_INCREF(__pyx_v_dim);
+        __Pyx_DECREF_SET(__pyx_v_aggDimId, __pyx_v_dim);
+
+        /* "utils.pyx":409
+ *                 if dim.isunlimited():
+ *                     aggDimId = dim
+ *                     aggDimName = dimname             # <<<<<<<<<<<<<<
+ *             else:
+ *                 if dimname == aggdim:
+ */
+        __Pyx_INCREF(__pyx_v_dimname);
+        __Pyx_XDECREF_SET(__pyx_v_aggDimName, __pyx_v_dimname);
+        goto __pyx_L14;
+      }
+      __pyx_L14:;
+      goto __pyx_L13;
+    }
+    /*else*/ {
+
+      /* "utils.pyx":411
+ *                     aggDimName = dimname
+ *             else:
+ *                 if dimname == aggdim:             # <<<<<<<<<<<<<<
+ *                     aggDimId = dim
+ *                     aggDimName = dimname
+ */
+      __pyx_t_4 = PyObject_RichCompare(__pyx_v_dimname, __pyx_v_aggdim, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (__pyx_t_1) {
+
+        /* "utils.pyx":412
+ *             else:
+ *                 if dimname == aggdim:
+ *                     aggDimId = dim             # <<<<<<<<<<<<<<
+ *                     aggDimName = dimname
+ *         if aggDimId is None:
+ */
+        __Pyx_INCREF(__pyx_v_dim);
+        __Pyx_DECREF_SET(__pyx_v_aggDimId, __pyx_v_dim);
+
+        /* "utils.pyx":413
+ *                 if dimname == aggdim:
+ *                     aggDimId = dim
+ *                     aggDimName = dimname             # <<<<<<<<<<<<<<
+ *         if aggDimId is None:
+ *             raise IOError("master dataset %s does not have a aggregation dimension" % master)
+ */
+        __Pyx_INCREF(__pyx_v_dimname);
+        __Pyx_XDECREF_SET(__pyx_v_aggDimName, __pyx_v_dimname);
+        goto __pyx_L15;
+      }
+      __pyx_L15:;
+    }
+    __pyx_L13:;
+
+    /* "utils.pyx":405
+ *         # or an unlimited dimension.
+ *         aggDimId = None
+ *         for dimname,dim in cdfm.dimensions.items():             # <<<<<<<<<<<<<<
+ *             if aggdim is None:
+ *                 if dim.isunlimited():
+ */
+  }
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+  /* "utils.pyx":414
+ *                     aggDimId = dim
+ *                     aggDimName = dimname
+ *         if aggDimId is None:             # <<<<<<<<<<<<<<
+ *             raise IOError("master dataset %s does not have a aggregation dimension" % master)
+ * 
+ */
+  __pyx_t_1 = (__pyx_v_aggDimId == Py_None);
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "utils.pyx":415
+ *                     aggDimName = dimname
+ *         if aggDimId is None:
+ *             raise IOError("master dataset %s does not have a aggregation dimension" % master)             # <<<<<<<<<<<<<<
+ * 
+ *         # Get info on all aggregation variables defined in the master.
+ */
+    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_master_dataset_s_does_not_have_a, __pyx_v_master); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
+    __pyx_t_5 = 0;
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "utils.pyx":419
+ *         # Get info on all aggregation variables defined in the master.
+ *         # Make sure the master defines at least one aggregation variable.
+ *         masterRecVar = {}             # <<<<<<<<<<<<<<
+ *         for vName,v in cdfm.variables.items():
+ *             # skip variables specified in exclude list.
+ */
+  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_v_masterRecVar = ((PyObject*)__pyx_t_5);
+  __pyx_t_5 = 0;
+
+  /* "utils.pyx":420
+ *         # Make sure the master defines at least one aggregation variable.
+ *         masterRecVar = {}
+ *         for vName,v in cdfm.variables.items():             # <<<<<<<<<<<<<<
+ *             # skip variables specified in exclude list.
+ *             if vName in exclude: continue
+ */
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdfm->variables, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_4, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
+    __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
+    __pyx_t_10 = NULL;
+  } else {
+    __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_10)) {
+      if (likely(PyList_CheckExact(__pyx_t_4))) {
+        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_5 = __pyx_t_10(__pyx_t_4);
+      if (unlikely(!__pyx_t_5)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_5);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
+      PyObject* sequence = __pyx_t_5;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
+      } else {
+        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
+      }
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_7);
+      #else
+      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      #endif
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext;
+      index = 0; __pyx_t_3 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L19_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_3);
+      index = 1; __pyx_t_7 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L19_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_7);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = NULL;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      goto __pyx_L20_unpacking_done;
+      __pyx_L19_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_11 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L20_unpacking_done:;
+    }
+    __Pyx_XDECREF_SET(__pyx_v_vName, __pyx_t_3);
+    __pyx_t_3 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
+    __pyx_t_7 = 0;
+
+    /* "utils.pyx":422
+ *         for vName,v in cdfm.variables.items():
+ *             # skip variables specified in exclude list.
+ *             if vName in exclude: continue             # <<<<<<<<<<<<<<
+ *             dims = v.dimensions
+ *             shape = v.shape
+ */
+    __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_vName, __pyx_v_exclude, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = (__pyx_t_2 != 0);
+    if (__pyx_t_1) {
+      goto __pyx_L17_continue;
+    }
+
+    /* "utils.pyx":423
+ *             # skip variables specified in exclude list.
+ *             if vName in exclude: continue
+ *             dims = v.dimensions             # <<<<<<<<<<<<<<
+ *             shape = v.shape
+ *             dtype = v.dtype
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_XDECREF_SET(__pyx_v_dims, __pyx_t_5);
+    __pyx_t_5 = 0;
+
+    /* "utils.pyx":424
+ *             if vName in exclude: continue
+ *             dims = v.dimensions
+ *             shape = v.shape             # <<<<<<<<<<<<<<
+ *             dtype = v.dtype
+ *             # Be carefull: we may deal with a scalar (dimensionless) variable.
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_XDECREF_SET(__pyx_v_shape, __pyx_t_5);
+    __pyx_t_5 = 0;
+
+    /* "utils.pyx":425
+ *             dims = v.dimensions
+ *             shape = v.shape
+ *             dtype = v.dtype             # <<<<<<<<<<<<<<
+ *             # Be carefull: we may deal with a scalar (dimensionless) variable.
+ *             # Unlimited dimension always occupies index 0.
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_XDECREF_SET(__pyx_v_dtype, __pyx_t_5);
+    __pyx_t_5 = 0;
+
+    /* "utils.pyx":428
+ *             # Be carefull: we may deal with a scalar (dimensionless) variable.
+ *             # Unlimited dimension always occupies index 0.
+ *             if (len(dims) > 0 and aggDimName == dims[0]):             # <<<<<<<<<<<<<<
+ *                 masterRecVar[vName] = (dims, shape, dtype)
+ *         if len(masterRecVar) == 0:
+ */
+    __pyx_t_12 = PyObject_Length(__pyx_v_dims); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = ((__pyx_t_12 > 0) != 0);
+    if (__pyx_t_2) {
+    } else {
+      __pyx_t_1 = __pyx_t_2;
+      goto __pyx_L23_bool_binop_done;
+    }
+    if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_dims, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_7 = PyObject_RichCompare(__pyx_v_aggDimName, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_1 = __pyx_t_2;
+    __pyx_L23_bool_binop_done:;
+    if (__pyx_t_1) {
+
+      /* "utils.pyx":429
+ *             # Unlimited dimension always occupies index 0.
+ *             if (len(dims) > 0 and aggDimName == dims[0]):
+ *                 masterRecVar[vName] = (dims, shape, dtype)             # <<<<<<<<<<<<<<
+ *         if len(masterRecVar) == 0:
+ *             raise IOError("master dataset %s does not have any variables to aggregate" % master)
+ */
+      __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_INCREF(__pyx_v_dims);
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_dims);
+      __Pyx_GIVEREF(__pyx_v_dims);
+      __Pyx_INCREF(__pyx_v_shape);
+      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_shape);
+      __Pyx_GIVEREF(__pyx_v_shape);
+      __Pyx_INCREF(__pyx_v_dtype);
+      PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_dtype);
+      __Pyx_GIVEREF(__pyx_v_dtype);
+      if (unlikely(PyDict_SetItem(__pyx_v_masterRecVar, __pyx_v_vName, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      goto __pyx_L22;
+    }
+    __pyx_L22:;
+
+    /* "utils.pyx":420
+ *         # Make sure the master defines at least one aggregation variable.
+ *         masterRecVar = {}
+ *         for vName,v in cdfm.variables.items():             # <<<<<<<<<<<<<<
+ *             # skip variables specified in exclude list.
+ *             if vName in exclude: continue
+ */
+    __pyx_L17_continue:;
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "utils.pyx":430
+ *             if (len(dims) > 0 and aggDimName == dims[0]):
+ *                 masterRecVar[vName] = (dims, shape, dtype)
+ *         if len(masterRecVar) == 0:             # <<<<<<<<<<<<<<
+ *             raise IOError("master dataset %s does not have any variables to aggregate" % master)
+ * 
+ */
+  __pyx_t_9 = PyDict_Size(__pyx_v_masterRecVar); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = ((__pyx_t_9 == 0) != 0);
+  if (__pyx_t_1) {
+
+    /* "utils.pyx":431
+ *                 masterRecVar[vName] = (dims, shape, dtype)
+ *         if len(masterRecVar) == 0:
+ *             raise IOError("master dataset %s does not have any variables to aggregate" % master)             # <<<<<<<<<<<<<<
+ * 
+ *         # Create the following:
+ */
+    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_master_dataset_s_does_not_have_a_2, __pyx_v_master); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "utils.pyx":439
+ *         #             a list of the corresponding Variable instance, one for each
+ *         #             cdf file of the file set
+ *         cdf = [cdfm]             # <<<<<<<<<<<<<<
+ *         self._cdf = cdf        # Store this now, because dim() method needs it
+ *         cdfVLen = [len(aggDimId)]
+ */
+  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_INCREF(((PyObject *)__pyx_v_cdfm));
+  PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_cdfm));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_cdfm));
+  __pyx_v_cdf = ((PyObject*)__pyx_t_4);
+  __pyx_t_4 = 0;
+
+  /* "utils.pyx":440
+ *         #             cdf file of the file set
+ *         cdf = [cdfm]
+ *         self._cdf = cdf        # Store this now, because dim() method needs it             # <<<<<<<<<<<<<<
+ *         cdfVLen = [len(aggDimId)]
+ *         cdfRecVar = {}
+ */
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdf, __pyx_v_cdf) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":441
+ *         cdf = [cdfm]
+ *         self._cdf = cdf        # Store this now, because dim() method needs it
+ *         cdfVLen = [len(aggDimId)]             # <<<<<<<<<<<<<<
+ *         cdfRecVar = {}
+ *         for v in masterRecVar.keys():
+ */
+  __pyx_t_9 = PyObject_Length(__pyx_v_aggDimId); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  __pyx_t_4 = 0;
+  __pyx_v_cdfVLen = ((PyObject*)__pyx_t_7);
+  __pyx_t_7 = 0;
+
+  /* "utils.pyx":442
+ *         self._cdf = cdf        # Store this now, because dim() method needs it
+ *         cdfVLen = [len(aggDimId)]
+ *         cdfRecVar = {}             # <<<<<<<<<<<<<<
+ *         for v in masterRecVar.keys():
+ *             cdfRecVar[v] = [cdfm.variables[v]]
+ */
+  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_v_cdfRecVar = ((PyObject*)__pyx_t_7);
+  __pyx_t_7 = 0;
+
+  /* "utils.pyx":443
+ *         cdfVLen = [len(aggDimId)]
+ *         cdfRecVar = {}
+ *         for v in masterRecVar.keys():             # <<<<<<<<<<<<<<
+ *             cdfRecVar[v] = [cdfm.variables[v]]
+ * 
+ */
+  __pyx_t_7 = __Pyx_PyDict_Keys(__pyx_v_masterRecVar); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
+    __pyx_t_4 = __pyx_t_7; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
+    __pyx_t_10 = NULL;
+  } else {
+    __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_10)) {
+      if (likely(PyList_CheckExact(__pyx_t_4))) {
+        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_7 = __pyx_t_10(__pyx_t_4);
+      if (unlikely(!__pyx_t_7)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_7);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
+    __pyx_t_7 = 0;
+
+    /* "utils.pyx":444
+ *         cdfRecVar = {}
+ *         for v in masterRecVar.keys():
+ *             cdfRecVar[v] = [cdfm.variables[v]]             # <<<<<<<<<<<<<<
+ * 
+ *         # Open each remaining file in read-only mode.
+ */
+    __pyx_t_7 = PyObject_GetItem(__pyx_v_cdfm->variables, __pyx_v_v); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
+    __Pyx_GIVEREF(__pyx_t_7);
+    __pyx_t_7 = 0;
+    if (unlikely(PyDict_SetItem(__pyx_v_cdfRecVar, __pyx_v_v, __pyx_t_5) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+    /* "utils.pyx":443
+ *         cdfVLen = [len(aggDimId)]
+ *         cdfRecVar = {}
+ *         for v in masterRecVar.keys():             # <<<<<<<<<<<<<<
+ *             cdfRecVar[v] = [cdfm.variables[v]]
+ * 
+ */
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "utils.pyx":449
+ *         # Make sure each file defines the same aggregation variables as the master
+ *         # and that the variables are defined in the same way (name, shape and type)
+ *         for f in files[1:]:             # <<<<<<<<<<<<<<
+ *             part = Dataset(f)
+ *             varInfo = part.variables
+ */
+  __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_files, 1, 0, NULL, NULL, &__pyx_slice__9, 1, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
+    __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_9 = 0;
+    __pyx_t_10 = NULL;
+  } else {
+    __pyx_t_9 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_10)) {
+      if (likely(PyList_CheckExact(__pyx_t_5))) {
+        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_5)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_4 = __pyx_t_10(__pyx_t_5);
+      if (unlikely(!__pyx_t_4)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_4);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_4);
+    __pyx_t_4 = 0;
+
+    /* "utils.pyx":450
+ *         # and that the variables are defined in the same way (name, shape and type)
+ *         for f in files[1:]:
+ *             part = Dataset(f)             # <<<<<<<<<<<<<<
+ *             varInfo = part.variables
+ *             for v in masterRecVar.keys():
+ */
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_v_f);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_f);
+    __Pyx_GIVEREF(__pyx_v_f);
+    __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dataset)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_part, ((struct __pyx_obj_7netCDF4_Dataset *)__pyx_t_7));
+    __pyx_t_7 = 0;
+
+    /* "utils.pyx":451
+ *         for f in files[1:]:
+ *             part = Dataset(f)
+ *             varInfo = part.variables             # <<<<<<<<<<<<<<
+ *             for v in masterRecVar.keys():
+ *                 if check:
+ */
+    __pyx_t_7 = __pyx_v_part->variables;
+    __Pyx_INCREF(__pyx_t_7);
+    __Pyx_XDECREF_SET(__pyx_v_varInfo, __pyx_t_7);
+    __pyx_t_7 = 0;
+
+    /* "utils.pyx":452
+ *             part = Dataset(f)
+ *             varInfo = part.variables
+ *             for v in masterRecVar.keys():             # <<<<<<<<<<<<<<
+ *                 if check:
+ *                     # Make sure master rec var is also defined here.
+ */
+    __pyx_t_7 = __Pyx_PyDict_Keys(__pyx_v_masterRecVar); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
+      __pyx_t_4 = __pyx_t_7; __Pyx_INCREF(__pyx_t_4); __pyx_t_12 = 0;
+      __pyx_t_13 = NULL;
+    } else {
+      __pyx_t_12 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_13 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    for (;;) {
+      if (likely(!__pyx_t_13)) {
+        if (likely(PyList_CheckExact(__pyx_t_4))) {
+          if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_4)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_7); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_7); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        }
+      } else {
+        __pyx_t_7 = __pyx_t_13(__pyx_t_4);
+        if (unlikely(!__pyx_t_7)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_7);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
+      __pyx_t_7 = 0;
+
+      /* "utils.pyx":453
+ *             varInfo = part.variables
+ *             for v in masterRecVar.keys():
+ *                 if check:             # <<<<<<<<<<<<<<
+ *                     # Make sure master rec var is also defined here.
+ *                     if v not in varInfo.keys():
+ */
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_check); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_1) {
+
+        /* "utils.pyx":455
+ *                 if check:
+ *                     # Make sure master rec var is also defined here.
+ *                     if v not in varInfo.keys():             # <<<<<<<<<<<<<<
+ *                         raise IOError("aggregation variable %s not defined in %s" % (v, f))
+ * 
+ */
+        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_varInfo, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_6 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+          if (likely(__pyx_t_6)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+            __Pyx_INCREF(__pyx_t_6);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_3, function);
+          }
+        }
+        if (__pyx_t_6) {
+          __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        } else {
+          __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_v, __pyx_t_7, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __pyx_t_2 = (__pyx_t_1 != 0);
+        if (__pyx_t_2) {
+
+          /* "utils.pyx":456
+ *                     # Make sure master rec var is also defined here.
+ *                     if v not in varInfo.keys():
+ *                         raise IOError("aggregation variable %s not defined in %s" % (v, f))             # <<<<<<<<<<<<<<
+ * 
+ *                     #if not vInst.dimensions[0] != aggDimName:
+ */
+          __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_INCREF(__pyx_v_v);
+          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_v);
+          __Pyx_GIVEREF(__pyx_v_v);
+          __Pyx_INCREF(__pyx_v_f);
+          PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_f);
+          __Pyx_GIVEREF(__pyx_v_f);
+          __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_aggregation_variable_s_not_defin, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
+          __Pyx_GIVEREF(__pyx_t_3);
+          __pyx_t_3 = 0;
+          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+
+        /* "utils.pyx":460
+ *                     #if not vInst.dimensions[0] != aggDimName:
+ * 
+ *                     masterDims, masterShape, masterType = masterRecVar[v][:3]             # <<<<<<<<<<<<<<
+ *                     extDims, extShape, extType = varInfo[v][:3]
+ *                     extDims = varInfo[v].dimensions
+ */
+        __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_masterRecVar, __pyx_v_v); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 3, NULL, NULL, &__pyx_slice__10, 0, 1, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
+          PyObject* sequence = __pyx_t_7;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          Py_ssize_t size = Py_SIZE(sequence);
+          #else
+          Py_ssize_t size = PySequence_Size(sequence);
+          #endif
+          if (unlikely(size != 3)) {
+            if (size > 3) __Pyx_RaiseTooManyValuesError(3);
+            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          #if CYTHON_COMPILING_IN_CPYTHON
+          if (likely(PyTuple_CheckExact(sequence))) {
+            __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
+            __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
+            __pyx_t_14 = PyTuple_GET_ITEM(sequence, 2); 
+          } else {
+            __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
+            __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
+            __pyx_t_14 = PyList_GET_ITEM(sequence, 2); 
+          }
+          __Pyx_INCREF(__pyx_t_3);
+          __Pyx_INCREF(__pyx_t_6);
+          __Pyx_INCREF(__pyx_t_14);
+          #else
+          __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __pyx_t_14 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          #endif
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        } else {
+          Py_ssize_t index = -1;
+          __pyx_t_15 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_15);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          __pyx_t_11 = Py_TYPE(__pyx_t_15)->tp_iternext;
+          index = 0; __pyx_t_3 = __pyx_t_11(__pyx_t_15); if (unlikely(!__pyx_t_3)) goto __pyx_L34_unpacking_failed;
+          __Pyx_GOTREF(__pyx_t_3);
+          index = 1; __pyx_t_6 = __pyx_t_11(__pyx_t_15); if (unlikely(!__pyx_t_6)) goto __pyx_L34_unpacking_failed;
+          __Pyx_GOTREF(__pyx_t_6);
+          index = 2; __pyx_t_14 = __pyx_t_11(__pyx_t_15); if (unlikely(!__pyx_t_14)) goto __pyx_L34_unpacking_failed;
+          __Pyx_GOTREF(__pyx_t_14);
+          if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_15), 3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_11 = NULL;
+          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+          goto __pyx_L35_unpacking_done;
+          __pyx_L34_unpacking_failed:;
+          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+          __pyx_t_11 = NULL;
+          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_L35_unpacking_done:;
+        }
+        __Pyx_XDECREF_SET(__pyx_v_masterDims, __pyx_t_3);
+        __pyx_t_3 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_masterShape, __pyx_t_6);
+        __pyx_t_6 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_masterType, __pyx_t_14);
+        __pyx_t_14 = 0;
+
+        /* "utils.pyx":461
+ * 
+ *                     masterDims, masterShape, masterType = masterRecVar[v][:3]
+ *                     extDims, extShape, extType = varInfo[v][:3]             # <<<<<<<<<<<<<<
+ *                     extDims = varInfo[v].dimensions
+ *                     extShape = varInfo[v].shape
+ */
+        __pyx_t_7 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_14 = __Pyx_PyObject_GetSlice(__pyx_t_7, 0, 3, NULL, NULL, &__pyx_slice__11, 0, 1, 1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_14);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        if ((likely(PyTuple_CheckExact(__pyx_t_14))) || (PyList_CheckExact(__pyx_t_14))) {
+          PyObject* sequence = __pyx_t_14;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          Py_ssize_t size = Py_SIZE(sequence);
+          #else
+          Py_ssize_t size = PySequence_Size(sequence);
+          #endif
+          if (unlikely(size != 3)) {
+            if (size > 3) __Pyx_RaiseTooManyValuesError(3);
+            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          #if CYTHON_COMPILING_IN_CPYTHON
+          if (likely(PyTuple_CheckExact(sequence))) {
+            __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
+            __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
+            __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
+          } else {
+            __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
+            __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
+            __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
+          }
+          __Pyx_INCREF(__pyx_t_7);
+          __Pyx_INCREF(__pyx_t_6);
+          __Pyx_INCREF(__pyx_t_3);
+          #else
+          __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          #endif
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+        } else {
+          Py_ssize_t index = -1;
+          __pyx_t_15 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_15);
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+          __pyx_t_11 = Py_TYPE(__pyx_t_15)->tp_iternext;
+          index = 0; __pyx_t_7 = __pyx_t_11(__pyx_t_15); if (unlikely(!__pyx_t_7)) goto __pyx_L36_unpacking_failed;
+          __Pyx_GOTREF(__pyx_t_7);
+          index = 1; __pyx_t_6 = __pyx_t_11(__pyx_t_15); if (unlikely(!__pyx_t_6)) goto __pyx_L36_unpacking_failed;
+          __Pyx_GOTREF(__pyx_t_6);
+          index = 2; __pyx_t_3 = __pyx_t_11(__pyx_t_15); if (unlikely(!__pyx_t_3)) goto __pyx_L36_unpacking_failed;
+          __Pyx_GOTREF(__pyx_t_3);
+          if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_15), 3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_11 = NULL;
+          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+          goto __pyx_L37_unpacking_done;
+          __pyx_L36_unpacking_failed:;
+          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+          __pyx_t_11 = NULL;
+          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_L37_unpacking_done:;
+        }
+        __Pyx_XDECREF_SET(__pyx_v_extDims, __pyx_t_7);
+        __pyx_t_7 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_extShape, __pyx_t_6);
+        __pyx_t_6 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_extType, __pyx_t_3);
+        __pyx_t_3 = 0;
+
+        /* "utils.pyx":462
+ *                     masterDims, masterShape, masterType = masterRecVar[v][:3]
+ *                     extDims, extShape, extType = varInfo[v][:3]
+ *                     extDims = varInfo[v].dimensions             # <<<<<<<<<<<<<<
+ *                     extShape = varInfo[v].shape
+ *                     extType = varInfo[v].dtype
+ */
+        __pyx_t_14 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_14);
+        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+        __Pyx_DECREF_SET(__pyx_v_extDims, __pyx_t_3);
+        __pyx_t_3 = 0;
+
+        /* "utils.pyx":463
+ *                     extDims, extShape, extType = varInfo[v][:3]
+ *                     extDims = varInfo[v].dimensions
+ *                     extShape = varInfo[v].shape             # <<<<<<<<<<<<<<
+ *                     extType = varInfo[v].dtype
+ *                     # Check that dimension names are identical.
+ */
+        __pyx_t_3 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shape); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_14);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_DECREF_SET(__pyx_v_extShape, __pyx_t_14);
+        __pyx_t_14 = 0;
+
+        /* "utils.pyx":464
+ *                     extDims = varInfo[v].dimensions
+ *                     extShape = varInfo[v].shape
+ *                     extType = varInfo[v].dtype             # <<<<<<<<<<<<<<
+ *                     # Check that dimension names are identical.
+ *                     if masterDims != extDims:
+ */
+        __pyx_t_14 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_14);
+        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+        __Pyx_DECREF_SET(__pyx_v_extType, __pyx_t_3);
+        __pyx_t_3 = 0;
+
+        /* "utils.pyx":466
+ *                     extType = varInfo[v].dtype
+ *                     # Check that dimension names are identical.
+ *                     if masterDims != extDims:             # <<<<<<<<<<<<<<
+ *                         raise IOError("variable %s : dimensions mismatch between "
+ *                                        "master %s (%s) and extension %s (%s)" %
+ */
+        __pyx_t_3 = PyObject_RichCompare(__pyx_v_masterDims, __pyx_v_extDims, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        if (__pyx_t_2) {
+
+          /* "utils.pyx":469
+ *                         raise IOError("variable %s : dimensions mismatch between "
+ *                                        "master %s (%s) and extension %s (%s)" %
+ *                                        (v, master, masterDims, f, extDims))             # <<<<<<<<<<<<<<
+ * 
+ *                     # Check that the ranks are identical, and the dimension lengths are
+ */
+          __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_INCREF(__pyx_v_v);
+          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_v);
+          __Pyx_GIVEREF(__pyx_v_v);
+          __Pyx_INCREF(__pyx_v_master);
+          PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_master);
+          __Pyx_GIVEREF(__pyx_v_master);
+          __Pyx_INCREF(__pyx_v_masterDims);
+          PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_masterDims);
+          __Pyx_GIVEREF(__pyx_v_masterDims);
+          __Pyx_INCREF(__pyx_v_f);
+          PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_f);
+          __Pyx_GIVEREF(__pyx_v_f);
+          __Pyx_INCREF(__pyx_v_extDims);
+          PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_extDims);
+          __Pyx_GIVEREF(__pyx_v_extDims);
+
+          /* "utils.pyx":468
+ *                     if masterDims != extDims:
+ *                         raise IOError("variable %s : dimensions mismatch between "
+ *                                        "master %s (%s) and extension %s (%s)" %             # <<<<<<<<<<<<<<
+ *                                        (v, master, masterDims, f, extDims))
+ * 
+ */
+          __pyx_t_14 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_dimensions_mismatch_b, __pyx_t_3); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+          /* "utils.pyx":467
+ *                     # Check that dimension names are identical.
+ *                     if masterDims != extDims:
+ *                         raise IOError("variable %s : dimensions mismatch between "             # <<<<<<<<<<<<<<
+ *                                        "master %s (%s) and extension %s (%s)" %
+ *                                        (v, master, masterDims, f, extDims))
+ */
+          __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_14);
+          __Pyx_GIVEREF(__pyx_t_14);
+          __pyx_t_14 = 0;
+          __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __Pyx_Raise(__pyx_t_14, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+
+        /* "utils.pyx":474
+ *                     # identical (except for that of the unlimited dimension, which of
+ *                     # course may vary.
+ *                     if len(masterShape) != len(extShape):             # <<<<<<<<<<<<<<
+ *                         raise IOError("variable %s : rank mismatch between "
+ *                                        "master %s (%s) and extension %s (%s)" %
+ */
+        __pyx_t_16 = PyObject_Length(__pyx_v_masterShape); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_17 = PyObject_Length(__pyx_v_extShape); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = ((__pyx_t_16 != __pyx_t_17) != 0);
+        if (__pyx_t_2) {
+
+          /* "utils.pyx":477
+ *                         raise IOError("variable %s : rank mismatch between "
+ *                                        "master %s (%s) and extension %s (%s)" %
+ *                                        (v, master, len(masterShape), f, len(extShape)))             # <<<<<<<<<<<<<<
+ *                     if masterShape[1:] != extShape[1:]:
+ *                         raise IOError("variable %s : shape mismatch between "
+ */
+          __pyx_t_17 = PyObject_Length(__pyx_v_masterShape); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_14 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          __pyx_t_17 = PyObject_Length(__pyx_v_extShape); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_INCREF(__pyx_v_v);
+          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_v);
+          __Pyx_GIVEREF(__pyx_v_v);
+          __Pyx_INCREF(__pyx_v_master);
+          PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_master);
+          __Pyx_GIVEREF(__pyx_v_master);
+          PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_14);
+          __Pyx_GIVEREF(__pyx_t_14);
+          __Pyx_INCREF(__pyx_v_f);
+          PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_f);
+          __Pyx_GIVEREF(__pyx_v_f);
+          PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_3);
+          __Pyx_GIVEREF(__pyx_t_3);
+          __pyx_t_14 = 0;
+          __pyx_t_3 = 0;
+
+          /* "utils.pyx":476
+ *                     if len(masterShape) != len(extShape):
+ *                         raise IOError("variable %s : rank mismatch between "
+ *                                        "master %s (%s) and extension %s (%s)" %             # <<<<<<<<<<<<<<
+ *                                        (v, master, len(masterShape), f, len(extShape)))
+ *                     if masterShape[1:] != extShape[1:]:
+ */
+          __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_rank_mismatch_between, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+          /* "utils.pyx":475
+ *                     # course may vary.
+ *                     if len(masterShape) != len(extShape):
+ *                         raise IOError("variable %s : rank mismatch between "             # <<<<<<<<<<<<<<
+ *                                        "master %s (%s) and extension %s (%s)" %
+ *                                        (v, master, len(masterShape), f, len(extShape)))
+ */
+          __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+          __Pyx_GIVEREF(__pyx_t_3);
+          __pyx_t_3 = 0;
+          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+
+        /* "utils.pyx":478
+ *                                        "master %s (%s) and extension %s (%s)" %
+ *                                        (v, master, len(masterShape), f, len(extShape)))
+ *                     if masterShape[1:] != extShape[1:]:             # <<<<<<<<<<<<<<
+ *                         raise IOError("variable %s : shape mismatch between "
+ *                                        "master %s (%s) and extension %s (%s)" %
+ */
+        __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_masterShape, 1, 0, NULL, NULL, &__pyx_slice__12, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_extShape, 1, 0, NULL, NULL, &__pyx_slice__13, 1, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_14 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+        if (__pyx_t_2) {
+
+          /* "utils.pyx":481
+ *                         raise IOError("variable %s : shape mismatch between "
+ *                                        "master %s (%s) and extension %s (%s)" %
+ *                                        (v, master, masterShape, f, extShape))             # <<<<<<<<<<<<<<
+ * 
+ *                     # Check that the data types are identical.
+ */
+          __pyx_t_14 = PyTuple_New(5); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          __Pyx_INCREF(__pyx_v_v);
+          PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_v);
+          __Pyx_GIVEREF(__pyx_v_v);
+          __Pyx_INCREF(__pyx_v_master);
+          PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_v_master);
+          __Pyx_GIVEREF(__pyx_v_master);
+          __Pyx_INCREF(__pyx_v_masterShape);
+          PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_v_masterShape);
+          __Pyx_GIVEREF(__pyx_v_masterShape);
+          __Pyx_INCREF(__pyx_v_f);
+          PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_v_f);
+          __Pyx_GIVEREF(__pyx_v_f);
+          __Pyx_INCREF(__pyx_v_extShape);
+          PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_v_extShape);
+          __Pyx_GIVEREF(__pyx_v_extShape);
+
+          /* "utils.pyx":480
+ *                     if masterShape[1:] != extShape[1:]:
+ *                         raise IOError("variable %s : shape mismatch between "
+ *                                        "master %s (%s) and extension %s (%s)" %             # <<<<<<<<<<<<<<
+ *                                        (v, master, masterShape, f, extShape))
+ * 
+ */
+          __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_shape_mismatch_betwee, __pyx_t_14); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+
+          /* "utils.pyx":479
+ *                                        (v, master, len(masterShape), f, len(extShape)))
+ *                     if masterShape[1:] != extShape[1:]:
+ *                         raise IOError("variable %s : shape mismatch between "             # <<<<<<<<<<<<<<
+ *                                        "master %s (%s) and extension %s (%s)" %
+ *                                        (v, master, masterShape, f, extShape))
+ */
+          __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_6);
+          __Pyx_GIVEREF(__pyx_t_6);
+          __pyx_t_6 = 0;
+          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+          __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+
+        /* "utils.pyx":484
+ * 
+ *                     # Check that the data types are identical.
+ *                     if masterType != extType:             # <<<<<<<<<<<<<<
+ *                         raise IOError("variable %s : data type mismatch between "
+ *                                        "master %s (%s) and extension %s (%s)" %
+ */
+        __pyx_t_6 = PyObject_RichCompare(__pyx_v_masterType, __pyx_v_extType, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        if (__pyx_t_2) {
+
+          /* "utils.pyx":487
+ *                         raise IOError("variable %s : data type mismatch between "
+ *                                        "master %s (%s) and extension %s (%s)" %
+ *                                        (v, master, masterType, f, extType))             # <<<<<<<<<<<<<<
+ * 
+ *                     # Everythig ok.
+ */
+          __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_INCREF(__pyx_v_v);
+          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_v);
+          __Pyx_GIVEREF(__pyx_v_v);
+          __Pyx_INCREF(__pyx_v_master);
+          PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_master);
+          __Pyx_GIVEREF(__pyx_v_master);
+          __Pyx_INCREF(__pyx_v_masterType);
+          PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_masterType);
+          __Pyx_GIVEREF(__pyx_v_masterType);
+          __Pyx_INCREF(__pyx_v_f);
+          PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_f);
+          __Pyx_GIVEREF(__pyx_v_f);
+          __Pyx_INCREF(__pyx_v_extType);
+          PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_v_extType);
+          __Pyx_GIVEREF(__pyx_v_extType);
+
+          /* "utils.pyx":486
+ *                     if masterType != extType:
+ *                         raise IOError("variable %s : data type mismatch between "
+ *                                        "master %s (%s) and extension %s (%s)" %             # <<<<<<<<<<<<<<
+ *                                        (v, master, masterType, f, extType))
+ * 
+ */
+          __pyx_t_14 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_data_type_mismatch_be, __pyx_t_6); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+          /* "utils.pyx":485
+ *                     # Check that the data types are identical.
+ *                     if masterType != extType:
+ *                         raise IOError("variable %s : data type mismatch between "             # <<<<<<<<<<<<<<
+ *                                        "master %s (%s) and extension %s (%s)" %
+ *                                        (v, master, masterType, f, extType))
+ */
+          __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_14);
+          __Pyx_GIVEREF(__pyx_t_14);
+          __pyx_t_14 = 0;
+          __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_Raise(__pyx_t_14, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+
+        /* "utils.pyx":490
+ * 
+ *                     # Everythig ok.
+ *                     vInst = part.variables[v]             # <<<<<<<<<<<<<<
+ *                     cdfRecVar[v].append(vInst)
+ *                 else:
+ */
+        __pyx_t_14 = PyObject_GetItem(__pyx_v_part->variables, __pyx_v_v); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_14);
+        __Pyx_XDECREF_SET(__pyx_v_vInst, __pyx_t_14);
+        __pyx_t_14 = 0;
+
+        /* "utils.pyx":491
+ *                     # Everythig ok.
+ *                     vInst = part.variables[v]
+ *                     cdfRecVar[v].append(vInst)             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     # No making sure of anything -- assume this is ok..
+ */
+        __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_v_cdfRecVar, __pyx_v_v); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_14);
+        __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_14, __pyx_v_vInst); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+        goto __pyx_L32;
+      }
+      /*else*/ {
+
+        /* "utils.pyx":494
+ *                 else:
+ *                     # No making sure of anything -- assume this is ok..
+ *                     vInst = part.variables[v]             # <<<<<<<<<<<<<<
+ *                     cdfRecVar[v].append(vInst)
+ * 
+ */
+        __pyx_t_14 = PyObject_GetItem(__pyx_v_part->variables, __pyx_v_v); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_14);
+        __Pyx_XDECREF_SET(__pyx_v_vInst, __pyx_t_14);
+        __pyx_t_14 = 0;
+
+        /* "utils.pyx":495
+ *                     # No making sure of anything -- assume this is ok..
+ *                     vInst = part.variables[v]
+ *                     cdfRecVar[v].append(vInst)             # <<<<<<<<<<<<<<
+ * 
+ *             cdf.append(part)
+ */
+        __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_v_cdfRecVar, __pyx_v_v); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_14);
+        __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_14, __pyx_v_vInst); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+      }
+      __pyx_L32:;
+
+      /* "utils.pyx":452
+ *             part = Dataset(f)
+ *             varInfo = part.variables
+ *             for v in masterRecVar.keys():             # <<<<<<<<<<<<<<
+ *                 if check:
+ *                     # Make sure master rec var is also defined here.
+ */
+    }
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "utils.pyx":497
+ *                     cdfRecVar[v].append(vInst)
+ * 
+ *             cdf.append(part)             # <<<<<<<<<<<<<<
+ *             cdfVLen.append(len(part.dimensions[aggDimName]))
+ * 
+ */
+    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_cdf, ((PyObject *)__pyx_v_part)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "utils.pyx":498
+ * 
+ *             cdf.append(part)
+ *             cdfVLen.append(len(part.dimensions[aggDimName]))             # <<<<<<<<<<<<<<
+ * 
+ *         # Attach attributes to the MFDataset instance.
+ */
+    if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+    __pyx_t_4 = PyObject_GetItem(__pyx_v_part->dimensions, __pyx_v_aggDimName); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_cdfVLen, __pyx_t_4); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "utils.pyx":449
+ *         # Make sure each file defines the same aggregation variables as the master
+ *         # and that the variables are defined in the same way (name, shape and type)
+ *         for f in files[1:]:             # <<<<<<<<<<<<<<
+ *             part = Dataset(f)
+ *             varInfo = part.variables
+ */
+  }
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+  /* "utils.pyx":502
+ *         # Attach attributes to the MFDataset instance.
+ *         # A local __setattr__() method is required for them.
+ *         self._files = files            # list of cdf file names in the set             # <<<<<<<<<<<<<<
+ *         self._cdfVLen = cdfVLen              # list of unlimited lengths
+ *         self._cdfTLen = sum(cdfVLen) # total length
+ */
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_files_2, __pyx_v_files) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":503
+ *         # A local __setattr__() method is required for them.
+ *         self._files = files            # list of cdf file names in the set
+ *         self._cdfVLen = cdfVLen              # list of unlimited lengths             # <<<<<<<<<<<<<<
+ *         self._cdfTLen = sum(cdfVLen) # total length
+ *         self._cdfRecVar = cdfRecVar          # dictionary of Variable instances for all
+ */
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfVLen, __pyx_v_cdfVLen) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":504
+ *         self._files = files            # list of cdf file names in the set
+ *         self._cdfVLen = cdfVLen              # list of unlimited lengths
+ *         self._cdfTLen = sum(cdfVLen) # total length             # <<<<<<<<<<<<<<
+ *         self._cdfRecVar = cdfRecVar          # dictionary of Variable instances for all
+ *                                              # the aggregation variables
+ */
+  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_INCREF(__pyx_v_cdfVLen);
+  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_cdfVLen);
+  __Pyx_GIVEREF(__pyx_v_cdfVLen);
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfTLen, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "utils.pyx":505
+ *         self._cdfVLen = cdfVLen              # list of unlimited lengths
+ *         self._cdfTLen = sum(cdfVLen) # total length
+ *         self._cdfRecVar = cdfRecVar          # dictionary of Variable instances for all             # <<<<<<<<<<<<<<
+ *                                              # the aggregation variables
+ *         self._dims = cdfm.dimensions
+ */
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfRecVar, __pyx_v_cdfRecVar) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":507
+ *         self._cdfRecVar = cdfRecVar          # dictionary of Variable instances for all
+ *                                              # the aggregation variables
+ *         self._dims = cdfm.dimensions             # <<<<<<<<<<<<<<
+ *         self._grps = cdfm.groups
+ *         for dimname, dim in self._dims.items():
+ */
+  __pyx_t_4 = __pyx_v_cdfm->dimensions;
+  __Pyx_INCREF(__pyx_t_4);
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dims, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "utils.pyx":508
+ *                                              # the aggregation variables
+ *         self._dims = cdfm.dimensions
+ *         self._grps = cdfm.groups             # <<<<<<<<<<<<<<
+ *         for dimname, dim in self._dims.items():
+ *             if dimname == aggDimName:
+ */
+  __pyx_t_4 = __pyx_v_cdfm->groups;
+  __Pyx_INCREF(__pyx_t_4);
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_grps, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "utils.pyx":509
+ *         self._dims = cdfm.dimensions
+ *         self._grps = cdfm.groups
+ *         for dimname, dim in self._dims.items():             # <<<<<<<<<<<<<<
+ *             if dimname == aggDimName:
+ *                 self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen)
+ */
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dims); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_items); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_14);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_5 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_14))) {
+    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_14);
+    if (likely(__pyx_t_5)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
+      __Pyx_INCREF(__pyx_t_5);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_14, function);
+    }
+  }
+  if (__pyx_t_5) {
+    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  } else {
+    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_14); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
+    __pyx_t_14 = __pyx_t_4; __Pyx_INCREF(__pyx_t_14); __pyx_t_9 = 0;
+    __pyx_t_10 = NULL;
+  } else {
+    __pyx_t_9 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_14);
+    __pyx_t_10 = Py_TYPE(__pyx_t_14)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_10)) {
+      if (likely(PyList_CheckExact(__pyx_t_14))) {
+        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_14)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_4 = PySequence_ITEM(__pyx_t_14, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_14)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_4 = PySequence_ITEM(__pyx_t_14, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_4 = __pyx_t_10(__pyx_t_14);
+      if (unlikely(!__pyx_t_4)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_4);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+      PyObject* sequence = __pyx_t_4;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
+      } else {
+        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
+      }
+      __Pyx_INCREF(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_6);
+      #else
+      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      #endif
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext;
+      index = 0; __pyx_t_5 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L44_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_5);
+      index = 1; __pyx_t_6 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L44_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_6);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_3), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = NULL;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      goto __pyx_L45_unpacking_done;
+      __pyx_L44_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_11 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L45_unpacking_done:;
+    }
+    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_5);
+    __pyx_t_5 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_6);
+    __pyx_t_6 = 0;
+
+    /* "utils.pyx":510
+ *         self._grps = cdfm.groups
+ *         for dimname, dim in self._dims.items():
+ *             if dimname == aggDimName:             # <<<<<<<<<<<<<<
+ *                 self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen)
+ *         self._vars = cdfm.variables
+ */
+    if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+    __pyx_t_4 = PyObject_RichCompare(__pyx_v_dimname, __pyx_v_aggDimName, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_2) {
+
+      /* "utils.pyx":511
+ *         for dimname, dim in self._dims.items():
+ *             if dimname == aggDimName:
+ *                 self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen)             # <<<<<<<<<<<<<<
+ *         self._vars = cdfm.variables
+ *         for varname,var in self._vars.items():
+ */
+      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Dimension); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdfVLen); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdfTLen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_7 = NULL;
+      __pyx_t_12 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+        if (likely(__pyx_t_7)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+          __Pyx_INCREF(__pyx_t_7);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_6, function);
+          __pyx_t_12 = 1;
+        }
+      }
+      __pyx_t_15 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_15);
+      if (__pyx_t_7) {
+        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+      }
+      __Pyx_INCREF(__pyx_v_dimname);
+      PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_12, __pyx_v_dimname);
+      __Pyx_GIVEREF(__pyx_v_dimname);
+      __Pyx_INCREF(__pyx_v_dim);
+      PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_12, __pyx_v_dim);
+      __Pyx_GIVEREF(__pyx_v_dim);
+      PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_12, __pyx_t_5);
+      __Pyx_GIVEREF(__pyx_t_5);
+      PyTuple_SET_ITEM(__pyx_t_15, 3+__pyx_t_12, __pyx_t_3);
+      __Pyx_GIVEREF(__pyx_t_3);
+      __pyx_t_5 = 0;
+      __pyx_t_3 = 0;
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dims); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_v_dimname, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      goto __pyx_L46;
+    }
+    __pyx_L46:;
+
+    /* "utils.pyx":509
+ *         self._dims = cdfm.dimensions
+ *         self._grps = cdfm.groups
+ *         for dimname, dim in self._dims.items():             # <<<<<<<<<<<<<<
+ *             if dimname == aggDimName:
+ *                 self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen)
+ */
+  }
+  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+
+  /* "utils.pyx":512
+ *             if dimname == aggDimName:
+ *                 self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen)
+ *         self._vars = cdfm.variables             # <<<<<<<<<<<<<<
+ *         for varname,var in self._vars.items():
+ *             if varname in self._cdfRecVar.keys():
+ */
+  __pyx_t_14 = __pyx_v_cdfm->variables;
+  __Pyx_INCREF(__pyx_t_14);
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_vars, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+
+  /* "utils.pyx":513
+ *                 self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen)
+ *         self._vars = cdfm.variables
+ *         for varname,var in self._vars.items():             # <<<<<<<<<<<<<<
+ *             if varname in self._cdfRecVar.keys():
+ *                 self._vars[varname] = _Variable(self, varname, var, aggDimName)
+ */
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vars); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+    }
+  }
+  if (__pyx_t_4) {
+    __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  } else {
+    __pyx_t_14 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_14);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_14)) || PyTuple_CheckExact(__pyx_t_14)) {
+    __pyx_t_6 = __pyx_t_14; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
+    __pyx_t_10 = NULL;
+  } else {
+    __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_10)) {
+      if (likely(PyList_CheckExact(__pyx_t_6))) {
+        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_14 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_14); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_14 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_14); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_14 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_14 = __pyx_t_10(__pyx_t_6);
+      if (unlikely(!__pyx_t_14)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_14);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_14))) || (PyList_CheckExact(__pyx_t_14))) {
+      PyObject* sequence = __pyx_t_14;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_15 = PyTuple_GET_ITEM(sequence, 1); 
+      } else {
+        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_15 = PyList_GET_ITEM(sequence, 1); 
+      }
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_15);
+      #else
+      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_15 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_15);
+      #endif
+      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_3 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+      __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext;
+      index = 0; __pyx_t_4 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L49_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_4);
+      index = 1; __pyx_t_15 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_15)) goto __pyx_L49_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_15);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_3), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = NULL;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      goto __pyx_L50_unpacking_done;
+      __pyx_L49_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_11 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L50_unpacking_done:;
+    }
+    __Pyx_XDECREF_SET(__pyx_v_varname, __pyx_t_4);
+    __pyx_t_4 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_15);
+    __pyx_t_15 = 0;
+
+    /* "utils.pyx":514
+ *         self._vars = cdfm.variables
+ *         for varname,var in self._vars.items():
+ *             if varname in self._cdfRecVar.keys():             # <<<<<<<<<<<<<<
+ *                 self._vars[varname] = _Variable(self, varname, var, aggDimName)
+ *         self._file_format = []
+ */
+    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdfRecVar); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_15);
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+    __pyx_t_15 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_15)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_15);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (__pyx_t_15) {
+      __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_15); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+    } else {
+      __pyx_t_14 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_14);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_varname, __pyx_t_14, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+    __pyx_t_1 = (__pyx_t_2 != 0);
+    if (__pyx_t_1) {
+
+      /* "utils.pyx":515
+ *         for varname,var in self._vars.items():
+ *             if varname in self._cdfRecVar.keys():
+ *                 self._vars[varname] = _Variable(self, varname, var, aggDimName)             # <<<<<<<<<<<<<<
+ *         self._file_format = []
+ *         self._data_model = []
+ */
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Variable); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+      __pyx_t_15 = NULL;
+      __pyx_t_12 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+        __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_4);
+        if (likely(__pyx_t_15)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+          __Pyx_INCREF(__pyx_t_15);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_4, function);
+          __pyx_t_12 = 1;
+        }
+      }
+      __pyx_t_3 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      if (__pyx_t_15) {
+        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); __pyx_t_15 = NULL;
+      }
+      __Pyx_INCREF(__pyx_v_self);
+      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_12, __pyx_v_self);
+      __Pyx_GIVEREF(__pyx_v_self);
+      __Pyx_INCREF(__pyx_v_varname);
+      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_12, __pyx_v_varname);
+      __Pyx_GIVEREF(__pyx_v_varname);
+      __Pyx_INCREF(__pyx_v_var);
+      PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_12, __pyx_v_var);
+      __Pyx_GIVEREF(__pyx_v_var);
+      __Pyx_INCREF(__pyx_v_aggDimName);
+      PyTuple_SET_ITEM(__pyx_t_3, 3+__pyx_t_12, __pyx_v_aggDimName);
+      __Pyx_GIVEREF(__pyx_v_aggDimName);
+      __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_14);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vars); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_varname, __pyx_t_14) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+      goto __pyx_L51;
+    }
+    __pyx_L51:;
+
+    /* "utils.pyx":513
+ *                 self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen)
+ *         self._vars = cdfm.variables
+ *         for varname,var in self._vars.items():             # <<<<<<<<<<<<<<
+ *             if varname in self._cdfRecVar.keys():
+ *                 self._vars[varname] = _Variable(self, varname, var, aggDimName)
+ */
+  }
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+  /* "utils.pyx":516
+ *             if varname in self._cdfRecVar.keys():
+ *                 self._vars[varname] = _Variable(self, varname, var, aggDimName)
+ *         self._file_format = []             # <<<<<<<<<<<<<<
+ *         self._data_model = []
+ *         self._disk_format = []
+ */
+  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_format, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+  /* "utils.pyx":517
+ *                 self._vars[varname] = _Variable(self, varname, var, aggDimName)
+ *         self._file_format = []
+ *         self._data_model = []             # <<<<<<<<<<<<<<
+ *         self._disk_format = []
+ *         for dset in self._cdf:
+ */
+  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data_model, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+  /* "utils.pyx":518
+ *         self._file_format = []
+ *         self._data_model = []
+ *         self._disk_format = []             # <<<<<<<<<<<<<<
+ *         for dset in self._cdf:
+ *             if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4':
+ */
+  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_disk_format, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+  /* "utils.pyx":519
+ *         self._data_model = []
+ *         self._disk_format = []
+ *         for dset in self._cdf:             # <<<<<<<<<<<<<<
+ *             if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4':
+ *                 raise ValueError('MFNetCDF4 only works with NETCDF3_CLASSIC, NETCDF3_64BIT and NETCDF4_CLASSIC formatted files, not NETCDF4')
+ */
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdf); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
+    __pyx_t_14 = __pyx_t_6; __Pyx_INCREF(__pyx_t_14); __pyx_t_9 = 0;
+    __pyx_t_10 = NULL;
+  } else {
+    __pyx_t_9 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_14);
+    __pyx_t_10 = Py_TYPE(__pyx_t_14)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_10)) {
+      if (likely(PyList_CheckExact(__pyx_t_14))) {
+        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_14)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_6 = PySequence_ITEM(__pyx_t_14, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_14)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_6 = PySequence_ITEM(__pyx_t_14, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_6 = __pyx_t_10(__pyx_t_14);
+      if (unlikely(!__pyx_t_6)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_6);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_dset, __pyx_t_6);
+    __pyx_t_6 = 0;
+
+    /* "utils.pyx":520
+ *         self._disk_format = []
+ *         for dset in self._cdf:
+ *             if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4':             # <<<<<<<<<<<<<<
+ *                 raise ValueError('MFNetCDF4 only works with NETCDF3_CLASSIC, NETCDF3_64BIT and NETCDF4_CLASSIC formatted files, not NETCDF4')
+ *             self._file_format.append(dset.file_format)
+ */
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_file_format_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    if (!__pyx_t_2) {
+    } else {
+      __pyx_t_1 = __pyx_t_2;
+      goto __pyx_L55_bool_binop_done;
+    }
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_1 = __pyx_t_2;
+    __pyx_L55_bool_binop_done:;
+    if (__pyx_t_1) {
+
+      /* "utils.pyx":521
+ *         for dset in self._cdf:
+ *             if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4':
+ *                 raise ValueError('MFNetCDF4 only works with NETCDF3_CLASSIC, NETCDF3_64BIT and NETCDF4_CLASSIC formatted files, not NETCDF4')             # <<<<<<<<<<<<<<
+ *             self._file_format.append(dset.file_format)
+ *             self._data_model.append(dset.data_model)
+ */
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "utils.pyx":522
+ *             if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4':
+ *                 raise ValueError('MFNetCDF4 only works with NETCDF3_CLASSIC, NETCDF3_64BIT and NETCDF4_CLASSIC formatted files, not NETCDF4')
+ *             self._file_format.append(dset.file_format)             # <<<<<<<<<<<<<<
+ *             self._data_model.append(dset.data_model)
+ *             self._disk_format.append(dset.disk_format)
+ */
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_file_format_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_4); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "utils.pyx":523
+ *                 raise ValueError('MFNetCDF4 only works with NETCDF3_CLASSIC, NETCDF3_64BIT and NETCDF4_CLASSIC formatted files, not NETCDF4')
+ *             self._file_format.append(dset.file_format)
+ *             self._data_model.append(dset.data_model)             # <<<<<<<<<<<<<<
+ *             self._disk_format.append(dset.disk_format)
+ *         self._path = '/'
+ */
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data_model); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+    /* "utils.pyx":524
+ *             self._file_format.append(dset.file_format)
+ *             self._data_model.append(dset.data_model)
+ *             self._disk_format.append(dset.disk_format)             # <<<<<<<<<<<<<<
+ *         self._path = '/'
+ * 
+ */
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_disk_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_disk_format_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_4); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "utils.pyx":519
+ *         self._data_model = []
+ *         self._disk_format = []
+ *         for dset in self._cdf:             # <<<<<<<<<<<<<<
+ *             if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4':
+ *                 raise ValueError('MFNetCDF4 only works with NETCDF3_CLASSIC, NETCDF3_64BIT and NETCDF4_CLASSIC formatted files, not NETCDF4')
+ */
+  }
+  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+
+  /* "utils.pyx":525
+ *             self._data_model.append(dset.data_model)
+ *             self._disk_format.append(dset.disk_format)
+ *         self._path = '/'             # <<<<<<<<<<<<<<
+ * 
+ *     def __setattr__(self, name, value):
+ */
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_path, __pyx_kp_s__15) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":349
+ *     """
+ * 
+ *     def __init__(self, files, check=False, aggdim=None, exclude=[]):             # <<<<<<<<<<<<<<
+ *         """
+ * Open a Dataset spanning multiple files, making it look as if it was a
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_14);
+  __Pyx_XDECREF(__pyx_t_15);
+  __Pyx_AddTraceback("netCDF4.MFDataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_msg);
+  __Pyx_XDECREF(__pyx_v_master);
+  __Pyx_XDECREF((PyObject *)__pyx_v_cdfm);
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XDECREF(__pyx_v_value);
+  __Pyx_XDECREF(__pyx_v_aggDimId);
+  __Pyx_XDECREF(__pyx_v_dimname);
+  __Pyx_XDECREF(__pyx_v_dim);
+  __Pyx_XDECREF(__pyx_v_aggDimName);
+  __Pyx_XDECREF(__pyx_v_masterRecVar);
+  __Pyx_XDECREF(__pyx_v_vName);
+  __Pyx_XDECREF(__pyx_v_v);
+  __Pyx_XDECREF(__pyx_v_dims);
+  __Pyx_XDECREF(__pyx_v_shape);
+  __Pyx_XDECREF(__pyx_v_dtype);
+  __Pyx_XDECREF(__pyx_v_cdf);
+  __Pyx_XDECREF(__pyx_v_cdfVLen);
+  __Pyx_XDECREF(__pyx_v_cdfRecVar);
+  __Pyx_XDECREF(__pyx_v_f);
+  __Pyx_XDECREF((PyObject *)__pyx_v_part);
+  __Pyx_XDECREF(__pyx_v_varInfo);
+  __Pyx_XDECREF(__pyx_v_masterDims);
+  __Pyx_XDECREF(__pyx_v_masterShape);
+  __Pyx_XDECREF(__pyx_v_masterType);
+  __Pyx_XDECREF(__pyx_v_extDims);
+  __Pyx_XDECREF(__pyx_v_extShape);
+  __Pyx_XDECREF(__pyx_v_extType);
+  __Pyx_XDECREF(__pyx_v_vInst);
+  __Pyx_XDECREF(__pyx_v_varname);
+  __Pyx_XDECREF(__pyx_v_var);
+  __Pyx_XDECREF(__pyx_v_dset);
+  __Pyx_XDECREF(__pyx_v_files);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":527
+ *         self._path = '/'
+ * 
+ *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
+ *         """override base class attribute creation"""
+ *         self.__dict__[name] = value
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9MFDataset_3__setattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_9MFDataset_2__setattr__[] = "override base class attribute creation";
+static PyMethodDef __pyx_mdef_7netCDF4_9MFDataset_3__setattr__ = {"__setattr__", (PyCFunction)__pyx_pw_7netCDF4_9MFDataset_3__setattr__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_9MFDataset_2__setattr__};
+static PyObject *__pyx_pw_7netCDF4_9MFDataset_3__setattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_self = 0;
+  PyObject *__pyx_v_name = 0;
+  PyObject *__pyx_v_value = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,&__pyx_n_s_value,0};
+    PyObject* values[3] = {0,0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setattr__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+    }
+    __pyx_v_self = values[0];
+    __pyx_v_name = values[1];
+    __pyx_v_value = values[2];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.MFDataset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_9MFDataset_2__setattr__(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_value);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9MFDataset_2__setattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__setattr__", 0);
+
+  /* "utils.pyx":529
+ *     def __setattr__(self, name, value):
+ *         """override base class attribute creation"""
+ *         self.__dict__[name] = value             # <<<<<<<<<<<<<<
+ * 
+ *     def __getattribute__(self, name):
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "utils.pyx":527
+ *         self._path = '/'
+ * 
+ *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
+ *         """override base class attribute creation"""
+ *         self.__dict__[name] = value
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.MFDataset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":531
+ *         self.__dict__[name] = value
+ * 
+ *     def __getattribute__(self, name):             # <<<<<<<<<<<<<<
+ *         if name in ['variables','dimensions','file_format','groups',\
+ *                     'data_model','disk_format','path']:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9MFDataset_5__getattribute__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_9MFDataset_5__getattribute__ = {"__getattribute__", (PyCFunction)__pyx_pw_7netCDF4_9MFDataset_5__getattribute__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_9MFDataset_5__getattribute__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_self = 0;
+  PyObject *__pyx_v_name = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__getattribute__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__getattribute__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getattribute__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_self = values[0];
+    __pyx_v_name = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__getattribute__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.MFDataset.__getattribute__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_9MFDataset_4__getattribute__(__pyx_self, __pyx_v_self, __pyx_v_name);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9MFDataset_4__getattribute__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  Py_ssize_t __pyx_t_6;
+  PyObject *__pyx_t_7 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__getattribute__", 0);
+
+  /* "utils.pyx":532
+ * 
+ *     def __getattribute__(self, name):
+ *         if name in ['variables','dimensions','file_format','groups',\             # <<<<<<<<<<<<<<
+ *                     'data_model','disk_format','path']:
+ *             if name == 'dimensions': return self._dims
+ */
+  __Pyx_INCREF(__pyx_v_name);
+  __pyx_t_1 = __pyx_v_name;
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_variables, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_3) {
+  } else {
+    __pyx_t_2 = __pyx_t_3;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_dimensions, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_3) {
+  } else {
+    __pyx_t_2 = __pyx_t_3;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_file_format_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_3) {
+  } else {
+    __pyx_t_2 = __pyx_t_3;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_groups, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_3) {
+  } else {
+    __pyx_t_2 = __pyx_t_3;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_data_model_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_3) {
+  } else {
+    __pyx_t_2 = __pyx_t_3;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_disk_format_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_3) {
+  } else {
+    __pyx_t_2 = __pyx_t_3;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_path_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __pyx_t_3;
+  __pyx_L4_bool_binop_done:;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = (__pyx_t_2 != 0);
+  if (__pyx_t_3) {
+
+    /* "utils.pyx":534
+ *         if name in ['variables','dimensions','file_format','groups',\
+ *                     'data_model','disk_format','path']:
+ *             if name == 'dimensions': return self._dims             # <<<<<<<<<<<<<<
+ *             if name == 'variables': return self._vars
+ *             if name == 'file_format': return self._file_format
+ */
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_dimensions, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_3) {
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dims); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_r = __pyx_t_1;
+      __pyx_t_1 = 0;
+      goto __pyx_L0;
+    }
+
+    /* "utils.pyx":535
+ *                     'data_model','disk_format','path']:
+ *             if name == 'dimensions': return self._dims
+ *             if name == 'variables': return self._vars             # <<<<<<<<<<<<<<
+ *             if name == 'file_format': return self._file_format
+ *             if name == 'data_model': return self._data_model
+ */
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_variables, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_3) {
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vars); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_r = __pyx_t_1;
+      __pyx_t_1 = 0;
+      goto __pyx_L0;
+    }
+
+    /* "utils.pyx":536
+ *             if name == 'dimensions': return self._dims
+ *             if name == 'variables': return self._vars
+ *             if name == 'file_format': return self._file_format             # <<<<<<<<<<<<<<
+ *             if name == 'data_model': return self._data_model
+ *             if name == 'disk_format': return self._disk_format
+ */
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_file_format_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_3) {
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_r = __pyx_t_1;
+      __pyx_t_1 = 0;
+      goto __pyx_L0;
+    }
+
+    /* "utils.pyx":537
+ *             if name == 'variables': return self._vars
+ *             if name == 'file_format': return self._file_format
+ *             if name == 'data_model': return self._data_model             # <<<<<<<<<<<<<<
+ *             if name == 'disk_format': return self._disk_format
+ *             if name == 'path': return self._path
+ */
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_data_model_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_3) {
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_r = __pyx_t_1;
+      __pyx_t_1 = 0;
+      goto __pyx_L0;
+    }
+
+    /* "utils.pyx":538
+ *             if name == 'file_format': return self._file_format
+ *             if name == 'data_model': return self._data_model
+ *             if name == 'disk_format': return self._disk_format             # <<<<<<<<<<<<<<
+ *             if name == 'path': return self._path
+ *             if name == 'groups': return self._grps
+ */
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_disk_format_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_3) {
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_disk_format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_r = __pyx_t_1;
+      __pyx_t_1 = 0;
+      goto __pyx_L0;
+    }
+
+    /* "utils.pyx":539
+ *             if name == 'data_model': return self._data_model
+ *             if name == 'disk_format': return self._disk_format
+ *             if name == 'path': return self._path             # <<<<<<<<<<<<<<
+ *             if name == 'groups': return self._grps
+ *         else:
+ */
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_path_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_3) {
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_r = __pyx_t_1;
+      __pyx_t_1 = 0;
+      goto __pyx_L0;
+    }
+
+    /* "utils.pyx":540
+ *             if name == 'disk_format': return self._disk_format
+ *             if name == 'path': return self._path
+ *             if name == 'groups': return self._grps             # <<<<<<<<<<<<<<
+ *         else:
+ *             return Dataset.__getattribute__(self, name)
+ */
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_groups, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_3) {
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_r = __pyx_t_1;
+      __pyx_t_1 = 0;
+      goto __pyx_L0;
+    }
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "utils.pyx":542
+ *             if name == 'groups': return self._grps
+ *         else:
+ *             return Dataset.__getattribute__(self, name)             # <<<<<<<<<<<<<<
+ * 
+ *     def ncattrs(self):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dataset)), __pyx_n_s_getattribute); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = NULL;
+    __pyx_t_6 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+        __pyx_t_6 = 1;
+      }
+    }
+    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    if (__pyx_t_5) {
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_self);
+    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self);
+    __Pyx_GIVEREF(__pyx_v_self);
+    __Pyx_INCREF(__pyx_v_name);
+    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_name);
+    __Pyx_GIVEREF(__pyx_v_name);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+  __pyx_L3:;
+
+  /* "utils.pyx":531
+ *         self.__dict__[name] = value
+ * 
+ *     def __getattribute__(self, name):             # <<<<<<<<<<<<<<
+ *         if name in ['variables','dimensions','file_format','groups',\
+ *                     'data_model','disk_format','path']:
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_AddTraceback("netCDF4.MFDataset.__getattribute__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":544
+ *             return Dataset.__getattribute__(self, name)
+ * 
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         return self._cdf[0].__dict__.keys()
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9MFDataset_7ncattrs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_9MFDataset_7ncattrs = {"ncattrs", (PyCFunction)__pyx_pw_7netCDF4_9MFDataset_7ncattrs, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_9MFDataset_7ncattrs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("ncattrs (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9MFDataset_6ncattrs(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9MFDataset_6ncattrs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("ncattrs", 0);
+
+  /* "utils.pyx":545
+ * 
+ *     def ncattrs(self):
+ *         return self._cdf[0].__dict__.keys()             # <<<<<<<<<<<<<<
+ * 
+ *     def close(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_2)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+    }
+  }
+  if (__pyx_t_2) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "utils.pyx":544
+ *             return Dataset.__getattribute__(self, name)
+ * 
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         return self._cdf[0].__dict__.keys()
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4.MFDataset.ncattrs", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":547
+ *         return self._cdf[0].__dict__.keys()
+ * 
+ *     def close(self):             # <<<<<<<<<<<<<<
+ *         for dset in self._cdf:
+ *             dset.close()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9MFDataset_9close(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_9MFDataset_9close = {"close", (PyCFunction)__pyx_pw_7netCDF4_9MFDataset_9close, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_9MFDataset_9close(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("close (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9MFDataset_8close(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9MFDataset_8close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_v_dset = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  Py_ssize_t __pyx_t_3;
+  PyObject *(*__pyx_t_4)(PyObject *);
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("close", 0);
+
+  /* "utils.pyx":548
+ * 
+ *     def close(self):
+ *         for dset in self._cdf:             # <<<<<<<<<<<<<<
+ *             dset.close()
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+    __pyx_t_4 = NULL;
+  } else {
+    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_4)) {
+      if (likely(PyList_CheckExact(__pyx_t_2))) {
+        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_dset, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "utils.pyx":549
+ *     def close(self):
+ *         for dset in self._cdf:
+ *             dset.close()             # <<<<<<<<<<<<<<
+ * 
+ *     def __repr__(self):
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_close); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_6 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+      if (likely(__pyx_t_6)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_6);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_5, function);
+      }
+    }
+    if (__pyx_t_6) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "utils.pyx":548
+ * 
+ *     def close(self):
+ *         for dset in self._cdf:             # <<<<<<<<<<<<<<
+ *             dset.close()
+ * 
+ */
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "utils.pyx":547
+ *         return self._cdf[0].__dict__.keys()
+ * 
+ *     def close(self):             # <<<<<<<<<<<<<<
+ *         for dset in self._cdf:
+ *             dset.close()
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netCDF4.MFDataset.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_dset);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":551
+ *             dset.close()
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         ncdump = ['%r\n' % type(self)]
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9MFDataset_11__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_9MFDataset_11__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7netCDF4_9MFDataset_11__repr__, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_9MFDataset_11__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9MFDataset_10__repr__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_v_ncdump = NULL;
+  PyObject *__pyx_v_dimnames = NULL;
+  PyObject *__pyx_v_varnames = NULL;
+  PyObject *__pyx_v_grpnames = NULL;
+  PyObject *__pyx_v_attrs = NULL;
+  PyObject *__pyx_v_dimname = NULL;
+  PyObject *__pyx_v_varname = NULL;
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  Py_ssize_t __pyx_t_5;
+  PyObject *(*__pyx_t_6)(PyObject *);
+  int __pyx_t_7;
+  int __pyx_t_8;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__repr__", 0);
+
+  /* "utils.pyx":552
+ * 
+ *     def __repr__(self):
+ *         ncdump = ['%r\n' % type(self)]             # <<<<<<<<<<<<<<
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
+ *         varnames = tuple([str(varname) for varname in self.variables.keys()])
+ */
+  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_r, ((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_v_ncdump = ((PyObject*)__pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "utils.pyx":553
+ *     def __repr__(self):
+ *         ncdump = ['%r\n' % type(self)]
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])             # <<<<<<<<<<<<<<
+ *         varnames = tuple([str(varname) for varname in self.variables.keys()])
+ *         grpnames = ()
+ */
+  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_4, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
+    __pyx_t_6 = NULL;
+  } else {
+    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_6)) {
+      if (likely(PyList_CheckExact(__pyx_t_4))) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_1 = __pyx_t_6(__pyx_t_4);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_dimname);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dimname);
+    __Pyx_GIVEREF(__pyx_v_dimname);
+    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_dimnames = ((PyObject*)__pyx_t_4);
+  __pyx_t_4 = 0;
+
+  /* "utils.pyx":554
+ *         ncdump = ['%r\n' % type(self)]
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
+ *         varnames = tuple([str(varname) for varname in self.variables.keys()])             # <<<<<<<<<<<<<<
+ *         grpnames = ()
+ *         if self.path == '/':
+ */
+  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
+    __pyx_t_6 = NULL;
+  } else {
+    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_6)) {
+      if (likely(PyList_CheckExact(__pyx_t_1))) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_2 = __pyx_t_6(__pyx_t_1);
+      if (unlikely(!__pyx_t_2)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_varname, __pyx_t_2);
+    __pyx_t_2 = 0;
+    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_v_varname);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_varname);
+    __Pyx_GIVEREF(__pyx_v_varname);
+    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_v_varnames = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "utils.pyx":555
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
+ *         varnames = tuple([str(varname) for varname in self.variables.keys()])
+ *         grpnames = ()             # <<<<<<<<<<<<<<
+ *         if self.path == '/':
+ *             ncdump.append('root group (%s data model, file format %s):\n' %
+ */
+  __Pyx_INCREF(__pyx_empty_tuple);
+  __pyx_v_grpnames = __pyx_empty_tuple;
+
+  /* "utils.pyx":556
+ *         varnames = tuple([str(varname) for varname in self.variables.keys()])
+ *         grpnames = ()
+ *         if self.path == '/':             # <<<<<<<<<<<<<<
+ *             ncdump.append('root group (%s data model, file format %s):\n' %
+ *                     (self.data_model[0], self.disk_format[0]))
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__15, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_7) {
+
+    /* "utils.pyx":558
+ *         if self.path == '/':
+ *             ncdump.append('root group (%s data model, file format %s):\n' %
+ *                     (self.data_model[0], self.disk_format[0]))             # <<<<<<<<<<<<<<
+ *         else:
+ *             ncdump.append('group %s:\n' % self.path)
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_disk_format_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_4 = 0;
+    __pyx_t_3 = 0;
+
+    /* "utils.pyx":557
+ *         grpnames = ()
+ *         if self.path == '/':
+ *             ncdump.append('root group (%s data model, file format %s):\n' %             # <<<<<<<<<<<<<<
+ *                     (self.data_model[0], self.disk_format[0]))
+ *         else:
+ */
+    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_root_group_s_data_model_file_for, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_3); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    goto __pyx_L7;
+  }
+  /*else*/ {
+
+    /* "utils.pyx":560
+ *                     (self.data_model[0], self.disk_format[0]))
+ *         else:
+ *             ncdump.append('group %s:\n' % self.path)             # <<<<<<<<<<<<<<
+ *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\
+ *                 self.ncattrs()]
+ */
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_group_s, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+  __pyx_L7:;
+
+  /* "utils.pyx":561
+ *         else:
+ *             ncdump.append('group %s:\n' % self.path)
+ *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\             # <<<<<<<<<<<<<<
+ *                 self.ncattrs()]
+ *         ncdump = ncdump + attrs
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+
+  /* "utils.pyx":562
+ *             ncdump.append('group %s:\n' % self.path)
+ *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\
+ *                 self.ncattrs()]             # <<<<<<<<<<<<<<
+ *         ncdump = ncdump + attrs
+ *         ncdump.append('    dimensions = %s\n' % str(dimnames))
+ */
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_2 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
+    if (likely(__pyx_t_2)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_4, function);
+    }
+  }
+  if (__pyx_t_2) {
+    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  } else {
+    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+    __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
+    __pyx_t_6 = NULL;
+  } else {
+    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_6)) {
+      if (likely(PyList_CheckExact(__pyx_t_4))) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_3 = __pyx_t_6(__pyx_t_4);
+      if (unlikely(!__pyx_t_3)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_3);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
+    __pyx_t_3 = 0;
+
+    /* "utils.pyx":561
+ *         else:
+ *             ncdump.append('group %s:\n' % self.path)
+ *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\             # <<<<<<<<<<<<<<
+ *                 self.ncattrs()]
+ *         ncdump = ncdump + attrs
+ */
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_v_name); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_INCREF(__pyx_v_name);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_name);
+    __Pyx_GIVEREF(__pyx_v_name);
+    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __pyx_t_2 = 0;
+    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_v_attrs = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "utils.pyx":563
+ *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\
+ *                 self.ncattrs()]
+ *         ncdump = ncdump + attrs             # <<<<<<<<<<<<<<
+ *         ncdump.append('    dimensions = %s\n' % str(dimnames))
+ *         ncdump.append('    variables = %s\n' % str(varnames))
+ */
+  __pyx_t_1 = PyNumber_Add(__pyx_v_ncdump, __pyx_v_attrs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF_SET(__pyx_v_ncdump, ((PyObject*)__pyx_t_1));
+  __pyx_t_1 = 0;
+
+  /* "utils.pyx":564
+ *                 self.ncattrs()]
+ *         ncdump = ncdump + attrs
+ *         ncdump.append('    dimensions = %s\n' % str(dimnames))             # <<<<<<<<<<<<<<
+ *         ncdump.append('    variables = %s\n' % str(varnames))
+ *         ncdump.append('    groups = %s\n' % str(grpnames))
+ */
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_dimnames);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dimnames);
+  __Pyx_GIVEREF(__pyx_v_dimnames);
+  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_dimensions_s, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "utils.pyx":565
+ *         ncdump = ncdump + attrs
+ *         ncdump.append('    dimensions = %s\n' % str(dimnames))
+ *         ncdump.append('    variables = %s\n' % str(varnames))             # <<<<<<<<<<<<<<
+ *         ncdump.append('    groups = %s\n' % str(grpnames))
+ *         return ''.join(ncdump)
+ */
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_varnames);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_varnames);
+  __Pyx_GIVEREF(__pyx_v_varnames);
+  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_variables_s, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "utils.pyx":566
+ *         ncdump.append('    dimensions = %s\n' % str(dimnames))
+ *         ncdump.append('    variables = %s\n' % str(varnames))
+ *         ncdump.append('    groups = %s\n' % str(grpnames))             # <<<<<<<<<<<<<<
+ *         return ''.join(ncdump)
+ * 
+ */
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_grpnames);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_grpnames);
+  __Pyx_GIVEREF(__pyx_v_grpnames);
+  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_groups_s, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "utils.pyx":567
+ *         ncdump.append('    variables = %s\n' % str(varnames))
+ *         ncdump.append('    groups = %s\n' % str(grpnames))
+ *         return ''.join(ncdump)             # <<<<<<<<<<<<<<
+ * 
+ * class _Dimension(object):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__16, __pyx_v_ncdump); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "utils.pyx":551
+ *             dset.close()
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         ncdump = ['%r\n' % type(self)]
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4.MFDataset.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_ncdump);
+  __Pyx_XDECREF(__pyx_v_dimnames);
+  __Pyx_XDECREF(__pyx_v_varnames);
+  __Pyx_XDECREF(__pyx_v_grpnames);
+  __Pyx_XDECREF(__pyx_v_attrs);
+  __Pyx_XDECREF(__pyx_v_dimname);
+  __Pyx_XDECREF(__pyx_v_varname);
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":570
+ * 
+ * class _Dimension(object):
+ *     def __init__(self, dimname, dim, dimlens, dimtotlen):             # <<<<<<<<<<<<<<
+ *         self.dimlens = dimlens
+ *         self.dimtotlen = dimtotlen
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_10_Dimension_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_10_Dimension_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7netCDF4_10_Dimension_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_10_Dimension_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_self = 0;
+  PyObject *__pyx_v_dimname = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_dim = 0;
+  PyObject *__pyx_v_dimlens = 0;
+  PyObject *__pyx_v_dimtotlen = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_dimname,&__pyx_n_s_dim,&__pyx_n_s_dimlens,&__pyx_n_s_dimtotlen,0};
+    PyObject* values[5] = {0,0,0,0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dimname)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dim)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  3:
+        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dimlens)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  4:
+        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dimtotlen)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+    }
+    __pyx_v_self = values[0];
+    __pyx_v_dimname = values[1];
+    __pyx_v_dim = values[2];
+    __pyx_v_dimlens = values[3];
+    __pyx_v_dimtotlen = values[4];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._Dimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_10_Dimension___init__(__pyx_self, __pyx_v_self, __pyx_v_dimname, __pyx_v_dim, __pyx_v_dimlens, __pyx_v_dimtotlen);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_10_Dimension___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dimname, CYTHON_UNUSED PyObject *__pyx_v_dim, PyObject *__pyx_v_dimlens, PyObject *__pyx_v_dimtotlen) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__init__", 0);
+
+  /* "utils.pyx":571
+ * class _Dimension(object):
+ *     def __init__(self, dimname, dim, dimlens, dimtotlen):
+ *         self.dimlens = dimlens             # <<<<<<<<<<<<<<
+ *         self.dimtotlen = dimtotlen
+ *         self._name = dimname
+ */
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dimlens, __pyx_v_dimlens) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":572
+ *     def __init__(self, dimname, dim, dimlens, dimtotlen):
+ *         self.dimlens = dimlens
+ *         self.dimtotlen = dimtotlen             # <<<<<<<<<<<<<<
+ *         self._name = dimname
+ *     def __len__(self):
+ */
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dimtotlen, __pyx_v_dimtotlen) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":573
+ *         self.dimlens = dimlens
+ *         self.dimtotlen = dimtotlen
+ *         self._name = dimname             # <<<<<<<<<<<<<<
+ *     def __len__(self):
+ *         return self.dimtotlen
+ */
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name_2, __pyx_v_dimname) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":570
+ * 
+ * class _Dimension(object):
+ *     def __init__(self, dimname, dim, dimlens, dimtotlen):             # <<<<<<<<<<<<<<
+ *         self.dimlens = dimlens
+ *         self.dimtotlen = dimtotlen
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4._Dimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":574
+ *         self.dimtotlen = dimtotlen
+ *         self._name = dimname
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self.dimtotlen
+ *     def isunlimited(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_10_Dimension_3__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_10_Dimension_3__len__ = {"__len__", (PyCFunction)__pyx_pw_7netCDF4_10_Dimension_3__len__, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_10_Dimension_3__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_10_Dimension_2__len__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_10_Dimension_2__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__len__", 0);
+
+  /* "utils.pyx":575
+ *         self._name = dimname
+ *     def __len__(self):
+ *         return self.dimtotlen             # <<<<<<<<<<<<<<
+ *     def isunlimited(self):
+ *         return True
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimtotlen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "utils.pyx":574
+ *         self.dimtotlen = dimtotlen
+ *         self._name = dimname
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self.dimtotlen
+ *     def isunlimited(self):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4._Dimension.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":576
+ *     def __len__(self):
+ *         return self.dimtotlen
+ *     def isunlimited(self):             # <<<<<<<<<<<<<<
+ *         return True
+ *     def __repr__(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_10_Dimension_5isunlimited(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_10_Dimension_5isunlimited = {"isunlimited", (PyCFunction)__pyx_pw_7netCDF4_10_Dimension_5isunlimited, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_10_Dimension_5isunlimited(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("isunlimited (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_10_Dimension_4isunlimited(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_10_Dimension_4isunlimited(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("isunlimited", 0);
+
+  /* "utils.pyx":577
+ *         return self.dimtotlen
+ *     def isunlimited(self):
+ *         return True             # <<<<<<<<<<<<<<
+ *     def __repr__(self):
+ *         if self.isunlimited():
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(Py_True);
+  __pyx_r = Py_True;
+  goto __pyx_L0;
+
+  /* "utils.pyx":576
+ *     def __len__(self):
+ *         return self.dimtotlen
+ *     def isunlimited(self):             # <<<<<<<<<<<<<<
+ *         return True
+ *     def __repr__(self):
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":578
+ *     def isunlimited(self):
+ *         return True
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if self.isunlimited():
+ *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_10_Dimension_7__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_10_Dimension_7__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7netCDF4_10_Dimension_7__repr__, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_10_Dimension_7__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_10_Dimension_6__repr__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_10_Dimension_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_4;
+  Py_ssize_t __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__repr__", 0);
+
+  /* "utils.pyx":579
+ *         return True
+ *     def __repr__(self):
+ *         if self.isunlimited():             # <<<<<<<<<<<<<<
+ *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
+ *         else:
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_4) {
+
+    /* "utils.pyx":580
+ *     def __repr__(self):
+ *         if self.isunlimited():
+ *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))             # <<<<<<<<<<<<<<
+ *         else:
+ *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_5 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_2 = 0;
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_unlimited_name_s_size_s, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_6;
+    __pyx_t_6 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "utils.pyx":582
+ *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
+ *         else:
+ *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))             # <<<<<<<<<<<<<<
+ * 
+ * class _Variable(object):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_6 = PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_5 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_3 = 0;
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_name_s_size_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyNumber_Add(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "utils.pyx":578
+ *     def isunlimited(self):
+ *         return True
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if self.isunlimited():
+ *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netCDF4._Dimension.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":585
+ * 
+ * class _Variable(object):
+ *     def __init__(self, dset, varname, var, recdimname):             # <<<<<<<<<<<<<<
+ *         self.dimensions = var.dimensions
+ *         self._dset = dset
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9_Variable_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_9_Variable_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7netCDF4_9_Variable_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_9_Variable_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_self = 0;
+  PyObject *__pyx_v_dset = 0;
+  PyObject *__pyx_v_varname = 0;
+  PyObject *__pyx_v_var = 0;
+  PyObject *__pyx_v_recdimname = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_dset,&__pyx_n_s_varname,&__pyx_n_s_var,&__pyx_n_s_recdimname,0};
+    PyObject* values[5] = {0,0,0,0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dset)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_varname)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  3:
+        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  4:
+        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_recdimname)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+    }
+    __pyx_v_self = values[0];
+    __pyx_v_dset = values[1];
+    __pyx_v_varname = values[2];
+    __pyx_v_var = values[3];
+    __pyx_v_recdimname = values[4];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._Variable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_9_Variable___init__(__pyx_self, __pyx_v_self, __pyx_v_dset, __pyx_v_varname, __pyx_v_var, __pyx_v_recdimname);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9_Variable___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dset, PyObject *__pyx_v_varname, PyObject *__pyx_v_var, PyObject *__pyx_v_recdimname) {
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_v_value = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  Py_ssize_t __pyx_t_4;
+  PyObject *(*__pyx_t_5)(PyObject *);
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *(*__pyx_t_8)(PyObject *);
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__init__", 0);
+
+  /* "utils.pyx":586
+ * class _Variable(object):
+ *     def __init__(self, dset, varname, var, recdimname):
+ *         self.dimensions = var.dimensions             # <<<<<<<<<<<<<<
+ *         self._dset = dset
+ *         self._grp = dset
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dimensions, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "utils.pyx":587
+ *     def __init__(self, dset, varname, var, recdimname):
+ *         self.dimensions = var.dimensions
+ *         self._dset = dset             # <<<<<<<<<<<<<<
+ *         self._grp = dset
+ *         self._mastervar = var
+ */
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dset_2, __pyx_v_dset) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":588
+ *         self.dimensions = var.dimensions
+ *         self._dset = dset
+ *         self._grp = dset             # <<<<<<<<<<<<<<
+ *         self._mastervar = var
+ *         self._recVar = dset._cdfRecVar[varname]
+ */
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_grp, __pyx_v_dset) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":589
+ *         self._dset = dset
+ *         self._grp = dset
+ *         self._mastervar = var             # <<<<<<<<<<<<<<
+ *         self._recVar = dset._cdfRecVar[varname]
+ *         self._recdimname = recdimname
+ */
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mastervar, __pyx_v_var) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":590
+ *         self._grp = dset
+ *         self._mastervar = var
+ *         self._recVar = dset._cdfRecVar[varname]             # <<<<<<<<<<<<<<
+ *         self._recdimname = recdimname
+ *         self._recLen = dset._cdfVLen
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_cdfRecVar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_varname); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_recVar, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "utils.pyx":591
+ *         self._mastervar = var
+ *         self._recVar = dset._cdfRecVar[varname]
+ *         self._recdimname = recdimname             # <<<<<<<<<<<<<<
+ *         self._recLen = dset._cdfVLen
+ *         self.dtype = var.dtype
+ */
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_recdimname_2, __pyx_v_recdimname) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":592
+ *         self._recVar = dset._cdfRecVar[varname]
+ *         self._recdimname = recdimname
+ *         self._recLen = dset._cdfVLen             # <<<<<<<<<<<<<<
+ *         self.dtype = var.dtype
+ *         self._name = var._name
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_cdfVLen); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_recLen, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "utils.pyx":593
+ *         self._recdimname = recdimname
+ *         self._recLen = dset._cdfVLen
+ *         self.dtype = var.dtype             # <<<<<<<<<<<<<<
+ *         self._name = var._name
+ *         # copy attributes from master.
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "utils.pyx":594
+ *         self._recLen = dset._cdfVLen
+ *         self.dtype = var.dtype
+ *         self._name = var._name             # <<<<<<<<<<<<<<
+ *         # copy attributes from master.
+ *         for name, value in var.__dict__.items():
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name_2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "utils.pyx":596
+ *         self._name = var._name
+ *         # copy attributes from master.
+ *         for name, value in var.__dict__.items():             # <<<<<<<<<<<<<<
+ *             self.__dict__[name] = value
+ *     def typecode(self):
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_1)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_1);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+    }
+  }
+  if (__pyx_t_1) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  } else {
+    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
+  } else {
+    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_5)) {
+      if (likely(PyList_CheckExact(__pyx_t_3))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
+      if (unlikely(!__pyx_t_2)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
+      PyObject* sequence = __pyx_t_2;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
+      } else {
+        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
+      }
+      __Pyx_INCREF(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_6);
+      #else
+      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      #endif
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
+      index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_1);
+      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_6);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = NULL;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      goto __pyx_L6_unpacking_done;
+      __pyx_L5_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_8 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L6_unpacking_done:;
+    }
+    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
+    __pyx_t_1 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
+    __pyx_t_6 = 0;
+
+    /* "utils.pyx":597
+ *         # copy attributes from master.
+ *         for name, value in var.__dict__.items():
+ *             self.__dict__[name] = value             # <<<<<<<<<<<<<<
+ *     def typecode(self):
+ *         return self.dtype
+ */
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_name, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+    /* "utils.pyx":596
+ *         self._name = var._name
+ *         # copy attributes from master.
+ *         for name, value in var.__dict__.items():             # <<<<<<<<<<<<<<
+ *             self.__dict__[name] = value
+ *     def typecode(self):
+ */
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "utils.pyx":585
+ * 
+ * class _Variable(object):
+ *     def __init__(self, dset, varname, var, recdimname):             # <<<<<<<<<<<<<<
+ *         self.dimensions = var.dimensions
+ *         self._dset = dset
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_AddTraceback("netCDF4._Variable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XDECREF(__pyx_v_value);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":598
+ *         for name, value in var.__dict__.items():
+ *             self.__dict__[name] = value
+ *     def typecode(self):             # <<<<<<<<<<<<<<
+ *         return self.dtype
+ *     def ncattrs(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9_Variable_3typecode(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_9_Variable_3typecode = {"typecode", (PyCFunction)__pyx_pw_7netCDF4_9_Variable_3typecode, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_9_Variable_3typecode(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("typecode (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9_Variable_2typecode(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9_Variable_2typecode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("typecode", 0);
+
+  /* "utils.pyx":599
+ *             self.__dict__[name] = value
+ *     def typecode(self):
+ *         return self.dtype             # <<<<<<<<<<<<<<
+ *     def ncattrs(self):
+ *         return self._mastervar.__dict__.keys()
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "utils.pyx":598
+ *         for name, value in var.__dict__.items():
+ *             self.__dict__[name] = value
+ *     def typecode(self):             # <<<<<<<<<<<<<<
+ *         return self.dtype
+ *     def ncattrs(self):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4._Variable.typecode", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":600
+ *     def typecode(self):
+ *         return self.dtype
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         return self._mastervar.__dict__.keys()
+ *     def __getattr__(self,name):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9_Variable_5ncattrs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_9_Variable_5ncattrs = {"ncattrs", (PyCFunction)__pyx_pw_7netCDF4_9_Variable_5ncattrs, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_9_Variable_5ncattrs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("ncattrs (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9_Variable_4ncattrs(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9_Variable_4ncattrs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("ncattrs", 0);
+
+  /* "utils.pyx":601
+ *         return self.dtype
+ *     def ncattrs(self):
+ *         return self._mastervar.__dict__.keys()             # <<<<<<<<<<<<<<
+ *     def __getattr__(self,name):
+ *         if name == 'shape': return self._shape()
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mastervar); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "utils.pyx":600
+ *     def typecode(self):
+ *         return self.dtype
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         return self._mastervar.__dict__.keys()
+ *     def __getattr__(self,name):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4._Variable.ncattrs", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":602
+ *     def ncattrs(self):
+ *         return self._mastervar.__dict__.keys()
+ *     def __getattr__(self,name):             # <<<<<<<<<<<<<<
+ *         if name == 'shape': return self._shape()
+ *         if name == 'ndim': return len(self._shape())
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9_Variable_7__getattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_9_Variable_7__getattr__ = {"__getattr__", (PyCFunction)__pyx_pw_7netCDF4_9_Variable_7__getattr__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_9_Variable_7__getattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_self = 0;
+  PyObject *__pyx_v_name = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getattr__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_self = values[0];
+    __pyx_v_name = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._Variable.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_9_Variable_6__getattr__(__pyx_self, __pyx_v_self, __pyx_v_name);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9_Variable_6__getattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  Py_ssize_t __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__getattr__", 0);
+
+  /* "utils.pyx":603
+ *         return self._mastervar.__dict__.keys()
+ *     def __getattr__(self,name):
+ *         if name == 'shape': return self._shape()             # <<<<<<<<<<<<<<
+ *         if name == 'ndim': return len(self._shape())
+ *         try:
+ */
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_shape, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "utils.pyx":604
+ *     def __getattr__(self,name):
+ *         if name == 'shape': return self._shape()
+ *         if name == 'ndim': return len(self._shape())             # <<<<<<<<<<<<<<
+ *         try:
+ *             return self.__dict__[name]
+ */
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_ndim, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_5 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "utils.pyx":605
+ *         if name == 'shape': return self._shape()
+ *         if name == 'ndim': return len(self._shape())
+ *         try:             # <<<<<<<<<<<<<<
+ *             return self.__dict__[name]
+ *         except:
+ */
+  {
+    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
+    __Pyx_XGOTREF(__pyx_t_6);
+    __Pyx_XGOTREF(__pyx_t_7);
+    __Pyx_XGOTREF(__pyx_t_8);
+    /*try:*/ {
+
+      /* "utils.pyx":606
+ *         if name == 'ndim': return len(self._shape())
+ *         try:
+ *             return self.__dict__[name]             # <<<<<<<<<<<<<<
+ *         except:
+ *             raise AttributeError(name)
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L5_error;};
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_r = __pyx_t_3;
+      __pyx_t_3 = 0;
+      goto __pyx_L9_try_return;
+    }
+    __pyx_L5_error:;
+    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+    /* "utils.pyx":607
+ *         try:
+ *             return self.__dict__[name]
+ *         except:             # <<<<<<<<<<<<<<
+ *             raise AttributeError(name)
+ *     def __repr__(self):
+ */
+    /*except:*/ {
+      __Pyx_AddTraceback("netCDF4._Variable.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_GOTREF(__pyx_t_4);
+
+      /* "utils.pyx":608
+ *             return self.__dict__[name]
+ *         except:
+ *             raise AttributeError(name)             # <<<<<<<<<<<<<<
+ *     def __repr__(self):
+ *         ncdump_var = ['%r\n' % type(self)]
+ */
+      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_INCREF(__pyx_v_name);
+      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_name);
+      __Pyx_GIVEREF(__pyx_v_name);
+      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
+    }
+    __pyx_L7_except_error:;
+    __Pyx_XGIVEREF(__pyx_t_6);
+    __Pyx_XGIVEREF(__pyx_t_7);
+    __Pyx_XGIVEREF(__pyx_t_8);
+    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
+    goto __pyx_L1_error;
+    __pyx_L9_try_return:;
+    __Pyx_XGIVEREF(__pyx_t_6);
+    __Pyx_XGIVEREF(__pyx_t_7);
+    __Pyx_XGIVEREF(__pyx_t_8);
+    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
+    goto __pyx_L0;
+  }
+
+  /* "utils.pyx":602
+ *     def ncattrs(self):
+ *         return self._mastervar.__dict__.keys()
+ *     def __getattr__(self,name):             # <<<<<<<<<<<<<<
+ *         if name == 'shape': return self._shape()
+ *         if name == 'ndim': return len(self._shape())
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4._Variable.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":609
+ *         except:
+ *             raise AttributeError(name)
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         ncdump_var = ['%r\n' % type(self)]
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9_Variable_9__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_9_Variable_9__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7netCDF4_9_Variable_9__repr__, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_9_Variable_9__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9_Variable_8__repr__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9_Variable_8__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_v_ncdump_var = NULL;
+  PyObject *__pyx_v_dimnames = NULL;
+  PyObject *__pyx_v_attrs = NULL;
+  PyObject *__pyx_v_unlimdims = NULL;
+  PyObject *__pyx_v_dimname = NULL;
+  PyObject *__pyx_v_dim = NULL;
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  Py_ssize_t __pyx_t_4;
+  PyObject *(*__pyx_t_5)(PyObject *);
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_t_7;
+  PyObject *__pyx_t_8 = NULL;
+  Py_ssize_t __pyx_t_9;
+  PyObject *__pyx_t_10 = NULL;
+  int __pyx_t_11;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__repr__", 0);
+
+  /* "utils.pyx":610
+ *             raise AttributeError(name)
+ *     def __repr__(self):
+ *         ncdump_var = ['%r\n' % type(self)]             # <<<<<<<<<<<<<<
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
+ *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\
+ */
+  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_r, ((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_v_ncdump_var = ((PyObject*)__pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "utils.pyx":611
+ *     def __repr__(self):
+ *         ncdump_var = ['%r\n' % type(self)]
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions])             # <<<<<<<<<<<<<<
+ *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\
+ *                 self.ncattrs()]
+ */
+  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
+  } else {
+    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_5)) {
+      if (likely(PyList_CheckExact(__pyx_t_3))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_1 = __pyx_t_5(__pyx_t_3);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_dimname);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dimname);
+    __Pyx_GIVEREF(__pyx_v_dimname);
+    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_dimnames = ((PyObject*)__pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "utils.pyx":612
+ *         ncdump_var = ['%r\n' % type(self)]
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
+ *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\             # <<<<<<<<<<<<<<
+ *                 self.ncattrs()]
+ *         ncdump_var.append('%s %s%s\n' %\
+ */
+  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+
+  /* "utils.pyx":613
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
+ *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\
+ *                 self.ncattrs()]             # <<<<<<<<<<<<<<
+ *         ncdump_var.append('%s %s%s\n' %\
+ *         (self.dtype,self._name,dimnames))
+ */
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_1 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_1)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_1);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+    }
+  }
+  if (__pyx_t_1) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  } else {
+    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+    __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
+  } else {
+    __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_5)) {
+      if (likely(PyList_CheckExact(__pyx_t_6))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_2 = __pyx_t_5(__pyx_t_6);
+      if (unlikely(!__pyx_t_2)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2);
+    __pyx_t_2 = 0;
+
+    /* "utils.pyx":612
+ *         ncdump_var = ['%r\n' % type(self)]
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
+ *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\             # <<<<<<<<<<<<<<
+ *                 self.ncattrs()]
+ *         ncdump_var.append('%s %s%s\n' %\
+ */
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_v_name);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name);
+    __Pyx_GIVEREF(__pyx_v_name);
+    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_v_attrs = ((PyObject*)__pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "utils.pyx":615
+ *                 self.ncattrs()]
+ *         ncdump_var.append('%s %s%s\n' %\
+ *         (self.dtype,self._name,dimnames))             # <<<<<<<<<<<<<<
+ *         ncdump_var = ncdump_var + attrs
+ *         unlimdims = []
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  __Pyx_INCREF(__pyx_v_dimnames);
+  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_dimnames);
+  __Pyx_GIVEREF(__pyx_v_dimnames);
+  __pyx_t_3 = 0;
+  __pyx_t_6 = 0;
+
+  /* "utils.pyx":614
+ *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\
+ *                 self.ncattrs()]
+ *         ncdump_var.append('%s %s%s\n' %\             # <<<<<<<<<<<<<<
+ *         (self.dtype,self._name,dimnames))
+ *         ncdump_var = ncdump_var + attrs
+ */
+  __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+  /* "utils.pyx":616
+ *         ncdump_var.append('%s %s%s\n' %\
+ *         (self.dtype,self._name,dimnames))
+ *         ncdump_var = ncdump_var + attrs             # <<<<<<<<<<<<<<
+ *         unlimdims = []
+ *         for dimname in self.dimensions:
+ */
+  __pyx_t_6 = PyNumber_Add(__pyx_v_ncdump_var, __pyx_v_attrs); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF_SET(__pyx_v_ncdump_var, ((PyObject*)__pyx_t_6));
+  __pyx_t_6 = 0;
+
+  /* "utils.pyx":617
+ *         (self.dtype,self._name,dimnames))
+ *         ncdump_var = ncdump_var + attrs
+ *         unlimdims = []             # <<<<<<<<<<<<<<
+ *         for dimname in self.dimensions:
+ *             dim = _find_dim(self._grp, dimname)
+ */
+  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_v_unlimdims = ((PyObject*)__pyx_t_6);
+  __pyx_t_6 = 0;
+
+  /* "utils.pyx":618
+ *         ncdump_var = ncdump_var + attrs
+ *         unlimdims = []
+ *         for dimname in self.dimensions:             # <<<<<<<<<<<<<<
+ *             dim = _find_dim(self._grp, dimname)
+ *             if dim.isunlimited():
+ */
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
+    __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
+  } else {
+    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_5)) {
+      if (likely(PyList_CheckExact(__pyx_t_1))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_6 = __pyx_t_5(__pyx_t_1);
+      if (unlikely(!__pyx_t_6)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_6);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_6);
+    __pyx_t_6 = 0;
+
+    /* "utils.pyx":619
+ *         unlimdims = []
+ *         for dimname in self.dimensions:
+ *             dim = _find_dim(self._grp, dimname)             # <<<<<<<<<<<<<<
+ *             if dim.isunlimited():
+ *                 unlimdims.append(str(dimname))
+ */
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_8 = NULL;
+    __pyx_t_9 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_8)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_8);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+        __pyx_t_9 = 1;
+      }
+    }
+    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    if (__pyx_t_8) {
+      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+    }
+    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_v_dimname);
+    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_dimname);
+    __Pyx_GIVEREF(__pyx_v_dimname);
+    __pyx_t_2 = 0;
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_6);
+    __pyx_t_6 = 0;
+
+    /* "utils.pyx":620
+ *         for dimname in self.dimensions:
+ *             dim = _find_dim(self._grp, dimname)
+ *             if dim.isunlimited():             # <<<<<<<<<<<<<<
+ *                 unlimdims.append(str(dimname))
+ *         ncdump_var.append('unlimited dimensions = %s\n' % repr(tuple(unlimdims)))
+ */
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_10 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_10)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_10);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (__pyx_t_10) {
+      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    } else {
+      __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    if (__pyx_t_11) {
+
+      /* "utils.pyx":621
+ *             dim = _find_dim(self._grp, dimname)
+ *             if dim.isunlimited():
+ *                 unlimdims.append(str(dimname))             # <<<<<<<<<<<<<<
+ *         ncdump_var.append('unlimited dimensions = %s\n' % repr(tuple(unlimdims)))
+ *         ncdump_var.append('current size = %s\n' % repr(self.shape))
+ */
+      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_INCREF(__pyx_v_dimname);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_dimname);
+      __Pyx_GIVEREF(__pyx_v_dimname);
+      __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_unlimdims, __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      goto __pyx_L9;
+    }
+    __pyx_L9:;
+
+    /* "utils.pyx":618
+ *         ncdump_var = ncdump_var + attrs
+ *         unlimdims = []
+ *         for dimname in self.dimensions:             # <<<<<<<<<<<<<<
+ *             dim = _find_dim(self._grp, dimname)
+ *             if dim.isunlimited():
+ */
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "utils.pyx":622
+ *             if dim.isunlimited():
+ *                 unlimdims.append(str(dimname))
+ *         ncdump_var.append('unlimited dimensions = %s\n' % repr(tuple(unlimdims)))             # <<<<<<<<<<<<<<
+ *         ncdump_var.append('current size = %s\n' % repr(self.shape))
+ *         return ''.join(ncdump_var)
+ */
+  __pyx_t_1 = PyList_AsTuple(__pyx_v_unlimdims); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_unlimited_dimensions_s, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "utils.pyx":623
+ *                 unlimdims.append(str(dimname))
+ *         ncdump_var.append('unlimited dimensions = %s\n' % repr(tuple(unlimdims)))
+ *         ncdump_var.append('current size = %s\n' % repr(self.shape))             # <<<<<<<<<<<<<<
+ *         return ''.join(ncdump_var)
+ *     def __len__(self):
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_current_size_s, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "utils.pyx":624
+ *         ncdump_var.append('unlimited dimensions = %s\n' % repr(tuple(unlimdims)))
+ *         ncdump_var.append('current size = %s\n' % repr(self.shape))
+ *         return ''.join(ncdump_var)             # <<<<<<<<<<<<<<
+ *     def __len__(self):
+ *         return self._shape()[0]
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__16, __pyx_v_ncdump_var); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "utils.pyx":609
+ *         except:
+ *             raise AttributeError(name)
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         ncdump_var = ['%r\n' % type(self)]
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4._Variable.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_ncdump_var);
+  __Pyx_XDECREF(__pyx_v_dimnames);
+  __Pyx_XDECREF(__pyx_v_attrs);
+  __Pyx_XDECREF(__pyx_v_unlimdims);
+  __Pyx_XDECREF(__pyx_v_dimname);
+  __Pyx_XDECREF(__pyx_v_dim);
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":625
+ *         ncdump_var.append('current size = %s\n' % repr(self.shape))
+ *         return ''.join(ncdump_var)
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self._shape()[0]
+ *     def _shape(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9_Variable_11__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_9_Variable_11__len__ = {"__len__", (PyCFunction)__pyx_pw_7netCDF4_9_Variable_11__len__, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_9_Variable_11__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9_Variable_10__len__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9_Variable_10__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__len__", 0);
+
+  /* "utils.pyx":626
+ *         return ''.join(ncdump_var)
+ *     def __len__(self):
+ *         return self._shape()[0]             # <<<<<<<<<<<<<<
+ *     def _shape(self):
+ *         recdimlen = len(self._dset.dimensions[self._recdimname])
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "utils.pyx":625
+ *         ncdump_var.append('current size = %s\n' % repr(self.shape))
+ *         return ''.join(ncdump_var)
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self._shape()[0]
+ *     def _shape(self):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4._Variable.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":627
+ *     def __len__(self):
+ *         return self._shape()[0]
+ *     def _shape(self):             # <<<<<<<<<<<<<<
+ *         recdimlen = len(self._dset.dimensions[self._recdimname])
+ *         return (recdimlen,) + self._mastervar.shape[1:]
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9_Variable_13_shape(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_9_Variable_13_shape = {"_shape", (PyCFunction)__pyx_pw_7netCDF4_9_Variable_13_shape, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_9_Variable_13_shape(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_shape (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9_Variable_12_shape(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9_Variable_12_shape(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+  Py_ssize_t __pyx_v_recdimlen;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  Py_ssize_t __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_shape", 0);
+
+  /* "utils.pyx":628
+ *         return self._shape()[0]
+ *     def _shape(self):
+ *         recdimlen = len(self._dset.dimensions[self._recdimname])             # <<<<<<<<<<<<<<
+ *         return (recdimlen,) + self._mastervar.shape[1:]
+ *     def set_auto_maskandscale(self,val):
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dset_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recdimname_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_v_recdimlen = __pyx_t_4;
+
+  /* "utils.pyx":629
+ *     def _shape(self):
+ *         recdimlen = len(self._dset.dimensions[self._recdimname])
+ *         return (recdimlen,) + self._mastervar.shape[1:]             # <<<<<<<<<<<<<<
+ *     def set_auto_maskandscale(self,val):
+ *         for v in self._recVar:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_recdimlen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mastervar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_2, 1, 0, NULL, NULL, &__pyx_slice__17, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "utils.pyx":627
+ *     def __len__(self):
+ *         return self._shape()[0]
+ *     def _shape(self):             # <<<<<<<<<<<<<<
+ *         recdimlen = len(self._dset.dimensions[self._recdimname])
+ *         return (recdimlen,) + self._mastervar.shape[1:]
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4._Variable._shape", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":630
+ *         recdimlen = len(self._dset.dimensions[self._recdimname])
+ *         return (recdimlen,) + self._mastervar.shape[1:]
+ *     def set_auto_maskandscale(self,val):             # <<<<<<<<<<<<<<
+ *         for v in self._recVar:
+ *             v.set_auto_maskandscale(val)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9_Variable_15set_auto_maskandscale(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_9_Variable_15set_auto_maskandscale = {"set_auto_maskandscale", (PyCFunction)__pyx_pw_7netCDF4_9_Variable_15set_auto_maskandscale, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_9_Variable_15set_auto_maskandscale(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_self = 0;
+  PyObject *__pyx_v_val = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("set_auto_maskandscale (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_val,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("set_auto_maskandscale", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_auto_maskandscale") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_self = values[0];
+    __pyx_v_val = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("set_auto_maskandscale", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._Variable.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_9_Variable_14set_auto_maskandscale(__pyx_self, __pyx_v_self, __pyx_v_val);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9_Variable_14set_auto_maskandscale(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
+  PyObject *__pyx_v_v = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  Py_ssize_t __pyx_t_3;
+  PyObject *(*__pyx_t_4)(PyObject *);
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("set_auto_maskandscale", 0);
+
+  /* "utils.pyx":631
+ *         return (recdimlen,) + self._mastervar.shape[1:]
+ *     def set_auto_maskandscale(self,val):
+ *         for v in self._recVar:             # <<<<<<<<<<<<<<
+ *             v.set_auto_maskandscale(val)
+ *     def __getitem__(self, elem):
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+    __pyx_t_4 = NULL;
+  } else {
+    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_4)) {
+      if (likely(PyList_CheckExact(__pyx_t_2))) {
+        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "utils.pyx":632
+ *     def set_auto_maskandscale(self,val):
+ *         for v in self._recVar:
+ *             v.set_auto_maskandscale(val)             # <<<<<<<<<<<<<<
+ *     def __getitem__(self, elem):
+ *         """Get records from a concatenated set of variables."""
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_6 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+      if (likely(__pyx_t_6)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_6);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_5, function);
+      }
+    }
+    if (!__pyx_t_6) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+      __Pyx_INCREF(__pyx_v_val);
+      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_val);
+      __Pyx_GIVEREF(__pyx_v_val);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "utils.pyx":631
+ *         return (recdimlen,) + self._mastervar.shape[1:]
+ *     def set_auto_maskandscale(self,val):
+ *         for v in self._recVar:             # <<<<<<<<<<<<<<
+ *             v.set_auto_maskandscale(val)
+ *     def __getitem__(self, elem):
+ */
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "utils.pyx":630
+ *         recdimlen = len(self._dset.dimensions[self._recdimname])
+ *         return (recdimlen,) + self._mastervar.shape[1:]
+ *     def set_auto_maskandscale(self,val):             # <<<<<<<<<<<<<<
+ *         for v in self._recVar:
+ *             v.set_auto_maskandscale(val)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_AddTraceback("netCDF4._Variable.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_v);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":633
+ *         for v in self._recVar:
+ *             v.set_auto_maskandscale(val)
+ *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
+ *         """Get records from a concatenated set of variables."""
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9_Variable_17__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_9_Variable_16__getitem__[] = "Get records from a concatenated set of variables.";
+static PyMethodDef __pyx_mdef_7netCDF4_9_Variable_17__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7netCDF4_9_Variable_17__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_9_Variable_16__getitem__};
+static PyObject *__pyx_pw_7netCDF4_9_Variable_17__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_self = 0;
+  PyObject *__pyx_v_elem = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_elem,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elem)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_self = values[0];
+    __pyx_v_elem = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_9_Variable_16__getitem__(__pyx_self, __pyx_v_self, __pyx_v_elem);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9_Variable_16__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_elem) {
+  PyObject *__pyx_v_start = NULL;
+  PyObject *__pyx_v_count = NULL;
+  PyObject *__pyx_v_stride = NULL;
+  PyObject *__pyx_v_put_ind = NULL;
+  PyObject *__pyx_v_datashape = NULL;
+  PyObject *__pyx_v_data = NULL;
+  PyObject *__pyx_v_squeeze = NULL;
+  PyObject *__pyx_v_i = NULL;
+  PyObject *__pyx_v_n = NULL;
+  PyObject *__pyx_v_strt = NULL;
+  PyObject *__pyx_v_cnt = NULL;
+  PyObject *__pyx_v_strd = NULL;
+  Py_ssize_t __pyx_v_nv;
+  PyObject *__pyx_v_ind = NULL;
+  PyObject *__pyx_v_sta = NULL;
+  PyObject *__pyx_v_step = NULL;
+  PyObject *__pyx_v_stop = NULL;
+  PyObject *__pyx_v_idx = NULL;
+  PyObject *__pyx_v_vid = NULL;
+  PyObject *__pyx_v_k = NULL;
+  PyObject *__pyx_v_lst = NULL;
+  PyObject *__pyx_v_newSlice = NULL;
+  PyObject *__pyx_v_s = NULL;
+  PyObject *__pyx_v_lstArr = NULL;
+  int __pyx_v_ismasked;
+  PyObject *__pyx_v_dat = NULL;
+  CYTHON_UNUSED PyObject *__pyx_v_fill_value = NULL;
+  PyObject *__pyx_v_numv = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  Py_ssize_t __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *(*__pyx_t_8)(PyObject *);
+  PyObject *(*__pyx_t_9)(PyObject *);
+  int __pyx_t_10;
+  int __pyx_t_11;
+  PyObject *__pyx_t_12 = NULL;
+  Py_ssize_t __pyx_t_13;
+  PyObject *(*__pyx_t_14)(PyObject *);
+  int __pyx_t_15;
+  Py_ssize_t __pyx_t_16;
+  PyObject *(*__pyx_t_17)(PyObject *);
+  PyObject *__pyx_t_18 = NULL;
+  PyObject *__pyx_t_19 = NULL;
+  PyObject *__pyx_t_20 = NULL;
+  PyObject *__pyx_t_21 = NULL;
+  int __pyx_t_22;
+  int __pyx_t_23;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__getitem__", 0);
+
+  /* "utils.pyx":642
+ *         # to use.
+ *         start, count, stride, put_ind =\
+ *         _StartCountStride(elem, self.shape)             # <<<<<<<<<<<<<<
+ *         datashape = _out_array_shape(count)
+ *         data = ma.empty(datashape, dtype=self.dtype)
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = NULL;
+  __pyx_t_5 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+      __pyx_t_5 = 1;
+    }
+  }
+  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if (__pyx_t_4) {
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+  }
+  __Pyx_INCREF(__pyx_v_elem);
+  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_elem);
+  __Pyx_GIVEREF(__pyx_v_elem);
+  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_3 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+    PyObject* sequence = __pyx_t_1;
+    #if CYTHON_COMPILING_IN_CPYTHON
+    Py_ssize_t size = Py_SIZE(sequence);
+    #else
+    Py_ssize_t size = PySequence_Size(sequence);
+    #endif
+    if (unlikely(size != 4)) {
+      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
+      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    #if CYTHON_COMPILING_IN_CPYTHON
+    if (likely(PyTuple_CheckExact(sequence))) {
+      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
+      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
+      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
+      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 3); 
+    } else {
+      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
+      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
+      __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
+      __pyx_t_4 = PyList_GET_ITEM(sequence, 3); 
+    }
+    __Pyx_INCREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_t_6);
+    __Pyx_INCREF(__pyx_t_3);
+    __Pyx_INCREF(__pyx_t_4);
+    #else
+    {
+      Py_ssize_t i;
+      PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_3,&__pyx_t_4};
+      for (i=0; i < 4; i++) {
+        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(item);
+        *(temps[i]) = item;
+      }
+    }
+    #endif
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  } else {
+    Py_ssize_t index = -1;
+    PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_3,&__pyx_t_4};
+    __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
+    for (index=0; index < 4; index++) {
+      PyObject* item = __pyx_t_8(__pyx_t_7); if (unlikely(!item)) goto __pyx_L3_unpacking_failed;
+      __Pyx_GOTREF(item);
+      *(temps[index]) = item;
+    }
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = NULL;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    goto __pyx_L4_unpacking_done;
+    __pyx_L3_unpacking_failed:;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_8 = NULL;
+    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_L4_unpacking_done:;
+  }
+
+  /* "utils.pyx":641
+ *         # arguments to the nc_get_var() function, and is much more easy
+ *         # to use.
+ *         start, count, stride, put_ind =\             # <<<<<<<<<<<<<<
+ *         _StartCountStride(elem, self.shape)
+ *         datashape = _out_array_shape(count)
+ */
+  __pyx_v_start = __pyx_t_2;
+  __pyx_t_2 = 0;
+  __pyx_v_count = __pyx_t_6;
+  __pyx_t_6 = 0;
+  __pyx_v_stride = __pyx_t_3;
+  __pyx_t_3 = 0;
+  __pyx_v_put_ind = __pyx_t_4;
+  __pyx_t_4 = 0;
+
+  /* "utils.pyx":643
+ *         start, count, stride, put_ind =\
+ *         _StartCountStride(elem, self.shape)
+ *         datashape = _out_array_shape(count)             # <<<<<<<<<<<<<<
+ *         data = ma.empty(datashape, dtype=self.dtype)
+ * 
+ */
+  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_4, function);
+    }
+  }
+  if (!__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+  } else {
+    __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+    __Pyx_INCREF(__pyx_v_count);
+    PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_count);
+    __Pyx_GIVEREF(__pyx_v_count);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_v_datashape = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "utils.pyx":644
+ *         _StartCountStride(elem, self.shape)
+ *         datashape = _out_array_shape(count)
+ *         data = ma.empty(datashape, dtype=self.dtype)             # <<<<<<<<<<<<<<
+ * 
+ *         # Determine which dimensions need to be squeezed
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_datashape);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_datashape);
+  __Pyx_GIVEREF(__pyx_v_datashape);
+  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_v_data = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "utils.pyx":650
+ *         # The convention used is that for those cases,
+ *         # put_ind for this dimension is set to -1 by _StartCountStride.
+ *         squeeze = data.ndim * [slice(None),]             # <<<<<<<<<<<<<<
+ *         for i,n in enumerate(put_ind.shape[:-1]):
+ *             if n == 1 and put_ind[...,i].ravel()[0] == -1:
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(__pyx_slice__18);
+  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_slice__18);
+  __Pyx_GIVEREF(__pyx_slice__18);
+  __pyx_t_1 = PyNumber_Multiply(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_v_squeeze = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "utils.pyx":651
+ *         # put_ind for this dimension is set to -1 by _StartCountStride.
+ *         squeeze = data.ndim * [slice(None),]
+ *         for i,n in enumerate(put_ind.shape[:-1]):             # <<<<<<<<<<<<<<
+ *             if n == 1 and put_ind[...,i].ravel()[0] == -1:
+ *                 squeeze[i] = 0
+ */
+  __Pyx_INCREF(__pyx_int_0);
+  __pyx_t_1 = __pyx_int_0;
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_6, 0, -1, NULL, NULL, &__pyx_slice__19, 0, 1, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+    __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0;
+    __pyx_t_9 = NULL;
+  } else {
+    __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_9)) {
+      if (likely(PyList_CheckExact(__pyx_t_6))) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_3 = __pyx_t_9(__pyx_t_6);
+      if (unlikely(!__pyx_t_3)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_3);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_3);
+    __pyx_t_3 = 0;
+    __Pyx_INCREF(__pyx_t_1);
+    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+    __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1);
+    __pyx_t_1 = __pyx_t_3;
+    __pyx_t_3 = 0;
+
+    /* "utils.pyx":652
+ *         squeeze = data.ndim * [slice(None),]
+ *         for i,n in enumerate(put_ind.shape[:-1]):
+ *             if n == 1 and put_ind[...,i].ravel()[0] == -1:             # <<<<<<<<<<<<<<
+ *                 squeeze[i] = 0
+ * 
+ */
+    __pyx_t_3 = PyObject_RichCompare(__pyx_v_n, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (__pyx_t_11) {
+    } else {
+      __pyx_t_10 = __pyx_t_11;
+      goto __pyx_L8_bool_binop_done;
+    }
+    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(Py_Ellipsis);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, Py_Ellipsis);
+    __Pyx_GIVEREF(Py_Ellipsis);
+    __Pyx_INCREF(__pyx_v_i);
+    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_i);
+    __Pyx_GIVEREF(__pyx_v_i);
+    __pyx_t_2 = PyObject_GetItem(__pyx_v_put_ind, __pyx_t_4); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ravel); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_2)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_2);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (__pyx_t_2) {
+      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    } else {
+      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_10 = __pyx_t_11;
+    __pyx_L8_bool_binop_done:;
+    if (__pyx_t_10) {
+
+      /* "utils.pyx":653
+ *         for i,n in enumerate(put_ind.shape[:-1]):
+ *             if n == 1 and put_ind[...,i].ravel()[0] == -1:
+ *                 squeeze[i] = 0             # <<<<<<<<<<<<<<
+ * 
+ *         # Reshape the arrays so we can iterate over them.
+ */
+      if (unlikely(PyObject_SetItem(__pyx_v_squeeze, __pyx_v_i, __pyx_int_0) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L7;
+    }
+    __pyx_L7:;
+
+    /* "utils.pyx":651
+ *         # put_ind for this dimension is set to -1 by _StartCountStride.
+ *         squeeze = data.ndim * [slice(None),]
+ *         for i,n in enumerate(put_ind.shape[:-1]):             # <<<<<<<<<<<<<<
+ *             if n == 1 and put_ind[...,i].ravel()[0] == -1:
+ *                 squeeze[i] = 0
+ */
+  }
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "utils.pyx":656
+ * 
+ *         # Reshape the arrays so we can iterate over them.
+ *         strt = start.reshape((-1, self.ndim or 1))             # <<<<<<<<<<<<<<
+ *         cnt = count.reshape((-1, self.ndim or 1))
+ *         strd = stride.reshape((-1, self.ndim or 1))
+ */
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_10) {
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  } else {
+    __Pyx_INCREF(__pyx_t_4);
+    __pyx_t_3 = __pyx_t_4;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    goto __pyx_L10_bool_binop_done;
+  }
+  __pyx_t_4 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = __pyx_t_4;
+  __pyx_t_4 = 0;
+  __pyx_L10_bool_binop_done:;
+  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_INCREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_neg_1);
+  __Pyx_GIVEREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_3 = 0;
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+    }
+  }
+  if (!__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_GOTREF(__pyx_t_1);
+  } else {
+    __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+    PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_v_strt = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "utils.pyx":657
+ *         # Reshape the arrays so we can iterate over them.
+ *         strt = start.reshape((-1, self.ndim or 1))
+ *         cnt = count.reshape((-1, self.ndim or 1))             # <<<<<<<<<<<<<<
+ *         strd = stride.reshape((-1, self.ndim or 1))
+ *         put_ind = put_ind.reshape((-1, self.ndim or 1))
+ */
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_10) {
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  } else {
+    __Pyx_INCREF(__pyx_t_4);
+    __pyx_t_2 = __pyx_t_4;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    goto __pyx_L12_bool_binop_done;
+  }
+  __pyx_t_4 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_2 = __pyx_t_4;
+  __pyx_t_4 = 0;
+  __pyx_L12_bool_binop_done:;
+  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_INCREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_neg_1);
+  __Pyx_GIVEREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_2 = 0;
+  __pyx_t_2 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_2)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+    }
+  }
+  if (!__pyx_t_2) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_GOTREF(__pyx_t_1);
+  } else {
+    __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+    PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_v_cnt = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "utils.pyx":658
+ *         strt = start.reshape((-1, self.ndim or 1))
+ *         cnt = count.reshape((-1, self.ndim or 1))
+ *         strd = stride.reshape((-1, self.ndim or 1))             # <<<<<<<<<<<<<<
+ *         put_ind = put_ind.reshape((-1, self.ndim or 1))
+ * 
+ */
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_10) {
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  } else {
+    __Pyx_INCREF(__pyx_t_4);
+    __pyx_t_3 = __pyx_t_4;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    goto __pyx_L14_bool_binop_done;
+  }
+  __pyx_t_4 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = __pyx_t_4;
+  __pyx_t_4 = 0;
+  __pyx_L14_bool_binop_done:;
+  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_INCREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_neg_1);
+  __Pyx_GIVEREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_3 = 0;
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+    }
+  }
+  if (!__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_GOTREF(__pyx_t_1);
+  } else {
+    __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+    PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_v_strd = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "utils.pyx":659
+ *         cnt = count.reshape((-1, self.ndim or 1))
+ *         strd = stride.reshape((-1, self.ndim or 1))
+ *         put_ind = put_ind.reshape((-1, self.ndim or 1))             # <<<<<<<<<<<<<<
+ * 
+ *         # Fill output array with data chunks.
+ */
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_10) {
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  } else {
+    __Pyx_INCREF(__pyx_t_4);
+    __pyx_t_2 = __pyx_t_4;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    goto __pyx_L16_bool_binop_done;
+  }
+  __pyx_t_4 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_2 = __pyx_t_4;
+  __pyx_t_4 = 0;
+  __pyx_L16_bool_binop_done:;
+  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_INCREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_neg_1);
+  __Pyx_GIVEREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_2 = 0;
+  __pyx_t_2 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_2)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+    }
+  }
+  if (!__pyx_t_2) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_GOTREF(__pyx_t_1);
+  } else {
+    __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+    PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF_SET(__pyx_v_put_ind, __pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "utils.pyx":663
+ *         # Fill output array with data chunks.
+ *         # Number of variables making up the MFVariable.Variable.
+ *         nv = len(self._recLen)             # <<<<<<<<<<<<<<
+ *         for (start,count,stride,ind) in zip(strt, cnt, strd, put_ind):
+ *             # make sure count=-1 becomes count=1
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_nv = __pyx_t_5;
+
+  /* "utils.pyx":664
+ *         # Number of variables making up the MFVariable.Variable.
+ *         nv = len(self._recLen)
+ *         for (start,count,stride,ind) in zip(strt, cnt, strd, put_ind):             # <<<<<<<<<<<<<<
+ *             # make sure count=-1 becomes count=1
+ *             count = [abs(cnt) for cnt in count]
+ */
+  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_3 = NULL;
+  __pyx_t_5 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+      __pyx_t_5 = 1;
+    }
+  }
+  __pyx_t_4 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  if (__pyx_t_3) {
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+  }
+  __Pyx_INCREF(__pyx_v_strt);
+  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_strt);
+  __Pyx_GIVEREF(__pyx_v_strt);
+  __Pyx_INCREF(__pyx_v_cnt);
+  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_cnt);
+  __Pyx_GIVEREF(__pyx_v_cnt);
+  __Pyx_INCREF(__pyx_v_strd);
+  PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, __pyx_v_strd);
+  __Pyx_GIVEREF(__pyx_v_strd);
+  __Pyx_INCREF(__pyx_v_put_ind);
+  PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_5, __pyx_v_put_ind);
+  __Pyx_GIVEREF(__pyx_v_put_ind);
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0;
+    __pyx_t_9 = NULL;
+  } else {
+    __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_9)) {
+      if (likely(PyList_CheckExact(__pyx_t_6))) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_1 = __pyx_t_9(__pyx_t_6);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+      PyObject* sequence = __pyx_t_1;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 4)) {
+        if (size > 4) __Pyx_RaiseTooManyValuesError(4);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
+        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); 
+        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); 
+      } else {
+        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
+        __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
+        __pyx_t_7 = PyList_GET_ITEM(sequence, 3); 
+      }
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_7);
+      #else
+      {
+        Py_ssize_t i;
+        PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_2,&__pyx_t_7};
+        for (i=0; i < 4; i++) {
+          PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(item);
+          *(temps[i]) = item;
+        }
+      }
+      #endif
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_2,&__pyx_t_7};
+      __pyx_t_12 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_8 = Py_TYPE(__pyx_t_12)->tp_iternext;
+      for (index=0; index < 4; index++) {
+        PyObject* item = __pyx_t_8(__pyx_t_12); if (unlikely(!item)) goto __pyx_L20_unpacking_failed;
+        __Pyx_GOTREF(item);
+        *(temps[index]) = item;
+      }
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_12), 4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = NULL;
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      goto __pyx_L21_unpacking_done;
+      __pyx_L20_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __pyx_t_8 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L21_unpacking_done:;
+    }
+    __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_4);
+    __pyx_t_4 = 0;
+    __Pyx_DECREF_SET(__pyx_v_count, __pyx_t_3);
+    __pyx_t_3 = 0;
+    __Pyx_DECREF_SET(__pyx_v_stride, __pyx_t_2);
+    __pyx_t_2 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_7);
+    __pyx_t_7 = 0;
+
+    /* "utils.pyx":666
+ *         for (start,count,stride,ind) in zip(strt, cnt, strd, put_ind):
+ *             # make sure count=-1 becomes count=1
+ *             count = [abs(cnt) for cnt in count]             # <<<<<<<<<<<<<<
+ *             if (numpy.array(stride) < 0).any():
+ *                 raise IndexError('negative strides not allowed when slicing MFVariable Variable instance')
+ */
+    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (likely(PyList_CheckExact(__pyx_v_count)) || PyTuple_CheckExact(__pyx_v_count)) {
+      __pyx_t_7 = __pyx_v_count; __Pyx_INCREF(__pyx_t_7); __pyx_t_13 = 0;
+      __pyx_t_14 = NULL;
+    } else {
+      __pyx_t_13 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_count); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_14 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    for (;;) {
+      if (likely(!__pyx_t_14)) {
+        if (likely(PyList_CheckExact(__pyx_t_7))) {
+          if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_7)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_13); __Pyx_INCREF(__pyx_t_2); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_13); __Pyx_INCREF(__pyx_t_2); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        }
+      } else {
+        __pyx_t_2 = __pyx_t_14(__pyx_t_7);
+        if (unlikely(!__pyx_t_2)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_2);
+      }
+      __Pyx_DECREF_SET(__pyx_v_cnt, __pyx_t_2);
+      __pyx_t_2 = 0;
+      __pyx_t_2 = PyNumber_Absolute(__pyx_v_cnt); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_DECREF_SET(__pyx_v_count, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "utils.pyx":667
+ *             # make sure count=-1 becomes count=1
+ *             count = [abs(cnt) for cnt in count]
+ *             if (numpy.array(stride) < 0).any():             # <<<<<<<<<<<<<<
+ *                 raise IndexError('negative strides not allowed when slicing MFVariable Variable instance')
+ *             # Start, stop and step along 1st dimension, eg the unlimited
+ */
+    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_2)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_2);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (!__pyx_t_2) {
+      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_stride); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+    } else {
+      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+      __Pyx_INCREF(__pyx_v_stride);
+      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_stride);
+      __Pyx_GIVEREF(__pyx_v_stride);
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_any); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
+      if (likely(__pyx_t_3)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+        __Pyx_INCREF(__pyx_t_3);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_7, function);
+      }
+    }
+    if (__pyx_t_3) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_10) {
+
+      /* "utils.pyx":668
+ *             count = [abs(cnt) for cnt in count]
+ *             if (numpy.array(stride) < 0).any():
+ *                 raise IndexError('negative strides not allowed when slicing MFVariable Variable instance')             # <<<<<<<<<<<<<<
+ *             # Start, stop and step along 1st dimension, eg the unlimited
+ *             # dimension.
+ */
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "utils.pyx":671
+ *             # Start, stop and step along 1st dimension, eg the unlimited
+ *             # dimension.
+ *             sta = start[0]             # <<<<<<<<<<<<<<
+ *             step = stride[0]
+ *             stop = sta + count[0] * step
+ */
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_start, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_XDECREF_SET(__pyx_v_sta, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "utils.pyx":672
+ *             # dimension.
+ *             sta = start[0]
+ *             step = stride[0]             # <<<<<<<<<<<<<<
+ *             stop = sta + count[0] * step
+ * 
+ */
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_stride, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_XDECREF_SET(__pyx_v_step, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "utils.pyx":673
+ *             sta = start[0]
+ *             step = stride[0]
+ *             stop = sta + count[0] * step             # <<<<<<<<<<<<<<
+ * 
+ *             # Build a list representing the concatenated list of all records in
+ */
+    __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_count, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_7 = PyNumber_Multiply(__pyx_t_1, __pyx_v_step); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = PyNumber_Add(__pyx_v_sta, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_stop, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "utils.pyx":680
+ *             #  the record index inside the variables, from 0 to n
+ *             #  the index of the Variable instance to which each record belongs
+ *             idx = []    # list of record indices             # <<<<<<<<<<<<<<
+ *             vid = []    # list of Variable indices
+ *             for n in range(nv):
+ */
+    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_XDECREF_SET(__pyx_v_idx, ((PyObject*)__pyx_t_1));
+    __pyx_t_1 = 0;
+
+    /* "utils.pyx":681
+ *             #  the index of the Variable instance to which each record belongs
+ *             idx = []    # list of record indices
+ *             vid = []    # list of Variable indices             # <<<<<<<<<<<<<<
+ *             for n in range(nv):
+ *                 k = self._recLen[n]     # number of records in this variable
+ */
+    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_XDECREF_SET(__pyx_v_vid, ((PyObject*)__pyx_t_1));
+    __pyx_t_1 = 0;
+
+    /* "utils.pyx":682
+ *             idx = []    # list of record indices
+ *             vid = []    # list of Variable indices
+ *             for n in range(nv):             # <<<<<<<<<<<<<<
+ *                 k = self._recLen[n]     # number of records in this variable
+ *                 idx.extend(range(k))
+ */
+    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_nv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+      __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); __pyx_t_13 = 0;
+      __pyx_t_14 = NULL;
+    } else {
+      __pyx_t_13 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_14 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    for (;;) {
+      if (likely(!__pyx_t_14)) {
+        if (likely(PyList_CheckExact(__pyx_t_7))) {
+          if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_7)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        }
+      } else {
+        __pyx_t_1 = __pyx_t_14(__pyx_t_7);
+        if (unlikely(!__pyx_t_1)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_1);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_1);
+      __pyx_t_1 = 0;
+
+      /* "utils.pyx":683
+ *             vid = []    # list of Variable indices
+ *             for n in range(nv):
+ *                 k = self._recLen[n]     # number of records in this variable             # <<<<<<<<<<<<<<
+ *                 idx.extend(range(k))
+ *                 vid.extend([n] * k)
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_n); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_3);
+      __pyx_t_3 = 0;
+
+      /* "utils.pyx":684
+ *             for n in range(nv):
+ *                 k = self._recLen[n]     # number of records in this variable
+ *                 idx.extend(range(k))             # <<<<<<<<<<<<<<
+ *                 vid.extend([n] * k)
+ * 
+ */
+      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_v_k);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_k);
+      __Pyx_GIVEREF(__pyx_v_k);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_idx, __pyx_t_1); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+      /* "utils.pyx":685
+ *                 k = self._recLen[n]     # number of records in this variable
+ *                 idx.extend(range(k))
+ *                 vid.extend([n] * k)             # <<<<<<<<<<<<<<
+ * 
+ *             # Merge the two lists to get a list of 2-elem lists.
+ */
+      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_INCREF(__pyx_v_n);
+      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_n);
+      __Pyx_GIVEREF(__pyx_v_n);
+      { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_v_k); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_temp);
+        __Pyx_DECREF(__pyx_t_1);
+        __pyx_t_1 = __pyx_temp;
+      }
+      __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_vid, __pyx_t_1); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+      /* "utils.pyx":682
+ *             idx = []    # list of record indices
+ *             vid = []    # list of Variable indices
+ *             for n in range(nv):             # <<<<<<<<<<<<<<
+ *                 k = self._recLen[n]     # number of records in this variable
+ *                 idx.extend(range(k))
+ */
+    }
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+    /* "utils.pyx":689
+ *             # Merge the two lists to get a list of 2-elem lists.
+ *             # Slice this list along the first dimension.
+ *             lst = list(zip(idx, vid)).__getitem__(slice(sta, stop, step))             # <<<<<<<<<<<<<<
+ * 
+ *             # Rebuild the slicing expression for dimensions 1 and ssq.
+ */
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = NULL;
+    __pyx_t_13 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+        __pyx_t_13 = 1;
+      }
+    }
+    __pyx_t_2 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    if (__pyx_t_4) {
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_idx);
+    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_13, __pyx_v_idx);
+    __Pyx_GIVEREF(__pyx_v_idx);
+    __Pyx_INCREF(__pyx_v_vid);
+    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_13, __pyx_v_vid);
+    __Pyx_GIVEREF(__pyx_v_vid);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getitem); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = PySlice_New(__pyx_v_sta, __pyx_v_stop, __pyx_v_step); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+      if (likely(__pyx_t_2)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+        __Pyx_INCREF(__pyx_t_2);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_1, function);
+      }
+    }
+    if (!__pyx_t_2) {
+      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_GOTREF(__pyx_t_7);
+    } else {
+      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_3);
+      __Pyx_GIVEREF(__pyx_t_3);
+      __pyx_t_3 = 0;
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_lst, __pyx_t_7);
+    __pyx_t_7 = 0;
+
+    /* "utils.pyx":692
+ * 
+ *             # Rebuild the slicing expression for dimensions 1 and ssq.
+ *             newSlice = [slice(None, None, None)]             # <<<<<<<<<<<<<<
+ *             for n in range(1, len(start)):   # skip dimension 0
+ *                 s = slice(start[n],start[n] + count[n] * stride[n], stride[n])
+ */
+    __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_INCREF(__pyx_slice__21);
+    PyList_SET_ITEM(__pyx_t_7, 0, __pyx_slice__21);
+    __Pyx_GIVEREF(__pyx_slice__21);
+    __Pyx_XDECREF_SET(__pyx_v_newSlice, ((PyObject*)__pyx_t_7));
+    __pyx_t_7 = 0;
+
+    /* "utils.pyx":693
+ *             # Rebuild the slicing expression for dimensions 1 and ssq.
+ *             newSlice = [slice(None, None, None)]
+ *             for n in range(1, len(start)):   # skip dimension 0             # <<<<<<<<<<<<<<
+ *                 s = slice(start[n],start[n] + count[n] * stride[n], stride[n])
+ *                 newSlice.append(s)
+ */
+    __pyx_t_13 = PyObject_Length(__pyx_v_start); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_int_1);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_1);
+    __Pyx_GIVEREF(__pyx_int_1);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
+    __Pyx_GIVEREF(__pyx_t_7);
+    __pyx_t_7 = 0;
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
+      __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_13 = 0;
+      __pyx_t_14 = NULL;
+    } else {
+      __pyx_t_13 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_14 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    for (;;) {
+      if (likely(!__pyx_t_14)) {
+        if (likely(PyList_CheckExact(__pyx_t_1))) {
+          if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_1)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        }
+      } else {
+        __pyx_t_7 = __pyx_t_14(__pyx_t_1);
+        if (unlikely(!__pyx_t_7)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_7);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_7);
+      __pyx_t_7 = 0;
+
+      /* "utils.pyx":694
+ *             newSlice = [slice(None, None, None)]
+ *             for n in range(1, len(start)):   # skip dimension 0
+ *                 s = slice(start[n],start[n] + count[n] * stride[n], stride[n])             # <<<<<<<<<<<<<<
+ *                 newSlice.append(s)
+ * 
+ */
+      __pyx_t_7 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_4 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_2 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_12 = PyNumber_Multiply(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_t_12); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __pyx_t_12 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_12);
+      __pyx_t_4 = PySlice_New(__pyx_t_7, __pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_s, ((PyObject*)__pyx_t_4));
+      __pyx_t_4 = 0;
+
+      /* "utils.pyx":695
+ *             for n in range(1, len(start)):   # skip dimension 0
+ *                 s = slice(start[n],start[n] + count[n] * stride[n], stride[n])
+ *                 newSlice.append(s)             # <<<<<<<<<<<<<<
+ * 
+ *             # Apply the slicing expression to each var in turn, extracting records
+ */
+      __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_newSlice, __pyx_v_s); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+      /* "utils.pyx":693
+ *             # Rebuild the slicing expression for dimensions 1 and ssq.
+ *             newSlice = [slice(None, None, None)]
+ *             for n in range(1, len(start)):   # skip dimension 0             # <<<<<<<<<<<<<<
+ *                 s = slice(start[n],start[n] + count[n] * stride[n], stride[n])
+ *                 newSlice.append(s)
+ */
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "utils.pyx":699
+ *             # Apply the slicing expression to each var in turn, extracting records
+ *             # in a list of arrays.
+ *             lstArr = []             # <<<<<<<<<<<<<<
+ *             ismasked = False
+ *             for n in range(nv):
+ */
+    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_XDECREF_SET(__pyx_v_lstArr, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "utils.pyx":700
+ *             # in a list of arrays.
+ *             lstArr = []
+ *             ismasked = False             # <<<<<<<<<<<<<<
+ *             for n in range(nv):
+ *                 # Get the list of indices for variable 'n'.
+ */
+    __pyx_v_ismasked = 0;
+
+    /* "utils.pyx":701
+ *             lstArr = []
+ *             ismasked = False
+ *             for n in range(nv):             # <<<<<<<<<<<<<<
+ *                 # Get the list of indices for variable 'n'.
+ *                 idx = [i for i,numv in lst if numv == n]
+ */
+    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_nv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+      __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_13 = 0;
+      __pyx_t_14 = NULL;
+    } else {
+      __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_14 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    for (;;) {
+      if (likely(!__pyx_t_14)) {
+        if (likely(PyList_CheckExact(__pyx_t_4))) {
+          if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_4)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        }
+      } else {
+        __pyx_t_1 = __pyx_t_14(__pyx_t_4);
+        if (unlikely(!__pyx_t_1)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_1);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_1);
+      __pyx_t_1 = 0;
+
+      /* "utils.pyx":703
+ *             for n in range(nv):
+ *                 # Get the list of indices for variable 'n'.
+ *                 idx = [i for i,numv in lst if numv == n]             # <<<<<<<<<<<<<<
+ *                 if idx:
+ *                     # Rebuild slicing expression for dimension 0.
+ */
+      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
+        __pyx_t_12 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_12); __pyx_t_16 = 0;
+        __pyx_t_17 = NULL;
+      } else {
+        __pyx_t_16 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
+        __pyx_t_17 = Py_TYPE(__pyx_t_12)->tp_iternext; if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      for (;;) {
+        if (likely(!__pyx_t_17)) {
+          if (likely(PyList_CheckExact(__pyx_t_12))) {
+            if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_12)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_16); __Pyx_INCREF(__pyx_t_2); __pyx_t_16++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_2 = PySequence_ITEM(__pyx_t_12, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          } else {
+            if (__pyx_t_16 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_16); __Pyx_INCREF(__pyx_t_2); __pyx_t_16++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_2 = PySequence_ITEM(__pyx_t_12, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          }
+        } else {
+          __pyx_t_2 = __pyx_t_17(__pyx_t_12);
+          if (unlikely(!__pyx_t_2)) {
+            PyObject* exc_type = PyErr_Occurred();
+            if (exc_type) {
+              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+              else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            break;
+          }
+          __Pyx_GOTREF(__pyx_t_2);
+        }
+        if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
+          PyObject* sequence = __pyx_t_2;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          Py_ssize_t size = Py_SIZE(sequence);
+          #else
+          Py_ssize_t size = PySequence_Size(sequence);
+          #endif
+          if (unlikely(size != 2)) {
+            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          #if CYTHON_COMPILING_IN_CPYTHON
+          if (likely(PyTuple_CheckExact(sequence))) {
+            __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
+            __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
+          } else {
+            __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
+            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
+          }
+          __Pyx_INCREF(__pyx_t_7);
+          __Pyx_INCREF(__pyx_t_3);
+          #else
+          __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          #endif
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        } else {
+          Py_ssize_t index = -1;
+          __pyx_t_18 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_18);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __pyx_t_8 = Py_TYPE(__pyx_t_18)->tp_iternext;
+          index = 0; __pyx_t_7 = __pyx_t_8(__pyx_t_18); if (unlikely(!__pyx_t_7)) goto __pyx_L33_unpacking_failed;
+          __Pyx_GOTREF(__pyx_t_7);
+          index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_18); if (unlikely(!__pyx_t_3)) goto __pyx_L33_unpacking_failed;
+          __Pyx_GOTREF(__pyx_t_3);
+          if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_18), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_8 = NULL;
+          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+          goto __pyx_L34_unpacking_done;
+          __pyx_L33_unpacking_failed:;
+          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+          __pyx_t_8 = NULL;
+          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_L34_unpacking_done:;
+        }
+        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7);
+        __pyx_t_7 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_numv, __pyx_t_3);
+        __pyx_t_3 = 0;
+        __pyx_t_2 = PyObject_RichCompare(__pyx_v_numv, __pyx_v_n, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        if (__pyx_t_10) {
+          if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_i))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          goto __pyx_L35;
+        }
+        __pyx_L35:;
+      }
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __Pyx_DECREF_SET(__pyx_v_idx, ((PyObject*)__pyx_t_1));
+      __pyx_t_1 = 0;
+
+      /* "utils.pyx":704
+ *                 # Get the list of indices for variable 'n'.
+ *                 idx = [i for i,numv in lst if numv == n]
+ *                 if idx:             # <<<<<<<<<<<<<<
+ *                     # Rebuild slicing expression for dimension 0.
+ *                     newSlice[0] = slice(idx[0], idx[-1] + 1, step)
+ */
+      __pyx_t_10 = (__pyx_v_idx != Py_None) && (PyList_GET_SIZE(__pyx_v_idx) != 0);
+      if (__pyx_t_10) {
+
+        /* "utils.pyx":706
+ *                 if idx:
+ *                     # Rebuild slicing expression for dimension 0.
+ *                     newSlice[0] = slice(idx[0], idx[-1] + 1, step)             # <<<<<<<<<<<<<<
+ *                     # Extract records from the var, and append them to a list
+ *                     # of arrays.
+ */
+        __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_idx, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_idx, -1, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_12);
+        __pyx_t_2 = PyNumber_Add(__pyx_t_12, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        __pyx_t_12 = PySlice_New(__pyx_t_1, __pyx_t_2, __pyx_v_step); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        if (unlikely(__Pyx_SetItemInt(__pyx_v_newSlice, 0, __pyx_t_12, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+
+        /* "utils.pyx":709
+ *                     # Extract records from the var, and append them to a list
+ *                     # of arrays.
+ *                     dat = Variable.__getitem__(self._recVar[n],tuple(newSlice))             # <<<<<<<<<<<<<<
+ *                     if ma.isMA(dat) and not ismasked:
+ *                         ismasked=True
+ */
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Variable)), __pyx_n_s_getitem); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_n); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = PyList_AsTuple(__pyx_v_newSlice); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_7 = NULL;
+        __pyx_t_16 = 0;
+        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+          if (likely(__pyx_t_7)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+            __Pyx_INCREF(__pyx_t_7);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_2, function);
+            __pyx_t_16 = 1;
+          }
+        }
+        __pyx_t_18 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_18);
+        if (__pyx_t_7) {
+          PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+        }
+        PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_16, __pyx_t_3);
+        __Pyx_GIVEREF(__pyx_t_3);
+        PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_16, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
+        __pyx_t_3 = 0;
+        __pyx_t_1 = 0;
+        __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_18, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
+        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_dat, __pyx_t_12);
+        __pyx_t_12 = 0;
+
+        /* "utils.pyx":710
+ *                     # of arrays.
+ *                     dat = Variable.__getitem__(self._recVar[n],tuple(newSlice))
+ *                     if ma.isMA(dat) and not ismasked:             # <<<<<<<<<<<<<<
+ *                         ismasked=True
+ *                         fill_value = dat.fill_value
+ */
+        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isMA); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_18);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_18))) {
+          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_18);
+          if (likely(__pyx_t_2)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
+            __Pyx_INCREF(__pyx_t_2);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_18, function);
+          }
+        }
+        if (!__pyx_t_2) {
+          __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_v_dat); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+        } else {
+          __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_1);
+          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+          __Pyx_INCREF(__pyx_v_dat);
+          PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_dat);
+          __Pyx_GIVEREF(__pyx_v_dat);
+          __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_1, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        if (__pyx_t_11) {
+        } else {
+          __pyx_t_10 = __pyx_t_11;
+          goto __pyx_L38_bool_binop_done;
+        }
+        __pyx_t_11 = ((!(__pyx_v_ismasked != 0)) != 0);
+        __pyx_t_10 = __pyx_t_11;
+        __pyx_L38_bool_binop_done:;
+        if (__pyx_t_10) {
+
+          /* "utils.pyx":711
+ *                     dat = Variable.__getitem__(self._recVar[n],tuple(newSlice))
+ *                     if ma.isMA(dat) and not ismasked:
+ *                         ismasked=True             # <<<<<<<<<<<<<<
+ *                         fill_value = dat.fill_value
+ *                     lstArr.append(dat)
+ */
+          __pyx_v_ismasked = 1;
+
+          /* "utils.pyx":712
+ *                     if ma.isMA(dat) and not ismasked:
+ *                         ismasked=True
+ *                         fill_value = dat.fill_value             # <<<<<<<<<<<<<<
+ *                     lstArr.append(dat)
+ *             if ismasked:
+ */
+          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_dat, __pyx_n_s_fill_value); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          __Pyx_XDECREF_SET(__pyx_v_fill_value, __pyx_t_12);
+          __pyx_t_12 = 0;
+          goto __pyx_L37;
+        }
+        __pyx_L37:;
+
+        /* "utils.pyx":713
+ *                         ismasked=True
+ *                         fill_value = dat.fill_value
+ *                     lstArr.append(dat)             # <<<<<<<<<<<<<<
+ *             if ismasked:
+ *                 lstArr = ma.concatenate(lstArr)
+ */
+        __pyx_t_15 = __Pyx_PyObject_Append(__pyx_v_lstArr, __pyx_v_dat); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        goto __pyx_L36;
+      }
+      __pyx_L36:;
+
+      /* "utils.pyx":701
+ *             lstArr = []
+ *             ismasked = False
+ *             for n in range(nv):             # <<<<<<<<<<<<<<
+ *                 # Get the list of indices for variable 'n'.
+ *                 idx = [i for i,numv in lst if numv == n]
+ */
+    }
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "utils.pyx":714
+ *                         fill_value = dat.fill_value
+ *                     lstArr.append(dat)
+ *             if ismasked:             # <<<<<<<<<<<<<<
+ *                 lstArr = ma.concatenate(lstArr)
+ *             else:
+ */
+    __pyx_t_10 = (__pyx_v_ismasked != 0);
+    if (__pyx_t_10) {
+
+      /* "utils.pyx":715
+ *                     lstArr.append(dat)
+ *             if ismasked:
+ *                 lstArr = ma.concatenate(lstArr)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 lstArr = numpy.concatenate(lstArr)
+ */
+      __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
+      __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_concatenate); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_18);
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __pyx_t_12 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_18))) {
+        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_18);
+        if (likely(__pyx_t_12)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
+          __Pyx_INCREF(__pyx_t_12);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_18, function);
+        }
+      }
+      if (!__pyx_t_12) {
+        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_v_lstArr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+      } else {
+        __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = NULL;
+        __Pyx_INCREF(__pyx_v_lstArr);
+        PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_lstArr);
+        __Pyx_GIVEREF(__pyx_v_lstArr);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+      __Pyx_DECREF_SET(__pyx_v_lstArr, __pyx_t_4);
+      __pyx_t_4 = 0;
+      goto __pyx_L40;
+    }
+    /*else*/ {
+
+      /* "utils.pyx":717
+ *                 lstArr = ma.concatenate(lstArr)
+ *             else:
+ *                 lstArr = numpy.concatenate(lstArr)             # <<<<<<<<<<<<<<
+ *             if lstArr.dtype != data.dtype: data = data.astype(lstArr.dtype)
+ *             # sometimes there are legitimate singleton dimensions, in which
+ */
+      __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_18);
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_concatenate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+      __pyx_t_18 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+        __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_1);
+        if (likely(__pyx_t_18)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+          __Pyx_INCREF(__pyx_t_18);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_1, function);
+        }
+      }
+      if (!__pyx_t_18) {
+        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_lstArr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+      } else {
+        __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
+        PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = NULL;
+        __Pyx_INCREF(__pyx_v_lstArr);
+        PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_lstArr);
+        __Pyx_GIVEREF(__pyx_v_lstArr);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF_SET(__pyx_v_lstArr, __pyx_t_4);
+      __pyx_t_4 = 0;
+    }
+    __pyx_L40:;
+
+    /* "utils.pyx":718
+ *             else:
+ *                 lstArr = numpy.concatenate(lstArr)
+ *             if lstArr.dtype != data.dtype: data = data.astype(lstArr.dtype)             # <<<<<<<<<<<<<<
+ *             # sometimes there are legitimate singleton dimensions, in which
+ *             # case the array shapes won't conform. If so, a ValueError will
+ */
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_12 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+    if (__pyx_t_10) {
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_18 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+        __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_1);
+        if (likely(__pyx_t_18)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+          __Pyx_INCREF(__pyx_t_18);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_1, function);
+        }
+      }
+      if (!__pyx_t_18) {
+        __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_GOTREF(__pyx_t_12);
+      } else {
+        __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = NULL;
+        PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_4);
+        __Pyx_GIVEREF(__pyx_t_4);
+        __pyx_t_4 = 0;
+        __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_12);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_12);
+      __pyx_t_12 = 0;
+      goto __pyx_L41;
+    }
+    __pyx_L41:;
+
+    /* "utils.pyx":722
+ *             # case the array shapes won't conform. If so, a ValueError will
+ *             # result, and no squeeze will be done.
+ *             try:             # <<<<<<<<<<<<<<
+ *                 data[tuple(ind)] = lstArr.squeeze()
+ *             except ValueError:
+ */
+    {
+      __Pyx_ExceptionSave(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
+      __Pyx_XGOTREF(__pyx_t_19);
+      __Pyx_XGOTREF(__pyx_t_20);
+      __Pyx_XGOTREF(__pyx_t_21);
+      /*try:*/ {
+
+        /* "utils.pyx":723
+ *             # result, and no squeeze will be done.
+ *             try:
+ *                 data[tuple(ind)] = lstArr.squeeze()             # <<<<<<<<<<<<<<
+ *             except ValueError:
+ *                 data[tuple(ind)] = lstArr
+ */
+        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L42_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_2 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+          if (likely(__pyx_t_2)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+            __Pyx_INCREF(__pyx_t_2);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_1, function);
+          }
+        }
+        if (__pyx_t_2) {
+          __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L42_error;}
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        } else {
+          __pyx_t_12 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L42_error;}
+        }
+        __Pyx_GOTREF(__pyx_t_12);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = PySequence_Tuple(__pyx_v_ind); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L42_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_t_1, __pyx_t_12) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L42_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      }
+      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
+      __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
+      __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
+      goto __pyx_L49_try_end;
+      __pyx_L42_error:;
+      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+
+      /* "utils.pyx":724
+ *             try:
+ *                 data[tuple(ind)] = lstArr.squeeze()
+ *             except ValueError:             # <<<<<<<<<<<<<<
+ *                 data[tuple(ind)] = lstArr
+ * 
+ */
+      __pyx_t_22 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
+      if (__pyx_t_22) {
+        __Pyx_AddTraceback("netCDF4._Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_1, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L44_except_error;}
+        __Pyx_GOTREF(__pyx_t_12);
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_GOTREF(__pyx_t_2);
+
+        /* "utils.pyx":725
+ *                 data[tuple(ind)] = lstArr.squeeze()
+ *             except ValueError:
+ *                 data[tuple(ind)] = lstArr             # <<<<<<<<<<<<<<
+ * 
+ *         # Remove extra singleton dimensions.
+ */
+        __pyx_t_4 = PySequence_Tuple(__pyx_v_ind); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L44_except_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_t_4, __pyx_v_lstArr) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L44_except_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        goto __pyx_L43_exception_handled;
+      }
+      goto __pyx_L44_except_error;
+      __pyx_L44_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_19);
+      __Pyx_XGIVEREF(__pyx_t_20);
+      __Pyx_XGIVEREF(__pyx_t_21);
+      __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
+      goto __pyx_L1_error;
+      __pyx_L43_exception_handled:;
+      __Pyx_XGIVEREF(__pyx_t_19);
+      __Pyx_XGIVEREF(__pyx_t_20);
+      __Pyx_XGIVEREF(__pyx_t_21);
+      __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
+      __pyx_L49_try_end:;
+    }
+
+    /* "utils.pyx":664
+ *         # Number of variables making up the MFVariable.Variable.
+ *         nv = len(self._recLen)
+ *         for (start,count,stride,ind) in zip(strt, cnt, strd, put_ind):             # <<<<<<<<<<<<<<
+ *             # make sure count=-1 becomes count=1
+ *             count = [abs(cnt) for cnt in count]
+ */
+  }
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+  /* "utils.pyx":728
+ * 
+ *         # Remove extra singleton dimensions.
+ *         data = data[tuple(squeeze)]             # <<<<<<<<<<<<<<
+ * 
+ *         # if no masked elements, return numpy array.
+ */
+  __pyx_t_6 = PySequence_Tuple(__pyx_v_squeeze); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_2 = PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "utils.pyx":731
+ * 
+ *         # if no masked elements, return numpy array.
+ *         if ma.isMA(data) and not data.mask.any():             # <<<<<<<<<<<<<<
+ *            data = data.filled()
+ * 
+ */
+  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_isMA); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_6 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_6)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_6);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+    }
+  }
+  if (!__pyx_t_6) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+  } else {
+    __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_12);
+    PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+    __Pyx_INCREF(__pyx_v_data);
+    PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_data);
+    __Pyx_GIVEREF(__pyx_v_data);
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (__pyx_t_11) {
+  } else {
+    __pyx_t_10 = __pyx_t_11;
+    goto __pyx_L53_bool_binop_done;
+  }
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_any); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_12);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_12))) {
+    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12);
+    if (likely(__pyx_t_1)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+      __Pyx_INCREF(__pyx_t_1);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_12, function);
+    }
+  }
+  if (__pyx_t_1) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  } else {
+    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_23 = ((!__pyx_t_11) != 0);
+  __pyx_t_10 = __pyx_t_23;
+  __pyx_L53_bool_binop_done:;
+  if (__pyx_t_10) {
+
+    /* "utils.pyx":732
+ *         # if no masked elements, return numpy array.
+ *         if ma.isMA(data) and not data.mask.any():
+ *            data = data.filled()             # <<<<<<<<<<<<<<
+ * 
+ *         return data
+ */
+    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_filled); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_12);
+    __pyx_t_1 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_12))) {
+      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12);
+      if (likely(__pyx_t_1)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+        __Pyx_INCREF(__pyx_t_1);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_12, function);
+      }
+    }
+    if (__pyx_t_1) {
+      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    } else {
+      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+    __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
+    __pyx_t_2 = 0;
+    goto __pyx_L52;
+  }
+  __pyx_L52:;
+
+  /* "utils.pyx":734
+ *            data = data.filled()
+ * 
+ *         return data             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_data);
+  __pyx_r = __pyx_v_data;
+  goto __pyx_L0;
+
+  /* "utils.pyx":633
+ *         for v in self._recVar:
+ *             v.set_auto_maskandscale(val)
+ *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
+ *         """Get records from a concatenated set of variables."""
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_12);
+  __Pyx_XDECREF(__pyx_t_18);
+  __Pyx_AddTraceback("netCDF4._Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_start);
+  __Pyx_XDECREF(__pyx_v_count);
+  __Pyx_XDECREF(__pyx_v_stride);
+  __Pyx_XDECREF(__pyx_v_put_ind);
+  __Pyx_XDECREF(__pyx_v_datashape);
+  __Pyx_XDECREF(__pyx_v_data);
+  __Pyx_XDECREF(__pyx_v_squeeze);
+  __Pyx_XDECREF(__pyx_v_i);
+  __Pyx_XDECREF(__pyx_v_n);
+  __Pyx_XDECREF(__pyx_v_strt);
+  __Pyx_XDECREF(__pyx_v_cnt);
+  __Pyx_XDECREF(__pyx_v_strd);
+  __Pyx_XDECREF(__pyx_v_ind);
+  __Pyx_XDECREF(__pyx_v_sta);
+  __Pyx_XDECREF(__pyx_v_step);
+  __Pyx_XDECREF(__pyx_v_stop);
+  __Pyx_XDECREF(__pyx_v_idx);
+  __Pyx_XDECREF(__pyx_v_vid);
+  __Pyx_XDECREF(__pyx_v_k);
+  __Pyx_XDECREF(__pyx_v_lst);
+  __Pyx_XDECREF(__pyx_v_newSlice);
+  __Pyx_XDECREF(__pyx_v_s);
+  __Pyx_XDECREF(__pyx_v_lstArr);
+  __Pyx_XDECREF(__pyx_v_dat);
+  __Pyx_XDECREF(__pyx_v_fill_value);
+  __Pyx_XDECREF(__pyx_v_numv);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":773
+ *     """
+ * 
+ *     def __init__(self, time, units=None):             # <<<<<<<<<<<<<<
+ *         """
+ * Create a time Variable with units consistent across a multifile
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_6MFTime_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_6MFTime___init__[] = "\nCreate a time Variable with units consistent across a multifile \ndataset.\n\n at param time: Time variable from a MFDataset. \n\n at keyword units: Time units, for example, 'days since 1979-01-01'. If None, use\nthe units from the master variable. \n        ";
+static PyMethodDef __pyx_mdef_7netCDF4_6MFTime_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7netCDF4_6MFTime_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_6MFTime___init__};
+static PyObject *__pyx_pw_7netCDF4_6MFTime_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_self = 0;
+  PyObject *__pyx_v_time = 0;
+  PyObject *__pyx_v_units = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_time,&__pyx_n_s_units,0};
+    PyObject* values[3] = {0,0,0};
+    values[2] = ((PyObject *)((PyObject *)Py_None));
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_units);
+          if (value) { values[2] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_self = values[0];
+    __pyx_v_time = values[1];
+    __pyx_v_units = values[2];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.MFTime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_6MFTime___init__(__pyx_self, __pyx_v_self, __pyx_v_time, __pyx_v_units);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_6MFTime___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_time, PyObject *__pyx_v_units) {
+  PyObject *__pyx_v_datetime = NULL;
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_v_value = NULL;
+  PyObject *__pyx_v_t = NULL;
+  PyObject *__pyx_v_ref_date = NULL;
+  PyObject *__pyx_v_ref_num = NULL;
+  PyObject *__pyx_v_i0 = NULL;
+  PyObject *__pyx_v_i1 = NULL;
+  PyObject *__pyx_v_i = NULL;
+  PyObject *__pyx_v_v = NULL;
+  PyObject *__pyx_v_n = NULL;
+  PyObject *__pyx_v_num = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  Py_ssize_t __pyx_t_4;
+  PyObject *(*__pyx_t_5)(PyObject *);
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *(*__pyx_t_8)(PyObject *);
+  int __pyx_t_9;
+  int __pyx_t_10;
+  PyObject *__pyx_t_11 = NULL;
+  PyObject *__pyx_t_12 = NULL;
+  Py_ssize_t __pyx_t_13;
+  PyObject *__pyx_t_14 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__init__", 0);
+
+  /* "utils.pyx":783
+ * the units from the master variable.
+ *         """
+ *         import datetime             # <<<<<<<<<<<<<<
+ *         self.__time = time
+ * 
+ */
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_datetime, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_datetime = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "utils.pyx":784
+ *         """
+ *         import datetime
+ *         self.__time = time             # <<<<<<<<<<<<<<
+ * 
+ *         # copy attributes from master time variable.
+ */
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__time, __pyx_v_time) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":787
+ * 
+ *         # copy attributes from master time variable.
+ *         for name, value in time.__dict__.items():             # <<<<<<<<<<<<<<
+ *             self.__dict__[name] = value
+ * 
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_2)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+    }
+  }
+  if (__pyx_t_2) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
+  } else {
+    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_5)) {
+      if (likely(PyList_CheckExact(__pyx_t_3))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_1 = __pyx_t_5(__pyx_t_3);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+      PyObject* sequence = __pyx_t_1;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
+      } else {
+        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
+      }
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_6);
+      #else
+      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      #endif
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
+      index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_2);
+      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_6);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = NULL;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      goto __pyx_L6_unpacking_done;
+      __pyx_L5_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_8 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L6_unpacking_done:;
+    }
+    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2);
+    __pyx_t_2 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
+    __pyx_t_6 = 0;
+
+    /* "utils.pyx":788
+ *         # copy attributes from master time variable.
+ *         for name, value in time.__dict__.items():
+ *             self.__dict__[name] = value             # <<<<<<<<<<<<<<
+ * 
+ *         # make sure calendar attribute present in all files.
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "utils.pyx":787
+ * 
+ *         # copy attributes from master time variable.
+ *         for name, value in time.__dict__.items():             # <<<<<<<<<<<<<<
+ *             self.__dict__[name] = value
+ * 
+ */
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "utils.pyx":791
+ * 
+ *         # make sure calendar attribute present in all files.
+ *         for t in self._recVar:             # <<<<<<<<<<<<<<
+ *             if not hasattr(t,'calendar'):
+ *                 raise ValueError('MFTime requires that the time variable in all files have a calendar attribute')
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+    __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
+  } else {
+    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_5)) {
+      if (likely(PyList_CheckExact(__pyx_t_1))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_3 = __pyx_t_5(__pyx_t_1);
+      if (unlikely(!__pyx_t_3)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_3);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3);
+    __pyx_t_3 = 0;
+
+    /* "utils.pyx":792
+ *         # make sure calendar attribute present in all files.
+ *         for t in self._recVar:
+ *             if not hasattr(t,'calendar'):             # <<<<<<<<<<<<<<
+ *                 raise ValueError('MFTime requires that the time variable in all files have a calendar attribute')
+ * 
+ */
+    __pyx_t_9 = PyObject_HasAttr(__pyx_v_t, __pyx_n_s_calendar); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = ((!(__pyx_t_9 != 0)) != 0);
+    if (__pyx_t_10) {
+
+      /* "utils.pyx":793
+ *         for t in self._recVar:
+ *             if not hasattr(t,'calendar'):
+ *                 raise ValueError('MFTime requires that the time variable in all files have a calendar attribute')             # <<<<<<<<<<<<<<
+ * 
+ *         # Check that calendar is the same in all files.
+ */
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "utils.pyx":791
+ * 
+ *         # make sure calendar attribute present in all files.
+ *         for t in self._recVar:             # <<<<<<<<<<<<<<
+ *             if not hasattr(t,'calendar'):
+ *                 raise ValueError('MFTime requires that the time variable in all files have a calendar attribute')
+ */
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "utils.pyx":796
+ * 
+ *         # Check that calendar is the same in all files.
+ *         if len(set([t.calendar for t in self._recVar])) > 1:             # <<<<<<<<<<<<<<
+ *             raise ValueError('MFTime requires that the same time calendar is used by all files.')
+ * 
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+    __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
+  } else {
+    __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_5)) {
+      if (likely(PyList_CheckExact(__pyx_t_6))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_3 = __pyx_t_5(__pyx_t_6);
+      if (unlikely(!__pyx_t_3)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_3);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_calendar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_6 = PySet_New(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_4 = PySet_Size(__pyx_t_6); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_10 = ((__pyx_t_4 > 1) != 0);
+  if (__pyx_t_10) {
+
+    /* "utils.pyx":797
+ *         # Check that calendar is the same in all files.
+ *         if len(set([t.calendar for t in self._recVar])) > 1:
+ *             raise ValueError('MFTime requires that the same time calendar is used by all files.')             # <<<<<<<<<<<<<<
+ * 
+ *         # Override units if units is specified.
+ */
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "utils.pyx":800
+ * 
+ *         # Override units if units is specified.
+ *         self.units = units or time.units             # <<<<<<<<<<<<<<
+ * 
+ *         # Reference date to compute the difference between different time units.
+ */
+  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_units); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_10) {
+  } else {
+    __Pyx_INCREF(__pyx_v_units);
+    __pyx_t_6 = __pyx_v_units;
+    goto __pyx_L13_bool_binop_done;
+  }
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_units); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_t_6 = __pyx_t_1;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_L13_bool_binop_done:;
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_units, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+  /* "utils.pyx":803
+ * 
+ *         # Reference date to compute the difference between different time units.
+ *         ref_date = datetime.datetime(1900,1,1)             # <<<<<<<<<<<<<<
+ *         ref_num = date2num(ref_date, self.units, self.calendar)
+ * 
+ */
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_n_s_datetime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_v_ref_date = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "utils.pyx":804
+ *         # Reference date to compute the difference between different time units.
+ *         ref_date = datetime.datetime(1900,1,1)
+ *         ref_num = date2num(ref_date, self.units, self.calendar)             # <<<<<<<<<<<<<<
+ * 
+ *         # Create delta vector: delta = ref_num(ref_date) - num(ref_date)
+ */
+  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_7 = NULL;
+  __pyx_t_4 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_7)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_7);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+      __pyx_t_4 = 1;
+    }
+  }
+  __pyx_t_11 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+  if (__pyx_t_7) {
+    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+  }
+  __Pyx_INCREF(__pyx_v_ref_date);
+  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_4, __pyx_v_ref_date);
+  __Pyx_GIVEREF(__pyx_v_ref_date);
+  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_4, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_4, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_3 = 0;
+  __pyx_t_2 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_v_ref_num = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "utils.pyx":808
+ *         # Create delta vector: delta = ref_num(ref_date) - num(ref_date)
+ *         # So that ref_num(date) = num(date) + delta
+ *         self.__delta = numpy.empty(len(self), time.dtype)             # <<<<<<<<<<<<<<
+ * 
+ *         i0 = 0; i1 = 0
+ */
+  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_4 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = NULL;
+  __pyx_t_4 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_11, function);
+      __pyx_t_4 = 1;
+    }
+  }
+  __pyx_t_7 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (__pyx_t_3) {
+    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+  }
+  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_4, __pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_4, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_6 = 0;
+  __pyx_t_2 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__delta, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "utils.pyx":810
+ *         self.__delta = numpy.empty(len(self), time.dtype)
+ * 
+ *         i0 = 0; i1 = 0             # <<<<<<<<<<<<<<
+ *         for i,v in enumerate(self._recVar):
+ *             n = self._recLen[i] # Length of time vector.
+ */
+  __Pyx_INCREF(__pyx_int_0);
+  __pyx_v_i0 = __pyx_int_0;
+  __Pyx_INCREF(__pyx_int_0);
+  __pyx_v_i1 = __pyx_int_0;
+
+  /* "utils.pyx":811
+ * 
+ *         i0 = 0; i1 = 0
+ *         for i,v in enumerate(self._recVar):             # <<<<<<<<<<<<<<
+ *             n = self._recLen[i] # Length of time vector.
+ *             num = date2num(ref_date, v.units, self.calendar)
+ */
+  __Pyx_INCREF(__pyx_int_0);
+  __pyx_t_1 = __pyx_int_0;
+  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+  if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
+    __pyx_t_7 = __pyx_t_11; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
+  } else {
+    __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_5)) {
+      if (likely(PyList_CheckExact(__pyx_t_7))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_11 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_11); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_11 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_11); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_11 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_11 = __pyx_t_5(__pyx_t_7);
+      if (unlikely(!__pyx_t_11)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_11);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_11);
+    __pyx_t_11 = 0;
+    __Pyx_INCREF(__pyx_t_1);
+    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+    __pyx_t_11 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
+    __Pyx_DECREF(__pyx_t_1);
+    __pyx_t_1 = __pyx_t_11;
+    __pyx_t_11 = 0;
+
+    /* "utils.pyx":812
+ *         i0 = 0; i1 = 0
+ *         for i,v in enumerate(self._recVar):
+ *             n = self._recLen[i] # Length of time vector.             # <<<<<<<<<<<<<<
+ *             num = date2num(ref_date, v.units, self.calendar)
+ *             i1 += n
+ */
+    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
+    __pyx_t_2 = PyObject_GetItem(__pyx_t_11, __pyx_v_i); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_2);
+    __pyx_t_2 = 0;
+
+    /* "utils.pyx":813
+ *         for i,v in enumerate(self._recVar):
+ *             n = self._recLen[i] # Length of time vector.
+ *             num = date2num(ref_date, v.units, self.calendar)             # <<<<<<<<<<<<<<
+ *             i1 += n
+ *             self.__delta[i0:i1] = ref_num - num
+ */
+    __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_units); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_12 = NULL;
+    __pyx_t_13 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) {
+      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
+      if (likely(__pyx_t_12)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+        __Pyx_INCREF(__pyx_t_12);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_11, function);
+        __pyx_t_13 = 1;
+      }
+    }
+    __pyx_t_14 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_14);
+    if (__pyx_t_12) {
+      PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_ref_date);
+    PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_v_ref_date);
+    __Pyx_GIVEREF(__pyx_v_ref_date);
+    PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
+    PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_13, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_6 = 0;
+    __pyx_t_3 = 0;
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_num, __pyx_t_2);
+    __pyx_t_2 = 0;
+
+    /* "utils.pyx":814
+ *             n = self._recLen[i] # Length of time vector.
+ *             num = date2num(ref_date, v.units, self.calendar)
+ *             i1 += n             # <<<<<<<<<<<<<<
+ *             self.__delta[i0:i1] = ref_num - num
+ *             i0 += n
+ */
+    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i1, __pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF_SET(__pyx_v_i1, __pyx_t_2);
+    __pyx_t_2 = 0;
+
+    /* "utils.pyx":815
+ *             num = date2num(ref_date, v.units, self.calendar)
+ *             i1 += n
+ *             self.__delta[i0:i1] = ref_num - num             # <<<<<<<<<<<<<<
+ *             i0 += n
+ * 
+ */
+    __pyx_t_2 = PyNumber_Subtract(__pyx_v_ref_num, __pyx_v_num); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__delta); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
+    if (__Pyx_PyObject_SetSlice(__pyx_t_11, __pyx_t_2, 0, 0, &__pyx_v_i0, &__pyx_v_i1, NULL, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+    /* "utils.pyx":816
+ *             i1 += n
+ *             self.__delta[i0:i1] = ref_num - num
+ *             i0 += n             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i0, __pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF_SET(__pyx_v_i0, __pyx_t_2);
+    __pyx_t_2 = 0;
+
+    /* "utils.pyx":811
+ * 
+ *         i0 = 0; i1 = 0
+ *         for i,v in enumerate(self._recVar):             # <<<<<<<<<<<<<<
+ *             n = self._recLen[i] # Length of time vector.
+ *             num = date2num(ref_date, v.units, self.calendar)
+ */
+  }
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "utils.pyx":773
+ *     """
+ * 
+ *     def __init__(self, time, units=None):             # <<<<<<<<<<<<<<
+ *         """
+ * Create a time Variable with units consistent across a multifile
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_XDECREF(__pyx_t_12);
+  __Pyx_XDECREF(__pyx_t_14);
+  __Pyx_AddTraceback("netCDF4.MFTime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_datetime);
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XDECREF(__pyx_v_value);
+  __Pyx_XDECREF(__pyx_v_t);
+  __Pyx_XDECREF(__pyx_v_ref_date);
+  __Pyx_XDECREF(__pyx_v_ref_num);
+  __Pyx_XDECREF(__pyx_v_i0);
+  __Pyx_XDECREF(__pyx_v_i1);
+  __Pyx_XDECREF(__pyx_v_i);
+  __Pyx_XDECREF(__pyx_v_v);
+  __Pyx_XDECREF(__pyx_v_n);
+  __Pyx_XDECREF(__pyx_v_num);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "utils.pyx":819
+ * 
+ * 
+ *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
+ *         return self.__time[elem] + self.__delta[elem]
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_6MFTime_3__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_6MFTime_3__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7netCDF4_6MFTime_3__getitem__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_6MFTime_3__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_self = 0;
+  PyObject *__pyx_v_elem = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_elem,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elem)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_self = values[0];
+    __pyx_v_elem = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.MFTime.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_6MFTime_2__getitem__(__pyx_self, __pyx_v_self, __pyx_v_elem);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_6MFTime_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_elem) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__getitem__", 0);
+
+  /* "utils.pyx":820
+ * 
+ *     def __getitem__(self, elem):
+ *         return self.__time[elem] + self.__delta[elem]             # <<<<<<<<<<<<<<
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_elem); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__delta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_elem); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "utils.pyx":819
+ * 
+ * 
+ *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
+ *         return self.__time[elem] + self.__delta[elem]
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4.MFTime.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":838
+ * # check for required version of netcdf-4 and hdf5.
+ * 
+ * def _gethdf5libversion():             # <<<<<<<<<<<<<<
+ *     majorvers = H5_VERS_MAJOR
+ *     minorvers = H5_VERS_MINOR
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_17_gethdf5libversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_17_gethdf5libversion = {"_gethdf5libversion", (PyCFunction)__pyx_pw_7netCDF4_17_gethdf5libversion, METH_NOARGS, 0};
+static PyObject *__pyx_pw_7netCDF4_17_gethdf5libversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_gethdf5libversion (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_16_gethdf5libversion(__pyx_self);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_16_gethdf5libversion(CYTHON_UNUSED PyObject *__pyx_self) {
+  int __pyx_v_majorvers;
+  int __pyx_v_minorvers;
+  int __pyx_v_releasevers;
+  PyObject *__pyx_v_patchstring = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_gethdf5libversion", 0);
+
+  /* "netCDF4.pyx":839
+ * 
+ * def _gethdf5libversion():
+ *     majorvers = H5_VERS_MAJOR             # <<<<<<<<<<<<<<
+ *     minorvers = H5_VERS_MINOR
+ *     releasevers = H5_VERS_RELEASE
+ */
+  __pyx_v_majorvers = H5_VERS_MAJOR;
+
+  /* "netCDF4.pyx":840
+ * def _gethdf5libversion():
+ *     majorvers = H5_VERS_MAJOR
+ *     minorvers = H5_VERS_MINOR             # <<<<<<<<<<<<<<
+ *     releasevers = H5_VERS_RELEASE
+ *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')
+ */
+  __pyx_v_minorvers = H5_VERS_MINOR;
+
+  /* "netCDF4.pyx":841
+ *     majorvers = H5_VERS_MAJOR
+ *     minorvers = H5_VERS_MINOR
+ *     releasevers = H5_VERS_RELEASE             # <<<<<<<<<<<<<<
+ *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')
+ *     if not patchstring:
+ */
+  __pyx_v_releasevers = H5_VERS_RELEASE;
+
+  /* "netCDF4.pyx":842
+ *     minorvers = H5_VERS_MINOR
+ *     releasevers = H5_VERS_RELEASE
+ *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')             # <<<<<<<<<<<<<<
+ *     if not patchstring:
+ *        return '%d.%d.%d' % (majorvers,minorvers,releasevers)
+ */
+  __pyx_t_1 = __Pyx_decode_c_string(H5_VERS_SUBRELEASE, 0, strlen(H5_VERS_SUBRELEASE), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_patchstring = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":843
+ *     releasevers = H5_VERS_RELEASE
+ *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')
+ *     if not patchstring:             # <<<<<<<<<<<<<<
+ *        return '%d.%d.%d' % (majorvers,minorvers,releasevers)
+ *     else:
+ */
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_patchstring); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = ((!__pyx_t_2) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":844
+ *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')
+ *     if not patchstring:
+ *        return '%d.%d.%d' % (majorvers,minorvers,releasevers)             # <<<<<<<<<<<<<<
+ *     else:
+ *        return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_majorvers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_minorvers); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_releasevers); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
+    __pyx_t_1 = 0;
+    __pyx_t_4 = 0;
+    __pyx_t_5 = 0;
+    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_d_d_d, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_r = __pyx_t_5;
+    __pyx_t_5 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":846
+ *        return '%d.%d.%d' % (majorvers,minorvers,releasevers)
+ *     else:
+ *        return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)             # <<<<<<<<<<<<<<
+ * 
+ * __netcdf4libversion__ = getlibversion().split()[0]
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_majorvers); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_minorvers); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_releasevers); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
+    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_v_patchstring);
+    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_patchstring);
+    __Pyx_GIVEREF(__pyx_v_patchstring);
+    __pyx_t_5 = 0;
+    __pyx_t_6 = 0;
+    __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_d_d_d_s, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_r = __pyx_t_4;
+    __pyx_t_4 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":838
+ * # check for required version of netcdf-4 and hdf5.
+ * 
+ * def _gethdf5libversion():             # <<<<<<<<<<<<<<
+ *     majorvers = H5_VERS_MAJOR
+ *     minorvers = H5_VERS_MINOR
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netCDF4._gethdf5libversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_patchstring);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":908
+ * # internal C functions.
+ * 
+ * cdef _get_att_names(int grpid, int varid):             # <<<<<<<<<<<<<<
+ *     # Private function to get all the attribute names in a group
+ *     cdef int ierr, numatts, n
+ */
+
+static PyObject *__pyx_f_7netCDF4__get_att_names(int __pyx_v_grpid, int __pyx_v_varid) {
+  int __pyx_v_ierr;
+  int __pyx_v_numatts;
+  int __pyx_v_n;
+  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
+  PyObject *__pyx_v_attslist = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  char *__pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  Py_ssize_t __pyx_t_9;
+  PyObject *__pyx_t_10 = NULL;
+  int __pyx_t_11;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_get_att_names", 0);
+
+  /* "netCDF4.pyx":912
+ *     cdef int ierr, numatts, n
+ *     cdef char namstring[NC_MAX_NAME+1]
+ *     if varid == NC_GLOBAL:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_natts(grpid, &numatts)
+ *     else:
+ */
+  __pyx_t_1 = ((__pyx_v_varid == NC_GLOBAL) != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":913
+ *     cdef char namstring[NC_MAX_NAME+1]
+ *     if varid == NC_GLOBAL:
+ *         ierr = nc_inq_natts(grpid, &numatts)             # <<<<<<<<<<<<<<
+ *     else:
+ *         ierr = nc_inq_varnatts(grpid, varid, &numatts)
+ */
+    __pyx_v_ierr = nc_inq_natts(__pyx_v_grpid, (&__pyx_v_numatts));
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":915
+ *         ierr = nc_inq_natts(grpid, &numatts)
+ *     else:
+ *         ierr = nc_inq_varnatts(grpid, varid, &numatts)             # <<<<<<<<<<<<<<
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+    __pyx_v_ierr = nc_inq_varnatts(__pyx_v_grpid, __pyx_v_varid, (&__pyx_v_numatts));
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":916
+ *     else:
+ *         ierr = nc_inq_varnatts(grpid, varid, &numatts)
+ *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     attslist = []
+ */
+  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":917
+ *         ierr = nc_inq_varnatts(grpid, varid, &numatts)
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *     attslist = []
+ *     for n from 0 <= n < numatts:
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":918
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     attslist = []             # <<<<<<<<<<<<<<
+ *     for n from 0 <= n < numatts:
+ *         ierr = nc_inq_attname(grpid, varid, n, namstring)
+ */
+  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_attslist = ((PyObject*)__pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":919
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     attslist = []
+ *     for n from 0 <= n < numatts:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_attname(grpid, varid, n, namstring)
+ *         if ierr != NC_NOERR:
+ */
+  __pyx_t_5 = __pyx_v_numatts;
+  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_5; __pyx_v_n++) {
+
+    /* "netCDF4.pyx":920
+ *     attslist = []
+ *     for n from 0 <= n < numatts:
+ *         ierr = nc_inq_attname(grpid, varid, n, namstring)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+    __pyx_v_ierr = nc_inq_attname(__pyx_v_grpid, __pyx_v_varid, __pyx_v_n, __pyx_v_namstring);
+
+    /* "netCDF4.pyx":921
+ *     for n from 0 <= n < numatts:
+ *         ierr = nc_inq_attname(grpid, varid, n, namstring)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         attslist.append(namstring.decode(default_encoding,unicode_error))
+ */
+    __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":922
+ *         ierr = nc_inq_attname(grpid, varid, n, namstring)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         attslist.append(namstring.decode(default_encoding,unicode_error))
+ *     return attslist
+ */
+      __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_3);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+      __Pyx_GIVEREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":923
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         attslist.append(namstring.decode(default_encoding,unicode_error))             # <<<<<<<<<<<<<<
+ *     return attslist
+ * 
+ */
+    __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_8 = NULL;
+    __pyx_t_9 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+      if (likely(__pyx_t_8)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_8);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_6, function);
+        __pyx_t_9 = 1;
+      }
+    }
+    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    if (__pyx_t_8) {
+      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+    }
+    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
+    __Pyx_GIVEREF(__pyx_t_7);
+    __pyx_t_4 = 0;
+    __pyx_t_7 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_attslist, __pyx_t_3); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  }
+
+  /* "netCDF4.pyx":924
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         attslist.append(namstring.decode(default_encoding,unicode_error))
+ *     return attslist             # <<<<<<<<<<<<<<
+ * 
+ * cdef _get_att(grp, int varid, name):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_attslist);
+  __pyx_r = __pyx_v_attslist;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":908
+ * # internal C functions.
+ * 
+ * cdef _get_att_names(int grpid, int varid):             # <<<<<<<<<<<<<<
+ *     # Private function to get all the attribute names in a group
+ *     cdef int ierr, numatts, n
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4._get_att_names", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_attslist);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":926
+ *     return attslist
+ * 
+ * cdef _get_att(grp, int varid, name):             # <<<<<<<<<<<<<<
+ *     # Private function to get an attribute value given its name
+ *     cdef int ierr, n
+ */
+
+static PyObject *__pyx_f_7netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_v_varid, PyObject *__pyx_v_name) {
+  int __pyx_v_ierr;
+  size_t __pyx_v_att_len;
+  char *__pyx_v_attname;
+  char *__pyx_v_stratt;
+  nc_type __pyx_v_att_type;
+  PyArrayObject *__pyx_v_value_arr = 0;
+  PyObject *__pyx_v_bytestr = NULL;
+  PyObject *__pyx_v_pstring = NULL;
+  PyObject *__pyx_v_type_att = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  char *__pyx_t_2;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  Py_ssize_t __pyx_t_8;
+  PyObject *__pyx_t_9 = NULL;
+  int __pyx_t_10;
+  PyObject *__pyx_t_11 = NULL;
+  PyObject *__pyx_t_12 = NULL;
+  PyObject *__pyx_t_13 = NULL;
+  PyObject *__pyx_t_14 = NULL;
+  PyObject *__pyx_t_15 = NULL;
+  PyObject *__pyx_t_16 = NULL;
+  PyObject *__pyx_t_17 = NULL;
+  PyObject *__pyx_t_18 = NULL;
+  PyObject *__pyx_t_19 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_get_att", 0);
+
+  /* "netCDF4.pyx":934
+ *     cdef nc_type att_type
+ *     cdef ndarray value_arr
+ *     bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *     attname = bytestr
+ *     ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)
+ */
+  __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_bytestr = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":935
+ *     cdef ndarray value_arr
+ *     bytestr = _strencode(name)
+ *     attname = bytestr             # <<<<<<<<<<<<<<
+ *     ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)
+ *     if ierr != NC_NOERR:
+ */
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_attname = __pyx_t_2;
+
+  /* "netCDF4.pyx":936
+ *     bytestr = _strencode(name)
+ *     attname = bytestr
+ *     ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)             # <<<<<<<<<<<<<<
+ *     if ierr != NC_NOERR:
+ *         raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_ierr = nc_inq_att(__pyx_t_3, __pyx_v_varid, __pyx_v_attname, (&__pyx_v_att_type), (&__pyx_v_att_len));
+
+  /* "netCDF4.pyx":937
+ *     attname = bytestr
+ *     ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)
+ *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *         raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     # attribute is a character or string ...
+ */
+  __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_4) {
+
+    /* "netCDF4.pyx":938
+ *     ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)
+ *     if ierr != NC_NOERR:
+ *         raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *     # attribute is a character or string ...
+ *     if att_type == NC_CHAR:
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":953
+ *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
+ *         return pstring
+ *     elif att_type == NC_STRING:             # <<<<<<<<<<<<<<
+ *         if att_len == 1:
+ *             ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)
+ */
+  switch (__pyx_v_att_type) {
+
+    /* "netCDF4.pyx":940
+ *         raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     # attribute is a character or string ...
+ *     if att_type == NC_CHAR:             # <<<<<<<<<<<<<<
+ *         value_arr = numpy.empty(att_len,'S1')
+ *         ierr = nc_get_att_text(grp._grpid, varid, attname, <char *>value_arr.data)
+ */
+    case NC_CHAR:
+
+    /* "netCDF4.pyx":941
+ *     # attribute is a character or string ...
+ *     if att_type == NC_CHAR:
+ *         value_arr = numpy.empty(att_len,'S1')             # <<<<<<<<<<<<<<
+ *         ierr = nc_get_att_text(grp._grpid, varid, attname, <char *>value_arr.data)
+ *         if ierr != NC_NOERR:
+ */
+    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_att_len); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_7 = NULL;
+    __pyx_t_8 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+      if (likely(__pyx_t_7)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_7);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_6, function);
+        __pyx_t_8 = 1;
+      }
+    }
+    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    if (__pyx_t_7) {
+      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+    }
+    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_n_s_S1);
+    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_n_s_S1);
+    __Pyx_GIVEREF(__pyx_n_s_S1);
+    __pyx_t_5 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_value_arr = ((PyArrayObject *)__pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":942
+ *     if att_type == NC_CHAR:
+ *         value_arr = numpy.empty(att_len,'S1')
+ *         ierr = nc_get_att_text(grp._grpid, varid, attname, <char *>value_arr.data)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_ierr = nc_get_att_text(__pyx_t_3, __pyx_v_varid, __pyx_v_attname, ((char *)__pyx_v_value_arr->data));
+
+    /* "netCDF4.pyx":943
+ *         value_arr = numpy.empty(att_len,'S1')
+ *         ierr = nc_get_att_text(grp._grpid, varid, attname, <char *>value_arr.data)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         if name == '_FillValue' and python3:
+ */
+    __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_4) {
+
+      /* "netCDF4.pyx":944
+ *         ierr = nc_get_att_text(grp._grpid, varid, attname, <char *>value_arr.data)
+ *         if ierr != NC_NOERR:
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         if name == '_FillValue' and python3:
+ *             # make sure _FillValue for character arrays is a byte on python 3
+ */
+      __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":945
+ *         if ierr != NC_NOERR:
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         if name == '_FillValue' and python3:             # <<<<<<<<<<<<<<
+ *             # make sure _FillValue for character arrays is a byte on python 3
+ *             # (issue 271).
+ */
+    __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_FillValue, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_10) {
+    } else {
+      __pyx_t_4 = __pyx_t_10;
+      goto __pyx_L6_bool_binop_done;
+    }
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_4 = __pyx_t_10;
+    __pyx_L6_bool_binop_done:;
+    if (__pyx_t_4) {
+
+      /* "netCDF4.pyx":948
+ *             # make sure _FillValue for character arrays is a byte on python 3
+ *             # (issue 271).
+ *             pstring = bytes(value_arr)             # <<<<<<<<<<<<<<
+ *         else:
+ *             pstring =\
+ */
+      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_INCREF(((PyObject *)__pyx_v_value_arr));
+      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_value_arr));
+      __Pyx_GIVEREF(((PyObject *)__pyx_v_value_arr));
+      __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyBytes_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_pstring = __pyx_t_6;
+      __pyx_t_6 = 0;
+      goto __pyx_L5;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":951
+ *         else:
+ *             pstring =\
+ *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')             # <<<<<<<<<<<<<<
+ *         return pstring
+ *     elif att_type == NC_STRING:
+ */
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_tostring); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_5 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
+        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
+        if (likely(__pyx_t_5)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+          __Pyx_INCREF(__pyx_t_5);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_9, function);
+        }
+      }
+      if (__pyx_t_5) {
+        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      } else {
+        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_7 = NULL;
+      __pyx_t_8 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
+        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
+        if (likely(__pyx_t_7)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+          __Pyx_INCREF(__pyx_t_7);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_9, function);
+          __pyx_t_8 = 1;
+        }
+      }
+      __pyx_t_11 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      if (__pyx_t_7) {
+        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+      }
+      PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_8, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_8, __pyx_t_5);
+      __Pyx_GIVEREF(__pyx_t_5);
+      __pyx_t_1 = 0;
+      __pyx_t_5 = 0;
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_replace); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_v_pstring = __pyx_t_6;
+      __pyx_t_6 = 0;
+    }
+    __pyx_L5:;
+
+    /* "netCDF4.pyx":952
+ *             pstring =\
+ *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
+ *         return pstring             # <<<<<<<<<<<<<<
+ *     elif att_type == NC_STRING:
+ *         if att_len == 1:
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_v_pstring);
+    __pyx_r = __pyx_v_pstring;
+    goto __pyx_L0;
+    break;
+
+    /* "netCDF4.pyx":953
+ *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
+ *         return pstring
+ *     elif att_type == NC_STRING:             # <<<<<<<<<<<<<<
+ *         if att_len == 1:
+ *             ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)
+ */
+    case NC_STRING:
+
+    /* "netCDF4.pyx":954
+ *         return pstring
+ *     elif att_type == NC_STRING:
+ *         if att_len == 1:             # <<<<<<<<<<<<<<
+ *             ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)
+ *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
+ */
+    __pyx_t_4 = ((__pyx_v_att_len == 1) != 0);
+    if (__pyx_t_4) {
+
+      /* "netCDF4.pyx":955
+ *     elif att_type == NC_STRING:
+ *         if att_len == 1:
+ *             ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)             # <<<<<<<<<<<<<<
+ *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
+ *             return pstring
+ */
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_v_ierr = nc_get_att_string(__pyx_t_3, __pyx_v_varid, __pyx_v_attname, (&__pyx_v_stratt));
+
+      /* "netCDF4.pyx":956
+ *         if att_len == 1:
+ *             ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)
+ *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')             # <<<<<<<<<<<<<<
+ *             return pstring
+ *         else:
+ */
+      __pyx_t_9 = __Pyx_PyBytes_FromString(__pyx_v_stratt); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_decode); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_1 = NULL;
+      __pyx_t_8 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_11))) {
+        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
+        if (likely(__pyx_t_1)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+          __Pyx_INCREF(__pyx_t_1);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_11, function);
+          __pyx_t_8 = 1;
+        }
+      }
+      __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      if (__pyx_t_1) {
+        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+      }
+      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_t_9);
+      __Pyx_GIVEREF(__pyx_t_9);
+      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_t_5);
+      __Pyx_GIVEREF(__pyx_t_5);
+      __pyx_t_9 = 0;
+      __pyx_t_5 = 0;
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_replace); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __pyx_v_pstring = __pyx_t_6;
+      __pyx_t_6 = 0;
+
+      /* "netCDF4.pyx":957
+ *             ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)
+ *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
+ *             return pstring             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise KeyError('vlen string array attributes not supported')
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __Pyx_INCREF(__pyx_v_pstring);
+      __pyx_r = __pyx_v_pstring;
+      goto __pyx_L0;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":959
+ *             return pstring
+ *         else:
+ *             raise KeyError('vlen string array attributes not supported')             # <<<<<<<<<<<<<<
+ *     else:
+ *     # a regular numeric or compound type.
+ */
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    break;
+    default:
+
+    /* "netCDF4.pyx":962
+ *     else:
+ *     # a regular numeric or compound type.
+ *         if att_type == NC_LONG:             # <<<<<<<<<<<<<<
+ *             att_type = NC_INT
+ *         try:
+ */
+    __pyx_t_4 = ((__pyx_v_att_type == NC_LONG) != 0);
+    if (__pyx_t_4) {
+
+      /* "netCDF4.pyx":963
+ *     # a regular numeric or compound type.
+ *         if att_type == NC_LONG:
+ *             att_type = NC_INT             # <<<<<<<<<<<<<<
+ *         try:
+ *             type_att = _nctonptype[att_type] # see if it is a primitive type
+ */
+      __pyx_v_att_type = NC_INT;
+      goto __pyx_L9;
+    }
+    __pyx_L9:;
+
+    /* "netCDF4.pyx":964
+ *         if att_type == NC_LONG:
+ *             att_type = NC_INT
+ *         try:             # <<<<<<<<<<<<<<
+ *             type_att = _nctonptype[att_type] # see if it is a primitive type
+ *         except KeyError:
+ */
+    {
+      __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
+      __Pyx_XGOTREF(__pyx_t_12);
+      __Pyx_XGOTREF(__pyx_t_13);
+      __Pyx_XGOTREF(__pyx_t_14);
+      /*try:*/ {
+
+        /* "netCDF4.pyx":965
+ *             att_type = NC_INT
+ *         try:
+ *             type_att = _nctonptype[att_type] # see if it is a primitive type             # <<<<<<<<<<<<<<
+ *         except KeyError:
+ *             # check if it's a compound
+ */
+        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_att_type, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L10_error;};
+        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __pyx_v_type_att = __pyx_t_11;
+        __pyx_t_11 = 0;
+      }
+      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+      goto __pyx_L17_try_end;
+      __pyx_L10_error:;
+      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+
+      /* "netCDF4.pyx":966
+ *         try:
+ *             type_att = _nctonptype[att_type] # see if it is a primitive type
+ *         except KeyError:             # <<<<<<<<<<<<<<
+ *             # check if it's a compound
+ *             try:
+ */
+      __pyx_t_3 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+      if (__pyx_t_3) {
+        __Pyx_AddTraceback("netCDF4._get_att", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_GOTREF(__pyx_t_7);
+
+        /* "netCDF4.pyx":968
+ *         except KeyError:
+ *             # check if it's a compound
+ *             try:             # <<<<<<<<<<<<<<
+ *                 type_att = _read_compound(grp, att_type)
+ *             except:
+ */
+        {
+          __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
+          __Pyx_XGOTREF(__pyx_t_15);
+          __Pyx_XGOTREF(__pyx_t_16);
+          __Pyx_XGOTREF(__pyx_t_17);
+          /*try:*/ {
+
+            /* "netCDF4.pyx":969
+ *             # check if it's a compound
+ *             try:
+ *                 type_att = _read_compound(grp, att_type)             # <<<<<<<<<<<<<<
+ *             except:
+ *                 raise KeyError('attribute %s has unsupported datatype' % attname)
+ */
+            __pyx_t_5 = __pyx_f_7netCDF4__read_compound(__pyx_v_grp, __pyx_v_att_type); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
+            __Pyx_GOTREF(__pyx_t_5);
+            __Pyx_XDECREF_SET(__pyx_v_type_att, __pyx_t_5);
+            __pyx_t_5 = 0;
+          }
+          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+          goto __pyx_L27_try_end;
+          __pyx_L20_error:;
+          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+          /* "netCDF4.pyx":970
+ *             try:
+ *                 type_att = _read_compound(grp, att_type)
+ *             except:             # <<<<<<<<<<<<<<
+ *                 raise KeyError('attribute %s has unsupported datatype' % attname)
+ *         value_arr = numpy.empty(att_len,type_att)
+ */
+          /*except:*/ {
+            __Pyx_AddTraceback("netCDF4._get_att", __pyx_clineno, __pyx_lineno, __pyx_filename);
+            if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
+            __Pyx_GOTREF(__pyx_t_5);
+            __Pyx_GOTREF(__pyx_t_9);
+            __Pyx_GOTREF(__pyx_t_1);
+
+            /* "netCDF4.pyx":971
+ *                 type_att = _read_compound(grp, att_type)
+ *             except:
+ *                 raise KeyError('attribute %s has unsupported datatype' % attname)             # <<<<<<<<<<<<<<
+ *         value_arr = numpy.empty(att_len,type_att)
+ *         ierr = nc_get_att(grp._grpid, varid, attname, value_arr.data)
+ */
+            __pyx_t_18 = __Pyx_PyBytes_FromString(__pyx_v_attname); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
+            __Pyx_GOTREF(__pyx_t_18);
+            __pyx_t_19 = __Pyx_PyString_Format(__pyx_kp_s_attribute_s_has_unsupported_data, __pyx_t_18); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
+            __Pyx_GOTREF(__pyx_t_19);
+            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+            __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
+            __Pyx_GOTREF(__pyx_t_18);
+            PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_19);
+            __Pyx_GIVEREF(__pyx_t_19);
+            __pyx_t_19 = 0;
+            __pyx_t_19 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_18, NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
+            __Pyx_GOTREF(__pyx_t_19);
+            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+            __Pyx_Raise(__pyx_t_19, 0, 0, 0);
+            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
+          }
+          __pyx_L22_except_error:;
+          __Pyx_XGIVEREF(__pyx_t_15);
+          __Pyx_XGIVEREF(__pyx_t_16);
+          __Pyx_XGIVEREF(__pyx_t_17);
+          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
+          goto __pyx_L12_except_error;
+          __pyx_L27_try_end:;
+        }
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        goto __pyx_L11_exception_handled;
+      }
+      goto __pyx_L12_except_error;
+      __pyx_L12_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_12);
+      __Pyx_XGIVEREF(__pyx_t_13);
+      __Pyx_XGIVEREF(__pyx_t_14);
+      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+      goto __pyx_L1_error;
+      __pyx_L11_exception_handled:;
+      __Pyx_XGIVEREF(__pyx_t_12);
+      __Pyx_XGIVEREF(__pyx_t_13);
+      __Pyx_XGIVEREF(__pyx_t_14);
+      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+      __pyx_L17_try_end:;
+    }
+
+    /* "netCDF4.pyx":972
+ *             except:
+ *                 raise KeyError('attribute %s has unsupported datatype' % attname)
+ *         value_arr = numpy.empty(att_len,type_att)             # <<<<<<<<<<<<<<
+ *         ierr = nc_get_att(grp._grpid, varid, attname, value_arr.data)
+ *         if ierr != NC_NOERR:
+ */
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_att_len); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_1 = NULL;
+    __pyx_t_8 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) {
+      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
+      if (likely(__pyx_t_1)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+        __Pyx_INCREF(__pyx_t_1);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_11, function);
+        __pyx_t_8 = 1;
+      }
+    }
+    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    if (__pyx_t_1) {
+      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+    }
+    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
+    __Pyx_INCREF(__pyx_v_type_att);
+    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_type_att);
+    __Pyx_GIVEREF(__pyx_v_type_att);
+    __pyx_t_6 = 0;
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_value_arr = ((PyArrayObject *)__pyx_t_7);
+    __pyx_t_7 = 0;
+
+    /* "netCDF4.pyx":973
+ *                 raise KeyError('attribute %s has unsupported datatype' % attname)
+ *         value_arr = numpy.empty(att_len,type_att)
+ *         ierr = nc_get_att(grp._grpid, varid, attname, value_arr.data)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_v_ierr = nc_get_att(__pyx_t_3, __pyx_v_varid, __pyx_v_attname, __pyx_v_value_arr->data);
+
+    /* "netCDF4.pyx":974
+ *         value_arr = numpy.empty(att_len,type_att)
+ *         ierr = nc_get_att(grp._grpid, varid, attname, value_arr.data)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         if value_arr.shape == ():
+ */
+    __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_4) {
+
+      /* "netCDF4.pyx":975
+ *         ierr = nc_get_att(grp._grpid, varid, attname, value_arr.data)
+ *         if ierr != NC_NOERR:
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         if value_arr.shape == ():
+ *             # return a scalar for a scalar array
+ */
+      __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __Pyx_INCREF(__pyx_t_7);
+      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
+      __Pyx_GIVEREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":976
+ *         if ierr != NC_NOERR:
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         if value_arr.shape == ():             # <<<<<<<<<<<<<<
+ *             # return a scalar for a scalar array
+ *             return value_arr.item()
+ */
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_11 = PyObject_RichCompare(__pyx_t_7, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    if (__pyx_t_4) {
+
+      /* "netCDF4.pyx":978
+ *         if value_arr.shape == ():
+ *             # return a scalar for a scalar array
+ *             return value_arr.item()             # <<<<<<<<<<<<<<
+ *         elif att_len == 1:
+ *             # return a scalar for a single element array
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_item); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_9 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
+        if (likely(__pyx_t_9)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+          __Pyx_INCREF(__pyx_t_9);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_7, function);
+        }
+      }
+      if (__pyx_t_9) {
+        __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      } else {
+        __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_11);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_r = __pyx_t_11;
+      __pyx_t_11 = 0;
+      goto __pyx_L0;
+    }
+
+    /* "netCDF4.pyx":979
+ *             # return a scalar for a scalar array
+ *             return value_arr.item()
+ *         elif att_len == 1:             # <<<<<<<<<<<<<<
+ *             # return a scalar for a single element array
+ *             return value_arr[0]
+ */
+    __pyx_t_4 = ((__pyx_v_att_len == 1) != 0);
+    if (__pyx_t_4) {
+
+      /* "netCDF4.pyx":981
+ *         elif att_len == 1:
+ *             # return a scalar for a single element array
+ *             return value_arr[0]             # <<<<<<<<<<<<<<
+ *         else:
+ *             return value_arr
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_value_arr), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_r = __pyx_t_11;
+      __pyx_t_11 = 0;
+      goto __pyx_L0;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":983
+ *             return value_arr[0]
+ *         else:
+ *             return value_arr             # <<<<<<<<<<<<<<
+ * 
+ * def _set_default_format(object format='NETCDF4'):
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __Pyx_INCREF(((PyObject *)__pyx_v_value_arr));
+      __pyx_r = ((PyObject *)__pyx_v_value_arr);
+      goto __pyx_L0;
+    }
+    break;
+  }
+
+  /* "netCDF4.pyx":926
+ *     return attslist
+ * 
+ * cdef _get_att(grp, int varid, name):             # <<<<<<<<<<<<<<
+ *     # Private function to get an attribute value given its name
+ *     cdef int ierr, n
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_XDECREF(__pyx_t_18);
+  __Pyx_XDECREF(__pyx_t_19);
+  __Pyx_AddTraceback("netCDF4._get_att", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF((PyObject *)__pyx_v_value_arr);
+  __Pyx_XDECREF(__pyx_v_bytestr);
+  __Pyx_XDECREF(__pyx_v_pstring);
+  __Pyx_XDECREF(__pyx_v_type_att);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":985
+ *             return value_arr
+ * 
+ * def _set_default_format(object format='NETCDF4'):             # <<<<<<<<<<<<<<
+ *     # Private function to set the netCDF file format
+ *     if format == 'NETCDF4':
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_19_set_default_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_19_set_default_format = {"_set_default_format", (PyCFunction)__pyx_pw_7netCDF4_19_set_default_format, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_19_set_default_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_format = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_set_default_format (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_format,0};
+    PyObject* values[1] = {0};
+    values[0] = ((PyObject *)__pyx_n_s_NETCDF4);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format);
+          if (value) { values[0] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_set_default_format") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_format = values[0];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("_set_default_format", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._set_default_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_18_set_default_format(__pyx_self, __pyx_v_format);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_18_set_default_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_format) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_set_default_format", 0);
+
+  /* "netCDF4.pyx":987
+ * def _set_default_format(object format='NETCDF4'):
+ *     # Private function to set the netCDF file format
+ *     if format == 'NETCDF4':             # <<<<<<<<<<<<<<
+ *         nc_set_default_format(NC_FORMAT_NETCDF4, NULL)
+ *     elif format == 'NETCDF4_CLASSIC':
+ */
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_format, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":988
+ *     # Private function to set the netCDF file format
+ *     if format == 'NETCDF4':
+ *         nc_set_default_format(NC_FORMAT_NETCDF4, NULL)             # <<<<<<<<<<<<<<
+ *     elif format == 'NETCDF4_CLASSIC':
+ *         nc_set_default_format(NC_FORMAT_NETCDF4_CLASSIC, NULL)
+ */
+    nc_set_default_format(NC_FORMAT_NETCDF4, NULL);
+    goto __pyx_L3;
+  }
+
+  /* "netCDF4.pyx":989
+ *     if format == 'NETCDF4':
+ *         nc_set_default_format(NC_FORMAT_NETCDF4, NULL)
+ *     elif format == 'NETCDF4_CLASSIC':             # <<<<<<<<<<<<<<
+ *         nc_set_default_format(NC_FORMAT_NETCDF4_CLASSIC, NULL)
+ *     elif format == 'NETCDF3_64BIT':
+ */
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_format, __pyx_n_s_NETCDF4_CLASSIC, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":990
+ *         nc_set_default_format(NC_FORMAT_NETCDF4, NULL)
+ *     elif format == 'NETCDF4_CLASSIC':
+ *         nc_set_default_format(NC_FORMAT_NETCDF4_CLASSIC, NULL)             # <<<<<<<<<<<<<<
+ *     elif format == 'NETCDF3_64BIT':
+ *         nc_set_default_format(NC_FORMAT_64BIT, NULL)
+ */
+    nc_set_default_format(NC_FORMAT_NETCDF4_CLASSIC, NULL);
+    goto __pyx_L3;
+  }
+
+  /* "netCDF4.pyx":991
+ *     elif format == 'NETCDF4_CLASSIC':
+ *         nc_set_default_format(NC_FORMAT_NETCDF4_CLASSIC, NULL)
+ *     elif format == 'NETCDF3_64BIT':             # <<<<<<<<<<<<<<
+ *         nc_set_default_format(NC_FORMAT_64BIT, NULL)
+ *     elif format == 'NETCDF3_CLASSIC':
+ */
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_format, __pyx_n_s_NETCDF3_64BIT, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":992
+ *         nc_set_default_format(NC_FORMAT_NETCDF4_CLASSIC, NULL)
+ *     elif format == 'NETCDF3_64BIT':
+ *         nc_set_default_format(NC_FORMAT_64BIT, NULL)             # <<<<<<<<<<<<<<
+ *     elif format == 'NETCDF3_CLASSIC':
+ *         nc_set_default_format(NC_FORMAT_CLASSIC, NULL)
+ */
+    nc_set_default_format(NC_FORMAT_64BIT, NULL);
+    goto __pyx_L3;
+  }
+
+  /* "netCDF4.pyx":993
+ *     elif format == 'NETCDF3_64BIT':
+ *         nc_set_default_format(NC_FORMAT_64BIT, NULL)
+ *     elif format == 'NETCDF3_CLASSIC':             # <<<<<<<<<<<<<<
+ *         nc_set_default_format(NC_FORMAT_CLASSIC, NULL)
+ *     else:
+ */
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_format, __pyx_n_s_NETCDF3_CLASSIC, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":994
+ *         nc_set_default_format(NC_FORMAT_64BIT, NULL)
+ *     elif format == 'NETCDF3_CLASSIC':
+ *         nc_set_default_format(NC_FORMAT_CLASSIC, NULL)             # <<<<<<<<<<<<<<
+ *     else:
+ *         raise ValueError("format must be 'NETCDF4', 'NETCDF4_CLASSIC', 'NETCDF3_64BIT', or 'NETCDF3_CLASSIC', got '%s'" % format)
+ */
+    nc_set_default_format(NC_FORMAT_CLASSIC, NULL);
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":996
+ *         nc_set_default_format(NC_FORMAT_CLASSIC, NULL)
+ *     else:
+ *         raise ValueError("format must be 'NETCDF4', 'NETCDF4_CLASSIC', 'NETCDF3_64BIT', or 'NETCDF3_CLASSIC', got '%s'" % format)             # <<<<<<<<<<<<<<
+ * 
+ * cdef _get_format(int grpid):
+ */
+    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_format_must_be_NETCDF4_NETCDF4_C, __pyx_v_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __pyx_t_2 = 0;
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":985
+ *             return value_arr
+ * 
+ * def _set_default_format(object format='NETCDF4'):             # <<<<<<<<<<<<<<
+ *     # Private function to set the netCDF file format
+ *     if format == 'NETCDF4':
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4._set_default_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":998
+ *         raise ValueError("format must be 'NETCDF4', 'NETCDF4_CLASSIC', 'NETCDF3_64BIT', or 'NETCDF3_CLASSIC', got '%s'" % format)
+ * 
+ * cdef _get_format(int grpid):             # <<<<<<<<<<<<<<
+ *     # Private function to get the netCDF file format
+ *     cdef int ierr, formatp
+ */
+
+static PyObject *__pyx_f_7netCDF4__get_format(int __pyx_v_grpid) {
+  int __pyx_v_ierr;
+  int __pyx_v_formatp;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  char *__pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_get_format", 0);
+
+  /* "netCDF4.pyx":1001
+ *     # Private function to get the netCDF file format
+ *     cdef int ierr, formatp
+ *     ierr = nc_inq_format(grpid, &formatp)             # <<<<<<<<<<<<<<
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_v_ierr = nc_inq_format(__pyx_v_grpid, (&__pyx_v_formatp));
+
+  /* "netCDF4.pyx":1002
+ *     cdef int ierr, formatp
+ *     ierr = nc_inq_format(grpid, &formatp)
+ *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     if formatp == NC_FORMAT_NETCDF4:
+ */
+  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":1003
+ *     ierr = nc_inq_format(grpid, &formatp)
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *     if formatp == NC_FORMAT_NETCDF4:
+ *         return 'NETCDF4'
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":1010
+ *     elif formatp == NC_FORMAT_64BIT:
+ *         return 'NETCDF3_64BIT'
+ *     elif formatp == NC_FORMAT_CLASSIC:             # <<<<<<<<<<<<<<
+ *         return 'NETCDF3_CLASSIC'
+ * 
+ */
+  switch (__pyx_v_formatp) {
+
+    /* "netCDF4.pyx":1004
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     if formatp == NC_FORMAT_NETCDF4:             # <<<<<<<<<<<<<<
+ *         return 'NETCDF4'
+ *     elif formatp == NC_FORMAT_NETCDF4_CLASSIC:
+ */
+    case NC_FORMAT_NETCDF4:
+
+    /* "netCDF4.pyx":1005
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     if formatp == NC_FORMAT_NETCDF4:
+ *         return 'NETCDF4'             # <<<<<<<<<<<<<<
+ *     elif formatp == NC_FORMAT_NETCDF4_CLASSIC:
+ *         return 'NETCDF4_CLASSIC'
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_NETCDF4);
+    __pyx_r = __pyx_n_s_NETCDF4;
+    goto __pyx_L0;
+    break;
+
+    /* "netCDF4.pyx":1006
+ *     if formatp == NC_FORMAT_NETCDF4:
+ *         return 'NETCDF4'
+ *     elif formatp == NC_FORMAT_NETCDF4_CLASSIC:             # <<<<<<<<<<<<<<
+ *         return 'NETCDF4_CLASSIC'
+ *     elif formatp == NC_FORMAT_64BIT:
+ */
+    case NC_FORMAT_NETCDF4_CLASSIC:
+
+    /* "netCDF4.pyx":1007
+ *         return 'NETCDF4'
+ *     elif formatp == NC_FORMAT_NETCDF4_CLASSIC:
+ *         return 'NETCDF4_CLASSIC'             # <<<<<<<<<<<<<<
+ *     elif formatp == NC_FORMAT_64BIT:
+ *         return 'NETCDF3_64BIT'
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_NETCDF4_CLASSIC);
+    __pyx_r = __pyx_n_s_NETCDF4_CLASSIC;
+    goto __pyx_L0;
+    break;
+
+    /* "netCDF4.pyx":1008
+ *     elif formatp == NC_FORMAT_NETCDF4_CLASSIC:
+ *         return 'NETCDF4_CLASSIC'
+ *     elif formatp == NC_FORMAT_64BIT:             # <<<<<<<<<<<<<<
+ *         return 'NETCDF3_64BIT'
+ *     elif formatp == NC_FORMAT_CLASSIC:
+ */
+    case NC_FORMAT_64BIT:
+
+    /* "netCDF4.pyx":1009
+ *         return 'NETCDF4_CLASSIC'
+ *     elif formatp == NC_FORMAT_64BIT:
+ *         return 'NETCDF3_64BIT'             # <<<<<<<<<<<<<<
+ *     elif formatp == NC_FORMAT_CLASSIC:
+ *         return 'NETCDF3_CLASSIC'
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_NETCDF3_64BIT);
+    __pyx_r = __pyx_n_s_NETCDF3_64BIT;
+    goto __pyx_L0;
+    break;
+
+    /* "netCDF4.pyx":1010
+ *     elif formatp == NC_FORMAT_64BIT:
+ *         return 'NETCDF3_64BIT'
+ *     elif formatp == NC_FORMAT_CLASSIC:             # <<<<<<<<<<<<<<
+ *         return 'NETCDF3_CLASSIC'
+ * 
+ */
+    case NC_FORMAT_CLASSIC:
+
+    /* "netCDF4.pyx":1011
+ *         return 'NETCDF3_64BIT'
+ *     elif formatp == NC_FORMAT_CLASSIC:
+ *         return 'NETCDF3_CLASSIC'             # <<<<<<<<<<<<<<
+ * 
+ * cdef _get_full_format(int grpid):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_NETCDF3_CLASSIC);
+    __pyx_r = __pyx_n_s_NETCDF3_CLASSIC;
+    goto __pyx_L0;
+    break;
+    default: break;
+  }
+
+  /* "netCDF4.pyx":998
+ *         raise ValueError("format must be 'NETCDF4', 'NETCDF4_CLASSIC', 'NETCDF3_64BIT', or 'NETCDF3_CLASSIC', got '%s'" % format)
+ * 
+ * cdef _get_format(int grpid):             # <<<<<<<<<<<<<<
+ *     # Private function to get the netCDF file format
+ *     cdef int ierr, formatp
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4._get_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1013
+ *         return 'NETCDF3_CLASSIC'
+ * 
+ * cdef _get_full_format(int grpid):             # <<<<<<<<<<<<<<
+ *     # Private function to get the underlying disk format
+ *     cdef int ierr, formatp, modep
+ */
+
+static PyObject *__pyx_f_7netCDF4__get_full_format(CYTHON_UNUSED int __pyx_v_grpid) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_get_full_format", 0);
+
+  /* "netCDF4.pyx":1035
+ *             return 'UNDEFINED'
+ *     ELSE:
+ *         return 'UNDEFINED'             # <<<<<<<<<<<<<<
+ * 
+ * cdef _set_att(grp, int varid, name, value):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_n_s_UNDEFINED);
+  __pyx_r = __pyx_n_s_UNDEFINED;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":1013
+ *         return 'NETCDF3_CLASSIC'
+ * 
+ * cdef _get_full_format(int grpid):             # <<<<<<<<<<<<<<
+ *     # Private function to get the underlying disk format
+ *     cdef int ierr, formatp, modep
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1037
+ *         return 'UNDEFINED'
+ * 
+ * cdef _set_att(grp, int varid, name, value):             # <<<<<<<<<<<<<<
+ *     # Private function to set an attribute name/value pair
+ *     cdef int i, ierr, lenarr, n
+ */
+
+static PyObject *__pyx_f_7netCDF4__set_att(PyObject *__pyx_v_grp, int __pyx_v_varid, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
+  int __pyx_v_ierr;
+  int __pyx_v_lenarr;
+  char *__pyx_v_attname;
+  char *__pyx_v_datstring;
+  PyArrayObject *__pyx_v_value_arr = 0;
+  PyObject *__pyx_v_bytestr = NULL;
+  PyObject *__pyx_v_fmt = NULL;
+  PyObject *__pyx_v_is_netcdf3 = NULL;
+  PyObject *__pyx_v_dats = NULL;
+  PyObject *__pyx_v_value_arr1 = NULL;
+  PyObject *__pyx_v_xtype = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  char *__pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_t_6;
+  int __pyx_t_7;
+  int __pyx_t_8;
+  int __pyx_t_9;
+  Py_ssize_t __pyx_t_10;
+  nc_type __pyx_t_11;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_set_att", 0);
+
+  /* "netCDF4.pyx":1043
+ *     cdef char *datstring
+ *     cdef ndarray value_arr
+ *     bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *     attname = bytestr
+ *     # put attribute value into a numpy array.
+ */
+  __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_bytestr = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":1044
+ *     cdef ndarray value_arr
+ *     bytestr = _strencode(name)
+ *     attname = bytestr             # <<<<<<<<<<<<<<
+ *     # put attribute value into a numpy array.
+ *     value_arr = numpy.array(value)
+ */
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_attname = __pyx_t_2;
+
+  /* "netCDF4.pyx":1046
+ *     attname = bytestr
+ *     # put attribute value into a numpy array.
+ *     value_arr = numpy.array(value)             # <<<<<<<<<<<<<<
+ *     # if array is 64 bit integers or
+ *     # if 64-bit datatype not supported, cast to 32 bit integers.
+ */
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_4, function);
+    }
+  }
+  if (!__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+  } else {
+    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+    __Pyx_INCREF(__pyx_v_value);
+    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_value);
+    __Pyx_GIVEREF(__pyx_v_value);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_value_arr = ((PyArrayObject *)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":1049
+ *     # if array is 64 bit integers or
+ *     # if 64-bit datatype not supported, cast to 32 bit integers.
+ *     fmt = _get_format(grp._grpid)             # <<<<<<<<<<<<<<
+ *     is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC'
+ *     if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __pyx_f_7netCDF4__get_format(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_fmt = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":1050
+ *     # if 64-bit datatype not supported, cast to 32 bit integers.
+ *     fmt = _get_format(grp._grpid)
+ *     is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC'             # <<<<<<<<<<<<<<
+ *     if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\
+ *        is_netcdf3):
+ */
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_7) {
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  } else {
+    __Pyx_INCREF(__pyx_t_5);
+    __pyx_t_1 = __pyx_t_5;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    goto __pyx_L3_bool_binop_done;
+  }
+  __pyx_t_5 = PyObject_RichCompare(__pyx_v_fmt, __pyx_n_s_NETCDF4_CLASSIC, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_INCREF(__pyx_t_5);
+  __pyx_t_1 = __pyx_t_5;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_L3_bool_binop_done:;
+  __pyx_v_is_netcdf3 = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":1051
+ *     fmt = _get_format(grp._grpid)
+ *     is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC'
+ *     if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\             # <<<<<<<<<<<<<<
+ *        is_netcdf3):
+ *         value_arr = value_arr.astype('i4')
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 1, 0, NULL, NULL, &__pyx_slice__30, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_i8, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_8) {
+  } else {
+    __pyx_t_7 = __pyx_t_8;
+    goto __pyx_L6_bool_binop_done;
+  }
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_8 = (__Pyx_PySequence_Contains(__pyx_n_s_i8, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_9 = (__pyx_t_8 != 0);
+  if (!__pyx_t_9) {
+  } else {
+    __pyx_t_7 = __pyx_t_9;
+    goto __pyx_L6_bool_binop_done;
+  }
+
+  /* "netCDF4.pyx":1052
+ *     is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC'
+ *     if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\
+ *        is_netcdf3):             # <<<<<<<<<<<<<<
+ *         value_arr = value_arr.astype('i4')
+ *     # if array contains strings, write a text attribute.
+ */
+  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_is_netcdf3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __pyx_t_9;
+  __pyx_L6_bool_binop_done:;
+  if (__pyx_t_7) {
+
+    /* "netCDF4.pyx":1053
+ *     if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\
+ *        is_netcdf3):
+ *         value_arr = value_arr.astype('i4')             # <<<<<<<<<<<<<<
+ *     # if array contains strings, write a text attribute.
+ *     if value_arr.dtype.char in ['S','U']:
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF_SET(__pyx_v_value_arr, ((PyArrayObject *)__pyx_t_5));
+    __pyx_t_5 = 0;
+    goto __pyx_L5;
+  }
+  __pyx_L5:;
+
+  /* "netCDF4.pyx":1055
+ *         value_arr = value_arr.astype('i4')
+ *     # if array contains strings, write a text attribute.
+ *     if value_arr.dtype.char in ['S','U']:             # <<<<<<<<<<<<<<
+ *         if not value_arr.shape:
+ *             dats = _strencode(value_arr.item())
+ */
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_char); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_9) {
+  } else {
+    __pyx_t_7 = __pyx_t_9;
+    goto __pyx_L10_bool_binop_done;
+  }
+  __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __pyx_t_9;
+  __pyx_L10_bool_binop_done:;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_9 = (__pyx_t_7 != 0);
+  if (__pyx_t_9) {
+
+    /* "netCDF4.pyx":1056
+ *     # if array contains strings, write a text attribute.
+ *     if value_arr.dtype.char in ['S','U']:
+ *         if not value_arr.shape:             # <<<<<<<<<<<<<<
+ *             dats = _strencode(value_arr.item())
+ *         else:
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_7 = ((!__pyx_t_9) != 0);
+    if (__pyx_t_7) {
+
+      /* "netCDF4.pyx":1057
+ *     if value_arr.dtype.char in ['S','U']:
+ *         if not value_arr.shape:
+ *             dats = _strencode(value_arr.item())             # <<<<<<<<<<<<<<
+ *         else:
+ *             value_arr1 = value_arr.ravel()
+ */
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_item); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_4 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
+        if (likely(__pyx_t_4)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+          __Pyx_INCREF(__pyx_t_4);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_5, function);
+        }
+      }
+      if (__pyx_t_4) {
+        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      } else {
+        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = __pyx_f_7netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_dats = __pyx_t_5;
+      __pyx_t_5 = 0;
+      goto __pyx_L12;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":1059
+ *             dats = _strencode(value_arr.item())
+ *         else:
+ *             value_arr1 = value_arr.ravel()             # <<<<<<<<<<<<<<
+ *             dats = _strencode(''.join(value_arr1.tolist()))
+ *         lenarr = len(dats)
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_ravel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_4 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+        if (likely(__pyx_t_4)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+          __Pyx_INCREF(__pyx_t_4);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_1, function);
+        }
+      }
+      if (__pyx_t_4) {
+        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      } else {
+        __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_value_arr1 = __pyx_t_5;
+      __pyx_t_5 = 0;
+
+      /* "netCDF4.pyx":1060
+ *         else:
+ *             value_arr1 = value_arr.ravel()
+ *             dats = _strencode(''.join(value_arr1.tolist()))             # <<<<<<<<<<<<<<
+ *         lenarr = len(dats)
+ *         datstring = dats
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value_arr1, __pyx_n_s_tolist); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_4 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+        if (likely(__pyx_t_4)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+          __Pyx_INCREF(__pyx_t_4);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_1, function);
+        }
+      }
+      if (__pyx_t_4) {
+        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      } else {
+        __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__16, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = __pyx_f_7netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_dats = __pyx_t_5;
+      __pyx_t_5 = 0;
+    }
+    __pyx_L12:;
+
+    /* "netCDF4.pyx":1061
+ *             value_arr1 = value_arr.ravel()
+ *             dats = _strencode(''.join(value_arr1.tolist()))
+ *         lenarr = len(dats)             # <<<<<<<<<<<<<<
+ *         datstring = dats
+ *         if lenarr == 0:
+ */
+    __pyx_t_10 = PyObject_Length(__pyx_v_dats); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_lenarr = __pyx_t_10;
+
+    /* "netCDF4.pyx":1062
+ *             dats = _strencode(''.join(value_arr1.tolist()))
+ *         lenarr = len(dats)
+ *         datstring = dats             # <<<<<<<<<<<<<<
+ *         if lenarr == 0:
+ *             # write null byte
+ */
+    __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_dats); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_datstring = __pyx_t_2;
+
+    /* "netCDF4.pyx":1063
+ *         lenarr = len(dats)
+ *         datstring = dats
+ *         if lenarr == 0:             # <<<<<<<<<<<<<<
+ *             # write null byte
+ *             lenarr=1; datstring = '\x00'
+ */
+    __pyx_t_7 = ((__pyx_v_lenarr == 0) != 0);
+    if (__pyx_t_7) {
+
+      /* "netCDF4.pyx":1065
+ *         if lenarr == 0:
+ *             # write null byte
+ *             lenarr=1; datstring = '\x00'             # <<<<<<<<<<<<<<
+ *         ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
+ *         if ierr != NC_NOERR:
+ */
+      __pyx_v_lenarr = 1;
+      __pyx_v_datstring = __pyx_k__25;
+      goto __pyx_L13;
+    }
+    __pyx_L13:;
+
+    /* "netCDF4.pyx":1066
+ *             # write null byte
+ *             lenarr=1; datstring = '\x00'
+ *         ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_v_ierr = nc_put_att_text(__pyx_t_6, __pyx_v_varid, __pyx_v_attname, __pyx_v_lenarr, __pyx_v_datstring);
+
+    /* "netCDF4.pyx":1067
+ *             lenarr=1; datstring = '\x00'
+ *         ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     # a 'regular' array type ('f4','i4','f8' etc)
+ */
+    __pyx_t_7 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_7) {
+
+      /* "netCDF4.pyx":1068
+ *         ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
+ *         if ierr != NC_NOERR:
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *     # a 'regular' array type ('f4','i4','f8' etc)
+ *     else:
+ */
+      __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_5);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
+      __Pyx_GIVEREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    goto __pyx_L9;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":1071
+ *     # a 'regular' array type ('f4','i4','f8' etc)
+ *     else:
+ *         if value_arr.dtype.kind == 'V': # compound attribute.             # <<<<<<<<<<<<<<
+ *             xtype = _find_cmptype(grp,value_arr.dtype)
+ *         elif value_arr.dtype.str[1:] not in _supportedtypes:
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_kind); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_V, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_7) {
+
+      /* "netCDF4.pyx":1072
+ *     else:
+ *         if value_arr.dtype.kind == 'V': # compound attribute.
+ *             xtype = _find_cmptype(grp,value_arr.dtype)             # <<<<<<<<<<<<<<
+ *         elif value_arr.dtype.str[1:] not in _supportedtypes:
+ *             raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:])
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_5 = __pyx_f_7netCDF4__find_cmptype(__pyx_v_grp, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_xtype = __pyx_t_5;
+      __pyx_t_5 = 0;
+      goto __pyx_L15;
+    }
+
+    /* "netCDF4.pyx":1073
+ *         if value_arr.dtype.kind == 'V': # compound attribute.
+ *             xtype = _find_cmptype(grp,value_arr.dtype)
+ *         elif value_arr.dtype.str[1:] not in _supportedtypes:             # <<<<<<<<<<<<<<
+ *             raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:])
+ *         else:
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__32, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_t_5, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_9 = (__pyx_t_7 != 0);
+    if (__pyx_t_9) {
+
+      /* "netCDF4.pyx":1074
+ *             xtype = _find_cmptype(grp,value_arr.dtype)
+ *         elif value_arr.dtype.str[1:] not in _supportedtypes:
+ *             raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:])             # <<<<<<<<<<<<<<
+ *         else:
+ *             xtype = _nptonctype[value_arr.dtype.str[1:]]
+ */
+      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__33, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
+      __Pyx_GIVEREF(__pyx_t_5);
+      __pyx_t_1 = 0;
+      __pyx_t_5 = 0;
+      __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_illegal_data_type_for_attribute, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_5, 0, 0);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":1076
+ *             raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:])
+ *         else:
+ *             xtype = _nptonctype[value_arr.dtype.str[1:]]             # <<<<<<<<<<<<<<
+ *         lenarr = PyArray_SIZE(value_arr)
+ *         ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data)
+ */
+      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__34, 1, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = PyObject_GetItem(__pyx_t_5, __pyx_t_4); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_v_xtype = __pyx_t_1;
+      __pyx_t_1 = 0;
+    }
+    __pyx_L15:;
+
+    /* "netCDF4.pyx":1077
+ *         else:
+ *             xtype = _nptonctype[value_arr.dtype.str[1:]]
+ *         lenarr = PyArray_SIZE(value_arr)             # <<<<<<<<<<<<<<
+ *         ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data)
+ *         if ierr != NC_NOERR:
+ */
+    __pyx_v_lenarr = PyArray_SIZE(__pyx_v_value_arr);
+
+    /* "netCDF4.pyx":1078
+ *             xtype = _nptonctype[value_arr.dtype.str[1:]]
+ *         lenarr = PyArray_SIZE(value_arr)
+ *         ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_11 = __Pyx_PyInt_As_nc_type(__pyx_v_xtype); if (unlikely((__pyx_t_11 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_ierr = nc_put_att(__pyx_t_6, __pyx_v_varid, __pyx_v_attname, __pyx_t_11, __pyx_v_lenarr, __pyx_v_value_arr->data);
+
+    /* "netCDF4.pyx":1079
+ *         lenarr = PyArray_SIZE(value_arr)
+ *         ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ */
+    __pyx_t_9 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_9) {
+
+      /* "netCDF4.pyx":1080
+ *         ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data)
+ *         if ierr != NC_NOERR:
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ * 
+ * cdef _get_types(group):
+ */
+      __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+  __pyx_L9:;
+
+  /* "netCDF4.pyx":1037
+ *         return 'UNDEFINED'
+ * 
+ * cdef _set_att(grp, int varid, name, value):             # <<<<<<<<<<<<<<
+ *     # Private function to set an attribute name/value pair
+ *     cdef int i, ierr, lenarr, n
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("netCDF4._set_att", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF((PyObject *)__pyx_v_value_arr);
+  __Pyx_XDECREF(__pyx_v_bytestr);
+  __Pyx_XDECREF(__pyx_v_fmt);
+  __Pyx_XDECREF(__pyx_v_is_netcdf3);
+  __Pyx_XDECREF(__pyx_v_dats);
+  __Pyx_XDECREF(__pyx_v_value_arr1);
+  __Pyx_XDECREF(__pyx_v_xtype);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1082
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ * cdef _get_types(group):             # <<<<<<<<<<<<<<
+ *     # Private function to create L{CompoundType} or L{VLType} instances for all the
+ *     # compound or VLEN types in a L{Group} or L{Dataset}.
+ */
+
+static PyObject *__pyx_f_7netCDF4__get_types(PyObject *__pyx_v_group) {
+  int __pyx_v_ierr;
+  int __pyx_v_ntypes;
+  int __pyx_v_classp;
+  int __pyx_v_n;
+  nc_type __pyx_v_xtype;
+  nc_type __pyx_v_typeids[NC_MAX_VARS];
+  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
+  PyObject *__pyx_v_cmptypes = NULL;
+  PyObject *__pyx_v_vltypes = NULL;
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_v_cmptype = NULL;
+  PyObject *__pyx_v_vltype = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  char *__pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_t_7;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  Py_ssize_t __pyx_t_10;
+  PyObject *__pyx_t_11 = NULL;
+  PyObject *__pyx_t_12 = NULL;
+  PyObject *__pyx_t_13 = NULL;
+  PyObject *__pyx_t_14 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_get_types", 0);
+
+  /* "netCDF4.pyx":1090
+ *     cdef char namstring[NC_MAX_NAME+1]
+ *     # get the number of user defined types in this group.
+ *     ierr = nc_inq_typeids(group._grpid, &ntypes, typeids)             # <<<<<<<<<<<<<<
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_ierr = nc_inq_typeids(__pyx_t_2, (&__pyx_v_ntypes), __pyx_v_typeids);
+
+  /* "netCDF4.pyx":1091
+ *     # get the number of user defined types in this group.
+ *     ierr = nc_inq_typeids(group._grpid, &ntypes, typeids)
+ *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     # create empty dictionary for CompoundType instances.
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":1092
+ *     ierr = nc_inq_typeids(group._grpid, &ntypes, typeids)
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *     # create empty dictionary for CompoundType instances.
+ *     cmptypes = OrderedDict()
+ */
+    __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":1094
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     # create empty dictionary for CompoundType instances.
+ *     cmptypes = OrderedDict()             # <<<<<<<<<<<<<<
+ *     vltypes = OrderedDict()
+ *     if ntypes > 0:
+ */
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_6 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+    if (likely(__pyx_t_6)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_6);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_5, function);
+    }
+  }
+  if (__pyx_t_6) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_v_cmptypes = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":1095
+ *     # create empty dictionary for CompoundType instances.
+ *     cmptypes = OrderedDict()
+ *     vltypes = OrderedDict()             # <<<<<<<<<<<<<<
+ *     if ntypes > 0:
+ *         for n from 0 <= n < ntypes:
+ */
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_6 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+    if (likely(__pyx_t_6)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_6);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_5, function);
+    }
+  }
+  if (__pyx_t_6) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_v_vltypes = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":1096
+ *     cmptypes = OrderedDict()
+ *     vltypes = OrderedDict()
+ *     if ntypes > 0:             # <<<<<<<<<<<<<<
+ *         for n from 0 <= n < ntypes:
+ *             xtype = typeids[n]
+ */
+  __pyx_t_3 = ((__pyx_v_ntypes > 0) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":1097
+ *     vltypes = OrderedDict()
+ *     if ntypes > 0:
+ *         for n from 0 <= n < ntypes:             # <<<<<<<<<<<<<<
+ *             xtype = typeids[n]
+ *             ierr = nc_inq_user_type(group._grpid, xtype, namstring,
+ */
+    __pyx_t_2 = __pyx_v_ntypes;
+    for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {
+
+      /* "netCDF4.pyx":1098
+ *     if ntypes > 0:
+ *         for n from 0 <= n < ntypes:
+ *             xtype = typeids[n]             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_user_type(group._grpid, xtype, namstring,
+ *                                     NULL,NULL,NULL,&classp)
+ */
+      __pyx_v_xtype = (__pyx_v_typeids[__pyx_v_n]);
+
+      /* "netCDF4.pyx":1099
+ *         for n from 0 <= n < ntypes:
+ *             xtype = typeids[n]
+ *             ierr = nc_inq_user_type(group._grpid, xtype, namstring,             # <<<<<<<<<<<<<<
+ *                                     NULL,NULL,NULL,&classp)
+ *             if ierr != NC_NOERR:
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+      /* "netCDF4.pyx":1100
+ *             xtype = typeids[n]
+ *             ierr = nc_inq_user_type(group._grpid, xtype, namstring,
+ *                                     NULL,NULL,NULL,&classp)             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+      __pyx_v_ierr = nc_inq_user_type(__pyx_t_7, __pyx_v_xtype, __pyx_v_namstring, NULL, NULL, NULL, (&__pyx_v_classp));
+
+      /* "netCDF4.pyx":1101
+ *             ierr = nc_inq_user_type(group._grpid, xtype, namstring,
+ *                                     NULL,NULL,NULL,&classp)
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             if classp == NC_COMPOUND: # a compound
+ */
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":1102
+ *                                     NULL,NULL,NULL,&classp)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             if classp == NC_COMPOUND: # a compound
+ *                 name = namstring.decode(default_encoding,unicode_error)
+ */
+        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_1);
+        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":1113
+ *                     continue
+ *                 cmptypes[name] = cmptype
+ *             elif classp == NC_VLEN: # a vlen             # <<<<<<<<<<<<<<
+ *                 name = namstring.decode(default_encoding,unicode_error)
+ *                 # read the VLEN type info from the file,
+ */
+      switch (__pyx_v_classp) {
+
+        /* "netCDF4.pyx":1103
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             if classp == NC_COMPOUND: # a compound             # <<<<<<<<<<<<<<
+ *                 name = namstring.decode(default_encoding,unicode_error)
+ *                 # read the compound type info from the file,
+ */
+        case NC_COMPOUND:
+
+        /* "netCDF4.pyx":1104
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             if classp == NC_COMPOUND: # a compound
+ *                 name = namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+ *                 # read the compound type info from the file,
+ *                 # create a CompoundType instance from it.
+ */
+        __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __pyx_t_9 = NULL;
+        __pyx_t_10 = 0;
+        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
+          if (likely(__pyx_t_9)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+            __Pyx_INCREF(__pyx_t_9);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_6, function);
+            __pyx_t_10 = 1;
+          }
+        }
+        __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        if (__pyx_t_9) {
+          PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
+        }
+        PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_5);
+        __Pyx_GIVEREF(__pyx_t_5);
+        PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8);
+        __Pyx_GIVEREF(__pyx_t_8);
+        __pyx_t_5 = 0;
+        __pyx_t_8 = 0;
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
+        __pyx_t_1 = 0;
+
+        /* "netCDF4.pyx":1107
+ *                 # read the compound type info from the file,
+ *                 # create a CompoundType instance from it.
+ *                 try:             # <<<<<<<<<<<<<<
+ *                     cmptype = _read_compound(group, xtype)
+ *                 except KeyError:
+ */
+        {
+          __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
+          __Pyx_XGOTREF(__pyx_t_12);
+          __Pyx_XGOTREF(__pyx_t_13);
+          __Pyx_XGOTREF(__pyx_t_14);
+          /*try:*/ {
+
+            /* "netCDF4.pyx":1108
+ *                 # create a CompoundType instance from it.
+ *                 try:
+ *                     cmptype = _read_compound(group, xtype)             # <<<<<<<<<<<<<<
+ *                 except KeyError:
+ *                     #print 'WARNING: unsupported compound type, skipping...'
+ */
+            __pyx_t_1 = __pyx_f_7netCDF4__read_compound(__pyx_v_group, __pyx_v_xtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+            __Pyx_GOTREF(__pyx_t_1);
+            __Pyx_XDECREF_SET(__pyx_v_cmptype, __pyx_t_1);
+            __pyx_t_1 = 0;
+          }
+          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+          goto __pyx_L15_try_end;
+          __pyx_L8_error:;
+          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+          /* "netCDF4.pyx":1109
+ *                 try:
+ *                     cmptype = _read_compound(group, xtype)
+ *                 except KeyError:             # <<<<<<<<<<<<<<
+ *                     #print 'WARNING: unsupported compound type, skipping...'
+ *                     continue
+ */
+          __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+          if (__pyx_t_7) {
+            __Pyx_AddTraceback("netCDF4._get_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
+            if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+            __Pyx_GOTREF(__pyx_t_1);
+            __Pyx_GOTREF(__pyx_t_6);
+            __Pyx_GOTREF(__pyx_t_11);
+
+            /* "netCDF4.pyx":1111
+ *                 except KeyError:
+ *                     #print 'WARNING: unsupported compound type, skipping...'
+ *                     continue             # <<<<<<<<<<<<<<
+ *                 cmptypes[name] = cmptype
+ *             elif classp == NC_VLEN: # a vlen
+ */
+            goto __pyx_L17_except_continue;
+            __pyx_L17_except_continue:;
+            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+            goto __pyx_L14_try_continue;
+          }
+          goto __pyx_L10_except_error;
+          __pyx_L10_except_error:;
+          __Pyx_XGIVEREF(__pyx_t_12);
+          __Pyx_XGIVEREF(__pyx_t_13);
+          __Pyx_XGIVEREF(__pyx_t_14);
+          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+          goto __pyx_L1_error;
+          __pyx_L14_try_continue:;
+          __Pyx_XGIVEREF(__pyx_t_12);
+          __Pyx_XGIVEREF(__pyx_t_13);
+          __Pyx_XGIVEREF(__pyx_t_14);
+          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+          goto __pyx_L5_continue;
+          __pyx_L15_try_end:;
+        }
+
+        /* "netCDF4.pyx":1112
+ *                     #print 'WARNING: unsupported compound type, skipping...'
+ *                     continue
+ *                 cmptypes[name] = cmptype             # <<<<<<<<<<<<<<
+ *             elif classp == NC_VLEN: # a vlen
+ *                 name = namstring.decode(default_encoding,unicode_error)
+ */
+        if (unlikely(PyObject_SetItem(__pyx_v_cmptypes, __pyx_v_name, __pyx_v_cmptype) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        break;
+
+        /* "netCDF4.pyx":1113
+ *                     continue
+ *                 cmptypes[name] = cmptype
+ *             elif classp == NC_VLEN: # a vlen             # <<<<<<<<<<<<<<
+ *                 name = namstring.decode(default_encoding,unicode_error)
+ *                 # read the VLEN type info from the file,
+ */
+        case NC_VLEN:
+
+        /* "netCDF4.pyx":1114
+ *                 cmptypes[name] = cmptype
+ *             elif classp == NC_VLEN: # a vlen
+ *                 name = namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+ *                 # read the VLEN type info from the file,
+ *                 # create a VLType instance from it.
+ */
+        __pyx_t_6 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __pyx_t_5 = NULL;
+        __pyx_t_10 = 0;
+        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+          if (likely(__pyx_t_5)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+            __Pyx_INCREF(__pyx_t_5);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_1, function);
+            __pyx_t_10 = 1;
+          }
+        }
+        __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        if (__pyx_t_5) {
+          PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+        }
+        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_t_6);
+        __Pyx_GIVEREF(__pyx_t_6);
+        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_8);
+        __Pyx_GIVEREF(__pyx_t_8);
+        __pyx_t_6 = 0;
+        __pyx_t_8 = 0;
+        __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_11);
+        __pyx_t_11 = 0;
+
+        /* "netCDF4.pyx":1117
+ *                 # read the VLEN type info from the file,
+ *                 # create a VLType instance from it.
+ *                 try:             # <<<<<<<<<<<<<<
+ *                     vltype = _read_vlen(group, xtype)
+ *                 except KeyError:
+ */
+        {
+          __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
+          __Pyx_XGOTREF(__pyx_t_14);
+          __Pyx_XGOTREF(__pyx_t_13);
+          __Pyx_XGOTREF(__pyx_t_12);
+          /*try:*/ {
+
+            /* "netCDF4.pyx":1118
+ *                 # create a VLType instance from it.
+ *                 try:
+ *                     vltype = _read_vlen(group, xtype)             # <<<<<<<<<<<<<<
+ *                 except KeyError:
+ *                     #print 'WARNING: unsupported VLEN type, skipping...'
+ */
+            __pyx_t_11 = __pyx_f_7netCDF4__read_vlen(__pyx_v_group, __pyx_v_xtype); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L18_error;}
+            __Pyx_GOTREF(__pyx_t_11);
+            __Pyx_XDECREF_SET(__pyx_v_vltype, __pyx_t_11);
+            __pyx_t_11 = 0;
+          }
+          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+          goto __pyx_L25_try_end;
+          __pyx_L18_error:;
+          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+
+          /* "netCDF4.pyx":1119
+ *                 try:
+ *                     vltype = _read_vlen(group, xtype)
+ *                 except KeyError:             # <<<<<<<<<<<<<<
+ *                     #print 'WARNING: unsupported VLEN type, skipping...'
+ *                     continue
+ */
+          __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+          if (__pyx_t_7) {
+            __Pyx_AddTraceback("netCDF4._get_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
+            if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_1, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
+            __Pyx_GOTREF(__pyx_t_11);
+            __Pyx_GOTREF(__pyx_t_1);
+            __Pyx_GOTREF(__pyx_t_9);
+
+            /* "netCDF4.pyx":1121
+ *                 except KeyError:
+ *                     #print 'WARNING: unsupported VLEN type, skipping...'
+ *                     continue             # <<<<<<<<<<<<<<
+ *                 vltypes[name] = vltype
+ *                 pass
+ */
+            goto __pyx_L27_except_continue;
+            __pyx_L27_except_continue:;
+            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+            goto __pyx_L24_try_continue;
+          }
+          goto __pyx_L20_except_error;
+          __pyx_L20_except_error:;
+          __Pyx_XGIVEREF(__pyx_t_14);
+          __Pyx_XGIVEREF(__pyx_t_13);
+          __Pyx_XGIVEREF(__pyx_t_12);
+          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
+          goto __pyx_L1_error;
+          __pyx_L24_try_continue:;
+          __Pyx_XGIVEREF(__pyx_t_14);
+          __Pyx_XGIVEREF(__pyx_t_13);
+          __Pyx_XGIVEREF(__pyx_t_12);
+          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
+          goto __pyx_L5_continue;
+          __pyx_L25_try_end:;
+        }
+
+        /* "netCDF4.pyx":1122
+ *                     #print 'WARNING: unsupported VLEN type, skipping...'
+ *                     continue
+ *                 vltypes[name] = vltype             # <<<<<<<<<<<<<<
+ *                 pass
+ *     return cmptypes, vltypes
+ */
+        if (unlikely(PyObject_SetItem(__pyx_v_vltypes, __pyx_v_name, __pyx_v_vltype) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        break;
+        default: break;
+      }
+      __pyx_L5_continue:;
+    }
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "netCDF4.pyx":1124
+ *                 vltypes[name] = vltype
+ *                 pass
+ *     return cmptypes, vltypes             # <<<<<<<<<<<<<<
+ * 
+ * cdef _get_dims(group):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __Pyx_INCREF(__pyx_v_cmptypes);
+  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_cmptypes);
+  __Pyx_GIVEREF(__pyx_v_cmptypes);
+  __Pyx_INCREF(__pyx_v_vltypes);
+  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_vltypes);
+  __Pyx_GIVEREF(__pyx_v_vltypes);
+  __pyx_r = __pyx_t_9;
+  __pyx_t_9 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":1082
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ * cdef _get_types(group):             # <<<<<<<<<<<<<<
+ *     # Private function to create L{CompoundType} or L{VLType} instances for all the
+ *     # compound or VLEN types in a L{Group} or L{Dataset}.
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_AddTraceback("netCDF4._get_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_cmptypes);
+  __Pyx_XDECREF(__pyx_v_vltypes);
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XDECREF(__pyx_v_cmptype);
+  __Pyx_XDECREF(__pyx_v_vltype);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1126
+ *     return cmptypes, vltypes
+ * 
+ * cdef _get_dims(group):             # <<<<<<<<<<<<<<
+ *     # Private function to create L{Dimension} instances for all the
+ *     # dimensions in a L{Group} or Dataset
+ */
+
+static PyObject *__pyx_f_7netCDF4__get_dims(PyObject *__pyx_v_group) {
+  int __pyx_v_ierr;
+  int __pyx_v_numdims;
+  int __pyx_v_n;
+  int __pyx_v_dimids[NC_MAX_DIMS];
+  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
+  PyObject *__pyx_v_dimensions = NULL;
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  char *__pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_t_7;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  Py_ssize_t __pyx_t_10;
+  PyObject *__pyx_t_11 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_get_dims", 0);
+
+  /* "netCDF4.pyx":1133
+ *     cdef char namstring[NC_MAX_NAME+1]
+ *     # get number of dimensions in this Group.
+ *     ierr = nc_inq_ndims(group._grpid, &numdims)             # <<<<<<<<<<<<<<
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_ierr = nc_inq_ndims(__pyx_t_2, (&__pyx_v_numdims));
+
+  /* "netCDF4.pyx":1134
+ *     # get number of dimensions in this Group.
+ *     ierr = nc_inq_ndims(group._grpid, &numdims)
+ *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     # create empty dictionary for dimensions.
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":1135
+ *     ierr = nc_inq_ndims(group._grpid, &numdims)
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *     # create empty dictionary for dimensions.
+ *     dimensions = OrderedDict()
+ */
+    __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":1137
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     # create empty dictionary for dimensions.
+ *     dimensions = OrderedDict()             # <<<<<<<<<<<<<<
+ *     if numdims > 0:
+ *         if group.data_model == 'NETCDF4':
+ */
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_6 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+    if (likely(__pyx_t_6)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_6);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_5, function);
+    }
+  }
+  if (__pyx_t_6) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_v_dimensions = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":1138
+ *     # create empty dictionary for dimensions.
+ *     dimensions = OrderedDict()
+ *     if numdims > 0:             # <<<<<<<<<<<<<<
+ *         if group.data_model == 'NETCDF4':
+ *             ierr = nc_inq_dimids(group._grpid, &numdims, dimids, 0)
+ */
+  __pyx_t_3 = ((__pyx_v_numdims > 0) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":1139
+ *     dimensions = OrderedDict()
+ *     if numdims > 0:
+ *         if group.data_model == 'NETCDF4':             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_dimids(group._grpid, &numdims, dimids, 0)
+ *             if ierr != NC_NOERR:
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":1140
+ *     if numdims > 0:
+ *         if group.data_model == 'NETCDF4':
+ *             ierr = nc_inq_dimids(group._grpid, &numdims, dimids, 0)             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_ierr = nc_inq_dimids(__pyx_t_2, (&__pyx_v_numdims), __pyx_v_dimids, 0);
+
+      /* "netCDF4.pyx":1141
+ *         if group.data_model == 'NETCDF4':
+ *             ierr = nc_inq_dimids(group._grpid, &numdims, dimids, 0)
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         else:
+ */
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":1142
+ *             ierr = nc_inq_dimids(group._grpid, &numdims, dimids, 0)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         else:
+ *             for n from 0 <= n < numdims:
+ */
+        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_1);
+        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      goto __pyx_L5;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":1144
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         else:
+ *             for n from 0 <= n < numdims:             # <<<<<<<<<<<<<<
+ *                 dimids[n] = n
+ *         for n from 0 <= n < numdims:
+ */
+      __pyx_t_2 = __pyx_v_numdims;
+      for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {
+
+        /* "netCDF4.pyx":1145
+ *         else:
+ *             for n from 0 <= n < numdims:
+ *                 dimids[n] = n             # <<<<<<<<<<<<<<
+ *         for n from 0 <= n < numdims:
+ *             ierr = nc_inq_dimname(group._grpid, dimids[n], namstring)
+ */
+        (__pyx_v_dimids[__pyx_v_n]) = __pyx_v_n;
+      }
+    }
+    __pyx_L5:;
+
+    /* "netCDF4.pyx":1146
+ *             for n from 0 <= n < numdims:
+ *                 dimids[n] = n
+ *         for n from 0 <= n < numdims:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_dimname(group._grpid, dimids[n], namstring)
+ *             if ierr != NC_NOERR:
+ */
+    __pyx_t_2 = __pyx_v_numdims;
+    for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {
+
+      /* "netCDF4.pyx":1147
+ *                 dimids[n] = n
+ *         for n from 0 <= n < numdims:
+ *             ierr = nc_inq_dimname(group._grpid, dimids[n], namstring)             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_ierr = nc_inq_dimname(__pyx_t_7, (__pyx_v_dimids[__pyx_v_n]), __pyx_v_namstring);
+
+      /* "netCDF4.pyx":1148
+ *         for n from 0 <= n < numdims:
+ *             ierr = nc_inq_dimname(group._grpid, dimids[n], namstring)
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             name = namstring.decode(default_encoding,unicode_error)
+ */
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":1149
+ *             ierr = nc_inq_dimname(group._grpid, dimids[n], namstring)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             name = namstring.decode(default_encoding,unicode_error)
+ *             dimensions[name] = Dimension(group, name, id=dimids[n])
+ */
+        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_1);
+        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":1150
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             name = namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+ *             dimensions[name] = Dimension(group, name, id=dimids[n])
+ *     return dimensions
+ */
+      __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_9 = NULL;
+      __pyx_t_10 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
+        if (likely(__pyx_t_9)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+          __Pyx_INCREF(__pyx_t_9);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_6, function);
+          __pyx_t_10 = 1;
+        }
+      }
+      __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      if (__pyx_t_9) {
+        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
+      }
+      PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_5);
+      __Pyx_GIVEREF(__pyx_t_5);
+      PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8);
+      __Pyx_GIVEREF(__pyx_t_8);
+      __pyx_t_5 = 0;
+      __pyx_t_8 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
+      __pyx_t_1 = 0;
+
+      /* "netCDF4.pyx":1151
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             name = namstring.decode(default_encoding,unicode_error)
+ *             dimensions[name] = Dimension(group, name, id=dimids[n])             # <<<<<<<<<<<<<<
+ *     return dimensions
+ * 
+ */
+      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_INCREF(__pyx_v_group);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_group);
+      __Pyx_GIVEREF(__pyx_v_group);
+      __Pyx_INCREF(__pyx_v_name);
+      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_name);
+      __Pyx_GIVEREF(__pyx_v_name);
+      __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_dimids[__pyx_v_n])); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_id, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dimension)), __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      if (unlikely(PyObject_SetItem(__pyx_v_dimensions, __pyx_v_name, __pyx_t_11) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    }
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "netCDF4.pyx":1152
+ *             name = namstring.decode(default_encoding,unicode_error)
+ *             dimensions[name] = Dimension(group, name, id=dimids[n])
+ *     return dimensions             # <<<<<<<<<<<<<<
+ * 
+ * cdef _get_grps(group):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_dimensions);
+  __pyx_r = __pyx_v_dimensions;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":1126
+ *     return cmptypes, vltypes
+ * 
+ * cdef _get_dims(group):             # <<<<<<<<<<<<<<
+ *     # Private function to create L{Dimension} instances for all the
+ *     # dimensions in a L{Group} or Dataset
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_AddTraceback("netCDF4._get_dims", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_dimensions);
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1154
+ *     return dimensions
+ * 
+ * cdef _get_grps(group):             # <<<<<<<<<<<<<<
+ *     # Private function to create L{Group} instances for all the
+ *     # groups in a L{Group} or Dataset
+ */
+
+static PyObject *__pyx_f_7netCDF4__get_grps(PyObject *__pyx_v_group) {
+  int __pyx_v_ierr;
+  int __pyx_v_numgrps;
+  int __pyx_v_n;
+  int *__pyx_v_grpids;
+  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
+  PyObject *__pyx_v_groups = NULL;
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  char *__pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  Py_ssize_t __pyx_t_9;
+  PyObject *__pyx_t_10 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_get_grps", 0);
+
+  /* "netCDF4.pyx":1161
+ *     cdef char namstring[NC_MAX_NAME+1]
+ *     # get number of groups in this Group.
+ *     ierr = nc_inq_grps(group._grpid, &numgrps, NULL)             # <<<<<<<<<<<<<<
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_ierr = nc_inq_grps(__pyx_t_2, (&__pyx_v_numgrps), NULL);
+
+  /* "netCDF4.pyx":1162
+ *     # get number of groups in this Group.
+ *     ierr = nc_inq_grps(group._grpid, &numgrps, NULL)
+ *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     # create dictionary containing L{Group} instances for groups in this group
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":1163
+ *     ierr = nc_inq_grps(group._grpid, &numgrps, NULL)
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *     # create dictionary containing L{Group} instances for groups in this group
+ *     groups = OrderedDict()
+ */
+    __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":1165
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     # create dictionary containing L{Group} instances for groups in this group
+ *     groups = OrderedDict()             # <<<<<<<<<<<<<<
+ *     if numgrps > 0:
+ *         grpids = <int *>malloc(sizeof(int) * numgrps)
+ */
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_6 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+    if (likely(__pyx_t_6)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_6);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_5, function);
+    }
+  }
+  if (__pyx_t_6) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_v_groups = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":1166
+ *     # create dictionary containing L{Group} instances for groups in this group
+ *     groups = OrderedDict()
+ *     if numgrps > 0:             # <<<<<<<<<<<<<<
+ *         grpids = <int *>malloc(sizeof(int) * numgrps)
+ *         ierr = nc_inq_grps(group._grpid, NULL, grpids)
+ */
+  __pyx_t_3 = ((__pyx_v_numgrps > 0) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":1167
+ *     groups = OrderedDict()
+ *     if numgrps > 0:
+ *         grpids = <int *>malloc(sizeof(int) * numgrps)             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_grps(group._grpid, NULL, grpids)
+ *         if ierr != NC_NOERR:
+ */
+    __pyx_v_grpids = ((int *)malloc(((sizeof(int)) * __pyx_v_numgrps)));
+
+    /* "netCDF4.pyx":1168
+ *     if numgrps > 0:
+ *         grpids = <int *>malloc(sizeof(int) * numgrps)
+ *         ierr = nc_inq_grps(group._grpid, NULL, grpids)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_ierr = nc_inq_grps(__pyx_t_2, NULL, __pyx_v_grpids);
+
+    /* "netCDF4.pyx":1169
+ *         grpids = <int *>malloc(sizeof(int) * numgrps)
+ *         ierr = nc_inq_grps(group._grpid, NULL, grpids)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         for n from 0 <= n < numgrps:
+ */
+    __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":1170
+ *         ierr = nc_inq_grps(group._grpid, NULL, grpids)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         for n from 0 <= n < numgrps:
+ *              ierr = nc_inq_grpname(grpids[n], namstring)
+ */
+      __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":1171
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         for n from 0 <= n < numgrps:             # <<<<<<<<<<<<<<
+ *              ierr = nc_inq_grpname(grpids[n], namstring)
+ *              if ierr != NC_NOERR:
+ */
+    __pyx_t_2 = __pyx_v_numgrps;
+    for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {
+
+      /* "netCDF4.pyx":1172
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         for n from 0 <= n < numgrps:
+ *              ierr = nc_inq_grpname(grpids[n], namstring)             # <<<<<<<<<<<<<<
+ *              if ierr != NC_NOERR:
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+      __pyx_v_ierr = nc_inq_grpname((__pyx_v_grpids[__pyx_v_n]), __pyx_v_namstring);
+
+      /* "netCDF4.pyx":1173
+ *         for n from 0 <= n < numgrps:
+ *              ierr = nc_inq_grpname(grpids[n], namstring)
+ *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *              name = namstring.decode(default_encoding,unicode_error)
+ */
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":1174
+ *              ierr = nc_inq_grpname(grpids[n], namstring)
+ *              if ierr != NC_NOERR:
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *              name = namstring.decode(default_encoding,unicode_error)
+ *              groups[name] = Group(group, name, id=grpids[n])
+ */
+        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_1);
+        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":1175
+ *              if ierr != NC_NOERR:
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *              name = namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+ *              groups[name] = Group(group, name, id=grpids[n])
+ *         free(grpids)
+ */
+      __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_8 = NULL;
+      __pyx_t_9 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+        if (likely(__pyx_t_8)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+          __Pyx_INCREF(__pyx_t_8);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_6, function);
+          __pyx_t_9 = 1;
+        }
+      }
+      __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      if (__pyx_t_8) {
+        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+      }
+      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
+      __Pyx_GIVEREF(__pyx_t_5);
+      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
+      __Pyx_GIVEREF(__pyx_t_7);
+      __pyx_t_5 = 0;
+      __pyx_t_7 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
+      __pyx_t_1 = 0;
+
+      /* "netCDF4.pyx":1176
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *              name = namstring.decode(default_encoding,unicode_error)
+ *              groups[name] = Group(group, name, id=grpids[n])             # <<<<<<<<<<<<<<
+ *         free(grpids)
+ *     return groups
+ */
+      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_INCREF(__pyx_v_group);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_group);
+      __Pyx_GIVEREF(__pyx_v_group);
+      __Pyx_INCREF(__pyx_v_name);
+      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_name);
+      __Pyx_GIVEREF(__pyx_v_name);
+      __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_10 = __Pyx_PyInt_From_int((__pyx_v_grpids[__pyx_v_n])); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_id, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Group)), __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      if (unlikely(PyObject_SetItem(__pyx_v_groups, __pyx_v_name, __pyx_t_10) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    }
+
+    /* "netCDF4.pyx":1177
+ *              name = namstring.decode(default_encoding,unicode_error)
+ *              groups[name] = Group(group, name, id=grpids[n])
+ *         free(grpids)             # <<<<<<<<<<<<<<
+ *     return groups
+ * 
+ */
+    free(__pyx_v_grpids);
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "netCDF4.pyx":1178
+ *              groups[name] = Group(group, name, id=grpids[n])
+ *         free(grpids)
+ *     return groups             # <<<<<<<<<<<<<<
+ * 
+ * cdef _get_vars(group):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_groups);
+  __pyx_r = __pyx_v_groups;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":1154
+ *     return dimensions
+ * 
+ * cdef _get_grps(group):             # <<<<<<<<<<<<<<
+ *     # Private function to create L{Group} instances for all the
+ *     # groups in a L{Group} or Dataset
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4._get_grps", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_groups);
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1180
+ *     return groups
+ * 
+ * cdef _get_vars(group):             # <<<<<<<<<<<<<<
+ *     # Private function to create L{Variable} instances for all the
+ *     # variables in a L{Group} or Dataset
+ */
+
+static PyObject *__pyx_f_7netCDF4__get_vars(PyObject *__pyx_v_group) {
+  int __pyx_v_ierr;
+  int __pyx_v_numvars;
+  int __pyx_v_n;
+  int __pyx_v_nn;
+  int __pyx_v_numdims;
+  int __pyx_v_varid;
+  int __pyx_v_classp;
+  int *__pyx_v_varids;
+  int __pyx_v_dimids[NC_MAX_DIMS];
+  nc_type __pyx_v_xtype;
+  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
+  char __pyx_v_namstring_cmp[(NC_MAX_NAME + 1)];
+  PyObject *__pyx_v_variables = NULL;
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_v_datatype = NULL;
+  PyObject *__pyx_v_dimensions = NULL;
+  PyObject *__pyx_v_grp = NULL;
+  int __pyx_v_found;
+  PyObject *__pyx_v_key = NULL;
+  PyObject *__pyx_v_value = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  char *__pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_t_7;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  Py_ssize_t __pyx_t_10;
+  PyObject *__pyx_t_11 = NULL;
+  PyObject *__pyx_t_12 = NULL;
+  PyObject *__pyx_t_13 = NULL;
+  PyObject *__pyx_t_14 = NULL;
+  PyObject *__pyx_t_15 = NULL;
+  PyObject *__pyx_t_16 = NULL;
+  PyObject *__pyx_t_17 = NULL;
+  PyObject *(*__pyx_t_18)(PyObject *);
+  PyObject *(*__pyx_t_19)(PyObject *);
+  int __pyx_t_20;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_get_vars", 0);
+
+  /* "netCDF4.pyx":1191
+ *     cdef char namstring_cmp[NC_MAX_NAME+1]
+ *     # get number of variables in this Group.
+ *     ierr = nc_inq_nvars(group._grpid, &numvars)             # <<<<<<<<<<<<<<
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_ierr = nc_inq_nvars(__pyx_t_2, (&__pyx_v_numvars));
+
+  /* "netCDF4.pyx":1192
+ *     # get number of variables in this Group.
+ *     ierr = nc_inq_nvars(group._grpid, &numvars)
+ *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     # create empty dictionary for variables.
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":1193
+ *     ierr = nc_inq_nvars(group._grpid, &numvars)
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *     # create empty dictionary for variables.
+ *     variables = OrderedDict()
+ */
+    __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":1195
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     # create empty dictionary for variables.
+ *     variables = OrderedDict()             # <<<<<<<<<<<<<<
+ *     if numvars > 0:
+ *         # get variable ids.
+ */
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_6 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+    if (likely(__pyx_t_6)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_6);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_5, function);
+    }
+  }
+  if (__pyx_t_6) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_v_variables = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":1196
+ *     # create empty dictionary for variables.
+ *     variables = OrderedDict()
+ *     if numvars > 0:             # <<<<<<<<<<<<<<
+ *         # get variable ids.
+ *         varids = <int *>malloc(sizeof(int) * numvars)
+ */
+  __pyx_t_3 = ((__pyx_v_numvars > 0) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":1198
+ *     if numvars > 0:
+ *         # get variable ids.
+ *         varids = <int *>malloc(sizeof(int) * numvars)             # <<<<<<<<<<<<<<
+ *         if group.data_model == 'NETCDF4':
+ *             ierr = nc_inq_varids(group._grpid, &numvars, varids)
+ */
+    __pyx_v_varids = ((int *)malloc(((sizeof(int)) * __pyx_v_numvars)));
+
+    /* "netCDF4.pyx":1199
+ *         # get variable ids.
+ *         varids = <int *>malloc(sizeof(int) * numvars)
+ *         if group.data_model == 'NETCDF4':             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_varids(group._grpid, &numvars, varids)
+ *             if ierr != NC_NOERR:
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":1200
+ *         varids = <int *>malloc(sizeof(int) * numvars)
+ *         if group.data_model == 'NETCDF4':
+ *             ierr = nc_inq_varids(group._grpid, &numvars, varids)             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_ierr = nc_inq_varids(__pyx_t_2, (&__pyx_v_numvars), __pyx_v_varids);
+
+      /* "netCDF4.pyx":1201
+ *         if group.data_model == 'NETCDF4':
+ *             ierr = nc_inq_varids(group._grpid, &numvars, varids)
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         else:
+ */
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":1202
+ *             ierr = nc_inq_varids(group._grpid, &numvars, varids)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         else:
+ *             for n from 0 <= n < numvars:
+ */
+        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_1);
+        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      goto __pyx_L5;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":1204
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         else:
+ *             for n from 0 <= n < numvars:             # <<<<<<<<<<<<<<
+ *                 varids[n] = n
+ *         # loop over variables.
+ */
+      __pyx_t_2 = __pyx_v_numvars;
+      for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {
+
+        /* "netCDF4.pyx":1205
+ *         else:
+ *             for n from 0 <= n < numvars:
+ *                 varids[n] = n             # <<<<<<<<<<<<<<
+ *         # loop over variables.
+ *         for n from 0 <= n < numvars:
+ */
+        (__pyx_v_varids[__pyx_v_n]) = __pyx_v_n;
+      }
+    }
+    __pyx_L5:;
+
+    /* "netCDF4.pyx":1207
+ *                 varids[n] = n
+ *         # loop over variables.
+ *         for n from 0 <= n < numvars:             # <<<<<<<<<<<<<<
+ *              varid = varids[n]
+ *              # get variable name.
+ */
+    __pyx_t_2 = __pyx_v_numvars;
+    for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {
+
+      /* "netCDF4.pyx":1208
+ *         # loop over variables.
+ *         for n from 0 <= n < numvars:
+ *              varid = varids[n]             # <<<<<<<<<<<<<<
+ *              # get variable name.
+ *              ierr = nc_inq_varname(group._grpid, varid, namstring)
+ */
+      __pyx_v_varid = (__pyx_v_varids[__pyx_v_n]);
+
+      /* "netCDF4.pyx":1210
+ *              varid = varids[n]
+ *              # get variable name.
+ *              ierr = nc_inq_varname(group._grpid, varid, namstring)             # <<<<<<<<<<<<<<
+ *              if ierr != NC_NOERR:
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_ierr = nc_inq_varname(__pyx_t_7, __pyx_v_varid, __pyx_v_namstring);
+
+      /* "netCDF4.pyx":1211
+ *              # get variable name.
+ *              ierr = nc_inq_varname(group._grpid, varid, namstring)
+ *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *              name = namstring.decode(default_encoding,unicode_error)
+ */
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":1212
+ *              ierr = nc_inq_varname(group._grpid, varid, namstring)
+ *              if ierr != NC_NOERR:
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *              name = namstring.decode(default_encoding,unicode_error)
+ *              if ierr != NC_NOERR:
+ */
+        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_1);
+        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":1213
+ *              if ierr != NC_NOERR:
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *              name = namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+ *              if ierr != NC_NOERR:
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+      __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_9 = NULL;
+      __pyx_t_10 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
+        if (likely(__pyx_t_9)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+          __Pyx_INCREF(__pyx_t_9);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_6, function);
+          __pyx_t_10 = 1;
+        }
+      }
+      __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      if (__pyx_t_9) {
+        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
+      }
+      PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_5);
+      __Pyx_GIVEREF(__pyx_t_5);
+      PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8);
+      __Pyx_GIVEREF(__pyx_t_8);
+      __pyx_t_5 = 0;
+      __pyx_t_8 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
+      __pyx_t_1 = 0;
+
+      /* "netCDF4.pyx":1214
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *              name = namstring.decode(default_encoding,unicode_error)
+ *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *              # get variable type.
+ */
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":1215
+ *              name = namstring.decode(default_encoding,unicode_error)
+ *              if ierr != NC_NOERR:
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *              # get variable type.
+ *              ierr = nc_inq_vartype(group._grpid, varid, &xtype)
+ */
+        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_1);
+        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":1217
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *              # get variable type.
+ *              ierr = nc_inq_vartype(group._grpid, varid, &xtype)             # <<<<<<<<<<<<<<
+ *              if ierr != NC_NOERR:
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_ierr = nc_inq_vartype(__pyx_t_7, __pyx_v_varid, (&__pyx_v_xtype));
+
+      /* "netCDF4.pyx":1218
+ *              # get variable type.
+ *              ierr = nc_inq_vartype(group._grpid, varid, &xtype)
+ *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *              # check to see if it is a supported user-defined type.
+ */
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":1219
+ *              ierr = nc_inq_vartype(group._grpid, varid, &xtype)
+ *              if ierr != NC_NOERR:
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *              # check to see if it is a supported user-defined type.
+ *              try:
+ */
+        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_1);
+        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":1221
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *              # check to see if it is a supported user-defined type.
+ *              try:             # <<<<<<<<<<<<<<
+ *                  datatype = _nctonptype[xtype]
+ *              except KeyError:
+ */
+      {
+        __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
+        __Pyx_XGOTREF(__pyx_t_12);
+        __Pyx_XGOTREF(__pyx_t_13);
+        __Pyx_XGOTREF(__pyx_t_14);
+        /*try:*/ {
+
+          /* "netCDF4.pyx":1222
+ *              # check to see if it is a supported user-defined type.
+ *              try:
+ *                  datatype = _nctonptype[xtype]             # <<<<<<<<<<<<<<
+ *              except KeyError:
+ *                  if xtype == NC_STRING:
+ */
+          __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
+          __Pyx_GOTREF(__pyx_t_1);
+          __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_xtype, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L14_error;};
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          __Pyx_XDECREF_SET(__pyx_v_datatype, __pyx_t_6);
+          __pyx_t_6 = 0;
+        }
+        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+        goto __pyx_L21_try_end;
+        __pyx_L14_error:;
+        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+        /* "netCDF4.pyx":1223
+ *              try:
+ *                  datatype = _nctonptype[xtype]
+ *              except KeyError:             # <<<<<<<<<<<<<<
+ *                  if xtype == NC_STRING:
+ *                      datatype = str
+ */
+        __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+        if (__pyx_t_7) {
+          __Pyx_AddTraceback("netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
+          if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_GOTREF(__pyx_t_1);
+          __Pyx_GOTREF(__pyx_t_11);
+
+          /* "netCDF4.pyx":1224
+ *                  datatype = _nctonptype[xtype]
+ *              except KeyError:
+ *                  if xtype == NC_STRING:             # <<<<<<<<<<<<<<
+ *                      datatype = str
+ *                  else:
+ */
+          __pyx_t_3 = ((__pyx_v_xtype == NC_STRING) != 0);
+          if (__pyx_t_3) {
+
+            /* "netCDF4.pyx":1225
+ *              except KeyError:
+ *                  if xtype == NC_STRING:
+ *                      datatype = str             # <<<<<<<<<<<<<<
+ *                  else:
+ *                      ierr = nc_inq_user_type(group._grpid, xtype, namstring_cmp,
+ */
+            __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+            __Pyx_XDECREF_SET(__pyx_v_datatype, ((PyObject *)((PyObject*)(&PyString_Type))));
+            goto __pyx_L24;
+          }
+          /*else*/ {
+
+            /* "netCDF4.pyx":1227
+ *                      datatype = str
+ *                  else:
+ *                      ierr = nc_inq_user_type(group._grpid, xtype, namstring_cmp,             # <<<<<<<<<<<<<<
+ *                                              NULL, NULL, NULL, &classp)
+ *                      if classp == NC_COMPOUND: # a compound type
+ */
+            __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
+            __Pyx_GOTREF(__pyx_t_8);
+            __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
+            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+            /* "netCDF4.pyx":1228
+ *                  else:
+ *                      ierr = nc_inq_user_type(group._grpid, xtype, namstring_cmp,
+ *                                              NULL, NULL, NULL, &classp)             # <<<<<<<<<<<<<<
+ *                      if classp == NC_COMPOUND: # a compound type
+ *                          # create CompoundType instance describing this compound type.
+ */
+            __pyx_v_ierr = nc_inq_user_type(__pyx_t_7, __pyx_v_xtype, __pyx_v_namstring_cmp, NULL, NULL, NULL, (&__pyx_v_classp));
+
+            /* "netCDF4.pyx":1236
+ *                              #print "WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
+ *                              continue
+ *                      elif classp == NC_VLEN: # a compound type             # <<<<<<<<<<<<<<
+ *                          # create VLType instance describing this compound type.
+ *                          try:
+ */
+            switch (__pyx_v_classp) {
+
+              /* "netCDF4.pyx":1229
+ *                      ierr = nc_inq_user_type(group._grpid, xtype, namstring_cmp,
+ *                                              NULL, NULL, NULL, &classp)
+ *                      if classp == NC_COMPOUND: # a compound type             # <<<<<<<<<<<<<<
+ *                          # create CompoundType instance describing this compound type.
+ *                          try:
+ */
+              case NC_COMPOUND:
+
+              /* "netCDF4.pyx":1231
+ *                      if classp == NC_COMPOUND: # a compound type
+ *                          # create CompoundType instance describing this compound type.
+ *                          try:             # <<<<<<<<<<<<<<
+ *                              datatype = _read_compound(group, xtype)
+ *                          except KeyError:
+ */
+              {
+                __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
+                __Pyx_XGOTREF(__pyx_t_15);
+                __Pyx_XGOTREF(__pyx_t_16);
+                __Pyx_XGOTREF(__pyx_t_17);
+                /*try:*/ {
+
+                  /* "netCDF4.pyx":1232
+ *                          # create CompoundType instance describing this compound type.
+ *                          try:
+ *                              datatype = _read_compound(group, xtype)             # <<<<<<<<<<<<<<
+ *                          except KeyError:
+ *                              #print "WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
+ */
+                  __pyx_t_8 = __pyx_f_7netCDF4__read_compound(__pyx_v_group, __pyx_v_xtype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+                  __Pyx_GOTREF(__pyx_t_8);
+                  __Pyx_XDECREF_SET(__pyx_v_datatype, __pyx_t_8);
+                  __pyx_t_8 = 0;
+                }
+                __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+                __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+                __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+                goto __pyx_L32_try_end;
+                __pyx_L25_error:;
+                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+                /* "netCDF4.pyx":1233
+ *                          try:
+ *                              datatype = _read_compound(group, xtype)
+ *                          except KeyError:             # <<<<<<<<<<<<<<
+ *                              #print "WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
+ *                              continue
+ */
+                __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+                if (__pyx_t_7) {
+                  __Pyx_AddTraceback("netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
+                  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_5, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
+                  __Pyx_GOTREF(__pyx_t_8);
+                  __Pyx_GOTREF(__pyx_t_5);
+                  __Pyx_GOTREF(__pyx_t_9);
+
+                  /* "netCDF4.pyx":1235
+ *                          except KeyError:
+ *                              #print "WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
+ *                              continue             # <<<<<<<<<<<<<<
+ *                      elif classp == NC_VLEN: # a compound type
+ *                          # create VLType instance describing this compound type.
+ */
+                  goto __pyx_L34_except_continue;
+                  __pyx_L34_except_continue:;
+                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+                  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+                  goto __pyx_L31_try_continue;
+                }
+                goto __pyx_L27_except_error;
+                __pyx_L27_except_error:;
+                __Pyx_XGIVEREF(__pyx_t_15);
+                __Pyx_XGIVEREF(__pyx_t_16);
+                __Pyx_XGIVEREF(__pyx_t_17);
+                __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
+                goto __pyx_L16_except_error;
+                __pyx_L31_try_continue:;
+                __Pyx_XGIVEREF(__pyx_t_15);
+                __Pyx_XGIVEREF(__pyx_t_16);
+                __Pyx_XGIVEREF(__pyx_t_17);
+                __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
+                goto __pyx_L23_except_continue;
+                __pyx_L32_try_end:;
+              }
+              break;
+
+              /* "netCDF4.pyx":1236
+ *                              #print "WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
+ *                              continue
+ *                      elif classp == NC_VLEN: # a compound type             # <<<<<<<<<<<<<<
+ *                          # create VLType instance describing this compound type.
+ *                          try:
+ */
+              case NC_VLEN:
+
+              /* "netCDF4.pyx":1238
+ *                      elif classp == NC_VLEN: # a compound type
+ *                          # create VLType instance describing this compound type.
+ *                          try:             # <<<<<<<<<<<<<<
+ *                              datatype = _read_vlen(group, xtype)
+ *                          except KeyError:
+ */
+              {
+                __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
+                __Pyx_XGOTREF(__pyx_t_17);
+                __Pyx_XGOTREF(__pyx_t_16);
+                __Pyx_XGOTREF(__pyx_t_15);
+                /*try:*/ {
+
+                  /* "netCDF4.pyx":1239
+ *                          # create VLType instance describing this compound type.
+ *                          try:
+ *                              datatype = _read_vlen(group, xtype)             # <<<<<<<<<<<<<<
+ *                          except KeyError:
+ *                              #print "WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name
+ */
+                  __pyx_t_9 = __pyx_f_7netCDF4__read_vlen(__pyx_v_group, __pyx_v_xtype); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L35_error;}
+                  __Pyx_GOTREF(__pyx_t_9);
+                  __Pyx_XDECREF_SET(__pyx_v_datatype, __pyx_t_9);
+                  __pyx_t_9 = 0;
+                }
+                __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+                __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+                __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+                goto __pyx_L42_try_end;
+                __pyx_L35_error:;
+                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+                /* "netCDF4.pyx":1240
+ *                          try:
+ *                              datatype = _read_vlen(group, xtype)
+ *                          except KeyError:             # <<<<<<<<<<<<<<
+ *                              #print "WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name
+ *                              continue
+ */
+                __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+                if (__pyx_t_7) {
+                  __Pyx_AddTraceback("netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
+                  if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L37_except_error;}
+                  __Pyx_GOTREF(__pyx_t_9);
+                  __Pyx_GOTREF(__pyx_t_5);
+                  __Pyx_GOTREF(__pyx_t_8);
+
+                  /* "netCDF4.pyx":1242
+ *                          except KeyError:
+ *                              #print "WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name
+ *                              continue             # <<<<<<<<<<<<<<
+ *                      else:
+ *                          #print "WARNING: variable '%s' has unsupported datatype, skipping .." % name
+ */
+                  goto __pyx_L44_except_continue;
+                  __pyx_L44_except_continue:;
+                  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+                  goto __pyx_L41_try_continue;
+                }
+                goto __pyx_L37_except_error;
+                __pyx_L37_except_error:;
+                __Pyx_XGIVEREF(__pyx_t_17);
+                __Pyx_XGIVEREF(__pyx_t_16);
+                __Pyx_XGIVEREF(__pyx_t_15);
+                __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
+                goto __pyx_L16_except_error;
+                __pyx_L41_try_continue:;
+                __Pyx_XGIVEREF(__pyx_t_17);
+                __Pyx_XGIVEREF(__pyx_t_16);
+                __Pyx_XGIVEREF(__pyx_t_15);
+                __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
+                goto __pyx_L23_except_continue;
+                __pyx_L42_try_end:;
+              }
+              break;
+              default:
+
+              /* "netCDF4.pyx":1245
+ *                      else:
+ *                          #print "WARNING: variable '%s' has unsupported datatype, skipping .." % name
+ *                          continue             # <<<<<<<<<<<<<<
+ *              # get number of dimensions.
+ *              ierr = nc_inq_varndims(group._grpid, varid, &numdims)
+ */
+              goto __pyx_L23_except_continue;
+              break;
+            }
+          }
+          __pyx_L24:;
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+          goto __pyx_L15_exception_handled;
+          __pyx_L23_except_continue:;
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+          goto __pyx_L20_try_continue;
+        }
+        goto __pyx_L16_except_error;
+        __pyx_L16_except_error:;
+        __Pyx_XGIVEREF(__pyx_t_12);
+        __Pyx_XGIVEREF(__pyx_t_13);
+        __Pyx_XGIVEREF(__pyx_t_14);
+        __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+        goto __pyx_L1_error;
+        __pyx_L20_try_continue:;
+        __Pyx_XGIVEREF(__pyx_t_12);
+        __Pyx_XGIVEREF(__pyx_t_13);
+        __Pyx_XGIVEREF(__pyx_t_14);
+        __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+        goto __pyx_L9_continue;
+        __pyx_L15_exception_handled:;
+        __Pyx_XGIVEREF(__pyx_t_12);
+        __Pyx_XGIVEREF(__pyx_t_13);
+        __Pyx_XGIVEREF(__pyx_t_14);
+        __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+        __pyx_L21_try_end:;
+      }
+
+      /* "netCDF4.pyx":1247
+ *                          continue
+ *              # get number of dimensions.
+ *              ierr = nc_inq_varndims(group._grpid, varid, &numdims)             # <<<<<<<<<<<<<<
+ *              if ierr != NC_NOERR:
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __pyx_v_ierr = nc_inq_varndims(__pyx_t_7, __pyx_v_varid, (&__pyx_v_numdims));
+
+      /* "netCDF4.pyx":1248
+ *              # get number of dimensions.
+ *              ierr = nc_inq_varndims(group._grpid, varid, &numdims)
+ *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *              # get dimension ids.
+ */
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":1249
+ *              ierr = nc_inq_varndims(group._grpid, varid, &numdims)
+ *              if ierr != NC_NOERR:
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *              # get dimension ids.
+ *              ierr = nc_inq_vardimid(group._grpid, varid, dimids)
+ */
+        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_11 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_INCREF(__pyx_t_11);
+        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_11);
+        __Pyx_GIVEREF(__pyx_t_11);
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_Raise(__pyx_t_11, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":1251
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *              # get dimension ids.
+ *              ierr = nc_inq_vardimid(group._grpid, varid, dimids)             # <<<<<<<<<<<<<<
+ *              if ierr != NC_NOERR:
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __pyx_v_ierr = nc_inq_vardimid(__pyx_t_7, __pyx_v_varid, __pyx_v_dimids);
+
+      /* "netCDF4.pyx":1252
+ *              # get dimension ids.
+ *              ierr = nc_inq_vardimid(group._grpid, varid, dimids)
+ *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *              # loop over dimensions, retrieve names.
+ */
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":1253
+ *              ierr = nc_inq_vardimid(group._grpid, varid, dimids)
+ *              if ierr != NC_NOERR:
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *              # loop over dimensions, retrieve names.
+ *              # if not found in current group, look in parents.
+ */
+        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_11 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_INCREF(__pyx_t_11);
+        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_11);
+        __Pyx_GIVEREF(__pyx_t_11);
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_Raise(__pyx_t_11, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":1259
+ *              # and so does it's parent - can a variable in grp1
+ *              # use the 'foo' dimension from the parent?
+ *              dimensions = []             # <<<<<<<<<<<<<<
+ *              for nn from 0 <= nn < numdims:
+ *                  grp = group
+ */
+      __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __Pyx_XDECREF_SET(__pyx_v_dimensions, ((PyObject*)__pyx_t_11));
+      __pyx_t_11 = 0;
+
+      /* "netCDF4.pyx":1260
+ *              # use the 'foo' dimension from the parent?
+ *              dimensions = []
+ *              for nn from 0 <= nn < numdims:             # <<<<<<<<<<<<<<
+ *                  grp = group
+ *                  found = False
+ */
+      __pyx_t_7 = __pyx_v_numdims;
+      for (__pyx_v_nn = 0; __pyx_v_nn < __pyx_t_7; __pyx_v_nn++) {
+
+        /* "netCDF4.pyx":1261
+ *              dimensions = []
+ *              for nn from 0 <= nn < numdims:
+ *                  grp = group             # <<<<<<<<<<<<<<
+ *                  found = False
+ *                  while not found:
+ */
+        __Pyx_INCREF(__pyx_v_group);
+        __Pyx_XDECREF_SET(__pyx_v_grp, __pyx_v_group);
+
+        /* "netCDF4.pyx":1262
+ *              for nn from 0 <= nn < numdims:
+ *                  grp = group
+ *                  found = False             # <<<<<<<<<<<<<<
+ *                  while not found:
+ *                      for key, value in grp.dimensions.items():
+ */
+        __pyx_v_found = 0;
+
+        /* "netCDF4.pyx":1263
+ *                  grp = group
+ *                  found = False
+ *                  while not found:             # <<<<<<<<<<<<<<
+ *                      for key, value in grp.dimensions.items():
+ *                          if value._dimid == dimids[nn]:
+ */
+        while (1) {
+          __pyx_t_3 = ((!(__pyx_v_found != 0)) != 0);
+          if (!__pyx_t_3) break;
+
+          /* "netCDF4.pyx":1264
+ *                  found = False
+ *                  while not found:
+ *                      for key, value in grp.dimensions.items():             # <<<<<<<<<<<<<<
+ *                          if value._dimid == dimids[nn]:
+ *                              dimensions.append(key)
+ */
+          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_1);
+          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          __pyx_t_1 = NULL;
+          if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+            if (likely(__pyx_t_1)) {
+              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+              __Pyx_INCREF(__pyx_t_1);
+              __Pyx_INCREF(function);
+              __Pyx_DECREF_SET(__pyx_t_6, function);
+            }
+          }
+          if (__pyx_t_1) {
+            __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          } else {
+            __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          __Pyx_GOTREF(__pyx_t_11);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
+            __pyx_t_6 = __pyx_t_11; __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = 0;
+            __pyx_t_18 = NULL;
+          } else {
+            __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_6);
+            __pyx_t_18 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+          for (;;) {
+            if (likely(!__pyx_t_18)) {
+              if (likely(PyList_CheckExact(__pyx_t_6))) {
+                if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break;
+                #if CYTHON_COMPILING_IN_CPYTHON
+                __pyx_t_11 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_11); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+                #else
+                __pyx_t_11 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+                #endif
+              } else {
+                if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+                #if CYTHON_COMPILING_IN_CPYTHON
+                __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_11); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+                #else
+                __pyx_t_11 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+                #endif
+              }
+            } else {
+              __pyx_t_11 = __pyx_t_18(__pyx_t_6);
+              if (unlikely(!__pyx_t_11)) {
+                PyObject* exc_type = PyErr_Occurred();
+                if (exc_type) {
+                  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+                  else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+                }
+                break;
+              }
+              __Pyx_GOTREF(__pyx_t_11);
+            }
+            if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
+              PyObject* sequence = __pyx_t_11;
+              #if CYTHON_COMPILING_IN_CPYTHON
+              Py_ssize_t size = Py_SIZE(sequence);
+              #else
+              Py_ssize_t size = PySequence_Size(sequence);
+              #endif
+              if (unlikely(size != 2)) {
+                if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+                else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+                {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              }
+              #if CYTHON_COMPILING_IN_CPYTHON
+              if (likely(PyTuple_CheckExact(sequence))) {
+                __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
+                __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
+              } else {
+                __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
+                __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
+              }
+              __Pyx_INCREF(__pyx_t_1);
+              __Pyx_INCREF(__pyx_t_8);
+              #else
+              __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              __Pyx_GOTREF(__pyx_t_1);
+              __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              __Pyx_GOTREF(__pyx_t_8);
+              #endif
+              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+            } else {
+              Py_ssize_t index = -1;
+              __pyx_t_5 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              __Pyx_GOTREF(__pyx_t_5);
+              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+              __pyx_t_19 = Py_TYPE(__pyx_t_5)->tp_iternext;
+              index = 0; __pyx_t_1 = __pyx_t_19(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L53_unpacking_failed;
+              __Pyx_GOTREF(__pyx_t_1);
+              index = 1; __pyx_t_8 = __pyx_t_19(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L53_unpacking_failed;
+              __Pyx_GOTREF(__pyx_t_8);
+              if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              __pyx_t_19 = NULL;
+              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+              goto __pyx_L54_unpacking_done;
+              __pyx_L53_unpacking_failed:;
+              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+              __pyx_t_19 = NULL;
+              if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              __pyx_L54_unpacking_done:;
+            }
+            __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
+            __pyx_t_1 = 0;
+            __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_8);
+            __pyx_t_8 = 0;
+
+            /* "netCDF4.pyx":1265
+ *                  while not found:
+ *                      for key, value in grp.dimensions.items():
+ *                          if value._dimid == dimids[nn]:             # <<<<<<<<<<<<<<
+ *                              dimensions.append(key)
+ *                              found = True
+ */
+            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_dimid); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_11);
+            __pyx_t_8 = __Pyx_PyInt_From_int((__pyx_v_dimids[__pyx_v_nn])); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_8);
+            __pyx_t_1 = PyObject_RichCompare(__pyx_t_11, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+            __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+            if (__pyx_t_3) {
+
+              /* "netCDF4.pyx":1266
+ *                      for key, value in grp.dimensions.items():
+ *                          if value._dimid == dimids[nn]:
+ *                              dimensions.append(key)             # <<<<<<<<<<<<<<
+ *                              found = True
+ *                              break
+ */
+              __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_dimensions, __pyx_v_key); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+              /* "netCDF4.pyx":1267
+ *                          if value._dimid == dimids[nn]:
+ *                              dimensions.append(key)
+ *                              found = True             # <<<<<<<<<<<<<<
+ *                              break
+ *                      grp = grp.parent
+ */
+              __pyx_v_found = 1;
+
+              /* "netCDF4.pyx":1268
+ *                              dimensions.append(key)
+ *                              found = True
+ *                              break             # <<<<<<<<<<<<<<
+ *                      grp = grp.parent
+ *              # create new variable instance.
+ */
+              goto __pyx_L52_break;
+            }
+
+            /* "netCDF4.pyx":1264
+ *                  found = False
+ *                  while not found:
+ *                      for key, value in grp.dimensions.items():             # <<<<<<<<<<<<<<
+ *                          if value._dimid == dimids[nn]:
+ *                              dimensions.append(key)
+ */
+          }
+          __pyx_L52_break:;
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+          /* "netCDF4.pyx":1269
+ *                              found = True
+ *                              break
+ *                      grp = grp.parent             # <<<<<<<<<<<<<<
+ *              # create new variable instance.
+ *              variables[name] = Variable(group, name, datatype, dimensions, id=varid)
+ */
+          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_parent); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF_SET(__pyx_v_grp, __pyx_t_6);
+          __pyx_t_6 = 0;
+        }
+      }
+
+      /* "netCDF4.pyx":1271
+ *                      grp = grp.parent
+ *              # create new variable instance.
+ *              variables[name] = Variable(group, name, datatype, dimensions, id=varid)             # <<<<<<<<<<<<<<
+ *         free(varids) # free pointer holding variable ids.
+ *     return variables
+ */
+      __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_INCREF(__pyx_v_group);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_group);
+      __Pyx_GIVEREF(__pyx_v_group);
+      __Pyx_INCREF(__pyx_v_name);
+      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_name);
+      __Pyx_GIVEREF(__pyx_v_name);
+      __Pyx_INCREF(__pyx_v_datatype);
+      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_datatype);
+      __Pyx_GIVEREF(__pyx_v_datatype);
+      __Pyx_INCREF(__pyx_v_dimensions);
+      PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_dimensions);
+      __Pyx_GIVEREF(__pyx_v_dimensions);
+      __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Variable)), __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_L9_continue:;
+    }
+
+    /* "netCDF4.pyx":1272
+ *              # create new variable instance.
+ *              variables[name] = Variable(group, name, datatype, dimensions, id=varid)
+ *         free(varids) # free pointer holding variable ids.             # <<<<<<<<<<<<<<
+ *     return variables
+ * 
+ */
+    free(__pyx_v_varids);
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "netCDF4.pyx":1273
+ *              variables[name] = Variable(group, name, datatype, dimensions, id=varid)
+ *         free(varids) # free pointer holding variable ids.
+ *     return variables             # <<<<<<<<<<<<<<
+ * 
+ * # these are class attributes that
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_variables);
+  __pyx_r = __pyx_v_variables;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":1180
+ *     return groups
+ * 
+ * cdef _get_vars(group):             # <<<<<<<<<<<<<<
+ *     # Private function to create L{Variable} instances for all the
+ *     # variables in a L{Group} or Dataset
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_AddTraceback("netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_variables);
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XDECREF(__pyx_v_datatype);
+  __Pyx_XDECREF(__pyx_v_dimensions);
+  __Pyx_XDECREF(__pyx_v_grp);
+  __Pyx_XDECREF(__pyx_v_key);
+  __Pyx_XDECREF(__pyx_v_value);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1407
+ *     file_format, data_model, cmptypes, vltypes, keepweakref
+ * 
+ *     def __init__(self, filename, mode='r', clobber=True, format='NETCDF4',             # <<<<<<<<<<<<<<
+ *                  diskless=False, persist=False, keepweakref=False, **kwargs):
+ *         cdef int grpid, ierr, numgrps, numdims, numvars
+ */
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_filename = 0;
+  PyObject *__pyx_v_mode = 0;
+  PyObject *__pyx_v_clobber = 0;
+  PyObject *__pyx_v_format = 0;
+  PyObject *__pyx_v_diskless = 0;
+  PyObject *__pyx_v_persist = 0;
+  PyObject *__pyx_v_keepweakref = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+  __Pyx_GOTREF(__pyx_v_kwargs);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_mode,&__pyx_n_s_clobber,&__pyx_n_s_format,&__pyx_n_s_diskless,&__pyx_n_s_persist,&__pyx_n_s_keepweakref,0};
+    PyObject* values[7] = {0,0,0,0,0,0,0};
+    values[1] = ((PyObject *)__pyx_n_s_r_2);
+    values[2] = ((PyObject *)Py_True);
+    values[3] = ((PyObject *)__pyx_n_s_NETCDF4);
+
+    /* "netCDF4.pyx":1408
+ * 
+ *     def __init__(self, filename, mode='r', clobber=True, format='NETCDF4',
+ *                  diskless=False, persist=False, keepweakref=False, **kwargs):             # <<<<<<<<<<<<<<
+ *         cdef int grpid, ierr, numgrps, numdims, numvars
+ *         cdef char *path
+ */
+    values[4] = ((PyObject *)Py_False);
+    values[5] = ((PyObject *)Py_False);
+    values[6] = ((PyObject *)Py_False);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode);
+          if (value) { values[1] = value; kw_args--; }
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_clobber);
+          if (value) { values[2] = value; kw_args--; }
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format);
+          if (value) { values[3] = value; kw_args--; }
+        }
+        case  4:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_diskless);
+          if (value) { values[4] = value; kw_args--; }
+        }
+        case  5:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_persist);
+          if (value) { values[5] = value; kw_args--; }
+        }
+        case  6:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_keepweakref);
+          if (value) { values[6] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_filename = values[0];
+    __pyx_v_mode = values[1];
+    __pyx_v_clobber = values[2];
+    __pyx_v_format = values[3];
+    __pyx_v_diskless = values[4];
+    __pyx_v_persist = values[5];
+    __pyx_v_keepweakref = values[6];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("netCDF4.Dataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset___init__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode, __pyx_v_clobber, __pyx_v_format, __pyx_v_diskless, __pyx_v_persist, __pyx_v_keepweakref, __pyx_v_kwargs);
+
+  /* "netCDF4.pyx":1407
+ *     file_format, data_model, cmptypes, vltypes, keepweakref
+ * 
+ *     def __init__(self, filename, mode='r', clobber=True, format='NETCDF4',             # <<<<<<<<<<<<<<
+ *                  diskless=False, persist=False, keepweakref=False, **kwargs):
+ *         cdef int grpid, ierr, numgrps, numdims, numvars
+ */
+
+  /* function exit code */
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset___init__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_clobber, PyObject *__pyx_v_format, PyObject *__pyx_v_diskless, PyObject *__pyx_v_persist, PyObject *__pyx_v_keepweakref, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
+  int __pyx_v_grpid;
+  int __pyx_v_ierr;
+  char *__pyx_v_path;
+  PyObject *__pyx_v_bytestr = NULL;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  char *__pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_t_7;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *(*__pyx_t_9)(PyObject *);
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__init__", 0);
+
+  /* "netCDF4.pyx":1412
+ *         cdef char *path
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         if diskless and __netcdf4libversion__ < '4.2.1':             # <<<<<<<<<<<<<<
+ *             #diskless = False # don't raise error, instead silently ignore
+ *             raise ValueError('diskless mode requires netcdf lib >= 4.2.1, you have %s' % __netcdf4libversion__)
+ */
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_2) {
+  } else {
+    __pyx_t_1 = __pyx_t_2;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_kp_s_4_2_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = __pyx_t_2;
+  __pyx_L4_bool_binop_done:;
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":1414
+ *         if diskless and __netcdf4libversion__ < '4.2.1':
+ *             #diskless = False # don't raise error, instead silently ignore
+ *             raise ValueError('diskless mode requires netcdf lib >= 4.2.1, you have %s' % __netcdf4libversion__)             # <<<<<<<<<<<<<<
+ *         bytestr = _strencode(filename)
+ *         path = bytestr
+ */
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_diskless_mode_requires_netcdf_li, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":1415
+ *             #diskless = False # don't raise error, instead silently ignore
+ *             raise ValueError('diskless mode requires netcdf lib >= 4.2.1, you have %s' % __netcdf4libversion__)
+ *         bytestr = _strencode(filename)             # <<<<<<<<<<<<<<
+ *         path = bytestr
+ *         if mode == 'w':
+ */
+  __pyx_t_3 = __pyx_f_7netCDF4__strencode(__pyx_v_filename, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_bytestr = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":1416
+ *             raise ValueError('diskless mode requires netcdf lib >= 4.2.1, you have %s' % __netcdf4libversion__)
+ *         bytestr = _strencode(filename)
+ *         path = bytestr             # <<<<<<<<<<<<<<
+ *         if mode == 'w':
+ *             _set_default_format(format=format)
+ */
+  __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_path = __pyx_t_5;
+
+  /* "netCDF4.pyx":1417
+ *         bytestr = _strencode(filename)
+ *         path = bytestr
+ *         if mode == 'w':             # <<<<<<<<<<<<<<
+ *             _set_default_format(format=format)
+ *             if clobber:
+ */
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_w, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":1418
+ *         path = bytestr
+ *         if mode == 'w':
+ *             _set_default_format(format=format)             # <<<<<<<<<<<<<<
+ *             if clobber:
+ *                 if diskless:
+ */
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_set_default_format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_format, __pyx_v_format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+    /* "netCDF4.pyx":1419
+ *         if mode == 'w':
+ *             _set_default_format(format=format)
+ *             if clobber:             # <<<<<<<<<<<<<<
+ *                 if diskless:
+ *                     if persist:
+ */
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_clobber); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":1420
+ *             _set_default_format(format=format)
+ *             if clobber:
+ *                 if diskless:             # <<<<<<<<<<<<<<
+ *                     if persist:
+ *                         ierr = nc_create(path, NC_WRITE | NC_CLOBBER | NC_DISKLESS , &grpid)
+ */
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_1) {
+
+        /* "netCDF4.pyx":1421
+ *             if clobber:
+ *                 if diskless:
+ *                     if persist:             # <<<<<<<<<<<<<<
+ *                         ierr = nc_create(path, NC_WRITE | NC_CLOBBER | NC_DISKLESS , &grpid)
+ *                     else:
+ */
+        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (__pyx_t_1) {
+
+          /* "netCDF4.pyx":1422
+ *                 if diskless:
+ *                     if persist:
+ *                         ierr = nc_create(path, NC_WRITE | NC_CLOBBER | NC_DISKLESS , &grpid)             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         ierr = nc_create(path, NC_CLOBBER | NC_DISKLESS , &grpid)
+ */
+          __pyx_t_6 = __Pyx_PyInt_From_int((NC_WRITE | NC_CLOBBER)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __pyx_t_3 = PyNumber_Or(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+          __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid));
+          goto __pyx_L9;
+        }
+        /*else*/ {
+
+          /* "netCDF4.pyx":1424
+ *                         ierr = nc_create(path, NC_WRITE | NC_CLOBBER | NC_DISKLESS , &grpid)
+ *                     else:
+ *                         ierr = nc_create(path, NC_CLOBBER | NC_DISKLESS , &grpid)             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     ierr = nc_create(path, NC_CLOBBER, &grpid)
+ */
+          __pyx_t_3 = __Pyx_PyInt_From_int(NC_CLOBBER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __pyx_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+          __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid));
+        }
+        __pyx_L9:;
+        goto __pyx_L8;
+      }
+      /*else*/ {
+
+        /* "netCDF4.pyx":1426
+ *                         ierr = nc_create(path, NC_CLOBBER | NC_DISKLESS , &grpid)
+ *                 else:
+ *                     ierr = nc_create(path, NC_CLOBBER, &grpid)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 if diskless:
+ */
+        __pyx_v_ierr = nc_create(__pyx_v_path, NC_CLOBBER, (&__pyx_v_grpid));
+      }
+      __pyx_L8:;
+      goto __pyx_L7;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":1428
+ *                     ierr = nc_create(path, NC_CLOBBER, &grpid)
+ *             else:
+ *                 if diskless:             # <<<<<<<<<<<<<<
+ *                     if persist:
+ *                         ierr = nc_create(path, NC_WRITE | NC_NOCLOBBER | NC_DISKLESS , &grpid)
+ */
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_1) {
+
+        /* "netCDF4.pyx":1429
+ *             else:
+ *                 if diskless:
+ *                     if persist:             # <<<<<<<<<<<<<<
+ *                         ierr = nc_create(path, NC_WRITE | NC_NOCLOBBER | NC_DISKLESS , &grpid)
+ *                     else:
+ */
+        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (__pyx_t_1) {
+
+          /* "netCDF4.pyx":1430
+ *                 if diskless:
+ *                     if persist:
+ *                         ierr = nc_create(path, NC_WRITE | NC_NOCLOBBER | NC_DISKLESS , &grpid)             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         ierr = nc_create(path, NC_NOCLOBBER | NC_DISKLESS , &grpid)
+ */
+          __pyx_t_6 = __Pyx_PyInt_From_int((NC_WRITE | NC_NOCLOBBER)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __pyx_t_3 = PyNumber_Or(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+          __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid));
+          goto __pyx_L11;
+        }
+        /*else*/ {
+
+          /* "netCDF4.pyx":1432
+ *                         ierr = nc_create(path, NC_WRITE | NC_NOCLOBBER | NC_DISKLESS , &grpid)
+ *                     else:
+ *                         ierr = nc_create(path, NC_NOCLOBBER | NC_DISKLESS , &grpid)             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     ierr = nc_create(path, NC_NOCLOBBER, &grpid)
+ */
+          __pyx_t_3 = __Pyx_PyInt_From_int(NC_NOCLOBBER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __pyx_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+          __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid));
+        }
+        __pyx_L11:;
+        goto __pyx_L10;
+      }
+      /*else*/ {
+
+        /* "netCDF4.pyx":1434
+ *                         ierr = nc_create(path, NC_NOCLOBBER | NC_DISKLESS , &grpid)
+ *                 else:
+ *                     ierr = nc_create(path, NC_NOCLOBBER, &grpid)             # <<<<<<<<<<<<<<
+ *             # reset default format to netcdf3 - this is a workaround
+ *             # for issue 170 (nc_open'ing a DAP dataset after switching
+ */
+        __pyx_v_ierr = nc_create(__pyx_v_path, NC_NOCLOBBER, (&__pyx_v_grpid));
+      }
+      __pyx_L10:;
+    }
+    __pyx_L7:;
+
+    /* "netCDF4.pyx":1439
+ *             # format to NETCDF4). This bug should be fixed in version
+ *             # 4.3.0 of the netcdf library (add a version check here?).
+ *             _set_default_format(format='NETCDF3_64BIT')             # <<<<<<<<<<<<<<
+ *         elif mode == 'r':
+ *             if diskless:
+ */
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_set_default_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_format, __pyx_n_s_NETCDF3_64BIT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    goto __pyx_L6;
+  }
+
+  /* "netCDF4.pyx":1440
+ *             # 4.3.0 of the netcdf library (add a version check here?).
+ *             _set_default_format(format='NETCDF3_64BIT')
+ *         elif mode == 'r':             # <<<<<<<<<<<<<<
+ *             if diskless:
+ *                 ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid)
+ */
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_r_2, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":1441
+ *             _set_default_format(format='NETCDF3_64BIT')
+ *         elif mode == 'r':
+ *             if diskless:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid)
+ *             else:
+ */
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":1442
+ *         elif mode == 'r':
+ *             if diskless:
+ *                 ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 ierr = nc_open(path, NC_NOWRITE, &grpid)
+ */
+      __pyx_t_3 = __Pyx_PyInt_From_int(NC_NOWRITE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_v_ierr = nc_open(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid));
+      goto __pyx_L12;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":1444
+ *                 ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid)
+ *             else:
+ *                 ierr = nc_open(path, NC_NOWRITE, &grpid)             # <<<<<<<<<<<<<<
+ *         elif mode == 'r+' or mode == 'a':
+ *             if diskless:
+ */
+      __pyx_v_ierr = nc_open(__pyx_v_path, NC_NOWRITE, (&__pyx_v_grpid));
+    }
+    __pyx_L12:;
+    goto __pyx_L6;
+  }
+
+  /* "netCDF4.pyx":1445
+ *             else:
+ *                 ierr = nc_open(path, NC_NOWRITE, &grpid)
+ *         elif mode == 'r+' or mode == 'a':             # <<<<<<<<<<<<<<
+ *             if diskless:
+ *                 ierr = nc_open(path, NC_WRITE | NC_DISKLESS, &grpid)
+ */
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_kp_s_r_3, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_2) {
+  } else {
+    __pyx_t_1 = __pyx_t_2;
+    goto __pyx_L13_bool_binop_done;
+  }
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_a, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_t_2;
+  __pyx_L13_bool_binop_done:;
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":1446
+ *                 ierr = nc_open(path, NC_NOWRITE, &grpid)
+ *         elif mode == 'r+' or mode == 'a':
+ *             if diskless:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_open(path, NC_WRITE | NC_DISKLESS, &grpid)
+ *             else:
+ */
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":1447
+ *         elif mode == 'r+' or mode == 'a':
+ *             if diskless:
+ *                 ierr = nc_open(path, NC_WRITE | NC_DISKLESS, &grpid)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 ierr = nc_open(path, NC_WRITE, &grpid)
+ */
+      __pyx_t_6 = __Pyx_PyInt_From_int(NC_WRITE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = PyNumber_Or(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_v_ierr = nc_open(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid));
+      goto __pyx_L15;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":1449
+ *                 ierr = nc_open(path, NC_WRITE | NC_DISKLESS, &grpid)
+ *             else:
+ *                 ierr = nc_open(path, NC_WRITE, &grpid)             # <<<<<<<<<<<<<<
+ *         elif mode == 'as' or mode == 'r+s':
+ *             if diskless:
+ */
+      __pyx_v_ierr = nc_open(__pyx_v_path, NC_WRITE, (&__pyx_v_grpid));
+    }
+    __pyx_L15:;
+    goto __pyx_L6;
+  }
+
+  /* "netCDF4.pyx":1450
+ *             else:
+ *                 ierr = nc_open(path, NC_WRITE, &grpid)
+ *         elif mode == 'as' or mode == 'r+s':             # <<<<<<<<<<<<<<
+ *             if diskless:
+ *                 ierr = nc_open(path, NC_SHARE | NC_DISKLESS, &grpid)
+ */
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_as, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_2) {
+  } else {
+    __pyx_t_1 = __pyx_t_2;
+    goto __pyx_L16_bool_binop_done;
+  }
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_kp_s_r_s, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_t_2;
+  __pyx_L16_bool_binop_done:;
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":1451
+ *                 ierr = nc_open(path, NC_WRITE, &grpid)
+ *         elif mode == 'as' or mode == 'r+s':
+ *             if diskless:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_open(path, NC_SHARE | NC_DISKLESS, &grpid)
+ *             else:
+ */
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":1452
+ *         elif mode == 'as' or mode == 'r+s':
+ *             if diskless:
+ *                 ierr = nc_open(path, NC_SHARE | NC_DISKLESS, &grpid)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 ierr = nc_open(path, NC_SHARE, &grpid)
+ */
+      __pyx_t_3 = __Pyx_PyInt_From_int(NC_SHARE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_v_ierr = nc_open(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid));
+      goto __pyx_L18;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":1454
+ *                 ierr = nc_open(path, NC_SHARE | NC_DISKLESS, &grpid)
+ *             else:
+ *                 ierr = nc_open(path, NC_SHARE, &grpid)             # <<<<<<<<<<<<<<
+ *         elif mode == 'ws':
+ *             if clobber:
+ */
+      __pyx_v_ierr = nc_open(__pyx_v_path, NC_SHARE, (&__pyx_v_grpid));
+    }
+    __pyx_L18:;
+    goto __pyx_L6;
+  }
+
+  /* "netCDF4.pyx":1455
+ *             else:
+ *                 ierr = nc_open(path, NC_SHARE, &grpid)
+ *         elif mode == 'ws':             # <<<<<<<<<<<<<<
+ *             if clobber:
+ *                 if diskless:
+ */
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_ws, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":1456
+ *                 ierr = nc_open(path, NC_SHARE, &grpid)
+ *         elif mode == 'ws':
+ *             if clobber:             # <<<<<<<<<<<<<<
+ *                 if diskless:
+ *                     if persist:
+ */
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_clobber); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":1457
+ *         elif mode == 'ws':
+ *             if clobber:
+ *                 if diskless:             # <<<<<<<<<<<<<<
+ *                     if persist:
+ *                         ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid)
+ */
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_1) {
+
+        /* "netCDF4.pyx":1458
+ *             if clobber:
+ *                 if diskless:
+ *                     if persist:             # <<<<<<<<<<<<<<
+ *                         ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid)
+ *                     else:
+ */
+        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (__pyx_t_1) {
+
+          /* "netCDF4.pyx":1459
+ *                 if diskless:
+ *                     if persist:
+ *                         ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid)             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         ierr = nc_create(path, NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid)
+ */
+          __pyx_t_6 = __Pyx_PyInt_From_int(((NC_WRITE | NC_SHARE) | NC_CLOBBER)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __pyx_t_3 = PyNumber_Or(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+          __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid));
+          goto __pyx_L21;
+        }
+        /*else*/ {
+
+          /* "netCDF4.pyx":1461
+ *                         ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid)
+ *                     else:
+ *                         ierr = nc_create(path, NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid)             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     ierr = nc_create(path, NC_SHARE | NC_CLOBBER, &grpid)
+ */
+          __pyx_t_3 = __Pyx_PyInt_From_int((NC_SHARE | NC_CLOBBER)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __pyx_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+          __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid));
+        }
+        __pyx_L21:;
+        goto __pyx_L20;
+      }
+      /*else*/ {
+
+        /* "netCDF4.pyx":1463
+ *                         ierr = nc_create(path, NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid)
+ *                 else:
+ *                     ierr = nc_create(path, NC_SHARE | NC_CLOBBER, &grpid)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 if diskless:
+ */
+        __pyx_v_ierr = nc_create(__pyx_v_path, (NC_SHARE | NC_CLOBBER), (&__pyx_v_grpid));
+      }
+      __pyx_L20:;
+      goto __pyx_L19;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":1465
+ *                     ierr = nc_create(path, NC_SHARE | NC_CLOBBER, &grpid)
+ *             else:
+ *                 if diskless:             # <<<<<<<<<<<<<<
+ *                     if persist:
+ *                         ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid)
+ */
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_1) {
+
+        /* "netCDF4.pyx":1466
+ *             else:
+ *                 if diskless:
+ *                     if persist:             # <<<<<<<<<<<<<<
+ *                         ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid)
+ *                     else:
+ */
+        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (__pyx_t_1) {
+
+          /* "netCDF4.pyx":1467
+ *                 if diskless:
+ *                     if persist:
+ *                         ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid)             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid)
+ */
+          __pyx_t_6 = __Pyx_PyInt_From_int(((NC_WRITE | NC_SHARE) | NC_NOCLOBBER)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __pyx_t_3 = PyNumber_Or(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+          __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid));
+          goto __pyx_L23;
+        }
+        /*else*/ {
+
+          /* "netCDF4.pyx":1469
+ *                         ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid)
+ *                     else:
+ *                         ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid)             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER, &grpid)
+ */
+          __pyx_t_3 = __Pyx_PyInt_From_int((NC_SHARE | NC_NOCLOBBER)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __pyx_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+          __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid));
+        }
+        __pyx_L23:;
+        goto __pyx_L22;
+      }
+      /*else*/ {
+
+        /* "netCDF4.pyx":1471
+ *                         ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid)
+ *                 else:
+ *                     ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER, &grpid)             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode)
+ */
+        __pyx_v_ierr = nc_create(__pyx_v_path, (NC_SHARE | NC_NOCLOBBER), (&__pyx_v_grpid));
+      }
+      __pyx_L22:;
+    }
+    __pyx_L19:;
+    goto __pyx_L6;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":1473
+ *                     ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER, &grpid)
+ *         else:
+ *             raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+    __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_mode_must_be_w_r_a_or_r_got_s, __pyx_v_mode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
+    __pyx_t_6 = 0;
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_L6:;
+
+  /* "netCDF4.pyx":1474
+ *         else:
+ *             raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         # data model and file format attributes
+ */
+  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":1475
+ *             raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         # data model and file format attributes
+ *         self.data_model = _get_format(grpid)
+ */
+    __pyx_t_5 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_6);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":1477
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         # data model and file format attributes
+ *         self.data_model = _get_format(grpid)             # <<<<<<<<<<<<<<
+ *         # data_model attribute used to be file_format (versions < 1.0.8), retain
+ *         # file_format for backwards compatibility.
+ */
+  __pyx_t_6 = __pyx_f_7netCDF4__get_format(__pyx_v_grpid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  __Pyx_GOTREF(__pyx_v_self->data_model);
+  __Pyx_DECREF(__pyx_v_self->data_model);
+  __pyx_v_self->data_model = __pyx_t_6;
+  __pyx_t_6 = 0;
+
+  /* "netCDF4.pyx":1480
+ *         # data_model attribute used to be file_format (versions < 1.0.8), retain
+ *         # file_format for backwards compatibility.
+ *         self.file_format = self.data_model             # <<<<<<<<<<<<<<
+ *         self.disk_format = _get_full_format(grpid)
+ *         # diskless read access only works with NETCDF_CLASSIC (for now)
+ */
+  __pyx_t_6 = __pyx_v_self->data_model;
+  __Pyx_INCREF(__pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  __Pyx_GOTREF(__pyx_v_self->file_format);
+  __Pyx_DECREF(__pyx_v_self->file_format);
+  __pyx_v_self->file_format = __pyx_t_6;
+  __pyx_t_6 = 0;
+
+  /* "netCDF4.pyx":1481
+ *         # file_format for backwards compatibility.
+ *         self.file_format = self.data_model
+ *         self.disk_format = _get_full_format(grpid)             # <<<<<<<<<<<<<<
+ *         # diskless read access only works with NETCDF_CLASSIC (for now)
+ *         #ncopen = mode.startswith('a') or mode.startswith('r')
+ */
+  __pyx_t_6 = __pyx_f_7netCDF4__get_full_format(__pyx_v_grpid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  __Pyx_GOTREF(__pyx_v_self->disk_format);
+  __Pyx_DECREF(__pyx_v_self->disk_format);
+  __pyx_v_self->disk_format = __pyx_t_6;
+  __pyx_t_6 = 0;
+
+  /* "netCDF4.pyx":1486
+ *         #if diskless and self.data_model != 'NETCDF3_CLASSIC' and ncopen:
+ *         #    raise ValueError("diskless access only supported for NETCDF3_CLASSIC format")
+ *         self._grpid = grpid             # <<<<<<<<<<<<<<
+ *         self._isopen = 1
+ *         self.path = '/'
+ */
+  __pyx_v_self->_grpid = __pyx_v_grpid;
+
+  /* "netCDF4.pyx":1487
+ *         #    raise ValueError("diskless access only supported for NETCDF3_CLASSIC format")
+ *         self._grpid = grpid
+ *         self._isopen = 1             # <<<<<<<<<<<<<<
+ *         self.path = '/'
+ *         self.parent = None
+ */
+  __pyx_v_self->_isopen = 1;
+
+  /* "netCDF4.pyx":1488
+ *         self._grpid = grpid
+ *         self._isopen = 1
+ *         self.path = '/'             # <<<<<<<<<<<<<<
+ *         self.parent = None
+ *         self.keepweakref = keepweakref
+ */
+  __Pyx_INCREF(__pyx_kp_s__15);
+  __Pyx_GIVEREF(__pyx_kp_s__15);
+  __Pyx_GOTREF(__pyx_v_self->path);
+  __Pyx_DECREF(__pyx_v_self->path);
+  __pyx_v_self->path = __pyx_kp_s__15;
+
+  /* "netCDF4.pyx":1489
+ *         self._isopen = 1
+ *         self.path = '/'
+ *         self.parent = None             # <<<<<<<<<<<<<<
+ *         self.keepweakref = keepweakref
+ *         # get compound and vlen types in the root Group.
+ */
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->parent);
+  __Pyx_DECREF(__pyx_v_self->parent);
+  __pyx_v_self->parent = Py_None;
+
+  /* "netCDF4.pyx":1490
+ *         self.path = '/'
+ *         self.parent = None
+ *         self.keepweakref = keepweakref             # <<<<<<<<<<<<<<
+ *         # get compound and vlen types in the root Group.
+ *         self.cmptypes, self.vltypes = _get_types(self)
+ */
+  __Pyx_INCREF(__pyx_v_keepweakref);
+  __Pyx_GIVEREF(__pyx_v_keepweakref);
+  __Pyx_GOTREF(__pyx_v_self->keepweakref);
+  __Pyx_DECREF(__pyx_v_self->keepweakref);
+  __pyx_v_self->keepweakref = __pyx_v_keepweakref;
+
+  /* "netCDF4.pyx":1492
+ *         self.keepweakref = keepweakref
+ *         # get compound and vlen types in the root Group.
+ *         self.cmptypes, self.vltypes = _get_types(self)             # <<<<<<<<<<<<<<
+ *         # get dimensions in the root group.
+ *         self.dimensions = _get_dims(self)
+ */
+  __pyx_t_6 = __pyx_f_7netCDF4__get_types(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
+    PyObject* sequence = __pyx_t_6;
+    #if CYTHON_COMPILING_IN_CPYTHON
+    Py_ssize_t size = Py_SIZE(sequence);
+    #else
+    Py_ssize_t size = PySequence_Size(sequence);
+    #endif
+    if (unlikely(size != 2)) {
+      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    #if CYTHON_COMPILING_IN_CPYTHON
+    if (likely(PyTuple_CheckExact(sequence))) {
+      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
+      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
+    } else {
+      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
+      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
+    }
+    __Pyx_INCREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_3);
+    #else
+    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    #endif
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  } else {
+    Py_ssize_t index = -1;
+    __pyx_t_8 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
+    index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L25_unpacking_failed;
+    __Pyx_GOTREF(__pyx_t_4);
+    index = 1; __pyx_t_3 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L25_unpacking_failed;
+    __Pyx_GOTREF(__pyx_t_3);
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = NULL;
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    goto __pyx_L26_unpacking_done;
+    __pyx_L25_unpacking_failed:;
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __pyx_t_9 = NULL;
+    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_L26_unpacking_done:;
+  }
+  __Pyx_GIVEREF(__pyx_t_4);
+  __Pyx_GOTREF(__pyx_v_self->cmptypes);
+  __Pyx_DECREF(__pyx_v_self->cmptypes);
+  __pyx_v_self->cmptypes = __pyx_t_4;
+  __pyx_t_4 = 0;
+  __Pyx_GIVEREF(__pyx_t_3);
+  __Pyx_GOTREF(__pyx_v_self->vltypes);
+  __Pyx_DECREF(__pyx_v_self->vltypes);
+  __pyx_v_self->vltypes = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":1494
+ *         self.cmptypes, self.vltypes = _get_types(self)
+ *         # get dimensions in the root group.
+ *         self.dimensions = _get_dims(self)             # <<<<<<<<<<<<<<
+ *         # get variables in the root Group.
+ *         self.variables = _get_vars(self)
+ */
+  __pyx_t_6 = __pyx_f_7netCDF4__get_dims(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  __Pyx_GOTREF(__pyx_v_self->dimensions);
+  __Pyx_DECREF(__pyx_v_self->dimensions);
+  __pyx_v_self->dimensions = __pyx_t_6;
+  __pyx_t_6 = 0;
+
+  /* "netCDF4.pyx":1496
+ *         self.dimensions = _get_dims(self)
+ *         # get variables in the root Group.
+ *         self.variables = _get_vars(self)             # <<<<<<<<<<<<<<
+ *         # get groups in the root Group.
+ *         if self.data_model == 'NETCDF4':
+ */
+  __pyx_t_6 = __pyx_f_7netCDF4__get_vars(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  __Pyx_GOTREF(__pyx_v_self->variables);
+  __Pyx_DECREF(__pyx_v_self->variables);
+  __pyx_v_self->variables = __pyx_t_6;
+  __pyx_t_6 = 0;
+
+  /* "netCDF4.pyx":1498
+ *         self.variables = _get_vars(self)
+ *         # get groups in the root Group.
+ *         if self.data_model == 'NETCDF4':             # <<<<<<<<<<<<<<
+ *             self.groups = _get_grps(self)
+ *         else:
+ */
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":1499
+ *         # get groups in the root Group.
+ *         if self.data_model == 'NETCDF4':
+ *             self.groups = _get_grps(self)             # <<<<<<<<<<<<<<
+ *         else:
+ *             self.groups = OrderedDict()
+ */
+    __pyx_t_6 = __pyx_f_7netCDF4__get_grps(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
+    __Pyx_GOTREF(__pyx_v_self->groups);
+    __Pyx_DECREF(__pyx_v_self->groups);
+    __pyx_v_self->groups = __pyx_t_6;
+    __pyx_t_6 = 0;
+    goto __pyx_L27;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":1501
+ *             self.groups = _get_grps(self)
+ *         else:
+ *             self.groups = OrderedDict()             # <<<<<<<<<<<<<<
+ * 
+ *     # these allow Dataset objects to be used via a "with" statement.
+ */
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_GIVEREF(__pyx_t_6);
+    __Pyx_GOTREF(__pyx_v_self->groups);
+    __Pyx_DECREF(__pyx_v_self->groups);
+    __pyx_v_self->groups = __pyx_t_6;
+    __pyx_t_6 = 0;
+  }
+  __pyx_L27:;
+
+  /* "netCDF4.pyx":1407
+ *     file_format, data_model, cmptypes, vltypes, keepweakref
+ * 
+ *     def __init__(self, filename, mode='r', clobber=True, format='NETCDF4',             # <<<<<<<<<<<<<<
+ *                  diskless=False, persist=False, keepweakref=False, **kwargs):
+ *         cdef int grpid, ierr, numgrps, numdims, numvars
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_AddTraceback("netCDF4.Dataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_bytestr);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1504
+ * 
+ *     # these allow Dataset objects to be used via a "with" statement.
+ *     def __enter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ *     def __exit__(self,atype,value,traceback):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_2__enter__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_2__enter__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__enter__", 0);
+
+  /* "netCDF4.pyx":1505
+ *     # these allow Dataset objects to be used via a "with" statement.
+ *     def __enter__(self):
+ *         return self             # <<<<<<<<<<<<<<
+ *     def __exit__(self,atype,value,traceback):
+ *         self.close()
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  __pyx_r = ((PyObject *)__pyx_v_self);
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":1504
+ * 
+ *     # these allow Dataset objects to be used via a "with" statement.
+ *     def __enter__(self):             # <<<<<<<<<<<<<<
+ *         return self
+ *     def __exit__(self,atype,value,traceback):
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1506
+ *     def __enter__(self):
+ *         return self
+ *     def __exit__(self,atype,value,traceback):             # <<<<<<<<<<<<<<
+ *         self.close()
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  CYTHON_UNUSED PyObject *__pyx_v_atype = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_value = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_traceback = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_atype,&__pyx_n_s_value,&__pyx_n_s_traceback,0};
+    PyObject* values[3] = {0,0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_atype)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+    }
+    __pyx_v_atype = values[0];
+    __pyx_v_value = values[1];
+    __pyx_v_traceback = values[2];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.Dataset.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_4__exit__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_atype, __pyx_v_value, __pyx_v_traceback);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_4__exit__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_atype, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_traceback) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__exit__", 0);
+
+  /* "netCDF4.pyx":1507
+ *         return self
+ *     def __exit__(self,atype,value,traceback):
+ *         self.close()             # <<<<<<<<<<<<<<
+ * 
+ *     def filepath(self):
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":1506
+ *     def __enter__(self):
+ *         return self
+ *     def __exit__(self,atype,value,traceback):             # <<<<<<<<<<<<<<
+ *         self.close()
+ * 
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4.Dataset.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1509
+ *         self.close()
+ * 
+ *     def filepath(self):             # <<<<<<<<<<<<<<
+ *         """
+ * filepath(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_7filepath(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_6filepath[] = "\nfilepath(self)\n\nGet the file system path (or the opendap URL) which was used to\nopen/create the Dataset. Requires netcdf >= 4.1.2";
+static PyObject *__pyx_pw_7netCDF4_7Dataset_7filepath(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("filepath (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6filepath(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_6filepath(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_v_msg = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("filepath", 0);
+
+  /* "netCDF4.pyx":1522
+ *             return path.decode('ascii')
+ *         ELSE:
+ *             msg = """             # <<<<<<<<<<<<<<
+ * filepath method not enabled.  To enable, install Cython, make sure you have
+ * version 4.1.2 or higher of the netcdf C lib, and rebuild netcdf4-python."""
+ */
+  __Pyx_INCREF(__pyx_kp_s_filepath_method_not_enabled_To);
+  __pyx_v_msg = __pyx_kp_s_filepath_method_not_enabled_To;
+
+  /* "netCDF4.pyx":1525
+ * filepath method not enabled.  To enable, install Cython, make sure you have
+ * version 4.1.2 or higher of the netcdf C lib, and rebuild netcdf4-python."""
+ *             raise ValueError(msg)             # <<<<<<<<<<<<<<
+ * 
+ *     def __repr__(self):
+ */
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_msg);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_msg);
+  __Pyx_GIVEREF(__pyx_v_msg);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":1509
+ *         self.close()
+ * 
+ *     def filepath(self):             # <<<<<<<<<<<<<<
+ *         """
+ * filepath(self)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("netCDF4.Dataset.filepath", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __Pyx_XDECREF(__pyx_v_msg);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1527
+ *             raise ValueError(msg)
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *            return self.__unicode__()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_9__repr__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_9__repr__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_8__repr__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_8__repr__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__repr__", 0);
+
+  /* "netCDF4.pyx":1528
+ * 
+ *     def __repr__(self):
+ *         if python3:             # <<<<<<<<<<<<<<
+ *            return self.__unicode__()
+ *         else:
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":1529
+ *     def __repr__(self):
+ *         if python3:
+ *            return self.__unicode__()             # <<<<<<<<<<<<<<
+ *         else:
+ *            return unicode(self).encode(default_encoding)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":1531
+ *            return self.__unicode__()
+ *         else:
+ *            return unicode(self).encode(default_encoding)             # <<<<<<<<<<<<<<
+ * 
+ *     def __unicode__(self):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_INCREF(((PyObject *)__pyx_v_self));
+    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
+    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (!__pyx_t_5) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
+      __Pyx_GIVEREF(__pyx_t_4);
+      __pyx_t_4 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":1527
+ *             raise ValueError(msg)
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *            return self.__unicode__()
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netCDF4.Dataset.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1533
+ *            return unicode(self).encode(default_encoding)
+ * 
+ *     def __unicode__(self):             # <<<<<<<<<<<<<<
+ *         ncdump = ['%r\n' % type(self)]
+ *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_11__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_11__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__unicode__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_10__unicode__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_10__unicode__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_v_ncdump = NULL;
+  PyObject *__pyx_v_dimnames = NULL;
+  PyObject *__pyx_v_varnames = NULL;
+  PyObject *__pyx_v_grpnames = NULL;
+  PyObject *__pyx_v_attrs = NULL;
+  PyObject *__pyx_v_dimname = NULL;
+  PyObject *__pyx_v_varname = NULL;
+  PyObject *__pyx_v_grpname = NULL;
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  Py_ssize_t __pyx_t_5;
+  PyObject *(*__pyx_t_6)(PyObject *);
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  Py_ssize_t __pyx_t_9;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  int __pyx_t_12;
+  int __pyx_t_13;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__unicode__", 0);
+
+  /* "netCDF4.pyx":1534
+ * 
+ *     def __unicode__(self):
+ *         ncdump = ['%r\n' % type(self)]             # <<<<<<<<<<<<<<
+ *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\
+ *         for dimname in self.dimensions.keys()])
+ */
+  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_r, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_v_ncdump = ((PyObject*)__pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":1535
+ *     def __unicode__(self):
+ *         ncdump = ['%r\n' % type(self)]
+ *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\             # <<<<<<<<<<<<<<
+ *         for dimname in self.dimensions.keys()])
+ *         varnames = tuple(\
+ */
+  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+
+  /* "netCDF4.pyx":1536
+ *         ncdump = ['%r\n' % type(self)]
+ *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\
+ *         for dimname in self.dimensions.keys()])             # <<<<<<<<<<<<<<
+ *         varnames = tuple(\
+ *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dimensions, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+    }
+  }
+  if (__pyx_t_4) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
+    __pyx_t_6 = NULL;
+  } else {
+    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_6)) {
+      if (likely(PyList_CheckExact(__pyx_t_3))) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_1 = __pyx_t_6(__pyx_t_3);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":1535
+ *     def __unicode__(self):
+ *         ncdump = ['%r\n' % type(self)]
+ *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\             # <<<<<<<<<<<<<<
+ *         for dimname in self.dimensions.keys()])
+ *         varnames = tuple(\
+ */
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_7 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_7)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_7);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (!__pyx_t_7) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_dimname); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+      __Pyx_INCREF(__pyx_v_dimname);
+      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_dimname);
+      __Pyx_GIVEREF(__pyx_v_dimname);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_dimname); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_9 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "netCDF4.pyx":1536
+ *         ncdump = ['%r\n' % type(self)]
+ *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\
+ *         for dimname in self.dimensions.keys()])             # <<<<<<<<<<<<<<
+ *         varnames = tuple(\
+ *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+
+ */
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":1535
+ *     def __unicode__(self):
+ *         ncdump = ['%r\n' % type(self)]
+ *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\             # <<<<<<<<<<<<<<
+ *         for dimname in self.dimensions.keys()])
+ *         varnames = tuple(\
+ */
+  __pyx_t_3 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_dimnames = ((PyObject*)__pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":1538
+ *         for dimname in self.dimensions.keys()])
+ *         varnames = tuple(\
+ *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+             # <<<<<<<<<<<<<<
+ *         (((_tostr(self.variables[varname].dimensions)
+ *         .replace("u'",""))\
+ */
+  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+
+  /* "netCDF4.pyx":1543
+ *         .replace("'",""))\
+ *         .replace(", ",","))\
+ *         .replace(",)",")") for varname in self.variables.keys()])             # <<<<<<<<<<<<<<
+ *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
+ *         if self.path == '/':
+ */
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_8 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
+    if (likely(__pyx_t_8)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_8);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_4, function);
+    }
+  }
+  if (__pyx_t_8) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  } else {
+    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+    __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
+    __pyx_t_6 = NULL;
+  } else {
+    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_6)) {
+      if (likely(PyList_CheckExact(__pyx_t_4))) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_2 = __pyx_t_6(__pyx_t_4);
+      if (unlikely(!__pyx_t_2)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_varname, __pyx_t_2);
+    __pyx_t_2 = 0;
+
+    /* "netCDF4.pyx":1538
+ *         for dimname in self.dimensions.keys()])
+ *         varnames = tuple(\
+ *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+             # <<<<<<<<<<<<<<
+ *         (((_tostr(self.variables[varname].dimensions)
+ *         .replace("u'",""))\
+ */
+    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __pyx_t_1 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_varname); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
+      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
+      if (likely(__pyx_t_1)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+        __Pyx_INCREF(__pyx_t_1);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_8, function);
+      }
+    }
+    if (!__pyx_t_1) {
+      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_GOTREF(__pyx_t_2);
+    } else {
+      __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+      PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7);
+      __Pyx_GIVEREF(__pyx_t_7);
+      __pyx_t_7 = 0;
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __pyx_t_8 = PyNumber_Add(__pyx_t_2, __pyx_kp_s_4m); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_7 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
+      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
+      if (likely(__pyx_t_7)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+        __Pyx_INCREF(__pyx_t_7);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_10, function);
+      }
+    }
+    if (!__pyx_t_7) {
+      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_varname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+    } else {
+      __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+      __Pyx_INCREF(__pyx_v_varname);
+      PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_varname);
+      __Pyx_GIVEREF(__pyx_v_varname);
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_10 = PyNumber_Add(__pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyNumber_Add(__pyx_t_10, __pyx_kp_s_0m); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+
+    /* "netCDF4.pyx":1539
+ *         varnames = tuple(\
+ *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+
+ *         (((_tostr(self.variables[varname].dimensions)             # <<<<<<<<<<<<<<
+ *         .replace("u'",""))\
+ *         .replace("'",""))\
+ */
+    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __pyx_t_1 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_varname); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
+      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
+      if (likely(__pyx_t_1)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+        __Pyx_INCREF(__pyx_t_1);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_8, function);
+      }
+    }
+    if (!__pyx_t_1) {
+      __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_GOTREF(__pyx_t_10);
+    } else {
+      __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+      PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_7);
+      __Pyx_GIVEREF(__pyx_t_7);
+      __pyx_t_7 = 0;
+      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+    /* "netCDF4.pyx":1540
+ *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+
+ *         (((_tostr(self.variables[varname].dimensions)
+ *         .replace("u'",""))\             # <<<<<<<<<<<<<<
+ *         .replace("'",""))\
+ *         .replace(", ",","))\
+ */
+    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+    /* "netCDF4.pyx":1541
+ *         (((_tostr(self.variables[varname].dimensions)
+ *         .replace("u'",""))\
+ *         .replace("'",""))\             # <<<<<<<<<<<<<<
+ *         .replace(", ",","))\
+ *         .replace(",)",")") for varname in self.variables.keys()])
+ */
+    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+    /* "netCDF4.pyx":1542
+ *         .replace("u'",""))\
+ *         .replace("'",""))\
+ *         .replace(", ",","))\             # <<<<<<<<<<<<<<
+ *         .replace(",)",")") for varname in self.variables.keys()])
+ *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
+ */
+    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+    /* "netCDF4.pyx":1543
+ *         .replace("'",""))\
+ *         .replace(", ",","))\
+ *         .replace(",)",")") for varname in self.variables.keys()])             # <<<<<<<<<<<<<<
+ *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
+ *         if self.path == '/':
+ */
+    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+    /* "netCDF4.pyx":1538
+ *         for dimname in self.dimensions.keys()])
+ *         varnames = tuple(\
+ *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+             # <<<<<<<<<<<<<<
+ *         (((_tostr(self.variables[varname].dimensions)
+ *         .replace("u'",""))\
+ */
+    __pyx_t_8 = PyNumber_Add(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_8))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+    /* "netCDF4.pyx":1543
+ *         .replace("'",""))\
+ *         .replace(", ",","))\
+ *         .replace(",)",")") for varname in self.variables.keys()])             # <<<<<<<<<<<<<<
+ *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
+ *         if self.path == '/':
+ */
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "netCDF4.pyx":1537
+ *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\
+ *         for dimname in self.dimensions.keys()])
+ *         varnames = tuple(\             # <<<<<<<<<<<<<<
+ *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+
+ *         (((_tostr(self.variables[varname].dimensions)
+ */
+  __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_v_varnames = ((PyObject*)__pyx_t_4);
+  __pyx_t_4 = 0;
+
+  /* "netCDF4.pyx":1544
+ *         .replace(", ",","))\
+ *         .replace(",)",")") for varname in self.variables.keys()])
+ *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])             # <<<<<<<<<<<<<<
+ *         if self.path == '/':
+ *             ncdump.append('root group (%s data model, file format %s):\n' %
+ */
+  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->groups, __pyx_n_s_keys); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __pyx_t_10 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) {
+    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
+    if (likely(__pyx_t_10)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+      __Pyx_INCREF(__pyx_t_10);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_8, function);
+    }
+  }
+  if (__pyx_t_10) {
+    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  } else {
+    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+    __pyx_t_8 = __pyx_t_3; __Pyx_INCREF(__pyx_t_8); __pyx_t_5 = 0;
+    __pyx_t_6 = NULL;
+  } else {
+    __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __pyx_t_6 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_6)) {
+      if (likely(PyList_CheckExact(__pyx_t_8))) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_8)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_3 = __pyx_t_6(__pyx_t_8);
+      if (unlikely(!__pyx_t_3)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_3);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_grpname, __pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_2 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
+      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
+      if (likely(__pyx_t_2)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+        __Pyx_INCREF(__pyx_t_2);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_10, function);
+      }
+    }
+    if (!__pyx_t_2) {
+      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_grpname); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+    } else {
+      __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+      __Pyx_INCREF(__pyx_v_grpname);
+      PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_grpname);
+      __Pyx_GIVEREF(__pyx_v_grpname);
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __pyx_t_8 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_v_grpnames = ((PyObject*)__pyx_t_8);
+  __pyx_t_8 = 0;
+
+  /* "netCDF4.pyx":1545
+ *         .replace(",)",")") for varname in self.variables.keys()])
+ *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
+ *         if self.path == '/':             # <<<<<<<<<<<<<<
+ *             ncdump.append('root group (%s data model, file format %s):\n' %
+ *                     (self.data_model, self.disk_format))
+ */
+  __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_self->path, __pyx_kp_s__15, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_12) {
+
+    /* "netCDF4.pyx":1547
+ *         if self.path == '/':
+ *             ncdump.append('root group (%s data model, file format %s):\n' %
+ *                     (self.data_model, self.disk_format))             # <<<<<<<<<<<<<<
+ *         else:
+ *             ncdump.append('group %s:\n' % self.path)
+ */
+    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_INCREF(__pyx_v_self->data_model);
+    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_self->data_model);
+    __Pyx_GIVEREF(__pyx_v_self->data_model);
+    __Pyx_INCREF(__pyx_v_self->disk_format);
+    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_self->disk_format);
+    __Pyx_GIVEREF(__pyx_v_self->disk_format);
+
+    /* "netCDF4.pyx":1546
+ *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
+ *         if self.path == '/':
+ *             ncdump.append('root group (%s data model, file format %s):\n' %             # <<<<<<<<<<<<<<
+ *                     (self.data_model, self.disk_format))
+ *         else:
+ */
+    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_root_group_s_data_model_file_for, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    goto __pyx_L9;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":1549
+ *                     (self.data_model, self.disk_format))
+ *         else:
+ *             ncdump.append('group %s:\n' % self.path)             # <<<<<<<<<<<<<<
+ *         attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\
+ *                 self.ncattrs()]
+ */
+    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_group_s, __pyx_v_self->path); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  }
+  __pyx_L9:;
+
+  /* "netCDF4.pyx":1550
+ *         else:
+ *             ncdump.append('group %s:\n' % self.path)
+ *         attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\             # <<<<<<<<<<<<<<
+ *                 self.ncattrs()]
+ *         ncdump = ncdump + attrs
+ */
+  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+
+  /* "netCDF4.pyx":1551
+ *             ncdump.append('group %s:\n' % self.path)
+ *         attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\
+ *                 self.ncattrs()]             # <<<<<<<<<<<<<<
+ *         ncdump = ncdump + attrs
+ *         ncdump.append('    dimensions(sizes): %s\n' % ', '.join(dimnames))
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_10 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_10)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_10);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+    }
+  }
+  if (__pyx_t_10) {
+    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  } else {
+    __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
+    __pyx_t_3 = __pyx_t_8; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
+    __pyx_t_6 = NULL;
+  } else {
+    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_6)) {
+      if (likely(PyList_CheckExact(__pyx_t_3))) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_8); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_8); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_8 = __pyx_t_6(__pyx_t_3);
+      if (unlikely(!__pyx_t_8)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_8);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_8);
+    __pyx_t_8 = 0;
+
+    /* "netCDF4.pyx":1550
+ *         else:
+ *             ncdump.append('group %s:\n' % self.path)
+ *         attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\             # <<<<<<<<<<<<<<
+ *                 self.ncattrs()]
+ *         ncdump = ncdump + attrs
+ */
+    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_11 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) {
+      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
+      if (likely(__pyx_t_11)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+        __Pyx_INCREF(__pyx_t_11);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_10, function);
+      }
+    }
+    if (!__pyx_t_11) {
+      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_name); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+    } else {
+      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = NULL;
+      __Pyx_INCREF(__pyx_v_name);
+      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_name);
+      __Pyx_GIVEREF(__pyx_v_name);
+      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_INCREF(__pyx_v_name);
+    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_name);
+    __Pyx_GIVEREF(__pyx_v_name);
+    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8);
+    __Pyx_GIVEREF(__pyx_t_8);
+    __pyx_t_8 = 0;
+    __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_8))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_v_attrs = ((PyObject*)__pyx_t_4);
+  __pyx_t_4 = 0;
+
+  /* "netCDF4.pyx":1552
+ *         attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\
+ *                 self.ncattrs()]
+ *         ncdump = ncdump + attrs             # <<<<<<<<<<<<<<
+ *         ncdump.append('    dimensions(sizes): %s\n' % ', '.join(dimnames))
+ *         ncdump.append('    variables(dimensions): %s\n' % ', '.join(varnames))
+ */
+  __pyx_t_4 = PyNumber_Add(__pyx_v_ncdump, __pyx_v_attrs); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF_SET(__pyx_v_ncdump, ((PyObject*)__pyx_t_4));
+  __pyx_t_4 = 0;
+
+  /* "netCDF4.pyx":1553
+ *                 self.ncattrs()]
+ *         ncdump = ncdump + attrs
+ *         ncdump.append('    dimensions(sizes): %s\n' % ', '.join(dimnames))             # <<<<<<<<<<<<<<
+ *         ncdump.append('    variables(dimensions): %s\n' % ', '.join(varnames))
+ *         ncdump.append('    groups: %s\n' % ', '.join(grpnames))
+ */
+  __pyx_t_4 = __Pyx_PyString_Join(__pyx_kp_s__38, __pyx_v_dimnames); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_dimensions_sizes_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_3); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":1554
+ *         ncdump = ncdump + attrs
+ *         ncdump.append('    dimensions(sizes): %s\n' % ', '.join(dimnames))
+ *         ncdump.append('    variables(dimensions): %s\n' % ', '.join(varnames))             # <<<<<<<<<<<<<<
+ *         ncdump.append('    groups: %s\n' % ', '.join(grpnames))
+ *         return ''.join(ncdump)
+ */
+  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__38, __pyx_v_varnames); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_variables_dimensions_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "netCDF4.pyx":1555
+ *         ncdump.append('    dimensions(sizes): %s\n' % ', '.join(dimnames))
+ *         ncdump.append('    variables(dimensions): %s\n' % ', '.join(varnames))
+ *         ncdump.append('    groups: %s\n' % ', '.join(grpnames))             # <<<<<<<<<<<<<<
+ *         return ''.join(ncdump)
+ * 
+ */
+  __pyx_t_4 = __Pyx_PyString_Join(__pyx_kp_s__38, __pyx_v_grpnames); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_groups_s_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_3); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":1556
+ *         ncdump.append('    variables(dimensions): %s\n' % ', '.join(varnames))
+ *         ncdump.append('    groups: %s\n' % ', '.join(grpnames))
+ *         return ''.join(ncdump)             # <<<<<<<<<<<<<<
+ * 
+ *     def close(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__16, __pyx_v_ncdump); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_r = __pyx_t_3;
+  __pyx_t_3 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":1533
+ *            return unicode(self).encode(default_encoding)
+ * 
+ *     def __unicode__(self):             # <<<<<<<<<<<<<<
+ *         ncdump = ['%r\n' % type(self)]
+ *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_AddTraceback("netCDF4.Dataset.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_ncdump);
+  __Pyx_XDECREF(__pyx_v_dimnames);
+  __Pyx_XDECREF(__pyx_v_varnames);
+  __Pyx_XDECREF(__pyx_v_grpnames);
+  __Pyx_XDECREF(__pyx_v_attrs);
+  __Pyx_XDECREF(__pyx_v_dimname);
+  __Pyx_XDECREF(__pyx_v_varname);
+  __Pyx_XDECREF(__pyx_v_grpname);
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1558
+ *         return ''.join(ncdump)
+ * 
+ *     def close(self):             # <<<<<<<<<<<<<<
+ *         """
+ * close(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_13close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_12close[] = "\nclose(self)\n\nClose the Dataset.";
+static PyObject *__pyx_pw_7netCDF4_7Dataset_13close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("close (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_12close(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_12close(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  int __pyx_v_ierr;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  char *__pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("close", 0);
+
+  /* "netCDF4.pyx":1564
+ * Close the Dataset."""
+ *         cdef int ierr
+ *         ierr = nc_close(self._grpid)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_v_ierr = nc_close(__pyx_v_self->_grpid);
+
+  /* "netCDF4.pyx":1565
+ *         cdef int ierr
+ *         ierr = nc_close(self._grpid)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         self._isopen = 0 # indicates file already closed, checked by __dealloc__
+ */
+  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":1566
+ *         ierr = nc_close(self._grpid)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         self._isopen = 0 # indicates file already closed, checked by __dealloc__
+ * 
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":1567
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         self._isopen = 0 # indicates file already closed, checked by __dealloc__             # <<<<<<<<<<<<<<
+ * 
+ *     def __dealloc__(self):
+ */
+  __pyx_v_self->_isopen = 0;
+
+  /* "netCDF4.pyx":1558
+ *         return ''.join(ncdump)
+ * 
+ *     def close(self):             # <<<<<<<<<<<<<<
+ *         """
+ * close(self)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4.Dataset.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1569
+ *         self._isopen = 0 # indicates file already closed, checked by __dealloc__
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         # close file when there are no references to object left
+ *         cdef int ierr
+ */
+
+/* Python wrapper */
+static void __pyx_pw_7netCDF4_7Dataset_15__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_7netCDF4_7Dataset_15__dealloc__(PyObject *__pyx_v_self) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+  __pyx_pf_7netCDF4_7Dataset_14__dealloc__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_7netCDF4_7Dataset_14__dealloc__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  CYTHON_UNUSED int __pyx_v_ierr;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+  /* "netCDF4.pyx":1572
+ *         # close file when there are no references to object left
+ *         cdef int ierr
+ *         if self._isopen:             # <<<<<<<<<<<<<<
+ *             ierr = nc_close(self._grpid)
+ * 
+ */
+  __pyx_t_1 = (__pyx_v_self->_isopen != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":1573
+ *         cdef int ierr
+ *         if self._isopen:
+ *             ierr = nc_close(self._grpid)             # <<<<<<<<<<<<<<
+ * 
+ *     def sync(self):
+ */
+    __pyx_v_ierr = nc_close(__pyx_v_self->_grpid);
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":1569
+ *         self._isopen = 0 # indicates file already closed, checked by __dealloc__
+ * 
+ *     def __dealloc__(self):             # <<<<<<<<<<<<<<
+ *         # close file when there are no references to object left
+ *         cdef int ierr
+ */
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+}
+
+/* "netCDF4.pyx":1575
+ *             ierr = nc_close(self._grpid)
+ * 
+ *     def sync(self):             # <<<<<<<<<<<<<<
+ *         """
+ * sync(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_17sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_16sync[] = "\nsync(self)\n\nWrites all buffered data in the L{Dataset} to the disk file.";
+static PyObject *__pyx_pw_7netCDF4_7Dataset_17sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("sync (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_16sync(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_16sync(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  int __pyx_v_ierr;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  char *__pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("sync", 0);
+
+  /* "netCDF4.pyx":1581
+ * Writes all buffered data in the L{Dataset} to the disk file."""
+ *         cdef int ierr
+ *         ierr = nc_sync(self._grpid)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_v_ierr = nc_sync(__pyx_v_self->_grpid);
+
+  /* "netCDF4.pyx":1582
+ *         cdef int ierr
+ *         ierr = nc_sync(self._grpid)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ */
+  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":1583
+ *         ierr = nc_sync(self._grpid)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ * 
+ *     def _redef(self):
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":1575
+ *             ierr = nc_close(self._grpid)
+ * 
+ *     def sync(self):             # <<<<<<<<<<<<<<
+ *         """
+ * sync(self)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4.Dataset.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1585
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def _redef(self):             # <<<<<<<<<<<<<<
+ *         cdef int ierr
+ *         ierr = nc_redef(self._grpid)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_19_redef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_19_redef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_redef (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_18_redef(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_18_redef(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  CYTHON_UNUSED int __pyx_v_ierr;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_redef", 0);
+
+  /* "netCDF4.pyx":1587
+ *     def _redef(self):
+ *         cdef int ierr
+ *         ierr = nc_redef(self._grpid)             # <<<<<<<<<<<<<<
+ * 
+ *     def _enddef(self):
+ */
+  __pyx_v_ierr = nc_redef(__pyx_v_self->_grpid);
+
+  /* "netCDF4.pyx":1585
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def _redef(self):             # <<<<<<<<<<<<<<
+ *         cdef int ierr
+ *         ierr = nc_redef(self._grpid)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1589
+ *         ierr = nc_redef(self._grpid)
+ * 
+ *     def _enddef(self):             # <<<<<<<<<<<<<<
+ *         cdef int ierr
+ *         ierr = nc_enddef(self._grpid)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_21_enddef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_21_enddef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_enddef (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_20_enddef(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_20_enddef(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  CYTHON_UNUSED int __pyx_v_ierr;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_enddef", 0);
+
+  /* "netCDF4.pyx":1591
+ *     def _enddef(self):
+ *         cdef int ierr
+ *         ierr = nc_enddef(self._grpid)             # <<<<<<<<<<<<<<
+ * 
+ *     def set_fill_on(self):
+ */
+  __pyx_v_ierr = nc_enddef(__pyx_v_self->_grpid);
+
+  /* "netCDF4.pyx":1589
+ *         ierr = nc_redef(self._grpid)
+ * 
+ *     def _enddef(self):             # <<<<<<<<<<<<<<
+ *         cdef int ierr
+ *         ierr = nc_enddef(self._grpid)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1593
+ *         ierr = nc_enddef(self._grpid)
+ * 
+ *     def set_fill_on(self):             # <<<<<<<<<<<<<<
+ *         """
+ * set_fill_on(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_23set_fill_on(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_22set_fill_on[] = "\nset_fill_on(self)\n\nSets the fill mode for a L{Dataset} open for writing to C{on}.\n\nThis causes data to be pre-filled with fill values. The fill values can be \ncontrolled by the variable's C{_Fill_Value} attribute, but is usually \nsufficient to the use the netCDF default C{_Fill_Value} (defined \nseparately for each variable type). The default behavior of the netCDF \nlibrary correspongs to C{set_fill_on}.  Data which are  [...]
+static PyObject *__pyx_pw_7netCDF4_7Dataset_23set_fill_on(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("set_fill_on (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_22set_fill_on(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_22set_fill_on(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  int __pyx_v_ierr;
+  int __pyx_v_oldmode;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  char *__pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("set_fill_on", 0);
+
+  /* "netCDF4.pyx":1607
+ * to."""
+ *         cdef int ierr, oldmode
+ *         ierr = nc_set_fill (self._grpid, NC_FILL, &oldmode)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_v_ierr = nc_set_fill(__pyx_v_self->_grpid, NC_FILL, (&__pyx_v_oldmode));
+
+  /* "netCDF4.pyx":1608
+ *         cdef int ierr, oldmode
+ *         ierr = nc_set_fill (self._grpid, NC_FILL, &oldmode)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ */
+  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":1609
+ *         ierr = nc_set_fill (self._grpid, NC_FILL, &oldmode)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ * 
+ *     def set_fill_off(self):
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":1593
+ *         ierr = nc_enddef(self._grpid)
+ * 
+ *     def set_fill_on(self):             # <<<<<<<<<<<<<<
+ *         """
+ * set_fill_on(self)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4.Dataset.set_fill_on", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1611
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def set_fill_off(self):             # <<<<<<<<<<<<<<
+ *         """
+ * set_fill_off(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_25set_fill_off(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_24set_fill_off[] = "\nset_fill_off(self)\n\nSets the fill mode for a L{Dataset} open for writing to C{off}. \n\nThis will prevent the data from being pre-filled with fill values, which \nmay result in some performance improvements. However, you must then make \nsure the data is actually written before being read.";
+static PyObject *__pyx_pw_7netCDF4_7Dataset_25set_fill_off(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("set_fill_off (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_24set_fill_off(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_24set_fill_off(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  int __pyx_v_ierr;
+  int __pyx_v_oldmode;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  char *__pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("set_fill_off", 0);
+
+  /* "netCDF4.pyx":1621
+ * sure the data is actually written before being read."""
+ *         cdef int ierr, oldmode
+ *         ierr = nc_set_fill (self._grpid, NC_NOFILL, &oldmode)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_v_ierr = nc_set_fill(__pyx_v_self->_grpid, NC_NOFILL, (&__pyx_v_oldmode));
+
+  /* "netCDF4.pyx":1622
+ *         cdef int ierr, oldmode
+ *         ierr = nc_set_fill (self._grpid, NC_NOFILL, &oldmode)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ */
+  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":1623
+ *         ierr = nc_set_fill (self._grpid, NC_NOFILL, &oldmode)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ * 
+ *     def createDimension(self, dimname, size=None):
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":1611
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def set_fill_off(self):             # <<<<<<<<<<<<<<
+ *         """
+ * set_fill_off(self)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4.Dataset.set_fill_off", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1625
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def createDimension(self, dimname, size=None):             # <<<<<<<<<<<<<<
+ *         """
+ * createDimension(self, dimname, size=None)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_27createDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_26createDimension[] = "\ncreateDimension(self, dimname, size=None)\n\nCreates a new dimension with the given C{dimname} and C{size}. \n\nC{size} must be a positive integer or C{None}, which stands for \n\"unlimited\" (default is C{None}). Specifying a size of 0 also\nresults in an unlimited dimension. The return value is the L{Dimension} \nclass instance describing the new dimension.  To determine the current \nmaximum size of the dimension, use th [...]
+static PyObject *__pyx_pw_7netCDF4_7Dataset_27createDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_dimname = 0;
+  PyObject *__pyx_v_size = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("createDimension (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dimname,&__pyx_n_s_size,0};
+    PyObject* values[2] = {0,0};
+    values[1] = ((PyObject *)Py_None);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dimname)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
+          if (value) { values[1] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createDimension") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_dimname = values[0];
+    __pyx_v_size = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("createDimension", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.Dataset.createDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_26createDimension(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_dimname, __pyx_v_size);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_26createDimension(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_dimname, PyObject *__pyx_v_size) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("createDimension", 0);
+
+  /* "netCDF4.pyx":1638
+ * instance. To determine if a dimension is 'unlimited', use the
+ * C{isunlimited()} method of the L{Dimension} instance."""
+ *         self.dimensions[dimname] = Dimension(self, dimname, size=size)             # <<<<<<<<<<<<<<
+ *         return self.dimensions[dimname]
+ * 
+ */
+  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+  __Pyx_INCREF(__pyx_v_dimname);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_dimname);
+  __Pyx_GIVEREF(__pyx_v_dimname);
+  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_size, __pyx_v_size) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dimension)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (unlikely(PyObject_SetItem(__pyx_v_self->dimensions, __pyx_v_dimname, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":1639
+ * C{isunlimited()} method of the L{Dimension} instance."""
+ *         self.dimensions[dimname] = Dimension(self, dimname, size=size)
+ *         return self.dimensions[dimname]             # <<<<<<<<<<<<<<
+ * 
+ *     def renameDimension(self, oldname, newname):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_3 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_dimname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_r = __pyx_t_3;
+  __pyx_t_3 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":1625
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def createDimension(self, dimname, size=None):             # <<<<<<<<<<<<<<
+ *         """
+ * createDimension(self, dimname, size=None)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4.Dataset.createDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1641
+ *         return self.dimensions[dimname]
+ * 
+ *     def renameDimension(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameDimension(self, oldname, newname)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_29renameDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_28renameDimension[] = "\nrenameDimension(self, oldname, newname)\n\nrename a L{Dimension} named C{oldname} to C{newname}.";
+static PyObject *__pyx_pw_7netCDF4_7Dataset_29renameDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_oldname = 0;
+  PyObject *__pyx_v_newname = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("renameDimension (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oldname,&__pyx_n_s_newname,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oldname)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("renameDimension", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameDimension") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_oldname = values[0];
+    __pyx_v_newname = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("renameDimension", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.Dataset.renameDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_28renameDimension(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_28renameDimension(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname) {
+  char *__pyx_v_namstring;
+  PyObject *__pyx_v_bytestr = NULL;
+  PyObject *__pyx_v_dim = NULL;
+  int __pyx_v_ierr;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  char *__pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  int __pyx_t_9;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("renameDimension", 0);
+
+  /* "netCDF4.pyx":1647
+ * rename a L{Dimension} named C{oldname} to C{newname}."""
+ *         cdef char *namstring
+ *         bytestr = _strencode(newname)             # <<<<<<<<<<<<<<
+ *         namstring = bytestr
+ *         if self.data_model != 'NETCDF4': self._redef()
+ */
+  __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_bytestr = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":1648
+ *         cdef char *namstring
+ *         bytestr = _strencode(newname)
+ *         namstring = bytestr             # <<<<<<<<<<<<<<
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         try:
+ */
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_namstring = __pyx_t_2;
+
+  /* "netCDF4.pyx":1649
+ *         bytestr = _strencode(newname)
+ *         namstring = bytestr
+ *         if self.data_model != 'NETCDF4': self._redef()             # <<<<<<<<<<<<<<
+ *         try:
+ *             dim = self.dimensions[oldname]
+ */
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_3) {
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (__pyx_t_5) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":1650
+ *         namstring = bytestr
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         try:             # <<<<<<<<<<<<<<
+ *             dim = self.dimensions[oldname]
+ *         except KeyError:
+ */
+  {
+    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
+    __Pyx_XGOTREF(__pyx_t_6);
+    __Pyx_XGOTREF(__pyx_t_7);
+    __Pyx_XGOTREF(__pyx_t_8);
+    /*try:*/ {
+
+      /* "netCDF4.pyx":1651
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         try:
+ *             dim = self.dimensions[oldname]             # <<<<<<<<<<<<<<
+ *         except KeyError:
+ *             raise KeyError('%s not a valid dimension name' % oldname)
+ */
+      __pyx_t_1 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_oldname); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L4_error;};
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_v_dim = __pyx_t_1;
+      __pyx_t_1 = 0;
+    }
+    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+    goto __pyx_L11_try_end;
+    __pyx_L4_error:;
+    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":1652
+ *         try:
+ *             dim = self.dimensions[oldname]
+ *         except KeyError:             # <<<<<<<<<<<<<<
+ *             raise KeyError('%s not a valid dimension name' % oldname)
+ *         ierr = nc_rename_dim(self._grpid, dim._dimid, namstring)
+ */
+    __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+    if (__pyx_t_9) {
+      __Pyx_AddTraceback("netCDF4.Dataset.renameDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
+      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_GOTREF(__pyx_t_5);
+
+      /* "netCDF4.pyx":1653
+ *             dim = self.dimensions[oldname]
+ *         except KeyError:
+ *             raise KeyError('%s not a valid dimension name' % oldname)             # <<<<<<<<<<<<<<
+ *         ierr = nc_rename_dim(self._grpid, dim._dimid, namstring)
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ */
+      __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_s_not_a_valid_dimension_name, __pyx_v_oldname); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
+      __Pyx_GIVEREF(__pyx_t_10);
+      __pyx_t_10 = 0;
+      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+    }
+    goto __pyx_L6_except_error;
+    __pyx_L6_except_error:;
+    __Pyx_XGIVEREF(__pyx_t_6);
+    __Pyx_XGIVEREF(__pyx_t_7);
+    __Pyx_XGIVEREF(__pyx_t_8);
+    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
+    goto __pyx_L1_error;
+    __pyx_L11_try_end:;
+  }
+
+  /* "netCDF4.pyx":1654
+ *         except KeyError:
+ *             raise KeyError('%s not a valid dimension name' % oldname)
+ *         ierr = nc_rename_dim(self._grpid, dim._dimid, namstring)             # <<<<<<<<<<<<<<
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ *         if ierr != NC_NOERR:
+ */
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_dimid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_v_ierr = nc_rename_dim(__pyx_v_self->_grpid, __pyx_t_9, __pyx_v_namstring);
+
+  /* "netCDF4.pyx":1655
+ *             raise KeyError('%s not a valid dimension name' % oldname)
+ *         ierr = nc_rename_dim(self._grpid, dim._dimid, namstring)
+ *         if self.data_model != 'NETCDF4': self._enddef()             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_3) {
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enddef); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_1 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_1)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_1);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (__pyx_t_1) {
+      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    } else {
+      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    goto __pyx_L14;
+  }
+  __pyx_L14:;
+
+  /* "netCDF4.pyx":1656
+ *         ierr = nc_rename_dim(self._grpid, dim._dimid, namstring)
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         # remove old key from dimensions dict.
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":1657
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         # remove old key from dimensions dict.
+ *         self.dimensions.pop(oldname)
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_5);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":1659
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         # remove old key from dimensions dict.
+ *         self.dimensions.pop(oldname)             # <<<<<<<<<<<<<<
+ *         # add new key.
+ *         self.dimensions[newname] = dim
+ */
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dimensions, __pyx_n_s_pop); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_1 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
+    if (likely(__pyx_t_1)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_1);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_4, function);
+    }
+  }
+  if (!__pyx_t_1) {
+    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_oldname); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+  } else {
+    __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+    __Pyx_INCREF(__pyx_v_oldname);
+    PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_oldname);
+    __Pyx_GIVEREF(__pyx_v_oldname);
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+  /* "netCDF4.pyx":1661
+ *         self.dimensions.pop(oldname)
+ *         # add new key.
+ *         self.dimensions[newname] = dim             # <<<<<<<<<<<<<<
+ *         # Variable.dimensions is determined by a method that
+ *         # looks in the file, so no need to manually update.
+ */
+  if (unlikely(PyObject_SetItem(__pyx_v_self->dimensions, __pyx_v_newname, __pyx_v_dim) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":1641
+ *         return self.dimensions[dimname]
+ * 
+ *     def renameDimension(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameDimension(self, oldname, newname)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_AddTraceback("netCDF4.Dataset.renameDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_bytestr);
+  __Pyx_XDECREF(__pyx_v_dim);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1665
+ *         # looks in the file, so no need to manually update.
+ * 
+ *     def createCompoundType(self, datatype, datatype_name):             # <<<<<<<<<<<<<<
+ *         """
+ * createCompoundType(self, datatype, datatype_name)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_31createCompoundType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_30createCompoundType[] = "\ncreateCompoundType(self, datatype, datatype_name)\n\nCreates a new compound data type named C{datatype_name} from the numpy\ndtype object C{datatype}.\n\n at attention: If the new compound data type contains other compound data types\n(i.e. it is a 'nested' compound type, where not all of the elements\nare homogenous numeric data types), then the 'inner' compound types B{must} be\ncreated first.\n\nThe return value is the L [...]
+static PyObject *__pyx_pw_7netCDF4_7Dataset_31createCompoundType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_datatype = 0;
+  PyObject *__pyx_v_datatype_name = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("createCompoundType (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_datatype,&__pyx_n_s_datatype_name,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datatype)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datatype_name)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("createCompoundType", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1665; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createCompoundType") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1665; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_datatype = values[0];
+    __pyx_v_datatype_name = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("createCompoundType", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1665; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.Dataset.createCompoundType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_30createCompoundType(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_datatype, __pyx_v_datatype_name);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_30createCompoundType(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("createCompoundType", 0);
+
+  /* "netCDF4.pyx":1679
+ * The return value is the L{CompoundType} class instance describing the new
+ * datatype."""
+ *         self.cmptypes[datatype_name] = CompoundType(self, datatype,\             # <<<<<<<<<<<<<<
+ *                 datatype_name)
+ *         return self.cmptypes[datatype_name]
+ */
+  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+  __Pyx_INCREF(__pyx_v_datatype);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_datatype);
+  __Pyx_GIVEREF(__pyx_v_datatype);
+  __Pyx_INCREF(__pyx_v_datatype_name);
+  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_datatype_name);
+  __Pyx_GIVEREF(__pyx_v_datatype_name);
+  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_CompoundType)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (unlikely(PyObject_SetItem(__pyx_v_self->cmptypes, __pyx_v_datatype_name, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":1681
+ *         self.cmptypes[datatype_name] = CompoundType(self, datatype,\
+ *                 datatype_name)
+ *         return self.cmptypes[datatype_name]             # <<<<<<<<<<<<<<
+ * 
+ *     def createVLType(self, datatype, datatype_name):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = PyObject_GetItem(__pyx_v_self->cmptypes, __pyx_v_datatype_name); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":1665
+ *         # looks in the file, so no need to manually update.
+ * 
+ *     def createCompoundType(self, datatype, datatype_name):             # <<<<<<<<<<<<<<
+ *         """
+ * createCompoundType(self, datatype, datatype_name)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("netCDF4.Dataset.createCompoundType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1683
+ *         return self.cmptypes[datatype_name]
+ * 
+ *     def createVLType(self, datatype, datatype_name):             # <<<<<<<<<<<<<<
+ *         """
+ * createVLType(self, datatype, datatype_name)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_33createVLType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_32createVLType[] = "\ncreateVLType(self, datatype, datatype_name)\n\nCreates a new VLEN data type named C{datatype_name} from a numpy\ndtype object C{datatype}.\n\nThe return value is the L{VLType} class instance describing the new\ndatatype.";
+static PyObject *__pyx_pw_7netCDF4_7Dataset_33createVLType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_datatype = 0;
+  PyObject *__pyx_v_datatype_name = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("createVLType (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_datatype,&__pyx_n_s_datatype_name,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datatype)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datatype_name)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("createVLType", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createVLType") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_datatype = values[0];
+    __pyx_v_datatype_name = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("createVLType", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.Dataset.createVLType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_32createVLType(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_datatype, __pyx_v_datatype_name);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_32createVLType(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("createVLType", 0);
+
+  /* "netCDF4.pyx":1692
+ * The return value is the L{VLType} class instance describing the new
+ * datatype."""
+ *         self.vltypes[datatype_name] = VLType(self, datatype, datatype_name)             # <<<<<<<<<<<<<<
+ *         return self.vltypes[datatype_name]
+ * 
+ */
+  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+  __Pyx_INCREF(__pyx_v_datatype);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_datatype);
+  __Pyx_GIVEREF(__pyx_v_datatype);
+  __Pyx_INCREF(__pyx_v_datatype_name);
+  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_datatype_name);
+  __Pyx_GIVEREF(__pyx_v_datatype_name);
+  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_VLType)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (unlikely(PyObject_SetItem(__pyx_v_self->vltypes, __pyx_v_datatype_name, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":1693
+ * datatype."""
+ *         self.vltypes[datatype_name] = VLType(self, datatype, datatype_name)
+ *         return self.vltypes[datatype_name]             # <<<<<<<<<<<<<<
+ * 
+ *     def createVariable(self, varname, datatype, dimensions=(), zlib=False,
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = PyObject_GetItem(__pyx_v_self->vltypes, __pyx_v_datatype_name); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":1683
+ *         return self.cmptypes[datatype_name]
+ * 
+ *     def createVLType(self, datatype, datatype_name):             # <<<<<<<<<<<<<<
+ *         """
+ * createVLType(self, datatype, datatype_name)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("netCDF4.Dataset.createVLType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1695
+ *         return self.vltypes[datatype_name]
+ * 
+ *     def createVariable(self, varname, datatype, dimensions=(), zlib=False,             # <<<<<<<<<<<<<<
+ *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
+ *             chunksizes=None, endian='native', least_significant_digit=None,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_35createVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_34createVariable[] = "\ncreateVariable(self, varname, datatype, dimensions=(), zlib=False, complevel=4, shuffle=True, fletcher32=False, contiguous=False, chunksizes=None, endian='native', least_significant_digit=None, fill_value=None)\n\nCreates a new variable with the given C{varname}, C{datatype}, and \nC{dimensions}. If dimensions are not given, the variable is assumed to be \na scalar.\n\nThe C{datatype} can be a numpy datatype object, or a str [...]
+static PyObject *__pyx_pw_7netCDF4_7Dataset_35createVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_varname = 0;
+  PyObject *__pyx_v_datatype = 0;
+  PyObject *__pyx_v_dimensions = 0;
+  PyObject *__pyx_v_zlib = 0;
+  PyObject *__pyx_v_complevel = 0;
+  PyObject *__pyx_v_shuffle = 0;
+  PyObject *__pyx_v_fletcher32 = 0;
+  PyObject *__pyx_v_contiguous = 0;
+  PyObject *__pyx_v_chunksizes = 0;
+  PyObject *__pyx_v_endian = 0;
+  PyObject *__pyx_v_least_significant_digit = 0;
+  PyObject *__pyx_v_fill_value = 0;
+  PyObject *__pyx_v_chunk_cache = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("createVariable (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_varname,&__pyx_n_s_datatype,&__pyx_n_s_dimensions,&__pyx_n_s_zlib,&__pyx_n_s_complevel,&__pyx_n_s_shuffle,&__pyx_n_s_fletcher32,&__pyx_n_s_contiguous,&__pyx_n_s_chunksizes,&__pyx_n_s_endian,&__pyx_n_s_least_significant_digit,&__pyx_n_s_fill_value,&__pyx_n_s_chunk_cache,0};
+    PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
+    values[2] = ((PyObject *)__pyx_empty_tuple);
+    values[3] = ((PyObject *)Py_False);
+    values[4] = ((PyObject *)__pyx_int_4);
+
+    /* "netCDF4.pyx":1696
+ * 
+ *     def createVariable(self, varname, datatype, dimensions=(), zlib=False,
+ *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,             # <<<<<<<<<<<<<<
+ *             chunksizes=None, endian='native', least_significant_digit=None,
+ *             fill_value=None, chunk_cache=None):
+ */
+    values[5] = ((PyObject *)Py_True);
+    values[6] = ((PyObject *)Py_False);
+    values[7] = ((PyObject *)Py_False);
+
+    /* "netCDF4.pyx":1697
+ *     def createVariable(self, varname, datatype, dimensions=(), zlib=False,
+ *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
+ *             chunksizes=None, endian='native', least_significant_digit=None,             # <<<<<<<<<<<<<<
+ *             fill_value=None, chunk_cache=None):
+ *         """
+ */
+    values[8] = ((PyObject *)Py_None);
+    values[9] = ((PyObject *)__pyx_n_s_native);
+    values[10] = ((PyObject *)Py_None);
+
+    /* "netCDF4.pyx":1698
+ *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
+ *             chunksizes=None, endian='native', least_significant_digit=None,
+ *             fill_value=None, chunk_cache=None):             # <<<<<<<<<<<<<<
+ *         """
+ * createVariable(self, varname, datatype, dimensions=(), zlib=False, complevel=4, shuffle=True, fletcher32=False, contiguous=False, chunksizes=None, endian='native', least_significant_digit=None, fill_value=None)
+ */
+    values[11] = ((PyObject *)Py_None);
+    values[12] = ((PyObject *)Py_None);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
+        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
+        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
+        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
+        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_varname)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datatype)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("createVariable", 0, 2, 13, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dimensions);
+          if (value) { values[2] = value; kw_args--; }
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zlib);
+          if (value) { values[3] = value; kw_args--; }
+        }
+        case  4:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_complevel);
+          if (value) { values[4] = value; kw_args--; }
+        }
+        case  5:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shuffle);
+          if (value) { values[5] = value; kw_args--; }
+        }
+        case  6:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fletcher32);
+          if (value) { values[6] = value; kw_args--; }
+        }
+        case  7:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_contiguous);
+          if (value) { values[7] = value; kw_args--; }
+        }
+        case  8:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_chunksizes);
+          if (value) { values[8] = value; kw_args--; }
+        }
+        case  9:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_endian);
+          if (value) { values[9] = value; kw_args--; }
+        }
+        case 10:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_least_significant_digit);
+          if (value) { values[10] = value; kw_args--; }
+        }
+        case 11:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value);
+          if (value) { values[11] = value; kw_args--; }
+        }
+        case 12:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_chunk_cache);
+          if (value) { values[12] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createVariable") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
+        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
+        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
+        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
+        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_varname = values[0];
+    __pyx_v_datatype = values[1];
+    __pyx_v_dimensions = values[2];
+    __pyx_v_zlib = values[3];
+    __pyx_v_complevel = values[4];
+    __pyx_v_shuffle = values[5];
+    __pyx_v_fletcher32 = values[6];
+    __pyx_v_contiguous = values[7];
+    __pyx_v_chunksizes = values[8];
+    __pyx_v_endian = values[9];
+    __pyx_v_least_significant_digit = values[10];
+    __pyx_v_fill_value = values[11];
+    __pyx_v_chunk_cache = values[12];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("createVariable", 0, 2, 13, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.Dataset.createVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_34createVariable(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_varname, __pyx_v_datatype, __pyx_v_dimensions, __pyx_v_zlib, __pyx_v_complevel, __pyx_v_shuffle, __pyx_v_fletcher32, __pyx_v_contiguous, __pyx_v_chunksizes, __pyx_v_endian, __pyx_v_least_significant_digit, __pyx_v_fill_value, __pyx_v_chunk_cache);
+
+  /* "netCDF4.pyx":1695
+ *         return self.vltypes[datatype_name]
+ * 
+ *     def createVariable(self, varname, datatype, dimensions=(), zlib=False,             # <<<<<<<<<<<<<<
+ *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
+ *             chunksizes=None, endian='native', least_significant_digit=None,
+ */
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_34createVariable(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_varname, PyObject *__pyx_v_datatype, PyObject *__pyx_v_dimensions, PyObject *__pyx_v_zlib, PyObject *__pyx_v_complevel, PyObject *__pyx_v_shuffle, PyObject *__pyx_v_fletcher32, PyObject *__pyx_v_contiguous, PyObject *__pyx_v_chunksizes, PyObject *__pyx_v_endian, PyObject *__pyx_v_least_significant_digit, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_chunk_cache) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("createVariable", 0);
+
+  /* "netCDF4.pyx":1813
+ * instance. If C{None}, the data is not truncated. The C{ndim} attribute
+ * is the number of variable dimensions."""
+ *         self.variables[varname] = Variable(self, varname, datatype,             # <<<<<<<<<<<<<<
+ *         dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle,
+ *         fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,
+ */
+  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+  __Pyx_INCREF(__pyx_v_varname);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_varname);
+  __Pyx_GIVEREF(__pyx_v_varname);
+  __Pyx_INCREF(__pyx_v_datatype);
+  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_datatype);
+  __Pyx_GIVEREF(__pyx_v_datatype);
+  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+
+  /* "netCDF4.pyx":1814
+ * is the number of variable dimensions."""
+ *         self.variables[varname] = Variable(self, varname, datatype,
+ *         dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle,             # <<<<<<<<<<<<<<
+ *         fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,
+ *         endian=endian, least_significant_digit=least_significant_digit,
+ */
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dimensions, __pyx_v_dimensions) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_zlib, __pyx_v_zlib) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_complevel, __pyx_v_complevel) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shuffle, __pyx_v_shuffle) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":1815
+ *         self.variables[varname] = Variable(self, varname, datatype,
+ *         dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle,
+ *         fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,             # <<<<<<<<<<<<<<
+ *         endian=endian, least_significant_digit=least_significant_digit,
+ *         fill_value=fill_value, chunk_cache=chunk_cache)
+ */
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fletcher32, __pyx_v_fletcher32) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_contiguous, __pyx_v_contiguous) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_chunksizes, __pyx_v_chunksizes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":1816
+ *         dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle,
+ *         fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,
+ *         endian=endian, least_significant_digit=least_significant_digit,             # <<<<<<<<<<<<<<
+ *         fill_value=fill_value, chunk_cache=chunk_cache)
+ *         return self.variables[varname]
+ */
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_endian, __pyx_v_endian) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_least_significant_digit, __pyx_v_least_significant_digit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":1817
+ *         fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,
+ *         endian=endian, least_significant_digit=least_significant_digit,
+ *         fill_value=fill_value, chunk_cache=chunk_cache)             # <<<<<<<<<<<<<<
+ *         return self.variables[varname]
+ * 
+ */
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_chunk_cache, __pyx_v_chunk_cache) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":1813
+ * instance. If C{None}, the data is not truncated. The C{ndim} attribute
+ * is the number of variable dimensions."""
+ *         self.variables[varname] = Variable(self, varname, datatype,             # <<<<<<<<<<<<<<
+ *         dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle,
+ *         fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,
+ */
+  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Variable)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (unlikely(PyObject_SetItem(__pyx_v_self->variables, __pyx_v_varname, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":1818
+ *         endian=endian, least_significant_digit=least_significant_digit,
+ *         fill_value=fill_value, chunk_cache=chunk_cache)
+ *         return self.variables[varname]             # <<<<<<<<<<<<<<
+ * 
+ *     def renameVariable(self, oldname, newname):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_3 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_varname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_r = __pyx_t_3;
+  __pyx_t_3 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":1695
+ *         return self.vltypes[datatype_name]
+ * 
+ *     def createVariable(self, varname, datatype, dimensions=(), zlib=False,             # <<<<<<<<<<<<<<
+ *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
+ *             chunksizes=None, endian='native', least_significant_digit=None,
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4.Dataset.createVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1820
+ *         return self.variables[varname]
+ * 
+ *     def renameVariable(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameVariable(self, oldname, newname)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_37renameVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_36renameVariable[] = "\nrenameVariable(self, oldname, newname)\n\nrename a L{Variable} named C{oldname} to C{newname}";
+static PyObject *__pyx_pw_7netCDF4_7Dataset_37renameVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_oldname = 0;
+  PyObject *__pyx_v_newname = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("renameVariable (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oldname,&__pyx_n_s_newname,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oldname)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("renameVariable", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameVariable") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_oldname = values[0];
+    __pyx_v_newname = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("renameVariable", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.Dataset.renameVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_36renameVariable(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_36renameVariable(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname) {
+  char *__pyx_v_namstring;
+  PyObject *__pyx_v_var = NULL;
+  PyObject *__pyx_v_bytestr = NULL;
+  int __pyx_v_ierr;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  char *__pyx_t_10;
+  int __pyx_t_11;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("renameVariable", 0);
+
+  /* "netCDF4.pyx":1826
+ * rename a L{Variable} named C{oldname} to C{newname}"""
+ *         cdef char *namstring
+ *         try:             # <<<<<<<<<<<<<<
+ *             var = self.variables[oldname]
+ *         except KeyError:
+ */
+  {
+    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+    __Pyx_XGOTREF(__pyx_t_1);
+    __Pyx_XGOTREF(__pyx_t_2);
+    __Pyx_XGOTREF(__pyx_t_3);
+    /*try:*/ {
+
+      /* "netCDF4.pyx":1827
+ *         cdef char *namstring
+ *         try:
+ *             var = self.variables[oldname]             # <<<<<<<<<<<<<<
+ *         except KeyError:
+ *             raise KeyError('%s not a valid variable name' % oldname)
+ */
+      __pyx_t_4 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_oldname); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1827; __pyx_clineno = __LINE__; goto __pyx_L3_error;};
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_v_var = __pyx_t_4;
+      __pyx_t_4 = 0;
+    }
+    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+    goto __pyx_L10_try_end;
+    __pyx_L3_error:;
+    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "netCDF4.pyx":1828
+ *         try:
+ *             var = self.variables[oldname]
+ *         except KeyError:             # <<<<<<<<<<<<<<
+ *             raise KeyError('%s not a valid variable name' % oldname)
+ *         bytestr = _strencode(newname)
+ */
+    __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+    if (__pyx_t_5) {
+      __Pyx_AddTraceback("netCDF4.Dataset.renameVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_GOTREF(__pyx_t_7);
+
+      /* "netCDF4.pyx":1829
+ *             var = self.variables[oldname]
+ *         except KeyError:
+ *             raise KeyError('%s not a valid variable name' % oldname)             # <<<<<<<<<<<<<<
+ *         bytestr = _strencode(newname)
+ *         namstring = bytestr
+ */
+      __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s_not_a_valid_variable_name, __pyx_v_oldname); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
+      __Pyx_GIVEREF(__pyx_t_8);
+      __pyx_t_8 = 0;
+      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+    }
+    goto __pyx_L5_except_error;
+    __pyx_L5_except_error:;
+    __Pyx_XGIVEREF(__pyx_t_1);
+    __Pyx_XGIVEREF(__pyx_t_2);
+    __Pyx_XGIVEREF(__pyx_t_3);
+    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+    goto __pyx_L1_error;
+    __pyx_L10_try_end:;
+  }
+
+  /* "netCDF4.pyx":1830
+ *         except KeyError:
+ *             raise KeyError('%s not a valid variable name' % oldname)
+ *         bytestr = _strencode(newname)             # <<<<<<<<<<<<<<
+ *         namstring = bytestr
+ *         if self.data_model != 'NETCDF4': self._redef()
+ */
+  __pyx_t_7 = __pyx_f_7netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_v_bytestr = __pyx_t_7;
+  __pyx_t_7 = 0;
+
+  /* "netCDF4.pyx":1831
+ *             raise KeyError('%s not a valid variable name' % oldname)
+ *         bytestr = _strencode(newname)
+ *         namstring = bytestr             # <<<<<<<<<<<<<<
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         ierr = nc_rename_var(self._grpid, var._varid, namstring)
+ */
+  __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_namstring = __pyx_t_10;
+
+  /* "netCDF4.pyx":1832
+ *         bytestr = _strencode(newname)
+ *         namstring = bytestr
+ *         if self.data_model != 'NETCDF4': self._redef()             # <<<<<<<<<<<<<<
+ *         ierr = nc_rename_var(self._grpid, var._varid, namstring)
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ */
+  __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_11) {
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_6, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    goto __pyx_L13;
+  }
+  __pyx_L13:;
+
+  /* "netCDF4.pyx":1833
+ *         namstring = bytestr
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         ierr = nc_rename_var(self._grpid, var._varid, namstring)             # <<<<<<<<<<<<<<
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ *         if ierr != NC_NOERR:
+ */
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_varid); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_v_ierr = nc_rename_var(__pyx_v_self->_grpid, __pyx_t_5, __pyx_v_namstring);
+
+  /* "netCDF4.pyx":1834
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         ierr = nc_rename_var(self._grpid, var._varid, namstring)
+ *         if self.data_model != 'NETCDF4': self._enddef()             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_11) {
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_6, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    goto __pyx_L14;
+  }
+  __pyx_L14:;
+
+  /* "netCDF4.pyx":1835
+ *         ierr = nc_rename_var(self._grpid, var._varid, namstring)
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         # remove old key from dimensions dict.
+ */
+  __pyx_t_11 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_11) {
+
+    /* "netCDF4.pyx":1836
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         # remove old key from dimensions dict.
+ *         self.variables.pop(oldname)
+ */
+    __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_INCREF(__pyx_t_7);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
+    __Pyx_GIVEREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":1838
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         # remove old key from dimensions dict.
+ *         self.variables.pop(oldname)             # <<<<<<<<<<<<<<
+ *         # add new key.
+ *         self.variables[newname] = var
+ */
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_pop); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_4 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+    }
+  }
+  if (!__pyx_t_4) {
+    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_oldname); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+  } else {
+    __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+    __Pyx_INCREF(__pyx_v_oldname);
+    PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_oldname);
+    __Pyx_GIVEREF(__pyx_v_oldname);
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "netCDF4.pyx":1840
+ *         self.variables.pop(oldname)
+ *         # add new key.
+ *         self.variables[newname] = var             # <<<<<<<<<<<<<<
+ * 
+ *     def createGroup(self, groupname):
+ */
+  if (unlikely(PyObject_SetItem(__pyx_v_self->variables, __pyx_v_newname, __pyx_v_var) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":1820
+ *         return self.variables[varname]
+ * 
+ *     def renameVariable(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameVariable(self, oldname, newname)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_AddTraceback("netCDF4.Dataset.renameVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_var);
+  __Pyx_XDECREF(__pyx_v_bytestr);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1842
+ *         self.variables[newname] = var
+ * 
+ *     def createGroup(self, groupname):             # <<<<<<<<<<<<<<
+ *         """
+ * createGroup(self, groupname)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_39createGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_groupname); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_38createGroup[] = "\ncreateGroup(self, groupname)\n\nCreates a new L{Group} with the given C{groupname}.\n\nThe return value is a L{Group} class instance describing the new group.";
+static PyObject *__pyx_pw_7netCDF4_7Dataset_39createGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_groupname) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("createGroup (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_38createGroup(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_groupname));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_38createGroup(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_groupname) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("createGroup", 0);
+
+  /* "netCDF4.pyx":1849
+ * 
+ * The return value is a L{Group} class instance describing the new group."""
+ *         self.groups[groupname] = Group(self, groupname)             # <<<<<<<<<<<<<<
+ *         return self.groups[groupname]
+ * 
+ */
+  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+  __Pyx_INCREF(__pyx_v_groupname);
+  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_groupname);
+  __Pyx_GIVEREF(__pyx_v_groupname);
+  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Group)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (unlikely(PyObject_SetItem(__pyx_v_self->groups, __pyx_v_groupname, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":1850
+ * The return value is a L{Group} class instance describing the new group."""
+ *         self.groups[groupname] = Group(self, groupname)
+ *         return self.groups[groupname]             # <<<<<<<<<<<<<<
+ * 
+ *     def ncattrs(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = PyObject_GetItem(__pyx_v_self->groups, __pyx_v_groupname); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1850; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":1842
+ *         self.variables[newname] = var
+ * 
+ *     def createGroup(self, groupname):             # <<<<<<<<<<<<<<
+ *         """
+ * createGroup(self, groupname)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("netCDF4.Dataset.createGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1852
+ *         return self.groups[groupname]
+ * 
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         """
+ * ncattrs(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_41ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_40ncattrs[] = "\nncattrs(self)\n\nreturn netCDF global attribute names for this L{Dataset} or L{Group} in a list.";
+static PyObject *__pyx_pw_7netCDF4_7Dataset_41ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("ncattrs (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_40ncattrs(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_40ncattrs(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("ncattrs", 0);
+
+  /* "netCDF4.pyx":1857
+ * 
+ * return netCDF global attribute names for this L{Dataset} or L{Group} in a list."""
+ *         return _get_att_names(self._grpid, NC_GLOBAL)             # <<<<<<<<<<<<<<
+ * 
+ *     def setncattr(self,name,value):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __pyx_f_7netCDF4__get_att_names(__pyx_v_self->_grpid, NC_GLOBAL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":1852
+ *         return self.groups[groupname]
+ * 
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         """
+ * ncattrs(self)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Dataset.ncattrs", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1859
+ *         return _get_att_names(self._grpid, NC_GLOBAL)
+ * 
+ *     def setncattr(self,name,value):             # <<<<<<<<<<<<<<
+ *         """
+ * setncattr(self,name,value)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_43setncattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_42setncattr[] = "\nsetncattr(self,name,value)\n\nset a netCDF dataset or group attribute using name,value pair.  Only use if you need to set a\nnetCDF attribute with the same name as one of the reserved python\nattributes.";
+static PyObject *__pyx_pw_7netCDF4_7Dataset_43setncattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_name = 0;
+  PyObject *__pyx_v_value = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("setncattr (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_value,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setncattr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_name = values[0];
+    __pyx_v_value = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.Dataset.setncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_42setncattr(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_name, __pyx_v_value);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_42setncattr(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("setncattr", 0);
+
+  /* "netCDF4.pyx":1866
+ * netCDF attribute with the same name as one of the reserved python
+ * attributes."""
+ *         if self.data_model != 'NETCDF4': self._redef()             # <<<<<<<<<<<<<<
+ *         _set_att(self, NC_GLOBAL, name, value)
+ *         if self.data_model !=  'NETCDF4': self._enddef()
+ */
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":1867
+ * attributes."""
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         _set_att(self, NC_GLOBAL, name, value)             # <<<<<<<<<<<<<<
+ *         if self.data_model !=  'NETCDF4': self._enddef()
+ * 
+ */
+  __pyx_t_2 = __pyx_f_7netCDF4__set_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":1868
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         _set_att(self, NC_GLOBAL, name, value)
+ *         if self.data_model !=  'NETCDF4': self._enddef()             # <<<<<<<<<<<<<<
+ * 
+ *     def setncatts(self,attdict):
+ */
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enddef); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "netCDF4.pyx":1859
+ *         return _get_att_names(self._grpid, NC_GLOBAL)
+ * 
+ *     def setncattr(self,name,value):             # <<<<<<<<<<<<<<
+ *         """
+ * setncattr(self,name,value)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4.Dataset.setncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1870
+ *         if self.data_model !=  'NETCDF4': self._enddef()
+ * 
+ *     def setncatts(self,attdict):             # <<<<<<<<<<<<<<
+ *         """
+ * setncatts(self,attdict)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_45setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_44setncatts[] = "\nsetncatts(self,attdict)\n\nset a bunch of netCDF dataset or group attributes at once using a python dictionary. \nThis may be faster when setting a lot of attributes for a NETCDF3 \nformatted file, since nc_redef/nc_enddef is not called in between setting\neach attribute";
+static PyObject *__pyx_pw_7netCDF4_7Dataset_45setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("setncatts (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_44setncatts(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_attdict));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_44setncatts(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_attdict) {
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_v_value = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  Py_ssize_t __pyx_t_5;
+  PyObject *(*__pyx_t_6)(PyObject *);
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *(*__pyx_t_9)(PyObject *);
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("setncatts", 0);
+
+  /* "netCDF4.pyx":1878
+ * formatted file, since nc_redef/nc_enddef is not called in between setting
+ * each attribute"""
+ *         if self.data_model != 'NETCDF4': self._redef()             # <<<<<<<<<<<<<<
+ *         for name, value in attdict.items():
+ *             _set_att(self, NC_GLOBAL, name, value)
+ */
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":1879
+ * each attribute"""
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         for name, value in attdict.items():             # <<<<<<<<<<<<<<
+ *             _set_att(self, NC_GLOBAL, name, value)
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_attdict, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+    }
+  }
+  if (__pyx_t_4) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  } else {
+    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
+    __pyx_t_6 = NULL;
+  } else {
+    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_6)) {
+      if (likely(PyList_CheckExact(__pyx_t_3))) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_2 = __pyx_t_6(__pyx_t_3);
+      if (unlikely(!__pyx_t_2)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
+      PyObject* sequence = __pyx_t_2;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
+      } else {
+        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
+      }
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_7);
+      #else
+      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      #endif
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
+      index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_4);
+      index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_7);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = NULL;
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      goto __pyx_L7_unpacking_done;
+      __pyx_L6_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_t_9 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L7_unpacking_done:;
+    }
+    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
+    __pyx_t_4 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
+    __pyx_t_7 = 0;
+
+    /* "netCDF4.pyx":1880
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         for name, value in attdict.items():
+ *             _set_att(self, NC_GLOBAL, name, value)             # <<<<<<<<<<<<<<
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ * 
+ */
+    __pyx_t_2 = __pyx_f_7netCDF4__set_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+    /* "netCDF4.pyx":1879
+ * each attribute"""
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         for name, value in attdict.items():             # <<<<<<<<<<<<<<
+ *             _set_att(self, NC_GLOBAL, name, value)
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ */
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":1881
+ *         for name, value in attdict.items():
+ *             _set_att(self, NC_GLOBAL, name, value)
+ *         if self.data_model != 'NETCDF4': self._enddef()             # <<<<<<<<<<<<<<
+ * 
+ *     def getncattr(self,name):
+ */
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enddef); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_7 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+      if (likely(__pyx_t_7)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+        __Pyx_INCREF(__pyx_t_7);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_2, function);
+      }
+    }
+    if (__pyx_t_7) {
+      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    } else {
+      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    goto __pyx_L8;
+  }
+  __pyx_L8:;
+
+  /* "netCDF4.pyx":1870
+ *         if self.data_model !=  'NETCDF4': self._enddef()
+ * 
+ *     def setncatts(self,attdict):             # <<<<<<<<<<<<<<
+ *         """
+ * setncatts(self,attdict)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_AddTraceback("netCDF4.Dataset.setncatts", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XDECREF(__pyx_v_value);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1883
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ * 
+ *     def getncattr(self,name):             # <<<<<<<<<<<<<<
+ *         """
+ * getncattr(self,name)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_47getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_46getncattr[] = "\ngetncattr(self,name)\n\nretrievel a netCDF dataset or group attribute.  Only use if you need to set a\nnetCDF attribute with the same name as one of the reserved python\nattributes.";
+static PyObject *__pyx_pw_7netCDF4_7Dataset_47getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("getncattr (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_46getncattr(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_46getncattr(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("getncattr", 0);
+
+  /* "netCDF4.pyx":1890
+ * netCDF attribute with the same name as one of the reserved python
+ * attributes."""
+ *         return _get_att(self, NC_GLOBAL, name)             # <<<<<<<<<<<<<<
+ * 
+ *     def __delattr__(self,name):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __pyx_f_7netCDF4__get_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":1883
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ * 
+ *     def getncattr(self,name):             # <<<<<<<<<<<<<<
+ *         """
+ * getncattr(self,name)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Dataset.getncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1892
+ *         return _get_att(self, NC_GLOBAL, name)
+ * 
+ *     def __delattr__(self,name):             # <<<<<<<<<<<<<<
+ *         # if it's a netCDF attribute, remove it
+ *         if name not in _private_atts:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_49__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_49__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__delattr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_48__delattr__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_48__delattr__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__delattr__", 0);
+
+  /* "netCDF4.pyx":1894
+ *     def __delattr__(self,name):
+ *         # if it's a netCDF attribute, remove it
+ *         if name not in _private_atts:             # <<<<<<<<<<<<<<
+ *             self.delncattr(name)
+ *         else:
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = (__pyx_t_2 != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":1895
+ *         # if it's a netCDF attribute, remove it
+ *         if name not in _private_atts:
+ *             self.delncattr(name)             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise AttributeError(
+ */
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delncattr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (!__pyx_t_5) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+      __Pyx_INCREF(__pyx_v_name);
+      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_name);
+      __Pyx_GIVEREF(__pyx_v_name);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":1898
+ *         else:
+ *             raise AttributeError(
+ *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))             # <<<<<<<<<<<<<<
+ * 
+ *     def delncattr(self, name):
+ */
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_name);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_name);
+    __Pyx_GIVEREF(__pyx_v_name);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_is_one_of_the_reserved_attrib, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":1897
+ *             self.delncattr(name)
+ *         else:
+ *             raise AttributeError(             # <<<<<<<<<<<<<<
+ *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
+ * 
+ */
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":1892
+ *         return _get_att(self, NC_GLOBAL, name)
+ * 
+ *     def __delattr__(self,name):             # <<<<<<<<<<<<<<
+ *         # if it's a netCDF attribute, remove it
+ *         if name not in _private_atts:
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netCDF4.Dataset.__delattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1900
+ *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
+ * 
+ *     def delncattr(self, name):             # <<<<<<<<<<<<<<
+ *         """
+ * delncattr(self,name,value)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_51delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_50delncattr[] = "\ndelncattr(self,name,value)\n\ndelete a netCDF dataset or group attribute.  Only use if you need to delete a\nnetCDF attribute with the same name as one of the reserved python\nattributes.";
+static PyObject *__pyx_pw_7netCDF4_7Dataset_51delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("delncattr (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_50delncattr(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_50delncattr(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) {
+  char *__pyx_v_attname;
+  int __pyx_v_ierr;
+  PyObject *__pyx_v_bytestr = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  char *__pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("delncattr", 0);
+
+  /* "netCDF4.pyx":1909
+ *         cdef char *attname
+ *         cdef int ierr
+ *         bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *         attname = bytestr
+ *         if self.data_model != 'NETCDF4': self._redef()
+ */
+  __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_bytestr = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":1910
+ *         cdef int ierr
+ *         bytestr = _strencode(name)
+ *         attname = bytestr             # <<<<<<<<<<<<<<
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         ierr = nc_del_att(self._grpid, NC_GLOBAL, attname)
+ */
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_attname = __pyx_t_2;
+
+  /* "netCDF4.pyx":1911
+ *         bytestr = _strencode(name)
+ *         attname = bytestr
+ *         if self.data_model != 'NETCDF4': self._redef()             # <<<<<<<<<<<<<<
+ *         ierr = nc_del_att(self._grpid, NC_GLOBAL, attname)
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ */
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_3) {
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (__pyx_t_5) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":1912
+ *         attname = bytestr
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         ierr = nc_del_att(self._grpid, NC_GLOBAL, attname)             # <<<<<<<<<<<<<<
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ *         if ierr != NC_NOERR:
+ */
+  __pyx_v_ierr = nc_del_att(__pyx_v_self->_grpid, NC_GLOBAL, __pyx_v_attname);
+
+  /* "netCDF4.pyx":1913
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         ierr = nc_del_att(self._grpid, NC_GLOBAL, attname)
+ *         if self.data_model != 'NETCDF4': self._enddef()             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_3) {
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enddef); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (__pyx_t_5) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "netCDF4.pyx":1914
+ *         ierr = nc_del_att(self._grpid, NC_GLOBAL, attname)
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":1915
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ * 
+ *     def __setattr__(self,name,value):
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":1900
+ *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
+ * 
+ *     def delncattr(self, name):             # <<<<<<<<<<<<<<
+ *         """
+ * delncattr(self,name,value)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("netCDF4.Dataset.delncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_bytestr);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1917
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def __setattr__(self,name,value):             # <<<<<<<<<<<<<<
+ *         # if name in _private_atts, it is stored at the python
+ *         # level and not in the netCDF file.
+ */
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_53__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_53__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_52__setattr__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_52__setattr__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  Py_ssize_t __pyx_t_6;
+  PyObject *__pyx_t_7 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__setattr__", 0);
+
+  /* "netCDF4.pyx":1920
+ *         # if name in _private_atts, it is stored at the python
+ *         # level and not in the netCDF file.
+ *         if name not in _private_atts:             # <<<<<<<<<<<<<<
+ *             self.setncattr(name, value)
+ *         elif not name.endswith('__'):
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = (__pyx_t_2 != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":1921
+ *         # level and not in the netCDF file.
+ *         if name not in _private_atts:
+ *             self.setncattr(name, value)             # <<<<<<<<<<<<<<
+ *         elif not name.endswith('__'):
+ *             if hasattr(self,name):
+ */
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setncattr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = NULL;
+    __pyx_t_6 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+        __pyx_t_6 = 1;
+      }
+    }
+    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    if (__pyx_t_5) {
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_name);
+    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_name);
+    __Pyx_GIVEREF(__pyx_v_name);
+    __Pyx_INCREF(__pyx_v_value);
+    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_value);
+    __Pyx_GIVEREF(__pyx_v_value);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L3;
+  }
+
+  /* "netCDF4.pyx":1922
+ *         if name not in _private_atts:
+ *             self.setncattr(name, value)
+ *         elif not name.endswith('__'):             # <<<<<<<<<<<<<<
+ *             if hasattr(self,name):
+ *                 raise AttributeError(
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_2 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":1923
+ *             self.setncattr(name, value)
+ *         elif not name.endswith('__'):
+ *             if hasattr(self,name):             # <<<<<<<<<<<<<<
+ *                 raise AttributeError(
+ *             "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts)))
+ */
+    __pyx_t_2 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_v_name); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = (__pyx_t_2 != 0);
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":1925
+ *             if hasattr(self,name):
+ *                 raise AttributeError(
+ *             "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts)))             # <<<<<<<<<<<<<<
+ *             else:
+ *                 self.__dict__[name]=value
+ */
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_1 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_v_name);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_name);
+      __Pyx_GIVEREF(__pyx_v_name);
+      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_is_one_of_the_reserved_attrib_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+      /* "netCDF4.pyx":1924
+ *         elif not name.endswith('__'):
+ *             if hasattr(self,name):
+ *                 raise AttributeError(             # <<<<<<<<<<<<<<
+ *             "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts)))
+ *             else:
+ */
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":1927
+ *             "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts)))
+ *             else:
+ *                 self.__dict__[name]=value             # <<<<<<<<<<<<<<
+ * 
+ *     def __getattr__(self,name):
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    }
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":1917
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def __setattr__(self,name,value):             # <<<<<<<<<<<<<<
+ *         # if name in _private_atts, it is stored at the python
+ *         # level and not in the netCDF file.
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_AddTraceback("netCDF4.Dataset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1929
+ *                 self.__dict__[name]=value
+ * 
+ *     def __getattr__(self,name):             # <<<<<<<<<<<<<<
+ *         # if name in _private_atts, it is stored at the python
+ *         # level and not in the netCDF file.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_55__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_55__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_54__getattr__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_54__getattr__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) {
+  PyObject *__pyx_v_names = NULL;
+  PyObject *__pyx_v_values = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  Py_ssize_t __pyx_t_6;
+  PyObject *(*__pyx_t_7)(PyObject *);
+  int __pyx_t_8;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__getattr__", 0);
+  __Pyx_INCREF(__pyx_v_name);
+
+  /* "netCDF4.pyx":1932
+ *         # if name in _private_atts, it is stored at the python
+ *         # level and not in the netCDF file.
+ *         if name.startswith('__') and name.endswith('__'):             # <<<<<<<<<<<<<<
+ *             # if __dict__ requested, return a dict with netCDF attributes.
+ *             if name == '__dict__':
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (__pyx_t_4) {
+  } else {
+    __pyx_t_1 = __pyx_t_4;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_1 = __pyx_t_4;
+  __pyx_L4_bool_binop_done:;
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":1934
+ *         if name.startswith('__') and name.endswith('__'):
+ *             # if __dict__ requested, return a dict with netCDF attributes.
+ *             if name == '__dict__':             # <<<<<<<<<<<<<<
+ *                 names = self.ncattrs()
+ *                 values = []
+ */
+    __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_dict, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":1935
+ *             # if __dict__ requested, return a dict with netCDF attributes.
+ *             if name == '__dict__':
+ *                 names = self.ncattrs()             # <<<<<<<<<<<<<<
+ *                 values = []
+ *                 for name in names:
+ */
+      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+        if (likely(__pyx_t_5)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+          __Pyx_INCREF(__pyx_t_5);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_3, function);
+        }
+      }
+      if (__pyx_t_5) {
+        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      } else {
+        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_v_names = __pyx_t_2;
+      __pyx_t_2 = 0;
+
+      /* "netCDF4.pyx":1936
+ *             if name == '__dict__':
+ *                 names = self.ncattrs()
+ *                 values = []             # <<<<<<<<<<<<<<
+ *                 for name in names:
+ *                     values.append(_get_att(self, NC_GLOBAL, name))
+ */
+      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_v_values = ((PyObject*)__pyx_t_2);
+      __pyx_t_2 = 0;
+
+      /* "netCDF4.pyx":1937
+ *                 names = self.ncattrs()
+ *                 values = []
+ *                 for name in names:             # <<<<<<<<<<<<<<
+ *                     values.append(_get_att(self, NC_GLOBAL, name))
+ *                 return OrderedDict(zip(names,values))
+ */
+      if (likely(PyList_CheckExact(__pyx_v_names)) || PyTuple_CheckExact(__pyx_v_names)) {
+        __pyx_t_2 = __pyx_v_names; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
+        __pyx_t_7 = NULL;
+      } else {
+        __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_names); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      for (;;) {
+        if (likely(!__pyx_t_7)) {
+          if (likely(PyList_CheckExact(__pyx_t_2))) {
+            if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          } else {
+            if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          }
+        } else {
+          __pyx_t_3 = __pyx_t_7(__pyx_t_2);
+          if (unlikely(!__pyx_t_3)) {
+            PyObject* exc_type = PyErr_Occurred();
+            if (exc_type) {
+              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            break;
+          }
+          __Pyx_GOTREF(__pyx_t_3);
+        }
+        __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_3);
+        __pyx_t_3 = 0;
+
+        /* "netCDF4.pyx":1938
+ *                 values = []
+ *                 for name in names:
+ *                     values.append(_get_att(self, NC_GLOBAL, name))             # <<<<<<<<<<<<<<
+ *                 return OrderedDict(zip(names,values))
+ *             else:
+ */
+        __pyx_t_3 = __pyx_f_7netCDF4__get_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_3); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+        /* "netCDF4.pyx":1937
+ *                 names = self.ncattrs()
+ *                 values = []
+ *                 for name in names:             # <<<<<<<<<<<<<<
+ *                     values.append(_get_att(self, NC_GLOBAL, name))
+ *                 return OrderedDict(zip(names,values))
+ */
+      }
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+      /* "netCDF4.pyx":1939
+ *                 for name in names:
+ *                     values.append(_get_att(self, NC_GLOBAL, name))
+ *                 return OrderedDict(zip(names,values))             # <<<<<<<<<<<<<<
+ *             else:
+ *                 raise AttributeError
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_10 = NULL;
+      __pyx_t_6 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
+        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
+        if (likely(__pyx_t_10)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+          __Pyx_INCREF(__pyx_t_10);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_9, function);
+          __pyx_t_6 = 1;
+        }
+      }
+      __pyx_t_11 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      if (__pyx_t_10) {
+        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = NULL;
+      }
+      __Pyx_INCREF(__pyx_v_names);
+      PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_v_names);
+      __Pyx_GIVEREF(__pyx_v_names);
+      __Pyx_INCREF(__pyx_v_values);
+      PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_v_values);
+      __Pyx_GIVEREF(__pyx_v_values);
+      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_9 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
+        if (likely(__pyx_t_9)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+          __Pyx_INCREF(__pyx_t_9);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_3, function);
+        }
+      }
+      if (!__pyx_t_9) {
+        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_GOTREF(__pyx_t_2);
+      } else {
+        __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
+        PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_5);
+        __Pyx_GIVEREF(__pyx_t_5);
+        __pyx_t_5 = 0;
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_r = __pyx_t_2;
+      __pyx_t_2 = 0;
+      goto __pyx_L0;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":1941
+ *                 return OrderedDict(zip(names,values))
+ *             else:
+ *                 raise AttributeError             # <<<<<<<<<<<<<<
+ *         elif name in _private_atts:
+ *             return self.__dict__[name]
+ */
+      __Pyx_Raise(__pyx_builtin_AttributeError, 0, 0, 0);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+
+  /* "netCDF4.pyx":1942
+ *             else:
+ *                 raise AttributeError
+ *         elif name in _private_atts:             # <<<<<<<<<<<<<<
+ *             return self.__dict__[name]
+ *         else:
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = (__pyx_t_1 != 0);
+  if (__pyx_t_4) {
+
+    /* "netCDF4.pyx":1943
+ *                 raise AttributeError
+ *         elif name in _private_atts:
+ *             return self.__dict__[name]             # <<<<<<<<<<<<<<
+ *         else:
+ *             return self.getncattr(name)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_r = __pyx_t_3;
+    __pyx_t_3 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":1945
+ *             return self.__dict__[name]
+ *         else:
+ *             return self.getncattr(name)             # <<<<<<<<<<<<<<
+ * 
+ *     def renameAttribute(self, oldname, newname):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_11 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
+      if (likely(__pyx_t_11)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+        __Pyx_INCREF(__pyx_t_11);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_2, function);
+      }
+    }
+    if (!__pyx_t_11) {
+      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+    } else {
+      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = NULL;
+      __Pyx_INCREF(__pyx_v_name);
+      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_name);
+      __Pyx_GIVEREF(__pyx_v_name);
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_r = __pyx_t_3;
+    __pyx_t_3 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":1929
+ *                 self.__dict__[name]=value
+ * 
+ *     def __getattr__(self,name):             # <<<<<<<<<<<<<<
+ *         # if name in _private_atts, it is stored at the python
+ *         # level and not in the netCDF file.
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_AddTraceback("netCDF4.Dataset.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_names);
+  __Pyx_XDECREF(__pyx_v_values);
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1947
+ *             return self.getncattr(name)
+ * 
+ *     def renameAttribute(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameAttribute(self, oldname, newname)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_57renameAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_56renameAttribute[] = "\nrenameAttribute(self, oldname, newname)\n\nrename a L{Dataset} or L{Group} attribute named C{oldname} to C{newname}.";
+static PyObject *__pyx_pw_7netCDF4_7Dataset_57renameAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_oldname = 0;
+  PyObject *__pyx_v_newname = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("renameAttribute (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oldname,&__pyx_n_s_newname,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oldname)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameAttribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_oldname = values[0];
+    __pyx_v_newname = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.Dataset.renameAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_56renameAttribute(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_56renameAttribute(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname) {
+  int __pyx_v_ierr;
+  char *__pyx_v_oldnamec;
+  char *__pyx_v_newnamec;
+  PyObject *__pyx_v_bytestr = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  char *__pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("renameAttribute", 0);
+
+  /* "netCDF4.pyx":1955
+ *         cdef char *oldnamec
+ *         cdef char *newnamec
+ *         bytestr = _strencode(oldname)             # <<<<<<<<<<<<<<
+ *         oldnamec = bytestr
+ *         bytestr = _strencode(newname)
+ */
+  __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_oldname, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_bytestr = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":1956
+ *         cdef char *newnamec
+ *         bytestr = _strencode(oldname)
+ *         oldnamec = bytestr             # <<<<<<<<<<<<<<
+ *         bytestr = _strencode(newname)
+ *         newnamec = bytestr
+ */
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_oldnamec = __pyx_t_2;
+
+  /* "netCDF4.pyx":1957
+ *         bytestr = _strencode(oldname)
+ *         oldnamec = bytestr
+ *         bytestr = _strencode(newname)             # <<<<<<<<<<<<<<
+ *         newnamec = bytestr
+ *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
+ */
+  __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":1958
+ *         oldnamec = bytestr
+ *         bytestr = _strencode(newname)
+ *         newnamec = bytestr             # <<<<<<<<<<<<<<
+ *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
+ *         if ierr != NC_NOERR:
+ */
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_newnamec = __pyx_t_2;
+
+  /* "netCDF4.pyx":1959
+ *         bytestr = _strencode(newname)
+ *         newnamec = bytestr
+ *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_v_ierr = nc_rename_att(__pyx_v_self->_grpid, NC_GLOBAL, __pyx_v_oldnamec, __pyx_v_newnamec);
+
+  /* "netCDF4.pyx":1960
+ *         newnamec = bytestr
+ *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":1961
+ *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ * 
+ *     def renameGroup(self, oldname, newname):
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":1947
+ *             return self.getncattr(name)
+ * 
+ *     def renameAttribute(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameAttribute(self, oldname, newname)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4.Dataset.renameAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_bytestr);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1963
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def renameGroup(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameGroup(self, oldname, newname)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_59renameGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_58renameGroup[] = "\nrenameGroup(self, oldname, newname)\n\nrename a L{Group} named C{oldname} to C{newname} (requires netcdf >= 4.3.1).";
+static PyObject *__pyx_pw_7netCDF4_7Dataset_59renameGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  CYTHON_UNUSED PyObject *__pyx_v_oldname = 0;
+  CYTHON_UNUSED PyObject *__pyx_v_newname = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("renameGroup (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oldname,&__pyx_n_s_newname,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oldname)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("renameGroup", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameGroup") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_oldname = values[0];
+    __pyx_v_newname = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("renameGroup", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.Dataset.renameGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_58renameGroup(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_58renameGroup(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_oldname, CYTHON_UNUSED PyObject *__pyx_v_newname) {
+  PyObject *__pyx_v_msg = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("renameGroup", 0);
+
+  /* "netCDF4.pyx":1985
+ *             self.groups[newname] = grp
+ *         ELSE:
+ *             msg = """             # <<<<<<<<<<<<<<
+ * renameGroup method not enabled.  To enable, install Cython, make sure you have
+ * version 4.3.1 or higher of the netcdf C lib, and rebuild netcdf4-python."""
+ */
+  __Pyx_INCREF(__pyx_kp_s_renameGroup_method_not_enabled);
+  __pyx_v_msg = __pyx_kp_s_renameGroup_method_not_enabled;
+
+  /* "netCDF4.pyx":1988
+ * renameGroup method not enabled.  To enable, install Cython, make sure you have
+ * version 4.3.1 or higher of the netcdf C lib, and rebuild netcdf4-python."""
+ *             raise ValueError(msg)             # <<<<<<<<<<<<<<
+ * 
+ *     def set_auto_maskandscale(self, value):
+ */
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_msg);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_msg);
+  __Pyx_GIVEREF(__pyx_v_msg);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":1963
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def renameGroup(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameGroup(self, oldname, newname)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("netCDF4.Dataset.renameGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __Pyx_XDECREF(__pyx_v_msg);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1990
+ *             raise ValueError(msg)
+ * 
+ *     def set_auto_maskandscale(self, value):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_maskandscale(self, True_or_False)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_61set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_60set_auto_maskandscale[] = "\nset_auto_maskandscale(self, True_or_False)\n\nCall L{set_auto_maskandscale} for all variables contained in this L{Dataset} or\nL{Group}, as well as for all variables in all its subgroups.\n\nB{Parameters}:\n\nB{C{True_or_False}} - Boolean determining if automatic conversion to masked arrays\nand variable scaling shall be applied for all variables.\n\nB{Notes}:\n\nCalling this function only affects existing variables.  [...]
+static PyObject *__pyx_pw_7netCDF4_7Dataset_61set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("set_auto_maskandscale (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_60set_auto_maskandscale(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_60set_auto_maskandscale(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  PyObject *__pyx_v_var = NULL;
+  PyObject *__pyx_v_groups = NULL;
+  PyObject *__pyx_v_group = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  Py_ssize_t __pyx_t_4;
+  PyObject *(*__pyx_t_5)(PyObject *);
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  Py_ssize_t __pyx_t_8;
+  PyObject *(*__pyx_t_9)(PyObject *);
+  Py_ssize_t __pyx_t_10;
+  PyObject *(*__pyx_t_11)(PyObject *);
+  PyObject *__pyx_t_12 = NULL;
+  PyObject *__pyx_t_13 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("set_auto_maskandscale", 0);
+
+  /* "netCDF4.pyx":2008
+ *         """
+ * 
+ *         for var in self.variables.values():             # <<<<<<<<<<<<<<
+ *             var.set_auto_maskandscale(value)
+ * 
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
+  } else {
+    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_5)) {
+      if (likely(PyList_CheckExact(__pyx_t_2))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_1 = __pyx_t_5(__pyx_t_2);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2009
+ * 
+ *         for var in self.variables.values():
+ *             var.set_auto_maskandscale(value)             # <<<<<<<<<<<<<<
+ * 
+ *         for groups in _walk_grps(self):
+ */
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_6 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_6)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_6);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (!__pyx_t_6) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+      __Pyx_INCREF(__pyx_v_value);
+      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_value);
+      __Pyx_GIVEREF(__pyx_v_value);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2008
+ *         """
+ * 
+ *         for var in self.variables.values():             # <<<<<<<<<<<<<<
+ *             var.set_auto_maskandscale(value)
+ * 
+ */
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":2011
+ *             var.set_auto_maskandscale(value)
+ * 
+ *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
+ *             for group in groups:
+ *                 for var in group.variables.values():
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+    }
+  }
+  if (!__pyx_t_3) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+  } else {
+    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+    __Pyx_INCREF(((PyObject *)__pyx_v_self));
+    PyTuple_SET_ITEM(__pyx_t_7, 0+1, ((PyObject *)__pyx_v_self));
+    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
+  } else {
+    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_5)) {
+      if (likely(PyList_CheckExact(__pyx_t_1))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_2 = __pyx_t_5(__pyx_t_1);
+      if (unlikely(!__pyx_t_2)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_groups, __pyx_t_2);
+    __pyx_t_2 = 0;
+
+    /* "netCDF4.pyx":2012
+ * 
+ *         for groups in _walk_grps(self):
+ *             for group in groups:             # <<<<<<<<<<<<<<
+ *                 for var in group.variables.values():
+ *                     var.set_auto_maskandscale(value)
+ */
+    if (likely(PyList_CheckExact(__pyx_v_groups)) || PyTuple_CheckExact(__pyx_v_groups)) {
+      __pyx_t_2 = __pyx_v_groups; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
+      __pyx_t_9 = NULL;
+    } else {
+      __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_groups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    for (;;) {
+      if (likely(!__pyx_t_9)) {
+        if (likely(PyList_CheckExact(__pyx_t_2))) {
+          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        }
+      } else {
+        __pyx_t_7 = __pyx_t_9(__pyx_t_2);
+        if (unlikely(!__pyx_t_7)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_7);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_7);
+      __pyx_t_7 = 0;
+
+      /* "netCDF4.pyx":2013
+ *         for groups in _walk_grps(self):
+ *             for group in groups:
+ *                 for var in group.variables.values():             # <<<<<<<<<<<<<<
+ *                     var.set_auto_maskandscale(value)
+ * 
+ */
+      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
+        if (likely(__pyx_t_3)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+          __Pyx_INCREF(__pyx_t_3);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_6, function);
+        }
+      }
+      if (__pyx_t_3) {
+        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      } else {
+        __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
+        __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = 0;
+        __pyx_t_11 = NULL;
+      } else {
+        __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      for (;;) {
+        if (likely(!__pyx_t_11)) {
+          if (likely(PyList_CheckExact(__pyx_t_6))) {
+            if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          } else {
+            if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          }
+        } else {
+          __pyx_t_7 = __pyx_t_11(__pyx_t_6);
+          if (unlikely(!__pyx_t_7)) {
+            PyObject* exc_type = PyErr_Occurred();
+            if (exc_type) {
+              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            break;
+          }
+          __Pyx_GOTREF(__pyx_t_7);
+        }
+        __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_7);
+        __pyx_t_7 = 0;
+
+        /* "netCDF4.pyx":2014
+ *             for group in groups:
+ *                 for var in group.variables.values():
+ *                     var.set_auto_maskandscale(value)             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_12 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
+          if (likely(__pyx_t_12)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+            __Pyx_INCREF(__pyx_t_12);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_3, function);
+          }
+        }
+        if (!__pyx_t_12) {
+          __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+        } else {
+          __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_13);
+          PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = NULL;
+          __Pyx_INCREF(__pyx_v_value);
+          PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_value);
+          __Pyx_GIVEREF(__pyx_v_value);
+          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+        /* "netCDF4.pyx":2013
+ *         for groups in _walk_grps(self):
+ *             for group in groups:
+ *                 for var in group.variables.values():             # <<<<<<<<<<<<<<
+ *                     var.set_auto_maskandscale(value)
+ * 
+ */
+      }
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+      /* "netCDF4.pyx":2012
+ * 
+ *         for groups in _walk_grps(self):
+ *             for group in groups:             # <<<<<<<<<<<<<<
+ *                 for var in group.variables.values():
+ *                     var.set_auto_maskandscale(value)
+ */
+    }
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+    /* "netCDF4.pyx":2011
+ *             var.set_auto_maskandscale(value)
+ * 
+ *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
+ *             for group in groups:
+ *                 for var in group.variables.values():
+ */
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":1990
+ *             raise ValueError(msg)
+ * 
+ *     def set_auto_maskandscale(self, value):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_maskandscale(self, True_or_False)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_12);
+  __Pyx_XDECREF(__pyx_t_13);
+  __Pyx_AddTraceback("netCDF4.Dataset.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_var);
+  __Pyx_XDECREF(__pyx_v_groups);
+  __Pyx_XDECREF(__pyx_v_group);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2017
+ * 
+ * 
+ *     def set_auto_mask(self, value):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_mask(self, True_or_False)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_63set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_62set_auto_mask[] = "\nset_auto_mask(self, True_or_False)\n\nCall L{set_auto_mask} for all variables contained in this L{Dataset} or\nL{Group}, as well as for all variables in all its subgroups.\n\nB{Parameters}:\n\nB{C{True_or_False}} - Boolean determining if automatic conversion to masked arrays\nshall be applied for all variables.\n\nB{Notes}:\n\nCalling this function only affects existing variables. Variables created\nafter calling this functio [...]
+static PyObject *__pyx_pw_7netCDF4_7Dataset_63set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("set_auto_mask (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_62set_auto_mask(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_62set_auto_mask(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  PyObject *__pyx_v_var = NULL;
+  PyObject *__pyx_v_groups = NULL;
+  PyObject *__pyx_v_group = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  Py_ssize_t __pyx_t_4;
+  PyObject *(*__pyx_t_5)(PyObject *);
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  Py_ssize_t __pyx_t_8;
+  PyObject *(*__pyx_t_9)(PyObject *);
+  Py_ssize_t __pyx_t_10;
+  PyObject *(*__pyx_t_11)(PyObject *);
+  PyObject *__pyx_t_12 = NULL;
+  PyObject *__pyx_t_13 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("set_auto_mask", 0);
+
+  /* "netCDF4.pyx":2035
+ *         """
+ * 
+ *         for var in self.variables.values():             # <<<<<<<<<<<<<<
+ *             var.set_auto_mask(value)
+ * 
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
+  } else {
+    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_5)) {
+      if (likely(PyList_CheckExact(__pyx_t_2))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_1 = __pyx_t_5(__pyx_t_2);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2036
+ * 
+ *         for var in self.variables.values():
+ *             var.set_auto_mask(value)             # <<<<<<<<<<<<<<
+ * 
+ *         for groups in _walk_grps(self):
+ */
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_mask); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_6 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_6)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_6);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (!__pyx_t_6) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+      __Pyx_INCREF(__pyx_v_value);
+      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_value);
+      __Pyx_GIVEREF(__pyx_v_value);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2035
+ *         """
+ * 
+ *         for var in self.variables.values():             # <<<<<<<<<<<<<<
+ *             var.set_auto_mask(value)
+ * 
+ */
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":2038
+ *             var.set_auto_mask(value)
+ * 
+ *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
+ *             for group in groups:
+ *                 for var in group.variables.values():
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+    }
+  }
+  if (!__pyx_t_3) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+  } else {
+    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+    __Pyx_INCREF(((PyObject *)__pyx_v_self));
+    PyTuple_SET_ITEM(__pyx_t_7, 0+1, ((PyObject *)__pyx_v_self));
+    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
+  } else {
+    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_5)) {
+      if (likely(PyList_CheckExact(__pyx_t_1))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_2 = __pyx_t_5(__pyx_t_1);
+      if (unlikely(!__pyx_t_2)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_groups, __pyx_t_2);
+    __pyx_t_2 = 0;
+
+    /* "netCDF4.pyx":2039
+ * 
+ *         for groups in _walk_grps(self):
+ *             for group in groups:             # <<<<<<<<<<<<<<
+ *                 for var in group.variables.values():
+ *                     var.set_auto_mask(value)
+ */
+    if (likely(PyList_CheckExact(__pyx_v_groups)) || PyTuple_CheckExact(__pyx_v_groups)) {
+      __pyx_t_2 = __pyx_v_groups; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
+      __pyx_t_9 = NULL;
+    } else {
+      __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_groups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    for (;;) {
+      if (likely(!__pyx_t_9)) {
+        if (likely(PyList_CheckExact(__pyx_t_2))) {
+          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        }
+      } else {
+        __pyx_t_7 = __pyx_t_9(__pyx_t_2);
+        if (unlikely(!__pyx_t_7)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_7);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_7);
+      __pyx_t_7 = 0;
+
+      /* "netCDF4.pyx":2040
+ *         for groups in _walk_grps(self):
+ *             for group in groups:
+ *                 for var in group.variables.values():             # <<<<<<<<<<<<<<
+ *                     var.set_auto_mask(value)
+ * 
+ */
+      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
+        if (likely(__pyx_t_3)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+          __Pyx_INCREF(__pyx_t_3);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_6, function);
+        }
+      }
+      if (__pyx_t_3) {
+        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      } else {
+        __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
+        __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = 0;
+        __pyx_t_11 = NULL;
+      } else {
+        __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      for (;;) {
+        if (likely(!__pyx_t_11)) {
+          if (likely(PyList_CheckExact(__pyx_t_6))) {
+            if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          } else {
+            if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          }
+        } else {
+          __pyx_t_7 = __pyx_t_11(__pyx_t_6);
+          if (unlikely(!__pyx_t_7)) {
+            PyObject* exc_type = PyErr_Occurred();
+            if (exc_type) {
+              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            break;
+          }
+          __Pyx_GOTREF(__pyx_t_7);
+        }
+        __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_7);
+        __pyx_t_7 = 0;
+
+        /* "netCDF4.pyx":2041
+ *             for group in groups:
+ *                 for var in group.variables.values():
+ *                     var.set_auto_mask(value)             # <<<<<<<<<<<<<<
+ * 
+ *     def set_auto_scale(self, value):
+ */
+        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_mask); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_12 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
+          if (likely(__pyx_t_12)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+            __Pyx_INCREF(__pyx_t_12);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_3, function);
+          }
+        }
+        if (!__pyx_t_12) {
+          __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+        } else {
+          __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_13);
+          PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = NULL;
+          __Pyx_INCREF(__pyx_v_value);
+          PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_value);
+          __Pyx_GIVEREF(__pyx_v_value);
+          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+        /* "netCDF4.pyx":2040
+ *         for groups in _walk_grps(self):
+ *             for group in groups:
+ *                 for var in group.variables.values():             # <<<<<<<<<<<<<<
+ *                     var.set_auto_mask(value)
+ * 
+ */
+      }
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+      /* "netCDF4.pyx":2039
+ * 
+ *         for groups in _walk_grps(self):
+ *             for group in groups:             # <<<<<<<<<<<<<<
+ *                 for var in group.variables.values():
+ *                     var.set_auto_mask(value)
+ */
+    }
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+    /* "netCDF4.pyx":2038
+ *             var.set_auto_mask(value)
+ * 
+ *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
+ *             for group in groups:
+ *                 for var in group.variables.values():
+ */
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":2017
+ * 
+ * 
+ *     def set_auto_mask(self, value):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_mask(self, True_or_False)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_12);
+  __Pyx_XDECREF(__pyx_t_13);
+  __Pyx_AddTraceback("netCDF4.Dataset.set_auto_mask", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_var);
+  __Pyx_XDECREF(__pyx_v_groups);
+  __Pyx_XDECREF(__pyx_v_group);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2043
+ *                     var.set_auto_mask(value)
+ * 
+ *     def set_auto_scale(self, value):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_scale(self, True_or_False)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_65set_auto_scale(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static char __pyx_doc_7netCDF4_7Dataset_64set_auto_scale[] = "\nset_auto_scale(self, True_or_False)\n\nCall L{set_auto_scale} for all variables contained in this L{Dataset} or\nL{Group}, as well as for all variables in all its subgroups.\n\nB{Parameters}:\n\nB{C{True_or_False}} - Boolean determining if automatic variable scaling\nshall be applied for all variables.\n\nB{Notes}:\n\nCalling this function only affects existing variables. Variables created\nafter calling this function will f [...]
+static PyObject *__pyx_pw_7netCDF4_7Dataset_65set_auto_scale(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("set_auto_scale (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_64set_auto_scale(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_64set_auto_scale(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  PyObject *__pyx_v_var = NULL;
+  PyObject *__pyx_v_groups = NULL;
+  PyObject *__pyx_v_group = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  Py_ssize_t __pyx_t_4;
+  PyObject *(*__pyx_t_5)(PyObject *);
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  Py_ssize_t __pyx_t_8;
+  PyObject *(*__pyx_t_9)(PyObject *);
+  Py_ssize_t __pyx_t_10;
+  PyObject *(*__pyx_t_11)(PyObject *);
+  PyObject *__pyx_t_12 = NULL;
+  PyObject *__pyx_t_13 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("set_auto_scale", 0);
+
+  /* "netCDF4.pyx":2061
+ *         """
+ * 
+ *         for var in self.variables.values():             # <<<<<<<<<<<<<<
+ *             var.set_auto_scale(value)
+ * 
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
+  } else {
+    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_5)) {
+      if (likely(PyList_CheckExact(__pyx_t_2))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_1 = __pyx_t_5(__pyx_t_2);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2062
+ * 
+ *         for var in self.variables.values():
+ *             var.set_auto_scale(value)             # <<<<<<<<<<<<<<
+ * 
+ *         for groups in _walk_grps(self):
+ */
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_scale); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_6 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_6)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_6);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (!__pyx_t_6) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+      __Pyx_INCREF(__pyx_v_value);
+      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_value);
+      __Pyx_GIVEREF(__pyx_v_value);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2061
+ *         """
+ * 
+ *         for var in self.variables.values():             # <<<<<<<<<<<<<<
+ *             var.set_auto_scale(value)
+ * 
+ */
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":2064
+ *             var.set_auto_scale(value)
+ * 
+ *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
+ *             for group in groups:
+ *                 for var in group.variables.values():
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+    }
+  }
+  if (!__pyx_t_3) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+  } else {
+    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+    __Pyx_INCREF(((PyObject *)__pyx_v_self));
+    PyTuple_SET_ITEM(__pyx_t_7, 0+1, ((PyObject *)__pyx_v_self));
+    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
+  } else {
+    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_5)) {
+      if (likely(PyList_CheckExact(__pyx_t_1))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_2 = __pyx_t_5(__pyx_t_1);
+      if (unlikely(!__pyx_t_2)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_groups, __pyx_t_2);
+    __pyx_t_2 = 0;
+
+    /* "netCDF4.pyx":2065
+ * 
+ *         for groups in _walk_grps(self):
+ *             for group in groups:             # <<<<<<<<<<<<<<
+ *                 for var in group.variables.values():
+ *                     var.set_auto_scale(value)
+ */
+    if (likely(PyList_CheckExact(__pyx_v_groups)) || PyTuple_CheckExact(__pyx_v_groups)) {
+      __pyx_t_2 = __pyx_v_groups; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
+      __pyx_t_9 = NULL;
+    } else {
+      __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_groups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    for (;;) {
+      if (likely(!__pyx_t_9)) {
+        if (likely(PyList_CheckExact(__pyx_t_2))) {
+          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        }
+      } else {
+        __pyx_t_7 = __pyx_t_9(__pyx_t_2);
+        if (unlikely(!__pyx_t_7)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_7);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_7);
+      __pyx_t_7 = 0;
+
+      /* "netCDF4.pyx":2066
+ *         for groups in _walk_grps(self):
+ *             for group in groups:
+ *                 for var in group.variables.values():             # <<<<<<<<<<<<<<
+ *                     var.set_auto_scale(value)
+ * 
+ */
+      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
+        if (likely(__pyx_t_3)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+          __Pyx_INCREF(__pyx_t_3);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_6, function);
+        }
+      }
+      if (__pyx_t_3) {
+        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      } else {
+        __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
+        __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = 0;
+        __pyx_t_11 = NULL;
+      } else {
+        __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      for (;;) {
+        if (likely(!__pyx_t_11)) {
+          if (likely(PyList_CheckExact(__pyx_t_6))) {
+            if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          } else {
+            if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          }
+        } else {
+          __pyx_t_7 = __pyx_t_11(__pyx_t_6);
+          if (unlikely(!__pyx_t_7)) {
+            PyObject* exc_type = PyErr_Occurred();
+            if (exc_type) {
+              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            break;
+          }
+          __Pyx_GOTREF(__pyx_t_7);
+        }
+        __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_7);
+        __pyx_t_7 = 0;
+
+        /* "netCDF4.pyx":2067
+ *             for group in groups:
+ *                 for var in group.variables.values():
+ *                     var.set_auto_scale(value)             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_scale); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_12 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
+          if (likely(__pyx_t_12)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+            __Pyx_INCREF(__pyx_t_12);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_3, function);
+          }
+        }
+        if (!__pyx_t_12) {
+          __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+        } else {
+          __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_13);
+          PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = NULL;
+          __Pyx_INCREF(__pyx_v_value);
+          PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_value);
+          __Pyx_GIVEREF(__pyx_v_value);
+          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+        /* "netCDF4.pyx":2066
+ *         for groups in _walk_grps(self):
+ *             for group in groups:
+ *                 for var in group.variables.values():             # <<<<<<<<<<<<<<
+ *                     var.set_auto_scale(value)
+ * 
+ */
+      }
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+      /* "netCDF4.pyx":2065
+ * 
+ *         for groups in _walk_grps(self):
+ *             for group in groups:             # <<<<<<<<<<<<<<
+ *                 for var in group.variables.values():
+ *                     var.set_auto_scale(value)
+ */
+    }
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+    /* "netCDF4.pyx":2064
+ *             var.set_auto_scale(value)
+ * 
+ *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
+ *             for group in groups:
+ *                 for var in group.variables.values():
+ */
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":2043
+ *                     var.set_auto_mask(value)
+ * 
+ *     def set_auto_scale(self, value):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_scale(self, True_or_False)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_12);
+  __Pyx_XDECREF(__pyx_t_13);
+  __Pyx_AddTraceback("netCDF4.Dataset.set_auto_scale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_var);
+  __Pyx_XDECREF(__pyx_v_groups);
+  __Pyx_XDECREF(__pyx_v_group);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1402
+ * L{Group} instance. C{None} for a the root group or L{Dataset} instance"""
+ *     cdef object __weakref__
+ *     cdef public int _grpid             # <<<<<<<<<<<<<<
+ *     cdef public int _isopen
+ *     cdef public groups, dimensions, variables, disk_format, path, parent,\
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_6_grpid_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_6_grpid_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6_grpid___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_6_grpid___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Dataset._grpid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_6_grpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_6_grpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6_grpid_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_6_grpid_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_grpid = __pyx_t_1;
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4.Dataset._grpid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1403
+ *     cdef object __weakref__
+ *     cdef public int _grpid
+ *     cdef public int _isopen             # <<<<<<<<<<<<<<
+ *     cdef public groups, dimensions, variables, disk_format, path, parent,\
+ *     file_format, data_model, cmptypes, vltypes, keepweakref
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_7_isopen_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_7_isopen_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_7_isopen___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_7_isopen___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_isopen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Dataset._isopen.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_7_isopen_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_7_isopen_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_7_isopen_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_7_isopen_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_isopen = __pyx_t_1;
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4.Dataset._isopen.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1404
+ *     cdef public int _grpid
+ *     cdef public int _isopen
+ *     cdef public groups, dimensions, variables, disk_format, path, parent,\             # <<<<<<<<<<<<<<
+ *     file_format, data_model, cmptypes, vltypes, keepweakref
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_6groups_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_6groups_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6groups___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_6groups___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->groups);
+  __pyx_r = __pyx_v_self->groups;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_6groups_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_6groups_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6groups_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_6groups_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->groups);
+  __Pyx_DECREF(__pyx_v_self->groups);
+  __pyx_v_self->groups = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_6groups_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_6groups_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6groups_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_6groups_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->groups);
+  __Pyx_DECREF(__pyx_v_self->groups);
+  __pyx_v_self->groups = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_10dimensions_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_10dimensions_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_10dimensions___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_10dimensions___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->dimensions);
+  __pyx_r = __pyx_v_self->dimensions;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_10dimensions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_10dimensions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_10dimensions_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_10dimensions_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->dimensions);
+  __Pyx_DECREF(__pyx_v_self->dimensions);
+  __pyx_v_self->dimensions = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_10dimensions_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_10dimensions_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_10dimensions_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_10dimensions_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->dimensions);
+  __Pyx_DECREF(__pyx_v_self->dimensions);
+  __pyx_v_self->dimensions = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_9variables_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_9variables_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_9variables___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_9variables___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->variables);
+  __pyx_r = __pyx_v_self->variables;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_9variables_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_9variables_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_9variables_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_9variables_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->variables);
+  __Pyx_DECREF(__pyx_v_self->variables);
+  __pyx_v_self->variables = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_9variables_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_9variables_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_9variables_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_9variables_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->variables);
+  __Pyx_DECREF(__pyx_v_self->variables);
+  __pyx_v_self->variables = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_11disk_format_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_11disk_format_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11disk_format___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_11disk_format___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->disk_format);
+  __pyx_r = __pyx_v_self->disk_format;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_11disk_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_11disk_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11disk_format_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_11disk_format_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->disk_format);
+  __Pyx_DECREF(__pyx_v_self->disk_format);
+  __pyx_v_self->disk_format = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_11disk_format_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_11disk_format_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11disk_format_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_11disk_format_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->disk_format);
+  __Pyx_DECREF(__pyx_v_self->disk_format);
+  __pyx_v_self->disk_format = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_4path_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_4path_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_4path___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_4path___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->path);
+  __pyx_r = __pyx_v_self->path;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_4path_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_4path_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_4path_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_4path_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->path);
+  __Pyx_DECREF(__pyx_v_self->path);
+  __pyx_v_self->path = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_4path_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_4path_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_4path_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_4path_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->path);
+  __Pyx_DECREF(__pyx_v_self->path);
+  __pyx_v_self->path = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_6parent_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_6parent_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6parent___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_6parent___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->parent);
+  __pyx_r = __pyx_v_self->parent;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_6parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_6parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6parent_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_6parent_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->parent);
+  __Pyx_DECREF(__pyx_v_self->parent);
+  __pyx_v_self->parent = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_6parent_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_6parent_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6parent_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_6parent_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->parent);
+  __Pyx_DECREF(__pyx_v_self->parent);
+  __pyx_v_self->parent = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":1405
+ *     cdef public int _isopen
+ *     cdef public groups, dimensions, variables, disk_format, path, parent,\
+ *     file_format, data_model, cmptypes, vltypes, keepweakref             # <<<<<<<<<<<<<<
+ * 
+ *     def __init__(self, filename, mode='r', clobber=True, format='NETCDF4',
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_11file_format_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_11file_format_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11file_format___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_11file_format___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->file_format);
+  __pyx_r = __pyx_v_self->file_format;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_11file_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_11file_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11file_format_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_11file_format_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->file_format);
+  __Pyx_DECREF(__pyx_v_self->file_format);
+  __pyx_v_self->file_format = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_11file_format_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_11file_format_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11file_format_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_11file_format_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->file_format);
+  __Pyx_DECREF(__pyx_v_self->file_format);
+  __pyx_v_self->file_format = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_10data_model_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_10data_model_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_10data_model___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_10data_model___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->data_model);
+  __pyx_r = __pyx_v_self->data_model;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_10data_model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_10data_model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_10data_model_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_10data_model_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->data_model);
+  __Pyx_DECREF(__pyx_v_self->data_model);
+  __pyx_v_self->data_model = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_10data_model_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_10data_model_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_10data_model_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_10data_model_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->data_model);
+  __Pyx_DECREF(__pyx_v_self->data_model);
+  __pyx_v_self->data_model = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_8cmptypes_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_8cmptypes_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_8cmptypes___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_8cmptypes___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->cmptypes);
+  __pyx_r = __pyx_v_self->cmptypes;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_8cmptypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_8cmptypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_8cmptypes_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_8cmptypes_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->cmptypes);
+  __Pyx_DECREF(__pyx_v_self->cmptypes);
+  __pyx_v_self->cmptypes = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_8cmptypes_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_8cmptypes_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_8cmptypes_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_8cmptypes_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->cmptypes);
+  __Pyx_DECREF(__pyx_v_self->cmptypes);
+  __pyx_v_self->cmptypes = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_7vltypes_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_7vltypes_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_7vltypes___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_7vltypes___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->vltypes);
+  __pyx_r = __pyx_v_self->vltypes;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_7vltypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_7vltypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_7vltypes_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_7vltypes_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->vltypes);
+  __Pyx_DECREF(__pyx_v_self->vltypes);
+  __pyx_v_self->vltypes = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_7vltypes_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_7vltypes_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_7vltypes_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_7vltypes_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->vltypes);
+  __Pyx_DECREF(__pyx_v_self->vltypes);
+  __pyx_v_self->vltypes = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_7Dataset_11keepweakref_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_7Dataset_11keepweakref_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11keepweakref___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_7Dataset_11keepweakref___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->keepweakref);
+  __pyx_r = __pyx_v_self->keepweakref;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_11keepweakref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_11keepweakref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11keepweakref_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_11keepweakref_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->keepweakref);
+  __Pyx_DECREF(__pyx_v_self->keepweakref);
+  __pyx_v_self->keepweakref = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_7Dataset_11keepweakref_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_7Dataset_11keepweakref_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11keepweakref_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_7Dataset_11keepweakref_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->keepweakref);
+  __Pyx_DECREF(__pyx_v_self->keepweakref);
+  __pyx_v_self->keepweakref = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2098
+ * variables are available to a L{Group} instance (except the C{close}
+ * method)."""
+ *     def __init__(self, parent, name, **kwargs):             # <<<<<<<<<<<<<<
+ *         cdef int ierr
+ *         cdef char *groupname
+ */
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_5Group_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_7netCDF4_5Group_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_parent = 0;
+  PyObject *__pyx_v_name = 0;
+  PyObject *__pyx_v_kwargs = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+  __Pyx_GOTREF(__pyx_v_kwargs);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_name,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parent)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_parent = values[0];
+    __pyx_v_name = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("netCDF4.Group.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_5Group___init__(((struct __pyx_obj_7netCDF4_Group *)__pyx_v_self), __pyx_v_parent, __pyx_v_name, __pyx_v_kwargs);
+
+  /* function exit code */
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_5Group___init__(struct __pyx_obj_7netCDF4_Group *__pyx_v_self, PyObject *__pyx_v_parent, PyObject *__pyx_v_name, PyObject *__pyx_v_kwargs) {
+  int __pyx_v_ierr;
+  char *__pyx_v_groupname;
+  PyObject *__pyx_v_bytestr = NULL;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  Py_ssize_t __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_t_7;
+  int __pyx_t_8;
+  int __pyx_t_9;
+  PyObject *(*__pyx_t_10)(PyObject *);
+  char *__pyx_t_11;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__init__", 0);
+
+  /* "netCDF4.pyx":2102
+ *         cdef char *groupname
+ *         # set data_model and file_format attributes.
+ *         self.data_model = parent.data_model             # <<<<<<<<<<<<<<
+ *         self.file_format = parent.file_format
+ *         # full path to Group.
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __Pyx_GOTREF(__pyx_v_self->__pyx_base.data_model);
+  __Pyx_DECREF(__pyx_v_self->__pyx_base.data_model);
+  __pyx_v_self->__pyx_base.data_model = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":2103
+ *         # set data_model and file_format attributes.
+ *         self.data_model = parent.data_model
+ *         self.file_format = parent.file_format             # <<<<<<<<<<<<<<
+ *         # full path to Group.
+ *         self.path = posixpath.join(parent.path, name)
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_file_format_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __Pyx_GOTREF(__pyx_v_self->__pyx_base.file_format);
+  __Pyx_DECREF(__pyx_v_self->__pyx_base.file_format);
+  __pyx_v_self->__pyx_base.file_format = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":2105
+ *         self.file_format = parent.file_format
+ *         # full path to Group.
+ *         self.path = posixpath.join(parent.path, name)             # <<<<<<<<<<<<<<
+ *         # parent group.
+ *         self.parent = parent
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_path_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4 = NULL;
+  __pyx_t_5 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+      __pyx_t_5 = 1;
+    }
+  }
+  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if (__pyx_t_4) {
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+  }
+  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __Pyx_INCREF(__pyx_v_name);
+  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_name);
+  __Pyx_GIVEREF(__pyx_v_name);
+  __pyx_t_2 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_GIVEREF(__pyx_t_1);
+  __Pyx_GOTREF(__pyx_v_self->__pyx_base.path);
+  __Pyx_DECREF(__pyx_v_self->__pyx_base.path);
+  __pyx_v_self->__pyx_base.path = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":2107
+ *         self.path = posixpath.join(parent.path, name)
+ *         # parent group.
+ *         self.parent = parent             # <<<<<<<<<<<<<<
+ *         # propagate weak reference setting from parent.
+ *         self.keepweakref = parent.keepweakref
+ */
+  __Pyx_INCREF(__pyx_v_parent);
+  __Pyx_GIVEREF(__pyx_v_parent);
+  __Pyx_GOTREF(__pyx_v_self->__pyx_base.parent);
+  __Pyx_DECREF(__pyx_v_self->__pyx_base.parent);
+  __pyx_v_self->__pyx_base.parent = __pyx_v_parent;
+
+  /* "netCDF4.pyx":2109
+ *         self.parent = parent
+ *         # propagate weak reference setting from parent.
+ *         self.keepweakref = parent.keepweakref             # <<<<<<<<<<<<<<
+ *         if 'id' in kwargs:
+ *             self._grpid = kwargs['id']
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_keepweakref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __Pyx_GOTREF(__pyx_v_self->__pyx_base.keepweakref);
+  __Pyx_DECREF(__pyx_v_self->__pyx_base.keepweakref);
+  __pyx_v_self->__pyx_base.keepweakref = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":2110
+ *         # propagate weak reference setting from parent.
+ *         self.keepweakref = parent.keepweakref
+ *         if 'id' in kwargs:             # <<<<<<<<<<<<<<
+ *             self._grpid = kwargs['id']
+ *             # get compound and vlen types in this Group.
+ */
+  __pyx_t_7 = (__Pyx_PyDict_Contains(__pyx_n_s_id, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = (__pyx_t_7 != 0);
+  if (__pyx_t_8) {
+
+    /* "netCDF4.pyx":2111
+ *         self.keepweakref = parent.keepweakref
+ *         if 'id' in kwargs:
+ *             self._grpid = kwargs['id']             # <<<<<<<<<<<<<<
+ *             # get compound and vlen types in this Group.
+ *             self.cmptypes, self.vltypes = _get_types(self)
+ */
+    __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_id); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_self->__pyx_base._grpid = __pyx_t_9;
+
+    /* "netCDF4.pyx":2113
+ *             self._grpid = kwargs['id']
+ *             # get compound and vlen types in this Group.
+ *             self.cmptypes, self.vltypes = _get_types(self)             # <<<<<<<<<<<<<<
+ *             # get dimensions in this Group.
+ *             self.dimensions = _get_dims(self)
+ */
+    __pyx_t_1 = __pyx_f_7netCDF4__get_types(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+      PyObject* sequence = __pyx_t_1;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
+      } else {
+        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
+      }
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_6);
+      #else
+      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      #endif
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext;
+      index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_3);
+      index = 1; __pyx_t_6 = __pyx_t_10(__pyx_t_2); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_6);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_2), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_10 = NULL;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      goto __pyx_L5_unpacking_done;
+      __pyx_L4_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_10 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L5_unpacking_done:;
+    }
+    __Pyx_GIVEREF(__pyx_t_3);
+    __Pyx_GOTREF(__pyx_v_self->__pyx_base.cmptypes);
+    __Pyx_DECREF(__pyx_v_self->__pyx_base.cmptypes);
+    __pyx_v_self->__pyx_base.cmptypes = __pyx_t_3;
+    __pyx_t_3 = 0;
+    __Pyx_GIVEREF(__pyx_t_6);
+    __Pyx_GOTREF(__pyx_v_self->__pyx_base.vltypes);
+    __Pyx_DECREF(__pyx_v_self->__pyx_base.vltypes);
+    __pyx_v_self->__pyx_base.vltypes = __pyx_t_6;
+    __pyx_t_6 = 0;
+
+    /* "netCDF4.pyx":2115
+ *             self.cmptypes, self.vltypes = _get_types(self)
+ *             # get dimensions in this Group.
+ *             self.dimensions = _get_dims(self)             # <<<<<<<<<<<<<<
+ *             # get variables in this Group.
+ *             self.variables = _get_vars(self)
+ */
+    __pyx_t_1 = __pyx_f_7netCDF4__get_dims(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_GOTREF(__pyx_v_self->__pyx_base.dimensions);
+    __Pyx_DECREF(__pyx_v_self->__pyx_base.dimensions);
+    __pyx_v_self->__pyx_base.dimensions = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2117
+ *             self.dimensions = _get_dims(self)
+ *             # get variables in this Group.
+ *             self.variables = _get_vars(self)             # <<<<<<<<<<<<<<
+ *             # get groups in this Group.
+ *             self.groups = _get_grps(self)
+ */
+    __pyx_t_1 = __pyx_f_7netCDF4__get_vars(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_GOTREF(__pyx_v_self->__pyx_base.variables);
+    __Pyx_DECREF(__pyx_v_self->__pyx_base.variables);
+    __pyx_v_self->__pyx_base.variables = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2119
+ *             self.variables = _get_vars(self)
+ *             # get groups in this Group.
+ *             self.groups = _get_grps(self)             # <<<<<<<<<<<<<<
+ *         else:
+ *             bytestr = _strencode(name)
+ */
+    __pyx_t_1 = __pyx_f_7netCDF4__get_grps(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_GOTREF(__pyx_v_self->__pyx_base.groups);
+    __Pyx_DECREF(__pyx_v_self->__pyx_base.groups);
+    __pyx_v_self->__pyx_base.groups = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":2121
+ *             self.groups = _get_grps(self)
+ *         else:
+ *             bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *             groupname = bytestr
+ *             ierr = nc_def_grp(parent._grpid, groupname, &self._grpid)
+ */
+    __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_v_bytestr = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2122
+ *         else:
+ *             bytestr = _strencode(name)
+ *             groupname = bytestr             # <<<<<<<<<<<<<<
+ *             ierr = nc_def_grp(parent._grpid, groupname, &self._grpid)
+ *             if ierr != NC_NOERR:
+ */
+    __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_groupname = __pyx_t_11;
+
+    /* "netCDF4.pyx":2123
+ *             bytestr = _strencode(name)
+ *             groupname = bytestr
+ *             ierr = nc_def_grp(parent._grpid, groupname, &self._grpid)             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_ierr = nc_def_grp(__pyx_t_9, __pyx_v_groupname, (&__pyx_v_self->__pyx_base._grpid));
+
+    /* "netCDF4.pyx":2124
+ *             groupname = bytestr
+ *             ierr = nc_def_grp(parent._grpid, groupname, &self._grpid)
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             self.cmptypes = OrderedDict()
+ */
+    __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_8) {
+
+      /* "netCDF4.pyx":2125
+ *             ierr = nc_def_grp(parent._grpid, groupname, &self._grpid)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             self.cmptypes = OrderedDict()
+ *             self.vltypes = OrderedDict()
+ */
+      __pyx_t_11 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_11, 0, strlen(__pyx_t_11), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":2126
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             self.cmptypes = OrderedDict()             # <<<<<<<<<<<<<<
+ *             self.vltypes = OrderedDict()
+ *             self.dimensions = OrderedDict()
+ */
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_3 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
+      if (likely(__pyx_t_3)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_3);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_6, function);
+      }
+    }
+    if (__pyx_t_3) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_GOTREF(__pyx_v_self->__pyx_base.cmptypes);
+    __Pyx_DECREF(__pyx_v_self->__pyx_base.cmptypes);
+    __pyx_v_self->__pyx_base.cmptypes = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2127
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             self.cmptypes = OrderedDict()
+ *             self.vltypes = OrderedDict()             # <<<<<<<<<<<<<<
+ *             self.dimensions = OrderedDict()
+ *             self.variables = OrderedDict()
+ */
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_3 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
+      if (likely(__pyx_t_3)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_3);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_6, function);
+      }
+    }
+    if (__pyx_t_3) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_GOTREF(__pyx_v_self->__pyx_base.vltypes);
+    __Pyx_DECREF(__pyx_v_self->__pyx_base.vltypes);
+    __pyx_v_self->__pyx_base.vltypes = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2128
+ *             self.cmptypes = OrderedDict()
+ *             self.vltypes = OrderedDict()
+ *             self.dimensions = OrderedDict()             # <<<<<<<<<<<<<<
+ *             self.variables = OrderedDict()
+ *             self.groups = OrderedDict()
+ */
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_3 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
+      if (likely(__pyx_t_3)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_3);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_6, function);
+      }
+    }
+    if (__pyx_t_3) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_GOTREF(__pyx_v_self->__pyx_base.dimensions);
+    __Pyx_DECREF(__pyx_v_self->__pyx_base.dimensions);
+    __pyx_v_self->__pyx_base.dimensions = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2129
+ *             self.vltypes = OrderedDict()
+ *             self.dimensions = OrderedDict()
+ *             self.variables = OrderedDict()             # <<<<<<<<<<<<<<
+ *             self.groups = OrderedDict()
+ * 
+ */
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_3 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
+      if (likely(__pyx_t_3)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_3);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_6, function);
+      }
+    }
+    if (__pyx_t_3) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_GOTREF(__pyx_v_self->__pyx_base.variables);
+    __Pyx_DECREF(__pyx_v_self->__pyx_base.variables);
+    __pyx_v_self->__pyx_base.variables = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2130
+ *             self.dimensions = OrderedDict()
+ *             self.variables = OrderedDict()
+ *             self.groups = OrderedDict()             # <<<<<<<<<<<<<<
+ * 
+ *     def close(self):
+ */
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_3 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
+      if (likely(__pyx_t_3)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_3);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_6, function);
+      }
+    }
+    if (__pyx_t_3) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_GOTREF(__pyx_v_self->__pyx_base.groups);
+    __Pyx_DECREF(__pyx_v_self->__pyx_base.groups);
+    __pyx_v_self->__pyx_base.groups = __pyx_t_1;
+    __pyx_t_1 = 0;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":2098
+ * variables are available to a L{Group} instance (except the C{close}
+ * method)."""
+ *     def __init__(self, parent, name, **kwargs):             # <<<<<<<<<<<<<<
+ *         cdef int ierr
+ *         cdef char *groupname
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netCDF4.Group.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_bytestr);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2132
+ *             self.groups = OrderedDict()
+ * 
+ *     def close(self):             # <<<<<<<<<<<<<<
+ *         """
+ * close(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_5Group_3close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_5Group_2close[] = "\nclose(self)\n\noverrides L{Dataset} close method which does not apply to L{Group} \ninstances, raises IOError.";
+static PyObject *__pyx_pw_7netCDF4_5Group_3close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("close (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_5Group_2close(((struct __pyx_obj_7netCDF4_Group *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_5Group_2close(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Group *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("close", 0);
+
+  /* "netCDF4.pyx":2138
+ * overrides L{Dataset} close method which does not apply to L{Group}
+ * instances, raises IOError."""
+ *         raise IOError('cannot close a L{Group} (only applies to Dataset)')             # <<<<<<<<<<<<<<
+ * 
+ *     def _getname(self):
+ */
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":2132
+ *             self.groups = OrderedDict()
+ * 
+ *     def close(self):             # <<<<<<<<<<<<<<
+ *         """
+ * close(self)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Group.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2140
+ *         raise IOError('cannot close a L{Group} (only applies to Dataset)')
+ * 
+ *     def _getname(self):             # <<<<<<<<<<<<<<
+ *         # private method to get name associated with instance.
+ *         cdef int err
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_5Group_5_getname(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_5Group_5_getname(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_getname (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_5Group_4_getname(((struct __pyx_obj_7netCDF4_Group *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_5Group_4_getname(struct __pyx_obj_7netCDF4_Group *__pyx_v_self) {
+  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
+  int __pyx_v_ierr;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  char *__pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  Py_ssize_t __pyx_t_9;
+  PyObject *__pyx_t_10 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_getname", 0);
+
+  /* "netCDF4.pyx":2144
+ *         cdef int err
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         ierr = nc_inq_grpname(self._grp._grpid, namstring)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_grp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_grpid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_ierr = nc_inq_grpname(__pyx_t_3, __pyx_v_namstring);
+
+  /* "netCDF4.pyx":2145
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         ierr = nc_inq_grpname(self._grp._grpid, namstring)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         return namstring.decode(default_encoding,unicode_error)
+ */
+  __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_4) {
+
+    /* "netCDF4.pyx":2146
+ *         ierr = nc_inq_grpname(self._grp._grpid, namstring)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         return namstring.decode(default_encoding,unicode_error)
+ * 
+ */
+    __pyx_t_5 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":2147
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         return namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+ * 
+ *     property name:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_8 = NULL;
+  __pyx_t_9 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_8)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_8);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+      __pyx_t_9 = 1;
+    }
+  }
+  __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  if (__pyx_t_8) {
+    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+  }
+  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
+  __Pyx_GIVEREF(__pyx_t_7);
+  __pyx_t_1 = 0;
+  __pyx_t_7 = 0;
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2140
+ *         raise IOError('cannot close a L{Group} (only applies to Dataset)')
+ * 
+ *     def _getname(self):             # <<<<<<<<<<<<<<
+ *         # private method to get name associated with instance.
+ *         cdef int err
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4.Group._getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2151
+ *     property name:
+ *         """string name of Group instance"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._getname()
+ *         def __set__(self,value):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_5Group_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_5Group_4name_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_5Group_4name___get__(((struct __pyx_obj_7netCDF4_Group *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_5Group_4name___get__(struct __pyx_obj_7netCDF4_Group *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+
+  /* "netCDF4.pyx":2152
+ *         """string name of Group instance"""
+ *         def __get__(self):
+ *             return self._getname()             # <<<<<<<<<<<<<<
+ *         def __set__(self,value):
+ *             raise AttributeError("name cannot be altered")
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2151
+ *     property name:
+ *         """string name of Group instance"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._getname()
+ *         def __set__(self,value):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4.Group.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2153
+ *         def __get__(self):
+ *             return self._getname()
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("name cannot be altered")
+ * 
+ */
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_5Group_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_5Group_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_5Group_4name_2__set__(((struct __pyx_obj_7netCDF4_Group *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_5Group_4name_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Group *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__set__", 0);
+
+  /* "netCDF4.pyx":2154
+ *             return self._getname()
+ *         def __set__(self,value):
+ *             raise AttributeError("name cannot be altered")             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":2153
+ *         def __get__(self):
+ *             return self._getname()
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("name cannot be altered")
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Group.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2189
+ *     cdef public _data_model, _name, _grp
+ * 
+ *     def __init__(self, grp, name, size=None, **kwargs):             # <<<<<<<<<<<<<<
+ *         cdef int ierr
+ *         cdef char *dimname
+ */
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_9Dimension_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_7netCDF4_9Dimension_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_grp = 0;
+  PyObject *__pyx_v_name = 0;
+  PyObject *__pyx_v_size = 0;
+  PyObject *__pyx_v_kwargs = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+  __Pyx_GOTREF(__pyx_v_kwargs);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grp_2,&__pyx_n_s_name,&__pyx_n_s_size,0};
+    PyObject* values[3] = {0,0,0};
+    values[2] = ((PyObject *)Py_None);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grp_2)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
+          if (value) { values[2] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_grp = values[0];
+    __pyx_v_name = values[1];
+    __pyx_v_size = values[2];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("netCDF4.Dimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension___init__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self), __pyx_v_grp, __pyx_v_name, __pyx_v_size, __pyx_v_kwargs);
+
+  /* function exit code */
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_9Dimension___init__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_grp, PyObject *__pyx_v_name, PyObject *__pyx_v_size, PyObject *__pyx_v_kwargs) {
+  int __pyx_v_ierr;
+  char *__pyx_v_dimname;
+  size_t __pyx_v_lendim;
+  PyObject *__pyx_v_bytestr = NULL;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_t_7;
+  char *__pyx_t_8;
+  size_t __pyx_t_9;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__init__", 0);
+
+  /* "netCDF4.pyx":2193
+ *         cdef char *dimname
+ *         cdef size_t lendim
+ *         self._grpid = grp._grpid             # <<<<<<<<<<<<<<
+ *         # make a weakref to group to avoid circular ref (issue 218)
+ *         # keep strong reference the default behaviour (issue 251)
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_self->_grpid = __pyx_t_2;
+
+  /* "netCDF4.pyx":2196
+ *         # make a weakref to group to avoid circular ref (issue 218)
+ *         # keep strong reference the default behaviour (issue 251)
+ *         if grp.keepweakref:             # <<<<<<<<<<<<<<
+ *             self._grp = weakref.proxy(grp)
+ *         else:
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_keepweakref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":2197
+ *         # keep strong reference the default behaviour (issue 251)
+ *         if grp.keepweakref:
+ *             self._grp = weakref.proxy(grp)             # <<<<<<<<<<<<<<
+ *         else:
+ *             self._grp = grp
+ */
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_weakref); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_proxy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_5, function);
+      }
+    }
+    if (!__pyx_t_4) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_grp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+      __Pyx_INCREF(__pyx_v_grp);
+      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_grp);
+      __Pyx_GIVEREF(__pyx_v_grp);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_GOTREF(__pyx_v_self->_grp);
+    __Pyx_DECREF(__pyx_v_self->_grp);
+    __pyx_v_self->_grp = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":2199
+ *             self._grp = weakref.proxy(grp)
+ *         else:
+ *             self._grp = grp             # <<<<<<<<<<<<<<
+ *         self._data_model = grp.data_model
+ *         self._name = name
+ */
+    __Pyx_INCREF(__pyx_v_grp);
+    __Pyx_GIVEREF(__pyx_v_grp);
+    __Pyx_GOTREF(__pyx_v_self->_grp);
+    __Pyx_DECREF(__pyx_v_self->_grp);
+    __pyx_v_self->_grp = __pyx_v_grp;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":2200
+ *         else:
+ *             self._grp = grp
+ *         self._data_model = grp.data_model             # <<<<<<<<<<<<<<
+ *         self._name = name
+ *         if 'id' in kwargs:
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __Pyx_GOTREF(__pyx_v_self->_data_model);
+  __Pyx_DECREF(__pyx_v_self->_data_model);
+  __pyx_v_self->_data_model = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":2201
+ *             self._grp = grp
+ *         self._data_model = grp.data_model
+ *         self._name = name             # <<<<<<<<<<<<<<
+ *         if 'id' in kwargs:
+ *             self._dimid = kwargs['id']
+ */
+  __Pyx_INCREF(__pyx_v_name);
+  __Pyx_GIVEREF(__pyx_v_name);
+  __Pyx_GOTREF(__pyx_v_self->_name);
+  __Pyx_DECREF(__pyx_v_self->_name);
+  __pyx_v_self->_name = __pyx_v_name;
+
+  /* "netCDF4.pyx":2202
+ *         self._data_model = grp.data_model
+ *         self._name = name
+ *         if 'id' in kwargs:             # <<<<<<<<<<<<<<
+ *             self._dimid = kwargs['id']
+ *         else:
+ */
+  __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_n_s_id, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = (__pyx_t_3 != 0);
+  if (__pyx_t_7) {
+
+    /* "netCDF4.pyx":2203
+ *         self._name = name
+ *         if 'id' in kwargs:
+ *             self._dimid = kwargs['id']             # <<<<<<<<<<<<<<
+ *         else:
+ *             bytestr = _strencode(name)
+ */
+    __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_id); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2203; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_self->_dimid = __pyx_t_2;
+    goto __pyx_L4;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":2205
+ *             self._dimid = kwargs['id']
+ *         else:
+ *             bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *             dimname = bytestr
+ *             if size is not None:
+ */
+    __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_v_bytestr = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2206
+ *         else:
+ *             bytestr = _strencode(name)
+ *             dimname = bytestr             # <<<<<<<<<<<<<<
+ *             if size is not None:
+ *                 lendim = size
+ */
+    __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_dimname = __pyx_t_8;
+
+    /* "netCDF4.pyx":2207
+ *             bytestr = _strencode(name)
+ *             dimname = bytestr
+ *             if size is not None:             # <<<<<<<<<<<<<<
+ *                 lendim = size
+ *             else:
+ */
+    __pyx_t_7 = (__pyx_v_size != Py_None);
+    __pyx_t_3 = (__pyx_t_7 != 0);
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":2208
+ *             dimname = bytestr
+ *             if size is not None:
+ *                 lendim = size             # <<<<<<<<<<<<<<
+ *             else:
+ *                 lendim = NC_UNLIMITED
+ */
+      __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_lendim = __pyx_t_9;
+      goto __pyx_L5;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":2210
+ *                 lendim = size
+ *             else:
+ *                 lendim = NC_UNLIMITED             # <<<<<<<<<<<<<<
+ *             if grp.data_model != 'NETCDF4': grp._redef()
+ *             ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid)
+ */
+      __pyx_v_lendim = NC_UNLIMITED;
+    }
+    __pyx_L5:;
+
+    /* "netCDF4.pyx":2211
+ *             else:
+ *                 lendim = NC_UNLIMITED
+ *             if grp.data_model != 'NETCDF4': grp._redef()             # <<<<<<<<<<<<<<
+ *             ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid)
+ *             if grp.data_model != 'NETCDF4': grp._enddef()
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_3) {
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_6 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+        if (likely(__pyx_t_6)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+          __Pyx_INCREF(__pyx_t_6);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_5, function);
+        }
+      }
+      if (__pyx_t_6) {
+        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      } else {
+        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+
+    /* "netCDF4.pyx":2212
+ *                 lendim = NC_UNLIMITED
+ *             if grp.data_model != 'NETCDF4': grp._redef()
+ *             ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid)             # <<<<<<<<<<<<<<
+ *             if grp.data_model != 'NETCDF4': grp._enddef()
+ *             if ierr != NC_NOERR:
+ */
+    __pyx_v_ierr = nc_def_dim(__pyx_v_self->_grpid, __pyx_v_dimname, __pyx_v_lendim, (&__pyx_v_self->_dimid));
+
+    /* "netCDF4.pyx":2213
+ *             if grp.data_model != 'NETCDF4': grp._redef()
+ *             ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid)
+ *             if grp.data_model != 'NETCDF4': grp._enddef()             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_3) {
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_6 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+        if (likely(__pyx_t_6)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+          __Pyx_INCREF(__pyx_t_6);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_5, function);
+        }
+      }
+      if (__pyx_t_6) {
+        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      } else {
+        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      goto __pyx_L7;
+    }
+    __pyx_L7:;
+
+    /* "netCDF4.pyx":2214
+ *             ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid)
+ *             if grp.data_model != 'NETCDF4': grp._enddef()
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ */
+    __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":2215
+ *             if grp.data_model != 'NETCDF4': grp._enddef()
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ * 
+ *     def _getname(self):
+ */
+      __pyx_t_8 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_8, 0, strlen(__pyx_t_8), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+  __pyx_L4:;
+
+  /* "netCDF4.pyx":2189
+ *     cdef public _data_model, _name, _grp
+ * 
+ *     def __init__(self, grp, name, size=None, **kwargs):             # <<<<<<<<<<<<<<
+ *         cdef int ierr
+ *         cdef char *dimname
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netCDF4.Dimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_bytestr);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2217
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def _getname(self):             # <<<<<<<<<<<<<<
+ *         # private method to get name associated with instance.
+ *         cdef int err
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9Dimension_3_getname(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_9Dimension_3_getname(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_getname (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_2_getname(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9Dimension_2_getname(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
+  int __pyx_v_ierr;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  char *__pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  Py_ssize_t __pyx_t_9;
+  PyObject *__pyx_t_10 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_getname", 0);
+
+  /* "netCDF4.pyx":2221
+ *         cdef int err
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         ierr = nc_inq_dimname(self._grp._grpid, self._dimid, namstring)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_ierr = nc_inq_dimname(__pyx_t_2, __pyx_v_self->_dimid, __pyx_v_namstring);
+
+  /* "netCDF4.pyx":2222
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         ierr = nc_inq_dimname(self._grp._grpid, self._dimid, namstring)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         return namstring.decode(default_encoding,unicode_error)
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":2223
+ *         ierr = nc_inq_dimname(self._grp._grpid, self._dimid, namstring)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         return namstring.decode(default_encoding,unicode_error)
+ * 
+ */
+    __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":2224
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         return namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+ * 
+ *     property name:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_8 = NULL;
+  __pyx_t_9 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_8)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_8);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+      __pyx_t_9 = 1;
+    }
+  }
+  __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  if (__pyx_t_8) {
+    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+  }
+  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
+  __Pyx_GIVEREF(__pyx_t_7);
+  __pyx_t_5 = 0;
+  __pyx_t_7 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2217
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def _getname(self):             # <<<<<<<<<<<<<<
+ *         # private method to get name associated with instance.
+ *         cdef int err
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4.Dimension._getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2228
+ *     property name:
+ *         """string name of Dimension instance"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._getname()
+ *         def __set__(self,value):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9Dimension_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_9Dimension_4name_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_4name___get__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9Dimension_4name___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+
+  /* "netCDF4.pyx":2229
+ *         """string name of Dimension instance"""
+ *         def __get__(self):
+ *             return self._getname()             # <<<<<<<<<<<<<<
+ *         def __set__(self,value):
+ *             raise AttributeError("name cannot be altered")
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2228
+ *     property name:
+ *         """string name of Dimension instance"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._getname()
+ *         def __set__(self,value):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4.Dimension.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2230
+ *         def __get__(self):
+ *             return self._getname()
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("name cannot be altered")
+ * 
+ */
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_9Dimension_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_9Dimension_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_4name_2__set__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_9Dimension_4name_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__set__", 0);
+
+  /* "netCDF4.pyx":2231
+ *             return self._getname()
+ *         def __set__(self,value):
+ *             raise AttributeError("name cannot be altered")             # <<<<<<<<<<<<<<
+ * 
+ *     def __repr__(self):
+ */
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":2230
+ *         def __get__(self):
+ *             return self._getname()
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("name cannot be altered")
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Dimension.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2233
+ *             raise AttributeError("name cannot be altered")
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *            return self.__unicode__()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9Dimension_5__repr__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_9Dimension_5__repr__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_4__repr__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9Dimension_4__repr__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__repr__", 0);
+
+  /* "netCDF4.pyx":2234
+ * 
+ *     def __repr__(self):
+ *         if python3:             # <<<<<<<<<<<<<<
+ *            return self.__unicode__()
+ *         else:
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":2235
+ *     def __repr__(self):
+ *         if python3:
+ *            return self.__unicode__()             # <<<<<<<<<<<<<<
+ *         else:
+ *            return unicode(self).encode(default_encoding)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":2237
+ *            return self.__unicode__()
+ *         else:
+ *            return unicode(self).encode(default_encoding)             # <<<<<<<<<<<<<<
+ * 
+ *     def __unicode__(self):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_INCREF(((PyObject *)__pyx_v_self));
+    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
+    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (!__pyx_t_5) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
+      __Pyx_GIVEREF(__pyx_t_4);
+      __pyx_t_4 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":2233
+ *             raise AttributeError("name cannot be altered")
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *            return self.__unicode__()
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netCDF4.Dimension.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2239
+ *            return unicode(self).encode(default_encoding)
+ * 
+ *     def __unicode__(self):             # <<<<<<<<<<<<<<
+ *         if not dir(self._grp):
+ *             return 'Dimension object no longer valid'
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9Dimension_7__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_9Dimension_7__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__unicode__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_6__unicode__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9Dimension_6__unicode__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  Py_ssize_t __pyx_t_6;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__unicode__", 0);
+
+  /* "netCDF4.pyx":2240
+ * 
+ *     def __unicode__(self):
+ *         if not dir(self._grp):             # <<<<<<<<<<<<<<
+ *             return 'Dimension object no longer valid'
+ *         if self.isunlimited():
+ */
+  __pyx_t_1 = __pyx_v_self->_grp;
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_Dir(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+
+    /* "netCDF4.pyx":2241
+ *     def __unicode__(self):
+ *         if not dir(self._grp):
+ *             return 'Dimension object no longer valid'             # <<<<<<<<<<<<<<
+ *         if self.isunlimited():
+ *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_kp_s_Dimension_object_no_longer_valid);
+    __pyx_r = __pyx_kp_s_Dimension_object_no_longer_valid;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":2242
+ *         if not dir(self._grp):
+ *             return 'Dimension object no longer valid'
+ *         if self.isunlimited():             # <<<<<<<<<<<<<<
+ *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
+ *         else:
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_5 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_5)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_5);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+    }
+  }
+  if (__pyx_t_5) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  } else {
+    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (__pyx_t_4) {
+
+    /* "netCDF4.pyx":2243
+ *             return 'Dimension object no longer valid'
+ *         if self.isunlimited():
+ *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))             # <<<<<<<<<<<<<<
+ *         else:
+ *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_v_self->_name);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->_name);
+    __Pyx_GIVEREF(__pyx_v_self->_name);
+    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_unlimited_name_s_size_s, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_r = __pyx_t_5;
+    __pyx_t_5 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":2245
+ *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
+ *         else:
+ *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))             # <<<<<<<<<<<<<<
+ * 
+ *     def __len__(self):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_5 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_v_self->_name);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->_name);
+    __Pyx_GIVEREF(__pyx_v_self->_name);
+    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_name_s_size_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyNumber_Add(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":2239
+ *            return unicode(self).encode(default_encoding)
+ * 
+ *     def __unicode__(self):             # <<<<<<<<<<<<<<
+ *         if not dir(self._grp):
+ *             return 'Dimension object no longer valid'
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("netCDF4.Dimension.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2247
+ *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
+ * 
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         # len(L{Dimension} instance) returns current size of dimension
+ *         cdef int ierr
+ */
+
+/* Python wrapper */
+static Py_ssize_t __pyx_pw_7netCDF4_9Dimension_9__len__(PyObject *__pyx_v_self); /*proto*/
+static Py_ssize_t __pyx_pw_7netCDF4_9Dimension_9__len__(PyObject *__pyx_v_self) {
+  Py_ssize_t __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_8__len__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static Py_ssize_t __pyx_pf_7netCDF4_9Dimension_8__len__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+  int __pyx_v_ierr;
+  size_t __pyx_v_lengthp;
+  Py_ssize_t __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  char *__pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__len__", 0);
+
+  /* "netCDF4.pyx":2251
+ *         cdef int ierr
+ *         cdef size_t lengthp
+ *         ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_v_ierr = nc_inq_dimlen(__pyx_v_self->_grpid, __pyx_v_self->_dimid, (&__pyx_v_lengthp));
+
+  /* "netCDF4.pyx":2252
+ *         cdef size_t lengthp
+ *         ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         return lengthp
+ */
+  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":2253
+ *         ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         return lengthp
+ * 
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":2254
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         return lengthp             # <<<<<<<<<<<<<<
+ * 
+ *     def group(self):
+ */
+  __pyx_r = __pyx_v_lengthp;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2247
+ *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
+ * 
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         # len(L{Dimension} instance) returns current size of dimension
+ *         cdef int ierr
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4.Dimension.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2256
+ *         return lengthp
+ * 
+ *     def group(self):             # <<<<<<<<<<<<<<
+ *         """
+ * group(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9Dimension_11group(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_9Dimension_10group[] = "\ngroup(self)\n\nreturn the group that this L{Dimension} is a member of.";
+static PyObject *__pyx_pw_7netCDF4_9Dimension_11group(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("group (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_10group(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9Dimension_10group(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("group", 0);
+
+  /* "netCDF4.pyx":2261
+ * 
+ * return the group that this L{Dimension} is a member of."""
+ *         return self._grp             # <<<<<<<<<<<<<<
+ * 
+ *     def isunlimited(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_grp);
+  __pyx_r = __pyx_v_self->_grp;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2256
+ *         return lengthp
+ * 
+ *     def group(self):             # <<<<<<<<<<<<<<
+ *         """
+ * group(self)
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2263
+ *         return self._grp
+ * 
+ *     def isunlimited(self):             # <<<<<<<<<<<<<<
+ *         """
+ * isunlimited(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9Dimension_13isunlimited(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_9Dimension_12isunlimited[] = "\nisunlimited(self)\n\nreturns C{True} if the L{Dimension} instance is unlimited, C{False} otherwise.";
+static PyObject *__pyx_pw_7netCDF4_9Dimension_13isunlimited(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("isunlimited (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_12isunlimited(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9Dimension_12isunlimited(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+  int __pyx_v_ierr;
+  int __pyx_v_n;
+  int __pyx_v_numunlimdims;
+  int __pyx_v_ndims;
+  int __pyx_v_nvars;
+  int __pyx_v_ngatts;
+  int __pyx_v_xdimid;
+  int __pyx_v_unlimdimids[NC_MAX_DIMS];
+  int __pyx_v_dimid;
+  PyObject *__pyx_v_unlimdim_ids = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  char *__pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  int __pyx_t_6;
+  int __pyx_t_7;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("isunlimited", 0);
+
+  /* "netCDF4.pyx":2270
+ *         cdef int ierr, n, numunlimdims, ndims, nvars, ngatts, xdimid
+ *         cdef int unlimdimids[NC_MAX_DIMS]
+ *         if self._data_model == 'NETCDF4':             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, NULL)
+ *             if ierr != NC_NOERR:
+ */
+  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->_data_model, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":2271
+ *         cdef int unlimdimids[NC_MAX_DIMS]
+ *         if self._data_model == 'NETCDF4':
+ *             ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, NULL)             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+    __pyx_v_ierr = nc_inq_unlimdims(__pyx_v_self->_grpid, (&__pyx_v_numunlimdims), NULL);
+
+    /* "netCDF4.pyx":2272
+ *         if self._data_model == 'NETCDF4':
+ *             ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, NULL)
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             if numunlimdims == 0:
+ */
+    __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":2273
+ *             ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, NULL)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             if numunlimdims == 0:
+ *                 return False
+ */
+      __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_3);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+      __Pyx_GIVEREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":2274
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             if numunlimdims == 0:             # <<<<<<<<<<<<<<
+ *                 return False
+ *             else:
+ */
+    __pyx_t_1 = ((__pyx_v_numunlimdims == 0) != 0);
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":2275
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             if numunlimdims == 0:
+ *                 return False             # <<<<<<<<<<<<<<
+ *             else:
+ *                 dimid = self._dimid
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __Pyx_INCREF(Py_False);
+      __pyx_r = Py_False;
+      goto __pyx_L0;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":2277
+ *                 return False
+ *             else:
+ *                 dimid = self._dimid             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)
+ *                 if ierr != NC_NOERR:
+ */
+      __pyx_t_5 = __pyx_v_self->_dimid;
+      __pyx_v_dimid = __pyx_t_5;
+
+      /* "netCDF4.pyx":2278
+ *             else:
+ *                 dimid = self._dimid
+ *                 ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)             # <<<<<<<<<<<<<<
+ *                 if ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+      __pyx_v_ierr = nc_inq_unlimdims(__pyx_v_self->_grpid, (&__pyx_v_numunlimdims), __pyx_v_unlimdimids);
+
+      /* "netCDF4.pyx":2279
+ *                 dimid = self._dimid
+ *                 ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)
+ *                 if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 unlimdim_ids = []
+ */
+      __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_1) {
+
+        /* "netCDF4.pyx":2280
+ *                 ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)
+ *                 if ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *                 unlimdim_ids = []
+ *                 for n from 0 <= n < numunlimdims:
+ */
+        __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_3);
+        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+        __Pyx_GIVEREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":2281
+ *                 if ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 unlimdim_ids = []             # <<<<<<<<<<<<<<
+ *                 for n from 0 <= n < numunlimdims:
+ *                     unlimdim_ids.append(unlimdimids[n])
+ */
+      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_v_unlimdim_ids = ((PyObject*)__pyx_t_3);
+      __pyx_t_3 = 0;
+
+      /* "netCDF4.pyx":2282
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 unlimdim_ids = []
+ *                 for n from 0 <= n < numunlimdims:             # <<<<<<<<<<<<<<
+ *                     unlimdim_ids.append(unlimdimids[n])
+ *                 if dimid in unlimdim_ids:
+ */
+      __pyx_t_5 = __pyx_v_numunlimdims;
+      for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_5; __pyx_v_n++) {
+
+        /* "netCDF4.pyx":2283
+ *                 unlimdim_ids = []
+ *                 for n from 0 <= n < numunlimdims:
+ *                     unlimdim_ids.append(unlimdimids[n])             # <<<<<<<<<<<<<<
+ *                 if dimid in unlimdim_ids:
+ *                     return True
+ */
+        __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_unlimdimids[__pyx_v_n])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_unlimdim_ids, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      }
+
+      /* "netCDF4.pyx":2284
+ *                 for n from 0 <= n < numunlimdims:
+ *                     unlimdim_ids.append(unlimdimids[n])
+ *                 if dimid in unlimdim_ids:             # <<<<<<<<<<<<<<
+ *                     return True
+ *                 else:
+ */
+      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dimid); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_t_3, __pyx_v_unlimdim_ids, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_7 = (__pyx_t_1 != 0);
+      if (__pyx_t_7) {
+
+        /* "netCDF4.pyx":2285
+ *                     unlimdim_ids.append(unlimdimids[n])
+ *                 if dimid in unlimdim_ids:
+ *                     return True             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     return False
+ */
+        __Pyx_XDECREF(__pyx_r);
+        __Pyx_INCREF(Py_True);
+        __pyx_r = Py_True;
+        goto __pyx_L0;
+      }
+      /*else*/ {
+
+        /* "netCDF4.pyx":2287
+ *                     return True
+ *                 else:
+ *                     return False             # <<<<<<<<<<<<<<
+ *         else: # if not NETCDF4, there is only one unlimited dimension.
+ *             # nc_inq_unlimdims only works for NETCDF4.
+ */
+        __Pyx_XDECREF(__pyx_r);
+        __Pyx_INCREF(Py_False);
+        __pyx_r = Py_False;
+        goto __pyx_L0;
+      }
+    }
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":2290
+ *         else: # if not NETCDF4, there is only one unlimited dimension.
+ *             # nc_inq_unlimdims only works for NETCDF4.
+ *             ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid)             # <<<<<<<<<<<<<<
+ *             if self._dimid == xdimid:
+ *                 return True
+ */
+    __pyx_v_ierr = nc_inq(__pyx_v_self->_grpid, (&__pyx_v_ndims), (&__pyx_v_nvars), (&__pyx_v_ngatts), (&__pyx_v_xdimid));
+
+    /* "netCDF4.pyx":2291
+ *             # nc_inq_unlimdims only works for NETCDF4.
+ *             ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid)
+ *             if self._dimid == xdimid:             # <<<<<<<<<<<<<<
+ *                 return True
+ *             else:
+ */
+    __pyx_t_7 = ((__pyx_v_self->_dimid == __pyx_v_xdimid) != 0);
+    if (__pyx_t_7) {
+
+      /* "netCDF4.pyx":2292
+ *             ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid)
+ *             if self._dimid == xdimid:
+ *                 return True             # <<<<<<<<<<<<<<
+ *             else:
+ *                 return False
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __Pyx_INCREF(Py_True);
+      __pyx_r = Py_True;
+      goto __pyx_L0;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":2294
+ *                 return True
+ *             else:
+ *                 return False             # <<<<<<<<<<<<<<
+ * 
+ * cdef class Variable:
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __Pyx_INCREF(Py_False);
+      __pyx_r = Py_False;
+      goto __pyx_L0;
+    }
+  }
+
+  /* "netCDF4.pyx":2263
+ *         return self._grp
+ * 
+ *     def isunlimited(self):             # <<<<<<<<<<<<<<
+ *         """
+ * isunlimited(self)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4.Dimension.isunlimited", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_unlimdim_ids);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2186
+ * C{isunlimited()} method of a L{Dimension} instance can be used to
+ * determine if the dimension is unlimited"""
+ *     cdef public int _dimid, _grpid             # <<<<<<<<<<<<<<
+ *     cdef public _data_model, _name, _grp
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9Dimension_6_dimid_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_9Dimension_6_dimid_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_6_dimid___get__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9Dimension_6_dimid___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_dimid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Dimension._dimid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_9Dimension_6_dimid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_9Dimension_6_dimid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_6_dimid_2__set__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_9Dimension_6_dimid_2__set__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_dimid = __pyx_t_1;
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4.Dimension._dimid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9Dimension_6_grpid_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_9Dimension_6_grpid_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_6_grpid___get__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9Dimension_6_grpid___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Dimension._grpid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_9Dimension_6_grpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_9Dimension_6_grpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_6_grpid_2__set__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_9Dimension_6_grpid_2__set__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_grpid = __pyx_t_1;
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4.Dimension._grpid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2187
+ * determine if the dimension is unlimited"""
+ *     cdef public int _dimid, _grpid
+ *     cdef public _data_model, _name, _grp             # <<<<<<<<<<<<<<
+ * 
+ *     def __init__(self, grp, name, size=None, **kwargs):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9Dimension_11_data_model_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_9Dimension_11_data_model_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_11_data_model___get__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9Dimension_11_data_model___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_data_model);
+  __pyx_r = __pyx_v_self->_data_model;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_9Dimension_11_data_model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_9Dimension_11_data_model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_11_data_model_2__set__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_9Dimension_11_data_model_2__set__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->_data_model);
+  __Pyx_DECREF(__pyx_v_self->_data_model);
+  __pyx_v_self->_data_model = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_9Dimension_11_data_model_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_9Dimension_11_data_model_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_11_data_model_4__del__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_9Dimension_11_data_model_4__del__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->_data_model);
+  __Pyx_DECREF(__pyx_v_self->_data_model);
+  __pyx_v_self->_data_model = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9Dimension_5_name_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_9Dimension_5_name_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_5_name___get__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9Dimension_5_name___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_name);
+  __pyx_r = __pyx_v_self->_name;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_9Dimension_5_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_9Dimension_5_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_5_name_2__set__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_9Dimension_5_name_2__set__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->_name);
+  __Pyx_DECREF(__pyx_v_self->_name);
+  __pyx_v_self->_name = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_9Dimension_5_name_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_9Dimension_5_name_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_5_name_4__del__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_9Dimension_5_name_4__del__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->_name);
+  __Pyx_DECREF(__pyx_v_self->_name);
+  __pyx_v_self->_name = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_9Dimension_4_grp_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_9Dimension_4_grp_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_4_grp___get__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_9Dimension_4_grp___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_grp);
+  __pyx_r = __pyx_v_self->_grp;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_9Dimension_4_grp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_9Dimension_4_grp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_4_grp_2__set__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_9Dimension_4_grp_2__set__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->_grp);
+  __Pyx_DECREF(__pyx_v_self->_grp);
+  __pyx_v_self->_grp = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_9Dimension_4_grp_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_9Dimension_4_grp_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_9Dimension_4_grp_4__del__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_9Dimension_4_grp_4__del__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->_grp);
+  __Pyx_DECREF(__pyx_v_self->_grp);
+  __pyx_v_self->_grp = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2431
+ *     _isvlen, _grp,_cmptype,_vltype
+ * 
+ *     def __init__(self, grp, name, datatype, dimensions=(), zlib=False,             # <<<<<<<<<<<<<<
+ *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
+ *             chunksizes=None, endian='native', least_significant_digit=None,
+ */
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_grp = 0;
+  PyObject *__pyx_v_name = 0;
+  PyObject *__pyx_v_datatype = 0;
+  PyObject *__pyx_v_dimensions = 0;
+  PyObject *__pyx_v_zlib = 0;
+  PyObject *__pyx_v_complevel = 0;
+  PyObject *__pyx_v_shuffle = 0;
+  PyObject *__pyx_v_fletcher32 = 0;
+  PyObject *__pyx_v_contiguous = 0;
+  PyObject *__pyx_v_chunksizes = 0;
+  PyObject *__pyx_v_endian = 0;
+  PyObject *__pyx_v_least_significant_digit = 0;
+  PyObject *__pyx_v_fill_value = 0;
+  PyObject *__pyx_v_chunk_cache = 0;
+  PyObject *__pyx_v_kwargs = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+  __Pyx_GOTREF(__pyx_v_kwargs);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grp_2,&__pyx_n_s_name,&__pyx_n_s_datatype,&__pyx_n_s_dimensions,&__pyx_n_s_zlib,&__pyx_n_s_complevel,&__pyx_n_s_shuffle,&__pyx_n_s_fletcher32,&__pyx_n_s_contiguous,&__pyx_n_s_chunksizes,&__pyx_n_s_endian,&__pyx_n_s_least_significant_digit,&__pyx_n_s_fill_value,&__pyx_n_s_chunk_cache,0};
+    PyObject* values[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+    values[3] = ((PyObject *)__pyx_empty_tuple);
+    values[4] = ((PyObject *)Py_False);
+    values[5] = ((PyObject *)__pyx_int_4);
+
+    /* "netCDF4.pyx":2432
+ * 
+ *     def __init__(self, grp, name, datatype, dimensions=(), zlib=False,
+ *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,             # <<<<<<<<<<<<<<
+ *             chunksizes=None, endian='native', least_significant_digit=None,
+ *             fill_value=None, chunk_cache=None, **kwargs):
+ */
+    values[6] = ((PyObject *)Py_True);
+    values[7] = ((PyObject *)Py_False);
+    values[8] = ((PyObject *)Py_False);
+
+    /* "netCDF4.pyx":2433
+ *     def __init__(self, grp, name, datatype, dimensions=(), zlib=False,
+ *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
+ *             chunksizes=None, endian='native', least_significant_digit=None,             # <<<<<<<<<<<<<<
+ *             fill_value=None, chunk_cache=None, **kwargs):
+ *         cdef int ierr, ndims, icontiguous, ideflate_level, numdims
+ */
+    values[9] = ((PyObject *)Py_None);
+    values[10] = ((PyObject *)__pyx_n_s_native);
+    values[11] = ((PyObject *)Py_None);
+
+    /* "netCDF4.pyx":2434
+ *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
+ *             chunksizes=None, endian='native', least_significant_digit=None,
+ *             fill_value=None, chunk_cache=None, **kwargs):             # <<<<<<<<<<<<<<
+ *         cdef int ierr, ndims, icontiguous, ideflate_level, numdims
+ *         cdef char *varname
+ */
+    values[12] = ((PyObject *)Py_None);
+    values[13] = ((PyObject *)Py_None);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
+        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
+        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
+        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
+        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
+        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grp_2)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 14, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2431; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datatype)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 14, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2431; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dimensions);
+          if (value) { values[3] = value; kw_args--; }
+        }
+        case  4:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_zlib);
+          if (value) { values[4] = value; kw_args--; }
+        }
+        case  5:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_complevel);
+          if (value) { values[5] = value; kw_args--; }
+        }
+        case  6:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shuffle);
+          if (value) { values[6] = value; kw_args--; }
+        }
+        case  7:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fletcher32);
+          if (value) { values[7] = value; kw_args--; }
+        }
+        case  8:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_contiguous);
+          if (value) { values[8] = value; kw_args--; }
+        }
+        case  9:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_chunksizes);
+          if (value) { values[9] = value; kw_args--; }
+        }
+        case 10:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_endian);
+          if (value) { values[10] = value; kw_args--; }
+        }
+        case 11:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_least_significant_digit);
+          if (value) { values[11] = value; kw_args--; }
+        }
+        case 12:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill_value);
+          if (value) { values[12] = value; kw_args--; }
+        }
+        case 13:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_chunk_cache);
+          if (value) { values[13] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2431; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
+        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
+        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
+        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
+        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
+        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_grp = values[0];
+    __pyx_v_name = values[1];
+    __pyx_v_datatype = values[2];
+    __pyx_v_dimensions = values[3];
+    __pyx_v_zlib = values[4];
+    __pyx_v_complevel = values[5];
+    __pyx_v_shuffle = values[6];
+    __pyx_v_fletcher32 = values[7];
+    __pyx_v_contiguous = values[8];
+    __pyx_v_chunksizes = values[9];
+    __pyx_v_endian = values[10];
+    __pyx_v_least_significant_digit = values[11];
+    __pyx_v_fill_value = values[12];
+    __pyx_v_chunk_cache = values[13];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 14, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2431; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("netCDF4.Variable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8Variable___init__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), __pyx_v_grp, __pyx_v_name, __pyx_v_datatype, __pyx_v_dimensions, __pyx_v_zlib, __pyx_v_complevel, __pyx_v_shuffle, __pyx_v_fletcher32, __pyx_v_contiguous, __pyx_v_chunksizes, __pyx_v_endian, __pyx_v_least_significant_digit, __pyx_v_fill_value, __pyx_v_chunk_cache, __pyx_v_kwargs);
+
+  /* "netCDF4.pyx":2431
+ *     _isvlen, _grp,_cmptype,_vltype
+ * 
+ *     def __init__(self, grp, name, datatype, dimensions=(), zlib=False,             # <<<<<<<<<<<<<<
+ *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
+ *             chunksizes=None, endian='native', least_significant_digit=None,
+ */
+
+  /* function exit code */
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable___init__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_grp, PyObject *__pyx_v_name, PyObject *__pyx_v_datatype, PyObject *__pyx_v_dimensions, PyObject *__pyx_v_zlib, PyObject *__pyx_v_complevel, PyObject *__pyx_v_shuffle, PyObject *__pyx_v_fletcher32, PyObject *__pyx_v_contiguous, PyObject *__pyx_v_chunksizes, PyObject *__pyx_v_endian, PyObject *__pyx_v_least_significant_digit, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_ch [...]
+  int __pyx_v_ierr;
+  int __pyx_v_ndims;
+  int __pyx_v_icontiguous;
+  int __pyx_v_ideflate_level;
+  int __pyx_v_numdims;
+  char *__pyx_v_varname;
+  nc_type __pyx_v_xtype;
+  int __pyx_v_dimids[NC_MAX_DIMS];
+  size_t __pyx_v_sizep;
+  size_t __pyx_v_nelemsp;
+  size_t *__pyx_v_chunksizesp;
+  float __pyx_v_preemptionp;
+  PyObject *__pyx_v_dtype_endian = NULL;
+  PyObject *__pyx_v_msg = NULL;
+  PyObject *__pyx_v_bytestr = NULL;
+  long __pyx_v_n;
+  PyObject *__pyx_v_dimname = NULL;
+  PyObject *__pyx_v_dim = NULL;
+  PyObject *__pyx_v_fillval = NULL;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  int __pyx_t_8;
+  nc_type __pyx_t_9;
+  char *__pyx_t_10;
+  Py_ssize_t __pyx_t_11;
+  int __pyx_t_12;
+  size_t __pyx_t_13;
+  Py_ssize_t __pyx_t_14;
+  PyObject *(*__pyx_t_15)(PyObject *);
+  PyObject *__pyx_t_16 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_INCREF(__pyx_v_datatype);
+  __Pyx_INCREF(__pyx_v_dimensions);
+  __Pyx_INCREF(__pyx_v_zlib);
+
+  /* "netCDF4.pyx":2443
+ *         cdef float preemptionp
+ *         # if complevel is set to zero, set zlib to False.
+ *         if not complevel:             # <<<<<<<<<<<<<<
+ *             zlib = False
+ *         # if dimensions is a string, convert to a tuple
+ */
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_complevel); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = ((!__pyx_t_1) != 0);
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":2444
+ *         # if complevel is set to zero, set zlib to False.
+ *         if not complevel:
+ *             zlib = False             # <<<<<<<<<<<<<<
+ *         # if dimensions is a string, convert to a tuple
+ *         # this prevents a common error that occurs when
+ */
+    __Pyx_INCREF(Py_False);
+    __Pyx_DECREF_SET(__pyx_v_zlib, Py_False);
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":2448
+ *         # this prevents a common error that occurs when
+ *         # dimensions = 'lat' instead of ('lat',)
+ *         if type(dimensions) == str or type(dimensions) == bytes or type(dimensions) == unicode:             # <<<<<<<<<<<<<<
+ *             dimensions = dimensions,
+ *         self._grpid = grp._grpid
+ */
+  __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_dimensions)), ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (!__pyx_t_1) {
+  } else {
+    __pyx_t_2 = __pyx_t_1;
+    goto __pyx_L5_bool_binop_done;
+  }
+  __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_dimensions)), ((PyObject *)((PyObject*)(&PyBytes_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (!__pyx_t_1) {
+  } else {
+    __pyx_t_2 = __pyx_t_1;
+    goto __pyx_L5_bool_binop_done;
+  }
+  __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_dimensions)), ((PyObject *)((PyObject*)(&PyUnicode_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_2 = __pyx_t_1;
+  __pyx_L5_bool_binop_done:;
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":2449
+ *         # dimensions = 'lat' instead of ('lat',)
+ *         if type(dimensions) == str or type(dimensions) == bytes or type(dimensions) == unicode:
+ *             dimensions = dimensions,             # <<<<<<<<<<<<<<
+ *         self._grpid = grp._grpid
+ *         # make a weakref to group to avoid circular ref (issue 218)
+ */
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_INCREF(__pyx_v_dimensions);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dimensions);
+    __Pyx_GIVEREF(__pyx_v_dimensions);
+    __Pyx_DECREF_SET(__pyx_v_dimensions, __pyx_t_3);
+    __pyx_t_3 = 0;
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "netCDF4.pyx":2450
+ *         if type(dimensions) == str or type(dimensions) == bytes or type(dimensions) == unicode:
+ *             dimensions = dimensions,
+ *         self._grpid = grp._grpid             # <<<<<<<<<<<<<<
+ *         # make a weakref to group to avoid circular ref (issue 218)
+ *         # keep strong reference the default behaviour (issue 251)
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_v_self->_grpid = __pyx_t_4;
+
+  /* "netCDF4.pyx":2453
+ *         # make a weakref to group to avoid circular ref (issue 218)
+ *         # keep strong reference the default behaviour (issue 251)
+ *         if grp.keepweakref:             # <<<<<<<<<<<<<<
+ *             self._grp = weakref.proxy(grp)
+ *         else:
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_keepweakref); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":2454
+ *         # keep strong reference the default behaviour (issue 251)
+ *         if grp.keepweakref:
+ *             self._grp = weakref.proxy(grp)             # <<<<<<<<<<<<<<
+ *         else:
+ *             self._grp = grp
+ */
+    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_weakref); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_proxy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_5 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_6, function);
+      }
+    }
+    if (!__pyx_t_5) {
+      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_grp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+    } else {
+      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+      __Pyx_INCREF(__pyx_v_grp);
+      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_grp);
+      __Pyx_GIVEREF(__pyx_v_grp);
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_GIVEREF(__pyx_t_3);
+    __Pyx_GOTREF(__pyx_v_self->_grp);
+    __Pyx_DECREF(__pyx_v_self->_grp);
+    __pyx_v_self->_grp = __pyx_t_3;
+    __pyx_t_3 = 0;
+    goto __pyx_L8;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":2456
+ *             self._grp = weakref.proxy(grp)
+ *         else:
+ *             self._grp = grp             # <<<<<<<<<<<<<<
+ *         # convert to a real numpy datatype object if necessary.
+ *         if (not isinstance(datatype, CompoundType) and \
+ */
+    __Pyx_INCREF(__pyx_v_grp);
+    __Pyx_GIVEREF(__pyx_v_grp);
+    __Pyx_GOTREF(__pyx_v_self->_grp);
+    __Pyx_DECREF(__pyx_v_self->_grp);
+    __pyx_v_self->_grp = __pyx_v_grp;
+  }
+  __pyx_L8:;
+
+  /* "netCDF4.pyx":2458
+ *             self._grp = grp
+ *         # convert to a real numpy datatype object if necessary.
+ *         if (not isinstance(datatype, CompoundType) and \             # <<<<<<<<<<<<<<
+ *             not isinstance(datatype, VLType)) and \
+ *             datatype != str and \
+ */
+  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_CompoundType)); 
+  __pyx_t_8 = ((!(__pyx_t_1 != 0)) != 0);
+  if (__pyx_t_8) {
+  } else {
+    __pyx_t_2 = __pyx_t_8;
+    goto __pyx_L10_bool_binop_done;
+  }
+
+  /* "netCDF4.pyx":2459
+ *         # convert to a real numpy datatype object if necessary.
+ *         if (not isinstance(datatype, CompoundType) and \
+ *             not isinstance(datatype, VLType)) and \             # <<<<<<<<<<<<<<
+ *             datatype != str and \
+ *             type(datatype) != numpy.dtype:
+ */
+  __pyx_t_8 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_VLType)); 
+  __pyx_t_1 = ((!(__pyx_t_8 != 0)) != 0);
+  if (__pyx_t_1) {
+  } else {
+    __pyx_t_2 = __pyx_t_1;
+    goto __pyx_L10_bool_binop_done;
+  }
+
+  /* "netCDF4.pyx":2460
+ *         if (not isinstance(datatype, CompoundType) and \
+ *             not isinstance(datatype, VLType)) and \
+ *             datatype != str and \             # <<<<<<<<<<<<<<
+ *             type(datatype) != numpy.dtype:
+ *             datatype = numpy.dtype(datatype)
+ */
+  __pyx_t_3 = PyObject_RichCompare(__pyx_v_datatype, ((PyObject *)((PyObject*)(&PyString_Type))), Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (__pyx_t_1) {
+  } else {
+    __pyx_t_2 = __pyx_t_1;
+    goto __pyx_L10_bool_binop_done;
+  }
+
+  /* "netCDF4.pyx":2461
+ *             not isinstance(datatype, VLType)) and \
+ *             datatype != str and \
+ *             type(datatype) != numpy.dtype:             # <<<<<<<<<<<<<<
+ *             datatype = numpy.dtype(datatype)
+ *         # convert numpy string dtype with length > 1
+ */
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_datatype)), __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_2 = __pyx_t_1;
+  __pyx_L10_bool_binop_done:;
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":2462
+ *             datatype != str and \
+ *             type(datatype) != numpy.dtype:
+ *             datatype = numpy.dtype(datatype)             # <<<<<<<<<<<<<<
+ *         # convert numpy string dtype with length > 1
+ *         # or any numpy unicode dtype into str
+ */
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_6 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
+      if (likely(__pyx_t_6)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+        __Pyx_INCREF(__pyx_t_6);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_7, function);
+      }
+    }
+    if (!__pyx_t_6) {
+      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_datatype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+    } else {
+      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+      __Pyx_INCREF(__pyx_v_datatype);
+      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_datatype);
+      __Pyx_GIVEREF(__pyx_v_datatype);
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_3);
+    __pyx_t_3 = 0;
+    goto __pyx_L9;
+  }
+  __pyx_L9:;
+
+  /* "netCDF4.pyx":2465
+ *         # convert numpy string dtype with length > 1
+ *         # or any numpy unicode dtype into str
+ *         if (isinstance(datatype, numpy.dtype) and             # <<<<<<<<<<<<<<
+ *             ((datatype.kind == 'S' and datatype.itemsize > 1) or
+ *               datatype.kind == 'U')):
+ */
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_1 = PyObject_IsInstance(__pyx_v_datatype, __pyx_t_7); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_8 = (__pyx_t_1 != 0);
+  if (__pyx_t_8) {
+  } else {
+    __pyx_t_2 = __pyx_t_8;
+    goto __pyx_L15_bool_binop_done;
+  }
+
+  /* "netCDF4.pyx":2466
+ *         # or any numpy unicode dtype into str
+ *         if (isinstance(datatype, numpy.dtype) and
+ *             ((datatype.kind == 'S' and datatype.itemsize > 1) or             # <<<<<<<<<<<<<<
+ *               datatype.kind == 'U')):
+ *             datatype = str
+ */
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_kind); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  if (!__pyx_t_8) {
+    goto __pyx_L17_next_or;
+  } else {
+  }
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (!__pyx_t_8) {
+  } else {
+    __pyx_t_2 = __pyx_t_8;
+    goto __pyx_L15_bool_binop_done;
+  }
+  __pyx_L17_next_or:;
+
+  /* "netCDF4.pyx":2467
+ *         if (isinstance(datatype, numpy.dtype) and
+ *             ((datatype.kind == 'S' and datatype.itemsize > 1) or
+ *               datatype.kind == 'U')):             # <<<<<<<<<<<<<<
+ *             datatype = str
+ * 	# check if endian keyword consistent with datatype specification.
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_kind); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_2 = __pyx_t_8;
+  __pyx_L15_bool_binop_done:;
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":2468
+ *             ((datatype.kind == 'S' and datatype.itemsize > 1) or
+ *               datatype.kind == 'U')):
+ *             datatype = str             # <<<<<<<<<<<<<<
+ * 	# check if endian keyword consistent with datatype specification.
+ *         dtype_endian = getattr(datatype,'byteorder',None)
+ */
+    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+    __Pyx_DECREF_SET(__pyx_v_datatype, ((PyObject *)((PyObject*)(&PyString_Type))));
+    goto __pyx_L14;
+  }
+  __pyx_L14:;
+
+  /* "netCDF4.pyx":2470
+ *             datatype = str
+ * 	# check if endian keyword consistent with datatype specification.
+ *         dtype_endian = getattr(datatype,'byteorder',None)             # <<<<<<<<<<<<<<
+ *         if dtype_endian == '=': dtype_endian='native'
+ *         if dtype_endian == '>': dtype_endian='big'
+ */
+  __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_datatype, __pyx_n_s_byteorder, Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_dtype_endian = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":2471
+ * 	# check if endian keyword consistent with datatype specification.
+ *         dtype_endian = getattr(datatype,'byteorder',None)
+ *         if dtype_endian == '=': dtype_endian='native'             # <<<<<<<<<<<<<<
+ *         if dtype_endian == '>': dtype_endian='big'
+ *         if dtype_endian == '<': dtype_endian='little'
+ */
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__51, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_2) {
+    __Pyx_INCREF(__pyx_n_s_native);
+    __Pyx_DECREF_SET(__pyx_v_dtype_endian, __pyx_n_s_native);
+    goto __pyx_L19;
+  }
+  __pyx_L19:;
+
+  /* "netCDF4.pyx":2472
+ *         dtype_endian = getattr(datatype,'byteorder',None)
+ *         if dtype_endian == '=': dtype_endian='native'
+ *         if dtype_endian == '>': dtype_endian='big'             # <<<<<<<<<<<<<<
+ *         if dtype_endian == '<': dtype_endian='little'
+ *         if dtype_endian == '|': dtype_endian=None
+ */
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__52, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_2) {
+    __Pyx_INCREF(__pyx_n_s_big);
+    __Pyx_DECREF_SET(__pyx_v_dtype_endian, __pyx_n_s_big);
+    goto __pyx_L20;
+  }
+  __pyx_L20:;
+
+  /* "netCDF4.pyx":2473
+ *         if dtype_endian == '=': dtype_endian='native'
+ *         if dtype_endian == '>': dtype_endian='big'
+ *         if dtype_endian == '<': dtype_endian='little'             # <<<<<<<<<<<<<<
+ *         if dtype_endian == '|': dtype_endian=None
+ *         if dtype_endian is not None and dtype_endian != endian:
+ */
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__53, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_2) {
+    __Pyx_INCREF(__pyx_n_s_little);
+    __Pyx_DECREF_SET(__pyx_v_dtype_endian, __pyx_n_s_little);
+    goto __pyx_L21;
+  }
+  __pyx_L21:;
+
+  /* "netCDF4.pyx":2474
+ *         if dtype_endian == '>': dtype_endian='big'
+ *         if dtype_endian == '<': dtype_endian='little'
+ *         if dtype_endian == '|': dtype_endian=None             # <<<<<<<<<<<<<<
+ *         if dtype_endian is not None and dtype_endian != endian:
+ *             # endian keyword prevails, issue warning
+ */
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__54, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_2) {
+    __Pyx_INCREF(Py_None);
+    __Pyx_DECREF_SET(__pyx_v_dtype_endian, Py_None);
+    goto __pyx_L22;
+  }
+  __pyx_L22:;
+
+  /* "netCDF4.pyx":2475
+ *         if dtype_endian == '<': dtype_endian='little'
+ *         if dtype_endian == '|': dtype_endian=None
+ *         if dtype_endian is not None and dtype_endian != endian:             # <<<<<<<<<<<<<<
+ *             # endian keyword prevails, issue warning
+ *             msg = 'endian-ness of dtype and endian kwarg do not match, using endian kwarg'
+ */
+  __pyx_t_8 = (__pyx_v_dtype_endian != Py_None);
+  __pyx_t_1 = (__pyx_t_8 != 0);
+  if (__pyx_t_1) {
+  } else {
+    __pyx_t_2 = __pyx_t_1;
+    goto __pyx_L24_bool_binop_done;
+  }
+  __pyx_t_3 = PyObject_RichCompare(__pyx_v_dtype_endian, __pyx_v_endian, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_2 = __pyx_t_1;
+  __pyx_L24_bool_binop_done:;
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":2477
+ *         if dtype_endian is not None and dtype_endian != endian:
+ *             # endian keyword prevails, issue warning
+ *             msg = 'endian-ness of dtype and endian kwarg do not match, using endian kwarg'             # <<<<<<<<<<<<<<
+ *             #msg = 'endian-ness of dtype and endian kwarg do not match, dtype over-riding endian kwarg'
+ *             warnings.warn(msg)
+ */
+    __Pyx_INCREF(__pyx_kp_s_endian_ness_of_dtype_and_endian);
+    __pyx_v_msg = __pyx_kp_s_endian_ness_of_dtype_and_endian;
+
+    /* "netCDF4.pyx":2479
+ *             msg = 'endian-ness of dtype and endian kwarg do not match, using endian kwarg'
+ *             #msg = 'endian-ness of dtype and endian kwarg do not match, dtype over-riding endian kwarg'
+ *             warnings.warn(msg)             # <<<<<<<<<<<<<<
+ *             #endian = dtype_endian # dtype prevails
+ *         # check validity of datatype.
+ */
+    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_warn); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_7 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
+      if (likely(__pyx_t_7)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_7);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_5, function);
+      }
+    }
+    if (!__pyx_t_7) {
+      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_msg); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+    } else {
+      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+      __Pyx_INCREF(__pyx_v_msg);
+      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_msg);
+      __Pyx_GIVEREF(__pyx_v_msg);
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    goto __pyx_L23;
+  }
+  __pyx_L23:;
+
+  /* "netCDF4.pyx":2482
+ *             #endian = dtype_endian # dtype prevails
+ *         # check validity of datatype.
+ *         self._isprimitive = False             # <<<<<<<<<<<<<<
+ *         self._iscompound = False
+ *         self._isvlen = False
+ */
+  __Pyx_INCREF(Py_False);
+  __Pyx_GIVEREF(Py_False);
+  __Pyx_GOTREF(__pyx_v_self->_isprimitive);
+  __Pyx_DECREF(__pyx_v_self->_isprimitive);
+  __pyx_v_self->_isprimitive = Py_False;
+
+  /* "netCDF4.pyx":2483
+ *         # check validity of datatype.
+ *         self._isprimitive = False
+ *         self._iscompound = False             # <<<<<<<<<<<<<<
+ *         self._isvlen = False
+ *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\
+ */
+  __Pyx_INCREF(Py_False);
+  __Pyx_GIVEREF(Py_False);
+  __Pyx_GOTREF(__pyx_v_self->_iscompound);
+  __Pyx_DECREF(__pyx_v_self->_iscompound);
+  __pyx_v_self->_iscompound = Py_False;
+
+  /* "netCDF4.pyx":2484
+ *         self._isprimitive = False
+ *         self._iscompound = False
+ *         self._isvlen = False             # <<<<<<<<<<<<<<
+ *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\
+ *                       or datatype == str:
+ */
+  __Pyx_INCREF(Py_False);
+  __Pyx_GIVEREF(Py_False);
+  __Pyx_GOTREF(__pyx_v_self->_isvlen);
+  __Pyx_DECREF(__pyx_v_self->_isvlen);
+  __pyx_v_self->_isvlen = Py_False;
+
+  /* "netCDF4.pyx":2485
+ *         self._iscompound = False
+ *         self._isvlen = False
+ *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\             # <<<<<<<<<<<<<<
+ *                       or datatype == str:
+ *             if isinstance(datatype, CompoundType):
+ */
+  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_CompoundType)); 
+  __pyx_t_8 = (__pyx_t_1 != 0);
+  if (!__pyx_t_8) {
+  } else {
+    __pyx_t_2 = __pyx_t_8;
+    goto __pyx_L27_bool_binop_done;
+  }
+
+  /* "netCDF4.pyx":2486
+ *         self._isvlen = False
+ *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\
+ *                       or datatype == str:             # <<<<<<<<<<<<<<
+ *             if isinstance(datatype, CompoundType):
+ *                self._iscompound = True
+ */
+  __pyx_t_8 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_VLType)); 
+
+  /* "netCDF4.pyx":2485
+ *         self._iscompound = False
+ *         self._isvlen = False
+ *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\             # <<<<<<<<<<<<<<
+ *                       or datatype == str:
+ *             if isinstance(datatype, CompoundType):
+ */
+  __pyx_t_1 = (__pyx_t_8 != 0);
+  if (!__pyx_t_1) {
+  } else {
+    __pyx_t_2 = __pyx_t_1;
+    goto __pyx_L27_bool_binop_done;
+  }
+
+  /* "netCDF4.pyx":2486
+ *         self._isvlen = False
+ *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\
+ *                       or datatype == str:             # <<<<<<<<<<<<<<
+ *             if isinstance(datatype, CompoundType):
+ *                self._iscompound = True
+ */
+  __pyx_t_3 = PyObject_RichCompare(__pyx_v_datatype, ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_2 = __pyx_t_1;
+  __pyx_L27_bool_binop_done:;
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":2487
+ *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\
+ *                       or datatype == str:
+ *             if isinstance(datatype, CompoundType):             # <<<<<<<<<<<<<<
+ *                self._iscompound = True
+ *                self._cmptype = datatype
+ */
+    __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_CompoundType)); 
+    __pyx_t_1 = (__pyx_t_2 != 0);
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":2488
+ *                       or datatype == str:
+ *             if isinstance(datatype, CompoundType):
+ *                self._iscompound = True             # <<<<<<<<<<<<<<
+ *                self._cmptype = datatype
+ *             if isinstance(datatype, VLType) or datatype==str:
+ */
+      __Pyx_INCREF(Py_True);
+      __Pyx_GIVEREF(Py_True);
+      __Pyx_GOTREF(__pyx_v_self->_iscompound);
+      __Pyx_DECREF(__pyx_v_self->_iscompound);
+      __pyx_v_self->_iscompound = Py_True;
+
+      /* "netCDF4.pyx":2489
+ *             if isinstance(datatype, CompoundType):
+ *                self._iscompound = True
+ *                self._cmptype = datatype             # <<<<<<<<<<<<<<
+ *             if isinstance(datatype, VLType) or datatype==str:
+ *                self._isvlen = True
+ */
+      __Pyx_INCREF(__pyx_v_datatype);
+      __Pyx_GIVEREF(__pyx_v_datatype);
+      __Pyx_GOTREF(__pyx_v_self->_cmptype);
+      __Pyx_DECREF(__pyx_v_self->_cmptype);
+      __pyx_v_self->_cmptype = __pyx_v_datatype;
+      goto __pyx_L30;
+    }
+    __pyx_L30:;
+
+    /* "netCDF4.pyx":2490
+ *                self._iscompound = True
+ *                self._cmptype = datatype
+ *             if isinstance(datatype, VLType) or datatype==str:             # <<<<<<<<<<<<<<
+ *                self._isvlen = True
+ *                self._vltype = datatype
+ */
+    __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_VLType)); 
+    __pyx_t_8 = (__pyx_t_2 != 0);
+    if (!__pyx_t_8) {
+    } else {
+      __pyx_t_1 = __pyx_t_8;
+      goto __pyx_L32_bool_binop_done;
+    }
+    __pyx_t_3 = PyObject_RichCompare(__pyx_v_datatype, ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_1 = __pyx_t_8;
+    __pyx_L32_bool_binop_done:;
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":2491
+ *                self._cmptype = datatype
+ *             if isinstance(datatype, VLType) or datatype==str:
+ *                self._isvlen = True             # <<<<<<<<<<<<<<
+ *                self._vltype = datatype
+ *             if datatype==str:
+ */
+      __Pyx_INCREF(Py_True);
+      __Pyx_GIVEREF(Py_True);
+      __Pyx_GOTREF(__pyx_v_self->_isvlen);
+      __Pyx_DECREF(__pyx_v_self->_isvlen);
+      __pyx_v_self->_isvlen = Py_True;
+
+      /* "netCDF4.pyx":2492
+ *             if isinstance(datatype, VLType) or datatype==str:
+ *                self._isvlen = True
+ *                self._vltype = datatype             # <<<<<<<<<<<<<<
+ *             if datatype==str:
+ *                 if grp.data_model != 'NETCDF4':
+ */
+      __Pyx_INCREF(__pyx_v_datatype);
+      __Pyx_GIVEREF(__pyx_v_datatype);
+      __Pyx_GOTREF(__pyx_v_self->_vltype);
+      __Pyx_DECREF(__pyx_v_self->_vltype);
+      __pyx_v_self->_vltype = __pyx_v_datatype;
+      goto __pyx_L31;
+    }
+    __pyx_L31:;
+
+    /* "netCDF4.pyx":2493
+ *                self._isvlen = True
+ *                self._vltype = datatype
+ *             if datatype==str:             # <<<<<<<<<<<<<<
+ *                 if grp.data_model != 'NETCDF4':
+ *                     raise ValueError(
+ */
+    __pyx_t_3 = PyObject_RichCompare(__pyx_v_datatype, ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":2494
+ *                self._vltype = datatype
+ *             if datatype==str:
+ *                 if grp.data_model != 'NETCDF4':             # <<<<<<<<<<<<<<
+ *                     raise ValueError(
+ *                         'Variable length strings are only supported for the '
+ */
+      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_1) {
+
+        /* "netCDF4.pyx":2495
+ *             if datatype==str:
+ *                 if grp.data_model != 'NETCDF4':
+ *                     raise ValueError(             # <<<<<<<<<<<<<<
+ *                         'Variable length strings are only supported for the '
+ *                         'NETCDF4 format. For other formats, consider using '
+ */
+        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":2500
+ *                         'netCDF4.stringtochar to convert string arrays into '
+ *                         'character arrays with an additional dimension.')
+ *                 datatype = VLType(self._grp, str, None)             # <<<<<<<<<<<<<<
+ *                 self._vltype = datatype
+ *             xtype = datatype._nc_type
+ */
+      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_v_self->_grp);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->_grp);
+      __Pyx_GIVEREF(__pyx_v_self->_grp);
+      __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+      PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
+      __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
+      __Pyx_INCREF(Py_None);
+      PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
+      __Pyx_GIVEREF(Py_None);
+      __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_VLType)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_5);
+      __pyx_t_5 = 0;
+
+      /* "netCDF4.pyx":2501
+ *                         'character arrays with an additional dimension.')
+ *                 datatype = VLType(self._grp, str, None)
+ *                 self._vltype = datatype             # <<<<<<<<<<<<<<
+ *             xtype = datatype._nc_type
+ *             # dtype variable attribute is a numpy datatype object.
+ */
+      __Pyx_INCREF(__pyx_v_datatype);
+      __Pyx_GIVEREF(__pyx_v_datatype);
+      __Pyx_GOTREF(__pyx_v_self->_vltype);
+      __Pyx_DECREF(__pyx_v_self->_vltype);
+      __pyx_v_self->_vltype = __pyx_v_datatype;
+      goto __pyx_L34;
+    }
+    __pyx_L34:;
+
+    /* "netCDF4.pyx":2502
+ *                 datatype = VLType(self._grp, str, None)
+ *                 self._vltype = datatype
+ *             xtype = datatype._nc_type             # <<<<<<<<<<<<<<
+ *             # dtype variable attribute is a numpy datatype object.
+ *             self.dtype = datatype.dtype
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_nc_type); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_9 = __Pyx_PyInt_As_nc_type(__pyx_t_5); if (unlikely((__pyx_t_9 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_v_xtype = __pyx_t_9;
+
+    /* "netCDF4.pyx":2504
+ *             xtype = datatype._nc_type
+ *             # dtype variable attribute is a numpy datatype object.
+ *             self.dtype = datatype.dtype             # <<<<<<<<<<<<<<
+ *         elif datatype.str[1:] in _supportedtypes:
+ *             self._isprimitive = True
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
+    __Pyx_GOTREF(__pyx_v_self->dtype);
+    __Pyx_DECREF(__pyx_v_self->dtype);
+    __pyx_v_self->dtype = __pyx_t_5;
+    __pyx_t_5 = 0;
+    goto __pyx_L26;
+  }
+
+  /* "netCDF4.pyx":2505
+ *             # dtype variable attribute is a numpy datatype object.
+ *             self.dtype = datatype.dtype
+ *         elif datatype.str[1:] in _supportedtypes:             # <<<<<<<<<<<<<<
+ *             self._isprimitive = True
+ *             # find netCDF primitive data type corresponding to
+ */
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_5, 1, 0, NULL, NULL, &__pyx_slice__56, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_t_3, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_8 = (__pyx_t_1 != 0);
+  if (__pyx_t_8) {
+
+    /* "netCDF4.pyx":2506
+ *             self.dtype = datatype.dtype
+ *         elif datatype.str[1:] in _supportedtypes:
+ *             self._isprimitive = True             # <<<<<<<<<<<<<<
+ *             # find netCDF primitive data type corresponding to
+ *             # specified numpy data type.
+ */
+    __Pyx_INCREF(Py_True);
+    __Pyx_GIVEREF(Py_True);
+    __Pyx_GOTREF(__pyx_v_self->_isprimitive);
+    __Pyx_DECREF(__pyx_v_self->_isprimitive);
+    __pyx_v_self->_isprimitive = Py_True;
+
+    /* "netCDF4.pyx":2509
+ *             # find netCDF primitive data type corresponding to
+ *             # specified numpy data type.
+ *             xtype = _nptonctype[datatype.str[1:]]             # <<<<<<<<<<<<<<
+ *             # dtype variable attribute is a numpy datatype object.
+ *             self.dtype = datatype
+ */
+    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_str); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_3, 1, 0, NULL, NULL, &__pyx_slice__57, 1, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = PyObject_GetItem(__pyx_t_5, __pyx_t_6); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2509; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_9 = __Pyx_PyInt_As_nc_type(__pyx_t_3); if (unlikely((__pyx_t_9 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_v_xtype = __pyx_t_9;
+
+    /* "netCDF4.pyx":2511
+ *             xtype = _nptonctype[datatype.str[1:]]
+ *             # dtype variable attribute is a numpy datatype object.
+ *             self.dtype = datatype             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise TypeError('illegal primitive data type, must be one of %s, got %s' % (_supportedtypes,datatype))
+ */
+    __Pyx_INCREF(__pyx_v_datatype);
+    __Pyx_GIVEREF(__pyx_v_datatype);
+    __Pyx_GOTREF(__pyx_v_self->dtype);
+    __Pyx_DECREF(__pyx_v_self->dtype);
+    __pyx_v_self->dtype = __pyx_v_datatype;
+    goto __pyx_L26;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":2513
+ *             self.dtype = datatype
+ *         else:
+ *             raise TypeError('illegal primitive data type, must be one of %s, got %s' % (_supportedtypes,datatype))             # <<<<<<<<<<<<<<
+ *         if 'id' in kwargs:
+ *             self._varid = kwargs['id']
+ */
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __Pyx_INCREF(__pyx_v_datatype);
+    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_datatype);
+    __Pyx_GIVEREF(__pyx_v_datatype);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_illegal_primitive_data_type_must, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_L26:;
+
+  /* "netCDF4.pyx":2514
+ *         else:
+ *             raise TypeError('illegal primitive data type, must be one of %s, got %s' % (_supportedtypes,datatype))
+ *         if 'id' in kwargs:             # <<<<<<<<<<<<<<
+ *             self._varid = kwargs['id']
+ *         else:
+ */
+  __pyx_t_8 = (__Pyx_PyDict_Contains(__pyx_n_s_id, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = (__pyx_t_8 != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":2515
+ *             raise TypeError('illegal primitive data type, must be one of %s, got %s' % (_supportedtypes,datatype))
+ *         if 'id' in kwargs:
+ *             self._varid = kwargs['id']             # <<<<<<<<<<<<<<
+ *         else:
+ *             bytestr = _strencode(name)
+ */
+    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_id); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2515; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_v_self->_varid = __pyx_t_4;
+    goto __pyx_L36;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":2517
+ *             self._varid = kwargs['id']
+ *         else:
+ *             bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *             varname = bytestr
+ *             ndims = len(dimensions)
+ */
+    __pyx_t_3 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_v_bytestr = __pyx_t_3;
+    __pyx_t_3 = 0;
+
+    /* "netCDF4.pyx":2518
+ *         else:
+ *             bytestr = _strencode(name)
+ *             varname = bytestr             # <<<<<<<<<<<<<<
+ *             ndims = len(dimensions)
+ *             # find dimension ids.
+ */
+    __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_varname = __pyx_t_10;
+
+    /* "netCDF4.pyx":2519
+ *             bytestr = _strencode(name)
+ *             varname = bytestr
+ *             ndims = len(dimensions)             # <<<<<<<<<<<<<<
+ *             # find dimension ids.
+ *             if ndims:
+ */
+    __pyx_t_11 = PyObject_Length(__pyx_v_dimensions); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_ndims = __pyx_t_11;
+
+    /* "netCDF4.pyx":2521
+ *             ndims = len(dimensions)
+ *             # find dimension ids.
+ *             if ndims:             # <<<<<<<<<<<<<<
+ *                 for n from 0 <= n < ndims:
+ *                     dimname = dimensions[n]
+ */
+    __pyx_t_1 = (__pyx_v_ndims != 0);
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":2522
+ *             # find dimension ids.
+ *             if ndims:
+ *                 for n from 0 <= n < ndims:             # <<<<<<<<<<<<<<
+ *                     dimname = dimensions[n]
+ *                     # look for dimension in this group, and if not
+ */
+      __pyx_t_4 = __pyx_v_ndims;
+      for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {
+
+        /* "netCDF4.pyx":2523
+ *             if ndims:
+ *                 for n from 0 <= n < ndims:
+ *                     dimname = dimensions[n]             # <<<<<<<<<<<<<<
+ *                     # look for dimension in this group, and if not
+ *                     # found there, look in parent (and it's parent, etc, back to root).
+ */
+        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_dimensions, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2523; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_3);
+        __pyx_t_3 = 0;
+
+        /* "netCDF4.pyx":2526
+ *                     # look for dimension in this group, and if not
+ *                     # found there, look in parent (and it's parent, etc, back to root).
+ *                     dim = _find_dim(grp, dimname)             # <<<<<<<<<<<<<<
+ *                     if dim is None:
+ *                         raise KeyError("dimension %s not defined in group %s or any group in it's family tree" % (dimname, grp.path))
+ */
+        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_5 = NULL;
+        __pyx_t_11 = 0;
+        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
+          if (likely(__pyx_t_5)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+            __Pyx_INCREF(__pyx_t_5);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_6, function);
+            __pyx_t_11 = 1;
+          }
+        }
+        __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        if (__pyx_t_5) {
+          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+        }
+        __Pyx_INCREF(__pyx_v_grp);
+        PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_11, __pyx_v_grp);
+        __Pyx_GIVEREF(__pyx_v_grp);
+        __Pyx_INCREF(__pyx_v_dimname);
+        PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_11, __pyx_v_dimname);
+        __Pyx_GIVEREF(__pyx_v_dimname);
+        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_3);
+        __pyx_t_3 = 0;
+
+        /* "netCDF4.pyx":2527
+ *                     # found there, look in parent (and it's parent, etc, back to root).
+ *                     dim = _find_dim(grp, dimname)
+ *                     if dim is None:             # <<<<<<<<<<<<<<
+ *                         raise KeyError("dimension %s not defined in group %s or any group in it's family tree" % (dimname, grp.path))
+ *                     dimids[n] = dim._dimid
+ */
+        __pyx_t_1 = (__pyx_v_dim == Py_None);
+        __pyx_t_8 = (__pyx_t_1 != 0);
+        if (__pyx_t_8) {
+
+          /* "netCDF4.pyx":2528
+ *                     dim = _find_dim(grp, dimname)
+ *                     if dim is None:
+ *                         raise KeyError("dimension %s not defined in group %s or any group in it's family tree" % (dimname, grp.path))             # <<<<<<<<<<<<<<
+ *                     dimids[n] = dim._dimid
+ *             # go into define mode if it's a netCDF 3 compatible
+ */
+          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_path_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_INCREF(__pyx_v_dimname);
+          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_dimname);
+          __Pyx_GIVEREF(__pyx_v_dimname);
+          PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
+          __Pyx_GIVEREF(__pyx_t_3);
+          __pyx_t_3 = 0;
+          __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_dimension_s_not_defined_in_group, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+          __Pyx_GIVEREF(__pyx_t_3);
+          __pyx_t_3 = 0;
+          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+
+        /* "netCDF4.pyx":2529
+ *                     if dim is None:
+ *                         raise KeyError("dimension %s not defined in group %s or any group in it's family tree" % (dimname, grp.path))
+ *                     dimids[n] = dim._dimid             # <<<<<<<<<<<<<<
+ *             # go into define mode if it's a netCDF 3 compatible
+ *             # file format.  Be careful to exit define mode before
+ */
+        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_dimid); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        (__pyx_v_dimids[__pyx_v_n]) = __pyx_t_12;
+      }
+      goto __pyx_L37;
+    }
+    __pyx_L37:;
+
+    /* "netCDF4.pyx":2533
+ *             # file format.  Be careful to exit define mode before
+ *             # any exceptions are raised.
+ *             if grp.data_model != 'NETCDF4': grp._redef()             # <<<<<<<<<<<<<<
+ *             # define variable.
+ *             if ndims:
+ */
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (__pyx_t_8) {
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_7 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+        if (likely(__pyx_t_7)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+          __Pyx_INCREF(__pyx_t_7);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_6, function);
+        }
+      }
+      if (__pyx_t_7) {
+        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      } else {
+        __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      goto __pyx_L41;
+    }
+    __pyx_L41:;
+
+    /* "netCDF4.pyx":2535
+ *             if grp.data_model != 'NETCDF4': grp._redef()
+ *             # define variable.
+ *             if ndims:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_def_var(self._grpid, varname, xtype, ndims,
+ *                                   dimids, &self._varid)
+ */
+    __pyx_t_8 = (__pyx_v_ndims != 0);
+    if (__pyx_t_8) {
+
+      /* "netCDF4.pyx":2536
+ *             # define variable.
+ *             if ndims:
+ *                 ierr = nc_def_var(self._grpid, varname, xtype, ndims,             # <<<<<<<<<<<<<<
+ *                                   dimids, &self._varid)
+ *             else: # a scalar variable.
+ */
+      __pyx_v_ierr = nc_def_var(__pyx_v_self->_grpid, __pyx_v_varname, __pyx_v_xtype, __pyx_v_ndims, __pyx_v_dimids, (&__pyx_v_self->_varid));
+      goto __pyx_L42;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":2539
+ *                                   dimids, &self._varid)
+ *             else: # a scalar variable.
+ *                 ierr = nc_def_var(self._grpid, varname, xtype, ndims,             # <<<<<<<<<<<<<<
+ *                                   NULL, &self._varid)
+ *             # set chunk cache size if desired
+ */
+      __pyx_v_ierr = nc_def_var(__pyx_v_self->_grpid, __pyx_v_varname, __pyx_v_xtype, __pyx_v_ndims, NULL, (&__pyx_v_self->_varid));
+    }
+    __pyx_L42:;
+
+    /* "netCDF4.pyx":2545
+ *             # of vars are created.  This change only lasts as long as file is
+ *             # open.
+ *             if grp.data_model.startswith('NETCDF4') and chunk_cache is not None:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,
+ *                         &nelemsp, &preemptionp)
+ */
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (__pyx_t_1) {
+    } else {
+      __pyx_t_8 = __pyx_t_1;
+      goto __pyx_L44_bool_binop_done;
+    }
+    __pyx_t_1 = (__pyx_v_chunk_cache != Py_None);
+    __pyx_t_2 = (__pyx_t_1 != 0);
+    __pyx_t_8 = __pyx_t_2;
+    __pyx_L44_bool_binop_done:;
+    if (__pyx_t_8) {
+
+      /* "netCDF4.pyx":2546
+ *             # open.
+ *             if grp.data_model.startswith('NETCDF4') and chunk_cache is not None:
+ *                 ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,             # <<<<<<<<<<<<<<
+ *                         &nelemsp, &preemptionp)
+ *                 if ierr != NC_NOERR:
+ */
+      __pyx_v_ierr = nc_get_var_chunk_cache(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_sizep), (&__pyx_v_nelemsp), (&__pyx_v_preemptionp));
+
+      /* "netCDF4.pyx":2548
+ *                 ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,
+ *                         &nelemsp, &preemptionp)
+ *                 if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 # reset chunk cache size, leave other parameters unchanged.
+ */
+      __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_8) {
+
+        /* "netCDF4.pyx":2549
+ *                         &nelemsp, &preemptionp)
+ *                 if ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *                 # reset chunk cache size, leave other parameters unchanged.
+ *                 sizep = chunk_cache
+ */
+        __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_3);
+        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+        __Pyx_GIVEREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":2551
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 # reset chunk cache size, leave other parameters unchanged.
+ *                 sizep = chunk_cache             # <<<<<<<<<<<<<<
+ *                 ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep,
+ *                         nelemsp, preemptionp)
+ */
+      __pyx_t_13 = __Pyx_PyInt_As_size_t(__pyx_v_chunk_cache); if (unlikely((__pyx_t_13 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_sizep = __pyx_t_13;
+
+      /* "netCDF4.pyx":2552
+ *                 # reset chunk cache size, leave other parameters unchanged.
+ *                 sizep = chunk_cache
+ *                 ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep,             # <<<<<<<<<<<<<<
+ *                         nelemsp, preemptionp)
+ *                 if ierr != NC_NOERR:
+ */
+      __pyx_v_ierr = nc_set_var_chunk_cache(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_sizep, __pyx_v_nelemsp, __pyx_v_preemptionp);
+
+      /* "netCDF4.pyx":2554
+ *                 ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep,
+ *                         nelemsp, preemptionp)
+ *                 if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             if ierr != NC_NOERR:
+ */
+      __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_8) {
+
+        /* "netCDF4.pyx":2555
+ *                         nelemsp, preemptionp)
+ *                 if ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 if grp.data_model != 'NETCDF4': grp._enddef()
+ */
+        __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_3);
+        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+        __Pyx_GIVEREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      goto __pyx_L43;
+    }
+    __pyx_L43:;
+
+    /* "netCDF4.pyx":2556
+ *                 if ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 if grp.data_model != 'NETCDF4': grp._enddef()
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+    __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_8) {
+
+      /* "netCDF4.pyx":2557
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             if ierr != NC_NOERR:
+ *                 if grp.data_model != 'NETCDF4': grp._enddef()             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             # set zlib, shuffle, chunking, fletcher32 and endian
+ */
+      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_8) {
+        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_7 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+          if (likely(__pyx_t_7)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+            __Pyx_INCREF(__pyx_t_7);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_6, function);
+          }
+        }
+        if (__pyx_t_7) {
+          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        } else {
+          __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        goto __pyx_L49;
+      }
+      __pyx_L49:;
+
+      /* "netCDF4.pyx":2558
+ *             if ierr != NC_NOERR:
+ *                 if grp.data_model != 'NETCDF4': grp._enddef()
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             # set zlib, shuffle, chunking, fletcher32 and endian
+ *             # variable settings.
+ */
+      __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_3);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+      __Pyx_GIVEREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":2565
+ *             # and fletcher32 are silently ignored. Only
+ *             # endian='native' allowed for NETCDF3.
+ *             if grp.data_model in ['NETCDF4','NETCDF4_CLASSIC']:             # <<<<<<<<<<<<<<
+ *                 # set zlib and shuffle parameters.
+ *                 if zlib and ndims: # don't bother for scalar variable
+ */
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!__pyx_t_2) {
+    } else {
+      __pyx_t_8 = __pyx_t_2;
+      goto __pyx_L51_bool_binop_done;
+    }
+    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4_CLASSIC, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = __pyx_t_2;
+    __pyx_L51_bool_binop_done:;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_2 = (__pyx_t_8 != 0);
+    if (__pyx_t_2) {
+
+      /* "netCDF4.pyx":2567
+ *             if grp.data_model in ['NETCDF4','NETCDF4_CLASSIC']:
+ *                 # set zlib and shuffle parameters.
+ *                 if zlib and ndims: # don't bother for scalar variable             # <<<<<<<<<<<<<<
+ *                     ideflate_level = complevel
+ *                     if shuffle:
+ */
+      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_zlib); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_8) {
+      } else {
+        __pyx_t_2 = __pyx_t_8;
+        goto __pyx_L54_bool_binop_done;
+      }
+      __pyx_t_8 = (__pyx_v_ndims != 0);
+      __pyx_t_2 = __pyx_t_8;
+      __pyx_L54_bool_binop_done:;
+      if (__pyx_t_2) {
+
+        /* "netCDF4.pyx":2568
+ *                 # set zlib and shuffle parameters.
+ *                 if zlib and ndims: # don't bother for scalar variable
+ *                     ideflate_level = complevel             # <<<<<<<<<<<<<<
+ *                     if shuffle:
+ *                         ierr = nc_def_var_deflate(self._grpid, self._varid, 1, 1, ideflate_level)
+ */
+        __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_complevel); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_v_ideflate_level = __pyx_t_4;
+
+        /* "netCDF4.pyx":2569
+ *                 if zlib and ndims: # don't bother for scalar variable
+ *                     ideflate_level = complevel
+ *                     if shuffle:             # <<<<<<<<<<<<<<
+ *                         ierr = nc_def_var_deflate(self._grpid, self._varid, 1, 1, ideflate_level)
+ *                     else:
+ */
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_shuffle); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (__pyx_t_2) {
+
+          /* "netCDF4.pyx":2570
+ *                     ideflate_level = complevel
+ *                     if shuffle:
+ *                         ierr = nc_def_var_deflate(self._grpid, self._varid, 1, 1, ideflate_level)             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         ierr = nc_def_var_deflate(self._grpid, self._varid, 0, 1, ideflate_level)
+ */
+          __pyx_v_ierr = nc_def_var_deflate(__pyx_v_self->_grpid, __pyx_v_self->_varid, 1, 1, __pyx_v_ideflate_level);
+          goto __pyx_L56;
+        }
+        /*else*/ {
+
+          /* "netCDF4.pyx":2572
+ *                         ierr = nc_def_var_deflate(self._grpid, self._varid, 1, 1, ideflate_level)
+ *                     else:
+ *                         ierr = nc_def_var_deflate(self._grpid, self._varid, 0, 1, ideflate_level)             # <<<<<<<<<<<<<<
+ *                     if ierr != NC_NOERR:
+ *                         if grp.data_model != 'NETCDF4': grp._enddef()
+ */
+          __pyx_v_ierr = nc_def_var_deflate(__pyx_v_self->_grpid, __pyx_v_self->_varid, 0, 1, __pyx_v_ideflate_level);
+        }
+        __pyx_L56:;
+
+        /* "netCDF4.pyx":2573
+ *                     else:
+ *                         ierr = nc_def_var_deflate(self._grpid, self._varid, 0, 1, ideflate_level)
+ *                     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                         if grp.data_model != 'NETCDF4': grp._enddef()
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+        __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
+        if (__pyx_t_2) {
+
+          /* "netCDF4.pyx":2574
+ *                         ierr = nc_def_var_deflate(self._grpid, self._varid, 0, 1, ideflate_level)
+ *                     if ierr != NC_NOERR:
+ *                         if grp.data_model != 'NETCDF4': grp._enddef()             # <<<<<<<<<<<<<<
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 # set checksum.
+ */
+          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          if (__pyx_t_2) {
+            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_6);
+            __pyx_t_7 = NULL;
+            if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+              __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+              if (likely(__pyx_t_7)) {
+                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+                __Pyx_INCREF(__pyx_t_7);
+                __Pyx_INCREF(function);
+                __Pyx_DECREF_SET(__pyx_t_6, function);
+              }
+            }
+            if (__pyx_t_7) {
+              __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+            } else {
+              __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            __Pyx_GOTREF(__pyx_t_3);
+            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+            goto __pyx_L58;
+          }
+          __pyx_L58:;
+
+          /* "netCDF4.pyx":2575
+ *                     if ierr != NC_NOERR:
+ *                         if grp.data_model != 'NETCDF4': grp._enddef()
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *                 # set checksum.
+ *                 if fletcher32 and ndims: # don't bother for scalar variable
+ */
+          __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr));
+          __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_INCREF(__pyx_t_3);
+          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+          __Pyx_GIVEREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        goto __pyx_L53;
+      }
+      __pyx_L53:;
+
+      /* "netCDF4.pyx":2577
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 # set checksum.
+ *                 if fletcher32 and ndims: # don't bother for scalar variable             # <<<<<<<<<<<<<<
+ *                     ierr = nc_def_var_fletcher32(self._grpid, self._varid, 1)
+ *                     if ierr != NC_NOERR:
+ */
+      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_fletcher32); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_8) {
+      } else {
+        __pyx_t_2 = __pyx_t_8;
+        goto __pyx_L60_bool_binop_done;
+      }
+      __pyx_t_8 = (__pyx_v_ndims != 0);
+      __pyx_t_2 = __pyx_t_8;
+      __pyx_L60_bool_binop_done:;
+      if (__pyx_t_2) {
+
+        /* "netCDF4.pyx":2578
+ *                 # set checksum.
+ *                 if fletcher32 and ndims: # don't bother for scalar variable
+ *                     ierr = nc_def_var_fletcher32(self._grpid, self._varid, 1)             # <<<<<<<<<<<<<<
+ *                     if ierr != NC_NOERR:
+ *                         if grp.data_model != 'NETCDF4': grp._enddef()
+ */
+        __pyx_v_ierr = nc_def_var_fletcher32(__pyx_v_self->_grpid, __pyx_v_self->_varid, 1);
+
+        /* "netCDF4.pyx":2579
+ *                 if fletcher32 and ndims: # don't bother for scalar variable
+ *                     ierr = nc_def_var_fletcher32(self._grpid, self._varid, 1)
+ *                     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                         if grp.data_model != 'NETCDF4': grp._enddef()
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+        __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
+        if (__pyx_t_2) {
+
+          /* "netCDF4.pyx":2580
+ *                     ierr = nc_def_var_fletcher32(self._grpid, self._varid, 1)
+ *                     if ierr != NC_NOERR:
+ *                         if grp.data_model != 'NETCDF4': grp._enddef()             # <<<<<<<<<<<<<<
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 # set chunking stuff.
+ */
+          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          if (__pyx_t_2) {
+            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_6);
+            __pyx_t_7 = NULL;
+            if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+              __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+              if (likely(__pyx_t_7)) {
+                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+                __Pyx_INCREF(__pyx_t_7);
+                __Pyx_INCREF(function);
+                __Pyx_DECREF_SET(__pyx_t_6, function);
+              }
+            }
+            if (__pyx_t_7) {
+              __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+            } else {
+              __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            __Pyx_GOTREF(__pyx_t_3);
+            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+            goto __pyx_L63;
+          }
+          __pyx_L63:;
+
+          /* "netCDF4.pyx":2581
+ *                     if ierr != NC_NOERR:
+ *                         if grp.data_model != 'NETCDF4': grp._enddef()
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *                 # set chunking stuff.
+ *                 if ndims: # don't bother for scalar variable.
+ */
+          __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr));
+          __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_INCREF(__pyx_t_3);
+          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+          __Pyx_GIVEREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        goto __pyx_L59;
+      }
+      __pyx_L59:;
+
+      /* "netCDF4.pyx":2583
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 # set chunking stuff.
+ *                 if ndims: # don't bother for scalar variable.             # <<<<<<<<<<<<<<
+ *                     if contiguous:
+ *                         icontiguous = NC_CONTIGUOUS
+ */
+      __pyx_t_2 = (__pyx_v_ndims != 0);
+      if (__pyx_t_2) {
+
+        /* "netCDF4.pyx":2584
+ *                 # set chunking stuff.
+ *                 if ndims: # don't bother for scalar variable.
+ *                     if contiguous:             # <<<<<<<<<<<<<<
+ *                         icontiguous = NC_CONTIGUOUS
+ *                         if chunksizes is not None:
+ */
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_contiguous); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (__pyx_t_2) {
+
+          /* "netCDF4.pyx":2585
+ *                 if ndims: # don't bother for scalar variable.
+ *                     if contiguous:
+ *                         icontiguous = NC_CONTIGUOUS             # <<<<<<<<<<<<<<
+ *                         if chunksizes is not None:
+ *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')
+ */
+          __pyx_v_icontiguous = NC_CONTIGUOUS;
+
+          /* "netCDF4.pyx":2586
+ *                     if contiguous:
+ *                         icontiguous = NC_CONTIGUOUS
+ *                         if chunksizes is not None:             # <<<<<<<<<<<<<<
+ *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')
+ *                     else:
+ */
+          __pyx_t_2 = (__pyx_v_chunksizes != Py_None);
+          __pyx_t_8 = (__pyx_t_2 != 0);
+          if (__pyx_t_8) {
+
+            /* "netCDF4.pyx":2587
+ *                         icontiguous = NC_CONTIGUOUS
+ *                         if chunksizes is not None:
+ *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         icontiguous = NC_CHUNKED
+ */
+            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_3);
+            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          goto __pyx_L65;
+        }
+        /*else*/ {
+
+          /* "netCDF4.pyx":2589
+ *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')
+ *                     else:
+ *                         icontiguous = NC_CHUNKED             # <<<<<<<<<<<<<<
+ *                     if chunksizes is None:
+ *                         chunksizesp = NULL
+ */
+          __pyx_v_icontiguous = NC_CHUNKED;
+        }
+        __pyx_L65:;
+
+        /* "netCDF4.pyx":2590
+ *                     else:
+ *                         icontiguous = NC_CHUNKED
+ *                     if chunksizes is None:             # <<<<<<<<<<<<<<
+ *                         chunksizesp = NULL
+ *                     else:
+ */
+        __pyx_t_8 = (__pyx_v_chunksizes == Py_None);
+        __pyx_t_2 = (__pyx_t_8 != 0);
+        if (__pyx_t_2) {
+
+          /* "netCDF4.pyx":2591
+ *                         icontiguous = NC_CHUNKED
+ *                     if chunksizes is None:
+ *                         chunksizesp = NULL             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         if len(chunksizes) != len(dimensions):
+ */
+          __pyx_v_chunksizesp = NULL;
+          goto __pyx_L67;
+        }
+        /*else*/ {
+
+          /* "netCDF4.pyx":2593
+ *                         chunksizesp = NULL
+ *                     else:
+ *                         if len(chunksizes) != len(dimensions):             # <<<<<<<<<<<<<<
+ *                             if grp.data_model != 'NETCDF4': grp._enddef()
+ *                             raise ValueError('chunksizes must be a sequence with the same length as dimensions')
+ */
+          __pyx_t_11 = PyObject_Length(__pyx_v_chunksizes); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_14 = PyObject_Length(__pyx_v_dimensions); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_2 = ((__pyx_t_11 != __pyx_t_14) != 0);
+          if (__pyx_t_2) {
+
+            /* "netCDF4.pyx":2594
+ *                     else:
+ *                         if len(chunksizes) != len(dimensions):
+ *                             if grp.data_model != 'NETCDF4': grp._enddef()             # <<<<<<<<<<<<<<
+ *                             raise ValueError('chunksizes must be a sequence with the same length as dimensions')
+ *                         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
+ */
+            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_3);
+            __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+            if (__pyx_t_2) {
+              __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              __Pyx_GOTREF(__pyx_t_6);
+              __pyx_t_7 = NULL;
+              if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+                __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+                if (likely(__pyx_t_7)) {
+                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+                  __Pyx_INCREF(__pyx_t_7);
+                  __Pyx_INCREF(function);
+                  __Pyx_DECREF_SET(__pyx_t_6, function);
+                }
+              }
+              if (__pyx_t_7) {
+                __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+                __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+              } else {
+                __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              }
+              __Pyx_GOTREF(__pyx_t_3);
+              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+              goto __pyx_L69;
+            }
+            __pyx_L69:;
+
+            /* "netCDF4.pyx":2595
+ *                         if len(chunksizes) != len(dimensions):
+ *                             if grp.data_model != 'NETCDF4': grp._enddef()
+ *                             raise ValueError('chunksizes must be a sequence with the same length as dimensions')             # <<<<<<<<<<<<<<
+ *                         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
+ *                         for n from 0 <= n < ndims:
+ */
+            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_3);
+            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+
+          /* "netCDF4.pyx":2596
+ *                             if grp.data_model != 'NETCDF4': grp._enddef()
+ *                             raise ValueError('chunksizes must be a sequence with the same length as dimensions')
+ *                         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)             # <<<<<<<<<<<<<<
+ *                         for n from 0 <= n < ndims:
+ *                             chunksizesp[n] = chunksizes[n]
+ */
+          __pyx_v_chunksizesp = ((size_t *)malloc(((sizeof(size_t)) * __pyx_v_ndims)));
+
+          /* "netCDF4.pyx":2597
+ *                             raise ValueError('chunksizes must be a sequence with the same length as dimensions')
+ *                         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
+ *                         for n from 0 <= n < ndims:             # <<<<<<<<<<<<<<
+ *                             chunksizesp[n] = chunksizes[n]
+ *                     if chunksizes is not None or contiguous:
+ */
+          __pyx_t_4 = __pyx_v_ndims;
+          for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {
+
+            /* "netCDF4.pyx":2598
+ *                         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
+ *                         for n from 0 <= n < ndims:
+ *                             chunksizesp[n] = chunksizes[n]             # <<<<<<<<<<<<<<
+ *                     if chunksizes is not None or contiguous:
+ *                         ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp)
+ */
+            __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_chunksizes, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+            __Pyx_GOTREF(__pyx_t_3);
+            __pyx_t_13 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_13 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+            (__pyx_v_chunksizesp[__pyx_v_n]) = __pyx_t_13;
+          }
+        }
+        __pyx_L67:;
+
+        /* "netCDF4.pyx":2599
+ *                         for n from 0 <= n < ndims:
+ *                             chunksizesp[n] = chunksizes[n]
+ *                     if chunksizes is not None or contiguous:             # <<<<<<<<<<<<<<
+ *                         ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp)
+ *                         free(chunksizesp)
+ */
+        __pyx_t_8 = (__pyx_v_chunksizes != Py_None);
+        __pyx_t_1 = (__pyx_t_8 != 0);
+        if (!__pyx_t_1) {
+        } else {
+          __pyx_t_2 = __pyx_t_1;
+          goto __pyx_L73_bool_binop_done;
+        }
+        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_contiguous); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __pyx_t_1;
+        __pyx_L73_bool_binop_done:;
+        if (__pyx_t_2) {
+
+          /* "netCDF4.pyx":2600
+ *                             chunksizesp[n] = chunksizes[n]
+ *                     if chunksizes is not None or contiguous:
+ *                         ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp)             # <<<<<<<<<<<<<<
+ *                         free(chunksizesp)
+ *                         if ierr != NC_NOERR:
+ */
+          __pyx_v_ierr = nc_def_var_chunking(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_icontiguous, __pyx_v_chunksizesp);
+
+          /* "netCDF4.pyx":2601
+ *                     if chunksizes is not None or contiguous:
+ *                         ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp)
+ *                         free(chunksizesp)             # <<<<<<<<<<<<<<
+ *                         if ierr != NC_NOERR:
+ *                             if grp.data_model != 'NETCDF4': grp._enddef()
+ */
+          free(__pyx_v_chunksizesp);
+
+          /* "netCDF4.pyx":2602
+ *                         ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp)
+ *                         free(chunksizesp)
+ *                         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                             if grp.data_model != 'NETCDF4': grp._enddef()
+ *                             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+          __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
+          if (__pyx_t_2) {
+
+            /* "netCDF4.pyx":2603
+ *                         free(chunksizesp)
+ *                         if ierr != NC_NOERR:
+ *                             if grp.data_model != 'NETCDF4': grp._enddef()             # <<<<<<<<<<<<<<
+ *                             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 # set endian-ness of variable
+ */
+            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_3);
+            __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+            if (__pyx_t_2) {
+              __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              __Pyx_GOTREF(__pyx_t_6);
+              __pyx_t_7 = NULL;
+              if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+                __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+                if (likely(__pyx_t_7)) {
+                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+                  __Pyx_INCREF(__pyx_t_7);
+                  __Pyx_INCREF(function);
+                  __Pyx_DECREF_SET(__pyx_t_6, function);
+                }
+              }
+              if (__pyx_t_7) {
+                __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+                __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+              } else {
+                __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              }
+              __Pyx_GOTREF(__pyx_t_3);
+              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+              goto __pyx_L76;
+            }
+            __pyx_L76:;
+
+            /* "netCDF4.pyx":2604
+ *                         if ierr != NC_NOERR:
+ *                             if grp.data_model != 'NETCDF4': grp._enddef()
+ *                             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *                 # set endian-ness of variable
+ *                 if endian == 'little':
+ */
+            __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr));
+            __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_3);
+            __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_6);
+            __Pyx_INCREF(__pyx_t_3);
+            PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+            __Pyx_GIVEREF(__pyx_t_3);
+            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_3);
+            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          goto __pyx_L72;
+        }
+        __pyx_L72:;
+        goto __pyx_L64;
+      }
+      __pyx_L64:;
+
+      /* "netCDF4.pyx":2606
+ *                             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 # set endian-ness of variable
+ *                 if endian == 'little':             # <<<<<<<<<<<<<<
+ *                     ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_LITTLE)
+ *                 elif endian == 'big':
+ */
+      __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_endian, __pyx_n_s_little, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_2) {
+
+        /* "netCDF4.pyx":2607
+ *                 # set endian-ness of variable
+ *                 if endian == 'little':
+ *                     ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_LITTLE)             # <<<<<<<<<<<<<<
+ *                 elif endian == 'big':
+ *                     ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_BIG)
+ */
+        __pyx_v_ierr = nc_def_var_endian(__pyx_v_self->_grpid, __pyx_v_self->_varid, NC_ENDIAN_LITTLE);
+        goto __pyx_L77;
+      }
+
+      /* "netCDF4.pyx":2608
+ *                 if endian == 'little':
+ *                     ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_LITTLE)
+ *                 elif endian == 'big':             # <<<<<<<<<<<<<<
+ *                     ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_BIG)
+ *                 elif endian == 'native':
+ */
+      __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_endian, __pyx_n_s_big, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_2) {
+
+        /* "netCDF4.pyx":2609
+ *                     ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_LITTLE)
+ *                 elif endian == 'big':
+ *                     ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_BIG)             # <<<<<<<<<<<<<<
+ *                 elif endian == 'native':
+ *                     pass # this is the default format.
+ */
+        __pyx_v_ierr = nc_def_var_endian(__pyx_v_self->_grpid, __pyx_v_self->_varid, NC_ENDIAN_BIG);
+        goto __pyx_L77;
+      }
+
+      /* "netCDF4.pyx":2610
+ *                 elif endian == 'big':
+ *                     ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_BIG)
+ *                 elif endian == 'native':             # <<<<<<<<<<<<<<
+ *                     pass # this is the default format.
+ *                 else:
+ */
+      __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_endian, __pyx_n_s_native, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_2) {
+        goto __pyx_L77;
+      }
+      /*else*/ {
+
+        /* "netCDF4.pyx":2613
+ *                     pass # this is the default format.
+ *                 else:
+ *                     raise ValueError("'endian' keyword argument must be 'little','big' or 'native', got '%s'" % endian)             # <<<<<<<<<<<<<<
+ *                 if ierr != NC_NOERR:
+ *                     if grp.data_model != 'NETCDF4': grp._enddef()
+ */
+        __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_endian_keyword_argument_must_be, __pyx_v_endian); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+        __Pyx_GIVEREF(__pyx_t_3);
+        __pyx_t_3 = 0;
+        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __pyx_L77:;
+
+      /* "netCDF4.pyx":2614
+ *                 else:
+ *                     raise ValueError("'endian' keyword argument must be 'little','big' or 'native', got '%s'" % endian)
+ *                 if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                     if grp.data_model != 'NETCDF4': grp._enddef()
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+      __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_2) {
+
+        /* "netCDF4.pyx":2615
+ *                     raise ValueError("'endian' keyword argument must be 'little','big' or 'native', got '%s'" % endian)
+ *                 if ierr != NC_NOERR:
+ *                     if grp.data_model != 'NETCDF4': grp._enddef()             # <<<<<<<<<<<<<<
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             else:
+ */
+        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        if (__pyx_t_2) {
+          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __pyx_t_7 = NULL;
+          if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+            if (likely(__pyx_t_7)) {
+              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+              __Pyx_INCREF(__pyx_t_7);
+              __Pyx_INCREF(function);
+              __Pyx_DECREF_SET(__pyx_t_6, function);
+            }
+          }
+          if (__pyx_t_7) {
+            __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          } else {
+            __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          goto __pyx_L79;
+        }
+        __pyx_L79:;
+
+        /* "netCDF4.pyx":2616
+ *                 if ierr != NC_NOERR:
+ *                     if grp.data_model != 'NETCDF4': grp._enddef()
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             else:
+ *                 if endian != 'native':
+ */
+        __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_3);
+        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+        __Pyx_GIVEREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      goto __pyx_L50;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":2618
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             else:
+ *                 if endian != 'native':             # <<<<<<<<<<<<<<
+ *                     msg="only endian='native' allowed for NETCDF3 files"
+ *                     raise RuntimeError(msg)
+ */
+      __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_endian, __pyx_n_s_native, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_2) {
+
+        /* "netCDF4.pyx":2619
+ *             else:
+ *                 if endian != 'native':
+ *                     msg="only endian='native' allowed for NETCDF3 files"             # <<<<<<<<<<<<<<
+ *                     raise RuntimeError(msg)
+ *             # set a fill value for this variable if fill_value keyword
+ */
+        __Pyx_INCREF(__pyx_kp_s_only_endian_native_allowed_for_N);
+        __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_kp_s_only_endian_native_allowed_for_N);
+
+        /* "netCDF4.pyx":2620
+ *                 if endian != 'native':
+ *                     msg="only endian='native' allowed for NETCDF3 files"
+ *                     raise RuntimeError(msg)             # <<<<<<<<<<<<<<
+ *             # set a fill value for this variable if fill_value keyword
+ *             # given.  This avoids the HDF5 overhead of deleting and
+ */
+        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_INCREF(__pyx_v_msg);
+        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_msg);
+        __Pyx_GIVEREF(__pyx_v_msg);
+        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+    }
+    __pyx_L50:;
+
+    /* "netCDF4.pyx":2624
+ *             # given.  This avoids the HDF5 overhead of deleting and
+ *             # recreating the dataset if it is set later (after the enddef).
+ *             if fill_value is not None:             # <<<<<<<<<<<<<<
+ *                 if not fill_value and isinstance(fill_value,bool):
+ *                     # no filling for this variable if fill_value==False.
+ */
+    __pyx_t_2 = (__pyx_v_fill_value != Py_None);
+    __pyx_t_1 = (__pyx_t_2 != 0);
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":2625
+ *             # recreating the dataset if it is set later (after the enddef).
+ *             if fill_value is not None:
+ *                 if not fill_value and isinstance(fill_value,bool):             # <<<<<<<<<<<<<<
+ *                     # no filling for this variable if fill_value==False.
+ *                     if not self._isprimitive:
+ */
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fill_value); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = ((!__pyx_t_2) != 0);
+      if (__pyx_t_8) {
+      } else {
+        __pyx_t_1 = __pyx_t_8;
+        goto __pyx_L83_bool_binop_done;
+      }
+      __pyx_t_6 = ((PyObject*)&PyBool_Type);
+      __Pyx_INCREF(__pyx_t_6);
+      __pyx_t_8 = PyObject_IsInstance(__pyx_v_fill_value, __pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_2 = (__pyx_t_8 != 0);
+      __pyx_t_1 = __pyx_t_2;
+      __pyx_L83_bool_binop_done:;
+      if (__pyx_t_1) {
+
+        /* "netCDF4.pyx":2627
+ *                 if not fill_value and isinstance(fill_value,bool):
+ *                     # no filling for this variable if fill_value==False.
+ *                     if not self._isprimitive:             # <<<<<<<<<<<<<<
+ *                         # no fill values for VLEN and compound variables
+ *                         # anyway.
+ */
+        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = ((!__pyx_t_1) != 0);
+        if (__pyx_t_2) {
+
+          /* "netCDF4.pyx":2630
+ *                         # no fill values for VLEN and compound variables
+ *                         # anyway.
+ *                         ierr = 0             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL)
+ */
+          __pyx_v_ierr = 0;
+          goto __pyx_L85;
+        }
+        /*else*/ {
+
+          /* "netCDF4.pyx":2632
+ *                         ierr = 0
+ *                     else:
+ *                         ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL)             # <<<<<<<<<<<<<<
+ *                     if ierr != NC_NOERR:
+ *                         if grp.data_model != 'NETCDF4': grp._enddef()
+ */
+          __pyx_v_ierr = nc_def_var_fill(__pyx_v_self->_grpid, __pyx_v_self->_varid, 1, NULL);
+        }
+        __pyx_L85:;
+
+        /* "netCDF4.pyx":2633
+ *                     else:
+ *                         ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL)
+ *                     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                         if grp.data_model != 'NETCDF4': grp._enddef()
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+        __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
+        if (__pyx_t_2) {
+
+          /* "netCDF4.pyx":2634
+ *                         ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL)
+ *                     if ierr != NC_NOERR:
+ *                         if grp.data_model != 'NETCDF4': grp._enddef()             # <<<<<<<<<<<<<<
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 else:
+ */
+          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          if (__pyx_t_2) {
+            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_3);
+            __pyx_t_7 = NULL;
+            if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+              __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+              if (likely(__pyx_t_7)) {
+                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+                __Pyx_INCREF(__pyx_t_7);
+                __Pyx_INCREF(function);
+                __Pyx_DECREF_SET(__pyx_t_3, function);
+              }
+            }
+            if (__pyx_t_7) {
+              __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+            } else {
+              __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            __Pyx_GOTREF(__pyx_t_6);
+            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+            goto __pyx_L87;
+          }
+          __pyx_L87:;
+
+          /* "netCDF4.pyx":2635
+ *                     if ierr != NC_NOERR:
+ *                         if grp.data_model != 'NETCDF4': grp._enddef()
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     # cast fill_value to type of variable.
+ */
+          __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr));
+          __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_INCREF(__pyx_t_6);
+          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
+          __Pyx_GIVEREF(__pyx_t_6);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        goto __pyx_L82;
+      }
+      /*else*/ {
+
+        /* "netCDF4.pyx":2638
+ *                 else:
+ *                     # cast fill_value to type of variable.
+ *                     if self._isprimitive:             # <<<<<<<<<<<<<<
+ *                         fillval = numpy.array(fill_value, self.dtype)
+ *                         _set_att(self._grp, self._varid, '_FillValue', fillval)
+ */
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (__pyx_t_2) {
+
+          /* "netCDF4.pyx":2639
+ *                     # cast fill_value to type of variable.
+ *                     if self._isprimitive:
+ *                         fillval = numpy.array(fill_value, self.dtype)             # <<<<<<<<<<<<<<
+ *                         _set_att(self._grp, self._varid, '_FillValue', fillval)
+ *                     else:
+ */
+          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __pyx_t_3 = NULL;
+          __pyx_t_14 = 0;
+          if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
+            if (likely(__pyx_t_3)) {
+              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+              __Pyx_INCREF(__pyx_t_3);
+              __Pyx_INCREF(function);
+              __Pyx_DECREF_SET(__pyx_t_7, function);
+              __pyx_t_14 = 1;
+            }
+          }
+          __pyx_t_5 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_5);
+          if (__pyx_t_3) {
+            PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+          }
+          __Pyx_INCREF(__pyx_v_fill_value);
+          PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_14, __pyx_v_fill_value);
+          __Pyx_GIVEREF(__pyx_v_fill_value);
+          __Pyx_INCREF(__pyx_v_self->dtype);
+          PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_14, __pyx_v_self->dtype);
+          __Pyx_GIVEREF(__pyx_v_self->dtype);
+          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          __pyx_v_fillval = __pyx_t_6;
+          __pyx_t_6 = 0;
+
+          /* "netCDF4.pyx":2640
+ *                     if self._isprimitive:
+ *                         fillval = numpy.array(fill_value, self.dtype)
+ *                         _set_att(self._grp, self._varid, '_FillValue', fillval)             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         raise AttributeError("cannot set _FillValue attribute for VLEN or compound variable")
+ */
+          __pyx_t_6 = __pyx_v_self->_grp;
+          __Pyx_INCREF(__pyx_t_6);
+          __pyx_t_7 = __pyx_f_7netCDF4__set_att(__pyx_t_6, __pyx_v_self->_varid, __pyx_n_s_FillValue, __pyx_v_fillval); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          goto __pyx_L88;
+        }
+        /*else*/ {
+
+          /* "netCDF4.pyx":2642
+ *                         _set_att(self._grp, self._varid, '_FillValue', fillval)
+ *                     else:
+ *                         raise AttributeError("cannot set _FillValue attribute for VLEN or compound variable")             # <<<<<<<<<<<<<<
+ *             if least_significant_digit is not None:
+ *                 self.least_significant_digit = least_significant_digit
+ */
+          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        __pyx_L88:;
+      }
+      __pyx_L82:;
+      goto __pyx_L81;
+    }
+    __pyx_L81:;
+
+    /* "netCDF4.pyx":2643
+ *                     else:
+ *                         raise AttributeError("cannot set _FillValue attribute for VLEN or compound variable")
+ *             if least_significant_digit is not None:             # <<<<<<<<<<<<<<
+ *                 self.least_significant_digit = least_significant_digit
+ *             # leave define mode if not a NETCDF4 format file.
+ */
+    __pyx_t_2 = (__pyx_v_least_significant_digit != Py_None);
+    __pyx_t_1 = (__pyx_t_2 != 0);
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":2644
+ *                         raise AttributeError("cannot set _FillValue attribute for VLEN or compound variable")
+ *             if least_significant_digit is not None:
+ *                 self.least_significant_digit = least_significant_digit             # <<<<<<<<<<<<<<
+ *             # leave define mode if not a NETCDF4 format file.
+ *             if grp.data_model != 'NETCDF4': grp._enddef()
+ */
+      if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_least_significant_digit, __pyx_v_least_significant_digit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L89;
+    }
+    __pyx_L89:;
+
+    /* "netCDF4.pyx":2646
+ *                 self.least_significant_digit = least_significant_digit
+ *             # leave define mode if not a NETCDF4 format file.
+ *             if grp.data_model != 'NETCDF4': grp._enddef()             # <<<<<<<<<<<<<<
+ *         # count how many unlimited dimensions there are.
+ *         self._nunlimdim = 0
+ */
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    if (__pyx_t_1) {
+      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_5 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
+        if (likely(__pyx_t_5)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+          __Pyx_INCREF(__pyx_t_5);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_6, function);
+        }
+      }
+      if (__pyx_t_5) {
+        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      } else {
+        __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      goto __pyx_L90;
+    }
+    __pyx_L90:;
+  }
+  __pyx_L36:;
+
+  /* "netCDF4.pyx":2648
+ *             if grp.data_model != 'NETCDF4': grp._enddef()
+ *         # count how many unlimited dimensions there are.
+ *         self._nunlimdim = 0             # <<<<<<<<<<<<<<
+ *         for dimname in dimensions:
+ *             # look in current group, and parents for dim.
+ */
+  __pyx_v_self->_nunlimdim = 0;
+
+  /* "netCDF4.pyx":2649
+ *         # count how many unlimited dimensions there are.
+ *         self._nunlimdim = 0
+ *         for dimname in dimensions:             # <<<<<<<<<<<<<<
+ *             # look in current group, and parents for dim.
+ *             dim = _find_dim(self._grp, dimname)
+ */
+  if (likely(PyList_CheckExact(__pyx_v_dimensions)) || PyTuple_CheckExact(__pyx_v_dimensions)) {
+    __pyx_t_7 = __pyx_v_dimensions; __Pyx_INCREF(__pyx_t_7); __pyx_t_14 = 0;
+    __pyx_t_15 = NULL;
+  } else {
+    __pyx_t_14 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_dimensions); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_15 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  for (;;) {
+    if (likely(!__pyx_t_15)) {
+      if (likely(PyList_CheckExact(__pyx_t_7))) {
+        if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_7)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_14); __Pyx_INCREF(__pyx_t_6); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_14); __Pyx_INCREF(__pyx_t_6); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_6 = __pyx_t_15(__pyx_t_7);
+      if (unlikely(!__pyx_t_6)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_6);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_6);
+    __pyx_t_6 = 0;
+
+    /* "netCDF4.pyx":2651
+ *         for dimname in dimensions:
+ *             # look in current group, and parents for dim.
+ *             dim = _find_dim(self._grp, dimname)             # <<<<<<<<<<<<<<
+ *             if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1
+ *         # set ndim attribute (number of dimensions).
+ */
+    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_3 = NULL;
+    __pyx_t_11 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
+      if (likely(__pyx_t_3)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_3);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_5, function);
+        __pyx_t_11 = 1;
+      }
+    }
+    __pyx_t_16 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_16);
+    if (__pyx_t_3) {
+      PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_self->_grp);
+    PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_11, __pyx_v_self->_grp);
+    __Pyx_GIVEREF(__pyx_v_self->_grp);
+    __Pyx_INCREF(__pyx_v_dimname);
+    PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_11, __pyx_v_dimname);
+    __Pyx_GIVEREF(__pyx_v_dimname);
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_16, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_6);
+    __pyx_t_6 = 0;
+
+    /* "netCDF4.pyx":2652
+ *             # look in current group, and parents for dim.
+ *             dim = _find_dim(self._grp, dimname)
+ *             if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1             # <<<<<<<<<<<<<<
+ *         # set ndim attribute (number of dimensions).
+ *         ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_16 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+      __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_5);
+      if (likely(__pyx_t_16)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_16);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_5, function);
+      }
+    }
+    if (__pyx_t_16) {
+      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+    } else {
+      __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    if (__pyx_t_1) {
+      __pyx_v_self->_nunlimdim = (__pyx_v_self->_nunlimdim + 1);
+      goto __pyx_L93;
+    }
+    __pyx_L93:;
+
+    /* "netCDF4.pyx":2649
+ *         # count how many unlimited dimensions there are.
+ *         self._nunlimdim = 0
+ *         for dimname in dimensions:             # <<<<<<<<<<<<<<
+ *             # look in current group, and parents for dim.
+ *             dim = _find_dim(self._grp, dimname)
+ */
+  }
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "netCDF4.pyx":2654
+ *             if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1
+ *         # set ndim attribute (number of dimensions).
+ *         ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_v_ierr = nc_inq_varndims(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_numdims));
+
+  /* "netCDF4.pyx":2655
+ *         # set ndim attribute (number of dimensions).
+ *         ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         self.ndim = numdims
+ */
+  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":2656
+ *         ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         self.ndim = numdims
+ *         self._name = name
+ */
+    __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_INCREF(__pyx_t_7);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
+    __Pyx_GIVEREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":2657
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         self.ndim = numdims             # <<<<<<<<<<<<<<
+ *         self._name = name
+ *         # default for automatically applying scale_factor and
+ */
+  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_numdims); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_GIVEREF(__pyx_t_7);
+  __Pyx_GOTREF(__pyx_v_self->ndim);
+  __Pyx_DECREF(__pyx_v_self->ndim);
+  __pyx_v_self->ndim = __pyx_t_7;
+  __pyx_t_7 = 0;
+
+  /* "netCDF4.pyx":2658
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         self.ndim = numdims
+ *         self._name = name             # <<<<<<<<<<<<<<
+ *         # default for automatically applying scale_factor and
+ *         # add_offset, and converting to/from masked arrays is True.
+ */
+  __Pyx_INCREF(__pyx_v_name);
+  __Pyx_GIVEREF(__pyx_v_name);
+  __Pyx_GOTREF(__pyx_v_self->_name);
+  __Pyx_DECREF(__pyx_v_self->_name);
+  __pyx_v_self->_name = __pyx_v_name;
+
+  /* "netCDF4.pyx":2661
+ *         # default for automatically applying scale_factor and
+ *         # add_offset, and converting to/from masked arrays is True.
+ *         self.scale = True             # <<<<<<<<<<<<<<
+ *         self.mask = True
+ * 
+ */
+  __Pyx_INCREF(Py_True);
+  __Pyx_GIVEREF(Py_True);
+  __Pyx_GOTREF(__pyx_v_self->scale);
+  __Pyx_DECREF(__pyx_v_self->scale);
+  __pyx_v_self->scale = Py_True;
+
+  /* "netCDF4.pyx":2662
+ *         # add_offset, and converting to/from masked arrays is True.
+ *         self.scale = True
+ *         self.mask = True             # <<<<<<<<<<<<<<
+ * 
+ *     def __array__(self):
+ */
+  __Pyx_INCREF(Py_True);
+  __Pyx_GIVEREF(Py_True);
+  __Pyx_GOTREF(__pyx_v_self->mask);
+  __Pyx_DECREF(__pyx_v_self->mask);
+  __pyx_v_self->mask = Py_True;
+
+  /* "netCDF4.pyx":2431
+ *     _isvlen, _grp,_cmptype,_vltype
+ * 
+ *     def __init__(self, grp, name, datatype, dimensions=(), zlib=False,             # <<<<<<<<<<<<<<
+ *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
+ *             chunksizes=None, endian='native', least_significant_digit=None,
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_16);
+  __Pyx_AddTraceback("netCDF4.Variable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_dtype_endian);
+  __Pyx_XDECREF(__pyx_v_msg);
+  __Pyx_XDECREF(__pyx_v_bytestr);
+  __Pyx_XDECREF(__pyx_v_dimname);
+  __Pyx_XDECREF(__pyx_v_dim);
+  __Pyx_XDECREF(__pyx_v_fillval);
+  __Pyx_XDECREF(__pyx_v_datatype);
+  __Pyx_XDECREF(__pyx_v_dimensions);
+  __Pyx_XDECREF(__pyx_v_zlib);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2664
+ *         self.mask = True
+ * 
+ *     def __array__(self):             # <<<<<<<<<<<<<<
+ *         # numpy special method that returns a numpy array.
+ * 	# allows numpy ufuncs to work faster on Variable objects
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_3__array__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_3__array__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_2__array__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_2__array__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__array__", 0);
+
+  /* "netCDF4.pyx":2668
+ * 	# allows numpy ufuncs to work faster on Variable objects
+ * 	# (issue 216).
+ *         return self[...]             # <<<<<<<<<<<<<<
+ * 
+ *     def __repr__(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self), Py_Ellipsis); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2668; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2664
+ *         self.mask = True
+ * 
+ *     def __array__(self):             # <<<<<<<<<<<<<<
+ *         # numpy special method that returns a numpy array.
+ * 	# allows numpy ufuncs to work faster on Variable objects
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Variable.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2670
+ *         return self[...]
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *            return self.__unicode__()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_5__repr__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_5__repr__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_4__repr__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_4__repr__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__repr__", 0);
+
+  /* "netCDF4.pyx":2671
+ * 
+ *     def __repr__(self):
+ *         if python3:             # <<<<<<<<<<<<<<
+ *            return self.__unicode__()
+ *         else:
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":2672
+ *     def __repr__(self):
+ *         if python3:
+ *            return self.__unicode__()             # <<<<<<<<<<<<<<
+ *         else:
+ *            return unicode(self).encode(default_encoding)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":2674
+ *            return self.__unicode__()
+ *         else:
+ *            return unicode(self).encode(default_encoding)             # <<<<<<<<<<<<<<
+ * 
+ *     def __unicode__(self):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_INCREF(((PyObject *)__pyx_v_self));
+    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
+    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (!__pyx_t_5) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
+      __Pyx_GIVEREF(__pyx_t_4);
+      __pyx_t_4 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":2670
+ *         return self[...]
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *            return self.__unicode__()
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netCDF4.Variable.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2676
+ *            return unicode(self).encode(default_encoding)
+ * 
+ *     def __unicode__(self):             # <<<<<<<<<<<<<<
+ *         cdef int ierr, no_fill
+ *         if not dir(self._grp):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_7__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_7__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__unicode__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_6__unicode__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_6__unicode__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_v_ierr;
+  int __pyx_v_no_fill;
+  PyObject *__pyx_v_ncdump_var = NULL;
+  PyObject *__pyx_v_dimnames = NULL;
+  PyObject *__pyx_v_attrs = NULL;
+  PyObject *__pyx_v_unlimdims = NULL;
+  PyObject *__pyx_v_dimname = NULL;
+  PyObject *__pyx_v_dim = NULL;
+  PyObject *__pyx_v_fillval = NULL;
+  PyObject *__pyx_v_msg = NULL;
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  Py_ssize_t __pyx_t_6;
+  PyObject *(*__pyx_t_7)(PyObject *);
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  int __pyx_t_11;
+  Py_ssize_t __pyx_t_12;
+  char *__pyx_t_13;
+  PyObject *__pyx_t_14 = NULL;
+  PyObject *__pyx_t_15 = NULL;
+  PyObject *__pyx_t_16 = NULL;
+  int __pyx_t_17;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__unicode__", 0);
+
+  /* "netCDF4.pyx":2678
+ *     def __unicode__(self):
+ *         cdef int ierr, no_fill
+ *         if not dir(self._grp):             # <<<<<<<<<<<<<<
+ *             return 'Variable object no longer valid'
+ *         ncdump_var = ['%r\n' % type(self)]
+ */
+  __pyx_t_1 = __pyx_v_self->_grp;
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_Dir(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_4) {
+
+    /* "netCDF4.pyx":2679
+ *         cdef int ierr, no_fill
+ *         if not dir(self._grp):
+ *             return 'Variable object no longer valid'             # <<<<<<<<<<<<<<
+ *         ncdump_var = ['%r\n' % type(self)]
+ *         dimnames = tuple([_tostr(dimname) for dimname in self.dimensions])
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_kp_s_Variable_object_no_longer_valid);
+    __pyx_r = __pyx_kp_s_Variable_object_no_longer_valid;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":2680
+ *         if not dir(self._grp):
+ *             return 'Variable object no longer valid'
+ *         ncdump_var = ['%r\n' % type(self)]             # <<<<<<<<<<<<<<
+ *         dimnames = tuple([_tostr(dimname) for dimname in self.dimensions])
+ *         attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\
+ */
+  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_r, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_2 = 0;
+  __pyx_v_ncdump_var = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":2681
+ *             return 'Variable object no longer valid'
+ *         ncdump_var = ['%r\n' % type(self)]
+ *         dimnames = tuple([_tostr(dimname) for dimname in self.dimensions])             # <<<<<<<<<<<<<<
+ *         attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\
+ *                 self.ncattrs()]
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+    __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
+    __pyx_t_7 = NULL;
+  } else {
+    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_7)) {
+      if (likely(PyList_CheckExact(__pyx_t_5))) {
+        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_2 = __pyx_t_7(__pyx_t_5);
+      if (unlikely(!__pyx_t_2)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_2);
+    __pyx_t_2 = 0;
+    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __pyx_t_9 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
+      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
+      if (likely(__pyx_t_9)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+        __Pyx_INCREF(__pyx_t_9);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_8, function);
+      }
+    }
+    if (!__pyx_t_9) {
+      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_dimname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+    } else {
+      __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
+      __Pyx_INCREF(__pyx_v_dimname);
+      PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_dimname);
+      __Pyx_GIVEREF(__pyx_v_dimname);
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_dimnames = ((PyObject*)__pyx_t_5);
+  __pyx_t_5 = 0;
+
+  /* "netCDF4.pyx":2682
+ *         ncdump_var = ['%r\n' % type(self)]
+ *         dimnames = tuple([_tostr(dimname) for dimname in self.dimensions])
+ *         attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\             # <<<<<<<<<<<<<<
+ *                 self.ncattrs()]
+ *         if self._iscompound:
+ */
+  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+
+  /* "netCDF4.pyx":2683
+ *         dimnames = tuple([_tostr(dimname) for dimname in self.dimensions])
+ *         attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\
+ *                 self.ncattrs()]             # <<<<<<<<<<<<<<
+ *         if self._iscompound:
+ *             ncdump_var.append('%s %s(%s)\n' %\
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_8 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_8)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_8);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_8) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
+    __pyx_t_7 = NULL;
+  } else {
+    __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_7)) {
+      if (likely(PyList_CheckExact(__pyx_t_2))) {
+        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_1 = __pyx_t_7(__pyx_t_2);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2682
+ *         ncdump_var = ['%r\n' % type(self)]
+ *         dimnames = tuple([_tostr(dimname) for dimname in self.dimensions])
+ *         attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\             # <<<<<<<<<<<<<<
+ *                 self.ncattrs()]
+ *         if self._iscompound:
+ */
+    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __pyx_t_10 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) {
+      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
+      if (likely(__pyx_t_10)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+        __Pyx_INCREF(__pyx_t_10);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_8, function);
+      }
+    }
+    if (!__pyx_t_10) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = NULL;
+      __Pyx_INCREF(__pyx_v_name);
+      PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_name);
+      __Pyx_GIVEREF(__pyx_v_name);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_INCREF(__pyx_v_name);
+    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_name);
+    __Pyx_GIVEREF(__pyx_v_name);
+    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_attrs = ((PyObject*)__pyx_t_5);
+  __pyx_t_5 = 0;
+
+  /* "netCDF4.pyx":2684
+ *         attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\
+ *                 self.ncattrs()]
+ *         if self._iscompound:             # <<<<<<<<<<<<<<
+ *             ncdump_var.append('%s %s(%s)\n' %\
+ *             ('compound',self._name,', '.join(dimnames)))
+ */
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_4) {
+
+    /* "netCDF4.pyx":2686
+ *         if self._iscompound:
+ *             ncdump_var.append('%s %s(%s)\n' %\
+ *             ('compound',self._name,', '.join(dimnames)))             # <<<<<<<<<<<<<<
+ *         elif self._isvlen:
+ *             ncdump_var.append('%s %s(%s)\n' %\
+ */
+    __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__38, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_n_s_compound);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_compound);
+    __Pyx_GIVEREF(__pyx_n_s_compound);
+    __Pyx_INCREF(__pyx_v_self->_name);
+    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->_name);
+    __Pyx_GIVEREF(__pyx_v_self->_name);
+    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
+    __pyx_t_5 = 0;
+
+    /* "netCDF4.pyx":2685
+ *                 self.ncattrs()]
+ *         if self._iscompound:
+ *             ncdump_var.append('%s %s(%s)\n' %\             # <<<<<<<<<<<<<<
+ *             ('compound',self._name,', '.join(dimnames)))
+ *         elif self._isvlen:
+ */
+    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s_2, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    goto __pyx_L8;
+  }
+
+  /* "netCDF4.pyx":2687
+ *             ncdump_var.append('%s %s(%s)\n' %\
+ *             ('compound',self._name,', '.join(dimnames)))
+ *         elif self._isvlen:             # <<<<<<<<<<<<<<
+ *             ncdump_var.append('%s %s(%s)\n' %\
+ *             ('vlen',self._name,', '.join(dimnames)))
+ */
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_4) {
+
+    /* "netCDF4.pyx":2689
+ *         elif self._isvlen:
+ *             ncdump_var.append('%s %s(%s)\n' %\
+ *             ('vlen',self._name,', '.join(dimnames)))             # <<<<<<<<<<<<<<
+ *         else:
+ *             ncdump_var.append('%s %s(%s)\n' %\
+ */
+    __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__38, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_n_s_vlen);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_vlen);
+    __Pyx_GIVEREF(__pyx_n_s_vlen);
+    __Pyx_INCREF(__pyx_v_self->_name);
+    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->_name);
+    __Pyx_GIVEREF(__pyx_v_self->_name);
+    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
+    __pyx_t_5 = 0;
+
+    /* "netCDF4.pyx":2688
+ *             ('compound',self._name,', '.join(dimnames)))
+ *         elif self._isvlen:
+ *             ncdump_var.append('%s %s(%s)\n' %\             # <<<<<<<<<<<<<<
+ *             ('vlen',self._name,', '.join(dimnames)))
+ *         else:
+ */
+    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s_2, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    goto __pyx_L8;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":2692
+ *         else:
+ *             ncdump_var.append('%s %s(%s)\n' %\
+ *             (self.dtype,self._name,', '.join(dimnames)))             # <<<<<<<<<<<<<<
+ *         ncdump_var = ncdump_var + attrs
+ *         if self._iscompound:
+ */
+    __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__38, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_v_self->dtype);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->dtype);
+    __Pyx_GIVEREF(__pyx_v_self->dtype);
+    __Pyx_INCREF(__pyx_v_self->_name);
+    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->_name);
+    __Pyx_GIVEREF(__pyx_v_self->_name);
+    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
+    __pyx_t_5 = 0;
+
+    /* "netCDF4.pyx":2691
+ *             ('vlen',self._name,', '.join(dimnames)))
+ *         else:
+ *             ncdump_var.append('%s %s(%s)\n' %\             # <<<<<<<<<<<<<<
+ *             (self.dtype,self._name,', '.join(dimnames)))
+ *         ncdump_var = ncdump_var + attrs
+ */
+    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s_2, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  }
+  __pyx_L8:;
+
+  /* "netCDF4.pyx":2693
+ *             ncdump_var.append('%s %s(%s)\n' %\
+ *             (self.dtype,self._name,', '.join(dimnames)))
+ *         ncdump_var = ncdump_var + attrs             # <<<<<<<<<<<<<<
+ *         if self._iscompound:
+ *             ncdump_var.append('compound data type: %s\n' % self.dtype)
+ */
+  __pyx_t_5 = PyNumber_Add(__pyx_v_ncdump_var, __pyx_v_attrs); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF_SET(__pyx_v_ncdump_var, ((PyObject*)__pyx_t_5));
+  __pyx_t_5 = 0;
+
+  /* "netCDF4.pyx":2694
+ *             (self.dtype,self._name,', '.join(dimnames)))
+ *         ncdump_var = ncdump_var + attrs
+ *         if self._iscompound:             # <<<<<<<<<<<<<<
+ *             ncdump_var.append('compound data type: %s\n' % self.dtype)
+ *         elif self._isvlen:
+ */
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_4) {
+
+    /* "netCDF4.pyx":2695
+ *         ncdump_var = ncdump_var + attrs
+ *         if self._iscompound:
+ *             ncdump_var.append('compound data type: %s\n' % self.dtype)             # <<<<<<<<<<<<<<
+ *         elif self._isvlen:
+ *             ncdump_var.append('vlen data type: %s\n' % self.dtype)
+ */
+    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_compound_data_type_s, __pyx_v_self->dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    goto __pyx_L9;
+  }
+
+  /* "netCDF4.pyx":2696
+ *         if self._iscompound:
+ *             ncdump_var.append('compound data type: %s\n' % self.dtype)
+ *         elif self._isvlen:             # <<<<<<<<<<<<<<
+ *             ncdump_var.append('vlen data type: %s\n' % self.dtype)
+ *         unlimdims = []
+ */
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_4) {
+
+    /* "netCDF4.pyx":2697
+ *             ncdump_var.append('compound data type: %s\n' % self.dtype)
+ *         elif self._isvlen:
+ *             ncdump_var.append('vlen data type: %s\n' % self.dtype)             # <<<<<<<<<<<<<<
+ *         unlimdims = []
+ *         for dimname in self.dimensions:
+ */
+    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_vlen_data_type_s, __pyx_v_self->dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    goto __pyx_L9;
+  }
+  __pyx_L9:;
+
+  /* "netCDF4.pyx":2698
+ *         elif self._isvlen:
+ *             ncdump_var.append('vlen data type: %s\n' % self.dtype)
+ *         unlimdims = []             # <<<<<<<<<<<<<<
+ *         for dimname in self.dimensions:
+ *             dim = _find_dim(self._grp, dimname)
+ */
+  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_v_unlimdims = ((PyObject*)__pyx_t_5);
+  __pyx_t_5 = 0;
+
+  /* "netCDF4.pyx":2699
+ *             ncdump_var.append('vlen data type: %s\n' % self.dtype)
+ *         unlimdims = []
+ *         for dimname in self.dimensions:             # <<<<<<<<<<<<<<
+ *             dim = _find_dim(self._grp, dimname)
+ *             if dim.isunlimited():
+ */
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
+    __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
+    __pyx_t_7 = NULL;
+  } else {
+    __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_7)) {
+      if (likely(PyList_CheckExact(__pyx_t_2))) {
+        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_5 = __pyx_t_7(__pyx_t_2);
+      if (unlikely(!__pyx_t_5)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_5);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_5);
+    __pyx_t_5 = 0;
+
+    /* "netCDF4.pyx":2700
+ *         unlimdims = []
+ *         for dimname in self.dimensions:
+ *             dim = _find_dim(self._grp, dimname)             # <<<<<<<<<<<<<<
+ *             if dim.isunlimited():
+ *                 unlimdims.append(dimname)
+ */
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_8 = NULL;
+    __pyx_t_12 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+      if (likely(__pyx_t_8)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+        __Pyx_INCREF(__pyx_t_8);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_1, function);
+        __pyx_t_12 = 1;
+      }
+    }
+    __pyx_t_9 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    if (__pyx_t_8) {
+      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_self->_grp);
+    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_12, __pyx_v_self->_grp);
+    __Pyx_GIVEREF(__pyx_v_self->_grp);
+    __Pyx_INCREF(__pyx_v_dimname);
+    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_12, __pyx_v_dimname);
+    __Pyx_GIVEREF(__pyx_v_dimname);
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_5);
+    __pyx_t_5 = 0;
+
+    /* "netCDF4.pyx":2701
+ *         for dimname in self.dimensions:
+ *             dim = _find_dim(self._grp, dimname)
+ *             if dim.isunlimited():             # <<<<<<<<<<<<<<
+ *                 unlimdims.append(dimname)
+ *         if (self._grp.path != '/'): ncdump_var.append('path = %s\n' % self._grp.path)
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_9 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+      if (likely(__pyx_t_9)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+        __Pyx_INCREF(__pyx_t_9);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_1, function);
+      }
+    }
+    if (__pyx_t_9) {
+      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    } else {
+      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (__pyx_t_4) {
+
+      /* "netCDF4.pyx":2702
+ *             dim = _find_dim(self._grp, dimname)
+ *             if dim.isunlimited():
+ *                 unlimdims.append(dimname)             # <<<<<<<<<<<<<<
+ *         if (self._grp.path != '/'): ncdump_var.append('path = %s\n' % self._grp.path)
+ *         ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims))
+ */
+      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_unlimdims, __pyx_v_dimname); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L12;
+    }
+    __pyx_L12:;
+
+    /* "netCDF4.pyx":2699
+ *             ncdump_var.append('vlen data type: %s\n' % self.dtype)
+ *         unlimdims = []
+ *         for dimname in self.dimensions:             # <<<<<<<<<<<<<<
+ *             dim = _find_dim(self._grp, dimname)
+ *             if dim.isunlimited():
+ */
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":2703
+ *             if dim.isunlimited():
+ *                 unlimdims.append(dimname)
+ *         if (self._grp.path != '/'): ncdump_var.append('path = %s\n' % self._grp.path)             # <<<<<<<<<<<<<<
+ *         ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims))
+ *         ncdump_var.append('current shape = %s\n' % repr(self.shape))
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_path_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__15, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (__pyx_t_4) {
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_path_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_path_s, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    goto __pyx_L13;
+  }
+  __pyx_L13:;
+
+  /* "netCDF4.pyx":2704
+ *                 unlimdims.append(dimname)
+ *         if (self._grp.path != '/'): ncdump_var.append('path = %s\n' % self._grp.path)
+ *         ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims))             # <<<<<<<<<<<<<<
+ *         ncdump_var.append('current shape = %s\n' % repr(self.shape))
+ *         ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
+ */
+  __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__38, __pyx_v_unlimdims); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_unlimited_dimensions_s_2, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_2); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":2705
+ *         if (self._grp.path != '/'): ncdump_var.append('path = %s\n' % self._grp.path)
+ *         ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims))
+ *         ncdump_var.append('current shape = %s\n' % repr(self.shape))             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
+ *         if ierr != NC_NOERR:
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_current_shape_s, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_2); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":2706
+ *         ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims))
+ *         ncdump_var.append('current shape = %s\n' % repr(self.shape))
+ *         ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_v_ierr = nc_inq_var_fill(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_no_fill), NULL);
+
+  /* "netCDF4.pyx":2707
+ *         ncdump_var.append('current shape = %s\n' % repr(self.shape))
+ *         ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         if self._isprimitive:
+ */
+  __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_4) {
+
+    /* "netCDF4.pyx":2708
+ *         ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         if self._isprimitive:
+ *             if no_fill != 1:
+ */
+    __pyx_t_13 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":2709
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         if self._isprimitive:             # <<<<<<<<<<<<<<
+ *             if no_fill != 1:
+ *                 try:
+ */
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_4) {
+
+    /* "netCDF4.pyx":2710
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         if self._isprimitive:
+ *             if no_fill != 1:             # <<<<<<<<<<<<<<
+ *                 try:
+ *                     fillval = self._FillValue
+ */
+    __pyx_t_4 = ((__pyx_v_no_fill != 1) != 0);
+    if (__pyx_t_4) {
+
+      /* "netCDF4.pyx":2711
+ *         if self._isprimitive:
+ *             if no_fill != 1:
+ *                 try:             # <<<<<<<<<<<<<<
+ *                     fillval = self._FillValue
+ *                     msg = 'filling on'
+ */
+      {
+        __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
+        __Pyx_XGOTREF(__pyx_t_14);
+        __Pyx_XGOTREF(__pyx_t_15);
+        __Pyx_XGOTREF(__pyx_t_16);
+        /*try:*/ {
+
+          /* "netCDF4.pyx":2712
+ *             if no_fill != 1:
+ *                 try:
+ *                     fillval = self._FillValue             # <<<<<<<<<<<<<<
+ *                     msg = 'filling on'
+ *                 except AttributeError:
+ */
+          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2712; __pyx_clineno = __LINE__; goto __pyx_L17_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __pyx_v_fillval = __pyx_t_2;
+          __pyx_t_2 = 0;
+
+          /* "netCDF4.pyx":2713
+ *                 try:
+ *                     fillval = self._FillValue
+ *                     msg = 'filling on'             # <<<<<<<<<<<<<<
+ *                 except AttributeError:
+ *                     fillval = default_fillvals[self.dtype.str[1:]]
+ */
+          __Pyx_INCREF(__pyx_kp_s_filling_on);
+          __pyx_v_msg = __pyx_kp_s_filling_on;
+        }
+        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+        goto __pyx_L24_try_end;
+        __pyx_L17_error:;
+        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+        /* "netCDF4.pyx":2714
+ *                     fillval = self._FillValue
+ *                     msg = 'filling on'
+ *                 except AttributeError:             # <<<<<<<<<<<<<<
+ *                     fillval = default_fillvals[self.dtype.str[1:]]
+ *                     if self.dtype.str[1:] in ['u1','i1']:
+ */
+        __pyx_t_17 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
+        if (__pyx_t_17) {
+          __Pyx_AddTraceback("netCDF4.Variable.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2714; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_GOTREF(__pyx_t_5);
+          __Pyx_GOTREF(__pyx_t_1);
+
+          /* "netCDF4.pyx":2715
+ *                     msg = 'filling on'
+ *                 except AttributeError:
+ *                     fillval = default_fillvals[self.dtype.str[1:]]             # <<<<<<<<<<<<<<
+ *                     if self.dtype.str[1:] in ['u1','i1']:
+ *                         msg = 'filling on, default _FillValue of %s ignored\n' % fillval
+ */
+          __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2715; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2715; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_t_8, 1, 0, NULL, NULL, &__pyx_slice__62, 1, 0, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2715; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
+          __Pyx_GOTREF(__pyx_t_10);
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          __pyx_t_8 = PyObject_GetItem(__pyx_t_9, __pyx_t_10); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2715; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;};
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+          __Pyx_XDECREF_SET(__pyx_v_fillval, __pyx_t_8);
+          __pyx_t_8 = 0;
+
+          /* "netCDF4.pyx":2716
+ *                 except AttributeError:
+ *                     fillval = default_fillvals[self.dtype.str[1:]]
+ *                     if self.dtype.str[1:] in ['u1','i1']:             # <<<<<<<<<<<<<<
+ *                         msg = 'filling on, default _FillValue of %s ignored\n' % fillval
+ *                     else:
+ */
+          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2716; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_t_8, 1, 0, NULL, NULL, &__pyx_slice__63, 1, 0, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2716; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
+          __Pyx_GOTREF(__pyx_t_10);
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_n_s_u1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2716; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
+          if (!__pyx_t_3) {
+          } else {
+            __pyx_t_4 = __pyx_t_3;
+            goto __pyx_L28_bool_binop_done;
+          }
+          __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_n_s_i1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2716; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
+          __pyx_t_4 = __pyx_t_3;
+          __pyx_L28_bool_binop_done:;
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+          __pyx_t_3 = (__pyx_t_4 != 0);
+          if (__pyx_t_3) {
+
+            /* "netCDF4.pyx":2717
+ *                     fillval = default_fillvals[self.dtype.str[1:]]
+ *                     if self.dtype.str[1:] in ['u1','i1']:
+ *                         msg = 'filling on, default _FillValue of %s ignored\n' % fillval             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         msg = 'filling on, default _FillValue of %s used\n' % fillval
+ */
+            __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_filling_on_default__FillValue_of, __pyx_v_fillval); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2717; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
+            __Pyx_GOTREF(__pyx_t_10);
+            __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_t_10);
+            __pyx_t_10 = 0;
+            goto __pyx_L27;
+          }
+          /*else*/ {
+
+            /* "netCDF4.pyx":2719
+ *                         msg = 'filling on, default _FillValue of %s ignored\n' % fillval
+ *                     else:
+ *                         msg = 'filling on, default _FillValue of %s used\n' % fillval             # <<<<<<<<<<<<<<
+ *                 ncdump_var.append(msg)
+ *             else:
+ */
+            __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_filling_on_default__FillValue_of_2, __pyx_v_fillval); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2719; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
+            __Pyx_GOTREF(__pyx_t_10);
+            __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_t_10);
+            __pyx_t_10 = 0;
+          }
+          __pyx_L27:;
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          goto __pyx_L18_exception_handled;
+        }
+        goto __pyx_L19_except_error;
+        __pyx_L19_except_error:;
+        __Pyx_XGIVEREF(__pyx_t_14);
+        __Pyx_XGIVEREF(__pyx_t_15);
+        __Pyx_XGIVEREF(__pyx_t_16);
+        __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
+        goto __pyx_L1_error;
+        __pyx_L18_exception_handled:;
+        __Pyx_XGIVEREF(__pyx_t_14);
+        __Pyx_XGIVEREF(__pyx_t_15);
+        __Pyx_XGIVEREF(__pyx_t_16);
+        __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
+        __pyx_L24_try_end:;
+      }
+
+      /* "netCDF4.pyx":2720
+ *                     else:
+ *                         msg = 'filling on, default _FillValue of %s used\n' % fillval
+ *                 ncdump_var.append(msg)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 ncdump_var.append('filling off\n')
+ */
+      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_v_msg); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L16;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":2722
+ *                 ncdump_var.append(msg)
+ *             else:
+ *                 ncdump_var.append('filling off\n')             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_kp_s_filling_off); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __pyx_L16:;
+    goto __pyx_L15;
+  }
+  __pyx_L15:;
+
+  /* "netCDF4.pyx":2725
+ * 
+ * 
+ *         return ''.join(ncdump_var)             # <<<<<<<<<<<<<<
+ * 
+ *     def _getdims(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__16, __pyx_v_ncdump_var); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2676
+ *            return unicode(self).encode(default_encoding)
+ * 
+ *     def __unicode__(self):             # <<<<<<<<<<<<<<
+ *         cdef int ierr, no_fill
+ *         if not dir(self._grp):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4.Variable.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_ncdump_var);
+  __Pyx_XDECREF(__pyx_v_dimnames);
+  __Pyx_XDECREF(__pyx_v_attrs);
+  __Pyx_XDECREF(__pyx_v_unlimdims);
+  __Pyx_XDECREF(__pyx_v_dimname);
+  __Pyx_XDECREF(__pyx_v_dim);
+  __Pyx_XDECREF(__pyx_v_fillval);
+  __Pyx_XDECREF(__pyx_v_msg);
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2727
+ *         return ''.join(ncdump_var)
+ * 
+ *     def _getdims(self):             # <<<<<<<<<<<<<<
+ *         # Private method to get variables's dimension names
+ *         cdef int ierr, numdims, n, nn
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_9_getdims(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_9_getdims(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_getdims (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_8_getdims(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_8_getdims(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_v_ierr;
+  int __pyx_v_numdims;
+  int __pyx_v_nn;
+  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
+  int __pyx_v_dimids[NC_MAX_DIMS];
+  PyObject *__pyx_v_dimensions = NULL;
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  char *__pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  Py_ssize_t __pyx_t_9;
+  PyObject *__pyx_t_10 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_getdims", 0);
+
+  /* "netCDF4.pyx":2733
+ *         cdef int dimids[NC_MAX_DIMS]
+ *         # get number of dimensions for this variable.
+ *         ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_v_ierr = nc_inq_varndims(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_numdims));
+
+  /* "netCDF4.pyx":2734
+ *         # get number of dimensions for this variable.
+ *         ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         # get dimension ids.
+ */
+  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":2735
+ *         ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         # get dimension ids.
+ *         ierr = nc_inq_vardimid(self._grpid, self._varid, dimids)
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":2737
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         # get dimension ids.
+ *         ierr = nc_inq_vardimid(self._grpid, self._varid, dimids)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_v_ierr = nc_inq_vardimid(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_dimids);
+
+  /* "netCDF4.pyx":2738
+ *         # get dimension ids.
+ *         ierr = nc_inq_vardimid(self._grpid, self._varid, dimids)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         # loop over dimensions, retrieve names.
+ */
+  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":2739
+ *         ierr = nc_inq_vardimid(self._grpid, self._varid, dimids)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         # loop over dimensions, retrieve names.
+ *         dimensions = ()
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":2741
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         # loop over dimensions, retrieve names.
+ *         dimensions = ()             # <<<<<<<<<<<<<<
+ *         for nn from 0 <= nn < numdims:
+ *             ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
+ */
+  __Pyx_INCREF(__pyx_empty_tuple);
+  __pyx_v_dimensions = __pyx_empty_tuple;
+
+  /* "netCDF4.pyx":2742
+ *         # loop over dimensions, retrieve names.
+ *         dimensions = ()
+ *         for nn from 0 <= nn < numdims:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
+ *             if ierr != NC_NOERR:
+ */
+  __pyx_t_5 = __pyx_v_numdims;
+  for (__pyx_v_nn = 0; __pyx_v_nn < __pyx_t_5; __pyx_v_nn++) {
+
+    /* "netCDF4.pyx":2743
+ *         dimensions = ()
+ *         for nn from 0 <= nn < numdims:
+ *             ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+    __pyx_v_ierr = nc_inq_dimname(__pyx_v_self->_grpid, (__pyx_v_dimids[__pyx_v_nn]), __pyx_v_namstring);
+
+    /* "netCDF4.pyx":2744
+ *         for nn from 0 <= nn < numdims:
+ *             ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             name = namstring.decode(default_encoding,unicode_error)
+ */
+    __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":2745
+ *             ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             name = namstring.decode(default_encoding,unicode_error)
+ *             dimensions = dimensions + (name,)
+ */
+      __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_3);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+      __Pyx_GIVEREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":2746
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             name = namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+ *             dimensions = dimensions + (name,)
+ *         return dimensions
+ */
+    __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_8 = NULL;
+    __pyx_t_9 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+      if (likely(__pyx_t_8)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_8);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_6, function);
+        __pyx_t_9 = 1;
+      }
+    }
+    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    if (__pyx_t_8) {
+      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+    }
+    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
+    __Pyx_GIVEREF(__pyx_t_7);
+    __pyx_t_4 = 0;
+    __pyx_t_7 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
+    __pyx_t_3 = 0;
+
+    /* "netCDF4.pyx":2747
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             name = namstring.decode(default_encoding,unicode_error)
+ *             dimensions = dimensions + (name,)             # <<<<<<<<<<<<<<
+ *         return dimensions
+ * 
+ */
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_INCREF(__pyx_v_name);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_name);
+    __Pyx_GIVEREF(__pyx_v_name);
+    __pyx_t_6 = PyNumber_Add(__pyx_v_dimensions, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF_SET(__pyx_v_dimensions, ((PyObject*)__pyx_t_6));
+    __pyx_t_6 = 0;
+  }
+
+  /* "netCDF4.pyx":2748
+ *             name = namstring.decode(default_encoding,unicode_error)
+ *             dimensions = dimensions + (name,)
+ *         return dimensions             # <<<<<<<<<<<<<<
+ * 
+ *     def _getname(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_dimensions);
+  __pyx_r = __pyx_v_dimensions;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2727
+ *         return ''.join(ncdump_var)
+ * 
+ *     def _getdims(self):             # <<<<<<<<<<<<<<
+ *         # Private method to get variables's dimension names
+ *         cdef int ierr, numdims, n, nn
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4.Variable._getdims", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_dimensions);
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2750
+ *         return dimensions
+ * 
+ *     def _getname(self):             # <<<<<<<<<<<<<<
+ *         # Private method to get name associated with instance
+ *         cdef int err
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_11_getname(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_11_getname(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_getname (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_10_getname(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_10_getname(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
+  int __pyx_v_ierr;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  char *__pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  Py_ssize_t __pyx_t_9;
+  PyObject *__pyx_t_10 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_getname", 0);
+
+  /* "netCDF4.pyx":2754
+ *         cdef int err
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         ierr = nc_inq_varname(self._grp._grpid, self._varid, namstring)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_ierr = nc_inq_varname(__pyx_t_2, __pyx_v_self->_varid, __pyx_v_namstring);
+
+  /* "netCDF4.pyx":2755
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         ierr = nc_inq_varname(self._grp._grpid, self._varid, namstring)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         return namstring.decode(default_encoding,unicode_error)
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":2756
+ *         ierr = nc_inq_varname(self._grp._grpid, self._varid, namstring)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         return namstring.decode(default_encoding,unicode_error)
+ * 
+ */
+    __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":2757
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         return namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+ * 
+ *     property name:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_8 = NULL;
+  __pyx_t_9 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_8)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_8);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+      __pyx_t_9 = 1;
+    }
+  }
+  __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  if (__pyx_t_8) {
+    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+  }
+  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
+  __Pyx_GIVEREF(__pyx_t_7);
+  __pyx_t_5 = 0;
+  __pyx_t_7 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2750
+ *         return dimensions
+ * 
+ *     def _getname(self):             # <<<<<<<<<<<<<<
+ *         # Private method to get name associated with instance
+ *         cdef int err
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4.Variable._getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2761
+ *     property name:
+ *         """string name of Variable instance"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._getname()
+ *         def __set__(self,value):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_4name_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_4name___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_4name___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+
+  /* "netCDF4.pyx":2762
+ *         """string name of Variable instance"""
+ *         def __get__(self):
+ *             return self._getname()             # <<<<<<<<<<<<<<
+ *         def __set__(self,value):
+ *             raise AttributeError("name cannot be altered")
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2761
+ *     property name:
+ *         """string name of Variable instance"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._getname()
+ *         def __set__(self,value):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4.Variable.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2763
+ *         def __get__(self):
+ *             return self._getname()
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("name cannot be altered")
+ * 
+ */
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_4name_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_4name_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__set__", 0);
+
+  /* "netCDF4.pyx":2764
+ *             return self._getname()
+ *         def __set__(self,value):
+ *             raise AttributeError("name cannot be altered")             # <<<<<<<<<<<<<<
+ * 
+ *     property datatype:
+ */
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":2763
+ *         def __get__(self):
+ *             return self._getname()
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("name cannot be altered")
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Variable.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2768
+ *     property datatype:
+ *         """numpy data type (for primitive data types) or VLType/CompoundType instance (for compound or vlen data types)"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             if self._iscompound:
+ *                 return self._cmptype
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_8datatype_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_8datatype_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_8datatype___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_8datatype___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+
+  /* "netCDF4.pyx":2769
+ *         """numpy data type (for primitive data types) or VLType/CompoundType instance (for compound or vlen data types)"""
+ *         def __get__(self):
+ *             if self._iscompound:             # <<<<<<<<<<<<<<
+ *                 return self._cmptype
+ *             elif self._isvlen:
+ */
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":2770
+ *         def __get__(self):
+ *             if self._iscompound:
+ *                 return self._cmptype             # <<<<<<<<<<<<<<
+ *             elif self._isvlen:
+ *                 return self._vltype
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_v_self->_cmptype);
+    __pyx_r = __pyx_v_self->_cmptype;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":2771
+ *             if self._iscompound:
+ *                 return self._cmptype
+ *             elif self._isvlen:             # <<<<<<<<<<<<<<
+ *                 return self._vltype
+ *             elif self._isprimitive:
+ */
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":2772
+ *                 return self._cmptype
+ *             elif self._isvlen:
+ *                 return self._vltype             # <<<<<<<<<<<<<<
+ *             elif self._isprimitive:
+ *                 return self.dtype
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_v_self->_vltype);
+    __pyx_r = __pyx_v_self->_vltype;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":2773
+ *             elif self._isvlen:
+ *                 return self._vltype
+ *             elif self._isprimitive:             # <<<<<<<<<<<<<<
+ *                 return self.dtype
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":2774
+ *                 return self._vltype
+ *             elif self._isprimitive:
+ *                 return self.dtype             # <<<<<<<<<<<<<<
+ * 
+ *     property shape:
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_v_self->dtype);
+    __pyx_r = __pyx_v_self->dtype;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":2768
+ *     property datatype:
+ *         """numpy data type (for primitive data types) or VLType/CompoundType instance (for compound or vlen data types)"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             if self._iscompound:
+ *                 return self._cmptype
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4.Variable.datatype.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2778
+ *     property shape:
+ *         """find current sizes of all variable dimensions"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             shape = ()
+ *             for dimname in self._getdims():
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_5shape_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_5shape___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_5shape___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_v_shape = NULL;
+  PyObject *__pyx_v_dimname = NULL;
+  PyObject *__pyx_v_dim = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  Py_ssize_t __pyx_t_4;
+  PyObject *(*__pyx_t_5)(PyObject *);
+  PyObject *__pyx_t_6 = NULL;
+  Py_ssize_t __pyx_t_7;
+  PyObject *__pyx_t_8 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+
+  /* "netCDF4.pyx":2779
+ *         """find current sizes of all variable dimensions"""
+ *         def __get__(self):
+ *             shape = ()             # <<<<<<<<<<<<<<
+ *             for dimname in self._getdims():
+ *                 # look in current group, and parents for dim.
+ */
+  __Pyx_INCREF(__pyx_empty_tuple);
+  __pyx_v_shape = __pyx_empty_tuple;
+
+  /* "netCDF4.pyx":2780
+ *         def __get__(self):
+ *             shape = ()
+ *             for dimname in self._getdims():             # <<<<<<<<<<<<<<
+ *                 # look in current group, and parents for dim.
+ *                 dim = _find_dim(self._grp,dimname)
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getdims); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
+  } else {
+    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_5)) {
+      if (likely(PyList_CheckExact(__pyx_t_2))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_1 = __pyx_t_5(__pyx_t_2);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2782
+ *             for dimname in self._getdims():
+ *                 # look in current group, and parents for dim.
+ *                 dim = _find_dim(self._grp,dimname)             # <<<<<<<<<<<<<<
+ *                 shape = shape + (len(dim),)
+ *             return shape
+ */
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_6 = NULL;
+    __pyx_t_7 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_6)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_6);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+        __pyx_t_7 = 1;
+      }
+    }
+    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    if (__pyx_t_6) {
+      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_self->_grp);
+    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->_grp);
+    __Pyx_GIVEREF(__pyx_v_self->_grp);
+    __Pyx_INCREF(__pyx_v_dimname);
+    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_dimname);
+    __Pyx_GIVEREF(__pyx_v_dimname);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2783
+ *                 # look in current group, and parents for dim.
+ *                 dim = _find_dim(self._grp,dimname)
+ *                 shape = shape + (len(dim),)             # <<<<<<<<<<<<<<
+ *             return shape
+ *         def __set__(self,value):
+ */
+    __pyx_t_7 = PyObject_Length(__pyx_v_dim); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = PyNumber_Add(__pyx_v_shape, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF_SET(__pyx_v_shape, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2780
+ *         def __get__(self):
+ *             shape = ()
+ *             for dimname in self._getdims():             # <<<<<<<<<<<<<<
+ *                 # look in current group, and parents for dim.
+ *                 dim = _find_dim(self._grp,dimname)
+ */
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":2784
+ *                 dim = _find_dim(self._grp,dimname)
+ *                 shape = shape + (len(dim),)
+ *             return shape             # <<<<<<<<<<<<<<
+ *         def __set__(self,value):
+ *             raise AttributeError("shape cannot be altered")
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_shape);
+  __pyx_r = __pyx_v_shape;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2778
+ *     property shape:
+ *         """find current sizes of all variable dimensions"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             shape = ()
+ *             for dimname in self._getdims():
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_AddTraceback("netCDF4.Variable.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_shape);
+  __Pyx_XDECREF(__pyx_v_dimname);
+  __Pyx_XDECREF(__pyx_v_dim);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2785
+ *                 shape = shape + (len(dim),)
+ *             return shape
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("shape cannot be altered")
+ * 
+ */
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_5shape_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_5shape_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_5shape_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_5shape_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__set__", 0);
+
+  /* "netCDF4.pyx":2786
+ *             return shape
+ *         def __set__(self,value):
+ *             raise AttributeError("shape cannot be altered")             # <<<<<<<<<<<<<<
+ * 
+ *     property size:
+ */
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":2785
+ *                 shape = shape + (len(dim),)
+ *             return shape
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("shape cannot be altered")
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Variable.shape.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2790
+ *     property size:
+ *         """Return the number of stored elements."""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return numpy.prod(self.shape)
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_4size_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_4size___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_4size___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+
+  /* "netCDF4.pyx":2791
+ *         """Return the number of stored elements."""
+ *         def __get__(self):
+ *             return numpy.prod(self.shape)             # <<<<<<<<<<<<<<
+ * 
+ *     property dimensions:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_prod); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+    }
+  }
+  if (!__pyx_t_4) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_GOTREF(__pyx_t_1);
+  } else {
+    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __pyx_t_2 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2790
+ *     property size:
+ *         """Return the number of stored elements."""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return numpy.prod(self.shape)
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("netCDF4.Variable.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2795
+ *     property dimensions:
+ *         """get variables's dimension names"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._getdims()
+ *         def __set__(self,value):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_10dimensions_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_10dimensions_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_10dimensions___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_10dimensions___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+
+  /* "netCDF4.pyx":2796
+ *         """get variables's dimension names"""
+ *         def __get__(self):
+ *             return self._getdims()             # <<<<<<<<<<<<<<
+ *         def __set__(self,value):
+ *             raise AttributeError("dimensions cannot be altered")
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getdims); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2795
+ *     property dimensions:
+ *         """get variables's dimension names"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._getdims()
+ *         def __set__(self,value):
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4.Variable.dimensions.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2797
+ *         def __get__(self):
+ *             return self._getdims()
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("dimensions cannot be altered")
+ * 
+ */
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_10dimensions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_10dimensions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_10dimensions_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_10dimensions_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__set__", 0);
+
+  /* "netCDF4.pyx":2798
+ *             return self._getdims()
+ *         def __set__(self,value):
+ *             raise AttributeError("dimensions cannot be altered")             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":2797
+ *         def __get__(self):
+ *             return self._getdims()
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("dimensions cannot be altered")
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Variable.dimensions.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2801
+ * 
+ * 
+ *     def group(self):             # <<<<<<<<<<<<<<
+ *         """
+ * group(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_13group(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_12group[] = "\ngroup(self)\n\nreturn the group that this L{Variable} is a member of.";
+static PyObject *__pyx_pw_7netCDF4_8Variable_13group(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("group (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_12group(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_12group(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("group", 0);
+
+  /* "netCDF4.pyx":2806
+ * 
+ * return the group that this L{Variable} is a member of."""
+ *         return self._grp             # <<<<<<<<<<<<<<
+ * 
+ *     def ncattrs(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_grp);
+  __pyx_r = __pyx_v_self->_grp;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2801
+ * 
+ * 
+ *     def group(self):             # <<<<<<<<<<<<<<
+ *         """
+ * group(self)
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2808
+ *         return self._grp
+ * 
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         """
+ * ncattrs(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_15ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_14ncattrs[] = "\nncattrs(self)\n\nreturn netCDF attribute names for this L{Variable} in a list.";
+static PyObject *__pyx_pw_7netCDF4_8Variable_15ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("ncattrs (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_14ncattrs(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_14ncattrs(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("ncattrs", 0);
+
+  /* "netCDF4.pyx":2813
+ * 
+ * return netCDF attribute names for this L{Variable} in a list."""
+ *         return _get_att_names(self._grpid, self._varid)             # <<<<<<<<<<<<<<
+ * 
+ *     def setncattr(self,name,value):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __pyx_f_7netCDF4__get_att_names(__pyx_v_self->_grpid, __pyx_v_self->_varid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2808
+ *         return self._grp
+ * 
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         """
+ * ncattrs(self)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Variable.ncattrs", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2815
+ *         return _get_att_names(self._grpid, self._varid)
+ * 
+ *     def setncattr(self,name,value):             # <<<<<<<<<<<<<<
+ *         """
+ * setncattr(self,name,value)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_17setncattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_16setncattr[] = "\nsetncattr(self,name,value)\n\nset a netCDF variable attribute using name,value pair.  Only use if you need to set a\nnetCDF attribute with the same name as one of the reserved python\nattributes.";
+static PyObject *__pyx_pw_7netCDF4_8Variable_17setncattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_name = 0;
+  PyObject *__pyx_v_value = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("setncattr (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_value,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2815; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setncattr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2815; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_name = values[0];
+    __pyx_v_value = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2815; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.Variable.setncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_16setncattr(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), __pyx_v_name, __pyx_v_value);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_16setncattr(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("setncattr", 0);
+
+  /* "netCDF4.pyx":2822
+ * netCDF attribute with the same name as one of the reserved python
+ * attributes."""
+ *         if self._grp.data_model != 'NETCDF4': self._grp._redef()             # <<<<<<<<<<<<<<
+ *         _set_att(self._grp, self._varid, name, value)
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":2823
+ * attributes."""
+ *         if self._grp.data_model != 'NETCDF4': self._grp._redef()
+ *         _set_att(self._grp, self._varid, name, value)             # <<<<<<<<<<<<<<
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+ * 
+ */
+  __pyx_t_1 = __pyx_v_self->_grp;
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_t_3 = __pyx_f_7netCDF4__set_att(__pyx_t_1, __pyx_v_self->_varid, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":2824
+ *         if self._grp.data_model != 'NETCDF4': self._grp._redef()
+ *         _set_att(self._grp, self._varid, name, value)
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()             # <<<<<<<<<<<<<<
+ * 
+ *     def setncatts(self,attdict):
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (__pyx_t_2) {
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_1, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "netCDF4.pyx":2815
+ *         return _get_att_names(self._grpid, self._varid)
+ * 
+ *     def setncattr(self,name,value):             # <<<<<<<<<<<<<<
+ *         """
+ * setncattr(self,name,value)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4.Variable.setncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2826
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+ * 
+ *     def setncatts(self,attdict):             # <<<<<<<<<<<<<<
+ *         """
+ * setncatts(self,attdict)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_19setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_18setncatts[] = "\nsetncatts(self,attdict)\n\nset a bunch of netCDF variable attributes at once using a python dictionary. \nThis may be faster when setting a lot of attributes for a NETCDF3 \nformatted file, since nc_redef/nc_enddef is not called in between setting\neach attribute";
+static PyObject *__pyx_pw_7netCDF4_8Variable_19setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("setncatts (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_18setncatts(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_attdict));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_18setncatts(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_attdict) {
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_v_value = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  Py_ssize_t __pyx_t_5;
+  PyObject *(*__pyx_t_6)(PyObject *);
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *(*__pyx_t_9)(PyObject *);
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("setncatts", 0);
+
+  /* "netCDF4.pyx":2834
+ * formatted file, since nc_redef/nc_enddef is not called in between setting
+ * each attribute"""
+ *         if self._grp.data_model != 'NETCDF4': self._grp._redef()             # <<<<<<<<<<<<<<
+ *         for name, value in attdict.items():
+ *             _set_att(self._grp, self._varid, name, value)
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":2835
+ * each attribute"""
+ *         if self._grp.data_model != 'NETCDF4': self._grp._redef()
+ *         for name, value in attdict.items():             # <<<<<<<<<<<<<<
+ *             _set_att(self._grp, self._varid, name, value)
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_attdict, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+    }
+  }
+  if (__pyx_t_4) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
+    __pyx_t_6 = NULL;
+  } else {
+    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_6)) {
+      if (likely(PyList_CheckExact(__pyx_t_3))) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_1 = __pyx_t_6(__pyx_t_3);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+      PyObject* sequence = __pyx_t_1;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
+      } else {
+        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
+      }
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_7);
+      #else
+      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      #endif
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
+      index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_4);
+      index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_7);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = NULL;
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      goto __pyx_L7_unpacking_done;
+      __pyx_L6_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_t_9 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L7_unpacking_done:;
+    }
+    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
+    __pyx_t_4 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
+    __pyx_t_7 = 0;
+
+    /* "netCDF4.pyx":2836
+ *         if self._grp.data_model != 'NETCDF4': self._grp._redef()
+ *         for name, value in attdict.items():
+ *             _set_att(self._grp, self._varid, name, value)             # <<<<<<<<<<<<<<
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+ * 
+ */
+    __pyx_t_1 = __pyx_v_self->_grp;
+    __Pyx_INCREF(__pyx_t_1);
+    __pyx_t_7 = __pyx_f_7netCDF4__set_att(__pyx_t_1, __pyx_v_self->_varid, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+    /* "netCDF4.pyx":2835
+ * each attribute"""
+ *         if self._grp.data_model != 'NETCDF4': self._grp._redef()
+ *         for name, value in attdict.items():             # <<<<<<<<<<<<<<
+ *             _set_att(self._grp, self._varid, name, value)
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+ */
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":2837
+ *         for name, value in attdict.items():
+ *             _set_att(self._grp, self._varid, name, value)
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()             # <<<<<<<<<<<<<<
+ * 
+ *     def getncattr(self,name):
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (__pyx_t_2) {
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_1 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
+      if (likely(__pyx_t_1)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+        __Pyx_INCREF(__pyx_t_1);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_7, function);
+      }
+    }
+    if (__pyx_t_1) {
+      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    } else {
+      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    goto __pyx_L8;
+  }
+  __pyx_L8:;
+
+  /* "netCDF4.pyx":2826
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+ * 
+ *     def setncatts(self,attdict):             # <<<<<<<<<<<<<<
+ *         """
+ * setncatts(self,attdict)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_AddTraceback("netCDF4.Variable.setncatts", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XDECREF(__pyx_v_value);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2839
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+ * 
+ *     def getncattr(self,name):             # <<<<<<<<<<<<<<
+ *         """
+ * getncattr(self,name)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_21getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_20getncattr[] = "\ngetncattr(self,name)\n\nretrievel a netCDF variable attribute.  Only use if you need to set a\nnetCDF attribute with the same name as one of the reserved python\nattributes.";
+static PyObject *__pyx_pw_7netCDF4_8Variable_21getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("getncattr (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_20getncattr(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_name));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_20getncattr(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("getncattr", 0);
+
+  /* "netCDF4.pyx":2846
+ * netCDF attribute with the same name as one of the reserved python
+ * attributes."""
+ *         return _get_att(self._grp, self._varid, name)             # <<<<<<<<<<<<<<
+ * 
+ *     def delncattr(self, name):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __pyx_v_self->_grp;
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_t_2 = __pyx_f_7netCDF4__get_att(__pyx_t_1, __pyx_v_self->_varid, __pyx_v_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2839
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+ * 
+ *     def getncattr(self,name):             # <<<<<<<<<<<<<<
+ *         """
+ * getncattr(self,name)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("netCDF4.Variable.getncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2848
+ *         return _get_att(self._grp, self._varid, name)
+ * 
+ *     def delncattr(self, name):             # <<<<<<<<<<<<<<
+ *         """
+ * delncattr(self,name,value)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_23delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_22delncattr[] = "\ndelncattr(self,name,value)\n\ndelete a netCDF variable attribute.  Only use if you need to delete a\nnetCDF attribute with the same name as one of the reserved python\nattributes.";
+static PyObject *__pyx_pw_7netCDF4_8Variable_23delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("delncattr (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_22delncattr(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_name));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_22delncattr(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name) {
+  char *__pyx_v_attname;
+  PyObject *__pyx_v_bytestr = NULL;
+  int __pyx_v_ierr;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  char *__pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("delncattr", 0);
+
+  /* "netCDF4.pyx":2856
+ * attributes."""
+ *         cdef char *attname
+ *         bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *         attname = bytestr
+ *         if self._grp.data_model != 'NETCDF4': self._grp._redef()
+ */
+  __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_bytestr = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":2857
+ *         cdef char *attname
+ *         bytestr = _strencode(name)
+ *         attname = bytestr             # <<<<<<<<<<<<<<
+ *         if self._grp.data_model != 'NETCDF4': self._grp._redef()
+ *         ierr = nc_del_att(self._grpid, self._varid, attname)
+ */
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_attname = __pyx_t_2;
+
+  /* "netCDF4.pyx":2858
+ *         bytestr = _strencode(name)
+ *         attname = bytestr
+ *         if self._grp.data_model != 'NETCDF4': self._grp._redef()             # <<<<<<<<<<<<<<
+ *         ierr = nc_del_att(self._grpid, self._varid, attname)
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_3) {
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (__pyx_t_5) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":2859
+ *         attname = bytestr
+ *         if self._grp.data_model != 'NETCDF4': self._grp._redef()
+ *         ierr = nc_del_att(self._grpid, self._varid, attname)             # <<<<<<<<<<<<<<
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+ *         if ierr != NC_NOERR:
+ */
+  __pyx_v_ierr = nc_del_att(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_attname);
+
+  /* "netCDF4.pyx":2860
+ *         if self._grp.data_model != 'NETCDF4': self._grp._redef()
+ *         ierr = nc_del_att(self._grpid, self._varid, attname)
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_3) {
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (__pyx_t_5) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "netCDF4.pyx":2861
+ *         ierr = nc_del_att(self._grpid, self._varid, attname)
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":2862
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ * 
+ *     def filters(self):
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":2848
+ *         return _get_att(self._grp, self._varid, name)
+ * 
+ *     def delncattr(self, name):             # <<<<<<<<<<<<<<
+ *         """
+ * delncattr(self,name,value)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("netCDF4.Variable.delncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_bytestr);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2864
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def filters(self):             # <<<<<<<<<<<<<<
+ *         """
+ * filters(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_25filters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_24filters[] = "\nfilters(self)\n\nreturn dictionary containing HDF5 filter parameters.";
+static PyObject *__pyx_pw_7netCDF4_8Variable_25filters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("filters (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_24filters(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_24filters(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_v_ierr;
+  int __pyx_v_ideflate;
+  int __pyx_v_ishuffle;
+  int __pyx_v_ideflate_level;
+  int __pyx_v_ifletcher32;
+  PyObject *__pyx_v_filtdict = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  char *__pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("filters", 0);
+
+  /* "netCDF4.pyx":2870
+ * return dictionary containing HDF5 filter parameters."""
+ *         cdef int ierr,ideflate,ishuffle,ideflate_level,ifletcher32
+ *         filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False}             # <<<<<<<<<<<<<<
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return
+ *         ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
+ */
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_zlib, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shuffle, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_complevel, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fletcher32, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_filtdict = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":2871
+ *         cdef int ierr,ideflate,ishuffle,ideflate_level,ifletcher32
+ *         filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False}
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
+ *         if ierr != NC_NOERR:
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4_CLASSIC, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_3) {
+  } else {
+    __pyx_t_2 = __pyx_t_3;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __pyx_t_3;
+  __pyx_L4_bool_binop_done:;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = (__pyx_t_2 != 0);
+  if (__pyx_t_3) {
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":2872
+ *         filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False}
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return
+ *         ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_v_ierr = nc_inq_var_deflate(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_ishuffle), (&__pyx_v_ideflate), (&__pyx_v_ideflate_level));
+
+  /* "netCDF4.pyx":2873
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return
+ *         ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":2874
+ *         ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
+ *         if ierr != NC_NOERR:
+ */
+    __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":2875
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_v_ierr = nc_inq_var_fletcher32(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_ifletcher32));
+
+  /* "netCDF4.pyx":2876
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         if ideflate:
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":2877
+ *         ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         if ideflate:
+ *             filtdict['zlib']=True
+ */
+    __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":2878
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         if ideflate:             # <<<<<<<<<<<<<<
+ *             filtdict['zlib']=True
+ *             filtdict['complevel']=ideflate_level
+ */
+  __pyx_t_3 = (__pyx_v_ideflate != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":2879
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         if ideflate:
+ *             filtdict['zlib']=True             # <<<<<<<<<<<<<<
+ *             filtdict['complevel']=ideflate_level
+ *         if ishuffle:
+ */
+    if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_zlib, Py_True) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "netCDF4.pyx":2880
+ *         if ideflate:
+ *             filtdict['zlib']=True
+ *             filtdict['complevel']=ideflate_level             # <<<<<<<<<<<<<<
+ *         if ishuffle:
+ *             filtdict['shuffle']=True
+ */
+    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ideflate_level); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_complevel, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L8;
+  }
+  __pyx_L8:;
+
+  /* "netCDF4.pyx":2881
+ *             filtdict['zlib']=True
+ *             filtdict['complevel']=ideflate_level
+ *         if ishuffle:             # <<<<<<<<<<<<<<
+ *             filtdict['shuffle']=True
+ *         if ifletcher32:
+ */
+  __pyx_t_3 = (__pyx_v_ishuffle != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":2882
+ *             filtdict['complevel']=ideflate_level
+ *         if ishuffle:
+ *             filtdict['shuffle']=True             # <<<<<<<<<<<<<<
+ *         if ifletcher32:
+ *             filtdict['fletcher32']=True
+ */
+    if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_shuffle, Py_True) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L9;
+  }
+  __pyx_L9:;
+
+  /* "netCDF4.pyx":2883
+ *         if ishuffle:
+ *             filtdict['shuffle']=True
+ *         if ifletcher32:             # <<<<<<<<<<<<<<
+ *             filtdict['fletcher32']=True
+ *         return filtdict
+ */
+  __pyx_t_3 = (__pyx_v_ifletcher32 != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":2884
+ *             filtdict['shuffle']=True
+ *         if ifletcher32:
+ *             filtdict['fletcher32']=True             # <<<<<<<<<<<<<<
+ *         return filtdict
+ * 
+ */
+    if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_fletcher32, Py_True) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L10;
+  }
+  __pyx_L10:;
+
+  /* "netCDF4.pyx":2885
+ *         if ifletcher32:
+ *             filtdict['fletcher32']=True
+ *         return filtdict             # <<<<<<<<<<<<<<
+ * 
+ *     def endian(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_filtdict);
+  __pyx_r = __pyx_v_filtdict;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2864
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def filters(self):             # <<<<<<<<<<<<<<
+ *         """
+ * filters(self)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("netCDF4.Variable.filters", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_filtdict);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2887
+ *         return filtdict
+ * 
+ *     def endian(self):             # <<<<<<<<<<<<<<
+ *         """
+ * endian(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_27endian(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_26endian[] = "\nendian(self)\n\nreturn endian-ness (little,big,native) of variable (as stored in HDF5 file).";
+static PyObject *__pyx_pw_7netCDF4_8Variable_27endian(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("endian (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_26endian(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_26endian(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_v_ierr;
+  int __pyx_v_iendian;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  char *__pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("endian", 0);
+
+  /* "netCDF4.pyx":2893
+ * return endian-ness (little,big,native) of variable (as stored in HDF5 file)."""
+ *         cdef int ierr, iendian
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']:             # <<<<<<<<<<<<<<
+ *             return 'native'
+ *         ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4_CLASSIC, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_3) {
+  } else {
+    __pyx_t_2 = __pyx_t_3;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __pyx_t_3;
+  __pyx_L4_bool_binop_done:;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = (__pyx_t_2 != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":2894
+ *         cdef int ierr, iendian
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']:
+ *             return 'native'             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
+ *         if ierr != NC_NOERR:
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_native);
+    __pyx_r = __pyx_n_s_native;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":2895
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']:
+ *             return 'native'
+ *         ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_v_ierr = nc_inq_var_endian(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_iendian));
+
+  /* "netCDF4.pyx":2896
+ *             return 'native'
+ *         ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         if iendian == NC_ENDIAN_LITTLE:
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":2897
+ *         ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         if iendian == NC_ENDIAN_LITTLE:
+ *             return 'little'
+ */
+    __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":2900
+ *         if iendian == NC_ENDIAN_LITTLE:
+ *             return 'little'
+ *         elif iendian == NC_ENDIAN_BIG:             # <<<<<<<<<<<<<<
+ *             return 'big'
+ *         else:
+ */
+  switch (__pyx_v_iendian) {
+
+    /* "netCDF4.pyx":2898
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         if iendian == NC_ENDIAN_LITTLE:             # <<<<<<<<<<<<<<
+ *             return 'little'
+ *         elif iendian == NC_ENDIAN_BIG:
+ */
+    case NC_ENDIAN_LITTLE:
+
+    /* "netCDF4.pyx":2899
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         if iendian == NC_ENDIAN_LITTLE:
+ *             return 'little'             # <<<<<<<<<<<<<<
+ *         elif iendian == NC_ENDIAN_BIG:
+ *             return 'big'
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_little);
+    __pyx_r = __pyx_n_s_little;
+    goto __pyx_L0;
+    break;
+
+    /* "netCDF4.pyx":2900
+ *         if iendian == NC_ENDIAN_LITTLE:
+ *             return 'little'
+ *         elif iendian == NC_ENDIAN_BIG:             # <<<<<<<<<<<<<<
+ *             return 'big'
+ *         else:
+ */
+    case NC_ENDIAN_BIG:
+
+    /* "netCDF4.pyx":2901
+ *             return 'little'
+ *         elif iendian == NC_ENDIAN_BIG:
+ *             return 'big'             # <<<<<<<<<<<<<<
+ *         else:
+ *             return 'native'
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_big);
+    __pyx_r = __pyx_n_s_big;
+    goto __pyx_L0;
+    break;
+    default:
+
+    /* "netCDF4.pyx":2903
+ *             return 'big'
+ *         else:
+ *             return 'native'             # <<<<<<<<<<<<<<
+ * 
+ *     def chunking(self):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_native);
+    __pyx_r = __pyx_n_s_native;
+    goto __pyx_L0;
+    break;
+  }
+
+  /* "netCDF4.pyx":2887
+ *         return filtdict
+ * 
+ *     def endian(self):             # <<<<<<<<<<<<<<
+ *         """
+ * endian(self)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("netCDF4.Variable.endian", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2905
+ *             return 'native'
+ * 
+ *     def chunking(self):             # <<<<<<<<<<<<<<
+ *         """
+ * chunking(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_29chunking(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_28chunking[] = "\nchunking(self)\n\nreturn variable chunking information.  If the dataset is \ndefined to be contiguous (and hence there is no chunking) the word 'contiguous'\nis returned.  Otherwise, a sequence with the chunksize for\neach dimension is returned.";
+static PyObject *__pyx_pw_7netCDF4_8Variable_29chunking(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("chunking (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_28chunking(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_28chunking(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_v_ierr;
+  int __pyx_v_icontiguous;
+  int __pyx_v_ndims;
+  size_t *__pyx_v_chunksizesp;
+  PyObject *__pyx_v_chunksizes = NULL;
+  long __pyx_v_n;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  char *__pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_t_7;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("chunking", 0);
+
+  /* "netCDF4.pyx":2915
+ *         cdef int ierr, icontiguous, ndims
+ *         cdef size_t *chunksizesp
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return None             # <<<<<<<<<<<<<<
+ *         ndims = self.ndim
+ *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4_CLASSIC, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_3) {
+  } else {
+    __pyx_t_2 = __pyx_t_3;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __pyx_t_3;
+  __pyx_L4_bool_binop_done:;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = (__pyx_t_2 != 0);
+  if (__pyx_t_3) {
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(Py_None);
+    __pyx_r = Py_None;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":2916
+ *         cdef size_t *chunksizesp
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return None
+ *         ndims = self.ndim             # <<<<<<<<<<<<<<
+ *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
+ *         ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
+ */
+  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_self->ndim); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_ndims = __pyx_t_4;
+
+  /* "netCDF4.pyx":2917
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return None
+ *         ndims = self.ndim
+ *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
+ *         if ierr != NC_NOERR:
+ */
+  __pyx_v_chunksizesp = ((size_t *)malloc(((sizeof(size_t)) * __pyx_v_ndims)));
+
+  /* "netCDF4.pyx":2918
+ *         ndims = self.ndim
+ *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
+ *         ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_v_ierr = nc_inq_var_chunking(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_icontiguous), __pyx_v_chunksizesp);
+
+  /* "netCDF4.pyx":2919
+ *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
+ *         ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         chunksizes=[]
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":2920
+ *         ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         chunksizes=[]
+ *         for n from 0 <= n < ndims:
+ */
+    __pyx_t_5 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":2921
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         chunksizes=[]             # <<<<<<<<<<<<<<
+ *         for n from 0 <= n < ndims:
+ *             chunksizes.append(chunksizesp[n])
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_chunksizes = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":2922
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         chunksizes=[]
+ *         for n from 0 <= n < ndims:             # <<<<<<<<<<<<<<
+ *             chunksizes.append(chunksizesp[n])
+ *         free(chunksizesp)
+ */
+  __pyx_t_4 = __pyx_v_ndims;
+  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {
+
+    /* "netCDF4.pyx":2923
+ *         chunksizes=[]
+ *         for n from 0 <= n < ndims:
+ *             chunksizes.append(chunksizesp[n])             # <<<<<<<<<<<<<<
+ *         free(chunksizesp)
+ *         if icontiguous:
+ */
+    __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_chunksizesp[__pyx_v_n])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_chunksizes, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+
+  /* "netCDF4.pyx":2924
+ *         for n from 0 <= n < ndims:
+ *             chunksizes.append(chunksizesp[n])
+ *         free(chunksizesp)             # <<<<<<<<<<<<<<
+ *         if icontiguous:
+ *             return 'contiguous'
+ */
+  free(__pyx_v_chunksizesp);
+
+  /* "netCDF4.pyx":2925
+ *             chunksizes.append(chunksizesp[n])
+ *         free(chunksizesp)
+ *         if icontiguous:             # <<<<<<<<<<<<<<
+ *             return 'contiguous'
+ *         else:
+ */
+  __pyx_t_3 = (__pyx_v_icontiguous != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":2926
+ *         free(chunksizesp)
+ *         if icontiguous:
+ *             return 'contiguous'             # <<<<<<<<<<<<<<
+ *         else:
+ *             return chunksizes
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_contiguous);
+    __pyx_r = __pyx_n_s_contiguous;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":2928
+ *             return 'contiguous'
+ *         else:
+ *             return chunksizes             # <<<<<<<<<<<<<<
+ * 
+ *     def get_var_chunk_cache(self):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_v_chunksizes);
+    __pyx_r = __pyx_v_chunksizes;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":2905
+ *             return 'native'
+ * 
+ *     def chunking(self):             # <<<<<<<<<<<<<<
+ *         """
+ * chunking(self)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netCDF4.Variable.chunking", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_chunksizes);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2930
+ *             return chunksizes
+ * 
+ *     def get_var_chunk_cache(self):             # <<<<<<<<<<<<<<
+ *         """
+ * get_var_chunk_cache(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_31get_var_chunk_cache(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_30get_var_chunk_cache[] = "\nget_var_chunk_cache(self)\n\nreturn variable chunk cache information in a tuple (size,nelems,preemption).\nSee netcdf C library documentation for C{nc_get_var_chunk_cache} for\ndetails.";
+static PyObject *__pyx_pw_7netCDF4_8Variable_31get_var_chunk_cache(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("get_var_chunk_cache (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_30get_var_chunk_cache(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_30get_var_chunk_cache(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_v_ierr;
+  size_t __pyx_v_sizep;
+  size_t __pyx_v_nelemsp;
+  float __pyx_v_preemptionp;
+  size_t __pyx_v_size;
+  size_t __pyx_v_nelems;
+  PyObject *__pyx_v_preemption = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  char *__pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("get_var_chunk_cache", 0);
+
+  /* "netCDF4.pyx":2940
+ *         cdef size_t sizep, nelemsp
+ *         cdef float preemptionp
+ *         ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,             # <<<<<<<<<<<<<<
+ *                &nelemsp, &preemptionp)
+ *         if ierr != NC_NOERR:
+ */
+  __pyx_v_ierr = nc_get_var_chunk_cache(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_sizep), (&__pyx_v_nelemsp), (&__pyx_v_preemptionp));
+
+  /* "netCDF4.pyx":2942
+ *         ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,
+ *                &nelemsp, &preemptionp)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         size = sizep; nelems = nelemsp; preemption = preemptionp
+ */
+  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":2943
+ *                &nelemsp, &preemptionp)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         size = sizep; nelems = nelemsp; preemption = preemptionp
+ *         return (size,nelems,preemption)
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_3);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":2944
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         size = sizep; nelems = nelemsp; preemption = preemptionp             # <<<<<<<<<<<<<<
+ *         return (size,nelems,preemption)
+ * 
+ */
+  __pyx_v_size = __pyx_v_sizep;
+  __pyx_v_nelems = __pyx_v_nelemsp;
+  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_preemptionp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_preemption = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":2945
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         size = sizep; nelems = nelemsp; preemption = preemptionp
+ *         return (size,nelems,preemption)             # <<<<<<<<<<<<<<
+ * 
+ *     def set_var_chunk_cache(self,size=None,nelems=None,preemption=None):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_nelems); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  __Pyx_INCREF(__pyx_v_preemption);
+  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_preemption);
+  __Pyx_GIVEREF(__pyx_v_preemption);
+  __pyx_t_3 = 0;
+  __pyx_t_4 = 0;
+  __pyx_r = __pyx_t_5;
+  __pyx_t_5 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":2930
+ *             return chunksizes
+ * 
+ *     def get_var_chunk_cache(self):             # <<<<<<<<<<<<<<
+ *         """
+ * get_var_chunk_cache(self)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("netCDF4.Variable.get_var_chunk_cache", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_preemption);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2947
+ *         return (size,nelems,preemption)
+ * 
+ *     def set_var_chunk_cache(self,size=None,nelems=None,preemption=None):             # <<<<<<<<<<<<<<
+ *         """
+ * set_var_chunk_cache(self,size=None,nelems=None,preemption=None)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_33set_var_chunk_cache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_32set_var_chunk_cache[] = "\nset_var_chunk_cache(self,size=None,nelems=None,preemption=None)\n\nchange variable chunk cache settings.\nSee netcdf C library documentation for C{nc_set_var_chunk_cache} for\ndetails.";
+static PyObject *__pyx_pw_7netCDF4_8Variable_33set_var_chunk_cache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_size = 0;
+  PyObject *__pyx_v_nelems = 0;
+  PyObject *__pyx_v_preemption = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("set_var_chunk_cache (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_nelems,&__pyx_n_s_preemption,0};
+    PyObject* values[3] = {0,0,0};
+    values[0] = ((PyObject *)Py_None);
+    values[1] = ((PyObject *)Py_None);
+    values[2] = ((PyObject *)Py_None);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
+          if (value) { values[0] = value; kw_args--; }
+        }
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nelems);
+          if (value) { values[1] = value; kw_args--; }
+        }
+        case  2:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_preemption);
+          if (value) { values[2] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_var_chunk_cache") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2947; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_size = values[0];
+    __pyx_v_nelems = values[1];
+    __pyx_v_preemption = values[2];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("set_var_chunk_cache", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2947; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.Variable.set_var_chunk_cache", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_32set_var_chunk_cache(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), __pyx_v_size, __pyx_v_nelems, __pyx_v_preemption);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_32set_var_chunk_cache(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_size, PyObject *__pyx_v_nelems, PyObject *__pyx_v_preemption) {
+  int __pyx_v_ierr;
+  size_t __pyx_v_sizep;
+  size_t __pyx_v_nelemsp;
+  float __pyx_v_preemptionp;
+  PyObject *__pyx_v_size_orig = NULL;
+  PyObject *__pyx_v_nelems_orig = NULL;
+  PyObject *__pyx_v_preemption_orig = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *(*__pyx_t_6)(PyObject *);
+  int __pyx_t_7;
+  int __pyx_t_8;
+  size_t __pyx_t_9;
+  float __pyx_t_10;
+  char *__pyx_t_11;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("set_var_chunk_cache", 0);
+
+  /* "netCDF4.pyx":2958
+ *         cdef float preemptionp
+ *         # reset chunk cache size, leave other parameters unchanged.
+ *         size_orig, nelems_orig, preemption_orig = self.get_var_chunk_cache()             # <<<<<<<<<<<<<<
+ *         if size is not None:
+ *             sizep = size
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_var_chunk_cache); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+    PyObject* sequence = __pyx_t_1;
+    #if CYTHON_COMPILING_IN_CPYTHON
+    Py_ssize_t size = Py_SIZE(sequence);
+    #else
+    Py_ssize_t size = PySequence_Size(sequence);
+    #endif
+    if (unlikely(size != 3)) {
+      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
+      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    #if CYTHON_COMPILING_IN_CPYTHON
+    if (likely(PyTuple_CheckExact(sequence))) {
+      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
+      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
+      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
+    } else {
+      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
+      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
+      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
+    }
+    __Pyx_INCREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_t_3);
+    __Pyx_INCREF(__pyx_t_4);
+    #else
+    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    #endif
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  } else {
+    Py_ssize_t index = -1;
+    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
+    index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
+    __Pyx_GOTREF(__pyx_t_2);
+    index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
+    __Pyx_GOTREF(__pyx_t_3);
+    index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
+    __Pyx_GOTREF(__pyx_t_4);
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = NULL;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    goto __pyx_L4_unpacking_done;
+    __pyx_L3_unpacking_failed:;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_6 = NULL;
+    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_L4_unpacking_done:;
+  }
+  __pyx_v_size_orig = __pyx_t_2;
+  __pyx_t_2 = 0;
+  __pyx_v_nelems_orig = __pyx_t_3;
+  __pyx_t_3 = 0;
+  __pyx_v_preemption_orig = __pyx_t_4;
+  __pyx_t_4 = 0;
+
+  /* "netCDF4.pyx":2959
+ *         # reset chunk cache size, leave other parameters unchanged.
+ *         size_orig, nelems_orig, preemption_orig = self.get_var_chunk_cache()
+ *         if size is not None:             # <<<<<<<<<<<<<<
+ *             sizep = size
+ *         else:
+ */
+  __pyx_t_7 = (__pyx_v_size != Py_None);
+  __pyx_t_8 = (__pyx_t_7 != 0);
+  if (__pyx_t_8) {
+
+    /* "netCDF4.pyx":2960
+ *         size_orig, nelems_orig, preemption_orig = self.get_var_chunk_cache()
+ *         if size is not None:
+ *             sizep = size             # <<<<<<<<<<<<<<
+ *         else:
+ *             sizep = size_orig
+ */
+    __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_sizep = __pyx_t_9;
+    goto __pyx_L5;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":2962
+ *             sizep = size
+ *         else:
+ *             sizep = size_orig             # <<<<<<<<<<<<<<
+ *         if nelems is not None:
+ *             nelemsp = nelems
+ */
+    __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_size_orig); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_sizep = __pyx_t_9;
+  }
+  __pyx_L5:;
+
+  /* "netCDF4.pyx":2963
+ *         else:
+ *             sizep = size_orig
+ *         if nelems is not None:             # <<<<<<<<<<<<<<
+ *             nelemsp = nelems
+ *         else:
+ */
+  __pyx_t_8 = (__pyx_v_nelems != Py_None);
+  __pyx_t_7 = (__pyx_t_8 != 0);
+  if (__pyx_t_7) {
+
+    /* "netCDF4.pyx":2964
+ *             sizep = size_orig
+ *         if nelems is not None:
+ *             nelemsp = nelems             # <<<<<<<<<<<<<<
+ *         else:
+ *             nelemsp = nelems_orig
+ */
+    __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_nelems); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_nelemsp = __pyx_t_9;
+    goto __pyx_L6;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":2966
+ *             nelemsp = nelems
+ *         else:
+ *             nelemsp = nelems_orig             # <<<<<<<<<<<<<<
+ *         if preemption is not None:
+ *             preemptionp = preemption
+ */
+    __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_nelems_orig); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_nelemsp = __pyx_t_9;
+  }
+  __pyx_L6:;
+
+  /* "netCDF4.pyx":2967
+ *         else:
+ *             nelemsp = nelems_orig
+ *         if preemption is not None:             # <<<<<<<<<<<<<<
+ *             preemptionp = preemption
+ *         else:
+ */
+  __pyx_t_7 = (__pyx_v_preemption != Py_None);
+  __pyx_t_8 = (__pyx_t_7 != 0);
+  if (__pyx_t_8) {
+
+    /* "netCDF4.pyx":2968
+ *             nelemsp = nelems_orig
+ *         if preemption is not None:
+ *             preemptionp = preemption             # <<<<<<<<<<<<<<
+ *         else:
+ *             preemptionp = preemption_orig
+ */
+    __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_v_preemption); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_preemptionp = __pyx_t_10;
+    goto __pyx_L7;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":2970
+ *             preemptionp = preemption
+ *         else:
+ *             preemptionp = preemption_orig             # <<<<<<<<<<<<<<
+ *         ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep,
+ *                nelemsp, preemptionp)
+ */
+    __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_v_preemption_orig); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_preemptionp = __pyx_t_10;
+  }
+  __pyx_L7:;
+
+  /* "netCDF4.pyx":2971
+ *         else:
+ *             preemptionp = preemption_orig
+ *         ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep,             # <<<<<<<<<<<<<<
+ *                nelemsp, preemptionp)
+ *         if ierr != NC_NOERR:
+ */
+  __pyx_v_ierr = nc_set_var_chunk_cache(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_sizep, __pyx_v_nelemsp, __pyx_v_preemptionp);
+
+  /* "netCDF4.pyx":2973
+ *         ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep,
+ *                nelemsp, preemptionp)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ */
+  __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_8) {
+
+    /* "netCDF4.pyx":2974
+ *                nelemsp, preemptionp)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ * 
+ *     def __delattr__(self,name):
+ */
+    __pyx_t_11 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_11, 0, strlen(__pyx_t_11), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":2947
+ *         return (size,nelems,preemption)
+ * 
+ *     def set_var_chunk_cache(self,size=None,nelems=None,preemption=None):             # <<<<<<<<<<<<<<
+ *         """
+ * set_var_chunk_cache(self,size=None,nelems=None,preemption=None)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("netCDF4.Variable.set_var_chunk_cache", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_size_orig);
+  __Pyx_XDECREF(__pyx_v_nelems_orig);
+  __Pyx_XDECREF(__pyx_v_preemption_orig);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2976
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def __delattr__(self,name):             # <<<<<<<<<<<<<<
+ *         # if it's a netCDF attribute, remove it
+ *         if name not in _private_atts:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_35__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_35__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__delattr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_34__delattr__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_name));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_34__delattr__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__delattr__", 0);
+
+  /* "netCDF4.pyx":2978
+ *     def __delattr__(self,name):
+ *         # if it's a netCDF attribute, remove it
+ *         if name not in _private_atts:             # <<<<<<<<<<<<<<
+ *             self.delncattr(name)
+ *         else:
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = (__pyx_t_2 != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":2979
+ *         # if it's a netCDF attribute, remove it
+ *         if name not in _private_atts:
+ *             self.delncattr(name)             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise AttributeError(
+ */
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delncattr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (!__pyx_t_5) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+      __Pyx_INCREF(__pyx_v_name);
+      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_name);
+      __Pyx_GIVEREF(__pyx_v_name);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":2982
+ *         else:
+ *             raise AttributeError(
+ *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))             # <<<<<<<<<<<<<<
+ * 
+ *     def __setattr__(self,name,value):
+ */
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_name);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_name);
+    __Pyx_GIVEREF(__pyx_v_name);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_is_one_of_the_reserved_attrib, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":2981
+ *             self.delncattr(name)
+ *         else:
+ *             raise AttributeError(             # <<<<<<<<<<<<<<
+ *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
+ * 
+ */
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
+    __Pyx_GIVEREF(__pyx_t_4);
+    __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":2976
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def __delattr__(self,name):             # <<<<<<<<<<<<<<
+ *         # if it's a netCDF attribute, remove it
+ *         if name not in _private_atts:
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netCDF4.Variable.__delattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2984
+ *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
+ * 
+ *     def __setattr__(self,name,value):             # <<<<<<<<<<<<<<
+ *         # if name in _private_atts, it is stored at the python
+ *         # level and not in the netCDF file.
+ */
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_37__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_37__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_36__setattr__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_name), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_36__setattr__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
+  PyObject *__pyx_v_msg = NULL;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  Py_ssize_t __pyx_t_6;
+  PyObject *__pyx_t_7 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__setattr__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+
+  /* "netCDF4.pyx":2987
+ *         # if name in _private_atts, it is stored at the python
+ *         # level and not in the netCDF file.
+ *         if name not in _private_atts:             # <<<<<<<<<<<<<<
+ *             # if setting _FillValue or missing_value, make sure value
+ *             # has same type as variable.
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = (__pyx_t_2 != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":2990
+ *             # if setting _FillValue or missing_value, make sure value
+ *             # has same type as variable.
+ *             if name == '_FillValue':             # <<<<<<<<<<<<<<
+ *                 msg='_FillValue attribute must be set when variable is '+\
+ *                 'created (using fill_value keyword to createVariable)'
+ */
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_FillValue, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":2991
+ *             # has same type as variable.
+ *             if name == '_FillValue':
+ *                 msg='_FillValue attribute must be set when variable is '+\             # <<<<<<<<<<<<<<
+ *                 'created (using fill_value keyword to createVariable)'
+ *                 raise AttributeError(msg)
+ */
+      __pyx_t_1 = PyNumber_Add(__pyx_kp_s_FillValue_attribute_must_be_set, __pyx_kp_s_created_using_fill_value_keyword); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_v_msg = __pyx_t_1;
+      __pyx_t_1 = 0;
+
+      /* "netCDF4.pyx":2993
+ *                 msg='_FillValue attribute must be set when variable is '+\
+ *                 'created (using fill_value keyword to createVariable)'
+ *                 raise AttributeError(msg)             # <<<<<<<<<<<<<<
+ *                 #if self._isprimitive:
+ *                 #    value = numpy.array(value, self.dtype)
+ */
+      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_INCREF(__pyx_v_msg);
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_msg);
+      __Pyx_GIVEREF(__pyx_v_msg);
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":3000
+ *                 #    "VLEN or compound variable"
+ *                 #    raise AttributeError(msg)
+ *             elif name == 'missing_value' and self._isprimitive:             # <<<<<<<<<<<<<<
+ *                 value = numpy.array(value, self.dtype)
+ *             self.setncattr(name, value)
+ */
+    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_missing_value, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_2) {
+    } else {
+      __pyx_t_3 = __pyx_t_2;
+      goto __pyx_L5_bool_binop_done;
+    }
+    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __pyx_t_2;
+    __pyx_L5_bool_binop_done:;
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":3001
+ *                 #    raise AttributeError(msg)
+ *             elif name == 'missing_value' and self._isprimitive:
+ *                 value = numpy.array(value, self.dtype)             # <<<<<<<<<<<<<<
+ *             self.setncattr(name, value)
+ *         elif not name.endswith('__'):
+ */
+      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = NULL;
+      __pyx_t_6 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
+        if (likely(__pyx_t_1)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+          __Pyx_INCREF(__pyx_t_1);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_5, function);
+          __pyx_t_6 = 1;
+        }
+      }
+      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      if (__pyx_t_1) {
+        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+      }
+      __Pyx_INCREF(__pyx_v_value);
+      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
+      __Pyx_GIVEREF(__pyx_v_value);
+      __Pyx_INCREF(__pyx_v_self->dtype);
+      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_self->dtype);
+      __Pyx_GIVEREF(__pyx_v_self->dtype);
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
+      __pyx_t_4 = 0;
+      goto __pyx_L4;
+    }
+    __pyx_L4:;
+
+    /* "netCDF4.pyx":3002
+ *             elif name == 'missing_value' and self._isprimitive:
+ *                 value = numpy.array(value, self.dtype)
+ *             self.setncattr(name, value)             # <<<<<<<<<<<<<<
+ *         elif not name.endswith('__'):
+ *             if hasattr(self,name):
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setncattr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_7 = NULL;
+    __pyx_t_6 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
+      if (likely(__pyx_t_7)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_7);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_5, function);
+        __pyx_t_6 = 1;
+      }
+    }
+    __pyx_t_1 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (__pyx_t_7) {
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_name);
+    PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_v_name);
+    __Pyx_GIVEREF(__pyx_v_name);
+    __Pyx_INCREF(__pyx_v_value);
+    PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_v_value);
+    __Pyx_GIVEREF(__pyx_v_value);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    goto __pyx_L3;
+  }
+
+  /* "netCDF4.pyx":3003
+ *                 value = numpy.array(value, self.dtype)
+ *             self.setncattr(name, value)
+ *         elif not name.endswith('__'):             # <<<<<<<<<<<<<<
+ *             if hasattr(self,name):
+ *                 raise AttributeError(
+ */
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_2 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":3004
+ *             self.setncattr(name, value)
+ *         elif not name.endswith('__'):
+ *             if hasattr(self,name):             # <<<<<<<<<<<<<<
+ *                 raise AttributeError(
+ *                 "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts)))
+ */
+    __pyx_t_2 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_v_name); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = (__pyx_t_2 != 0);
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":3006
+ *             if hasattr(self,name):
+ *                 raise AttributeError(
+ *                 "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts)))             # <<<<<<<<<<<<<<
+ *             else:
+ *                 self.__dict__[name]=value
+ */
+      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_4 = PySequence_Tuple(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_INCREF(__pyx_v_name);
+      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_name);
+      __Pyx_GIVEREF(__pyx_v_name);
+      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
+      __Pyx_GIVEREF(__pyx_t_4);
+      __pyx_t_4 = 0;
+      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_is_one_of_the_reserved_attrib_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+      /* "netCDF4.pyx":3005
+ *         elif not name.endswith('__'):
+ *             if hasattr(self,name):
+ *                 raise AttributeError(             # <<<<<<<<<<<<<<
+ *                 "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts)))
+ *             else:
+ */
+      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+      __Pyx_GIVEREF(__pyx_t_4);
+      __pyx_t_4 = 0;
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3008
+ *                 "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts)))
+ *             else:
+ *                 self.__dict__[name]=value             # <<<<<<<<<<<<<<
+ * 
+ *     def __getattr__(self,name):
+ */
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_name, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    }
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":2984
+ *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
+ * 
+ *     def __setattr__(self,name,value):             # <<<<<<<<<<<<<<
+ *         # if name in _private_atts, it is stored at the python
+ *         # level and not in the netCDF file.
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_AddTraceback("netCDF4.Variable.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_msg);
+  __Pyx_XDECREF(__pyx_v_value);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3010
+ *                 self.__dict__[name]=value
+ * 
+ *     def __getattr__(self,name):             # <<<<<<<<<<<<<<
+ *         # if name in _private_atts, it is stored at the python
+ *         # level and not in the netCDF file.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_39__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_39__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_38__getattr__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_name));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_38__getattr__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name) {
+  PyObject *__pyx_v_names = NULL;
+  PyObject *__pyx_v_values = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  Py_ssize_t __pyx_t_6;
+  PyObject *(*__pyx_t_7)(PyObject *);
+  int __pyx_t_8;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__getattr__", 0);
+  __Pyx_INCREF(__pyx_v_name);
+
+  /* "netCDF4.pyx":3013
+ *         # if name in _private_atts, it is stored at the python
+ *         # level and not in the netCDF file.
+ *         if name.startswith('__') and name.endswith('__'):             # <<<<<<<<<<<<<<
+ *             # if __dict__ requested, return a dict with netCDF attributes.
+ *             if name == '__dict__':
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (__pyx_t_4) {
+  } else {
+    __pyx_t_1 = __pyx_t_4;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_1 = __pyx_t_4;
+  __pyx_L4_bool_binop_done:;
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":3015
+ *         if name.startswith('__') and name.endswith('__'):
+ *             # if __dict__ requested, return a dict with netCDF attributes.
+ *             if name == '__dict__':             # <<<<<<<<<<<<<<
+ *                 names = self.ncattrs()
+ *                 values = []
+ */
+    __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_dict, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":3016
+ *             # if __dict__ requested, return a dict with netCDF attributes.
+ *             if name == '__dict__':
+ *                 names = self.ncattrs()             # <<<<<<<<<<<<<<
+ *                 values = []
+ *                 for name in names:
+ */
+      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_5 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+        if (likely(__pyx_t_5)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+          __Pyx_INCREF(__pyx_t_5);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_3, function);
+        }
+      }
+      if (__pyx_t_5) {
+        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      } else {
+        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_v_names = __pyx_t_2;
+      __pyx_t_2 = 0;
+
+      /* "netCDF4.pyx":3017
+ *             if name == '__dict__':
+ *                 names = self.ncattrs()
+ *                 values = []             # <<<<<<<<<<<<<<
+ *                 for name in names:
+ *                     values.append(_get_att(self._grp, self._varid, name))
+ */
+      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_v_values = ((PyObject*)__pyx_t_2);
+      __pyx_t_2 = 0;
+
+      /* "netCDF4.pyx":3018
+ *                 names = self.ncattrs()
+ *                 values = []
+ *                 for name in names:             # <<<<<<<<<<<<<<
+ *                     values.append(_get_att(self._grp, self._varid, name))
+ *                 return OrderedDict(zip(names,values))
+ */
+      if (likely(PyList_CheckExact(__pyx_v_names)) || PyTuple_CheckExact(__pyx_v_names)) {
+        __pyx_t_2 = __pyx_v_names; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
+        __pyx_t_7 = NULL;
+      } else {
+        __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_names); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      for (;;) {
+        if (likely(!__pyx_t_7)) {
+          if (likely(PyList_CheckExact(__pyx_t_2))) {
+            if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          } else {
+            if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          }
+        } else {
+          __pyx_t_3 = __pyx_t_7(__pyx_t_2);
+          if (unlikely(!__pyx_t_3)) {
+            PyObject* exc_type = PyErr_Occurred();
+            if (exc_type) {
+              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            break;
+          }
+          __Pyx_GOTREF(__pyx_t_3);
+        }
+        __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_3);
+        __pyx_t_3 = 0;
+
+        /* "netCDF4.pyx":3019
+ *                 values = []
+ *                 for name in names:
+ *                     values.append(_get_att(self._grp, self._varid, name))             # <<<<<<<<<<<<<<
+ *                 return OrderedDict(zip(names,values))
+ *             else:
+ */
+        __pyx_t_3 = __pyx_v_self->_grp;
+        __Pyx_INCREF(__pyx_t_3);
+        __pyx_t_5 = __pyx_f_7netCDF4__get_att(__pyx_t_3, __pyx_v_self->_varid, __pyx_v_name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_5); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+        /* "netCDF4.pyx":3018
+ *                 names = self.ncattrs()
+ *                 values = []
+ *                 for name in names:             # <<<<<<<<<<<<<<
+ *                     values.append(_get_att(self._grp, self._varid, name))
+ *                 return OrderedDict(zip(names,values))
+ */
+      }
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+      /* "netCDF4.pyx":3020
+ *                 for name in names:
+ *                     values.append(_get_att(self._grp, self._varid, name))
+ *                 return OrderedDict(zip(names,values))             # <<<<<<<<<<<<<<
+ *             else:
+ *                 raise AttributeError
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_10 = NULL;
+      __pyx_t_6 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
+        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
+        if (likely(__pyx_t_10)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+          __Pyx_INCREF(__pyx_t_10);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_9, function);
+          __pyx_t_6 = 1;
+        }
+      }
+      __pyx_t_11 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      if (__pyx_t_10) {
+        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = NULL;
+      }
+      __Pyx_INCREF(__pyx_v_names);
+      PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_v_names);
+      __Pyx_GIVEREF(__pyx_v_names);
+      __Pyx_INCREF(__pyx_v_values);
+      PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_v_values);
+      __Pyx_GIVEREF(__pyx_v_values);
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_9 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
+        if (likely(__pyx_t_9)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+          __Pyx_INCREF(__pyx_t_9);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_5, function);
+        }
+      }
+      if (!__pyx_t_9) {
+        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_GOTREF(__pyx_t_2);
+      } else {
+        __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
+        PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_3);
+        __Pyx_GIVEREF(__pyx_t_3);
+        __pyx_t_3 = 0;
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_r = __pyx_t_2;
+      __pyx_t_2 = 0;
+      goto __pyx_L0;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3022
+ *                 return OrderedDict(zip(names,values))
+ *             else:
+ *                 raise AttributeError             # <<<<<<<<<<<<<<
+ *         elif name in _private_atts:
+ *             return self.__dict__[name]
+ */
+      __Pyx_Raise(__pyx_builtin_AttributeError, 0, 0, 0);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+
+  /* "netCDF4.pyx":3023
+ *             else:
+ *                 raise AttributeError
+ *         elif name in _private_atts:             # <<<<<<<<<<<<<<
+ *             return self.__dict__[name]
+ *         else:
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_4 = (__pyx_t_1 != 0);
+  if (__pyx_t_4) {
+
+    /* "netCDF4.pyx":3024
+ *                 raise AttributeError
+ *         elif name in _private_atts:
+ *             return self.__dict__[name]             # <<<<<<<<<<<<<<
+ *         else:
+ *             return self.getncattr(name)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_r = __pyx_t_5;
+    __pyx_t_5 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":3026
+ *             return self.__dict__[name]
+ *         else:
+ *             return self.getncattr(name)             # <<<<<<<<<<<<<<
+ * 
+ *     def renameAttribute(self, oldname, newname):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_11 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
+      if (likely(__pyx_t_11)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+        __Pyx_INCREF(__pyx_t_11);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_2, function);
+      }
+    }
+    if (!__pyx_t_11) {
+      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+    } else {
+      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = NULL;
+      __Pyx_INCREF(__pyx_v_name);
+      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_name);
+      __Pyx_GIVEREF(__pyx_v_name);
+      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_r = __pyx_t_5;
+    __pyx_t_5 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":3010
+ *                 self.__dict__[name]=value
+ * 
+ *     def __getattr__(self,name):             # <<<<<<<<<<<<<<
+ *         # if name in _private_atts, it is stored at the python
+ *         # level and not in the netCDF file.
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_AddTraceback("netCDF4.Variable.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_names);
+  __Pyx_XDECREF(__pyx_v_values);
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3028
+ *             return self.getncattr(name)
+ * 
+ *     def renameAttribute(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameAttribute(self, oldname, newname)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_41renameAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_40renameAttribute[] = "\nrenameAttribute(self, oldname, newname)\n\nrename a L{Variable} attribute named C{oldname} to C{newname}.";
+static PyObject *__pyx_pw_7netCDF4_8Variable_41renameAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_oldname = 0;
+  PyObject *__pyx_v_newname = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("renameAttribute (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oldname,&__pyx_n_s_newname,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oldname)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameAttribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_oldname = values[0];
+    __pyx_v_newname = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.Variable.renameAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_40renameAttribute(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_40renameAttribute(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname) {
+  int __pyx_v_ierr;
+  char *__pyx_v_oldnamec;
+  char *__pyx_v_newnamec;
+  PyObject *__pyx_v_bytestr = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  char *__pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("renameAttribute", 0);
+
+  /* "netCDF4.pyx":3036
+ *         cdef char *oldnamec
+ *         cdef char *newnamec
+ *         bytestr = _strencode(oldname)             # <<<<<<<<<<<<<<
+ *         oldnamec = bytestr
+ *         bytestr = _strencode(newname)
+ */
+  __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_oldname, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_bytestr = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":3037
+ *         cdef char *newnamec
+ *         bytestr = _strencode(oldname)
+ *         oldnamec = bytestr             # <<<<<<<<<<<<<<
+ *         bytestr = _strencode(newname)
+ *         newnamec = bytestr
+ */
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_oldnamec = __pyx_t_2;
+
+  /* "netCDF4.pyx":3038
+ *         bytestr = _strencode(oldname)
+ *         oldnamec = bytestr
+ *         bytestr = _strencode(newname)             # <<<<<<<<<<<<<<
+ *         newnamec = bytestr
+ *         ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec)
+ */
+  __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":3039
+ *         oldnamec = bytestr
+ *         bytestr = _strencode(newname)
+ *         newnamec = bytestr             # <<<<<<<<<<<<<<
+ *         ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec)
+ *         if ierr != NC_NOERR:
+ */
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_newnamec = __pyx_t_2;
+
+  /* "netCDF4.pyx":3040
+ *         bytestr = _strencode(newname)
+ *         newnamec = bytestr
+ *         ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_v_ierr = nc_rename_att(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_oldnamec, __pyx_v_newnamec);
+
+  /* "netCDF4.pyx":3041
+ *         newnamec = bytestr
+ *         ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":3042
+ *         ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ * 
+ *     def __getitem__(self, elem):
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":3028
+ *             return self.getncattr(name)
+ * 
+ *     def renameAttribute(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameAttribute(self, oldname, newname)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4.Variable.renameAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_bytestr);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3044
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
+ *         # This special method is used to index the netCDF variable
+ *         # using the "extended slice syntax". The extended slice syntax
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_43__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_elem); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_43__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_elem) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_42__getitem__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_elem));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_42__getitem__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_elem) {
+  PyObject *__pyx_v_start = NULL;
+  PyObject *__pyx_v_count = NULL;
+  PyObject *__pyx_v_stride = NULL;
+  PyObject *__pyx_v_put_ind = NULL;
+  PyObject *__pyx_v_datashape = NULL;
+  PyObject *__pyx_v_data = NULL;
+  PyObject *__pyx_v_squeeze = NULL;
+  PyObject *__pyx_v_i = NULL;
+  PyObject *__pyx_v_n = NULL;
+  PyObject *__pyx_v_a = NULL;
+  PyObject *__pyx_v_b = NULL;
+  PyObject *__pyx_v_c = NULL;
+  PyObject *__pyx_v_datout = NULL;
+  PyObject *__pyx_v_shape = NULL;
+  int __pyx_v_valid_scaleoffset;
+  PyObject *__pyx_v_msg = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  Py_ssize_t __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *(*__pyx_t_8)(PyObject *);
+  int __pyx_t_9;
+  PyObject *(*__pyx_t_10)(PyObject *);
+  int __pyx_t_11;
+  PyObject *__pyx_t_12 = NULL;
+  Py_ssize_t __pyx_t_13;
+  int __pyx_t_14;
+  PyObject *__pyx_t_15 = NULL;
+  PyObject *__pyx_t_16 = NULL;
+  PyObject *__pyx_t_17 = NULL;
+  double __pyx_t_18;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__getitem__", 0);
+
+  /* "netCDF4.pyx":3050
+ *         # arguments to the nc_get_var() function, and is much more easy
+ *         # to use.
+ *         start, count, stride, put_ind = _StartCountStride(elem,self.shape)             # <<<<<<<<<<<<<<
+ *         datashape = _out_array_shape(count)
+ *         if self._isvlen:
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = NULL;
+  __pyx_t_5 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+      __pyx_t_5 = 1;
+    }
+  }
+  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if (__pyx_t_4) {
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+  }
+  __Pyx_INCREF(__pyx_v_elem);
+  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_elem);
+  __Pyx_GIVEREF(__pyx_v_elem);
+  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_3 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+    PyObject* sequence = __pyx_t_1;
+    #if CYTHON_COMPILING_IN_CPYTHON
+    Py_ssize_t size = Py_SIZE(sequence);
+    #else
+    Py_ssize_t size = PySequence_Size(sequence);
+    #endif
+    if (unlikely(size != 4)) {
+      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
+      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    #if CYTHON_COMPILING_IN_CPYTHON
+    if (likely(PyTuple_CheckExact(sequence))) {
+      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
+      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
+      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
+      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 3); 
+    } else {
+      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
+      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
+      __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
+      __pyx_t_4 = PyList_GET_ITEM(sequence, 3); 
+    }
+    __Pyx_INCREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_t_6);
+    __Pyx_INCREF(__pyx_t_3);
+    __Pyx_INCREF(__pyx_t_4);
+    #else
+    {
+      Py_ssize_t i;
+      PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_3,&__pyx_t_4};
+      for (i=0; i < 4; i++) {
+        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(item);
+        *(temps[i]) = item;
+      }
+    }
+    #endif
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  } else {
+    Py_ssize_t index = -1;
+    PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_3,&__pyx_t_4};
+    __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
+    for (index=0; index < 4; index++) {
+      PyObject* item = __pyx_t_8(__pyx_t_7); if (unlikely(!item)) goto __pyx_L3_unpacking_failed;
+      __Pyx_GOTREF(item);
+      *(temps[index]) = item;
+    }
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = NULL;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    goto __pyx_L4_unpacking_done;
+    __pyx_L3_unpacking_failed:;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_8 = NULL;
+    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_L4_unpacking_done:;
+  }
+  __pyx_v_start = __pyx_t_2;
+  __pyx_t_2 = 0;
+  __pyx_v_count = __pyx_t_6;
+  __pyx_t_6 = 0;
+  __pyx_v_stride = __pyx_t_3;
+  __pyx_t_3 = 0;
+  __pyx_v_put_ind = __pyx_t_4;
+  __pyx_t_4 = 0;
+
+  /* "netCDF4.pyx":3051
+ *         # to use.
+ *         start, count, stride, put_ind = _StartCountStride(elem,self.shape)
+ *         datashape = _out_array_shape(count)             # <<<<<<<<<<<<<<
+ *         if self._isvlen:
+ *             data = numpy.empty(datashape, dtype='O')
+ */
+  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_4, function);
+    }
+  }
+  if (!__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+  } else {
+    __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+    __Pyx_INCREF(__pyx_v_count);
+    PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_count);
+    __Pyx_GIVEREF(__pyx_v_count);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_v_datashape = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":3052
+ *         start, count, stride, put_ind = _StartCountStride(elem,self.shape)
+ *         datashape = _out_array_shape(count)
+ *         if self._isvlen:             # <<<<<<<<<<<<<<
+ *             data = numpy.empty(datashape, dtype='O')
+ *         else:
+ */
+  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_9) {
+
+    /* "netCDF4.pyx":3053
+ *         datashape = _out_array_shape(count)
+ *         if self._isvlen:
+ *             data = numpy.empty(datashape, dtype='O')             # <<<<<<<<<<<<<<
+ *         else:
+ *             data = numpy.empty(datashape, dtype=self.dtype)
+ */
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_datashape);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_datashape);
+    __Pyx_GIVEREF(__pyx_v_datashape);
+    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_n_s_O) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_v_data = __pyx_t_3;
+    __pyx_t_3 = 0;
+    goto __pyx_L5;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":3055
+ *             data = numpy.empty(datashape, dtype='O')
+ *         else:
+ *             data = numpy.empty(datashape, dtype=self.dtype)             # <<<<<<<<<<<<<<
+ * 
+ *         # Determine which dimensions need to be
+ */
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_INCREF(__pyx_v_datashape);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_datashape);
+    __Pyx_GIVEREF(__pyx_v_datashape);
+    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_v_self->dtype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_data = __pyx_t_4;
+    __pyx_t_4 = 0;
+  }
+  __pyx_L5:;
+
+  /* "netCDF4.pyx":3061
+ *         # The convention used is that for those cases,
+ *         # put_ind for this dimension is set to -1 by _StartCountStride.
+ *         squeeze = data.ndim * [slice(None),]             # <<<<<<<<<<<<<<
+ *         for i,n in enumerate(put_ind.shape[:-1]):
+ *             if n == 1 and put_ind[...,i].ravel()[0] == -1:
+ */
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_slice__70);
+  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_slice__70);
+  __Pyx_GIVEREF(__pyx_slice__70);
+  __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_squeeze = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":3062
+ *         # put_ind for this dimension is set to -1 by _StartCountStride.
+ *         squeeze = data.ndim * [slice(None),]
+ *         for i,n in enumerate(put_ind.shape[:-1]):             # <<<<<<<<<<<<<<
+ *             if n == 1 and put_ind[...,i].ravel()[0] == -1:
+ *                 squeeze[i] = 0
+ */
+  __Pyx_INCREF(__pyx_int_0);
+  __pyx_t_3 = __pyx_int_0;
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, -1, NULL, NULL, &__pyx_slice__71, 0, 1, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
+    __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
+    __pyx_t_10 = NULL;
+  } else {
+    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_10)) {
+      if (likely(PyList_CheckExact(__pyx_t_1))) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_4 = __pyx_t_10(__pyx_t_1);
+      if (unlikely(!__pyx_t_4)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_4);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_4);
+    __pyx_t_4 = 0;
+    __Pyx_INCREF(__pyx_t_3);
+    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+    __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3);
+    __pyx_t_3 = __pyx_t_4;
+    __pyx_t_4 = 0;
+
+    /* "netCDF4.pyx":3063
+ *         squeeze = data.ndim * [slice(None),]
+ *         for i,n in enumerate(put_ind.shape[:-1]):
+ *             if n == 1 and put_ind[...,i].ravel()[0] == -1:             # <<<<<<<<<<<<<<
+ *                 squeeze[i] = 0
+ * 
+ */
+    __pyx_t_4 = PyObject_RichCompare(__pyx_v_n, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_11) {
+    } else {
+      __pyx_t_9 = __pyx_t_11;
+      goto __pyx_L9_bool_binop_done;
+    }
+    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_INCREF(Py_Ellipsis);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, Py_Ellipsis);
+    __Pyx_GIVEREF(Py_Ellipsis);
+    __Pyx_INCREF(__pyx_v_i);
+    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_i);
+    __Pyx_GIVEREF(__pyx_v_i);
+    __pyx_t_2 = PyObject_GetItem(__pyx_v_put_ind, __pyx_t_6); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ravel); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
+      if (likely(__pyx_t_2)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_2);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_6, function);
+      }
+    }
+    if (__pyx_t_2) {
+      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    } else {
+      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_9 = __pyx_t_11;
+    __pyx_L9_bool_binop_done:;
+    if (__pyx_t_9) {
+
+      /* "netCDF4.pyx":3064
+ *         for i,n in enumerate(put_ind.shape[:-1]):
+ *             if n == 1 and put_ind[...,i].ravel()[0] == -1:
+ *                 squeeze[i] = 0             # <<<<<<<<<<<<<<
+ * 
+ *         # Reshape the arrays so we can iterate over them.
+ */
+      if (unlikely(PyObject_SetItem(__pyx_v_squeeze, __pyx_v_i, __pyx_int_0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L8;
+    }
+    __pyx_L8:;
+
+    /* "netCDF4.pyx":3062
+ *         # put_ind for this dimension is set to -1 by _StartCountStride.
+ *         squeeze = data.ndim * [slice(None),]
+ *         for i,n in enumerate(put_ind.shape[:-1]):             # <<<<<<<<<<<<<<
+ *             if n == 1 and put_ind[...,i].ravel()[0] == -1:
+ *                 squeeze[i] = 0
+ */
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":3067
+ * 
+ *         # Reshape the arrays so we can iterate over them.
+ *         start = start.reshape((-1, self.ndim or 1))             # <<<<<<<<<<<<<<
+ *         count = count.reshape((-1, self.ndim or 1))
+ *         stride = stride.reshape((-1, self.ndim or 1))
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_9) {
+  } else {
+    __Pyx_INCREF(__pyx_v_self->ndim);
+    __pyx_t_4 = __pyx_v_self->ndim;
+    goto __pyx_L11_bool_binop_done;
+  }
+  __pyx_t_6 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_4 = __pyx_t_6;
+  __pyx_t_6 = 0;
+  __pyx_L11_bool_binop_done:;
+  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_neg_1);
+  __Pyx_GIVEREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  __pyx_t_4 = 0;
+  __pyx_t_4 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+    }
+  }
+  if (!__pyx_t_4) {
+    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_GOTREF(__pyx_t_3);
+  } else {
+    __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+    PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
+    __pyx_t_6 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":3068
+ *         # Reshape the arrays so we can iterate over them.
+ *         start = start.reshape((-1, self.ndim or 1))
+ *         count = count.reshape((-1, self.ndim or 1))             # <<<<<<<<<<<<<<
+ *         stride = stride.reshape((-1, self.ndim or 1))
+ *         put_ind = put_ind.reshape((-1, self.ndim or 1))
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_9) {
+  } else {
+    __Pyx_INCREF(__pyx_v_self->ndim);
+    __pyx_t_2 = __pyx_v_self->ndim;
+    goto __pyx_L13_bool_binop_done;
+  }
+  __pyx_t_6 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_2 = __pyx_t_6;
+  __pyx_t_6 = 0;
+  __pyx_L13_bool_binop_done:;
+  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_neg_1);
+  __Pyx_GIVEREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_2 = 0;
+  __pyx_t_2 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_2)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+    }
+  }
+  if (!__pyx_t_2) {
+    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_GOTREF(__pyx_t_3);
+  } else {
+    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
+    __pyx_t_6 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF_SET(__pyx_v_count, __pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":3069
+ *         start = start.reshape((-1, self.ndim or 1))
+ *         count = count.reshape((-1, self.ndim or 1))
+ *         stride = stride.reshape((-1, self.ndim or 1))             # <<<<<<<<<<<<<<
+ *         put_ind = put_ind.reshape((-1, self.ndim or 1))
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_9) {
+  } else {
+    __Pyx_INCREF(__pyx_v_self->ndim);
+    __pyx_t_4 = __pyx_v_self->ndim;
+    goto __pyx_L15_bool_binop_done;
+  }
+  __pyx_t_6 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_4 = __pyx_t_6;
+  __pyx_t_6 = 0;
+  __pyx_L15_bool_binop_done:;
+  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_neg_1);
+  __Pyx_GIVEREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  __pyx_t_4 = 0;
+  __pyx_t_4 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+    }
+  }
+  if (!__pyx_t_4) {
+    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_GOTREF(__pyx_t_3);
+  } else {
+    __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+    PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
+    __pyx_t_6 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF_SET(__pyx_v_stride, __pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":3070
+ *         count = count.reshape((-1, self.ndim or 1))
+ *         stride = stride.reshape((-1, self.ndim or 1))
+ *         put_ind = put_ind.reshape((-1, self.ndim or 1))             # <<<<<<<<<<<<<<
+ * 
+ *         # Fill output array with data chunks.
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_9) {
+  } else {
+    __Pyx_INCREF(__pyx_v_self->ndim);
+    __pyx_t_2 = __pyx_v_self->ndim;
+    goto __pyx_L17_bool_binop_done;
+  }
+  __pyx_t_6 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_2 = __pyx_t_6;
+  __pyx_t_6 = 0;
+  __pyx_L17_bool_binop_done:;
+  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_neg_1);
+  __Pyx_GIVEREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_2 = 0;
+  __pyx_t_2 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_2)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+    }
+  }
+  if (!__pyx_t_2) {
+    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_GOTREF(__pyx_t_3);
+  } else {
+    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
+    __pyx_t_6 = 0;
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF_SET(__pyx_v_put_ind, __pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":3073
+ * 
+ *         # Fill output array with data chunks.
+ *         for (a,b,c,i) in zip(start, count, stride, put_ind):             # <<<<<<<<<<<<<<
+ *             datout = self._get(a,b,c)
+ *             if not hasattr(datout,'shape') or data.shape == datout.shape:
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_4 = NULL;
+  __pyx_t_5 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+      __pyx_t_5 = 1;
+    }
+  }
+  __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if (__pyx_t_4) {
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+  }
+  __Pyx_INCREF(__pyx_v_start);
+  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_start);
+  __Pyx_GIVEREF(__pyx_v_start);
+  __Pyx_INCREF(__pyx_v_count);
+  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_count);
+  __Pyx_GIVEREF(__pyx_v_count);
+  __Pyx_INCREF(__pyx_v_stride);
+  PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_stride);
+  __Pyx_GIVEREF(__pyx_v_stride);
+  __Pyx_INCREF(__pyx_v_put_ind);
+  PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_put_ind);
+  __Pyx_GIVEREF(__pyx_v_put_ind);
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+    __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
+    __pyx_t_10 = NULL;
+  } else {
+    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_10)) {
+      if (likely(PyList_CheckExact(__pyx_t_1))) {
+        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_3 = __pyx_t_10(__pyx_t_1);
+      if (unlikely(!__pyx_t_3)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_3);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
+      PyObject* sequence = __pyx_t_3;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 4)) {
+        if (size > 4) __Pyx_RaiseTooManyValuesError(4);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
+        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); 
+        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); 
+      } else {
+        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
+        __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
+        __pyx_t_7 = PyList_GET_ITEM(sequence, 3); 
+      }
+      __Pyx_INCREF(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_7);
+      #else
+      {
+        Py_ssize_t i;
+        PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_4,&__pyx_t_2,&__pyx_t_7};
+        for (i=0; i < 4; i++) {
+          PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(item);
+          *(temps[i]) = item;
+        }
+      }
+      #endif
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_4,&__pyx_t_2,&__pyx_t_7};
+      __pyx_t_12 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_8 = Py_TYPE(__pyx_t_12)->tp_iternext;
+      for (index=0; index < 4; index++) {
+        PyObject* item = __pyx_t_8(__pyx_t_12); if (unlikely(!item)) goto __pyx_L21_unpacking_failed;
+        __Pyx_GOTREF(item);
+        *(temps[index]) = item;
+      }
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_12), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = NULL;
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      goto __pyx_L22_unpacking_done;
+      __pyx_L21_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __pyx_t_8 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L22_unpacking_done:;
+    }
+    __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_6);
+    __pyx_t_6 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_4);
+    __pyx_t_4 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_2);
+    __pyx_t_2 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7);
+    __pyx_t_7 = 0;
+
+    /* "netCDF4.pyx":3074
+ *         # Fill output array with data chunks.
+ *         for (a,b,c,i) in zip(start, count, stride, put_ind):
+ *             datout = self._get(a,b,c)             # <<<<<<<<<<<<<<
+ *             if not hasattr(datout,'shape') or data.shape == datout.shape:
+ *                 data = datout
+ */
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_2 = NULL;
+    __pyx_t_13 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+      if (likely(__pyx_t_2)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+        __Pyx_INCREF(__pyx_t_2);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_7, function);
+        __pyx_t_13 = 1;
+      }
+    }
+    __pyx_t_4 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    if (__pyx_t_2) {
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_a);
+    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_13, __pyx_v_a);
+    __Pyx_GIVEREF(__pyx_v_a);
+    __Pyx_INCREF(__pyx_v_b);
+    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_13, __pyx_v_b);
+    __Pyx_GIVEREF(__pyx_v_b);
+    __Pyx_INCREF(__pyx_v_c);
+    PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_13, __pyx_v_c);
+    __Pyx_GIVEREF(__pyx_v_c);
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_datout, __pyx_t_3);
+    __pyx_t_3 = 0;
+
+    /* "netCDF4.pyx":3075
+ *         for (a,b,c,i) in zip(start, count, stride, put_ind):
+ *             datout = self._get(a,b,c)
+ *             if not hasattr(datout,'shape') or data.shape == datout.shape:             # <<<<<<<<<<<<<<
+ *                 data = datout
+ *             else:
+ */
+    __pyx_t_11 = PyObject_HasAttr(__pyx_v_datout, __pyx_n_s_shape); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_14 = ((!(__pyx_t_11 != 0)) != 0);
+    if (!__pyx_t_14) {
+    } else {
+      __pyx_t_9 = __pyx_t_14;
+      goto __pyx_L24_bool_binop_done;
+    }
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datout, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_9 = __pyx_t_14;
+    __pyx_L24_bool_binop_done:;
+    if (__pyx_t_9) {
+
+      /* "netCDF4.pyx":3076
+ *             datout = self._get(a,b,c)
+ *             if not hasattr(datout,'shape') or data.shape == datout.shape:
+ *                 data = datout             # <<<<<<<<<<<<<<
+ *             else:
+ *                 shape = getattr(data[tuple(i)], 'shape', ())
+ */
+      __Pyx_INCREF(__pyx_v_datout);
+      __Pyx_DECREF_SET(__pyx_v_data, __pyx_v_datout);
+      goto __pyx_L23;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3078
+ *                 data = datout
+ *             else:
+ *                 shape = getattr(data[tuple(i)], 'shape', ())             # <<<<<<<<<<<<<<
+ *                 data[tuple(i)] = datout.reshape(shape)
+ * 
+ */
+      __pyx_t_4 = PySequence_Tuple(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_7 = PyObject_GetItem(__pyx_v_data, __pyx_t_4); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = __Pyx_GetAttr3(__pyx_t_7, __pyx_n_s_shape, __pyx_empty_tuple); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_shape, __pyx_t_4);
+      __pyx_t_4 = 0;
+
+      /* "netCDF4.pyx":3079
+ *             else:
+ *                 shape = getattr(data[tuple(i)], 'shape', ())
+ *                 data[tuple(i)] = datout.reshape(shape)             # <<<<<<<<<<<<<<
+ * 
+ *         # Remove extra singleton dimensions.
+ */
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datout, __pyx_n_s_reshape); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_3 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
+        if (likely(__pyx_t_3)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+          __Pyx_INCREF(__pyx_t_3);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_7, function);
+        }
+      }
+      if (!__pyx_t_3) {
+        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+      } else {
+        __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+        __Pyx_INCREF(__pyx_v_shape);
+        PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_shape);
+        __Pyx_GIVEREF(__pyx_v_shape);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_7 = PySequence_Tuple(__pyx_v_i); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_t_7, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    }
+    __pyx_L23:;
+
+    /* "netCDF4.pyx":3073
+ * 
+ *         # Fill output array with data chunks.
+ *         for (a,b,c,i) in zip(start, count, stride, put_ind):             # <<<<<<<<<<<<<<
+ *             datout = self._get(a,b,c)
+ *             if not hasattr(datout,'shape') or data.shape == datout.shape:
+ */
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":3082
+ * 
+ *         # Remove extra singleton dimensions.
+ *         if hasattr(data,'shape'):             # <<<<<<<<<<<<<<
+ *             data = data[tuple(squeeze)]
+ *         if hasattr(data,'ndim') and self.ndim == 0:
+ */
+  __pyx_t_9 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_14 = (__pyx_t_9 != 0);
+  if (__pyx_t_14) {
+
+    /* "netCDF4.pyx":3083
+ *         # Remove extra singleton dimensions.
+ *         if hasattr(data,'shape'):
+ *             data = data[tuple(squeeze)]             # <<<<<<<<<<<<<<
+ *         if hasattr(data,'ndim') and self.ndim == 0:
+ *             # Make sure a numpy scalar is returned instead of a 1-d array of
+ */
+    __pyx_t_1 = PySequence_Tuple(__pyx_v_squeeze); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = PyObject_GetItem(__pyx_v_data, __pyx_t_1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4);
+    __pyx_t_4 = 0;
+    goto __pyx_L26;
+  }
+  __pyx_L26:;
+
+  /* "netCDF4.pyx":3084
+ *         if hasattr(data,'shape'):
+ *             data = data[tuple(squeeze)]
+ *         if hasattr(data,'ndim') and self.ndim == 0:             # <<<<<<<<<<<<<<
+ *             # Make sure a numpy scalar is returned instead of a 1-d array of
+ *             # length 1.
+ */
+  __pyx_t_9 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_11 = (__pyx_t_9 != 0);
+  if (__pyx_t_11) {
+  } else {
+    __pyx_t_14 = __pyx_t_11;
+    goto __pyx_L28_bool_binop_done;
+  }
+  __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->ndim, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_14 = __pyx_t_11;
+  __pyx_L28_bool_binop_done:;
+  if (__pyx_t_14) {
+
+    /* "netCDF4.pyx":3087
+ *             # Make sure a numpy scalar is returned instead of a 1-d array of
+ *             # length 1.
+ *             if data.ndim != 0: data = data[0]             # <<<<<<<<<<<<<<
+ * 
+ *         # if auto_scale mode set to True, (through
+ */
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_14) {
+      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3087; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1);
+      __pyx_t_1 = 0;
+      goto __pyx_L30;
+    }
+    __pyx_L30:;
+    goto __pyx_L27;
+  }
+  __pyx_L27:;
+
+  /* "netCDF4.pyx":3097
+ *         # missing_value/_Fill_Value.
+ *         # ignore for compound and vlen datatypes.
+ *         try: # check to see if scale_factor and add_offset is valid (issue 176).             # <<<<<<<<<<<<<<
+ *             if hasattr(self,'scale_factor'): float(self.scale_factor)
+ *             if hasattr(self,'add_offset'): float(self.add_offset)
+ */
+  {
+    __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
+    __Pyx_XGOTREF(__pyx_t_15);
+    __Pyx_XGOTREF(__pyx_t_16);
+    __Pyx_XGOTREF(__pyx_t_17);
+    /*try:*/ {
+
+      /* "netCDF4.pyx":3098
+ *         # ignore for compound and vlen datatypes.
+ *         try: # check to see if scale_factor and add_offset is valid (issue 176).
+ *             if hasattr(self,'scale_factor'): float(self.scale_factor)             # <<<<<<<<<<<<<<
+ *             if hasattr(self,'add_offset'): float(self.add_offset)
+ *             valid_scaleoffset = True
+ */
+      __pyx_t_14 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3098; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
+      __pyx_t_11 = (__pyx_t_14 != 0);
+      if (__pyx_t_11) {
+        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3098; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_18 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_18 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3098; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        goto __pyx_L39;
+      }
+      __pyx_L39:;
+
+      /* "netCDF4.pyx":3099
+ *         try: # check to see if scale_factor and add_offset is valid (issue 176).
+ *             if hasattr(self,'scale_factor'): float(self.scale_factor)
+ *             if hasattr(self,'add_offset'): float(self.add_offset)             # <<<<<<<<<<<<<<
+ *             valid_scaleoffset = True
+ *         except:
+ */
+      __pyx_t_11 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3099; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
+      __pyx_t_14 = (__pyx_t_11 != 0);
+      if (__pyx_t_14) {
+        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3099; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_18 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_18 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3099; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        goto __pyx_L40;
+      }
+      __pyx_L40:;
+
+      /* "netCDF4.pyx":3100
+ *             if hasattr(self,'scale_factor'): float(self.scale_factor)
+ *             if hasattr(self,'add_offset'): float(self.add_offset)
+ *             valid_scaleoffset = True             # <<<<<<<<<<<<<<
+ *         except:
+ *             valid_scaleoffset = False
+ */
+      __pyx_v_valid_scaleoffset = 1;
+    }
+    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+    goto __pyx_L38_try_end;
+    __pyx_L31_error:;
+    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":3101
+ *             if hasattr(self,'add_offset'): float(self.add_offset)
+ *             valid_scaleoffset = True
+ *         except:             # <<<<<<<<<<<<<<
+ *             valid_scaleoffset = False
+ *             if self.scale:
+ */
+    /*except:*/ {
+      __Pyx_AddTraceback("netCDF4.Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3101; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_GOTREF(__pyx_t_7);
+
+      /* "netCDF4.pyx":3102
+ *             valid_scaleoffset = True
+ *         except:
+ *             valid_scaleoffset = False             # <<<<<<<<<<<<<<
+ *             if self.scale:
+ *                 msg = 'invalid scale_factor or add_offset attribute, no unpacking done...'
+ */
+      __pyx_v_valid_scaleoffset = 0;
+
+      /* "netCDF4.pyx":3103
+ *         except:
+ *             valid_scaleoffset = False
+ *             if self.scale:             # <<<<<<<<<<<<<<
+ *                 msg = 'invalid scale_factor or add_offset attribute, no unpacking done...'
+ *                 warnings.warn(msg)
+ */
+      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+      if (__pyx_t_14) {
+
+        /* "netCDF4.pyx":3104
+ *             valid_scaleoffset = False
+ *             if self.scale:
+ *                 msg = 'invalid scale_factor or add_offset attribute, no unpacking done...'             # <<<<<<<<<<<<<<
+ *                 warnings.warn(msg)
+ *         if self.mask and self._isprimitive:
+ */
+        __Pyx_INCREF(__pyx_kp_s_invalid_scale_factor_or_add_offs);
+        __pyx_v_msg = __pyx_kp_s_invalid_scale_factor_or_add_offs;
+
+        /* "netCDF4.pyx":3105
+ *             if self.scale:
+ *                 msg = 'invalid scale_factor or add_offset attribute, no unpacking done...'
+ *                 warnings.warn(msg)             # <<<<<<<<<<<<<<
+ *         if self.mask and self._isprimitive:
+ *             data = self._toma(data)
+ */
+        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3105; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warn); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3105; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_3 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
+          if (likely(__pyx_t_3)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+            __Pyx_INCREF(__pyx_t_3);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_6, function);
+          }
+        }
+        if (!__pyx_t_3) {
+          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_msg); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3105; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+        } else {
+          __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3105; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+          __Pyx_INCREF(__pyx_v_msg);
+          PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_msg);
+          __Pyx_GIVEREF(__pyx_v_msg);
+          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3105; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        goto __pyx_L43;
+      }
+      __pyx_L43:;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      goto __pyx_L32_exception_handled;
+    }
+    __pyx_L33_except_error:;
+    __Pyx_XGIVEREF(__pyx_t_15);
+    __Pyx_XGIVEREF(__pyx_t_16);
+    __Pyx_XGIVEREF(__pyx_t_17);
+    __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
+    goto __pyx_L1_error;
+    __pyx_L32_exception_handled:;
+    __Pyx_XGIVEREF(__pyx_t_15);
+    __Pyx_XGIVEREF(__pyx_t_16);
+    __Pyx_XGIVEREF(__pyx_t_17);
+    __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
+    __pyx_L38_try_end:;
+  }
+
+  /* "netCDF4.pyx":3106
+ *                 msg = 'invalid scale_factor or add_offset attribute, no unpacking done...'
+ *                 warnings.warn(msg)
+ *         if self.mask and self._isprimitive:             # <<<<<<<<<<<<<<
+ *             data = self._toma(data)
+ *         if self.scale and self._isprimitive and valid_scaleoffset:
+ */
+  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_self->mask); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_11) {
+  } else {
+    __pyx_t_14 = __pyx_t_11;
+    goto __pyx_L45_bool_binop_done;
+  }
+  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_14 = __pyx_t_11;
+  __pyx_L45_bool_binop_done:;
+  if (__pyx_t_14) {
+
+    /* "netCDF4.pyx":3107
+ *                 warnings.warn(msg)
+ *         if self.mask and self._isprimitive:
+ *             data = self._toma(data)             # <<<<<<<<<<<<<<
+ *         if self.scale and self._isprimitive and valid_scaleoffset:
+ *             # if variable has scale_factor and add_offset attributes, rescale.
+ */
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_toma); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_1 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_1)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_1);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (!__pyx_t_1) {
+      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+    } else {
+      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+      __Pyx_INCREF(__pyx_v_data);
+      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_data);
+      __Pyx_GIVEREF(__pyx_v_data);
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_7);
+    __pyx_t_7 = 0;
+    goto __pyx_L44;
+  }
+  __pyx_L44:;
+
+  /* "netCDF4.pyx":3108
+ *         if self.mask and self._isprimitive:
+ *             data = self._toma(data)
+ *         if self.scale and self._isprimitive and valid_scaleoffset:             # <<<<<<<<<<<<<<
+ *             # if variable has scale_factor and add_offset attributes, rescale.
+ *             if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset') and\
+ */
+  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_11) {
+  } else {
+    __pyx_t_14 = __pyx_t_11;
+    goto __pyx_L48_bool_binop_done;
+  }
+  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_11) {
+  } else {
+    __pyx_t_14 = __pyx_t_11;
+    goto __pyx_L48_bool_binop_done;
+  }
+  __pyx_t_11 = (__pyx_v_valid_scaleoffset != 0);
+  __pyx_t_14 = __pyx_t_11;
+  __pyx_L48_bool_binop_done:;
+  if (__pyx_t_14) {
+
+    /* "netCDF4.pyx":3110
+ *         if self.scale and self._isprimitive and valid_scaleoffset:
+ *             # if variable has scale_factor and add_offset attributes, rescale.
+ *             if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset') and\             # <<<<<<<<<<<<<<
+ *             (self.add_offset != 0.0 or self.scale_factor != 1.0):
+ *                 data = data*self.scale_factor + self.add_offset
+ */
+    __pyx_t_11 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = (__pyx_t_11 != 0);
+    if (__pyx_t_9) {
+    } else {
+      __pyx_t_14 = __pyx_t_9;
+      goto __pyx_L52_bool_binop_done;
+    }
+    __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = (__pyx_t_9 != 0);
+    if (__pyx_t_11) {
+    } else {
+      __pyx_t_14 = __pyx_t_11;
+      goto __pyx_L52_bool_binop_done;
+    }
+
+    /* "netCDF4.pyx":3111
+ *             # if variable has scale_factor and add_offset attributes, rescale.
+ *             if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset') and\
+ *             (self.add_offset != 0.0 or self.scale_factor != 1.0):             # <<<<<<<<<<<<<<
+ *                 data = data*self.scale_factor + self.add_offset
+ *             # else if variable has only scale_factor attributes, rescale.
+ */
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_4 = PyObject_RichCompare(__pyx_t_7, __pyx_float_0_0, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (!__pyx_t_11) {
+    } else {
+      __pyx_t_14 = __pyx_t_11;
+      goto __pyx_L52_bool_binop_done;
+    }
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_float_1_0, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_14 = __pyx_t_11;
+    __pyx_L52_bool_binop_done:;
+    if (__pyx_t_14) {
+
+      /* "netCDF4.pyx":3112
+ *             if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset') and\
+ *             (self.add_offset != 0.0 or self.scale_factor != 1.0):
+ *                 data = data*self.scale_factor + self.add_offset             # <<<<<<<<<<<<<<
+ *             # else if variable has only scale_factor attributes, rescale.
+ *             elif hasattr(self, 'scale_factor') and self.scale_factor != 1.0:
+ */
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_4 = PyNumber_Multiply(__pyx_v_data, __pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
+      __pyx_t_2 = 0;
+      goto __pyx_L51;
+    }
+
+    /* "netCDF4.pyx":3114
+ *                 data = data*self.scale_factor + self.add_offset
+ *             # else if variable has only scale_factor attributes, rescale.
+ *             elif hasattr(self, 'scale_factor') and self.scale_factor != 1.0:             # <<<<<<<<<<<<<<
+ *                 data = data*self.scale_factor
+ *             # else if variable has only add_offset attributes, rescale.
+ */
+    __pyx_t_11 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = (__pyx_t_11 != 0);
+    if (__pyx_t_9) {
+    } else {
+      __pyx_t_14 = __pyx_t_9;
+      goto __pyx_L56_bool_binop_done;
+    }
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_float_1_0, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_14 = __pyx_t_9;
+    __pyx_L56_bool_binop_done:;
+    if (__pyx_t_14) {
+
+      /* "netCDF4.pyx":3115
+ *             # else if variable has only scale_factor attributes, rescale.
+ *             elif hasattr(self, 'scale_factor') and self.scale_factor != 1.0:
+ *                 data = data*self.scale_factor             # <<<<<<<<<<<<<<
+ *             # else if variable has only add_offset attributes, rescale.
+ *             elif hasattr(self, 'add_offset') and self.add_offset != 0.0:
+ */
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_2 = PyNumber_Multiply(__pyx_v_data, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
+      __pyx_t_2 = 0;
+      goto __pyx_L51;
+    }
+
+    /* "netCDF4.pyx":3117
+ *                 data = data*self.scale_factor
+ *             # else if variable has only add_offset attributes, rescale.
+ *             elif hasattr(self, 'add_offset') and self.add_offset != 0.0:             # <<<<<<<<<<<<<<
+ *                 data += self.add_offset
+ *         return data
+ */
+    __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = (__pyx_t_9 != 0);
+    if (__pyx_t_11) {
+    } else {
+      __pyx_t_14 = __pyx_t_11;
+      goto __pyx_L58_bool_binop_done;
+    }
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_float_0_0, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_14 = __pyx_t_11;
+    __pyx_L58_bool_binop_done:;
+    if (__pyx_t_14) {
+
+      /* "netCDF4.pyx":3118
+ *             # else if variable has only add_offset attributes, rescale.
+ *             elif hasattr(self, 'add_offset') and self.add_offset != 0.0:
+ *                 data += self.add_offset             # <<<<<<<<<<<<<<
+ *         return data
+ * 
+ */
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_data, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
+      __pyx_t_2 = 0;
+      goto __pyx_L51;
+    }
+    __pyx_L51:;
+    goto __pyx_L47;
+  }
+  __pyx_L47:;
+
+  /* "netCDF4.pyx":3119
+ *             elif hasattr(self, 'add_offset') and self.add_offset != 0.0:
+ *                 data += self.add_offset
+ *         return data             # <<<<<<<<<<<<<<
+ * 
+ *     def _toma(self,data):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_data);
+  __pyx_r = __pyx_v_data;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":3044
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
+ *         # This special method is used to index the netCDF variable
+ *         # using the "extended slice syntax". The extended slice syntax
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_12);
+  __Pyx_AddTraceback("netCDF4.Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_start);
+  __Pyx_XDECREF(__pyx_v_count);
+  __Pyx_XDECREF(__pyx_v_stride);
+  __Pyx_XDECREF(__pyx_v_put_ind);
+  __Pyx_XDECREF(__pyx_v_datashape);
+  __Pyx_XDECREF(__pyx_v_data);
+  __Pyx_XDECREF(__pyx_v_squeeze);
+  __Pyx_XDECREF(__pyx_v_i);
+  __Pyx_XDECREF(__pyx_v_n);
+  __Pyx_XDECREF(__pyx_v_a);
+  __Pyx_XDECREF(__pyx_v_b);
+  __Pyx_XDECREF(__pyx_v_c);
+  __Pyx_XDECREF(__pyx_v_datout);
+  __Pyx_XDECREF(__pyx_v_shape);
+  __Pyx_XDECREF(__pyx_v_msg);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3121
+ *         return data
+ * 
+ *     def _toma(self,data):             # <<<<<<<<<<<<<<
+ *         cdef int ierr, no_fill
+ *         # private function for creating a masked array, masking missing_values
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_45_toma(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_45_toma(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_toma (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_44_toma(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_data));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_44_toma(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_data) {
+  int __pyx_v_ierr;
+  int __pyx_v_no_fill;
+  PyObject *__pyx_v_totalmask = NULL;
+  PyObject *__pyx_v_fill_value = NULL;
+  PyObject *__pyx_v_mval = NULL;
+  PyObject *__pyx_v_hasmval = NULL;
+  PyObject *__pyx_v_mvalisnan = NULL;
+  PyObject *__pyx_v_m = NULL;
+  PyObject *__pyx_v_mask = NULL;
+  PyObject *__pyx_v_fval = NULL;
+  PyObject *__pyx_v_fvalisnan = NULL;
+  PyObject *__pyx_v_fillval = NULL;
+  PyObject *__pyx_v_has_fillval = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  Py_ssize_t __pyx_t_6;
+  PyObject *__pyx_t_7 = NULL;
+  int __pyx_t_8;
+  int __pyx_t_9;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  PyObject *__pyx_t_12 = NULL;
+  int __pyx_t_13;
+  PyObject *(*__pyx_t_14)(PyObject *);
+  char *__pyx_t_15;
+  int __pyx_t_16;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_toma", 0);
+  __Pyx_INCREF(__pyx_v_data);
+
+  /* "netCDF4.pyx":3125
+ *         # private function for creating a masked array, masking missing_values
+ *         # and/or _FillValues.
+ *         totalmask = numpy.zeros(data.shape, numpy.bool)             # <<<<<<<<<<<<<<
+ *         fill_value = None
+ *         if hasattr(self, 'missing_value'):
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bool); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = NULL;
+  __pyx_t_6 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+      __pyx_t_6 = 1;
+    }
+  }
+  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (__pyx_t_4) {
+    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+  }
+  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
+  __pyx_t_2 = 0;
+  __pyx_t_5 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_v_totalmask = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":3126
+ *         # and/or _FillValues.
+ *         totalmask = numpy.zeros(data.shape, numpy.bool)
+ *         fill_value = None             # <<<<<<<<<<<<<<
+ *         if hasattr(self, 'missing_value'):
+ *             mval = numpy.array(self.missing_value, self.dtype)
+ */
+  __Pyx_INCREF(Py_None);
+  __pyx_v_fill_value = Py_None;
+
+  /* "netCDF4.pyx":3127
+ *         totalmask = numpy.zeros(data.shape, numpy.bool)
+ *         fill_value = None
+ *         if hasattr(self, 'missing_value'):             # <<<<<<<<<<<<<<
+ *             mval = numpy.array(self.missing_value, self.dtype)
+ *             if (self.endian() == 'big' and is_native_little) or\
+ */
+  __pyx_t_8 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = (__pyx_t_8 != 0);
+  if (__pyx_t_9) {
+
+    /* "netCDF4.pyx":3128
+ *         fill_value = None
+ *         if hasattr(self, 'missing_value'):
+ *             mval = numpy.array(self.missing_value, self.dtype)             # <<<<<<<<<<<<<<
+ *             if (self.endian() == 'big' and is_native_little) or\
+ *                (self.endian() == 'little' and is_native_big):
+ */
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_5 = NULL;
+    __pyx_t_6 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_7, function);
+        __pyx_t_6 = 1;
+      }
+    }
+    __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    if (__pyx_t_5) {
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+    }
+    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __Pyx_INCREF(__pyx_v_self->dtype);
+    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_v_self->dtype);
+    __Pyx_GIVEREF(__pyx_v_self->dtype);
+    __pyx_t_3 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_v_mval = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":3129
+ *         if hasattr(self, 'missing_value'):
+ *             mval = numpy.array(self.missing_value, self.dtype)
+ *             if (self.endian() == 'big' and is_native_little) or\             # <<<<<<<<<<<<<<
+ *                (self.endian() == 'little' and is_native_big):
+ *                      mval.byteswap(True)
+ */
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_2 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+      if (likely(__pyx_t_2)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+        __Pyx_INCREF(__pyx_t_2);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_7, function);
+      }
+    }
+    if (__pyx_t_2) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_big, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (!__pyx_t_8) {
+      goto __pyx_L6_next_or;
+    } else {
+    }
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (!__pyx_t_8) {
+    } else {
+      __pyx_t_9 = __pyx_t_8;
+      goto __pyx_L5_bool_binop_done;
+    }
+    __pyx_L6_next_or:;
+
+    /* "netCDF4.pyx":3130
+ *             mval = numpy.array(self.missing_value, self.dtype)
+ *             if (self.endian() == 'big' and is_native_little) or\
+ *                (self.endian() == 'little' and is_native_big):             # <<<<<<<<<<<<<<
+ *                      mval.byteswap(True)
+ *             if mval.shape == (): # mval a scalar.
+ */
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_2 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+      if (likely(__pyx_t_2)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+        __Pyx_INCREF(__pyx_t_2);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_7, function);
+      }
+    }
+    if (__pyx_t_2) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_little, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_8) {
+    } else {
+      __pyx_t_9 = __pyx_t_8;
+      goto __pyx_L5_bool_binop_done;
+    }
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_9 = __pyx_t_8;
+    __pyx_L5_bool_binop_done:;
+    if (__pyx_t_9) {
+
+      /* "netCDF4.pyx":3131
+ *             if (self.endian() == 'big' and is_native_little) or\
+ *                (self.endian() == 'little' and is_native_big):
+ *                      mval.byteswap(True)             # <<<<<<<<<<<<<<
+ *             if mval.shape == (): # mval a scalar.
+ *                 hasmval = data==mval
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mval, __pyx_n_s_byteswap); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      goto __pyx_L4;
+    }
+    __pyx_L4:;
+
+    /* "netCDF4.pyx":3132
+ *                (self.endian() == 'little' and is_native_big):
+ *                      mval.byteswap(True)
+ *             if mval.shape == (): # mval a scalar.             # <<<<<<<<<<<<<<
+ *                 hasmval = data==mval
+ *                 # is scalar missing value a NaN?
+ */
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_mval, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_9) {
+
+      /* "netCDF4.pyx":3133
+ *                      mval.byteswap(True)
+ *             if mval.shape == (): # mval a scalar.
+ *                 hasmval = data==mval             # <<<<<<<<<<<<<<
+ *                 # is scalar missing value a NaN?
+ *                 try:
+ */
+      __pyx_t_1 = PyObject_RichCompare(__pyx_v_data, __pyx_v_mval, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_hasmval = __pyx_t_1;
+      __pyx_t_1 = 0;
+
+      /* "netCDF4.pyx":3135
+ *                 hasmval = data==mval
+ *                 # is scalar missing value a NaN?
+ *                 try:             # <<<<<<<<<<<<<<
+ *                     mvalisnan = numpy.isnan(mval)
+ *                 except TypeError: # isnan fails on some dtypes (issue 206)
+ */
+      {
+        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
+        __Pyx_XGOTREF(__pyx_t_10);
+        __Pyx_XGOTREF(__pyx_t_11);
+        __Pyx_XGOTREF(__pyx_t_12);
+        /*try:*/ {
+
+          /* "netCDF4.pyx":3136
+ *                 # is scalar missing value a NaN?
+ *                 try:
+ *                     mvalisnan = numpy.isnan(mval)             # <<<<<<<<<<<<<<
+ *                 except TypeError: # isnan fails on some dtypes (issue 206)
+ *                     mvalisnan = False
+ */
+          __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3136; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_isnan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3136; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          __pyx_t_7 = NULL;
+          if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+            if (likely(__pyx_t_7)) {
+              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+              __Pyx_INCREF(__pyx_t_7);
+              __Pyx_INCREF(function);
+              __Pyx_DECREF_SET(__pyx_t_2, function);
+            }
+          }
+          if (!__pyx_t_7) {
+            __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_mval); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3136; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+            __Pyx_GOTREF(__pyx_t_1);
+          } else {
+            __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3136; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+            __Pyx_GOTREF(__pyx_t_3);
+            PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+            __Pyx_INCREF(__pyx_v_mval);
+            PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_mval);
+            __Pyx_GIVEREF(__pyx_v_mval);
+            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3136; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+            __Pyx_GOTREF(__pyx_t_1);
+            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          }
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __pyx_v_mvalisnan = __pyx_t_1;
+          __pyx_t_1 = 0;
+        }
+        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+        goto __pyx_L17_try_end;
+        __pyx_L10_error:;
+        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+        /* "netCDF4.pyx":3137
+ *                 try:
+ *                     mvalisnan = numpy.isnan(mval)
+ *                 except TypeError: # isnan fails on some dtypes (issue 206)             # <<<<<<<<<<<<<<
+ *                     mvalisnan = False
+ *             else: # mval a vector.
+ */
+        __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
+        if (__pyx_t_13) {
+          __Pyx_AddTraceback("netCDF4.Variable._toma", __pyx_clineno, __pyx_lineno, __pyx_filename);
+          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3137; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __Pyx_GOTREF(__pyx_t_1);
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_GOTREF(__pyx_t_3);
+
+          /* "netCDF4.pyx":3138
+ *                     mvalisnan = numpy.isnan(mval)
+ *                 except TypeError: # isnan fails on some dtypes (issue 206)
+ *                     mvalisnan = False             # <<<<<<<<<<<<<<
+ *             else: # mval a vector.
+ *                 hasmval = numpy.zeros(data.shape, numpy.bool)
+ */
+          __Pyx_INCREF(Py_False);
+          __Pyx_XDECREF_SET(__pyx_v_mvalisnan, Py_False);
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          goto __pyx_L11_exception_handled;
+        }
+        goto __pyx_L12_except_error;
+        __pyx_L12_except_error:;
+        __Pyx_XGIVEREF(__pyx_t_10);
+        __Pyx_XGIVEREF(__pyx_t_11);
+        __Pyx_XGIVEREF(__pyx_t_12);
+        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+        goto __pyx_L1_error;
+        __pyx_L11_exception_handled:;
+        __Pyx_XGIVEREF(__pyx_t_10);
+        __Pyx_XGIVEREF(__pyx_t_11);
+        __Pyx_XGIVEREF(__pyx_t_12);
+        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+        __pyx_L17_try_end:;
+      }
+      goto __pyx_L9;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3140
+ *                     mvalisnan = False
+ *             else: # mval a vector.
+ *                 hasmval = numpy.zeros(data.shape, numpy.bool)             # <<<<<<<<<<<<<<
+ *                 for m in mval:
+ *                     m =  numpy.array(m)
+ */
+      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_bool); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_7 = NULL;
+      __pyx_t_6 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
+        if (likely(__pyx_t_7)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+          __Pyx_INCREF(__pyx_t_7);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_1, function);
+          __pyx_t_6 = 1;
+        }
+      }
+      __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      if (__pyx_t_7) {
+        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+      }
+      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
+      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_t_5);
+      __Pyx_GIVEREF(__pyx_t_5);
+      __pyx_t_2 = 0;
+      __pyx_t_5 = 0;
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_hasmval = __pyx_t_3;
+      __pyx_t_3 = 0;
+
+      /* "netCDF4.pyx":3141
+ *             else: # mval a vector.
+ *                 hasmval = numpy.zeros(data.shape, numpy.bool)
+ *                 for m in mval:             # <<<<<<<<<<<<<<
+ *                     m =  numpy.array(m)
+ *                     hasmval += data == m
+ */
+      if (likely(PyList_CheckExact(__pyx_v_mval)) || PyTuple_CheckExact(__pyx_v_mval)) {
+        __pyx_t_3 = __pyx_v_mval; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
+        __pyx_t_14 = NULL;
+      } else {
+        __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_mval); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_14 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      for (;;) {
+        if (likely(!__pyx_t_14)) {
+          if (likely(PyList_CheckExact(__pyx_t_3))) {
+            if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          } else {
+            if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          }
+        } else {
+          __pyx_t_1 = __pyx_t_14(__pyx_t_3);
+          if (unlikely(!__pyx_t_1)) {
+            PyObject* exc_type = PyErr_Occurred();
+            if (exc_type) {
+              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            break;
+          }
+          __Pyx_GOTREF(__pyx_t_1);
+        }
+        __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_1);
+        __pyx_t_1 = 0;
+
+        /* "netCDF4.pyx":3142
+ *                 hasmval = numpy.zeros(data.shape, numpy.bool)
+ *                 for m in mval:
+ *                     m =  numpy.array(m)             # <<<<<<<<<<<<<<
+ *                     hasmval += data == m
+ *             if mval.shape == () and mvalisnan:
+ */
+        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_t_4 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
+          if (likely(__pyx_t_4)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+            __Pyx_INCREF(__pyx_t_4);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_5, function);
+          }
+        }
+        if (!__pyx_t_4) {
+          __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_m); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_1);
+        } else {
+          __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+          __Pyx_INCREF(__pyx_v_m);
+          PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_m);
+          __Pyx_GIVEREF(__pyx_v_m);
+          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_1);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_DECREF_SET(__pyx_v_m, __pyx_t_1);
+        __pyx_t_1 = 0;
+
+        /* "netCDF4.pyx":3143
+ *                 for m in mval:
+ *                     m =  numpy.array(m)
+ *                     hasmval += data == m             # <<<<<<<<<<<<<<
+ *             if mval.shape == () and mvalisnan:
+ *                 mask = numpy.isnan(data)
+ */
+        __pyx_t_1 = PyObject_RichCompare(__pyx_v_data, __pyx_v_m, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_hasmval, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF_SET(__pyx_v_hasmval, __pyx_t_5);
+        __pyx_t_5 = 0;
+
+        /* "netCDF4.pyx":3141
+ *             else: # mval a vector.
+ *                 hasmval = numpy.zeros(data.shape, numpy.bool)
+ *                 for m in mval:             # <<<<<<<<<<<<<<
+ *                     m =  numpy.array(m)
+ *                     hasmval += data == m
+ */
+      }
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    }
+    __pyx_L9:;
+
+    /* "netCDF4.pyx":3144
+ *                     m =  numpy.array(m)
+ *                     hasmval += data == m
+ *             if mval.shape == () and mvalisnan:             # <<<<<<<<<<<<<<
+ *                 mask = numpy.isnan(data)
+ *             elif hasmval.any():
+ */
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_mval, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (__pyx_t_8) {
+    } else {
+      __pyx_t_9 = __pyx_t_8;
+      goto __pyx_L23_bool_binop_done;
+    }
+    if (unlikely(!__pyx_v_mvalisnan)) { __Pyx_RaiseUnboundLocalError("mvalisnan"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_mvalisnan); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __pyx_t_8;
+    __pyx_L23_bool_binop_done:;
+    if (__pyx_t_9) {
+
+      /* "netCDF4.pyx":3145
+ *                     hasmval += data == m
+ *             if mval.shape == () and mvalisnan:
+ *                 mask = numpy.isnan(data)             # <<<<<<<<<<<<<<
+ *             elif hasmval.any():
+ *                 mask = hasmval
+ */
+      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isnan); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+        if (likely(__pyx_t_3)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+          __Pyx_INCREF(__pyx_t_3);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_1, function);
+        }
+      }
+      if (!__pyx_t_3) {
+        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_data); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+      } else {
+        __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+        __Pyx_INCREF(__pyx_v_data);
+        PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_data);
+        __Pyx_GIVEREF(__pyx_v_data);
+        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_mask = __pyx_t_5;
+      __pyx_t_5 = 0;
+      goto __pyx_L22;
+    }
+
+    /* "netCDF4.pyx":3146
+ *             if mval.shape == () and mvalisnan:
+ *                 mask = numpy.isnan(data)
+ *             elif hasmval.any():             # <<<<<<<<<<<<<<
+ *                 mask = hasmval
+ *             else:
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_hasmval, __pyx_n_s_any); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+      if (likely(__pyx_t_2)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+        __Pyx_INCREF(__pyx_t_2);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_1, function);
+      }
+    }
+    if (__pyx_t_2) {
+      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    } else {
+      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (__pyx_t_9) {
+
+      /* "netCDF4.pyx":3147
+ *                 mask = numpy.isnan(data)
+ *             elif hasmval.any():
+ *                 mask = hasmval             # <<<<<<<<<<<<<<
+ *             else:
+ *                 mask = None
+ */
+      __Pyx_INCREF(__pyx_v_hasmval);
+      __pyx_v_mask = __pyx_v_hasmval;
+      goto __pyx_L22;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3149
+ *                 mask = hasmval
+ *             else:
+ *                 mask = None             # <<<<<<<<<<<<<<
+ *             if mask is not None:
+ *                 fill_value = mval
+ */
+      __Pyx_INCREF(Py_None);
+      __pyx_v_mask = Py_None;
+    }
+    __pyx_L22:;
+
+    /* "netCDF4.pyx":3150
+ *             else:
+ *                 mask = None
+ *             if mask is not None:             # <<<<<<<<<<<<<<
+ *                 fill_value = mval
+ *                 totalmask += mask
+ */
+    __pyx_t_9 = (__pyx_v_mask != Py_None);
+    __pyx_t_8 = (__pyx_t_9 != 0);
+    if (__pyx_t_8) {
+
+      /* "netCDF4.pyx":3151
+ *                 mask = None
+ *             if mask is not None:
+ *                 fill_value = mval             # <<<<<<<<<<<<<<
+ *                 totalmask += mask
+ *         if hasattr(self, '_FillValue'):
+ */
+      __Pyx_INCREF(__pyx_v_mval);
+      __Pyx_DECREF_SET(__pyx_v_fill_value, __pyx_v_mval);
+
+      /* "netCDF4.pyx":3152
+ *             if mask is not None:
+ *                 fill_value = mval
+ *                 totalmask += mask             # <<<<<<<<<<<<<<
+ *         if hasattr(self, '_FillValue'):
+ *             fval = numpy.array(self._FillValue, self.dtype)
+ */
+      __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_5);
+      __pyx_t_5 = 0;
+      goto __pyx_L25;
+    }
+    __pyx_L25:;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":3153
+ *                 fill_value = mval
+ *                 totalmask += mask
+ *         if hasattr(self, '_FillValue'):             # <<<<<<<<<<<<<<
+ *             fval = numpy.array(self._FillValue, self.dtype)
+ *             # byte swap the _FillValue if endian-ness of the variable
+ */
+  __pyx_t_8 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = (__pyx_t_8 != 0);
+  if (__pyx_t_9) {
+
+    /* "netCDF4.pyx":3154
+ *                 totalmask += mask
+ *         if hasattr(self, '_FillValue'):
+ *             fval = numpy.array(self._FillValue, self.dtype)             # <<<<<<<<<<<<<<
+ *             # byte swap the _FillValue if endian-ness of the variable
+ *             # is not native.
+ */
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = NULL;
+    __pyx_t_6 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+      if (likely(__pyx_t_3)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+        __Pyx_INCREF(__pyx_t_3);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_2, function);
+        __pyx_t_6 = 1;
+      }
+    }
+    __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    if (__pyx_t_3) {
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+    }
+    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_self->dtype);
+    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_self->dtype);
+    __Pyx_GIVEREF(__pyx_v_self->dtype);
+    __pyx_t_1 = 0;
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_v_fval = __pyx_t_5;
+    __pyx_t_5 = 0;
+
+    /* "netCDF4.pyx":3157
+ *             # byte swap the _FillValue if endian-ness of the variable
+ *             # is not native.
+ *             if (self.endian() == 'big' and is_native_little) or\             # <<<<<<<<<<<<<<
+ *                (self.endian() == 'little' and is_native_big):
+ *                      fval.byteswap(True)
+ */
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_2, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_big, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (!__pyx_t_8) {
+      goto __pyx_L29_next_or;
+    } else {
+    }
+    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (!__pyx_t_8) {
+    } else {
+      __pyx_t_9 = __pyx_t_8;
+      goto __pyx_L28_bool_binop_done;
+    }
+    __pyx_L29_next_or:;
+
+    /* "netCDF4.pyx":3158
+ *             # is not native.
+ *             if (self.endian() == 'big' and is_native_little) or\
+ *                (self.endian() == 'little' and is_native_big):             # <<<<<<<<<<<<<<
+ *                      fval.byteswap(True)
+ *             # is _FillValue a NaN?
+ */
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_2, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_little, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (__pyx_t_8) {
+    } else {
+      __pyx_t_9 = __pyx_t_8;
+      goto __pyx_L28_bool_binop_done;
+    }
+    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_9 = __pyx_t_8;
+    __pyx_L28_bool_binop_done:;
+    if (__pyx_t_9) {
+
+      /* "netCDF4.pyx":3159
+ *             if (self.endian() == 'big' and is_native_little) or\
+ *                (self.endian() == 'little' and is_native_big):
+ *                      fval.byteswap(True)             # <<<<<<<<<<<<<<
+ *             # is _FillValue a NaN?
+ *             try:
+ */
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fval, __pyx_n_s_byteswap); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      goto __pyx_L27;
+    }
+    __pyx_L27:;
+
+    /* "netCDF4.pyx":3161
+ *                      fval.byteswap(True)
+ *             # is _FillValue a NaN?
+ *             try:             # <<<<<<<<<<<<<<
+ *                 fvalisnan = numpy.isnan(fval)
+ *             except TypeError: # isnan fails on some dtypes (issue 202)
+ */
+    {
+      __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
+      __Pyx_XGOTREF(__pyx_t_12);
+      __Pyx_XGOTREF(__pyx_t_11);
+      __Pyx_XGOTREF(__pyx_t_10);
+      /*try:*/ {
+
+        /* "netCDF4.pyx":3162
+ *             # is _FillValue a NaN?
+ *             try:
+ *                 fvalisnan = numpy.isnan(fval)             # <<<<<<<<<<<<<<
+ *             except TypeError: # isnan fails on some dtypes (issue 202)
+ *                 fvalisnan = False
+ */
+        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L32_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isnan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L32_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __pyx_t_5 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+          if (likely(__pyx_t_5)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+            __Pyx_INCREF(__pyx_t_5);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_4, function);
+          }
+        }
+        if (!__pyx_t_5) {
+          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_fval); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L32_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+        } else {
+          __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L32_error;}
+          __Pyx_GOTREF(__pyx_t_1);
+          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+          __Pyx_INCREF(__pyx_v_fval);
+          PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_fval);
+          __Pyx_GIVEREF(__pyx_v_fval);
+          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __pyx_clineno = __LINE__; goto __pyx_L32_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_v_fvalisnan = __pyx_t_2;
+        __pyx_t_2 = 0;
+      }
+      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+      goto __pyx_L39_try_end;
+      __pyx_L32_error:;
+      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+      /* "netCDF4.pyx":3163
+ *             try:
+ *                 fvalisnan = numpy.isnan(fval)
+ *             except TypeError: # isnan fails on some dtypes (issue 202)             # <<<<<<<<<<<<<<
+ *                 fvalisnan = False
+ *             if fvalisnan:
+ */
+      __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
+      if (__pyx_t_13) {
+        __Pyx_AddTraceback("netCDF4.Variable._toma", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __pyx_clineno = __LINE__; goto __pyx_L34_except_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_GOTREF(__pyx_t_1);
+
+        /* "netCDF4.pyx":3164
+ *                 fvalisnan = numpy.isnan(fval)
+ *             except TypeError: # isnan fails on some dtypes (issue 202)
+ *                 fvalisnan = False             # <<<<<<<<<<<<<<
+ *             if fvalisnan:
+ *                 mask = numpy.isnan(data)
+ */
+        __Pyx_INCREF(Py_False);
+        __Pyx_XDECREF_SET(__pyx_v_fvalisnan, Py_False);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        goto __pyx_L33_exception_handled;
+      }
+      goto __pyx_L34_except_error;
+      __pyx_L34_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_12);
+      __Pyx_XGIVEREF(__pyx_t_11);
+      __Pyx_XGIVEREF(__pyx_t_10);
+      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
+      goto __pyx_L1_error;
+      __pyx_L33_exception_handled:;
+      __Pyx_XGIVEREF(__pyx_t_12);
+      __Pyx_XGIVEREF(__pyx_t_11);
+      __Pyx_XGIVEREF(__pyx_t_10);
+      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
+      __pyx_L39_try_end:;
+    }
+
+    /* "netCDF4.pyx":3165
+ *             except TypeError: # isnan fails on some dtypes (issue 202)
+ *                 fvalisnan = False
+ *             if fvalisnan:             # <<<<<<<<<<<<<<
+ *                 mask = numpy.isnan(data)
+ *             elif (data == fval).any():
+ */
+    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_fvalisnan); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_9) {
+
+      /* "netCDF4.pyx":3166
+ *                 fvalisnan = False
+ *             if fvalisnan:
+ *                 mask = numpy.isnan(data)             # <<<<<<<<<<<<<<
+ *             elif (data == fval).any():
+ *                 mask = data==fval
+ */
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isnan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+        if (likely(__pyx_t_4)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+          __Pyx_INCREF(__pyx_t_4);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_2, function);
+        }
+      }
+      if (!__pyx_t_4) {
+        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+      } else {
+        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+        __Pyx_INCREF(__pyx_v_data);
+        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data);
+        __Pyx_GIVEREF(__pyx_v_data);
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_XDECREF_SET(__pyx_v_mask, __pyx_t_1);
+      __pyx_t_1 = 0;
+      goto __pyx_L42;
+    }
+
+    /* "netCDF4.pyx":3167
+ *             if fvalisnan:
+ *                 mask = numpy.isnan(data)
+ *             elif (data == fval).any():             # <<<<<<<<<<<<<<
+ *                 mask = data==fval
+ *             else:
+ */
+    __pyx_t_2 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fval, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_any); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
+      if (likely(__pyx_t_2)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_2);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_5, function);
+      }
+    }
+    if (__pyx_t_2) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_9) {
+
+      /* "netCDF4.pyx":3168
+ *                 mask = numpy.isnan(data)
+ *             elif (data == fval).any():
+ *                 mask = data==fval             # <<<<<<<<<<<<<<
+ *             else:
+ *                 mask = None
+ */
+      __pyx_t_1 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fval, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_XDECREF_SET(__pyx_v_mask, __pyx_t_1);
+      __pyx_t_1 = 0;
+      goto __pyx_L42;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3170
+ *                 mask = data==fval
+ *             else:
+ *                 mask = None             # <<<<<<<<<<<<<<
+ *             if mask is not None:
+ *                 if fill_value is None:
+ */
+      __Pyx_INCREF(Py_None);
+      __Pyx_XDECREF_SET(__pyx_v_mask, Py_None);
+    }
+    __pyx_L42:;
+
+    /* "netCDF4.pyx":3171
+ *             else:
+ *                 mask = None
+ *             if mask is not None:             # <<<<<<<<<<<<<<
+ *                 if fill_value is None:
+ *                     fill_value = fval
+ */
+    __pyx_t_9 = (__pyx_v_mask != Py_None);
+    __pyx_t_8 = (__pyx_t_9 != 0);
+    if (__pyx_t_8) {
+
+      /* "netCDF4.pyx":3172
+ *                 mask = None
+ *             if mask is not None:
+ *                 if fill_value is None:             # <<<<<<<<<<<<<<
+ *                     fill_value = fval
+ *                 totalmask += mask
+ */
+      __pyx_t_8 = (__pyx_v_fill_value == Py_None);
+      __pyx_t_9 = (__pyx_t_8 != 0);
+      if (__pyx_t_9) {
+
+        /* "netCDF4.pyx":3173
+ *             if mask is not None:
+ *                 if fill_value is None:
+ *                     fill_value = fval             # <<<<<<<<<<<<<<
+ *                 totalmask += mask
+ *         # issue 209: don't return masked array if variable filling
+ */
+        __Pyx_INCREF(__pyx_v_fval);
+        __Pyx_DECREF_SET(__pyx_v_fill_value, __pyx_v_fval);
+        goto __pyx_L44;
+      }
+      __pyx_L44:;
+
+      /* "netCDF4.pyx":3174
+ *                 if fill_value is None:
+ *                     fill_value = fval
+ *                 totalmask += mask             # <<<<<<<<<<<<<<
+ *         # issue 209: don't return masked array if variable filling
+ * 	# is disabled.
+ */
+      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_1);
+      __pyx_t_1 = 0;
+      goto __pyx_L43;
+    }
+    __pyx_L43:;
+    goto __pyx_L26;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":3178
+ * 	# is disabled.
+ *         else:
+ *              ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)             # <<<<<<<<<<<<<<
+ *              if ierr != NC_NOERR:
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+    __pyx_v_ierr = nc_inq_var_fill(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_no_fill), NULL);
+
+    /* "netCDF4.pyx":3179
+ *         else:
+ *              ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
+ *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *              # if no_fill is not 1, and not a byte variable, then use default fill value.
+ */
+    __pyx_t_9 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_9) {
+
+      /* "netCDF4.pyx":3180
+ *              ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
+ *              if ierr != NC_NOERR:
+ *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *              # if no_fill is not 1, and not a byte variable, then use default fill value.
+ *              # from http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c/Fill-Values.html#Fill-Values
+ */
+      __pyx_t_15 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_15, 0, strlen(__pyx_t_15), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":3193
+ *              # small to assume one of the values should appear as a missing
+ *              # value unless a _FillValue attribute is set explicitly."
+ *              if no_fill != 1 and self.dtype.str[1:] not in ['u1','i1']:             # <<<<<<<<<<<<<<
+ *                  fillval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype)
+ *                  # byte swap the _FillValue if endian-ness of the variable
+ */
+    __pyx_t_8 = ((__pyx_v_no_fill != 1) != 0);
+    if (__pyx_t_8) {
+    } else {
+      __pyx_t_9 = __pyx_t_8;
+      goto __pyx_L47_bool_binop_done;
+    }
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__74, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_16 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_u1, Py_NE)); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_16) {
+    } else {
+      __pyx_t_8 = __pyx_t_16;
+      goto __pyx_L49_bool_binop_done;
+    }
+    __pyx_t_16 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_i1, Py_NE)); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = __pyx_t_16;
+    __pyx_L49_bool_binop_done:;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_16 = (__pyx_t_8 != 0);
+    __pyx_t_9 = __pyx_t_16;
+    __pyx_L47_bool_binop_done:;
+    if (__pyx_t_9) {
+
+      /* "netCDF4.pyx":3194
+ *              # value unless a _FillValue attribute is set explicitly."
+ *              if no_fill != 1 and self.dtype.str[1:] not in ['u1','i1']:
+ *                  fillval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype)             # <<<<<<<<<<<<<<
+ *                  # byte swap the _FillValue if endian-ness of the variable
+ *                  # is not native.
+ */
+      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__75, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = NULL;
+      __pyx_t_6 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+        if (likely(__pyx_t_3)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+          __Pyx_INCREF(__pyx_t_3);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_2, function);
+          __pyx_t_6 = 1;
+        }
+      }
+      __pyx_t_1 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      if (__pyx_t_3) {
+        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+      }
+      PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_t_4);
+      __Pyx_GIVEREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_v_self->dtype);
+      PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_v_self->dtype);
+      __Pyx_GIVEREF(__pyx_v_self->dtype);
+      __pyx_t_4 = 0;
+      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_v_fillval = __pyx_t_5;
+      __pyx_t_5 = 0;
+
+      /* "netCDF4.pyx":3197
+ *                  # byte swap the _FillValue if endian-ness of the variable
+ *                  # is not native.
+ *                  if (self.endian() == 'big' and is_native_little) or\             # <<<<<<<<<<<<<<
+ *                     (self.endian() == 'little' and is_native_big):
+ *                      fillval.byteswap(True)
+ */
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_1 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
+        if (likely(__pyx_t_1)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+          __Pyx_INCREF(__pyx_t_1);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_2, function);
+        }
+      }
+      if (__pyx_t_1) {
+        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      } else {
+        __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_16 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_big, Py_EQ)); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (!__pyx_t_16) {
+        goto __pyx_L53_next_or;
+      } else {
+      }
+      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (!__pyx_t_16) {
+      } else {
+        __pyx_t_9 = __pyx_t_16;
+        goto __pyx_L52_bool_binop_done;
+      }
+      __pyx_L53_next_or:;
+
+      /* "netCDF4.pyx":3198
+ *                  # is not native.
+ *                  if (self.endian() == 'big' and is_native_little) or\
+ *                     (self.endian() == 'little' and is_native_big):             # <<<<<<<<<<<<<<
+ *                      fillval.byteswap(True)
+ *                  has_fillval = data == fillval
+ */
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_1 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
+        if (likely(__pyx_t_1)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+          __Pyx_INCREF(__pyx_t_1);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_2, function);
+        }
+      }
+      if (__pyx_t_1) {
+        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      } else {
+        __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_16 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_little, Py_EQ)); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_16) {
+      } else {
+        __pyx_t_9 = __pyx_t_16;
+        goto __pyx_L52_bool_binop_done;
+      }
+      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_9 = __pyx_t_16;
+      __pyx_L52_bool_binop_done:;
+      if (__pyx_t_9) {
+
+        /* "netCDF4.pyx":3199
+ *                  if (self.endian() == 'big' and is_native_little) or\
+ *                     (self.endian() == 'little' and is_native_big):
+ *                      fillval.byteswap(True)             # <<<<<<<<<<<<<<
+ *                  has_fillval = data == fillval
+ *                  # if data is an array scalar, has_fillval will be a boolean.
+ */
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fillval, __pyx_n_s_byteswap); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        goto __pyx_L51;
+      }
+      __pyx_L51:;
+
+      /* "netCDF4.pyx":3200
+ *                     (self.endian() == 'little' and is_native_big):
+ *                      fillval.byteswap(True)
+ *                  has_fillval = data == fillval             # <<<<<<<<<<<<<<
+ *                  # if data is an array scalar, has_fillval will be a boolean.
+ *                  # in that case convert to an array.
+ */
+      __pyx_t_2 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fillval, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_has_fillval = __pyx_t_2;
+      __pyx_t_2 = 0;
+
+      /* "netCDF4.pyx":3203
+ *                  # if data is an array scalar, has_fillval will be a boolean.
+ *                  # in that case convert to an array.
+ *                  if type(has_fillval) == bool: has_fillval=numpy.asarray(has_fillval)             # <<<<<<<<<<<<<<
+ *                  if has_fillval.any():
+ *                      mask=data==fillval
+ */
+      __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_has_fillval)), ((PyObject*)&PyBool_Type), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      if (__pyx_t_9) {
+        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __pyx_t_5 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+          if (likely(__pyx_t_5)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+            __Pyx_INCREF(__pyx_t_5);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_1, function);
+          }
+        }
+        if (!__pyx_t_5) {
+          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_has_fillval); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+        } else {
+          __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+          __Pyx_INCREF(__pyx_v_has_fillval);
+          PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_has_fillval);
+          __Pyx_GIVEREF(__pyx_v_has_fillval);
+          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF_SET(__pyx_v_has_fillval, __pyx_t_2);
+        __pyx_t_2 = 0;
+        goto __pyx_L56;
+      }
+      __pyx_L56:;
+
+      /* "netCDF4.pyx":3204
+ *                  # in that case convert to an array.
+ *                  if type(has_fillval) == bool: has_fillval=numpy.asarray(has_fillval)
+ *                  if has_fillval.any():             # <<<<<<<<<<<<<<
+ *                      mask=data==fillval
+ *                      if fill_value is None:
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_has_fillval, __pyx_n_s_any); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_4 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+        if (likely(__pyx_t_4)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+          __Pyx_INCREF(__pyx_t_4);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_1, function);
+        }
+      }
+      if (__pyx_t_4) {
+        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      } else {
+        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      if (__pyx_t_9) {
+
+        /* "netCDF4.pyx":3205
+ *                  if type(has_fillval) == bool: has_fillval=numpy.asarray(has_fillval)
+ *                  if has_fillval.any():
+ *                      mask=data==fillval             # <<<<<<<<<<<<<<
+ *                      if fill_value is None:
+ *                          fill_value = fillval
+ */
+        __pyx_t_2 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fillval, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_XDECREF_SET(__pyx_v_mask, __pyx_t_2);
+        __pyx_t_2 = 0;
+
+        /* "netCDF4.pyx":3206
+ *                  if has_fillval.any():
+ *                      mask=data==fillval
+ *                      if fill_value is None:             # <<<<<<<<<<<<<<
+ *                          fill_value = fillval
+ *                      totalmask += mask
+ */
+        __pyx_t_9 = (__pyx_v_fill_value == Py_None);
+        __pyx_t_16 = (__pyx_t_9 != 0);
+        if (__pyx_t_16) {
+
+          /* "netCDF4.pyx":3207
+ *                      mask=data==fillval
+ *                      if fill_value is None:
+ *                          fill_value = fillval             # <<<<<<<<<<<<<<
+ *                      totalmask += mask
+ *         # all values where data == missing_value or _FillValue are
+ */
+          __Pyx_INCREF(__pyx_v_fillval);
+          __Pyx_DECREF_SET(__pyx_v_fill_value, __pyx_v_fillval);
+          goto __pyx_L58;
+        }
+        __pyx_L58:;
+
+        /* "netCDF4.pyx":3208
+ *                      if fill_value is None:
+ *                          fill_value = fillval
+ *                      totalmask += mask             # <<<<<<<<<<<<<<
+ *         # all values where data == missing_value or _FillValue are
+ *         # masked.  fill_value set to missing_value if it exists,
+ */
+        __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_2);
+        __pyx_t_2 = 0;
+        goto __pyx_L57;
+      }
+      __pyx_L57:;
+      goto __pyx_L46;
+    }
+    __pyx_L46:;
+  }
+  __pyx_L26:;
+
+  /* "netCDF4.pyx":3212
+ *         # masked.  fill_value set to missing_value if it exists,
+ *         # otherwise _FillValue.
+ *         if fill_value is not None:             # <<<<<<<<<<<<<<
+ *             data = ma.masked_array(data,mask=totalmask,fill_value=fill_value)
+ *         return data
+ */
+  __pyx_t_16 = (__pyx_v_fill_value != Py_None);
+  __pyx_t_9 = (__pyx_t_16 != 0);
+  if (__pyx_t_9) {
+
+    /* "netCDF4.pyx":3213
+ *         # otherwise _FillValue.
+ *         if fill_value is not None:
+ *             data = ma.masked_array(data,mask=totalmask,fill_value=fill_value)             # <<<<<<<<<<<<<<
+ *         return data
+ * 
+ */
+    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_masked_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_v_data);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data);
+    __Pyx_GIVEREF(__pyx_v_data);
+    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_mask, __pyx_v_totalmask) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_5);
+    __pyx_t_5 = 0;
+    goto __pyx_L59;
+  }
+  __pyx_L59:;
+
+  /* "netCDF4.pyx":3214
+ *         if fill_value is not None:
+ *             data = ma.masked_array(data,mask=totalmask,fill_value=fill_value)
+ *         return data             # <<<<<<<<<<<<<<
+ * 
+ *     def _assign_vlen(self, elem, data):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_data);
+  __pyx_r = __pyx_v_data;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":3121
+ *         return data
+ * 
+ *     def _toma(self,data):             # <<<<<<<<<<<<<<
+ *         cdef int ierr, no_fill
+ *         # private function for creating a masked array, masking missing_values
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_AddTraceback("netCDF4.Variable._toma", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_totalmask);
+  __Pyx_XDECREF(__pyx_v_fill_value);
+  __Pyx_XDECREF(__pyx_v_mval);
+  __Pyx_XDECREF(__pyx_v_hasmval);
+  __Pyx_XDECREF(__pyx_v_mvalisnan);
+  __Pyx_XDECREF(__pyx_v_m);
+  __Pyx_XDECREF(__pyx_v_mask);
+  __Pyx_XDECREF(__pyx_v_fval);
+  __Pyx_XDECREF(__pyx_v_fvalisnan);
+  __Pyx_XDECREF(__pyx_v_fillval);
+  __Pyx_XDECREF(__pyx_v_has_fillval);
+  __Pyx_XDECREF(__pyx_v_data);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3216
+ *         return data
+ * 
+ *     def _assign_vlen(self, elem, data):             # <<<<<<<<<<<<<<
+ *         """private method to assign data to a single item in a VLEN variable"""
+ *         cdef size_t startp[NC_MAX_DIMS]
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_47_assign_vlen(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_46_assign_vlen[] = "private method to assign data to a single item in a VLEN variable";
+static PyObject *__pyx_pw_7netCDF4_8Variable_47_assign_vlen(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_elem = 0;
+  PyObject *__pyx_v_data = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_assign_vlen (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elem,&__pyx_n_s_data,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elem)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("_assign_vlen", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3216; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_assign_vlen") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3216; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_elem = values[0];
+    __pyx_v_data = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("_assign_vlen", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3216; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.Variable._assign_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_46_assign_vlen(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), __pyx_v_elem, __pyx_v_data);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_46_assign_vlen(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_elem, PyObject *__pyx_v_data) {
+  size_t __pyx_v_startp[NC_MAX_DIMS];
+  size_t __pyx_v_countp[NC_MAX_DIMS];
+  int __pyx_v_ndims;
+  int __pyx_v_n;
+  nc_vlen_t *__pyx_v_vldata;
+  char **__pyx_v_strdata;
+  PyArrayObject *__pyx_v_data2 = 0;
+  PyObject *__pyx_v_msg = NULL;
+  PyObject *__pyx_v_elemnew = NULL;
+  PyObject *__pyx_v_e = NULL;
+  PyObject *__pyx_v_enew = NULL;
+  PyObject *__pyx_v_start = NULL;
+  PyObject *__pyx_v_count = NULL;
+  PyObject *__pyx_v_bytestr = NULL;
+  int __pyx_v_ierr;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  Py_ssize_t __pyx_t_6;
+  PyObject *(*__pyx_t_7)(PyObject *);
+  PyObject *__pyx_t_8 = NULL;
+  int __pyx_t_9;
+  size_t __pyx_t_10;
+  char *__pyx_t_11;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_assign_vlen", 0);
+  __Pyx_INCREF(__pyx_v_elem);
+
+  /* "netCDF4.pyx":3224
+ *         cdef char **strdata
+ *         cdef ndarray data2
+ *         if not self._isvlen:             # <<<<<<<<<<<<<<
+ *             raise TypeError('_assign_vlen method only for use with VLEN variables')
+ *         ndims = self.ndim
+ */
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = ((!__pyx_t_1) != 0);
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":3225
+ *         cdef ndarray data2
+ *         if not self._isvlen:
+ *             raise TypeError('_assign_vlen method only for use with VLEN variables')             # <<<<<<<<<<<<<<
+ *         ndims = self.ndim
+ *         msg="single element VLEN slices must be specified by integers only"
+ */
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":3226
+ *         if not self._isvlen:
+ *             raise TypeError('_assign_vlen method only for use with VLEN variables')
+ *         ndims = self.ndim             # <<<<<<<<<<<<<<
+ *         msg="single element VLEN slices must be specified by integers only"
+ *         # check to see that elem is a tuple of integers.
+ */
+  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_self->ndim); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_ndims = __pyx_t_4;
+
+  /* "netCDF4.pyx":3227
+ *             raise TypeError('_assign_vlen method only for use with VLEN variables')
+ *         ndims = self.ndim
+ *         msg="single element VLEN slices must be specified by integers only"             # <<<<<<<<<<<<<<
+ *         # check to see that elem is a tuple of integers.
+ *         # handle negative integers.
+ */
+  __Pyx_INCREF(__pyx_kp_s_single_element_VLEN_slices_must);
+  __pyx_v_msg = __pyx_kp_s_single_element_VLEN_slices_must;
+
+  /* "netCDF4.pyx":3230
+ *         # check to see that elem is a tuple of integers.
+ *         # handle negative integers.
+ *         if isinstance(elem, int):             # <<<<<<<<<<<<<<
+ *             if ndims > 1:
+ *                 raise IndexError(msg)
+ */
+  __pyx_t_2 = PyInt_Check(__pyx_v_elem); 
+  __pyx_t_1 = (__pyx_t_2 != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":3231
+ *         # handle negative integers.
+ *         if isinstance(elem, int):
+ *             if ndims > 1:             # <<<<<<<<<<<<<<
+ *                 raise IndexError(msg)
+ *             if elem < 0:
+ */
+    __pyx_t_1 = ((__pyx_v_ndims > 1) != 0);
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":3232
+ *         if isinstance(elem, int):
+ *             if ndims > 1:
+ *                 raise IndexError(msg)             # <<<<<<<<<<<<<<
+ *             if elem < 0:
+ *                 if self.shape[0]+elem >= 0:
+ */
+      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_v_msg);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_msg);
+      __Pyx_GIVEREF(__pyx_v_msg);
+      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":3233
+ *             if ndims > 1:
+ *                 raise IndexError(msg)
+ *             if elem < 0:             # <<<<<<<<<<<<<<
+ *                 if self.shape[0]+elem >= 0:
+ *                     elem = self.shape[0]+elem
+ */
+    __pyx_t_5 = PyObject_RichCompare(__pyx_v_elem, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":3234
+ *                 raise IndexError(msg)
+ *             if elem < 0:
+ *                 if self.shape[0]+elem >= 0:             # <<<<<<<<<<<<<<
+ *                     elem = self.shape[0]+elem
+ *                 else:
+ */
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3234; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_v_elem); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_1) {
+
+        /* "netCDF4.pyx":3235
+ *             if elem < 0:
+ *                 if self.shape[0]+elem >= 0:
+ *                     elem = self.shape[0]+elem             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     raise IndexError("Illegal index")
+ */
+        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_v_elem); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_DECREF_SET(__pyx_v_elem, __pyx_t_3);
+        __pyx_t_3 = 0;
+        goto __pyx_L7;
+      }
+      /*else*/ {
+
+        /* "netCDF4.pyx":3237
+ *                     elem = self.shape[0]+elem
+ *                 else:
+ *                     raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
+ *         elif isinstance(elem, tuple):
+ *             if len(elem) != ndims:
+ */
+        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __pyx_L7:;
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+    goto __pyx_L4;
+  }
+
+  /* "netCDF4.pyx":3238
+ *                 else:
+ *                     raise IndexError("Illegal index")
+ *         elif isinstance(elem, tuple):             # <<<<<<<<<<<<<<
+ *             if len(elem) != ndims:
+ *                 raise IndexError("Illegal index")
+ */
+  __pyx_t_1 = PyTuple_Check(__pyx_v_elem); 
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":3239
+ *                     raise IndexError("Illegal index")
+ *         elif isinstance(elem, tuple):
+ *             if len(elem) != ndims:             # <<<<<<<<<<<<<<
+ *                 raise IndexError("Illegal index")
+ *             elemnew = []
+ */
+    __pyx_t_6 = PyObject_Length(__pyx_v_elem); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = ((__pyx_t_6 != __pyx_v_ndims) != 0);
+    if (__pyx_t_2) {
+
+      /* "netCDF4.pyx":3240
+ *         elif isinstance(elem, tuple):
+ *             if len(elem) != ndims:
+ *                 raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
+ *             elemnew = []
+ *             for n,e in enumerate(elem):
+ */
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":3241
+ *             if len(elem) != ndims:
+ *                 raise IndexError("Illegal index")
+ *             elemnew = []             # <<<<<<<<<<<<<<
+ *             for n,e in enumerate(elem):
+ *                 if not isinstance(e, int):
+ */
+    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_v_elemnew = ((PyObject*)__pyx_t_3);
+    __pyx_t_3 = 0;
+
+    /* "netCDF4.pyx":3242
+ *                 raise IndexError("Illegal index")
+ *             elemnew = []
+ *             for n,e in enumerate(elem):             # <<<<<<<<<<<<<<
+ *                 if not isinstance(e, int):
+ *                     raise IndexError(msg)
+ */
+    __pyx_t_4 = 0;
+    if (likely(PyList_CheckExact(__pyx_v_elem)) || PyTuple_CheckExact(__pyx_v_elem)) {
+      __pyx_t_3 = __pyx_v_elem; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
+      __pyx_t_7 = NULL;
+    } else {
+      __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_elem); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    for (;;) {
+      if (likely(!__pyx_t_7)) {
+        if (likely(PyList_CheckExact(__pyx_t_3))) {
+          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        }
+      } else {
+        __pyx_t_5 = __pyx_t_7(__pyx_t_3);
+        if (unlikely(!__pyx_t_5)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_5);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_5);
+      __pyx_t_5 = 0;
+      __pyx_v_n = __pyx_t_4;
+      __pyx_t_4 = (__pyx_t_4 + 1);
+
+      /* "netCDF4.pyx":3243
+ *             elemnew = []
+ *             for n,e in enumerate(elem):
+ *                 if not isinstance(e, int):             # <<<<<<<<<<<<<<
+ *                     raise IndexError(msg)
+ *                 elif e < 0:
+ */
+      __pyx_t_2 = PyInt_Check(__pyx_v_e); 
+      __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
+      if (__pyx_t_1) {
+
+        /* "netCDF4.pyx":3244
+ *             for n,e in enumerate(elem):
+ *                 if not isinstance(e, int):
+ *                     raise IndexError(msg)             # <<<<<<<<<<<<<<
+ *                 elif e < 0:
+ *                     enew = self.shape[n]+e
+ */
+        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_INCREF(__pyx_v_msg);
+        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_msg);
+        __Pyx_GIVEREF(__pyx_v_msg);
+        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":3245
+ *                 if not isinstance(e, int):
+ *                     raise IndexError(msg)
+ *                 elif e < 0:             # <<<<<<<<<<<<<<
+ *                     enew = self.shape[n]+e
+ *                     if enew < 0:
+ */
+      __pyx_t_8 = PyObject_RichCompare(__pyx_v_e, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      if (__pyx_t_1) {
+
+        /* "netCDF4.pyx":3246
+ *                     raise IndexError(msg)
+ *                 elif e < 0:
+ *                     enew = self.shape[n]+e             # <<<<<<<<<<<<<<
+ *                     if enew < 0:
+ *                         raise IndexError("Illegal index")
+ */
+        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_8, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __pyx_t_8 = PyNumber_Add(__pyx_t_5, __pyx_v_e); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_enew, __pyx_t_8);
+        __pyx_t_8 = 0;
+
+        /* "netCDF4.pyx":3247
+ *                 elif e < 0:
+ *                     enew = self.shape[n]+e
+ *                     if enew < 0:             # <<<<<<<<<<<<<<
+ *                         raise IndexError("Illegal index")
+ *                     else:
+ */
+        __pyx_t_8 = PyObject_RichCompare(__pyx_v_enew, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        if (__pyx_t_1) {
+
+          /* "netCDF4.pyx":3248
+ *                     enew = self.shape[n]+e
+ *                     if enew < 0:
+ *                         raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         elemnew.append(self.shape[n]+e)
+ */
+          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        /*else*/ {
+
+          /* "netCDF4.pyx":3250
+ *                         raise IndexError("Illegal index")
+ *                     else:
+ *                         elemnew.append(self.shape[n]+e)             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     elemnew.append(e)
+ */
+          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_8, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+          __Pyx_GOTREF(__pyx_t_5);
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          __pyx_t_8 = PyNumber_Add(__pyx_t_5, __pyx_v_e); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+          __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_elemnew, __pyx_t_8); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        }
+        goto __pyx_L11;
+      }
+      /*else*/ {
+
+        /* "netCDF4.pyx":3252
+ *                         elemnew.append(self.shape[n]+e)
+ *                 else:
+ *                     elemnew.append(e)             # <<<<<<<<<<<<<<
+ *             elem = tuple(elemnew)
+ *         else:
+ */
+        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_elemnew, __pyx_v_e); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __pyx_L11:;
+
+      /* "netCDF4.pyx":3242
+ *                 raise IndexError("Illegal index")
+ *             elemnew = []
+ *             for n,e in enumerate(elem):             # <<<<<<<<<<<<<<
+ *                 if not isinstance(e, int):
+ *                     raise IndexError(msg)
+ */
+    }
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+    /* "netCDF4.pyx":3253
+ *                 else:
+ *                     elemnew.append(e)
+ *             elem = tuple(elemnew)             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise IndexError(msg)
+ */
+    __pyx_t_3 = PyList_AsTuple(__pyx_v_elemnew); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF_SET(__pyx_v_elem, __pyx_t_3);
+    __pyx_t_3 = 0;
+    goto __pyx_L4;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":3255
+ *             elem = tuple(elemnew)
+ *         else:
+ *             raise IndexError(msg)             # <<<<<<<<<<<<<<
+ *         # set start, count
+ *         if isinstance(elem, tuple):
+ */
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_INCREF(__pyx_v_msg);
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_msg);
+    __Pyx_GIVEREF(__pyx_v_msg);
+    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_L4:;
+
+  /* "netCDF4.pyx":3257
+ *             raise IndexError(msg)
+ *         # set start, count
+ *         if isinstance(elem, tuple):             # <<<<<<<<<<<<<<
+ *             start = list(elem)
+ *         else:
+ */
+  __pyx_t_1 = PyTuple_Check(__pyx_v_elem); 
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":3258
+ *         # set start, count
+ *         if isinstance(elem, tuple):
+ *             start = list(elem)             # <<<<<<<<<<<<<<
+ *         else:
+ *             start = [elem]
+ */
+    __pyx_t_8 = PySequence_List(__pyx_v_elem); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __pyx_v_start = ((PyObject*)__pyx_t_8);
+    __pyx_t_8 = 0;
+    goto __pyx_L13;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":3260
+ *             start = list(elem)
+ *         else:
+ *             start = [elem]             # <<<<<<<<<<<<<<
+ *         count = [1]*ndims
+ *         for n from 0 <= n < ndims:
+ */
+    __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __Pyx_INCREF(__pyx_v_elem);
+    PyList_SET_ITEM(__pyx_t_8, 0, __pyx_v_elem);
+    __Pyx_GIVEREF(__pyx_v_elem);
+    __pyx_v_start = ((PyObject*)__pyx_t_8);
+    __pyx_t_8 = 0;
+  }
+  __pyx_L13:;
+
+  /* "netCDF4.pyx":3261
+ *         else:
+ *             start = [elem]
+ *         count = [1]*ndims             # <<<<<<<<<<<<<<
+ *         for n from 0 <= n < ndims:
+ *             startp[n] = start[n]
+ */
+  __pyx_t_8 = PyList_New(1 * ((__pyx_v_ndims<0) ? 0:__pyx_v_ndims)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  { Py_ssize_t __pyx_temp;
+    for (__pyx_temp=0; __pyx_temp < __pyx_v_ndims; __pyx_temp++) {
+      __Pyx_INCREF(__pyx_int_1);
+      PyList_SET_ITEM(__pyx_t_8, __pyx_temp, __pyx_int_1);
+      __Pyx_GIVEREF(__pyx_int_1);
+    }
+  }
+  __pyx_v_count = ((PyObject*)__pyx_t_8);
+  __pyx_t_8 = 0;
+
+  /* "netCDF4.pyx":3262
+ *             start = [elem]
+ *         count = [1]*ndims
+ *         for n from 0 <= n < ndims:             # <<<<<<<<<<<<<<
+ *             startp[n] = start[n]
+ *             countp[n] = count[n]
+ */
+  __pyx_t_4 = __pyx_v_ndims;
+  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {
+
+    /* "netCDF4.pyx":3263
+ *         count = [1]*ndims
+ *         for n from 0 <= n < ndims:
+ *             startp[n] = start[n]             # <<<<<<<<<<<<<<
+ *             countp[n] = count[n]
+ *         if self.dtype == str: # VLEN string
+ */
+    __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_start, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3263; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_8);
+    __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    (__pyx_v_startp[__pyx_v_n]) = __pyx_t_10;
+
+    /* "netCDF4.pyx":3264
+ *         for n from 0 <= n < ndims:
+ *             startp[n] = start[n]
+ *             countp[n] = count[n]             # <<<<<<<<<<<<<<
+ *         if self.dtype == str: # VLEN string
+ *             strdata = <char **>malloc(sizeof(char *))
+ */
+    __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_count, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3264; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_8);
+    __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    (__pyx_v_countp[__pyx_v_n]) = __pyx_t_10;
+  }
+
+  /* "netCDF4.pyx":3265
+ *             startp[n] = start[n]
+ *             countp[n] = count[n]
+ *         if self.dtype == str: # VLEN string             # <<<<<<<<<<<<<<
+ *             strdata = <char **>malloc(sizeof(char *))
+ *             bytestr = _strencode(data)
+ */
+  __pyx_t_8 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":3266
+ *             countp[n] = count[n]
+ *         if self.dtype == str: # VLEN string
+ *             strdata = <char **>malloc(sizeof(char *))             # <<<<<<<<<<<<<<
+ *             bytestr = _strencode(data)
+ *             strdata[0] = bytestr
+ */
+    __pyx_v_strdata = ((char **)malloc((sizeof(char *))));
+
+    /* "netCDF4.pyx":3267
+ *         if self.dtype == str: # VLEN string
+ *             strdata = <char **>malloc(sizeof(char *))
+ *             bytestr = _strencode(data)             # <<<<<<<<<<<<<<
+ *             strdata[0] = bytestr
+ *             ierr = nc_put_vara(self._grpid, self._varid,
+ */
+    __pyx_t_8 = __pyx_f_7netCDF4__strencode(__pyx_v_data, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __pyx_v_bytestr = __pyx_t_8;
+    __pyx_t_8 = 0;
+
+    /* "netCDF4.pyx":3268
+ *             strdata = <char **>malloc(sizeof(char *))
+ *             bytestr = _strencode(data)
+ *             strdata[0] = bytestr             # <<<<<<<<<<<<<<
+ *             ierr = nc_put_vara(self._grpid, self._varid,
+ *                                startp, countp, strdata)
+ */
+    __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    (__pyx_v_strdata[0]) = __pyx_t_11;
+
+    /* "netCDF4.pyx":3269
+ *             bytestr = _strencode(data)
+ *             strdata[0] = bytestr
+ *             ierr = nc_put_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
+ *                                startp, countp, strdata)
+ *             if ierr != NC_NOERR:
+ */
+    __pyx_v_ierr = nc_put_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_strdata);
+
+    /* "netCDF4.pyx":3271
+ *             ierr = nc_put_vara(self._grpid, self._varid,
+ *                                startp, countp, strdata)
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             free(strdata)
+ */
+    __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_2) {
+
+      /* "netCDF4.pyx":3272
+ *                                startp, countp, strdata)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             free(strdata)
+ *         else: # regular VLEN
+ */
+      __pyx_t_11 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_8 = __Pyx_decode_c_string(__pyx_t_11, 0, strlen(__pyx_t_11), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_8);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
+      __Pyx_GIVEREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":3273
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             free(strdata)             # <<<<<<<<<<<<<<
+ *         else: # regular VLEN
+ *             if data.dtype != self.dtype:
+ */
+    free(__pyx_v_strdata);
+    goto __pyx_L16;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":3275
+ *             free(strdata)
+ *         else: # regular VLEN
+ *             if data.dtype != self.dtype:             # <<<<<<<<<<<<<<
+ *                 raise TypeError("wrong data type: should be %s, got %s" % (self.dtype,data.dtype))
+ *             data2 = data
+ */
+    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_v_self->dtype, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (__pyx_t_2) {
+
+      /* "netCDF4.pyx":3276
+ *         else: # regular VLEN
+ *             if data.dtype != self.dtype:
+ *                 raise TypeError("wrong data type: should be %s, got %s" % (self.dtype,data.dtype))             # <<<<<<<<<<<<<<
+ *             data2 = data
+ *             vldata = <nc_vlen_t *>malloc(sizeof(nc_vlen_t))
+ */
+      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_INCREF(__pyx_v_self->dtype);
+      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_self->dtype);
+      __Pyx_GIVEREF(__pyx_v_self->dtype);
+      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
+      __Pyx_GIVEREF(__pyx_t_3);
+      __pyx_t_3 = 0;
+      __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_wrong_data_type_should_be_s_got, __pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
+      __Pyx_GIVEREF(__pyx_t_3);
+      __pyx_t_3 = 0;
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":3277
+ *             if data.dtype != self.dtype:
+ *                 raise TypeError("wrong data type: should be %s, got %s" % (self.dtype,data.dtype))
+ *             data2 = data             # <<<<<<<<<<<<<<
+ *             vldata = <nc_vlen_t *>malloc(sizeof(nc_vlen_t))
+ *             vldata[0].len = PyArray_SIZE(data2)
+ */
+    if (!(likely(((__pyx_v_data) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_data, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __pyx_v_data;
+    __Pyx_INCREF(__pyx_t_3);
+    __pyx_v_data2 = ((PyArrayObject *)__pyx_t_3);
+    __pyx_t_3 = 0;
+
+    /* "netCDF4.pyx":3278
+ *                 raise TypeError("wrong data type: should be %s, got %s" % (self.dtype,data.dtype))
+ *             data2 = data
+ *             vldata = <nc_vlen_t *>malloc(sizeof(nc_vlen_t))             # <<<<<<<<<<<<<<
+ *             vldata[0].len = PyArray_SIZE(data2)
+ *             vldata[0].p = data2.data
+ */
+    __pyx_v_vldata = ((nc_vlen_t *)malloc((sizeof(nc_vlen_t))));
+
+    /* "netCDF4.pyx":3279
+ *             data2 = data
+ *             vldata = <nc_vlen_t *>malloc(sizeof(nc_vlen_t))
+ *             vldata[0].len = PyArray_SIZE(data2)             # <<<<<<<<<<<<<<
+ *             vldata[0].p = data2.data
+ *             ierr = nc_put_vara(self._grpid, self._varid,
+ */
+    (__pyx_v_vldata[0]).len = PyArray_SIZE(__pyx_v_data2);
+
+    /* "netCDF4.pyx":3280
+ *             vldata = <nc_vlen_t *>malloc(sizeof(nc_vlen_t))
+ *             vldata[0].len = PyArray_SIZE(data2)
+ *             vldata[0].p = data2.data             # <<<<<<<<<<<<<<
+ *             ierr = nc_put_vara(self._grpid, self._varid,
+ *                                startp, countp, vldata)
+ */
+    __pyx_t_11 = __pyx_v_data2->data;
+    (__pyx_v_vldata[0]).p = __pyx_t_11;
+
+    /* "netCDF4.pyx":3281
+ *             vldata[0].len = PyArray_SIZE(data2)
+ *             vldata[0].p = data2.data
+ *             ierr = nc_put_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
+ *                                startp, countp, vldata)
+ *             if ierr != NC_NOERR:
+ */
+    __pyx_v_ierr = nc_put_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_vldata);
+
+    /* "netCDF4.pyx":3283
+ *             ierr = nc_put_vara(self._grpid, self._varid,
+ *                                startp, countp, vldata)
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             free(vldata)
+ */
+    __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_2) {
+
+      /* "netCDF4.pyx":3284
+ *                                startp, countp, vldata)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             free(vldata)
+ * 
+ */
+      __pyx_t_11 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_11, 0, strlen(__pyx_t_11), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_INCREF(__pyx_t_3);
+      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
+      __Pyx_GIVEREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":3285
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             free(vldata)             # <<<<<<<<<<<<<<
+ * 
+ *     def __setitem__(self, elem, data):
+ */
+    free(__pyx_v_vldata);
+  }
+  __pyx_L16:;
+
+  /* "netCDF4.pyx":3216
+ *         return data
+ * 
+ *     def _assign_vlen(self, elem, data):             # <<<<<<<<<<<<<<
+ *         """private method to assign data to a single item in a VLEN variable"""
+ *         cdef size_t startp[NC_MAX_DIMS]
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_AddTraceback("netCDF4.Variable._assign_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF((PyObject *)__pyx_v_data2);
+  __Pyx_XDECREF(__pyx_v_msg);
+  __Pyx_XDECREF(__pyx_v_elemnew);
+  __Pyx_XDECREF(__pyx_v_e);
+  __Pyx_XDECREF(__pyx_v_enew);
+  __Pyx_XDECREF(__pyx_v_start);
+  __Pyx_XDECREF(__pyx_v_count);
+  __Pyx_XDECREF(__pyx_v_bytestr);
+  __Pyx_XDECREF(__pyx_v_elem);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3287
+ *             free(vldata)
+ * 
+ *     def __setitem__(self, elem, data):             # <<<<<<<<<<<<<<
+ *         # This special method is used to assign to the netCDF variable
+ *         # using "extended slice syntax". The extended slice syntax
+ */
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_49__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_elem, PyObject *__pyx_v_data); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_49__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_elem, PyObject *__pyx_v_data) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_48__setitem__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_elem), ((PyObject *)__pyx_v_data));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_48__setitem__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_elem, PyObject *__pyx_v_data) {
+  PyObject *__pyx_v_msg = NULL;
+  PyObject *__pyx_v_start = NULL;
+  PyObject *__pyx_v_count = NULL;
+  PyObject *__pyx_v_stride = NULL;
+  PyObject *__pyx_v_put_ind = NULL;
+  PyObject *__pyx_v_datashape = NULL;
+  PyObject *__pyx_v_fillval = NULL;
+  PyObject *__pyx_v_a = NULL;
+  PyObject *__pyx_v_b = NULL;
+  PyObject *__pyx_v_c = NULL;
+  PyObject *__pyx_v_i = NULL;
+  PyObject *__pyx_v_dataput = NULL;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  Py_ssize_t __pyx_t_6;
+  PyObject *__pyx_t_7 = NULL;
+  int __pyx_t_8;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *(*__pyx_t_11)(PyObject *);
+  Py_ssize_t __pyx_t_12;
+  PyObject *__pyx_t_13 = NULL;
+  PyObject *__pyx_t_14 = NULL;
+  PyObject *(*__pyx_t_15)(PyObject *);
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__setitem__", 0);
+  __Pyx_INCREF(__pyx_v_data);
+
+  /* "netCDF4.pyx":3294
+ *         # to use.
+ * 
+ *         if self._isvlen: # if vlen, should be object array (don't try casting)             # <<<<<<<<<<<<<<
+ *             if self.dtype == str:
+ *                 # for string vars, if data is not an array
+ */
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":3295
+ * 
+ *         if self._isvlen: # if vlen, should be object array (don't try casting)
+ *             if self.dtype == str:             # <<<<<<<<<<<<<<
+ *                 # for string vars, if data is not an array
+ *                 # assume it is a python string and raise an error
+ */
+    __pyx_t_2 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":3299
+ *                 # assume it is a python string and raise an error
+ *                 # if it is an array, but not an object array.
+ *                 if not hasattr(data,'ndim'):             # <<<<<<<<<<<<<<
+ *                     self._assign_vlen(elem, data)
+ *                     return
+ */
+      __pyx_t_1 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0);
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":3300
+ *                 # if it is an array, but not an object array.
+ *                 if not hasattr(data,'ndim'):
+ *                     self._assign_vlen(elem, data)             # <<<<<<<<<<<<<<
+ *                     return
+ *                 elif data.dtype.kind in ['S', 'U']:
+ */
+        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_assign_vlen); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_5 = NULL;
+        __pyx_t_6 = 0;
+        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+          if (likely(__pyx_t_5)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+            __Pyx_INCREF(__pyx_t_5);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_4, function);
+            __pyx_t_6 = 1;
+          }
+        }
+        __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        if (__pyx_t_5) {
+          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+        }
+        __Pyx_INCREF(__pyx_v_elem);
+        PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_elem);
+        __Pyx_GIVEREF(__pyx_v_elem);
+        __Pyx_INCREF(__pyx_v_data);
+        PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_data);
+        __Pyx_GIVEREF(__pyx_v_data);
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+        /* "netCDF4.pyx":3301
+ *                 if not hasattr(data,'ndim'):
+ *                     self._assign_vlen(elem, data)
+ *                     return             # <<<<<<<<<<<<<<
+ *                 elif data.dtype.kind in ['S', 'U']:
+ *                     data = data.astype(object)
+ */
+        __pyx_r = 0;
+        goto __pyx_L0;
+      }
+
+      /* "netCDF4.pyx":3302
+ *                     self._assign_vlen(elem, data)
+ *                     return
+ *                 elif data.dtype.kind in ['S', 'U']:             # <<<<<<<<<<<<<<
+ *                     data = data.astype(object)
+ *                 elif data.dtype.kind != 'O':
+ */
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_kind); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (!__pyx_t_1) {
+      } else {
+        __pyx_t_3 = __pyx_t_1;
+        goto __pyx_L6_bool_binop_done;
+      }
+      __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __pyx_t_1;
+      __pyx_L6_bool_binop_done:;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_1 = (__pyx_t_3 != 0);
+      if (__pyx_t_1) {
+
+        /* "netCDF4.pyx":3303
+ *                     return
+ *                 elif data.dtype.kind in ['S', 'U']:
+ *                     data = data.astype(object)             # <<<<<<<<<<<<<<
+ *                 elif data.dtype.kind != 'O':
+ *                     msg = ('only numpy string, unicode or object arrays can '
+ */
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_7 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+          if (likely(__pyx_t_7)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+            __Pyx_INCREF(__pyx_t_7);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_2, function);
+          }
+        }
+        if (!__pyx_t_7) {
+          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_builtin_object); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+        } else {
+          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_5);
+          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+          __Pyx_INCREF(__pyx_builtin_object);
+          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_builtin_object);
+          __Pyx_GIVEREF(__pyx_builtin_object);
+          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4);
+        __pyx_t_4 = 0;
+        goto __pyx_L5;
+      }
+
+      /* "netCDF4.pyx":3304
+ *                 elif data.dtype.kind in ['S', 'U']:
+ *                     data = data.astype(object)
+ *                 elif data.dtype.kind != 'O':             # <<<<<<<<<<<<<<
+ *                     msg = ('only numpy string, unicode or object arrays can '
+ *                            'be assigned to VLEN str var slices')
+ */
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      if (__pyx_t_1) {
+
+        /* "netCDF4.pyx":3305
+ *                     data = data.astype(object)
+ *                 elif data.dtype.kind != 'O':
+ *                     msg = ('only numpy string, unicode or object arrays can '             # <<<<<<<<<<<<<<
+ *                            'be assigned to VLEN str var slices')
+ *                     raise TypeError(msg)
+ */
+        __Pyx_INCREF(__pyx_kp_s_only_numpy_string_unicode_or_obj);
+        __pyx_v_msg = __pyx_kp_s_only_numpy_string_unicode_or_obj;
+
+        /* "netCDF4.pyx":3307
+ *                     msg = ('only numpy string, unicode or object arrays can '
+ *                            'be assigned to VLEN str var slices')
+ *                     raise TypeError(msg)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 # for non-string vlen arrays, if data is not multi-dim, or
+ */
+        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_INCREF(__pyx_v_msg);
+        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg);
+        __Pyx_GIVEREF(__pyx_v_msg);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __pyx_L5:;
+      goto __pyx_L4;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3312
+ *                 # not an object array, assume it represents a single element
+ *                 # of the vlen var.
+ *                 if not hasattr(data,'ndim') or data.dtype.kind != 'O':             # <<<<<<<<<<<<<<
+ *                     self._assign_vlen(elem, data)
+ *                     return
+ */
+      __pyx_t_3 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = ((!(__pyx_t_3 != 0)) != 0);
+      if (!__pyx_t_8) {
+      } else {
+        __pyx_t_1 = __pyx_t_8;
+        goto __pyx_L9_bool_binop_done;
+      }
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_1 = __pyx_t_8;
+      __pyx_L9_bool_binop_done:;
+      if (__pyx_t_1) {
+
+        /* "netCDF4.pyx":3313
+ *                 # of the vlen var.
+ *                 if not hasattr(data,'ndim') or data.dtype.kind != 'O':
+ *                     self._assign_vlen(elem, data)             # <<<<<<<<<<<<<<
+ *                     return
+ * 
+ */
+        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_assign_vlen); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_5 = NULL;
+        __pyx_t_6 = 0;
+        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+          if (likely(__pyx_t_5)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+            __Pyx_INCREF(__pyx_t_5);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_4, function);
+            __pyx_t_6 = 1;
+          }
+        }
+        __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        if (__pyx_t_5) {
+          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+        }
+        __Pyx_INCREF(__pyx_v_elem);
+        PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_elem);
+        __Pyx_GIVEREF(__pyx_v_elem);
+        __Pyx_INCREF(__pyx_v_data);
+        PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_data);
+        __Pyx_GIVEREF(__pyx_v_data);
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+        /* "netCDF4.pyx":3314
+ *                 if not hasattr(data,'ndim') or data.dtype.kind != 'O':
+ *                     self._assign_vlen(elem, data)
+ *                     return             # <<<<<<<<<<<<<<
+ * 
+ *         # A numpy array is needed. Convert if necessary.
+ */
+        __pyx_r = 0;
+        goto __pyx_L0;
+      }
+    }
+    __pyx_L4:;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":3318
+ *         # A numpy array is needed. Convert if necessary.
+ *         # assume it's a numpy or masked array if it has an 'ndim' attribute.
+ *         if not hasattr(data,'ndim'):             # <<<<<<<<<<<<<<
+ *             # if auto scaling is to be done, don't cast to an integer yet.
+ *             if self.scale and self.dtype.kind == 'i' and \
+ */
+  __pyx_t_1 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = ((!(__pyx_t_1 != 0)) != 0);
+  if (__pyx_t_8) {
+
+    /* "netCDF4.pyx":3320
+ *         if not hasattr(data,'ndim'):
+ *             # if auto scaling is to be done, don't cast to an integer yet.
+ *             if self.scale and self.dtype.kind == 'i' and \             # <<<<<<<<<<<<<<
+ *                hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'):
+ *                 data = numpy.array(data,numpy.float)
+ */
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!__pyx_t_1) {
+      goto __pyx_L14_next_or;
+    } else {
+    }
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_i, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (!__pyx_t_1) {
+      goto __pyx_L14_next_or;
+    } else {
+    }
+
+    /* "netCDF4.pyx":3321
+ *             # if auto scaling is to be done, don't cast to an integer yet.
+ *             if self.scale and self.dtype.kind == 'i' and \
+ *                hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'):             # <<<<<<<<<<<<<<
+ *                 data = numpy.array(data,numpy.float)
+ *             else:
+ */
+    __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = (__pyx_t_1 != 0);
+    if (!__pyx_t_3) {
+    } else {
+      __pyx_t_8 = __pyx_t_3;
+      goto __pyx_L13_bool_binop_done;
+    }
+    __pyx_L14_next_or:;
+    __pyx_t_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = (__pyx_t_3 != 0);
+    __pyx_t_8 = __pyx_t_1;
+    __pyx_L13_bool_binop_done:;
+    if (__pyx_t_8) {
+
+      /* "netCDF4.pyx":3322
+ *             if self.scale and self.dtype.kind == 'i' and \
+ *                hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'):
+ *                 data = numpy.array(data,numpy.float)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 data = numpy.array(data,self.dtype)
+ */
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = NULL;
+      __pyx_t_6 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
+        if (likely(__pyx_t_4)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+          __Pyx_INCREF(__pyx_t_4);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_7, function);
+          __pyx_t_6 = 1;
+        }
+      }
+      __pyx_t_9 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      if (__pyx_t_4) {
+        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+      }
+      __Pyx_INCREF(__pyx_v_data);
+      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_v_data);
+      __Pyx_GIVEREF(__pyx_v_data);
+      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_t_5);
+      __Pyx_GIVEREF(__pyx_t_5);
+      __pyx_t_5 = 0;
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
+      __pyx_t_2 = 0;
+      goto __pyx_L12;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3324
+ *                 data = numpy.array(data,numpy.float)
+ *             else:
+ *                 data = numpy.array(data,self.dtype)             # <<<<<<<<<<<<<<
+ * 
+ *         start, count, stride, put_ind =\
+ */
+      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_7 = NULL;
+      __pyx_t_6 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
+        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
+        if (likely(__pyx_t_7)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+          __Pyx_INCREF(__pyx_t_7);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_9, function);
+          __pyx_t_6 = 1;
+        }
+      }
+      __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      if (__pyx_t_7) {
+        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+      }
+      __Pyx_INCREF(__pyx_v_data);
+      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_data);
+      __Pyx_GIVEREF(__pyx_v_data);
+      __Pyx_INCREF(__pyx_v_self->dtype);
+      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v_self->dtype);
+      __Pyx_GIVEREF(__pyx_v_self->dtype);
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
+      __pyx_t_2 = 0;
+    }
+    __pyx_L12:;
+    goto __pyx_L11;
+  }
+  __pyx_L11:;
+
+  /* "netCDF4.pyx":3327
+ * 
+ *         start, count, stride, put_ind =\
+ *         _StartCountStride(elem,self.shape,self.dimensions,self._grp,datashape=data.shape,put=True)             # <<<<<<<<<<<<<<
+ *         datashape = _out_array_shape(count)
+ * 
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_INCREF(__pyx_v_elem);
+  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_elem);
+  __Pyx_GIVEREF(__pyx_v_elem);
+  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9);
+  __Pyx_GIVEREF(__pyx_t_9);
+  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
+  __Pyx_INCREF(__pyx_v_self->_grp);
+  PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_self->_grp);
+  __Pyx_GIVEREF(__pyx_v_self->_grp);
+  __pyx_t_9 = 0;
+  __pyx_t_5 = 0;
+  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_datashape, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_put, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
+    PyObject* sequence = __pyx_t_9;
+    #if CYTHON_COMPILING_IN_CPYTHON
+    Py_ssize_t size = Py_SIZE(sequence);
+    #else
+    Py_ssize_t size = PySequence_Size(sequence);
+    #endif
+    if (unlikely(size != 4)) {
+      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
+      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    #if CYTHON_COMPILING_IN_CPYTHON
+    if (likely(PyTuple_CheckExact(sequence))) {
+      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
+      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
+      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); 
+      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 3); 
+    } else {
+      __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
+      __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
+      __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
+      __pyx_t_4 = PyList_GET_ITEM(sequence, 3); 
+    }
+    __Pyx_INCREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_t_7);
+    __Pyx_INCREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_t_4);
+    #else
+    {
+      Py_ssize_t i;
+      PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_7,&__pyx_t_2,&__pyx_t_4};
+      for (i=0; i < 4; i++) {
+        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(item);
+        *(temps[i]) = item;
+      }
+    }
+    #endif
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  } else {
+    Py_ssize_t index = -1;
+    PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_7,&__pyx_t_2,&__pyx_t_4};
+    __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
+    for (index=0; index < 4; index++) {
+      PyObject* item = __pyx_t_11(__pyx_t_10); if (unlikely(!item)) goto __pyx_L17_unpacking_failed;
+      __Pyx_GOTREF(item);
+      *(temps[index]) = item;
+    }
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = NULL;
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    goto __pyx_L18_unpacking_done;
+    __pyx_L17_unpacking_failed:;
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_11 = NULL;
+    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_L18_unpacking_done:;
+  }
+
+  /* "netCDF4.pyx":3326
+ *                 data = numpy.array(data,self.dtype)
+ * 
+ *         start, count, stride, put_ind =\             # <<<<<<<<<<<<<<
+ *         _StartCountStride(elem,self.shape,self.dimensions,self._grp,datashape=data.shape,put=True)
+ *         datashape = _out_array_shape(count)
+ */
+  __pyx_v_start = __pyx_t_5;
+  __pyx_t_5 = 0;
+  __pyx_v_count = __pyx_t_7;
+  __pyx_t_7 = 0;
+  __pyx_v_stride = __pyx_t_2;
+  __pyx_t_2 = 0;
+  __pyx_v_put_ind = __pyx_t_4;
+  __pyx_t_4 = 0;
+
+  /* "netCDF4.pyx":3328
+ *         start, count, stride, put_ind =\
+ *         _StartCountStride(elem,self.shape,self.dimensions,self._grp,datashape=data.shape,put=True)
+ *         datashape = _out_array_shape(count)             # <<<<<<<<<<<<<<
+ * 
+ *         # if a numpy scalar, create an array of the right size
+ */
+  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_2 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
+    if (likely(__pyx_t_2)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_4, function);
+    }
+  }
+  if (!__pyx_t_2) {
+    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+  } else {
+    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+    __Pyx_INCREF(__pyx_v_count);
+    PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_count);
+    __Pyx_GIVEREF(__pyx_v_count);
+    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_v_datashape = __pyx_t_9;
+  __pyx_t_9 = 0;
+
+  /* "netCDF4.pyx":3332
+ *         # if a numpy scalar, create an array of the right size
+ *         # and fill with scalar values.
+ *         if data.shape == ():             # <<<<<<<<<<<<<<
+ *             data = numpy.tile(data,datashape)
+ *         # reshape data array by adding extra singleton dimensions
+ */
+  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_4 = PyObject_RichCompare(__pyx_t_9, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (__pyx_t_8) {
+
+    /* "netCDF4.pyx":3333
+ *         # and fill with scalar values.
+ *         if data.shape == ():
+ *             data = numpy.tile(data,datashape)             # <<<<<<<<<<<<<<
+ *         # reshape data array by adding extra singleton dimensions
+ *         # if needed to conform with start,count,stride.
+ */
+    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_tile); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_t_9 = NULL;
+    __pyx_t_6 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
+      if (likely(__pyx_t_9)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+        __Pyx_INCREF(__pyx_t_9);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_7, function);
+        __pyx_t_6 = 1;
+      }
+    }
+    __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    if (__pyx_t_9) {
+      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_data);
+    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_v_data);
+    __Pyx_GIVEREF(__pyx_v_data);
+    __Pyx_INCREF(__pyx_v_datashape);
+    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_v_datashape);
+    __Pyx_GIVEREF(__pyx_v_datashape);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4);
+    __pyx_t_4 = 0;
+    goto __pyx_L19;
+  }
+  __pyx_L19:;
+
+  /* "netCDF4.pyx":3336
+ *         # reshape data array by adding extra singleton dimensions
+ *         # if needed to conform with start,count,stride.
+ *         if len(data.shape) != len(datashape):             # <<<<<<<<<<<<<<
+ *             # create a view so shape in caller is not modified (issue 90)
+ *             data = data.view()
+ */
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_6 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_12 = PyObject_Length(__pyx_v_datashape); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = ((__pyx_t_6 != __pyx_t_12) != 0);
+  if (__pyx_t_8) {
+
+    /* "netCDF4.pyx":3338
+ *         if len(data.shape) != len(datashape):
+ *             # create a view so shape in caller is not modified (issue 90)
+ *             data = data.view()             # <<<<<<<<<<<<<<
+ *             data.shape = tuple(datashape)
+ * 
+ */
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_view); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_2 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+      if (likely(__pyx_t_2)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+        __Pyx_INCREF(__pyx_t_2);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_7, function);
+      }
+    }
+    if (__pyx_t_2) {
+      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    } else {
+      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4);
+    __pyx_t_4 = 0;
+
+    /* "netCDF4.pyx":3339
+ *             # create a view so shape in caller is not modified (issue 90)
+ *             data = data.view()
+ *             data.shape = tuple(datashape)             # <<<<<<<<<<<<<<
+ * 
+ *         # Reshape these arrays so we can iterate over them.
+ */
+    __pyx_t_4 = PySequence_Tuple(__pyx_v_datashape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    if (__Pyx_PyObject_SetAttrStr(__pyx_v_data, __pyx_n_s_shape, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    goto __pyx_L20;
+  }
+  __pyx_L20:;
+
+  /* "netCDF4.pyx":3342
+ * 
+ *         # Reshape these arrays so we can iterate over them.
+ *         start = start.reshape((-1, self.ndim or 1))             # <<<<<<<<<<<<<<
+ *         count = count.reshape((-1, self.ndim or 1))
+ *         stride = stride.reshape((-1, self.ndim or 1))
+ */
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_8) {
+  } else {
+    __Pyx_INCREF(__pyx_v_self->ndim);
+    __pyx_t_2 = __pyx_v_self->ndim;
+    goto __pyx_L21_bool_binop_done;
+  }
+  __pyx_t_9 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_2 = __pyx_t_9;
+  __pyx_t_9 = 0;
+  __pyx_L21_bool_binop_done:;
+  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __Pyx_INCREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_int_neg_1);
+  __Pyx_GIVEREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_2 = 0;
+  __pyx_t_2 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+    if (likely(__pyx_t_2)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_7, function);
+    }
+  }
+  if (!__pyx_t_2) {
+    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_GOTREF(__pyx_t_4);
+  } else {
+    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_9);
+    __Pyx_GIVEREF(__pyx_t_9);
+    __pyx_t_9 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_4);
+  __pyx_t_4 = 0;
+
+  /* "netCDF4.pyx":3343
+ *         # Reshape these arrays so we can iterate over them.
+ *         start = start.reshape((-1, self.ndim or 1))
+ *         count = count.reshape((-1, self.ndim or 1))             # <<<<<<<<<<<<<<
+ *         stride = stride.reshape((-1, self.ndim or 1))
+ *         put_ind = put_ind.reshape((-1, self.ndim or 1))
+ */
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_8) {
+  } else {
+    __Pyx_INCREF(__pyx_v_self->ndim);
+    __pyx_t_5 = __pyx_v_self->ndim;
+    goto __pyx_L23_bool_binop_done;
+  }
+  __pyx_t_9 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_5 = __pyx_t_9;
+  __pyx_t_9 = 0;
+  __pyx_L23_bool_binop_done:;
+  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __Pyx_INCREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_int_neg_1);
+  __Pyx_GIVEREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
+  __pyx_t_5 = 0;
+  __pyx_t_5 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
+    if (likely(__pyx_t_5)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+      __Pyx_INCREF(__pyx_t_5);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_7, function);
+    }
+  }
+  if (!__pyx_t_5) {
+    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_GOTREF(__pyx_t_4);
+  } else {
+    __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+    PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_9);
+    __Pyx_GIVEREF(__pyx_t_9);
+    __pyx_t_9 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF_SET(__pyx_v_count, __pyx_t_4);
+  __pyx_t_4 = 0;
+
+  /* "netCDF4.pyx":3344
+ *         start = start.reshape((-1, self.ndim or 1))
+ *         count = count.reshape((-1, self.ndim or 1))
+ *         stride = stride.reshape((-1, self.ndim or 1))             # <<<<<<<<<<<<<<
+ *         put_ind = put_ind.reshape((-1, self.ndim or 1))
+ * 
+ */
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_8) {
+  } else {
+    __Pyx_INCREF(__pyx_v_self->ndim);
+    __pyx_t_2 = __pyx_v_self->ndim;
+    goto __pyx_L25_bool_binop_done;
+  }
+  __pyx_t_9 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_2 = __pyx_t_9;
+  __pyx_t_9 = 0;
+  __pyx_L25_bool_binop_done:;
+  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __Pyx_INCREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_int_neg_1);
+  __Pyx_GIVEREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  __pyx_t_2 = 0;
+  __pyx_t_2 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+    if (likely(__pyx_t_2)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_7, function);
+    }
+  }
+  if (!__pyx_t_2) {
+    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_GOTREF(__pyx_t_4);
+  } else {
+    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_9);
+    __Pyx_GIVEREF(__pyx_t_9);
+    __pyx_t_9 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF_SET(__pyx_v_stride, __pyx_t_4);
+  __pyx_t_4 = 0;
+
+  /* "netCDF4.pyx":3345
+ *         count = count.reshape((-1, self.ndim or 1))
+ *         stride = stride.reshape((-1, self.ndim or 1))
+ *         put_ind = put_ind.reshape((-1, self.ndim or 1))             # <<<<<<<<<<<<<<
+ * 
+ *         if 'least_significant_digit' in self.ncattrs():
+ */
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_reshape); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_8) {
+  } else {
+    __Pyx_INCREF(__pyx_v_self->ndim);
+    __pyx_t_5 = __pyx_v_self->ndim;
+    goto __pyx_L27_bool_binop_done;
+  }
+  __pyx_t_9 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_5 = __pyx_t_9;
+  __pyx_t_9 = 0;
+  __pyx_L27_bool_binop_done:;
+  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __Pyx_INCREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_int_neg_1);
+  __Pyx_GIVEREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
+  __pyx_t_5 = 0;
+  __pyx_t_5 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
+    if (likely(__pyx_t_5)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+      __Pyx_INCREF(__pyx_t_5);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_7, function);
+    }
+  }
+  if (!__pyx_t_5) {
+    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_GOTREF(__pyx_t_4);
+  } else {
+    __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+    PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_9);
+    __Pyx_GIVEREF(__pyx_t_9);
+    __pyx_t_9 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF_SET(__pyx_v_put_ind, __pyx_t_4);
+  __pyx_t_4 = 0;
+
+  /* "netCDF4.pyx":3347
+ *         put_ind = put_ind.reshape((-1, self.ndim or 1))
+ * 
+ *         if 'least_significant_digit' in self.ncattrs():             # <<<<<<<<<<<<<<
+ *             data = _quantize(data,self.least_significant_digit)
+ *         # if auto_scale mode set to True, (through
+ */
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_2 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+    if (likely(__pyx_t_2)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_7, function);
+    }
+  }
+  if (__pyx_t_2) {
+    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  } else {
+    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_8 = (__Pyx_PySequence_Contains(__pyx_n_s_least_significant_digit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_1 = (__pyx_t_8 != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":3348
+ * 
+ *         if 'least_significant_digit' in self.ncattrs():
+ *             data = _quantize(data,self.least_significant_digit)             # <<<<<<<<<<<<<<
+ *         # if auto_scale mode set to True, (through
+ *         # a call to set_auto_scale or set_auto_maskandscale),
+ */
+    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_quantize); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_least_significant_digit); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_9 = NULL;
+    __pyx_t_12 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
+      if (likely(__pyx_t_9)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+        __Pyx_INCREF(__pyx_t_9);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_7, function);
+        __pyx_t_12 = 1;
+      }
+    }
+    __pyx_t_5 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    if (__pyx_t_9) {
+      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_data);
+    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_12, __pyx_v_data);
+    __Pyx_GIVEREF(__pyx_v_data);
+    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_12, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __pyx_t_2 = 0;
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4);
+    __pyx_t_4 = 0;
+    goto __pyx_L29;
+  }
+  __pyx_L29:;
+
+  /* "netCDF4.pyx":3357
+ *         # missing_value/_Fill_Value.
+ *         # ignore if not a primitive (not compound or vlen) datatype.
+ *         if self.mask and self._isprimitive:             # <<<<<<<<<<<<<<
+ *             # use missing_value as fill value.
+ *             # if no missing value set, use _FillValue.
+ */
+  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->mask); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_8) {
+  } else {
+    __pyx_t_1 = __pyx_t_8;
+    goto __pyx_L31_bool_binop_done;
+  }
+  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_t_8;
+  __pyx_L31_bool_binop_done:;
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":3360
+ *             # use missing_value as fill value.
+ *             # if no missing value set, use _FillValue.
+ *             if hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'):             # <<<<<<<<<<<<<<
+ *                 # if not masked, create a masked array.
+ *                 if not ma.isMA(data): data = self._toma(data)
+ */
+    __pyx_t_8 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = (__pyx_t_8 != 0);
+    if (!__pyx_t_3) {
+    } else {
+      __pyx_t_1 = __pyx_t_3;
+      goto __pyx_L34_bool_binop_done;
+    }
+    __pyx_t_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = (__pyx_t_3 != 0);
+    __pyx_t_1 = __pyx_t_8;
+    __pyx_L34_bool_binop_done:;
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":3362
+ *             if hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'):
+ *                 # if not masked, create a masked array.
+ *                 if not ma.isMA(data): data = self._toma(data)             # <<<<<<<<<<<<<<
+ *         if self.scale and self._isprimitive:
+ *             # pack non-masked values using scale_factor and add_offset
+ */
+      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_isMA); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_7 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
+        if (likely(__pyx_t_7)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+          __Pyx_INCREF(__pyx_t_7);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_5, function);
+        }
+      }
+      if (!__pyx_t_7) {
+        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_data); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+      } else {
+        __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+        __Pyx_INCREF(__pyx_v_data);
+        PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_data);
+        __Pyx_GIVEREF(__pyx_v_data);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_8 = ((!__pyx_t_1) != 0);
+      if (__pyx_t_8) {
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_toma); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_2 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
+          if (likely(__pyx_t_2)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+            __Pyx_INCREF(__pyx_t_2);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_5, function);
+          }
+        }
+        if (!__pyx_t_2) {
+          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_data); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+        } else {
+          __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+          __Pyx_INCREF(__pyx_v_data);
+          PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_data);
+          __Pyx_GIVEREF(__pyx_v_data);
+          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4);
+        __pyx_t_4 = 0;
+        goto __pyx_L36;
+      }
+      __pyx_L36:;
+      goto __pyx_L33;
+    }
+    __pyx_L33:;
+    goto __pyx_L30;
+  }
+  __pyx_L30:;
+
+  /* "netCDF4.pyx":3363
+ *                 # if not masked, create a masked array.
+ *                 if not ma.isMA(data): data = self._toma(data)
+ *         if self.scale and self._isprimitive:             # <<<<<<<<<<<<<<
+ *             # pack non-masked values using scale_factor and add_offset
+ *             if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset'):
+ */
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+  } else {
+    __pyx_t_8 = __pyx_t_1;
+    goto __pyx_L38_bool_binop_done;
+  }
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = __pyx_t_1;
+  __pyx_L38_bool_binop_done:;
+  if (__pyx_t_8) {
+
+    /* "netCDF4.pyx":3365
+ *         if self.scale and self._isprimitive:
+ *             # pack non-masked values using scale_factor and add_offset
+ *             if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset'):             # <<<<<<<<<<<<<<
+ *                 data = (data - self.add_offset)/self.scale_factor
+ *                 if self.dtype.kind == 'i': data = numpy.around(data)
+ */
+    __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = (__pyx_t_1 != 0);
+    if (__pyx_t_3) {
+    } else {
+      __pyx_t_8 = __pyx_t_3;
+      goto __pyx_L41_bool_binop_done;
+    }
+    __pyx_t_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = (__pyx_t_3 != 0);
+    __pyx_t_8 = __pyx_t_1;
+    __pyx_L41_bool_binop_done:;
+    if (__pyx_t_8) {
+
+      /* "netCDF4.pyx":3366
+ *             # pack non-masked values using scale_factor and add_offset
+ *             if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset'):
+ *                 data = (data - self.add_offset)/self.scale_factor             # <<<<<<<<<<<<<<
+ *                 if self.dtype.kind == 'i': data = numpy.around(data)
+ *             elif hasattr(self, 'scale_factor'):
+ */
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_5 = PyNumber_Subtract(__pyx_v_data, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_7);
+      __pyx_t_7 = 0;
+
+      /* "netCDF4.pyx":3367
+ *             if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset'):
+ *                 data = (data - self.add_offset)/self.scale_factor
+ *                 if self.dtype.kind == 'i': data = numpy.around(data)             # <<<<<<<<<<<<<<
+ *             elif hasattr(self, 'scale_factor'):
+ *                 data = data/self.scale_factor
+ */
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_i, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      if (__pyx_t_8) {
+        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_around); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_t_4 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
+          if (likely(__pyx_t_4)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+            __Pyx_INCREF(__pyx_t_4);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_5, function);
+          }
+        }
+        if (!__pyx_t_4) {
+          __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_data); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+        } else {
+          __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+          __Pyx_INCREF(__pyx_v_data);
+          PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_data);
+          __Pyx_GIVEREF(__pyx_v_data);
+          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_7);
+        __pyx_t_7 = 0;
+        goto __pyx_L43;
+      }
+      __pyx_L43:;
+      goto __pyx_L40;
+    }
+
+    /* "netCDF4.pyx":3368
+ *                 data = (data - self.add_offset)/self.scale_factor
+ *                 if self.dtype.kind == 'i': data = numpy.around(data)
+ *             elif hasattr(self, 'scale_factor'):             # <<<<<<<<<<<<<<
+ *                 data = data/self.scale_factor
+ *                 if self.dtype.kind == 'i': data = numpy.around(data)
+ */
+    __pyx_t_8 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = (__pyx_t_8 != 0);
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":3369
+ *                 if self.dtype.kind == 'i': data = numpy.around(data)
+ *             elif hasattr(self, 'scale_factor'):
+ *                 data = data/self.scale_factor             # <<<<<<<<<<<<<<
+ *                 if self.dtype.kind == 'i': data = numpy.around(data)
+ *             elif hasattr(self, 'add_offset'):
+ */
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_v_data, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_5);
+      __pyx_t_5 = 0;
+
+      /* "netCDF4.pyx":3370
+ *             elif hasattr(self, 'scale_factor'):
+ *                 data = data/self.scale_factor
+ *                 if self.dtype.kind == 'i': data = numpy.around(data)             # <<<<<<<<<<<<<<
+ *             elif hasattr(self, 'add_offset'):
+ *                 data = data - self.add_offset
+ */
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_i, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (__pyx_t_1) {
+        __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_around); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __pyx_t_7 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+          if (likely(__pyx_t_7)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+            __Pyx_INCREF(__pyx_t_7);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_2, function);
+          }
+        }
+        if (!__pyx_t_7) {
+          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_5);
+        } else {
+          __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+          __Pyx_INCREF(__pyx_v_data);
+          PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_data);
+          __Pyx_GIVEREF(__pyx_v_data);
+          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_5);
+          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_5);
+        __pyx_t_5 = 0;
+        goto __pyx_L44;
+      }
+      __pyx_L44:;
+      goto __pyx_L40;
+    }
+
+    /* "netCDF4.pyx":3371
+ *                 data = data/self.scale_factor
+ *                 if self.dtype.kind == 'i': data = numpy.around(data)
+ *             elif hasattr(self, 'add_offset'):             # <<<<<<<<<<<<<<
+ *                 data = data - self.add_offset
+ *                 if self.dtype.kind == 'i': data = numpy.around(data)
+ */
+    __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = (__pyx_t_1 != 0);
+    if (__pyx_t_8) {
+
+      /* "netCDF4.pyx":3372
+ *                 if self.dtype.kind == 'i': data = numpy.around(data)
+ *             elif hasattr(self, 'add_offset'):
+ *                 data = data - self.add_offset             # <<<<<<<<<<<<<<
+ *                 if self.dtype.kind == 'i': data = numpy.around(data)
+ *             if ma.isMA(data):
+ */
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_2 = PyNumber_Subtract(__pyx_v_data, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
+      __pyx_t_2 = 0;
+
+      /* "netCDF4.pyx":3373
+ *             elif hasattr(self, 'add_offset'):
+ *                 data = data - self.add_offset
+ *                 if self.dtype.kind == 'i': data = numpy.around(data)             # <<<<<<<<<<<<<<
+ *             if ma.isMA(data):
+ *                 # if underlying data in masked regions of masked array
+ */
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_i, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      if (__pyx_t_8) {
+        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_around); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __pyx_t_5 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+          if (likely(__pyx_t_5)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+            __Pyx_INCREF(__pyx_t_5);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_4, function);
+          }
+        }
+        if (!__pyx_t_5) {
+          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+        } else {
+          __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+          __Pyx_INCREF(__pyx_v_data);
+          PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_data);
+          __Pyx_GIVEREF(__pyx_v_data);
+          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
+        __pyx_t_2 = 0;
+        goto __pyx_L45;
+      }
+      __pyx_L45:;
+      goto __pyx_L40;
+    }
+    __pyx_L40:;
+
+    /* "netCDF4.pyx":3374
+ *                 data = data - self.add_offset
+ *                 if self.dtype.kind == 'i': data = numpy.around(data)
+ *             if ma.isMA(data):             # <<<<<<<<<<<<<<
+ *                 # if underlying data in masked regions of masked array
+ *                 # corresponds to missing values, don't fill masked array -
+ */
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isMA); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_7, function);
+      }
+    }
+    if (!__pyx_t_4) {
+      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+    } else {
+      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+      __Pyx_INCREF(__pyx_v_data);
+      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data);
+      __Pyx_GIVEREF(__pyx_v_data);
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (__pyx_t_8) {
+
+      /* "netCDF4.pyx":3378
+ *                 # corresponds to missing values, don't fill masked array -
+ *                 # just use underlying data instead
+ *                 if hasattr(self, 'missing_value') and \             # <<<<<<<<<<<<<<
+ *                    numpy.all(numpy.in1d(data.data[data.mask],self.missing_value)):
+ *                     data = data.data
+ */
+      __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = (__pyx_t_1 != 0);
+      if (__pyx_t_3) {
+      } else {
+        __pyx_t_8 = __pyx_t_3;
+        goto __pyx_L48_bool_binop_done;
+      }
+
+      /* "netCDF4.pyx":3379
+ *                 # just use underlying data instead
+ *                 if hasattr(self, 'missing_value') and \
+ *                    numpy.all(numpy.in1d(data.data[data.mask],self.missing_value)):             # <<<<<<<<<<<<<<
+ *                     data = data.data
+ *                 else:
+ */
+      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_all); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_in1d); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_13 = PyObject_GetItem(__pyx_t_4, __pyx_t_10); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_13);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_4 = NULL;
+      __pyx_t_12 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
+        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
+        if (likely(__pyx_t_4)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+          __Pyx_INCREF(__pyx_t_4);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_9, function);
+          __pyx_t_12 = 1;
+        }
+      }
+      __pyx_t_14 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_14);
+      if (__pyx_t_4) {
+        PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+      }
+      PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_12, __pyx_t_13);
+      __Pyx_GIVEREF(__pyx_t_13);
+      PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_12, __pyx_t_10);
+      __Pyx_GIVEREF(__pyx_t_10);
+      __pyx_t_13 = 0;
+      __pyx_t_10 = 0;
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_14, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_9 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
+        if (likely(__pyx_t_9)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+          __Pyx_INCREF(__pyx_t_9);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_5, function);
+        }
+      }
+      if (!__pyx_t_9) {
+        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_GOTREF(__pyx_t_2);
+      } else {
+        __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_14);
+        PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
+        PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_7);
+        __Pyx_GIVEREF(__pyx_t_7);
+        __pyx_t_7 = 0;
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_8 = __pyx_t_3;
+      __pyx_L48_bool_binop_done:;
+      if (__pyx_t_8) {
+
+        /* "netCDF4.pyx":3380
+ *                 if hasattr(self, 'missing_value') and \
+ *                    numpy.all(numpy.in1d(data.data[data.mask],self.missing_value)):
+ *                     data = data.data             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     if hasattr(self, 'missing_value'):
+ */
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
+        __pyx_t_2 = 0;
+        goto __pyx_L47;
+      }
+      /*else*/ {
+
+        /* "netCDF4.pyx":3382
+ *                     data = data.data
+ *                 else:
+ *                     if hasattr(self, 'missing_value'):             # <<<<<<<<<<<<<<
+ *                         # if missing value is a scalar, use it as fill_value.
+ *                         # if missing value is a vector, raise an exception
+ */
+        __pyx_t_8 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = (__pyx_t_8 != 0);
+        if (__pyx_t_3) {
+
+          /* "netCDF4.pyx":3386
+ *                         # if missing value is a vector, raise an exception
+ *                         # since we then don't know how to fill in masked values.
+ *                         if numpy.array(self.missing_value).shape == ():             # <<<<<<<<<<<<<<
+ *                             fillval = self.missing_value
+ *                         else:
+ */
+          __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_5);
+          __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_5);
+          __pyx_t_7 = NULL;
+          if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_14))) {
+            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_14);
+            if (likely(__pyx_t_7)) {
+              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
+              __Pyx_INCREF(__pyx_t_7);
+              __Pyx_INCREF(function);
+              __Pyx_DECREF_SET(__pyx_t_14, function);
+            }
+          }
+          if (!__pyx_t_7) {
+            __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+            __Pyx_GOTREF(__pyx_t_2);
+          } else {
+            __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_9);
+            PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+            PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_5);
+            __Pyx_GIVEREF(__pyx_t_5);
+            __pyx_t_5 = 0;
+            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_2);
+            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          }
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+          __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_shape); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __pyx_t_2 = PyObject_RichCompare(__pyx_t_14, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+          __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          if (__pyx_t_3) {
+
+            /* "netCDF4.pyx":3387
+ *                         # since we then don't know how to fill in masked values.
+ *                         if numpy.array(self.missing_value).shape == ():
+ *                             fillval = self.missing_value             # <<<<<<<<<<<<<<
+ *                         else:
+ *                             msg="cannot assign fill_value for masked array when missing_value attribute is not a scalar"
+ */
+            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_2);
+            __pyx_v_fillval = __pyx_t_2;
+            __pyx_t_2 = 0;
+            goto __pyx_L51;
+          }
+          /*else*/ {
+
+            /* "netCDF4.pyx":3389
+ *                             fillval = self.missing_value
+ *                         else:
+ *                             msg="cannot assign fill_value for masked array when missing_value attribute is not a scalar"             # <<<<<<<<<<<<<<
+ *                             raise RuntimeError(msg)
+ *                         if numpy.array(fillval).shape != ():
+ */
+            __Pyx_INCREF(__pyx_kp_s_cannot_assign_fill_value_for_mas);
+            __pyx_v_msg = __pyx_kp_s_cannot_assign_fill_value_for_mas;
+
+            /* "netCDF4.pyx":3390
+ *                         else:
+ *                             msg="cannot assign fill_value for masked array when missing_value attribute is not a scalar"
+ *                             raise RuntimeError(msg)             # <<<<<<<<<<<<<<
+ *                         if numpy.array(fillval).shape != ():
+ *                             fillval = fillval[0]
+ */
+            __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_2);
+            __Pyx_INCREF(__pyx_v_msg);
+            PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg);
+            __Pyx_GIVEREF(__pyx_v_msg);
+            __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_14);
+            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+            __Pyx_Raise(__pyx_t_14, 0, 0, 0);
+            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          __pyx_L51:;
+
+          /* "netCDF4.pyx":3391
+ *                             msg="cannot assign fill_value for masked array when missing_value attribute is not a scalar"
+ *                             raise RuntimeError(msg)
+ *                         if numpy.array(fillval).shape != ():             # <<<<<<<<<<<<<<
+ *                             fillval = fillval[0]
+ *                     elif hasattr(self, '_FillValue'):
+ */
+          __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __pyx_t_2 = NULL;
+          if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
+            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
+            if (likely(__pyx_t_2)) {
+              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+              __Pyx_INCREF(__pyx_t_2);
+              __Pyx_INCREF(function);
+              __Pyx_DECREF_SET(__pyx_t_9, function);
+            }
+          }
+          if (!__pyx_t_2) {
+            __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_fillval); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_14);
+          } else {
+            __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_5);
+            PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+            __Pyx_INCREF(__pyx_v_fillval);
+            PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_fillval);
+            __Pyx_GIVEREF(__pyx_v_fillval);
+            __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_14);
+            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+          }
+          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+          __pyx_t_14 = PyObject_RichCompare(__pyx_t_9, __pyx_empty_tuple, Py_NE); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+          if (__pyx_t_3) {
+
+            /* "netCDF4.pyx":3392
+ *                             raise RuntimeError(msg)
+ *                         if numpy.array(fillval).shape != ():
+ *                             fillval = fillval[0]             # <<<<<<<<<<<<<<
+ *                     elif hasattr(self, '_FillValue'):
+ *                         fillval = self._FillValue
+ */
+            __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_fillval, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3392; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+            __Pyx_GOTREF(__pyx_t_14);
+            __Pyx_DECREF_SET(__pyx_v_fillval, __pyx_t_14);
+            __pyx_t_14 = 0;
+            goto __pyx_L52;
+          }
+          __pyx_L52:;
+          goto __pyx_L50;
+        }
+
+        /* "netCDF4.pyx":3393
+ *                         if numpy.array(fillval).shape != ():
+ *                             fillval = fillval[0]
+ *                     elif hasattr(self, '_FillValue'):             # <<<<<<<<<<<<<<
+ *                         fillval = self._FillValue
+ *                     else:
+ */
+        __pyx_t_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = (__pyx_t_3 != 0);
+        if (__pyx_t_8) {
+
+          /* "netCDF4.pyx":3394
+ *                             fillval = fillval[0]
+ *                     elif hasattr(self, '_FillValue'):
+ *                         fillval = self._FillValue             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         fillval = default_fillvals[self.dtype.str[1:]]
+ */
+          __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          __pyx_v_fillval = __pyx_t_14;
+          __pyx_t_14 = 0;
+          goto __pyx_L50;
+        }
+        /*else*/ {
+
+          /* "netCDF4.pyx":3396
+ *                         fillval = self._FillValue
+ *                     else:
+ *                         fillval = default_fillvals[self.dtype.str[1:]]             # <<<<<<<<<<<<<<
+ *                     data = data.filled(fill_value=fillval)
+ * 
+ */
+          __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_9);
+          __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_9, 1, 0, NULL, NULL, &__pyx_slice__81, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_5);
+          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+          __pyx_t_9 = PyObject_GetItem(__pyx_t_14, __pyx_t_5); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+          __Pyx_GOTREF(__pyx_t_9);
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+          __pyx_v_fillval = __pyx_t_9;
+          __pyx_t_9 = 0;
+        }
+        __pyx_L50:;
+
+        /* "netCDF4.pyx":3397
+ *                     else:
+ *                         fillval = default_fillvals[self.dtype.str[1:]]
+ *                     data = data.filled(fill_value=fillval)             # <<<<<<<<<<<<<<
+ * 
+ *         # Fill output array with data chunks.
+ */
+        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_filled); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_fill_value, __pyx_v_fillval) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_14);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_14);
+        __pyx_t_14 = 0;
+      }
+      __pyx_L47:;
+      goto __pyx_L46;
+    }
+    __pyx_L46:;
+    goto __pyx_L37;
+  }
+  __pyx_L37:;
+
+  /* "netCDF4.pyx":3400
+ * 
+ *         # Fill output array with data chunks.
+ *         for (a,b,c,i) in zip(start, count, stride, put_ind):             # <<<<<<<<<<<<<<
+ *             dataput = data[tuple(i)]
+ *             if dataput.size == 0: continue # nothing to write
+ */
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_9 = NULL;
+  __pyx_t_12 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
+    if (likely(__pyx_t_9)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_9);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_5, function);
+      __pyx_t_12 = 1;
+    }
+  }
+  __pyx_t_2 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (__pyx_t_9) {
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
+  }
+  __Pyx_INCREF(__pyx_v_start);
+  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_12, __pyx_v_start);
+  __Pyx_GIVEREF(__pyx_v_start);
+  __Pyx_INCREF(__pyx_v_count);
+  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_12, __pyx_v_count);
+  __Pyx_GIVEREF(__pyx_v_count);
+  __Pyx_INCREF(__pyx_v_stride);
+  PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_12, __pyx_v_stride);
+  __Pyx_GIVEREF(__pyx_v_stride);
+  __Pyx_INCREF(__pyx_v_put_ind);
+  PyTuple_SET_ITEM(__pyx_t_2, 3+__pyx_t_12, __pyx_v_put_ind);
+  __Pyx_GIVEREF(__pyx_v_put_ind);
+  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_14);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_14)) || PyTuple_CheckExact(__pyx_t_14)) {
+    __pyx_t_5 = __pyx_t_14; __Pyx_INCREF(__pyx_t_5); __pyx_t_12 = 0;
+    __pyx_t_15 = NULL;
+  } else {
+    __pyx_t_12 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_15 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_15)) {
+      if (likely(PyList_CheckExact(__pyx_t_5))) {
+        if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_5)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_14 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_12); __Pyx_INCREF(__pyx_t_14); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_14 = PySequence_ITEM(__pyx_t_5, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_12); __Pyx_INCREF(__pyx_t_14); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_14 = PySequence_ITEM(__pyx_t_5, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_14 = __pyx_t_15(__pyx_t_5);
+      if (unlikely(!__pyx_t_14)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_14);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_14))) || (PyList_CheckExact(__pyx_t_14))) {
+      PyObject* sequence = __pyx_t_14;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 4)) {
+        if (size > 4) __Pyx_RaiseTooManyValuesError(4);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
+        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
+        __pyx_t_10 = PyTuple_GET_ITEM(sequence, 3); 
+      } else {
+        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
+        __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
+        __pyx_t_10 = PyList_GET_ITEM(sequence, 3); 
+      }
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_9);
+      __Pyx_INCREF(__pyx_t_7);
+      __Pyx_INCREF(__pyx_t_10);
+      #else
+      {
+        Py_ssize_t i;
+        PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_9,&__pyx_t_7,&__pyx_t_10};
+        for (i=0; i < 4; i++) {
+          PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(item);
+          *(temps[i]) = item;
+        }
+      }
+      #endif
+      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_9,&__pyx_t_7,&__pyx_t_10};
+      __pyx_t_13 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_13);
+      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+      __pyx_t_11 = Py_TYPE(__pyx_t_13)->tp_iternext;
+      for (index=0; index < 4; index++) {
+        PyObject* item = __pyx_t_11(__pyx_t_13); if (unlikely(!item)) goto __pyx_L55_unpacking_failed;
+        __Pyx_GOTREF(item);
+        *(temps[index]) = item;
+      }
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_13), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = NULL;
+      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+      goto __pyx_L56_unpacking_done;
+      __pyx_L55_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+      __pyx_t_11 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L56_unpacking_done:;
+    }
+    __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_2);
+    __pyx_t_2 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_9);
+    __pyx_t_9 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_7);
+    __pyx_t_7 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_10);
+    __pyx_t_10 = 0;
+
+    /* "netCDF4.pyx":3401
+ *         # Fill output array with data chunks.
+ *         for (a,b,c,i) in zip(start, count, stride, put_ind):
+ *             dataput = data[tuple(i)]             # <<<<<<<<<<<<<<
+ *             if dataput.size == 0: continue # nothing to write
+ *             # convert array scalar to regular array with one element.
+ */
+    __pyx_t_14 = PySequence_Tuple(__pyx_v_i); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_14);
+    __pyx_t_10 = PyObject_GetItem(__pyx_v_data, __pyx_t_14); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3401; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_dataput, __pyx_t_10);
+    __pyx_t_10 = 0;
+
+    /* "netCDF4.pyx":3402
+ *         for (a,b,c,i) in zip(start, count, stride, put_ind):
+ *             dataput = data[tuple(i)]
+ *             if dataput.size == 0: continue # nothing to write             # <<<<<<<<<<<<<<
+ *             # convert array scalar to regular array with one element.
+ *             if dataput.shape == ():
+ */
+    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_size); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_14 = PyObject_RichCompare(__pyx_t_10, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+    if (__pyx_t_8) {
+      goto __pyx_L53_continue;
+    }
+
+    /* "netCDF4.pyx":3404
+ *             if dataput.size == 0: continue # nothing to write
+ *             # convert array scalar to regular array with one element.
+ *             if dataput.shape == ():             # <<<<<<<<<<<<<<
+ *                 if self._isvlen:
+ *                     dataput=numpy.array(dataput,'O')
+ */
+    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_shape); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_14);
+    __pyx_t_10 = PyObject_RichCompare(__pyx_t_14, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    if (__pyx_t_8) {
+
+      /* "netCDF4.pyx":3405
+ *             # convert array scalar to regular array with one element.
+ *             if dataput.shape == ():
+ *                 if self._isvlen:             # <<<<<<<<<<<<<<
+ *                     dataput=numpy.array(dataput,'O')
+ *                 else:
+ */
+      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_8) {
+
+        /* "netCDF4.pyx":3406
+ *             if dataput.shape == ():
+ *                 if self._isvlen:
+ *                     dataput=numpy.array(dataput,'O')             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     dataput=numpy.array(dataput,dataput.dtype)
+ */
+        __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_14);
+        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+        __pyx_t_14 = NULL;
+        __pyx_t_6 = 0;
+        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_7);
+          if (likely(__pyx_t_14)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+            __Pyx_INCREF(__pyx_t_14);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_7, function);
+            __pyx_t_6 = 1;
+          }
+        }
+        __pyx_t_9 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        if (__pyx_t_14) {
+          PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = NULL;
+        }
+        __Pyx_INCREF(__pyx_v_dataput);
+        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_v_dataput);
+        __Pyx_GIVEREF(__pyx_v_dataput);
+        __Pyx_INCREF(__pyx_n_s_O);
+        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_n_s_O);
+        __Pyx_GIVEREF(__pyx_n_s_O);
+        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_DECREF_SET(__pyx_v_dataput, __pyx_t_10);
+        __pyx_t_10 = 0;
+        goto __pyx_L59;
+      }
+      /*else*/ {
+
+        /* "netCDF4.pyx":3408
+ *                     dataput=numpy.array(dataput,'O')
+ *                 else:
+ *                     dataput=numpy.array(dataput,dataput.dtype)             # <<<<<<<<<<<<<<
+ *             self._put(dataput,a,b,c)
+ * 
+ */
+        __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_14 = NULL;
+        __pyx_t_6 = 0;
+        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
+          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_9);
+          if (likely(__pyx_t_14)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+            __Pyx_INCREF(__pyx_t_14);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_9, function);
+            __pyx_t_6 = 1;
+          }
+        }
+        __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        if (__pyx_t_14) {
+          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = NULL;
+        }
+        __Pyx_INCREF(__pyx_v_dataput);
+        PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_v_dataput);
+        __Pyx_GIVEREF(__pyx_v_dataput);
+        PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_t_7);
+        __Pyx_GIVEREF(__pyx_t_7);
+        __pyx_t_7 = 0;
+        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_DECREF_SET(__pyx_v_dataput, __pyx_t_10);
+        __pyx_t_10 = 0;
+      }
+      __pyx_L59:;
+      goto __pyx_L58;
+    }
+    __pyx_L58:;
+
+    /* "netCDF4.pyx":3409
+ *                 else:
+ *                     dataput=numpy.array(dataput,dataput.dtype)
+ *             self._put(dataput,a,b,c)             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_put_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_9);
+    __pyx_t_2 = NULL;
+    __pyx_t_6 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
+      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
+      if (likely(__pyx_t_2)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+        __Pyx_INCREF(__pyx_t_2);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_9, function);
+        __pyx_t_6 = 1;
+      }
+    }
+    __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    if (__pyx_t_2) {
+      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_dataput);
+    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_dataput);
+    __Pyx_GIVEREF(__pyx_v_dataput);
+    __Pyx_INCREF(__pyx_v_a);
+    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_a);
+    __Pyx_GIVEREF(__pyx_v_a);
+    __Pyx_INCREF(__pyx_v_b);
+    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_b);
+    __Pyx_GIVEREF(__pyx_v_b);
+    __Pyx_INCREF(__pyx_v_c);
+    PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_v_c);
+    __Pyx_GIVEREF(__pyx_v_c);
+    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+
+    /* "netCDF4.pyx":3400
+ * 
+ *         # Fill output array with data chunks.
+ *         for (a,b,c,i) in zip(start, count, stride, put_ind):             # <<<<<<<<<<<<<<
+ *             dataput = data[tuple(i)]
+ *             if dataput.size == 0: continue # nothing to write
+ */
+    __pyx_L53_continue:;
+  }
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+  /* "netCDF4.pyx":3287
+ *             free(vldata)
+ * 
+ *     def __setitem__(self, elem, data):             # <<<<<<<<<<<<<<
+ *         # This special method is used to assign to the netCDF variable
+ *         # using "extended slice syntax". The extended slice syntax
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_XDECREF(__pyx_t_13);
+  __Pyx_XDECREF(__pyx_t_14);
+  __Pyx_AddTraceback("netCDF4.Variable.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_msg);
+  __Pyx_XDECREF(__pyx_v_start);
+  __Pyx_XDECREF(__pyx_v_count);
+  __Pyx_XDECREF(__pyx_v_stride);
+  __Pyx_XDECREF(__pyx_v_put_ind);
+  __Pyx_XDECREF(__pyx_v_datashape);
+  __Pyx_XDECREF(__pyx_v_fillval);
+  __Pyx_XDECREF(__pyx_v_a);
+  __Pyx_XDECREF(__pyx_v_b);
+  __Pyx_XDECREF(__pyx_v_c);
+  __Pyx_XDECREF(__pyx_v_i);
+  __Pyx_XDECREF(__pyx_v_dataput);
+  __Pyx_XDECREF(__pyx_v_data);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3412
+ * 
+ * 
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self.shape[0]
+ * 
+ */
+
+/* Python wrapper */
+static Py_ssize_t __pyx_pw_7netCDF4_8Variable_51__len__(PyObject *__pyx_v_self); /*proto*/
+static Py_ssize_t __pyx_pw_7netCDF4_8Variable_51__len__(PyObject *__pyx_v_self) {
+  Py_ssize_t __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_50__len__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static Py_ssize_t __pyx_pf_7netCDF4_8Variable_50__len__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  Py_ssize_t __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  Py_ssize_t __pyx_t_3;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__len__", 0);
+
+  /* "netCDF4.pyx":3413
+ * 
+ *     def __len__(self):
+ *         return self.shape[0]             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3413; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_r = __pyx_t_3;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":3412
+ * 
+ * 
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self.shape[0]
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("netCDF4.Variable.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3416
+ * 
+ * 
+ *     def assignValue(self,val):             # <<<<<<<<<<<<<<
+ *         """
+ * assignValue(self, val)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_53assignValue(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_52assignValue[] = "\nassignValue(self, val)\n\nassign a value to a scalar variable.  Provided for compatibility with \nScientific.IO.NetCDF, can also be done by assigning to a slice ([:]).";
+static PyObject *__pyx_pw_7netCDF4_8Variable_53assignValue(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("assignValue (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_52assignValue(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_val));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_52assignValue(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_val) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  Py_ssize_t __pyx_t_2;
+  int __pyx_t_3;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("assignValue", 0);
+
+  /* "netCDF4.pyx":3422
+ * assign a value to a scalar variable.  Provided for compatibility with
+ * Scientific.IO.NetCDF, can also be done by assigning to a slice ([:])."""
+ *         if len(self.dimensions):             # <<<<<<<<<<<<<<
+ *             raise IndexError('to assign values to a non-scalar variable, use a slice')
+ *         self[:]=val
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = (__pyx_t_2 != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":3423
+ * Scientific.IO.NetCDF, can also be done by assigning to a slice ([:])."""
+ *         if len(self.dimensions):
+ *             raise IndexError('to assign values to a non-scalar variable, use a slice')             # <<<<<<<<<<<<<<
+ *         self[:]=val
+ * 
+ */
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":3424
+ *         if len(self.dimensions):
+ *             raise IndexError('to assign values to a non-scalar variable, use a slice')
+ *         self[:]=val             # <<<<<<<<<<<<<<
+ * 
+ *     def getValue(self):
+ */
+  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self), __pyx_v_val, 0, 0, NULL, NULL, &__pyx_slice__83, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":3416
+ * 
+ * 
+ *     def assignValue(self,val):             # <<<<<<<<<<<<<<
+ *         """
+ * assignValue(self, val)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Variable.assignValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3426
+ *         self[:]=val
+ * 
+ *     def getValue(self):             # <<<<<<<<<<<<<<
+ *         """
+ * getValue(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_55getValue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_54getValue[] = "\ngetValue(self)\n\nget the value of a scalar variable.  Provided for compatibility with \nScientific.IO.NetCDF, can also be done by slicing ([:]).";
+static PyObject *__pyx_pw_7netCDF4_8Variable_55getValue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("getValue (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_54getValue(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_54getValue(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  Py_ssize_t __pyx_t_2;
+  int __pyx_t_3;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("getValue", 0);
+
+  /* "netCDF4.pyx":3432
+ * get the value of a scalar variable.  Provided for compatibility with
+ * Scientific.IO.NetCDF, can also be done by slicing ([:])."""
+ *         if len(self.dimensions):             # <<<<<<<<<<<<<<
+ *             raise IndexError('to retrieve values from a non-scalar variable, use slicing')
+ *         return self[slice(None)]
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = (__pyx_t_2 != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":3433
+ * Scientific.IO.NetCDF, can also be done by slicing ([:])."""
+ *         if len(self.dimensions):
+ *             raise IndexError('to retrieve values from a non-scalar variable, use slicing')             # <<<<<<<<<<<<<<
+ *         return self[slice(None)]
+ * 
+ */
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":3434
+ *         if len(self.dimensions):
+ *             raise IndexError('to retrieve values from a non-scalar variable, use slicing')
+ *         return self[slice(None)]             # <<<<<<<<<<<<<<
+ * 
+ *     def set_auto_maskandscale(self,maskandscale):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_slice__85); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3434; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":3426
+ *         self[:]=val
+ * 
+ *     def getValue(self):             # <<<<<<<<<<<<<<
+ *         """
+ * getValue(self)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Variable.getValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3436
+ *         return self[slice(None)]
+ * 
+ *     def set_auto_maskandscale(self,maskandscale):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_maskandscale(self,maskandscale)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_57set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_maskandscale); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_56set_auto_maskandscale[] = "\nset_auto_maskandscale(self,maskandscale)\n\nturn on or off automatic conversion of variable data to and\nfrom masked arrays and automatic packing/unpacking of variable\ndata using C{scale_factor} and C{add_offset} attributes.\n\nIf C{maskandscale} is set to C{True}, when data is read from a variable\nit is converted to a masked array if any of the values are exactly\nequal to the either the netCDF _FillValue or the v [...]
+static PyObject *__pyx_pw_7netCDF4_8Variable_57set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_maskandscale) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("set_auto_maskandscale (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_56set_auto_maskandscale(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_maskandscale));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_56set_auto_maskandscale(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_maskandscale) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("set_auto_maskandscale", 0);
+
+  /* "netCDF4.pyx":3475
+ * (automatic conversions are performed).
+ *         """
+ *         if maskandscale:             # <<<<<<<<<<<<<<
+ *             self.scale = True
+ *             self.mask = True
+ */
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_maskandscale); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":3476
+ *         """
+ *         if maskandscale:
+ *             self.scale = True             # <<<<<<<<<<<<<<
+ *             self.mask = True
+ *         else:
+ */
+    __Pyx_INCREF(Py_True);
+    __Pyx_GIVEREF(Py_True);
+    __Pyx_GOTREF(__pyx_v_self->scale);
+    __Pyx_DECREF(__pyx_v_self->scale);
+    __pyx_v_self->scale = Py_True;
+
+    /* "netCDF4.pyx":3477
+ *         if maskandscale:
+ *             self.scale = True
+ *             self.mask = True             # <<<<<<<<<<<<<<
+ *         else:
+ *             self.scale = False
+ */
+    __Pyx_INCREF(Py_True);
+    __Pyx_GIVEREF(Py_True);
+    __Pyx_GOTREF(__pyx_v_self->mask);
+    __Pyx_DECREF(__pyx_v_self->mask);
+    __pyx_v_self->mask = Py_True;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":3479
+ *             self.mask = True
+ *         else:
+ *             self.scale = False             # <<<<<<<<<<<<<<
+ *             self.mask = False
+ * 
+ */
+    __Pyx_INCREF(Py_False);
+    __Pyx_GIVEREF(Py_False);
+    __Pyx_GOTREF(__pyx_v_self->scale);
+    __Pyx_DECREF(__pyx_v_self->scale);
+    __pyx_v_self->scale = Py_False;
+
+    /* "netCDF4.pyx":3480
+ *         else:
+ *             self.scale = False
+ *             self.mask = False             # <<<<<<<<<<<<<<
+ * 
+ *     def set_auto_scale(self,scale):
+ */
+    __Pyx_INCREF(Py_False);
+    __Pyx_GIVEREF(Py_False);
+    __Pyx_GOTREF(__pyx_v_self->mask);
+    __Pyx_DECREF(__pyx_v_self->mask);
+    __pyx_v_self->mask = Py_False;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":3436
+ *         return self[slice(None)]
+ * 
+ *     def set_auto_maskandscale(self,maskandscale):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_maskandscale(self,maskandscale)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4.Variable.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3482
+ *             self.mask = False
+ * 
+ *     def set_auto_scale(self,scale):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_scale(self,scale)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_59set_auto_scale(PyObject *__pyx_v_self, PyObject *__pyx_v_scale); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_58set_auto_scale[] = "\nset_auto_scale(self,scale)\n\nturn on or off automatic packing/unpacking of variable\ndata using C{scale_factor} and C{add_offset} attributes.\n\nIf C{scale} is set to C{True}, and the variable has a\nC{scale_factor} or an C{add_offset} attribute, then data read\nfrom that variable is unpacked using::\n\n    data = self.scale_factor*data + self.add_offset\n\nWhen data is written to a variable it is packed using::\n\n    dat [...]
+static PyObject *__pyx_pw_7netCDF4_8Variable_59set_auto_scale(PyObject *__pyx_v_self, PyObject *__pyx_v_scale) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("set_auto_scale (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_58set_auto_scale(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_scale));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_58set_auto_scale(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_scale) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("set_auto_scale", 0);
+
+  /* "netCDF4.pyx":3510
+ * (automatic conversions are performed).
+ *         """
+ *         if scale:             # <<<<<<<<<<<<<<
+ *             self.scale = True
+ *         else:
+ */
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_scale); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":3511
+ *         """
+ *         if scale:
+ *             self.scale = True             # <<<<<<<<<<<<<<
+ *         else:
+ *             self.scale = False
+ */
+    __Pyx_INCREF(Py_True);
+    __Pyx_GIVEREF(Py_True);
+    __Pyx_GOTREF(__pyx_v_self->scale);
+    __Pyx_DECREF(__pyx_v_self->scale);
+    __pyx_v_self->scale = Py_True;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":3513
+ *             self.scale = True
+ *         else:
+ *             self.scale = False             # <<<<<<<<<<<<<<
+ * 
+ *     def set_auto_mask(self,mask):
+ */
+    __Pyx_INCREF(Py_False);
+    __Pyx_GIVEREF(Py_False);
+    __Pyx_GOTREF(__pyx_v_self->scale);
+    __Pyx_DECREF(__pyx_v_self->scale);
+    __pyx_v_self->scale = Py_False;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":3482
+ *             self.mask = False
+ * 
+ *     def set_auto_scale(self,scale):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_scale(self,scale)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4.Variable.set_auto_scale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3515
+ *             self.scale = False
+ * 
+ *     def set_auto_mask(self,mask):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_mask(self,mask)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_61set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_mask); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_60set_auto_mask[] = "\nset_auto_mask(self,mask)\n\nturn on or off automatic conversion of variable data to and\nfrom masked arrays .\n\nIf C{mask} is set to C{True}, when data is read from a variable\nit is converted to a masked array if any of the values are exactly\nequal to the either the netCDF _FillValue or the value specified by the\nmissing_value variable attribute. The fill_value of the masked array\nis set to the missing_value attribute ( [...]
+static PyObject *__pyx_pw_7netCDF4_8Variable_61set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_mask) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("set_auto_mask (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_60set_auto_mask(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_mask));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_60set_auto_mask(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_mask) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("set_auto_mask", 0);
+
+  /* "netCDF4.pyx":3535
+ * (automatic conversions are performed).
+ *         """
+ *         if mask:             # <<<<<<<<<<<<<<
+ *             self.mask = True
+ *         else:
+ */
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_mask); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":3536
+ *         """
+ *         if mask:
+ *             self.mask = True             # <<<<<<<<<<<<<<
+ *         else:
+ *             self.mask = False
+ */
+    __Pyx_INCREF(Py_True);
+    __Pyx_GIVEREF(Py_True);
+    __Pyx_GOTREF(__pyx_v_self->mask);
+    __Pyx_DECREF(__pyx_v_self->mask);
+    __pyx_v_self->mask = Py_True;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":3538
+ *             self.mask = True
+ *         else:
+ *             self.mask = False             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+    __Pyx_INCREF(Py_False);
+    __Pyx_GIVEREF(Py_False);
+    __Pyx_GOTREF(__pyx_v_self->mask);
+    __Pyx_DECREF(__pyx_v_self->mask);
+    __pyx_v_self->mask = Py_False;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":3515
+ *             self.scale = False
+ * 
+ *     def set_auto_mask(self,mask):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_mask(self,mask)
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4.Variable.set_auto_mask", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3541
+ * 
+ * 
+ *     def _put(self,ndarray data,start,count,stride):             # <<<<<<<<<<<<<<
+ *         """Private method to put data into a netCDF variable"""
+ *         cdef int ierr, ndims
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_63_put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_62_put[] = "Private method to put data into a netCDF variable";
+static PyObject *__pyx_pw_7netCDF4_8Variable_63_put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyArrayObject *__pyx_v_data = 0;
+  PyObject *__pyx_v_start = 0;
+  PyObject *__pyx_v_count = 0;
+  PyObject *__pyx_v_stride = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_put (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_start,&__pyx_n_s_count,&__pyx_n_s_stride,0};
+    PyObject* values[4] = {0,0,0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3541; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_count)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3541; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  3:
+        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stride)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3541; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_put") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3541; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+    }
+    __pyx_v_data = ((PyArrayObject *)values[0]);
+    __pyx_v_start = values[1];
+    __pyx_v_count = values[2];
+    __pyx_v_stride = values[3];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3541; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.Variable._put", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_7netCDF4_ndarray, 1, "data", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_62_put(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), __pyx_v_data, __pyx_v_start, __pyx_v_count, __pyx_v_stride);
+
+  /* function exit code */
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_62_put(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyArrayObject *__pyx_v_data, PyObject *__pyx_v_start, PyObject *__pyx_v_count, PyObject *__pyx_v_stride) {
+  int __pyx_v_ierr;
+  int __pyx_v_ndims;
+  npy_intp __pyx_v_totelem;
+  size_t __pyx_v_startp[NC_MAX_DIMS];
+  size_t __pyx_v_countp[NC_MAX_DIMS];
+  ptrdiff_t __pyx_v_stridep[NC_MAX_DIMS];
+  char **__pyx_v_strdata;
+  void *__pyx_v_elptr;
+  char *__pyx_v_databuff;
+  PyArrayObject *__pyx_v_dataarr = 0;
+  nc_vlen_t *__pyx_v_vldata;
+  long __pyx_v_negstride;
+  PyObject *__pyx_v_sl = NULL;
+  PyObject *__pyx_v_n = NULL;
+  npy_intp __pyx_v_dataelem;
+  long __pyx_v_i;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  Py_ssize_t __pyx_t_2;
+  int __pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_t_6;
+  long __pyx_t_7;
+  size_t __pyx_t_8;
+  ptrdiff_t __pyx_t_9;
+  PyObject *__pyx_t_10 = NULL;
+  int __pyx_t_11;
+  int __pyx_t_12;
+  int __pyx_t_13;
+  char *__pyx_t_14;
+  PyObject *(*__pyx_t_15)(PyObject *);
+  npy_intp __pyx_t_16;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_put", 0);
+  __Pyx_INCREF((PyObject *)__pyx_v_data);
+
+  /* "netCDF4.pyx":3554
+ *         cdef nc_vlen_t *vldata
+ *         # rank of variable.
+ *         ndims = len(self.dimensions)             # <<<<<<<<<<<<<<
+ *         # make sure data is contiguous.
+ *         # if not, make a local copy.
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_ndims = __pyx_t_2;
+
+  /* "netCDF4.pyx":3557
+ *         # make sure data is contiguous.
+ *         # if not, make a local copy.
+ *         if not PyArray_ISCONTIGUOUS(data):             # <<<<<<<<<<<<<<
+ *             data = data.copy()
+ *         # fill up startp,countp,stridep.
+ */
+  __pyx_t_3 = ((!(PyArray_ISCONTIGUOUS(__pyx_v_data) != 0)) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":3558
+ *         # if not, make a local copy.
+ *         if not PyArray_ISCONTIGUOUS(data):
+ *             data = data.copy()             # <<<<<<<<<<<<<<
+ *         # fill up startp,countp,stridep.
+ *         totelem = 1
+ */
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (__pyx_t_5) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_1));
+    __pyx_t_1 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":3560
+ *             data = data.copy()
+ *         # fill up startp,countp,stridep.
+ *         totelem = 1             # <<<<<<<<<<<<<<
+ *         negstride = 0
+ *         sl = []
+ */
+  __pyx_v_totelem = 1;
+
+  /* "netCDF4.pyx":3561
+ *         # fill up startp,countp,stridep.
+ *         totelem = 1
+ *         negstride = 0             # <<<<<<<<<<<<<<
+ *         sl = []
+ *         for n from 0 <= n < ndims:
+ */
+  __pyx_v_negstride = 0;
+
+  /* "netCDF4.pyx":3562
+ *         totelem = 1
+ *         negstride = 0
+ *         sl = []             # <<<<<<<<<<<<<<
+ *         for n from 0 <= n < ndims:
+ *             count[n] = abs(count[n]) # make -1 into +1
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_sl = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":3563
+ *         negstride = 0
+ *         sl = []
+ *         for n from 0 <= n < ndims:             # <<<<<<<<<<<<<<
+ *             count[n] = abs(count[n]) # make -1 into +1
+ *             countp[n] = count[n]
+ */
+  __pyx_t_6 = __pyx_v_ndims;
+  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7++) {
+    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":3564
+ *         sl = []
+ *         for n from 0 <= n < ndims:
+ *             count[n] = abs(count[n]) # make -1 into +1             # <<<<<<<<<<<<<<
+ *             countp[n] = count[n]
+ *             # for neg strides, reverse order (then flip that axis after data read in)
+ */
+    __pyx_t_1 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3564; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (unlikely(PyObject_SetItem(__pyx_v_count, __pyx_v_n, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "netCDF4.pyx":3565
+ *         for n from 0 <= n < ndims:
+ *             count[n] = abs(count[n]) # make -1 into +1
+ *             countp[n] = count[n]             # <<<<<<<<<<<<<<
+ *             # for neg strides, reverse order (then flip that axis after data read in)
+ *             if stride[n] < 0:
+ */
+    __pyx_t_4 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3565; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    (__pyx_v_countp[__pyx_t_2]) = __pyx_t_8;
+
+    /* "netCDF4.pyx":3567
+ *             countp[n] = count[n]
+ *             # for neg strides, reverse order (then flip that axis after data read in)
+ *             if stride[n] < 0:             # <<<<<<<<<<<<<<
+ *                 negstride = 1
+ *                 stridep[n] = -stride[n]
+ */
+    __pyx_t_4 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3567; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":3568
+ *             # for neg strides, reverse order (then flip that axis after data read in)
+ *             if stride[n] < 0:
+ *                 negstride = 1             # <<<<<<<<<<<<<<
+ *                 stridep[n] = -stride[n]
+ *                 startp[n] = start[n]+stride[n]*(count[n]-1)
+ */
+      __pyx_v_negstride = 1;
+
+      /* "netCDF4.pyx":3569
+ *             if stride[n] < 0:
+ *                 negstride = 1
+ *                 stridep[n] = -stride[n]             # <<<<<<<<<<<<<<
+ *                 startp[n] = start[n]+stride[n]*(count[n]-1)
+ *                 stride[n] = -stride[n]
+ */
+      __pyx_t_1 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3569; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_4 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_9 = __Pyx_PyInt_As_ptrdiff_t(__pyx_t_4); if (unlikely((__pyx_t_9 == (ptrdiff_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      (__pyx_v_stridep[__pyx_t_2]) = __pyx_t_9;
+
+      /* "netCDF4.pyx":3570
+ *                 negstride = 1
+ *                 stridep[n] = -stride[n]
+ *                 startp[n] = start[n]+stride[n]*(count[n]-1)             # <<<<<<<<<<<<<<
+ *                 stride[n] = -stride[n]
+ *                 sl.append(slice(None, None, -1)) # this slice will reverse the data
+ */
+      __pyx_t_4 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3570; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_1 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3570; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_5 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3570; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_10 = PyNumber_Subtract(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = PyNumber_Multiply(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_10 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_10); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      (__pyx_v_startp[__pyx_t_2]) = __pyx_t_8;
+
+      /* "netCDF4.pyx":3571
+ *                 stridep[n] = -stride[n]
+ *                 startp[n] = start[n]+stride[n]*(count[n]-1)
+ *                 stride[n] = -stride[n]             # <<<<<<<<<<<<<<
+ *                 sl.append(slice(None, None, -1)) # this slice will reverse the data
+ *             else:
+ */
+      __pyx_t_10 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3571; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_5 = PyNumber_Negative(__pyx_t_10); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      if (unlikely(PyObject_SetItem(__pyx_v_stride, __pyx_v_n, __pyx_t_5) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+      /* "netCDF4.pyx":3572
+ *                 startp[n] = start[n]+stride[n]*(count[n]-1)
+ *                 stride[n] = -stride[n]
+ *                 sl.append(slice(None, None, -1)) # this slice will reverse the data             # <<<<<<<<<<<<<<
+ *             else:
+ *                 startp[n] = start[n]
+ */
+      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__86); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L6;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3574
+ *                 sl.append(slice(None, None, -1)) # this slice will reverse the data
+ *             else:
+ *                 startp[n] = start[n]             # <<<<<<<<<<<<<<
+ *                 stridep[n] = stride[n]
+ *                 sl.append(slice(None,None, 1))
+ */
+      __pyx_t_5 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3574; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      (__pyx_v_startp[__pyx_t_2]) = __pyx_t_8;
+
+      /* "netCDF4.pyx":3575
+ *             else:
+ *                 startp[n] = start[n]
+ *                 stridep[n] = stride[n]             # <<<<<<<<<<<<<<
+ *                 sl.append(slice(None,None, 1))
+ *             totelem = totelem*countp[n]
+ */
+      __pyx_t_5 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3575; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_9 = __Pyx_PyInt_As_ptrdiff_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (ptrdiff_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      (__pyx_v_stridep[__pyx_t_2]) = __pyx_t_9;
+
+      /* "netCDF4.pyx":3576
+ *                 startp[n] = start[n]
+ *                 stridep[n] = stride[n]
+ *                 sl.append(slice(None,None, 1))             # <<<<<<<<<<<<<<
+ *             totelem = totelem*countp[n]
+ *         # check to see that size of data array is what is expected
+ */
+      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__87); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __pyx_L6:;
+
+    /* "netCDF4.pyx":3577
+ *                 stridep[n] = stride[n]
+ *                 sl.append(slice(None,None, 1))
+ *             totelem = totelem*countp[n]             # <<<<<<<<<<<<<<
+ *         # check to see that size of data array is what is expected
+ *         # for slice given.
+ */
+    __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_totelem = (__pyx_v_totelem * (__pyx_v_countp[__pyx_t_2]));
+    __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_v_n); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":3563
+ *         negstride = 0
+ *         sl = []
+ *         for n from 0 <= n < ndims:             # <<<<<<<<<<<<<<
+ *             count[n] = abs(count[n]) # make -1 into +1
+ *             countp[n] = count[n]
+ */
+  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_5);
+  __pyx_t_5 = 0;
+
+  /* "netCDF4.pyx":3580
+ *         # check to see that size of data array is what is expected
+ *         # for slice given.
+ *         dataelem = PyArray_SIZE(data)             # <<<<<<<<<<<<<<
+ *         if totelem != dataelem:
+ *             raise IndexError('size of data array does not conform to slice')
+ */
+  __pyx_v_dataelem = PyArray_SIZE(__pyx_v_data);
+
+  /* "netCDF4.pyx":3581
+ *         # for slice given.
+ *         dataelem = PyArray_SIZE(data)
+ *         if totelem != dataelem:             # <<<<<<<<<<<<<<
+ *             raise IndexError('size of data array does not conform to slice')
+ *         if negstride:
+ */
+  __pyx_t_3 = ((__pyx_v_totelem != __pyx_v_dataelem) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":3582
+ *         dataelem = PyArray_SIZE(data)
+ *         if totelem != dataelem:
+ *             raise IndexError('size of data array does not conform to slice')             # <<<<<<<<<<<<<<
+ *         if negstride:
+ *             # reverse data along axes with negative strides.
+ */
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":3583
+ *         if totelem != dataelem:
+ *             raise IndexError('size of data array does not conform to slice')
+ *         if negstride:             # <<<<<<<<<<<<<<
+ *             # reverse data along axes with negative strides.
+ *             data = data[sl].copy() # make sure a copy is made.
+ */
+  __pyx_t_3 = (__pyx_v_negstride != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":3585
+ *         if negstride:
+ *             # reverse data along axes with negative strides.
+ *             data = data[sl].copy() # make sure a copy is made.             # <<<<<<<<<<<<<<
+ *         if self._isprimitive or self._iscompound:
+ *             # primitive or compound data type.
+ */
+    __pyx_t_10 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_sl); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3585; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_10 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_10)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_10);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (__pyx_t_10) {
+      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    } else {
+      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_5));
+    __pyx_t_5 = 0;
+    goto __pyx_L8;
+  }
+  __pyx_L8:;
+
+  /* "netCDF4.pyx":3586
+ *             # reverse data along axes with negative strides.
+ *             data = data[sl].copy() # make sure a copy is made.
+ *         if self._isprimitive or self._iscompound:             # <<<<<<<<<<<<<<
+ *             # primitive or compound data type.
+ *             # if data type of array doesn't match variable,
+ */
+  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_12) {
+  } else {
+    __pyx_t_3 = __pyx_t_12;
+    goto __pyx_L10_bool_binop_done;
+  }
+  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __pyx_t_12;
+  __pyx_L10_bool_binop_done:;
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":3590
+ *             # if data type of array doesn't match variable,
+ *             # try to cast the data.
+ *             if self.dtype != data.dtype:             # <<<<<<<<<<<<<<
+ *                 data = data.astype(self.dtype) # cast data, if necessary.
+ *             # make sure byte-order of data matches byte-order of netcdf
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->dtype, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":3591
+ *             # try to cast the data.
+ *             if self.dtype != data.dtype:
+ *                 data = data.astype(self.dtype) # cast data, if necessary.             # <<<<<<<<<<<<<<
+ *             # make sure byte-order of data matches byte-order of netcdf
+ *             # variable.
+ */
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_astype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_10 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
+        if (likely(__pyx_t_10)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+          __Pyx_INCREF(__pyx_t_10);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_5, function);
+        }
+      }
+      if (!__pyx_t_10) {
+        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_self->dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+      } else {
+        __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = NULL;
+        __Pyx_INCREF(__pyx_v_self->dtype);
+        PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_self->dtype);
+        __Pyx_GIVEREF(__pyx_v_self->dtype);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_4));
+      __pyx_t_4 = 0;
+      goto __pyx_L12;
+    }
+    __pyx_L12:;
+
+    /* "netCDF4.pyx":3594
+ *             # make sure byte-order of data matches byte-order of netcdf
+ *             # variable.
+ *             if self.endian() == 'native':             # <<<<<<<<<<<<<<
+ *                 if is_native_little and data.dtype.byteorder == '>':
+ *                     data.byteswap(True)
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_1 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
+      if (likely(__pyx_t_1)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_1);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_5, function);
+      }
+    }
+    if (__pyx_t_1) {
+      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    } else {
+      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_native, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":3595
+ *             # variable.
+ *             if self.endian() == 'native':
+ *                 if is_native_little and data.dtype.byteorder == '>':             # <<<<<<<<<<<<<<
+ *                     data.byteswap(True)
+ *                 if is_native_big and data.dtype.byteorder == '<':
+ */
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (__pyx_t_12) {
+      } else {
+        __pyx_t_3 = __pyx_t_12;
+        goto __pyx_L15_bool_binop_done;
+      }
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s__52, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_3 = __pyx_t_12;
+      __pyx_L15_bool_binop_done:;
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":3596
+ *             if self.endian() == 'native':
+ *                 if is_native_little and data.dtype.byteorder == '>':
+ *                     data.byteswap(True)             # <<<<<<<<<<<<<<
+ *                 if is_native_big and data.dtype.byteorder == '<':
+ *                     data.byteswap(True)
+ */
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        goto __pyx_L14;
+      }
+      __pyx_L14:;
+
+      /* "netCDF4.pyx":3597
+ *                 if is_native_little and data.dtype.byteorder == '>':
+ *                     data.byteswap(True)
+ *                 if is_native_big and data.dtype.byteorder == '<':             # <<<<<<<<<<<<<<
+ *                     data.byteswap(True)
+ *             if self.endian() == 'big':
+ */
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (__pyx_t_12) {
+      } else {
+        __pyx_t_3 = __pyx_t_12;
+        goto __pyx_L18_bool_binop_done;
+      }
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s__53, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_3 = __pyx_t_12;
+      __pyx_L18_bool_binop_done:;
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":3598
+ *                     data.byteswap(True)
+ *                 if is_native_big and data.dtype.byteorder == '<':
+ *                     data.byteswap(True)             # <<<<<<<<<<<<<<
+ *             if self.endian() == 'big':
+ *                 if is_native_big and data.dtype.byteorder not in ['=','|']:
+ */
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        goto __pyx_L17;
+      }
+      __pyx_L17:;
+      goto __pyx_L13;
+    }
+    __pyx_L13:;
+
+    /* "netCDF4.pyx":3599
+ *                 if is_native_big and data.dtype.byteorder == '<':
+ *                     data.byteswap(True)
+ *             if self.endian() == 'big':             # <<<<<<<<<<<<<<
+ *                 if is_native_big and data.dtype.byteorder not in ['=','|']:
+ *                     data.byteswap(True)
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_1 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
+      if (likely(__pyx_t_1)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_1);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_5, function);
+      }
+    }
+    if (__pyx_t_1) {
+      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    } else {
+      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_big, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":3600
+ *                     data.byteswap(True)
+ *             if self.endian() == 'big':
+ *                 if is_native_big and data.dtype.byteorder not in ['=','|']:             # <<<<<<<<<<<<<<
+ *                     data.byteswap(True)
+ *                 if is_native_little and data.dtype.byteorder == '=':
+ */
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (__pyx_t_12) {
+      } else {
+        __pyx_t_3 = __pyx_t_12;
+        goto __pyx_L22_bool_binop_done;
+      }
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s__51, Py_NE)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_13) {
+      } else {
+        __pyx_t_12 = __pyx_t_13;
+        goto __pyx_L24_bool_binop_done;
+      }
+      __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s__54, Py_NE)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_12 = __pyx_t_13;
+      __pyx_L24_bool_binop_done:;
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_13 = (__pyx_t_12 != 0);
+      __pyx_t_3 = __pyx_t_13;
+      __pyx_L22_bool_binop_done:;
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":3601
+ *             if self.endian() == 'big':
+ *                 if is_native_big and data.dtype.byteorder not in ['=','|']:
+ *                     data.byteswap(True)             # <<<<<<<<<<<<<<
+ *                 if is_native_little and data.dtype.byteorder == '=':
+ *                     data.byteswap(True)
+ */
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        goto __pyx_L21;
+      }
+      __pyx_L21:;
+
+      /* "netCDF4.pyx":3602
+ *                 if is_native_big and data.dtype.byteorder not in ['=','|']:
+ *                     data.byteswap(True)
+ *                 if is_native_little and data.dtype.byteorder == '=':             # <<<<<<<<<<<<<<
+ *                     data.byteswap(True)
+ *             if self.endian() == 'little':
+ */
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (__pyx_t_13) {
+      } else {
+        __pyx_t_3 = __pyx_t_13;
+        goto __pyx_L27_bool_binop_done;
+      }
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s__51, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_3 = __pyx_t_13;
+      __pyx_L27_bool_binop_done:;
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":3603
+ *                     data.byteswap(True)
+ *                 if is_native_little and data.dtype.byteorder == '=':
+ *                     data.byteswap(True)             # <<<<<<<<<<<<<<
+ *             if self.endian() == 'little':
+ *                 if is_native_little and data.dtype.byteorder not in ['=','|']:
+ */
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        goto __pyx_L26;
+      }
+      __pyx_L26:;
+      goto __pyx_L20;
+    }
+    __pyx_L20:;
+
+    /* "netCDF4.pyx":3604
+ *                 if is_native_little and data.dtype.byteorder == '=':
+ *                     data.byteswap(True)
+ *             if self.endian() == 'little':             # <<<<<<<<<<<<<<
+ *                 if is_native_little and data.dtype.byteorder not in ['=','|']:
+ *                     data.byteswap(True)
+ */
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_1 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
+      if (likely(__pyx_t_1)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_1);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_5, function);
+      }
+    }
+    if (__pyx_t_1) {
+      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    } else {
+      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_little, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":3605
+ *                     data.byteswap(True)
+ *             if self.endian() == 'little':
+ *                 if is_native_little and data.dtype.byteorder not in ['=','|']:             # <<<<<<<<<<<<<<
+ *                     data.byteswap(True)
+ *                 if is_native_big and data.dtype.byteorder == '=':
+ */
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (__pyx_t_13) {
+      } else {
+        __pyx_t_3 = __pyx_t_13;
+        goto __pyx_L31_bool_binop_done;
+      }
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s__51, Py_NE)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_12) {
+      } else {
+        __pyx_t_13 = __pyx_t_12;
+        goto __pyx_L33_bool_binop_done;
+      }
+      __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s__54, Py_NE)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_13 = __pyx_t_12;
+      __pyx_L33_bool_binop_done:;
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_12 = (__pyx_t_13 != 0);
+      __pyx_t_3 = __pyx_t_12;
+      __pyx_L31_bool_binop_done:;
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":3606
+ *             if self.endian() == 'little':
+ *                 if is_native_little and data.dtype.byteorder not in ['=','|']:
+ *                     data.byteswap(True)             # <<<<<<<<<<<<<<
+ *                 if is_native_big and data.dtype.byteorder == '=':
+ *                     data.byteswap(True)
+ */
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        goto __pyx_L30;
+      }
+      __pyx_L30:;
+
+      /* "netCDF4.pyx":3607
+ *                 if is_native_little and data.dtype.byteorder not in ['=','|']:
+ *                     data.byteswap(True)
+ *                 if is_native_big and data.dtype.byteorder == '=':             # <<<<<<<<<<<<<<
+ *                     data.byteswap(True)
+ *             # strides all 1 or scalar variable, use put_vara (faster)
+ */
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (__pyx_t_12) {
+      } else {
+        __pyx_t_3 = __pyx_t_12;
+        goto __pyx_L36_bool_binop_done;
+      }
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s__51, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_3 = __pyx_t_12;
+      __pyx_L36_bool_binop_done:;
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":3608
+ *                     data.byteswap(True)
+ *                 if is_native_big and data.dtype.byteorder == '=':
+ *                     data.byteswap(True)             # <<<<<<<<<<<<<<
+ *             # strides all 1 or scalar variable, use put_vara (faster)
+ *             if sum(stride) == ndims or ndims == 0:
+ */
+        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        goto __pyx_L35;
+      }
+      __pyx_L35:;
+      goto __pyx_L29;
+    }
+    __pyx_L29:;
+
+    /* "netCDF4.pyx":3610
+ *                     data.byteswap(True)
+ *             # strides all 1 or scalar variable, use put_vara (faster)
+ *             if sum(stride) == ndims or ndims == 0:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_put_vara(self._grpid, self._varid,
+ *                                    startp, countp, data.data)
+ */
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_v_stride);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_stride);
+    __Pyx_GIVEREF(__pyx_v_stride);
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (!__pyx_t_12) {
+    } else {
+      __pyx_t_3 = __pyx_t_12;
+      goto __pyx_L39_bool_binop_done;
+    }
+    __pyx_t_12 = ((__pyx_v_ndims == 0) != 0);
+    __pyx_t_3 = __pyx_t_12;
+    __pyx_L39_bool_binop_done:;
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":3611
+ *             # strides all 1 or scalar variable, use put_vara (faster)
+ *             if sum(stride) == ndims or ndims == 0:
+ *                 ierr = nc_put_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
+ *                                    startp, countp, data.data)
+ *             else:
+ */
+      __pyx_v_ierr = nc_put_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_data->data);
+      goto __pyx_L38;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3614
+ *                                    startp, countp, data.data)
+ *             else:
+ *                 ierr = nc_put_vars(self._grpid, self._varid,             # <<<<<<<<<<<<<<
+ *                                       startp, countp, stridep, data.data)
+ *             if ierr != NC_NOERR:
+ */
+      __pyx_v_ierr = nc_put_vars(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_stridep, __pyx_v_data->data);
+    }
+    __pyx_L38:;
+
+    /* "netCDF4.pyx":3616
+ *                 ierr = nc_put_vars(self._grpid, self._varid,
+ *                                       startp, countp, stridep, data.data)
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         elif self._isvlen:
+ */
+    __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":3617
+ *                                       startp, countp, stridep, data.data)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         elif self._isvlen:
+ *             if data.dtype.char !='O':
+ */
+      __pyx_t_14 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_14, 0, strlen(__pyx_t_14), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    goto __pyx_L9;
+  }
+
+  /* "netCDF4.pyx":3618
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         elif self._isvlen:             # <<<<<<<<<<<<<<
+ *             if data.dtype.char !='O':
+ *                 raise TypeError('data to put in string variable must be an object array containing Python strings')
+ */
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":3619
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         elif self._isvlen:
+ *             if data.dtype.char !='O':             # <<<<<<<<<<<<<<
+ *                 raise TypeError('data to put in string variable must be an object array containing Python strings')
+ *             # flatten data array.
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_char); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":3620
+ *         elif self._isvlen:
+ *             if data.dtype.char !='O':
+ *                 raise TypeError('data to put in string variable must be an object array containing Python strings')             # <<<<<<<<<<<<<<
+ *             # flatten data array.
+ *             data = data.flatten()
+ */
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":3622
+ *                 raise TypeError('data to put in string variable must be an object array containing Python strings')
+ *             # flatten data array.
+ *             data = data.flatten()             # <<<<<<<<<<<<<<
+ *             if self.dtype == str:
+ *                 # convert all elements from strings to bytes
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_flatten); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_1, function);
+      }
+    }
+    if (__pyx_t_5) {
+      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    } else {
+      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_4));
+    __pyx_t_4 = 0;
+
+    /* "netCDF4.pyx":3623
+ *             # flatten data array.
+ *             data = data.flatten()
+ *             if self.dtype == str:             # <<<<<<<<<<<<<<
+ *                 # convert all elements from strings to bytes
+ *                 for n in range(data.shape[0]):
+ */
+    __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":3625
+ *             if self.dtype == str:
+ *                 # convert all elements from strings to bytes
+ *                 for n in range(data.shape[0]):             # <<<<<<<<<<<<<<
+ *                     data[n] = _strencode(data[n])
+ *                 # vlen string (NC_STRING)
+ */
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3625; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+        __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = 0;
+        __pyx_t_15 = NULL;
+      } else {
+        __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_15 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      for (;;) {
+        if (likely(!__pyx_t_15)) {
+          if (likely(PyList_CheckExact(__pyx_t_4))) {
+            if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_4)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          } else {
+            if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+            #if CYTHON_COMPILING_IN_CPYTHON
+            __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #else
+            __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
+          }
+        } else {
+          __pyx_t_1 = __pyx_t_15(__pyx_t_4);
+          if (unlikely(!__pyx_t_1)) {
+            PyObject* exc_type = PyErr_Occurred();
+            if (exc_type) {
+              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            break;
+          }
+          __Pyx_GOTREF(__pyx_t_1);
+        }
+        __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_1);
+        __pyx_t_1 = 0;
+
+        /* "netCDF4.pyx":3626
+ *                 # convert all elements from strings to bytes
+ *                 for n in range(data.shape[0]):
+ *                     data[n] = _strencode(data[n])             # <<<<<<<<<<<<<<
+ *                 # vlen string (NC_STRING)
+ *                 # loop over elements of object array, put data buffer for
+ */
+        __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_n); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3626; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_5 = __pyx_f_7netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_data), __pyx_v_n, __pyx_t_5) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+        /* "netCDF4.pyx":3625
+ *             if self.dtype == str:
+ *                 # convert all elements from strings to bytes
+ *                 for n in range(data.shape[0]):             # <<<<<<<<<<<<<<
+ *                     data[n] = _strencode(data[n])
+ *                 # vlen string (NC_STRING)
+ */
+      }
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+      /* "netCDF4.pyx":3631
+ *                 # each element in struct.
+ *                 # allocate struct array to hold vlen data.
+ *                 strdata = <char **>malloc(sizeof(char *)*totelem)             # <<<<<<<<<<<<<<
+ *                 for i from 0<=i<totelem:
+ *                     strdata[i] = data[i]
+ */
+      __pyx_v_strdata = ((char **)malloc(((sizeof(char *)) * __pyx_v_totelem)));
+
+      /* "netCDF4.pyx":3632
+ *                 # allocate struct array to hold vlen data.
+ *                 strdata = <char **>malloc(sizeof(char *)*totelem)
+ *                 for i from 0<=i<totelem:             # <<<<<<<<<<<<<<
+ *                     strdata[i] = data[i]
+ *                 # strides all 1 or scalar variable, use put_vara (faster)
+ */
+      __pyx_t_16 = __pyx_v_totelem;
+      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_16; __pyx_v_i++) {
+
+        /* "netCDF4.pyx":3633
+ *                 strdata = <char **>malloc(sizeof(char *)*totelem)
+ *                 for i from 0<=i<totelem:
+ *                     strdata[i] = data[i]             # <<<<<<<<<<<<<<
+ *                 # strides all 1 or scalar variable, use put_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:
+ */
+        __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_data), __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3633; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_14 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        (__pyx_v_strdata[__pyx_v_i]) = __pyx_t_14;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      }
+
+      /* "netCDF4.pyx":3635
+ *                     strdata[i] = data[i]
+ *                 # strides all 1 or scalar variable, use put_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:             # <<<<<<<<<<<<<<
+ *                     ierr = nc_put_vara(self._grpid, self._varid,
+ *                                        startp, countp, strdata)
+ */
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_v_stride);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_stride);
+      __Pyx_GIVEREF(__pyx_v_stride);
+      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      if (!__pyx_t_12) {
+      } else {
+        __pyx_t_3 = __pyx_t_12;
+        goto __pyx_L49_bool_binop_done;
+      }
+      __pyx_t_12 = ((__pyx_v_ndims == 0) != 0);
+      __pyx_t_3 = __pyx_t_12;
+      __pyx_L49_bool_binop_done:;
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":3636
+ *                 # strides all 1 or scalar variable, use put_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:
+ *                     ierr = nc_put_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
+ *                                        startp, countp, strdata)
+ *                 else:
+ */
+        __pyx_v_ierr = nc_put_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_strdata);
+        goto __pyx_L48;
+      }
+      /*else*/ {
+
+        /* "netCDF4.pyx":3639
+ *                                        startp, countp, strdata)
+ *                 else:
+ *                     raise IndexError('strides must all be 1 for string variables')             # <<<<<<<<<<<<<<
+ *                     #ierr = nc_put_vars(self._grpid, self._varid,
+ *                     #                   startp, countp, stridep, strdata)
+ */
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __pyx_L48:;
+
+      /* "netCDF4.pyx":3642
+ *                     #ierr = nc_put_vars(self._grpid, self._varid,
+ *                     #                   startp, countp, stridep, strdata)
+ *                 if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 free(strdata)
+ */
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":3643
+ *                     #                   startp, countp, stridep, strdata)
+ *                 if ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *                 free(strdata)
+ *             else:
+ */
+        __pyx_t_14 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_14, 0, strlen(__pyx_t_14), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_1);
+        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":3644
+ *                 if ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 free(strdata)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 # regular vlen.
+ */
+      free(__pyx_v_strdata);
+      goto __pyx_L43;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3649
+ *                 # loop over elements of object array, put data buffer for
+ *                 # each element in struct.
+ *                 databuff = data.data             # <<<<<<<<<<<<<<
+ *                 # allocate struct array to hold vlen data.
+ *                 vldata = <nc_vlen_t *>malloc(<size_t>totelem*sizeof(nc_vlen_t))
+ */
+      __pyx_t_14 = __pyx_v_data->data;
+      __pyx_v_databuff = __pyx_t_14;
+
+      /* "netCDF4.pyx":3651
+ *                 databuff = data.data
+ *                 # allocate struct array to hold vlen data.
+ *                 vldata = <nc_vlen_t *>malloc(<size_t>totelem*sizeof(nc_vlen_t))             # <<<<<<<<<<<<<<
+ *                 for i from 0<=i<totelem:
+ *                     elptr = (<void**>databuff)[0]
+ */
+      __pyx_v_vldata = ((nc_vlen_t *)malloc((((size_t)__pyx_v_totelem) * (sizeof(nc_vlen_t)))));
+
+      /* "netCDF4.pyx":3652
+ *                 # allocate struct array to hold vlen data.
+ *                 vldata = <nc_vlen_t *>malloc(<size_t>totelem*sizeof(nc_vlen_t))
+ *                 for i from 0<=i<totelem:             # <<<<<<<<<<<<<<
+ *                     elptr = (<void**>databuff)[0]
+ *                     dataarr = <ndarray>elptr
+ */
+      __pyx_t_16 = __pyx_v_totelem;
+      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_16; __pyx_v_i++) {
+
+        /* "netCDF4.pyx":3653
+ *                 vldata = <nc_vlen_t *>malloc(<size_t>totelem*sizeof(nc_vlen_t))
+ *                 for i from 0<=i<totelem:
+ *                     elptr = (<void**>databuff)[0]             # <<<<<<<<<<<<<<
+ *                     dataarr = <ndarray>elptr
+ *                     if self.dtype != dataarr.dtype.str[1:]:
+ */
+        __pyx_v_elptr = (((void **)__pyx_v_databuff)[0]);
+
+        /* "netCDF4.pyx":3654
+ *                 for i from 0<=i<totelem:
+ *                     elptr = (<void**>databuff)[0]
+ *                     dataarr = <ndarray>elptr             # <<<<<<<<<<<<<<
+ *                     if self.dtype != dataarr.dtype.str[1:]:
+ *                         #dataarr = dataarr.astype(self.dtype) # cast data, if necessary.
+ */
+        __pyx_t_1 = ((PyObject *)__pyx_v_elptr);
+        __Pyx_INCREF(__pyx_t_1);
+        __Pyx_XDECREF_SET(__pyx_v_dataarr, ((PyArrayObject *)__pyx_t_1));
+        __pyx_t_1 = 0;
+
+        /* "netCDF4.pyx":3655
+ *                     elptr = (<void**>databuff)[0]
+ *                     dataarr = <ndarray>elptr
+ *                     if self.dtype != dataarr.dtype.str[1:]:             # <<<<<<<<<<<<<<
+ *                         #dataarr = dataarr.astype(self.dtype) # cast data, if necessary.
+ *                         # casting doesn't work ?? just raise TypeError
+ */
+        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dataarr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__97, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->dtype, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        if (__pyx_t_3) {
+
+          /* "netCDF4.pyx":3658
+ *                         #dataarr = dataarr.astype(self.dtype) # cast data, if necessary.
+ *                         # casting doesn't work ?? just raise TypeError
+ *                         raise TypeError("wrong data type in object array: should be %s, got %s" % (self.dtype,dataarr.dtype))             # <<<<<<<<<<<<<<
+ *                     vldata[i].len = PyArray_SIZE(dataarr)
+ *                     vldata[i].p = dataarr.data
+ */
+          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dataarr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_1);
+          __Pyx_INCREF(__pyx_v_self->dtype);
+          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->dtype);
+          __Pyx_GIVEREF(__pyx_v_self->dtype);
+          PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
+          __Pyx_GIVEREF(__pyx_t_4);
+          __pyx_t_4 = 0;
+          __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_wrong_data_type_in_object_array, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_1);
+          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
+          __Pyx_GIVEREF(__pyx_t_4);
+          __pyx_t_4 = 0;
+          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+
+        /* "netCDF4.pyx":3659
+ *                         # casting doesn't work ?? just raise TypeError
+ *                         raise TypeError("wrong data type in object array: should be %s, got %s" % (self.dtype,dataarr.dtype))
+ *                     vldata[i].len = PyArray_SIZE(dataarr)             # <<<<<<<<<<<<<<
+ *                     vldata[i].p = dataarr.data
+ *                     databuff = databuff + data.strides[0]
+ */
+        (__pyx_v_vldata[__pyx_v_i]).len = PyArray_SIZE(__pyx_v_dataarr);
+
+        /* "netCDF4.pyx":3660
+ *                         raise TypeError("wrong data type in object array: should be %s, got %s" % (self.dtype,dataarr.dtype))
+ *                     vldata[i].len = PyArray_SIZE(dataarr)
+ *                     vldata[i].p = dataarr.data             # <<<<<<<<<<<<<<
+ *                     databuff = databuff + data.strides[0]
+ *                 # strides all 1 or scalar variable, use put_vara (faster)
+ */
+        __pyx_t_14 = __pyx_v_dataarr->data;
+        (__pyx_v_vldata[__pyx_v_i]).p = __pyx_t_14;
+
+        /* "netCDF4.pyx":3661
+ *                     vldata[i].len = PyArray_SIZE(dataarr)
+ *                     vldata[i].p = dataarr.data
+ *                     databuff = databuff + data.strides[0]             # <<<<<<<<<<<<<<
+ *                 # strides all 1 or scalar variable, use put_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:
+ */
+        __pyx_v_databuff = (__pyx_v_databuff + (__pyx_v_data->strides[0]));
+      }
+
+      /* "netCDF4.pyx":3663
+ *                     databuff = databuff + data.strides[0]
+ *                 # strides all 1 or scalar variable, use put_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:             # <<<<<<<<<<<<<<
+ *                     ierr = nc_put_vara(self._grpid, self._varid,
+ *                                        startp, countp, vldata)
+ */
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_v_stride);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_stride);
+      __Pyx_GIVEREF(__pyx_v_stride);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (!__pyx_t_12) {
+      } else {
+        __pyx_t_3 = __pyx_t_12;
+        goto __pyx_L56_bool_binop_done;
+      }
+      __pyx_t_12 = ((__pyx_v_ndims == 0) != 0);
+      __pyx_t_3 = __pyx_t_12;
+      __pyx_L56_bool_binop_done:;
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":3664
+ *                 # strides all 1 or scalar variable, use put_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:
+ *                     ierr = nc_put_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
+ *                                        startp, countp, vldata)
+ *                 else:
+ */
+        __pyx_v_ierr = nc_put_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_vldata);
+        goto __pyx_L55;
+      }
+      /*else*/ {
+
+        /* "netCDF4.pyx":3667
+ *                                        startp, countp, vldata)
+ *                 else:
+ *                     raise IndexError('strides must all be 1 for vlen variables')             # <<<<<<<<<<<<<<
+ *                     #ierr = nc_put_vars(self._grpid, self._varid,
+ *                     #                   startp, countp, stridep, vldata)
+ */
+        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __pyx_L55:;
+
+      /* "netCDF4.pyx":3670
+ *                     #ierr = nc_put_vars(self._grpid, self._varid,
+ *                     #                   startp, countp, stridep, vldata)
+ *                 if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 # free the pointer array.
+ */
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
+
+        /* "netCDF4.pyx":3671
+ *                     #                   startp, countp, stridep, vldata)
+ *                 if ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *                 # free the pointer array.
+ *                 free(vldata)
+ */
+        __pyx_t_14 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_14, 0, strlen(__pyx_t_14), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_5);
+        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
+        __Pyx_GIVEREF(__pyx_t_5);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":3673
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 # free the pointer array.
+ *                 free(vldata)             # <<<<<<<<<<<<<<
+ * 
+ *     def _get(self,start,count,stride):
+ */
+      free(__pyx_v_vldata);
+    }
+    __pyx_L43:;
+    goto __pyx_L9;
+  }
+  __pyx_L9:;
+
+  /* "netCDF4.pyx":3541
+ * 
+ * 
+ *     def _put(self,ndarray data,start,count,stride):             # <<<<<<<<<<<<<<
+ *         """Private method to put data into a netCDF variable"""
+ *         cdef int ierr, ndims
+ */
+
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4.Variable._put", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF((PyObject *)__pyx_v_dataarr);
+  __Pyx_XDECREF(__pyx_v_sl);
+  __Pyx_XDECREF(__pyx_v_n);
+  __Pyx_XDECREF((PyObject *)__pyx_v_data);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3675
+ *                 free(vldata)
+ * 
+ *     def _get(self,start,count,stride):             # <<<<<<<<<<<<<<
+ *         """Private method to retrieve data from a netCDF variable"""
+ *         cdef int ierr, ndims
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_65_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8Variable_64_get[] = "Private method to retrieve data from a netCDF variable";
+static PyObject *__pyx_pw_7netCDF4_8Variable_65_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_start = 0;
+  PyObject *__pyx_v_count = 0;
+  PyObject *__pyx_v_stride = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_get (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_count,&__pyx_n_s_stride,0};
+    PyObject* values[3] = {0,0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_count)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3675; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stride)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3675; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3675; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+    }
+    __pyx_v_start = values[0];
+    __pyx_v_count = values[1];
+    __pyx_v_stride = values[2];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3675; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4.Variable._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_64_get(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), __pyx_v_start, __pyx_v_count, __pyx_v_stride);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_64_get(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_count, PyObject *__pyx_v_stride) {
+  int __pyx_v_ierr;
+  int __pyx_v_ndims;
+  size_t __pyx_v_startp[NC_MAX_DIMS];
+  size_t __pyx_v_countp[NC_MAX_DIMS];
+  ptrdiff_t __pyx_v_stridep[NC_MAX_DIMS];
+  PyArrayObject *__pyx_v_data = 0;
+  PyArrayObject *__pyx_v_dataarr = 0;
+  char **__pyx_v_strdata;
+  nc_vlen_t *__pyx_v_vldata;
+  PyObject *__pyx_v_shapeout = NULL;
+  int __pyx_v_squeeze_out;
+  PyObject *__pyx_v_lendim = NULL;
+  long __pyx_v_negstride;
+  PyObject *__pyx_v_sl = NULL;
+  long __pyx_v_n;
+  PyObject *__pyx_v_totelem = NULL;
+  long __pyx_v_i;
+  size_t __pyx_v_arrlen;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  Py_ssize_t __pyx_t_2;
+  PyObject *(*__pyx_t_3)(PyObject *);
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_t_7;
+  size_t __pyx_t_8;
+  ptrdiff_t __pyx_t_9;
+  PyObject *__pyx_t_10 = NULL;
+  int __pyx_t_11;
+  int __pyx_t_12;
+  char *__pyx_t_13;
+  long __pyx_t_14;
+  PyObject *__pyx_t_15 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_get", 0);
+
+  /* "netCDF4.pyx":3688
+ *         # and not a slice so the resulting array
+ *         # should be 'squeezed' to remove the singleton dimension.
+ *         shapeout = ()             # <<<<<<<<<<<<<<
+ *         squeeze_out = False
+ *         for lendim in count:
+ */
+  __Pyx_INCREF(__pyx_empty_tuple);
+  __pyx_v_shapeout = __pyx_empty_tuple;
+
+  /* "netCDF4.pyx":3689
+ *         # should be 'squeezed' to remove the singleton dimension.
+ *         shapeout = ()
+ *         squeeze_out = False             # <<<<<<<<<<<<<<
+ *         for lendim in count:
+ *             if lendim == -1:
+ */
+  __pyx_v_squeeze_out = 0;
+
+  /* "netCDF4.pyx":3690
+ *         shapeout = ()
+ *         squeeze_out = False
+ *         for lendim in count:             # <<<<<<<<<<<<<<
+ *             if lendim == -1:
+ *                 shapeout = shapeout + (1,)
+ */
+  if (likely(PyList_CheckExact(__pyx_v_count)) || PyTuple_CheckExact(__pyx_v_count)) {
+    __pyx_t_1 = __pyx_v_count; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+    __pyx_t_3 = NULL;
+  } else {
+    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  for (;;) {
+    if (likely(!__pyx_t_3)) {
+      if (likely(PyList_CheckExact(__pyx_t_1))) {
+        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
+      if (unlikely(!__pyx_t_4)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_4);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_lendim, __pyx_t_4);
+    __pyx_t_4 = 0;
+
+    /* "netCDF4.pyx":3691
+ *         squeeze_out = False
+ *         for lendim in count:
+ *             if lendim == -1:             # <<<<<<<<<<<<<<
+ *                 shapeout = shapeout + (1,)
+ *                 squeeze_out = True
+ */
+    __pyx_t_4 = PyObject_RichCompare(__pyx_v_lendim, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_5) {
+
+      /* "netCDF4.pyx":3692
+ *         for lendim in count:
+ *             if lendim == -1:
+ *                 shapeout = shapeout + (1,)             # <<<<<<<<<<<<<<
+ *                 squeeze_out = True
+ *             else:
+ */
+      __pyx_t_4 = PyNumber_Add(__pyx_v_shapeout, __pyx_tuple__99); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF_SET(__pyx_v_shapeout, __pyx_t_4);
+      __pyx_t_4 = 0;
+
+      /* "netCDF4.pyx":3693
+ *             if lendim == -1:
+ *                 shapeout = shapeout + (1,)
+ *                 squeeze_out = True             # <<<<<<<<<<<<<<
+ *             else:
+ *                 shapeout = shapeout + (lendim,)
+ */
+      __pyx_v_squeeze_out = 1;
+      goto __pyx_L5;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3695
+ *                 squeeze_out = True
+ *             else:
+ *                 shapeout = shapeout + (lendim,)             # <<<<<<<<<<<<<<
+ *         # rank of variable.
+ *         ndims = len(self.dimensions)
+ */
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_v_lendim);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_lendim);
+      __Pyx_GIVEREF(__pyx_v_lendim);
+      __pyx_t_6 = PyNumber_Add(__pyx_v_shapeout, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF_SET(__pyx_v_shapeout, __pyx_t_6);
+      __pyx_t_6 = 0;
+    }
+    __pyx_L5:;
+
+    /* "netCDF4.pyx":3690
+ *         shapeout = ()
+ *         squeeze_out = False
+ *         for lendim in count:             # <<<<<<<<<<<<<<
+ *             if lendim == -1:
+ *                 shapeout = shapeout + (1,)
+ */
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":3697
+ *                 shapeout = shapeout + (lendim,)
+ *         # rank of variable.
+ *         ndims = len(self.dimensions)             # <<<<<<<<<<<<<<
+ *         # fill up startp,countp,stridep.
+ *         negstride = 0
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_ndims = __pyx_t_2;
+
+  /* "netCDF4.pyx":3699
+ *         ndims = len(self.dimensions)
+ *         # fill up startp,countp,stridep.
+ *         negstride = 0             # <<<<<<<<<<<<<<
+ *         sl = []
+ *         for n from 0 <= n < ndims:
+ */
+  __pyx_v_negstride = 0;
+
+  /* "netCDF4.pyx":3700
+ *         # fill up startp,countp,stridep.
+ *         negstride = 0
+ *         sl = []             # <<<<<<<<<<<<<<
+ *         for n from 0 <= n < ndims:
+ *             count[n] = abs(count[n]) # make -1 into +1
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_sl = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":3701
+ *         negstride = 0
+ *         sl = []
+ *         for n from 0 <= n < ndims:             # <<<<<<<<<<<<<<
+ *             count[n] = abs(count[n]) # make -1 into +1
+ *             countp[n] = count[n]
+ */
+  __pyx_t_7 = __pyx_v_ndims;
+  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_7; __pyx_v_n++) {
+
+    /* "netCDF4.pyx":3702
+ *         sl = []
+ *         for n from 0 <= n < ndims:
+ *             count[n] = abs(count[n]) # make -1 into +1             # <<<<<<<<<<<<<<
+ *             countp[n] = count[n]
+ *             # for neg strides, reverse order (then flip that axis after data read in)
+ */
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_count, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3702; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_6 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (unlikely(__Pyx_SetItemInt(__pyx_v_count, __pyx_v_n, __pyx_t_6, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+    /* "netCDF4.pyx":3703
+ *         for n from 0 <= n < ndims:
+ *             count[n] = abs(count[n]) # make -1 into +1
+ *             countp[n] = count[n]             # <<<<<<<<<<<<<<
+ *             # for neg strides, reverse order (then flip that axis after data read in)
+ *             if stride[n] < 0:
+ */
+    __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_count, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3703; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    (__pyx_v_countp[__pyx_v_n]) = __pyx_t_8;
+
+    /* "netCDF4.pyx":3705
+ *             countp[n] = count[n]
+ *             # for neg strides, reverse order (then flip that axis after data read in)
+ *             if stride[n] < 0:             # <<<<<<<<<<<<<<
+ *                 negstride = 1
+ *                 stridep[n] = -stride[n]
+ */
+    __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_stride, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3705; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_5) {
+
+      /* "netCDF4.pyx":3706
+ *             # for neg strides, reverse order (then flip that axis after data read in)
+ *             if stride[n] < 0:
+ *                 negstride = 1             # <<<<<<<<<<<<<<
+ *                 stridep[n] = -stride[n]
+ *                 startp[n] = start[n]+stride[n]*(count[n]-1)
+ */
+      __pyx_v_negstride = 1;
+
+      /* "netCDF4.pyx":3707
+ *             if stride[n] < 0:
+ *                 negstride = 1
+ *                 stridep[n] = -stride[n]             # <<<<<<<<<<<<<<
+ *                 startp[n] = start[n]+stride[n]*(count[n]-1)
+ *                 stride[n] = -stride[n]
+ */
+      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_stride, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3707; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_6 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_9 = __Pyx_PyInt_As_ptrdiff_t(__pyx_t_6); if (unlikely((__pyx_t_9 == (ptrdiff_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      (__pyx_v_stridep[__pyx_v_n]) = __pyx_t_9;
+
+      /* "netCDF4.pyx":3708
+ *                 negstride = 1
+ *                 stridep[n] = -stride[n]
+ *                 startp[n] = start[n]+stride[n]*(count[n]-1)             # <<<<<<<<<<<<<<
+ *                 stride[n] = -stride[n]
+ *                 sl.append(slice(None, None, -1)) # this slice will reverse the data
+ */
+      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_start, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3708; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_stride, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3708; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_count, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3708; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_10 = PyNumber_Subtract(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_10 = PyNumber_Add(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_10); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      (__pyx_v_startp[__pyx_v_n]) = __pyx_t_8;
+
+      /* "netCDF4.pyx":3709
+ *                 stridep[n] = -stride[n]
+ *                 startp[n] = start[n]+stride[n]*(count[n]-1)
+ *                 stride[n] = -stride[n]             # <<<<<<<<<<<<<<
+ *                 sl.append(slice(None, None, -1)) # this slice will reverse the data
+ *             else:
+ */
+      __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_stride, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3709; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_4 = PyNumber_Negative(__pyx_t_10); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      if (unlikely(__Pyx_SetItemInt(__pyx_v_stride, __pyx_v_n, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+      /* "netCDF4.pyx":3710
+ *                 startp[n] = start[n]+stride[n]*(count[n]-1)
+ *                 stride[n] = -stride[n]
+ *                 sl.append(slice(None, None, -1)) # this slice will reverse the data             # <<<<<<<<<<<<<<
+ *             else:
+ *                 startp[n] = start[n]
+ */
+      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__100); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L8;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3712
+ *                 sl.append(slice(None, None, -1)) # this slice will reverse the data
+ *             else:
+ *                 startp[n] = start[n]             # <<<<<<<<<<<<<<
+ *                 stridep[n] = stride[n]
+ *                 sl.append(slice(None,None, 1))
+ */
+      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_start, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3712; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      (__pyx_v_startp[__pyx_v_n]) = __pyx_t_8;
+
+      /* "netCDF4.pyx":3713
+ *             else:
+ *                 startp[n] = start[n]
+ *                 stridep[n] = stride[n]             # <<<<<<<<<<<<<<
+ *                 sl.append(slice(None,None, 1))
+ *         if self._isprimitive or self._iscompound:
+ */
+      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_stride, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3713; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_9 = __Pyx_PyInt_As_ptrdiff_t(__pyx_t_4); if (unlikely((__pyx_t_9 == (ptrdiff_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      (__pyx_v_stridep[__pyx_v_n]) = __pyx_t_9;
+
+      /* "netCDF4.pyx":3714
+ *                 startp[n] = start[n]
+ *                 stridep[n] = stride[n]
+ *                 sl.append(slice(None,None, 1))             # <<<<<<<<<<<<<<
+ *         if self._isprimitive or self._iscompound:
+ *             data = numpy.empty(shapeout, self.dtype)
+ */
+      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__101); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __pyx_L8:;
+  }
+
+  /* "netCDF4.pyx":3715
+ *                 stridep[n] = stride[n]
+ *                 sl.append(slice(None,None, 1))
+ *         if self._isprimitive or self._iscompound:             # <<<<<<<<<<<<<<
+ *             data = numpy.empty(shapeout, self.dtype)
+ *             # strides all 1 or scalar variable, use get_vara (faster)
+ */
+  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_12) {
+  } else {
+    __pyx_t_5 = __pyx_t_12;
+    goto __pyx_L10_bool_binop_done;
+  }
+  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __pyx_t_12;
+  __pyx_L10_bool_binop_done:;
+  if (__pyx_t_5) {
+
+    /* "netCDF4.pyx":3716
+ *                 sl.append(slice(None,None, 1))
+ *         if self._isprimitive or self._iscompound:
+ *             data = numpy.empty(shapeout, self.dtype)             # <<<<<<<<<<<<<<
+ *             # strides all 1 or scalar variable, use get_vara (faster)
+ *             if sum(stride) == ndims or ndims == 0:
+ */
+    __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_10 = NULL;
+    __pyx_t_2 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
+      if (likely(__pyx_t_10)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_10);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_6, function);
+        __pyx_t_2 = 1;
+      }
+    }
+    __pyx_t_1 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (__pyx_t_10) {
+      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_shapeout);
+    PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_2, __pyx_v_shapeout);
+    __Pyx_GIVEREF(__pyx_v_shapeout);
+    __Pyx_INCREF(__pyx_v_self->dtype);
+    PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_2, __pyx_v_self->dtype);
+    __Pyx_GIVEREF(__pyx_v_self->dtype);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_data = ((PyArrayObject *)__pyx_t_4);
+    __pyx_t_4 = 0;
+
+    /* "netCDF4.pyx":3718
+ *             data = numpy.empty(shapeout, self.dtype)
+ *             # strides all 1 or scalar variable, use get_vara (faster)
+ *             if sum(stride) == ndims or ndims == 0:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_get_vara(self._grpid, self._varid,
+ *                                    startp, countp, data.data)
+ */
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_v_stride);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_stride);
+    __Pyx_GIVEREF(__pyx_v_stride);
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (!__pyx_t_12) {
+    } else {
+      __pyx_t_5 = __pyx_t_12;
+      goto __pyx_L13_bool_binop_done;
+    }
+    __pyx_t_12 = ((__pyx_v_ndims == 0) != 0);
+    __pyx_t_5 = __pyx_t_12;
+    __pyx_L13_bool_binop_done:;
+    if (__pyx_t_5) {
+
+      /* "netCDF4.pyx":3719
+ *             # strides all 1 or scalar variable, use get_vara (faster)
+ *             if sum(stride) == ndims or ndims == 0:
+ *                 ierr = nc_get_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
+ *                                    startp, countp, data.data)
+ *             else:
+ */
+      __pyx_v_ierr = nc_get_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_data->data);
+      goto __pyx_L12;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3722
+ *                                    startp, countp, data.data)
+ *             else:
+ *                 ierr = nc_get_vars(self._grpid, self._varid,             # <<<<<<<<<<<<<<
+ *                                    startp, countp, stridep, data.data)
+ *             if ierr == NC_EINVALCOORDS:
+ */
+      __pyx_v_ierr = nc_get_vars(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_stridep, __pyx_v_data->data);
+    }
+    __pyx_L12:;
+
+    /* "netCDF4.pyx":3724
+ *                 ierr = nc_get_vars(self._grpid, self._varid,
+ *                                    startp, countp, stridep, data.data)
+ *             if ierr == NC_EINVALCOORDS:             # <<<<<<<<<<<<<<
+ *                 raise IndexError
+ *             elif ierr != NC_NOERR:
+ */
+    __pyx_t_5 = ((__pyx_v_ierr == NC_EINVALCOORDS) != 0);
+    if (__pyx_t_5) {
+
+      /* "netCDF4.pyx":3725
+ *                                    startp, countp, stridep, data.data)
+ *             if ierr == NC_EINVALCOORDS:
+ *                 raise IndexError             # <<<<<<<<<<<<<<
+ *             elif ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+      __Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":3726
+ *             if ierr == NC_EINVALCOORDS:
+ *                 raise IndexError
+ *             elif ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         elif self._isvlen:
+ */
+    __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_5) {
+
+      /* "netCDF4.pyx":3727
+ *                 raise IndexError
+ *             elif ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         elif self._isvlen:
+ *             # allocate array of correct primitive type.
+ */
+      __pyx_t_13 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    goto __pyx_L9;
+  }
+
+  /* "netCDF4.pyx":3728
+ *             elif ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         elif self._isvlen:             # <<<<<<<<<<<<<<
+ *             # allocate array of correct primitive type.
+ *             data = numpy.empty(shapeout, 'O')
+ */
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_5) {
+
+    /* "netCDF4.pyx":3730
+ *         elif self._isvlen:
+ *             # allocate array of correct primitive type.
+ *             data = numpy.empty(shapeout, 'O')             # <<<<<<<<<<<<<<
+ *             # flatten data array.
+ *             data = data.flatten()
+ */
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = NULL;
+    __pyx_t_2 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_6, function);
+        __pyx_t_2 = 1;
+      }
+    }
+    __pyx_t_10 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    if (__pyx_t_4) {
+      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_shapeout);
+    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_2, __pyx_v_shapeout);
+    __Pyx_GIVEREF(__pyx_v_shapeout);
+    __Pyx_INCREF(__pyx_n_s_O);
+    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_2, __pyx_n_s_O);
+    __Pyx_GIVEREF(__pyx_n_s_O);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_data = ((PyArrayObject *)__pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":3732
+ *             data = numpy.empty(shapeout, 'O')
+ *             # flatten data array.
+ *             data = data.flatten()             # <<<<<<<<<<<<<<
+ *             totelem = PyArray_SIZE(data)
+ *             if self.dtype == str:
+ */
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_flatten); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_10 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
+      if (likely(__pyx_t_10)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_10);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_6, function);
+      }
+    }
+    if (__pyx_t_10) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_1));
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":3733
+ *             # flatten data array.
+ *             data = data.flatten()
+ *             totelem = PyArray_SIZE(data)             # <<<<<<<<<<<<<<
+ *             if self.dtype == str:
+ *                 # vlen string (NC_STRING)
+ */
+    __pyx_t_1 = __Pyx_PyInt_From_npy_intp(PyArray_SIZE(__pyx_v_data)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_v_totelem = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":3734
+ *             data = data.flatten()
+ *             totelem = PyArray_SIZE(data)
+ *             if self.dtype == str:             # <<<<<<<<<<<<<<
+ *                 # vlen string (NC_STRING)
+ *                 # allocate pointer array to hold string data.
+ */
+    __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_5) {
+
+      /* "netCDF4.pyx":3737
+ *                 # vlen string (NC_STRING)
+ *                 # allocate pointer array to hold string data.
+ *                 strdata = <char **>malloc(sizeof(char *) * totelem)             # <<<<<<<<<<<<<<
+ *                 # strides all 1 or scalar variable, use get_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:
+ */
+      __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(char *))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_6 = PyNumber_Multiply(__pyx_t_1, __pyx_v_totelem); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_v_strdata = ((char **)malloc(__pyx_t_8));
+
+      /* "netCDF4.pyx":3739
+ *                 strdata = <char **>malloc(sizeof(char *) * totelem)
+ *                 # strides all 1 or scalar variable, use get_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:             # <<<<<<<<<<<<<<
+ *                     ierr = nc_get_vara(self._grpid, self._varid,
+ *                                        startp, countp, strdata)
+ */
+      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_INCREF(__pyx_v_stride);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_stride);
+      __Pyx_GIVEREF(__pyx_v_stride);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      if (!__pyx_t_12) {
+      } else {
+        __pyx_t_5 = __pyx_t_12;
+        goto __pyx_L18_bool_binop_done;
+      }
+      __pyx_t_12 = ((__pyx_v_ndims == 0) != 0);
+      __pyx_t_5 = __pyx_t_12;
+      __pyx_L18_bool_binop_done:;
+      if (__pyx_t_5) {
+
+        /* "netCDF4.pyx":3740
+ *                 # strides all 1 or scalar variable, use get_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:
+ *                     ierr = nc_get_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
+ *                                        startp, countp, strdata)
+ *                 else:
+ */
+        __pyx_v_ierr = nc_get_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_strdata);
+        goto __pyx_L17;
+      }
+      /*else*/ {
+
+        /* "netCDF4.pyx":3744
+ *                 else:
+ *                     # FIXME: is this a bug in netCDF4?
+ *                     raise IndexError('strides must all be 1 for string variables')             # <<<<<<<<<<<<<<
+ *                     #ierr = nc_get_vars(self._grpid, self._varid,
+ *                     #                   startp, countp, stridep, strdata)
+ */
+        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_Raise(__pyx_t_10, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __pyx_L17:;
+
+      /* "netCDF4.pyx":3747
+ *                     #ierr = nc_get_vars(self._grpid, self._varid,
+ *                     #                   startp, countp, stridep, strdata)
+ *                 if ierr == NC_EINVALCOORDS:             # <<<<<<<<<<<<<<
+ *                     raise IndexError
+ *                 elif ierr != NC_NOERR:
+ */
+      __pyx_t_5 = ((__pyx_v_ierr == NC_EINVALCOORDS) != 0);
+      if (__pyx_t_5) {
+
+        /* "netCDF4.pyx":3748
+ *                     #                   startp, countp, stridep, strdata)
+ *                 if ierr == NC_EINVALCOORDS:
+ *                     raise IndexError             # <<<<<<<<<<<<<<
+ *                 elif ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+        __Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":3749
+ *                 if ierr == NC_EINVALCOORDS:
+ *                     raise IndexError
+ *                 elif ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 # loop over elements of object array, fill array with
+ */
+      __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_5) {
+
+        /* "netCDF4.pyx":3750
+ *                     raise IndexError
+ *                 elif ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *                 # loop over elements of object array, fill array with
+ *                 # contents of strdata.
+ */
+        __pyx_t_13 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_10 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_10);
+        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10);
+        __Pyx_GIVEREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_Raise(__pyx_t_10, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":3753
+ *                 # loop over elements of object array, fill array with
+ *                 # contents of strdata.
+ *                 for i from 0<=i<totelem:             # <<<<<<<<<<<<<<
+ *                     data[i] = strdata[i].decode(default_encoding)
+ *                 # reshape the output array
+ */
+      __pyx_t_14 = __Pyx_PyInt_As_long(__pyx_v_totelem); if (unlikely((__pyx_t_14 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_14; __pyx_v_i++) {
+
+        /* "netCDF4.pyx":3754
+ *                 # contents of strdata.
+ *                 for i from 0<=i<totelem:
+ *                     data[i] = strdata[i].decode(default_encoding)             # <<<<<<<<<<<<<<
+ *                 # reshape the output array
+ *                 data = numpy.reshape(data, shapeout)
+ */
+        __pyx_t_6 = __Pyx_PyBytes_FromString((__pyx_v_strdata[__pyx_v_i])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_4 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+          if (likely(__pyx_t_4)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+            __Pyx_INCREF(__pyx_t_4);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_1, function);
+          }
+        }
+        if (!__pyx_t_4) {
+          __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_GOTREF(__pyx_t_10);
+        } else {
+          __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_15);
+          PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+          PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_6);
+          __Pyx_GIVEREF(__pyx_t_6);
+          __pyx_t_6 = 0;
+          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_15, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_10);
+          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_data), __pyx_v_i, __pyx_t_10, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      }
+
+      /* "netCDF4.pyx":3756
+ *                     data[i] = strdata[i].decode(default_encoding)
+ *                 # reshape the output array
+ *                 data = numpy.reshape(data, shapeout)             # <<<<<<<<<<<<<<
+ *                 free(strdata)
+ *             else:
+ */
+      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_reshape); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_15);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = NULL;
+      __pyx_t_2 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_15))) {
+        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_15);
+        if (likely(__pyx_t_1)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
+          __Pyx_INCREF(__pyx_t_1);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_15, function);
+          __pyx_t_2 = 1;
+        }
+      }
+      __pyx_t_6 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      if (__pyx_t_1) {
+        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+      }
+      __Pyx_INCREF(((PyObject *)__pyx_v_data));
+      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_2, ((PyObject *)__pyx_v_data));
+      __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
+      __Pyx_INCREF(__pyx_v_shapeout);
+      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_2, __pyx_v_shapeout);
+      __Pyx_GIVEREF(__pyx_v_shapeout);
+      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+      if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_10));
+      __pyx_t_10 = 0;
+
+      /* "netCDF4.pyx":3757
+ *                 # reshape the output array
+ *                 data = numpy.reshape(data, shapeout)
+ *                 free(strdata)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 # regular vlen
+ */
+      free(__pyx_v_strdata);
+      goto __pyx_L16;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3761
+ *                 # regular vlen
+ *                 # allocate struct array to hold vlen data.
+ *                 vldata = <nc_vlen_t *>malloc(totelem*sizeof(nc_vlen_t))             # <<<<<<<<<<<<<<
+ *                 # strides all 1 or scalar variable, use get_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:
+ */
+      __pyx_t_10 = __Pyx_PyInt_FromSize_t((sizeof(nc_vlen_t))); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_15 = PyNumber_Multiply(__pyx_v_totelem, __pyx_t_10); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_15);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_15); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+      __pyx_v_vldata = ((nc_vlen_t *)malloc(__pyx_t_8));
+
+      /* "netCDF4.pyx":3763
+ *                 vldata = <nc_vlen_t *>malloc(totelem*sizeof(nc_vlen_t))
+ *                 # strides all 1 or scalar variable, use get_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:             # <<<<<<<<<<<<<<
+ *                     ierr = nc_get_vara(self._grpid, self._varid,
+ *                                        startp, countp, vldata)
+ */
+      __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_15);
+      __Pyx_INCREF(__pyx_v_stride);
+      PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_stride);
+      __Pyx_GIVEREF(__pyx_v_stride);
+      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_15, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+      __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_15);
+      __pyx_t_6 = PyObject_RichCompare(__pyx_t_10, __pyx_t_15, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      if (!__pyx_t_12) {
+      } else {
+        __pyx_t_5 = __pyx_t_12;
+        goto __pyx_L24_bool_binop_done;
+      }
+      __pyx_t_12 = ((__pyx_v_ndims == 0) != 0);
+      __pyx_t_5 = __pyx_t_12;
+      __pyx_L24_bool_binop_done:;
+      if (__pyx_t_5) {
+
+        /* "netCDF4.pyx":3764
+ *                 # strides all 1 or scalar variable, use get_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:
+ *                     ierr = nc_get_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
+ *                                        startp, countp, vldata)
+ *                 else:
+ */
+        __pyx_v_ierr = nc_get_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_vldata);
+        goto __pyx_L23;
+      }
+      /*else*/ {
+
+        /* "netCDF4.pyx":3767
+ *                                        startp, countp, vldata)
+ *                 else:
+ *                     raise IndexError('strides must all be 1 for vlen variables')             # <<<<<<<<<<<<<<
+ *                     #ierr = nc_get_vars(self._grpid, self._varid,
+ *                     #                   startp, countp, stridep, vldata)
+ */
+        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __pyx_L23:;
+
+      /* "netCDF4.pyx":3770
+ *                     #ierr = nc_get_vars(self._grpid, self._varid,
+ *                     #                   startp, countp, stridep, vldata)
+ *                 if ierr == NC_EINVALCOORDS:             # <<<<<<<<<<<<<<
+ *                     raise IndexError
+ *                 elif ierr != NC_NOERR:
+ */
+      __pyx_t_5 = ((__pyx_v_ierr == NC_EINVALCOORDS) != 0);
+      if (__pyx_t_5) {
+
+        /* "netCDF4.pyx":3771
+ *                     #                   startp, countp, stridep, vldata)
+ *                 if ierr == NC_EINVALCOORDS:
+ *                     raise IndexError             # <<<<<<<<<<<<<<
+ *                 elif ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+        __Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":3772
+ *                 if ierr == NC_EINVALCOORDS:
+ *                     raise IndexError
+ *                 elif ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 # loop over elements of object array, fill array with
+ */
+      __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_5) {
+
+        /* "netCDF4.pyx":3773
+ *                     raise IndexError
+ *                 elif ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *                 # loop over elements of object array, fill array with
+ *                 # contents of vlarray struct, put array in object array.
+ */
+        __pyx_t_13 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_15);
+        __Pyx_INCREF(__pyx_t_6);
+        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_6);
+        __Pyx_GIVEREF(__pyx_t_6);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_15, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":3776
+ *                 # loop over elements of object array, fill array with
+ *                 # contents of vlarray struct, put array in object array.
+ *                 for i from 0<=i<totelem:             # <<<<<<<<<<<<<<
+ *                     arrlen  = vldata[i].len
+ *                     dataarr = numpy.empty(arrlen, self.dtype)
+ */
+      __pyx_t_14 = __Pyx_PyInt_As_long(__pyx_v_totelem); if (unlikely((__pyx_t_14 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_14; __pyx_v_i++) {
+
+        /* "netCDF4.pyx":3777
+ *                 # contents of vlarray struct, put array in object array.
+ *                 for i from 0<=i<totelem:
+ *                     arrlen  = vldata[i].len             # <<<<<<<<<<<<<<
+ *                     dataarr = numpy.empty(arrlen, self.dtype)
+ *                     dataarr.data = <char *>vldata[i].p
+ */
+        __pyx_t_8 = (__pyx_v_vldata[__pyx_v_i]).len;
+        __pyx_v_arrlen = __pyx_t_8;
+
+        /* "netCDF4.pyx":3778
+ *                 for i from 0<=i<totelem:
+ *                     arrlen  = vldata[i].len
+ *                     dataarr = numpy.empty(arrlen, self.dtype)             # <<<<<<<<<<<<<<
+ *                     dataarr.data = <char *>vldata[i].p
+ *                     data[i] = dataarr
+ */
+        __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_15);
+        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+        __pyx_t_15 = __Pyx_PyInt_FromSize_t(__pyx_v_arrlen); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_15);
+        __pyx_t_1 = NULL;
+        __pyx_t_2 = 0;
+        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
+          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
+          if (likely(__pyx_t_1)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+            __Pyx_INCREF(__pyx_t_1);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_10, function);
+            __pyx_t_2 = 1;
+          }
+        }
+        __pyx_t_4 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        if (__pyx_t_1) {
+          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+        }
+        PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_2, __pyx_t_15);
+        __Pyx_GIVEREF(__pyx_t_15);
+        __Pyx_INCREF(__pyx_v_self->dtype);
+        PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_2, __pyx_v_self->dtype);
+        __Pyx_GIVEREF(__pyx_v_self->dtype);
+        __pyx_t_15 = 0;
+        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_XDECREF_SET(__pyx_v_dataarr, ((PyArrayObject *)__pyx_t_6));
+        __pyx_t_6 = 0;
+
+        /* "netCDF4.pyx":3779
+ *                     arrlen  = vldata[i].len
+ *                     dataarr = numpy.empty(arrlen, self.dtype)
+ *                     dataarr.data = <char *>vldata[i].p             # <<<<<<<<<<<<<<
+ *                     data[i] = dataarr
+ *                 # reshape the output array
+ */
+        __pyx_v_dataarr->data = ((char *)(__pyx_v_vldata[__pyx_v_i]).p);
+
+        /* "netCDF4.pyx":3780
+ *                     dataarr = numpy.empty(arrlen, self.dtype)
+ *                     dataarr.data = <char *>vldata[i].p
+ *                     data[i] = dataarr             # <<<<<<<<<<<<<<
+ *                 # reshape the output array
+ *                 data = numpy.reshape(data, shapeout)
+ */
+        if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_data), __pyx_v_i, ((PyObject *)__pyx_v_dataarr), long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4.pyx":3782
+ *                     data[i] = dataarr
+ *                 # reshape the output array
+ *                 data = numpy.reshape(data, shapeout)             # <<<<<<<<<<<<<<
+ *                 # free the pointer array.
+ *                 free(vldata)
+ */
+      __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __pyx_t_10 = NULL;
+      __pyx_t_2 = 0;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
+        if (likely(__pyx_t_10)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+          __Pyx_INCREF(__pyx_t_10);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_4, function);
+          __pyx_t_2 = 1;
+        }
+      }
+      __pyx_t_15 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_15);
+      if (__pyx_t_10) {
+        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = NULL;
+      }
+      __Pyx_INCREF(((PyObject *)__pyx_v_data));
+      PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_2, ((PyObject *)__pyx_v_data));
+      __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
+      __Pyx_INCREF(__pyx_v_shapeout);
+      PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_2, __pyx_v_shapeout);
+      __Pyx_GIVEREF(__pyx_v_shapeout);
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_15, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_6));
+      __pyx_t_6 = 0;
+
+      /* "netCDF4.pyx":3784
+ *                 data = numpy.reshape(data, shapeout)
+ *                 # free the pointer array.
+ *                 free(vldata)             # <<<<<<<<<<<<<<
+ *         if negstride:
+ *             # reverse data along axes with negative strides.
+ */
+      free(__pyx_v_vldata);
+    }
+    __pyx_L16:;
+    goto __pyx_L9;
+  }
+  __pyx_L9:;
+
+  /* "netCDF4.pyx":3785
+ *                 # free the pointer array.
+ *                 free(vldata)
+ *         if negstride:             # <<<<<<<<<<<<<<
+ *             # reverse data along axes with negative strides.
+ *             data = data[sl].copy() # make a copy so data is contiguous.
+ */
+  __pyx_t_5 = (__pyx_v_negstride != 0);
+  if (__pyx_t_5) {
+
+    /* "netCDF4.pyx":3787
+ *         if negstride:
+ *             # reverse data along axes with negative strides.
+ *             data = data[sl].copy() # make a copy so data is contiguous.             # <<<<<<<<<<<<<<
+ *         if not self.dimensions:
+ *             return data[0] # a scalar
+ */
+    if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+    __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_sl); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3787; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_15);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_15))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_15, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_15); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_6));
+    __pyx_t_6 = 0;
+    goto __pyx_L29;
+  }
+  __pyx_L29:;
+
+  /* "netCDF4.pyx":3788
+ *             # reverse data along axes with negative strides.
+ *             data = data[sl].copy() # make a copy so data is contiguous.
+ *         if not self.dimensions:             # <<<<<<<<<<<<<<
+ *             return data[0] # a scalar
+ *         elif squeeze_out:
+ */
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_12 = ((!__pyx_t_5) != 0);
+  if (__pyx_t_12) {
+
+    /* "netCDF4.pyx":3789
+ *             data = data[sl].copy() # make a copy so data is contiguous.
+ *         if not self.dimensions:
+ *             return data[0] # a scalar             # <<<<<<<<<<<<<<
+ *         elif squeeze_out:
+ *             return numpy.squeeze(data)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+    __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_data), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3789; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_r = __pyx_t_6;
+    __pyx_t_6 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":3790
+ *         if not self.dimensions:
+ *             return data[0] # a scalar
+ *         elif squeeze_out:             # <<<<<<<<<<<<<<
+ *             return numpy.squeeze(data)
+ *         else:
+ */
+  __pyx_t_12 = (__pyx_v_squeeze_out != 0);
+  if (__pyx_t_12) {
+
+    /* "netCDF4.pyx":3791
+ *             return data[0] # a scalar
+ *         elif squeeze_out:
+ *             return numpy.squeeze(data)             # <<<<<<<<<<<<<<
+ *         else:
+ *             return data
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_15);
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+    if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+    __pyx_t_15 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_4);
+      if (likely(__pyx_t_15)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+        __Pyx_INCREF(__pyx_t_15);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+      }
+    }
+    if (!__pyx_t_15) {
+      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_data)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+    } else {
+      __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); __pyx_t_15 = NULL;
+      __Pyx_INCREF(((PyObject *)__pyx_v_data));
+      PyTuple_SET_ITEM(__pyx_t_10, 0+1, ((PyObject *)__pyx_v_data));
+      __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_r = __pyx_t_6;
+    __pyx_t_6 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":3793
+ *             return numpy.squeeze(data)
+ *         else:
+ *             return data             # <<<<<<<<<<<<<<
+ * 
+ * # Compound datatype support.
+ */
+    __Pyx_XDECREF(__pyx_r);
+    if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+    __Pyx_INCREF(((PyObject *)__pyx_v_data));
+    __pyx_r = ((PyObject *)__pyx_v_data);
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":3675
+ *                 free(vldata)
+ * 
+ *     def _get(self,start,count,stride):             # <<<<<<<<<<<<<<
+ *         """Private method to retrieve data from a netCDF variable"""
+ *         cdef int ierr, ndims
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_XDECREF(__pyx_t_15);
+  __Pyx_AddTraceback("netCDF4.Variable._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF((PyObject *)__pyx_v_data);
+  __Pyx_XDECREF((PyObject *)__pyx_v_dataarr);
+  __Pyx_XDECREF(__pyx_v_shapeout);
+  __Pyx_XDECREF(__pyx_v_lendim);
+  __Pyx_XDECREF(__pyx_v_sl);
+  __Pyx_XDECREF(__pyx_v_totelem);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2427
+ * truncated to this decimal place when it is assigned to the L{Variable}
+ * instance. If C{None}, the data is not truncated. """
+ *     cdef public int _varid, _grpid, _nunlimdim             # <<<<<<<<<<<<<<
+ *     cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\
+ *     _isvlen, _grp,_cmptype,_vltype
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_6_varid_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_6_varid_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_6_varid___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_6_varid___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_varid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Variable._varid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_6_varid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_6_varid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_6_varid_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_6_varid_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_varid = __pyx_t_1;
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4.Variable._varid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_6_grpid_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_6_grpid_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_6_grpid___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_6_grpid___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Variable._grpid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_6_grpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_6_grpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_6_grpid_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_6_grpid_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_grpid = __pyx_t_1;
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4.Variable._grpid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_10_nunlimdim_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_10_nunlimdim_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_10_nunlimdim___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_10_nunlimdim___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_nunlimdim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.Variable._nunlimdim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_10_nunlimdim_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_10_nunlimdim_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_10_nunlimdim_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_10_nunlimdim_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_nunlimdim = __pyx_t_1;
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4.Variable._nunlimdim.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2428
+ * instance. If C{None}, the data is not truncated. """
+ *     cdef public int _varid, _grpid, _nunlimdim
+ *     cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\             # <<<<<<<<<<<<<<
+ *     _isvlen, _grp,_cmptype,_vltype
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_5_name_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_5_name_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_5_name___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_5_name___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_name);
+  __pyx_r = __pyx_v_self->_name;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_5_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_5_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_5_name_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_5_name_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->_name);
+  __Pyx_DECREF(__pyx_v_self->_name);
+  __pyx_v_self->_name = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_5_name_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_5_name_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_5_name_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_5_name_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->_name);
+  __Pyx_DECREF(__pyx_v_self->_name);
+  __pyx_v_self->_name = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_4ndim_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_4ndim___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_4ndim___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->ndim);
+  __pyx_r = __pyx_v_self->ndim;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_4ndim_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_4ndim_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_4ndim_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_4ndim_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->ndim);
+  __Pyx_DECREF(__pyx_v_self->ndim);
+  __pyx_v_self->ndim = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_4ndim_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_4ndim_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_4ndim_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_4ndim_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->ndim);
+  __Pyx_DECREF(__pyx_v_self->ndim);
+  __pyx_v_self->ndim = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_5dtype_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_5dtype_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_5dtype___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_5dtype___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->dtype);
+  __pyx_r = __pyx_v_self->dtype;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_5dtype_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_5dtype_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->dtype);
+  __Pyx_DECREF(__pyx_v_self->dtype);
+  __pyx_v_self->dtype = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_5dtype_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_5dtype_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_5dtype_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_5dtype_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->dtype);
+  __Pyx_DECREF(__pyx_v_self->dtype);
+  __pyx_v_self->dtype = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_4mask_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_4mask_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_4mask___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_4mask___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->mask);
+  __pyx_r = __pyx_v_self->mask;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_4mask_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_4mask_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_4mask_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_4mask_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->mask);
+  __Pyx_DECREF(__pyx_v_self->mask);
+  __pyx_v_self->mask = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_4mask_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_4mask_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_4mask_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_4mask_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->mask);
+  __Pyx_DECREF(__pyx_v_self->mask);
+  __pyx_v_self->mask = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_5scale_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_5scale_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_5scale___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_5scale___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->scale);
+  __pyx_r = __pyx_v_self->scale;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_5scale_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_5scale_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_5scale_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_5scale_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->scale);
+  __Pyx_DECREF(__pyx_v_self->scale);
+  __pyx_v_self->scale = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_5scale_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_5scale_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_5scale_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_5scale_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->scale);
+  __Pyx_DECREF(__pyx_v_self->scale);
+  __pyx_v_self->scale = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_12_isprimitive_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_12_isprimitive_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_12_isprimitive___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_12_isprimitive___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_isprimitive);
+  __pyx_r = __pyx_v_self->_isprimitive;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_12_isprimitive_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_12_isprimitive_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_12_isprimitive_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_12_isprimitive_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->_isprimitive);
+  __Pyx_DECREF(__pyx_v_self->_isprimitive);
+  __pyx_v_self->_isprimitive = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_12_isprimitive_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_12_isprimitive_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_12_isprimitive_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_12_isprimitive_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->_isprimitive);
+  __Pyx_DECREF(__pyx_v_self->_isprimitive);
+  __pyx_v_self->_isprimitive = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_11_iscompound_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_11_iscompound_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_11_iscompound___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_11_iscompound___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_iscompound);
+  __pyx_r = __pyx_v_self->_iscompound;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_11_iscompound_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_11_iscompound_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_11_iscompound_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_11_iscompound_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->_iscompound);
+  __Pyx_DECREF(__pyx_v_self->_iscompound);
+  __pyx_v_self->_iscompound = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_11_iscompound_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_11_iscompound_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_11_iscompound_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_11_iscompound_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->_iscompound);
+  __Pyx_DECREF(__pyx_v_self->_iscompound);
+  __pyx_v_self->_iscompound = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":2429
+ *     cdef public int _varid, _grpid, _nunlimdim
+ *     cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\
+ *     _isvlen, _grp,_cmptype,_vltype             # <<<<<<<<<<<<<<
+ * 
+ *     def __init__(self, grp, name, datatype, dimensions=(), zlib=False,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_7_isvlen_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_7_isvlen_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_7_isvlen___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_7_isvlen___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_isvlen);
+  __pyx_r = __pyx_v_self->_isvlen;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_7_isvlen_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_7_isvlen_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_7_isvlen_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_7_isvlen_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->_isvlen);
+  __Pyx_DECREF(__pyx_v_self->_isvlen);
+  __pyx_v_self->_isvlen = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_7_isvlen_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_7_isvlen_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_7_isvlen_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_7_isvlen_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->_isvlen);
+  __Pyx_DECREF(__pyx_v_self->_isvlen);
+  __pyx_v_self->_isvlen = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_4_grp_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_4_grp_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_4_grp___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_4_grp___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_grp);
+  __pyx_r = __pyx_v_self->_grp;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_4_grp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_4_grp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_4_grp_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_4_grp_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->_grp);
+  __Pyx_DECREF(__pyx_v_self->_grp);
+  __pyx_v_self->_grp = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_4_grp_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_4_grp_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_4_grp_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_4_grp_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->_grp);
+  __Pyx_DECREF(__pyx_v_self->_grp);
+  __pyx_v_self->_grp = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_8_cmptype_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_8_cmptype_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_8_cmptype___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_8_cmptype___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_cmptype);
+  __pyx_r = __pyx_v_self->_cmptype;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_8_cmptype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_8_cmptype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_8_cmptype_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_8_cmptype_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->_cmptype);
+  __Pyx_DECREF(__pyx_v_self->_cmptype);
+  __pyx_v_self->_cmptype = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_8_cmptype_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_8_cmptype_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_8_cmptype_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_8_cmptype_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->_cmptype);
+  __Pyx_DECREF(__pyx_v_self->_cmptype);
+  __pyx_v_self->_cmptype = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8Variable_7_vltype_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8Variable_7_vltype_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_7_vltype___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8Variable_7_vltype___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_vltype);
+  __pyx_r = __pyx_v_self->_vltype;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_7_vltype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_7_vltype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_7_vltype_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_7_vltype_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->_vltype);
+  __Pyx_DECREF(__pyx_v_self->_vltype);
+  __pyx_v_self->_vltype = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8Variable_7_vltype_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8Variable_7_vltype_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8Variable_7_vltype_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8Variable_7_vltype_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->_vltype);
+  __Pyx_DECREF(__pyx_v_self->_vltype);
+  __pyx_v_self->_vltype = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3837
+ *     cdef public nc_type _nc_type
+ *     cdef public dtype, name
+ *     def __init__(self, grp, object dt, object dtype_name, **kwargs):             # <<<<<<<<<<<<<<
+ *         cdef nc_type xtype
+ *         dt = numpy.dtype(dt,align=True)
+ */
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_12CompoundType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_7netCDF4_12CompoundType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_grp = 0;
+  PyObject *__pyx_v_dt = 0;
+  PyObject *__pyx_v_dtype_name = 0;
+  PyObject *__pyx_v_kwargs = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+  __Pyx_GOTREF(__pyx_v_kwargs);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grp_2,&__pyx_n_s_dt,&__pyx_n_s_dtype_name,0};
+    PyObject* values[3] = {0,0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grp_2)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dt)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3837; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtype_name)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3837; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3837; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+    }
+    __pyx_v_grp = values[0];
+    __pyx_v_dt = values[1];
+    __pyx_v_dtype_name = values[2];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3837; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("netCDF4.CompoundType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_12CompoundType___init__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self), __pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name, __pyx_v_kwargs);
+
+  /* function exit code */
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_12CompoundType___init__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_grp, PyObject *__pyx_v_dt, PyObject *__pyx_v_dtype_name, PyObject *__pyx_v_kwargs) {
+  nc_type __pyx_v_xtype;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  int __pyx_t_6;
+  nc_type __pyx_t_7;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_INCREF(__pyx_v_dt);
+
+  /* "netCDF4.pyx":3839
+ *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
+ *         cdef nc_type xtype
+ *         dt = numpy.dtype(dt,align=True)             # <<<<<<<<<<<<<<
+ *         if 'typeid' in kwargs:
+ *             xtype = kwargs['typeid']
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_dt);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dt);
+  __Pyx_GIVEREF(__pyx_v_dt);
+  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_align, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_4);
+  __pyx_t_4 = 0;
+
+  /* "netCDF4.pyx":3840
+ *         cdef nc_type xtype
+ *         dt = numpy.dtype(dt,align=True)
+ *         if 'typeid' in kwargs:             # <<<<<<<<<<<<<<
+ *             xtype = kwargs['typeid']
+ *         else:
+ */
+  __pyx_t_5 = (__Pyx_PyDict_Contains(__pyx_n_s_typeid, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = (__pyx_t_5 != 0);
+  if (__pyx_t_6) {
+
+    /* "netCDF4.pyx":3841
+ *         dt = numpy.dtype(dt,align=True)
+ *         if 'typeid' in kwargs:
+ *             xtype = kwargs['typeid']             # <<<<<<<<<<<<<<
+ *         else:
+ *             xtype = _def_compound(grp, dt, dtype_name)
+ */
+    __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_typeid); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3841; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_7 = __Pyx_PyInt_As_nc_type(__pyx_t_4); if (unlikely((__pyx_t_7 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_v_xtype = __pyx_t_7;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":3843
+ *             xtype = kwargs['typeid']
+ *         else:
+ *             xtype = _def_compound(grp, dt, dtype_name)             # <<<<<<<<<<<<<<
+ *         self._nc_type = xtype
+ *         self.dtype = dt
+ */
+    __pyx_t_4 = __pyx_f_7netCDF4__def_compound(__pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_7 = __Pyx_PyInt_As_nc_type(__pyx_t_4); if (unlikely((__pyx_t_7 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_v_xtype = __pyx_t_7;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":3844
+ *         else:
+ *             xtype = _def_compound(grp, dt, dtype_name)
+ *         self._nc_type = xtype             # <<<<<<<<<<<<<<
+ *         self.dtype = dt
+ *         self.name = dtype_name
+ */
+  __pyx_v_self->_nc_type = __pyx_v_xtype;
+
+  /* "netCDF4.pyx":3845
+ *             xtype = _def_compound(grp, dt, dtype_name)
+ *         self._nc_type = xtype
+ *         self.dtype = dt             # <<<<<<<<<<<<<<
+ *         self.name = dtype_name
+ * 
+ */
+  __Pyx_INCREF(__pyx_v_dt);
+  __Pyx_GIVEREF(__pyx_v_dt);
+  __Pyx_GOTREF(__pyx_v_self->dtype);
+  __Pyx_DECREF(__pyx_v_self->dtype);
+  __pyx_v_self->dtype = __pyx_v_dt;
+
+  /* "netCDF4.pyx":3846
+ *         self._nc_type = xtype
+ *         self.dtype = dt
+ *         self.name = dtype_name             # <<<<<<<<<<<<<<
+ * 
+ *     def __repr__(self):
+ */
+  __Pyx_INCREF(__pyx_v_dtype_name);
+  __Pyx_GIVEREF(__pyx_v_dtype_name);
+  __Pyx_GOTREF(__pyx_v_self->name);
+  __Pyx_DECREF(__pyx_v_self->name);
+  __pyx_v_self->name = __pyx_v_dtype_name;
+
+  /* "netCDF4.pyx":3837
+ *     cdef public nc_type _nc_type
+ *     cdef public dtype, name
+ *     def __init__(self, grp, object dt, object dtype_name, **kwargs):             # <<<<<<<<<<<<<<
+ *         cdef nc_type xtype
+ *         dt = numpy.dtype(dt,align=True)
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4.CompoundType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_dt);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3848
+ *         self.name = dtype_name
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *            return self.__unicode__()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_12CompoundType_3__repr__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_12CompoundType_3__repr__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_2__repr__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_12CompoundType_2__repr__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__repr__", 0);
+
+  /* "netCDF4.pyx":3849
+ * 
+ *     def __repr__(self):
+ *         if python3:             # <<<<<<<<<<<<<<
+ *            return self.__unicode__()
+ *         else:
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":3850
+ *     def __repr__(self):
+ *         if python3:
+ *            return self.__unicode__()             # <<<<<<<<<<<<<<
+ *         else:
+ *            return unicode(self).encode(default_encoding)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":3852
+ *            return self.__unicode__()
+ *         else:
+ *            return unicode(self).encode(default_encoding)             # <<<<<<<<<<<<<<
+ * 
+ *     def __unicode__(self):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_INCREF(((PyObject *)__pyx_v_self));
+    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
+    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (!__pyx_t_5) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
+      __Pyx_GIVEREF(__pyx_t_4);
+      __pyx_t_4 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":3848
+ *         self.name = dtype_name
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *            return self.__unicode__()
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netCDF4.CompoundType.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3854
+ *            return unicode(self).encode(default_encoding)
+ * 
+ *     def __unicode__(self):             # <<<<<<<<<<<<<<
+ *         return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
+ *         (self.name,self.dtype)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_12CompoundType_5__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_12CompoundType_5__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__unicode__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_4__unicode__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_12CompoundType_4__unicode__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__unicode__", 0);
+
+  /* "netCDF4.pyx":3855
+ * 
+ *     def __unicode__(self):
+ *         return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\             # <<<<<<<<<<<<<<
+ *         (self.name,self.dtype)
+ * 
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+
+  /* "netCDF4.pyx":3856
+ *     def __unicode__(self):
+ *         return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
+ *         (self.name,self.dtype)             # <<<<<<<<<<<<<<
+ * 
+ * cdef _def_compound(grp, object dt, object dtype_name):
+ */
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(__pyx_v_self->name);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->name);
+  __Pyx_GIVEREF(__pyx_v_self->name);
+  __Pyx_INCREF(__pyx_v_self->dtype);
+  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->dtype);
+  __Pyx_GIVEREF(__pyx_v_self->dtype);
+
+  /* "netCDF4.pyx":3855
+ * 
+ *     def __unicode__(self):
+ *         return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\             # <<<<<<<<<<<<<<
+ *         (self.name,self.dtype)
+ * 
+ */
+  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_name_s_numpy_dtype_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":3854
+ *            return unicode(self).encode(default_encoding)
+ * 
+ *     def __unicode__(self):             # <<<<<<<<<<<<<<
+ *         return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
+ *         (self.name,self.dtype)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4.CompoundType.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3835
+ * @ivar name: A python string describing the compound type.
+ * """
+ *     cdef public nc_type _nc_type             # <<<<<<<<<<<<<<
+ *     cdef public dtype, name
+ *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_12CompoundType_8_nc_type_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_12CompoundType_8_nc_type_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_8_nc_type___get__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_12CompoundType_8_nc_type___get__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_self->_nc_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.CompoundType._nc_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_12CompoundType_8_nc_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_12CompoundType_8_nc_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_8_nc_type_2__set__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_12CompoundType_8_nc_type_2__set__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  nc_type __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __pyx_t_1 = __Pyx_PyInt_As_nc_type(__pyx_v_value); if (unlikely((__pyx_t_1 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_nc_type = __pyx_t_1;
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4.CompoundType._nc_type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3836
+ * """
+ *     cdef public nc_type _nc_type
+ *     cdef public dtype, name             # <<<<<<<<<<<<<<
+ *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
+ *         cdef nc_type xtype
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_12CompoundType_5dtype_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_12CompoundType_5dtype_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_5dtype___get__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_12CompoundType_5dtype___get__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->dtype);
+  __pyx_r = __pyx_v_self->dtype;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_12CompoundType_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_12CompoundType_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_5dtype_2__set__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_12CompoundType_5dtype_2__set__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->dtype);
+  __Pyx_DECREF(__pyx_v_self->dtype);
+  __pyx_v_self->dtype = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_12CompoundType_5dtype_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_12CompoundType_5dtype_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_5dtype_4__del__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_12CompoundType_5dtype_4__del__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->dtype);
+  __Pyx_DECREF(__pyx_v_self->dtype);
+  __pyx_v_self->dtype = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_12CompoundType_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_12CompoundType_4name_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_4name___get__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_12CompoundType_4name___get__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->name);
+  __pyx_r = __pyx_v_self->name;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_12CompoundType_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_12CompoundType_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_4name_2__set__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_12CompoundType_4name_2__set__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->name);
+  __Pyx_DECREF(__pyx_v_self->name);
+  __pyx_v_self->name = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_12CompoundType_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_12CompoundType_4name_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_4name_4__del__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_12CompoundType_4name_4__del__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->name);
+  __Pyx_DECREF(__pyx_v_self->name);
+  __pyx_v_self->name = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3858
+ *         (self.name,self.dtype)
+ * 
+ * cdef _def_compound(grp, object dt, object dtype_name):             # <<<<<<<<<<<<<<
+ *     # private function used to construct a netcdf compound data type
+ *     # from a numpy dtype object by CompoundType.__init__.
+ */
+
+static PyObject *__pyx_f_7netCDF4__def_compound(PyObject *__pyx_v_grp, PyObject *__pyx_v_dt, PyObject *__pyx_v_dtype_name) {
+  nc_type __pyx_v_xtype;
+  nc_type __pyx_v_xtype_tmp;
+  int __pyx_v_ierr;
+  int __pyx_v_ndims;
+  size_t __pyx_v_offset;
+  size_t __pyx_v_size;
+  char *__pyx_v_namstring;
+  char *__pyx_v_nested_namstring;
+  int __pyx_v_dim_sizes[NC_MAX_DIMS];
+  PyObject *__pyx_v_bytestr = NULL;
+  PyObject *__pyx_v_names = NULL;
+  PyObject *__pyx_v_formats = NULL;
+  PyObject *__pyx_v_offsets = NULL;
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_v_format = NULL;
+  long __pyx_v_n;
+  PyObject *__pyx_v_v = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  char *__pyx_t_2;
+  size_t __pyx_t_3;
+  int __pyx_t_4;
+  int __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  Py_ssize_t __pyx_t_9;
+  PyObject *(*__pyx_t_10)(PyObject *);
+  int __pyx_t_11;
+  PyObject *__pyx_t_12 = NULL;
+  PyObject *__pyx_t_13 = NULL;
+  PyObject *(*__pyx_t_14)(PyObject *);
+  PyObject *__pyx_t_15 = NULL;
+  PyObject *__pyx_t_16 = NULL;
+  PyObject *__pyx_t_17 = NULL;
+  nc_type __pyx_t_18;
+  Py_ssize_t __pyx_t_19;
+  int __pyx_t_20;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_def_compound", 0);
+
+  /* "netCDF4.pyx":3867
+ *     cdef char *nested_namstring
+ *     cdef int dim_sizes[NC_MAX_DIMS]
+ *     bytestr = _strencode(dtype_name)             # <<<<<<<<<<<<<<
+ *     namstring = bytestr
+ *     size = dt.itemsize
+ */
+  __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_dtype_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_bytestr = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":3868
+ *     cdef int dim_sizes[NC_MAX_DIMS]
+ *     bytestr = _strencode(dtype_name)
+ *     namstring = bytestr             # <<<<<<<<<<<<<<
+ *     size = dt.itemsize
+ *     ierr = nc_def_compound(grp._grpid, size, namstring, &xtype)
+ */
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_namstring = __pyx_t_2;
+
+  /* "netCDF4.pyx":3869
+ *     bytestr = _strencode(dtype_name)
+ *     namstring = bytestr
+ *     size = dt.itemsize             # <<<<<<<<<<<<<<
+ *     ierr = nc_def_compound(grp._grpid, size, namstring, &xtype)
+ *     if ierr != NC_NOERR:
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_size = __pyx_t_3;
+
+  /* "netCDF4.pyx":3870
+ *     namstring = bytestr
+ *     size = dt.itemsize
+ *     ierr = nc_def_compound(grp._grpid, size, namstring, &xtype)             # <<<<<<<<<<<<<<
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_ierr = nc_def_compound(__pyx_t_4, __pyx_v_size, __pyx_v_namstring, (&__pyx_v_xtype));
+
+  /* "netCDF4.pyx":3871
+ *     size = dt.itemsize
+ *     ierr = nc_def_compound(grp._grpid, size, namstring, &xtype)
+ *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     names = list(dt.fields.keys())
+ */
+  __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_5) {
+
+    /* "netCDF4.pyx":3872
+ *     ierr = nc_def_compound(grp._grpid, size, namstring, &xtype)
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *     names = list(dt.fields.keys())
+ *     formats = [v[0] for v in dt.fields.values()]
+ */
+    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":3873
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     names = list(dt.fields.keys())             # <<<<<<<<<<<<<<
+ *     formats = [v[0] for v in dt.fields.values()]
+ *     offsets = [v[1] for v in dt.fields.values()]
+ */
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_keys); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_6 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
+    if (likely(__pyx_t_6)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+      __Pyx_INCREF(__pyx_t_6);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_7, function);
+    }
+  }
+  if (__pyx_t_6) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_7 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_names = __pyx_t_7;
+  __pyx_t_7 = 0;
+
+  /* "netCDF4.pyx":3874
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     names = list(dt.fields.keys())
+ *     formats = [v[0] for v in dt.fields.values()]             # <<<<<<<<<<<<<<
+ *     offsets = [v[1] for v in dt.fields.values()]
+ *     # make sure entries in lists sorted by offset.
+ */
+  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_6 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) {
+    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
+    if (likely(__pyx_t_6)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+      __Pyx_INCREF(__pyx_t_6);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_8, function);
+    }
+  }
+  if (__pyx_t_6) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_8 = __pyx_t_1; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0;
+    __pyx_t_10 = NULL;
+  } else {
+    __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_10)) {
+      if (likely(PyList_CheckExact(__pyx_t_8))) {
+        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_1 = __pyx_t_10(__pyx_t_8);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3874; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_1);
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __pyx_v_formats = __pyx_t_7;
+  __pyx_t_7 = 0;
+
+  /* "netCDF4.pyx":3875
+ *     names = list(dt.fields.keys())
+ *     formats = [v[0] for v in dt.fields.values()]
+ *     offsets = [v[1] for v in dt.fields.values()]             # <<<<<<<<<<<<<<
+ *     # make sure entries in lists sorted by offset.
+ *     # (don't know why this is necessary, but it is for version 4.0.1)
+ */
+  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_1)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_1);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+    }
+  }
+  if (__pyx_t_1) {
+    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  } else {
+    __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
+    __pyx_t_6 = __pyx_t_8; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
+    __pyx_t_10 = NULL;
+  } else {
+    __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_10)) {
+      if (likely(PyList_CheckExact(__pyx_t_6))) {
+        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_8 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_8 = __pyx_t_10(__pyx_t_6);
+      if (unlikely(!__pyx_t_8)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_8);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_8);
+    __pyx_t_8 = 0;
+    __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_v, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_8);
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_8))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_v_offsets = ((PyObject*)__pyx_t_7);
+  __pyx_t_7 = 0;
+
+  /* "netCDF4.pyx":3878
+ *     # make sure entries in lists sorted by offset.
+ *     # (don't know why this is necessary, but it is for version 4.0.1)
+ *     names = _sortbylist(names, offsets)             # <<<<<<<<<<<<<<
+ *     formats = _sortbylist(formats, offsets)
+ *     offsets.sort()
+ */
+  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_8 = NULL;
+  __pyx_t_9 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_8)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_8);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+      __pyx_t_9 = 1;
+    }
+  }
+  __pyx_t_1 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (__pyx_t_8) {
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+  }
+  __Pyx_INCREF(__pyx_v_names);
+  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_9, __pyx_v_names);
+  __Pyx_GIVEREF(__pyx_v_names);
+  __Pyx_INCREF(__pyx_v_offsets);
+  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_9, __pyx_v_offsets);
+  __Pyx_GIVEREF(__pyx_v_offsets);
+  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF_SET(__pyx_v_names, __pyx_t_7);
+  __pyx_t_7 = 0;
+
+  /* "netCDF4.pyx":3879
+ *     # (don't know why this is necessary, but it is for version 4.0.1)
+ *     names = _sortbylist(names, offsets)
+ *     formats = _sortbylist(formats, offsets)             # <<<<<<<<<<<<<<
+ *     offsets.sort()
+ *     for name, format, offset in zip(names, formats, offsets):
+ */
+  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_1 = NULL;
+  __pyx_t_9 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_1)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_1);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+      __pyx_t_9 = 1;
+    }
+  }
+  __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  if (__pyx_t_1) {
+    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+  }
+  __Pyx_INCREF(__pyx_v_formats);
+  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_v_formats);
+  __Pyx_GIVEREF(__pyx_v_formats);
+  __Pyx_INCREF(__pyx_v_offsets);
+  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_v_offsets);
+  __Pyx_GIVEREF(__pyx_v_offsets);
+  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF_SET(__pyx_v_formats, __pyx_t_7);
+  __pyx_t_7 = 0;
+
+  /* "netCDF4.pyx":3880
+ *     names = _sortbylist(names, offsets)
+ *     formats = _sortbylist(formats, offsets)
+ *     offsets.sort()             # <<<<<<<<<<<<<<
+ *     for name, format, offset in zip(names, formats, offsets):
+ *         bytestr = _strencode(name)
+ */
+  __pyx_t_11 = PyList_Sort(__pyx_v_offsets); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":3881
+ *     formats = _sortbylist(formats, offsets)
+ *     offsets.sort()
+ *     for name, format, offset in zip(names, formats, offsets):             # <<<<<<<<<<<<<<
+ *         bytestr = _strencode(name)
+ *         namstring = bytestr
+ */
+  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_8 = NULL;
+  __pyx_t_9 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_8)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_8);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+      __pyx_t_9 = 1;
+    }
+  }
+  __pyx_t_1 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (__pyx_t_8) {
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+  }
+  __Pyx_INCREF(__pyx_v_names);
+  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_9, __pyx_v_names);
+  __Pyx_GIVEREF(__pyx_v_names);
+  __Pyx_INCREF(__pyx_v_formats);
+  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_9, __pyx_v_formats);
+  __Pyx_GIVEREF(__pyx_v_formats);
+  __Pyx_INCREF(__pyx_v_offsets);
+  PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_9, __pyx_v_offsets);
+  __Pyx_GIVEREF(__pyx_v_offsets);
+  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
+    __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
+    __pyx_t_10 = NULL;
+  } else {
+    __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_10)) {
+      if (likely(PyList_CheckExact(__pyx_t_6))) {
+        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_7 = __pyx_t_10(__pyx_t_6);
+      if (unlikely(!__pyx_t_7)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_7);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
+      PyObject* sequence = __pyx_t_7;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 3)) {
+        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
+        __pyx_t_12 = PyTuple_GET_ITEM(sequence, 2); 
+      } else {
+        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
+        __pyx_t_12 = PyList_GET_ITEM(sequence, 2); 
+      }
+      __Pyx_INCREF(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_8);
+      __Pyx_INCREF(__pyx_t_12);
+      #else
+      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __pyx_t_12 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_12);
+      #endif
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_13 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_13);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext;
+      index = 0; __pyx_t_1 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L10_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_1);
+      index = 1; __pyx_t_8 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_8)) goto __pyx_L10_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_8);
+      index = 2; __pyx_t_12 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L10_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_12);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_14 = NULL;
+      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+      goto __pyx_L11_unpacking_done;
+      __pyx_L10_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+      __pyx_t_14 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L11_unpacking_done:;
+    }
+    __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_12); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
+    __pyx_t_1 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_format, __pyx_t_8);
+    __pyx_t_8 = 0;
+    __pyx_v_offset = __pyx_t_3;
+
+    /* "netCDF4.pyx":3882
+ *     offsets.sort()
+ *     for name, format, offset in zip(names, formats, offsets):
+ *         bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *         namstring = bytestr
+ *         if format.kind != 'V': # scalar primitive type
+ */
+    __pyx_t_7 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_7);
+    __pyx_t_7 = 0;
+
+    /* "netCDF4.pyx":3883
+ *     for name, format, offset in zip(names, formats, offsets):
+ *         bytestr = _strencode(name)
+ *         namstring = bytestr             # <<<<<<<<<<<<<<
+ *         if format.kind != 'V': # scalar primitive type
+ *             try:
+ */
+    __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_namstring = __pyx_t_2;
+
+    /* "netCDF4.pyx":3884
+ *         bytestr = _strencode(name)
+ *         namstring = bytestr
+ *         if format.kind != 'V': # scalar primitive type             # <<<<<<<<<<<<<<
+ *             try:
+ *                 xtype_tmp = _nptonctype[format.str[1:]]
+ */
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_kind); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_V, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    if (__pyx_t_5) {
+
+      /* "netCDF4.pyx":3885
+ *         namstring = bytestr
+ *         if format.kind != 'V': # scalar primitive type
+ *             try:             # <<<<<<<<<<<<<<
+ *                 xtype_tmp = _nptonctype[format.str[1:]]
+ *             except KeyError:
+ */
+      {
+        __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
+        __Pyx_XGOTREF(__pyx_t_15);
+        __Pyx_XGOTREF(__pyx_t_16);
+        __Pyx_XGOTREF(__pyx_t_17);
+        /*try:*/ {
+
+          /* "netCDF4.pyx":3886
+ *         if format.kind != 'V': # scalar primitive type
+ *             try:
+ *                 xtype_tmp = _nptonctype[format.str[1:]]             # <<<<<<<<<<<<<<
+ *             except KeyError:
+ *                 raise ValueError('Unsupported compound type element')
+ */
+          __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3886; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_str); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3886; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_t_12, 1, 0, NULL, NULL, &__pyx_slice__104, 1, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3886; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+          __pyx_t_12 = PyObject_GetItem(__pyx_t_7, __pyx_t_8); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3886; __pyx_clineno = __LINE__; goto __pyx_L13_error;};
+          __Pyx_GOTREF(__pyx_t_12);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          __pyx_t_18 = __Pyx_PyInt_As_nc_type(__pyx_t_12); if (unlikely((__pyx_t_18 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3886; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+          __pyx_v_xtype_tmp = __pyx_t_18;
+        }
+        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+        goto __pyx_L20_try_end;
+        __pyx_L13_error:;
+        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+
+        /* "netCDF4.pyx":3887
+ *             try:
+ *                 xtype_tmp = _nptonctype[format.str[1:]]
+ *             except KeyError:             # <<<<<<<<<<<<<<
+ *                 raise ValueError('Unsupported compound type element')
+ *             ierr = nc_insert_compound(grp._grpid, xtype, namstring,
+ */
+        __pyx_t_4 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+        if (__pyx_t_4) {
+          __Pyx_AddTraceback("netCDF4._def_compound", __pyx_clineno, __pyx_lineno, __pyx_filename);
+          if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_8, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3887; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_GOTREF(__pyx_t_7);
+
+          /* "netCDF4.pyx":3888
+ *                 xtype_tmp = _nptonctype[format.str[1:]]
+ *             except KeyError:
+ *                 raise ValueError('Unsupported compound type element')             # <<<<<<<<<<<<<<
+ *             ierr = nc_insert_compound(grp._grpid, xtype, namstring,
+ *                                       offset, xtype_tmp)
+ */
+          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3888; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
+          __Pyx_GOTREF(__pyx_t_1);
+          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3888; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
+        }
+        goto __pyx_L15_except_error;
+        __pyx_L15_except_error:;
+        __Pyx_XGIVEREF(__pyx_t_15);
+        __Pyx_XGIVEREF(__pyx_t_16);
+        __Pyx_XGIVEREF(__pyx_t_17);
+        __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
+        goto __pyx_L1_error;
+        __pyx_L20_try_end:;
+      }
+
+      /* "netCDF4.pyx":3889
+ *             except KeyError:
+ *                 raise ValueError('Unsupported compound type element')
+ *             ierr = nc_insert_compound(grp._grpid, xtype, namstring,             # <<<<<<<<<<<<<<
+ *                                       offset, xtype_tmp)
+ *             if ierr != NC_NOERR:
+ */
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+      /* "netCDF4.pyx":3890
+ *                 raise ValueError('Unsupported compound type element')
+ *             ierr = nc_insert_compound(grp._grpid, xtype, namstring,
+ *                                       offset, xtype_tmp)             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+      __pyx_v_ierr = nc_insert_compound(__pyx_t_4, __pyx_v_xtype, __pyx_v_namstring, __pyx_v_offset, __pyx_v_xtype_tmp);
+
+      /* "netCDF4.pyx":3891
+ *             ierr = nc_insert_compound(grp._grpid, xtype, namstring,
+ *                                       offset, xtype_tmp)
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         else:
+ */
+      __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_5) {
+
+        /* "netCDF4.pyx":3892
+ *                                       offset, xtype_tmp)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         else:
+ *             if format.shape ==  (): # nested scalar compound type
+ */
+        __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_INCREF(__pyx_t_7);
+        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
+        __Pyx_GIVEREF(__pyx_t_7);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      goto __pyx_L12;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3894
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         else:
+ *             if format.shape ==  (): # nested scalar compound type             # <<<<<<<<<<<<<<
+ *                 # find this compound type in this group or it's parents.
+ *                 xtype_tmp = _find_cmptype(grp, format)
+ */
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_8 = PyObject_RichCompare(__pyx_t_7, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      if (__pyx_t_5) {
+
+        /* "netCDF4.pyx":3896
+ *             if format.shape ==  (): # nested scalar compound type
+ *                 # find this compound type in this group or it's parents.
+ *                 xtype_tmp = _find_cmptype(grp, format)             # <<<<<<<<<<<<<<
+ *                 bytestr = _strencode(name)
+ *                 nested_namstring = bytestr
+ */
+        __pyx_t_8 = __pyx_f_7netCDF4__find_cmptype(__pyx_v_grp, __pyx_v_format); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __pyx_t_18 = __Pyx_PyInt_As_nc_type(__pyx_t_8); if (unlikely((__pyx_t_18 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __pyx_v_xtype_tmp = __pyx_t_18;
+
+        /* "netCDF4.pyx":3897
+ *                 # find this compound type in this group or it's parents.
+ *                 xtype_tmp = _find_cmptype(grp, format)
+ *                 bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *                 nested_namstring = bytestr
+ *                 ierr = nc_insert_compound(grp._grpid, xtype,\
+ */
+        __pyx_t_8 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_8);
+        __pyx_t_8 = 0;
+
+        /* "netCDF4.pyx":3898
+ *                 xtype_tmp = _find_cmptype(grp, format)
+ *                 bytestr = _strencode(name)
+ *                 nested_namstring = bytestr             # <<<<<<<<<<<<<<
+ *                 ierr = nc_insert_compound(grp._grpid, xtype,\
+ *                                           nested_namstring,\
+ */
+        __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_v_nested_namstring = __pyx_t_2;
+
+        /* "netCDF4.pyx":3899
+ *                 bytestr = _strencode(name)
+ *                 nested_namstring = bytestr
+ *                 ierr = nc_insert_compound(grp._grpid, xtype,\             # <<<<<<<<<<<<<<
+ *                                           nested_namstring,\
+ *                                           offset, xtype_tmp)
+ */
+        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+        /* "netCDF4.pyx":3901
+ *                 ierr = nc_insert_compound(grp._grpid, xtype,\
+ *                                           nested_namstring,\
+ *                                           offset, xtype_tmp)             # <<<<<<<<<<<<<<
+ *                 if ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+        __pyx_v_ierr = nc_insert_compound(__pyx_t_4, __pyx_v_xtype, __pyx_v_nested_namstring, __pyx_v_offset, __pyx_v_xtype_tmp);
+
+        /* "netCDF4.pyx":3902
+ *                                           nested_namstring,\
+ *                                           offset, xtype_tmp)
+ *                 if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             else: # array compound element
+ */
+        __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
+        if (__pyx_t_5) {
+
+          /* "netCDF4.pyx":3903
+ *                                           offset, xtype_tmp)
+ *                 if ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             else: # array compound element
+ *                 ndims = len(format.shape)
+ */
+          __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+          __pyx_t_8 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_INCREF(__pyx_t_8);
+          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
+          __Pyx_GIVEREF(__pyx_t_8);
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        goto __pyx_L24;
+      }
+      /*else*/ {
+
+        /* "netCDF4.pyx":3905
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             else: # array compound element
+ *                 ndims = len(format.shape)             # <<<<<<<<<<<<<<
+ *                 for n from 0 <= n < ndims:
+ *                     dim_sizes[n] = format.shape[n]
+ */
+        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_8);
+        __pyx_t_19 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_19 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __pyx_v_ndims = __pyx_t_19;
+
+        /* "netCDF4.pyx":3906
+ *             else: # array compound element
+ *                 ndims = len(format.shape)
+ *                 for n from 0 <= n < ndims:             # <<<<<<<<<<<<<<
+ *                     dim_sizes[n] = format.shape[n]
+ *                 if format.subdtype[0].str[1] != 'V': # primitive type.
+ */
+        __pyx_t_4 = __pyx_v_ndims;
+        for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {
+
+          /* "netCDF4.pyx":3907
+ *                 ndims = len(format.shape)
+ *                 for n from 0 <= n < ndims:
+ *                     dim_sizes[n] = format.shape[n]             # <<<<<<<<<<<<<<
+ *                 if format.subdtype[0].str[1] != 'V': # primitive type.
+ *                     try:
+ */
+          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_8, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3907; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          (__pyx_v_dim_sizes[__pyx_v_n]) = __pyx_t_20;
+        }
+
+        /* "netCDF4.pyx":3908
+ *                 for n from 0 <= n < ndims:
+ *                     dim_sizes[n] = format.shape[n]
+ *                 if format.subdtype[0].str[1] != 'V': # primitive type.             # <<<<<<<<<<<<<<
+ *                     try:
+ *                         xtype_tmp = _nptonctype[format.subdtype[0].str[1:]]
+ */
+        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_str); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_V, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        if (__pyx_t_5) {
+
+          /* "netCDF4.pyx":3909
+ *                     dim_sizes[n] = format.shape[n]
+ *                 if format.subdtype[0].str[1] != 'V': # primitive type.
+ *                     try:             # <<<<<<<<<<<<<<
+ *                         xtype_tmp = _nptonctype[format.subdtype[0].str[1:]]
+ *                     except KeyError:
+ */
+          {
+            __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
+            __Pyx_XGOTREF(__pyx_t_17);
+            __Pyx_XGOTREF(__pyx_t_16);
+            __Pyx_XGOTREF(__pyx_t_15);
+            /*try:*/ {
+
+              /* "netCDF4.pyx":3910
+ *                 if format.subdtype[0].str[1] != 'V': # primitive type.
+ *                     try:
+ *                         xtype_tmp = _nptonctype[format.subdtype[0].str[1:]]             # <<<<<<<<<<<<<<
+ *                     except KeyError:
+ *                         raise ValueError('Unsupported compound type element')
+ */
+              __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3910; __pyx_clineno = __LINE__; goto __pyx_L29_error;}
+              __Pyx_GOTREF(__pyx_t_8);
+              __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3910; __pyx_clineno = __LINE__; goto __pyx_L29_error;}
+              __Pyx_GOTREF(__pyx_t_7);
+              __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3910; __pyx_clineno = __LINE__; goto __pyx_L29_error;};
+              __Pyx_GOTREF(__pyx_t_12);
+              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+              __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_str); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3910; __pyx_clineno = __LINE__; goto __pyx_L29_error;}
+              __Pyx_GOTREF(__pyx_t_7);
+              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+              __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_t_7, 1, 0, NULL, NULL, &__pyx_slice__106, 1, 0, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3910; __pyx_clineno = __LINE__; goto __pyx_L29_error;}
+              __Pyx_GOTREF(__pyx_t_12);
+              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+              __pyx_t_7 = PyObject_GetItem(__pyx_t_8, __pyx_t_12); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3910; __pyx_clineno = __LINE__; goto __pyx_L29_error;};
+              __Pyx_GOTREF(__pyx_t_7);
+              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+              __pyx_t_18 = __Pyx_PyInt_As_nc_type(__pyx_t_7); if (unlikely((__pyx_t_18 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3910; __pyx_clineno = __LINE__; goto __pyx_L29_error;}
+              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+              __pyx_v_xtype_tmp = __pyx_t_18;
+            }
+            __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+            goto __pyx_L36_try_end;
+            __pyx_L29_error:;
+            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+            /* "netCDF4.pyx":3911
+ *                     try:
+ *                         xtype_tmp = _nptonctype[format.subdtype[0].str[1:]]
+ *                     except KeyError:             # <<<<<<<<<<<<<<
+ *                         raise ValueError('Unsupported compound type element')
+ *                     ierr = nc_insert_array_compound(grp._grpid,xtype,namstring,
+ */
+            __pyx_t_4 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+            if (__pyx_t_4) {
+              __Pyx_AddTraceback("netCDF4._def_compound", __pyx_clineno, __pyx_lineno, __pyx_filename);
+              if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_12, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3911; __pyx_clineno = __LINE__; goto __pyx_L31_except_error;}
+              __Pyx_GOTREF(__pyx_t_7);
+              __Pyx_GOTREF(__pyx_t_12);
+              __Pyx_GOTREF(__pyx_t_8);
+
+              /* "netCDF4.pyx":3912
+ *                         xtype_tmp = _nptonctype[format.subdtype[0].str[1:]]
+ *                     except KeyError:
+ *                         raise ValueError('Unsupported compound type element')             # <<<<<<<<<<<<<<
+ *                     ierr = nc_insert_array_compound(grp._grpid,xtype,namstring,
+ *                            offset,xtype_tmp,ndims,dim_sizes)
+ */
+              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3912; __pyx_clineno = __LINE__; goto __pyx_L31_except_error;}
+              __Pyx_GOTREF(__pyx_t_1);
+              __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3912; __pyx_clineno = __LINE__; goto __pyx_L31_except_error;}
+            }
+            goto __pyx_L31_except_error;
+            __pyx_L31_except_error:;
+            __Pyx_XGIVEREF(__pyx_t_17);
+            __Pyx_XGIVEREF(__pyx_t_16);
+            __Pyx_XGIVEREF(__pyx_t_15);
+            __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
+            goto __pyx_L1_error;
+            __pyx_L36_try_end:;
+          }
+
+          /* "netCDF4.pyx":3913
+ *                     except KeyError:
+ *                         raise ValueError('Unsupported compound type element')
+ *                     ierr = nc_insert_array_compound(grp._grpid,xtype,namstring,             # <<<<<<<<<<<<<<
+ *                            offset,xtype_tmp,ndims,dim_sizes)
+ *                     if ierr != NC_NOERR:
+ */
+          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+          /* "netCDF4.pyx":3914
+ *                         raise ValueError('Unsupported compound type element')
+ *                     ierr = nc_insert_array_compound(grp._grpid,xtype,namstring,
+ *                            offset,xtype_tmp,ndims,dim_sizes)             # <<<<<<<<<<<<<<
+ *                     if ierr != NC_NOERR:
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+          __pyx_v_ierr = nc_insert_array_compound(__pyx_t_4, __pyx_v_xtype, __pyx_v_namstring, __pyx_v_offset, __pyx_v_xtype_tmp, __pyx_v_ndims, __pyx_v_dim_sizes);
+
+          /* "netCDF4.pyx":3915
+ *                     ierr = nc_insert_array_compound(grp._grpid,xtype,namstring,
+ *                            offset,xtype_tmp,ndims,dim_sizes)
+ *                     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 else: # nested array compound type.
+ */
+          __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
+          if (__pyx_t_5) {
+
+            /* "netCDF4.pyx":3916
+ *                            offset,xtype_tmp,ndims,dim_sizes)
+ *                     if ierr != NC_NOERR:
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *                 else: # nested array compound type.
+ *                     # find this compound type in this group or it's parents.
+ */
+            __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+            __pyx_t_8 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_8);
+            __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_12);
+            __Pyx_INCREF(__pyx_t_8);
+            PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8);
+            __Pyx_GIVEREF(__pyx_t_8);
+            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+            __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_8);
+            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+            __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          goto __pyx_L28;
+        }
+        /*else*/ {
+
+          /* "netCDF4.pyx":3919
+ *                 else: # nested array compound type.
+ *                     # find this compound type in this group or it's parents.
+ *                     xtype_tmp = _find_cmptype(grp, format.subdtype[0])             # <<<<<<<<<<<<<<
+ *                     bytestr = _strencode(name)
+ *                     nested_namstring = bytestr
+ */
+          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3919; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+          __Pyx_GOTREF(__pyx_t_12);
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          __pyx_t_8 = __pyx_f_7netCDF4__find_cmptype(__pyx_v_grp, __pyx_t_12); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+          __pyx_t_18 = __Pyx_PyInt_As_nc_type(__pyx_t_8); if (unlikely((__pyx_t_18 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+          __pyx_v_xtype_tmp = __pyx_t_18;
+
+          /* "netCDF4.pyx":3920
+ *                     # find this compound type in this group or it's parents.
+ *                     xtype_tmp = _find_cmptype(grp, format.subdtype[0])
+ *                     bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *                     nested_namstring = bytestr
+ *                     ierr = nc_insert_array_compound(grp._grpid,xtype,\
+ */
+          __pyx_t_8 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_8);
+          __pyx_t_8 = 0;
+
+          /* "netCDF4.pyx":3921
+ *                     xtype_tmp = _find_cmptype(grp, format.subdtype[0])
+ *                     bytestr = _strencode(name)
+ *                     nested_namstring = bytestr             # <<<<<<<<<<<<<<
+ *                     ierr = nc_insert_array_compound(grp._grpid,xtype,\
+ *                                                     nested_namstring,\
+ */
+          __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_v_nested_namstring = __pyx_t_2;
+
+          /* "netCDF4.pyx":3922
+ *                     bytestr = _strencode(name)
+ *                     nested_namstring = bytestr
+ *                     ierr = nc_insert_array_compound(grp._grpid,xtype,\             # <<<<<<<<<<<<<<
+ *                                                     nested_namstring,\
+ *                                                     offset,xtype_tmp,\
+ */
+          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+          /* "netCDF4.pyx":3925
+ *                                                     nested_namstring,\
+ *                                                     offset,xtype_tmp,\
+ *                                                     ndims,dim_sizes)             # <<<<<<<<<<<<<<
+ *                     if ierr != NC_NOERR:
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+          __pyx_v_ierr = nc_insert_array_compound(__pyx_t_4, __pyx_v_xtype, __pyx_v_nested_namstring, __pyx_v_offset, __pyx_v_xtype_tmp, __pyx_v_ndims, __pyx_v_dim_sizes);
+
+          /* "netCDF4.pyx":3926
+ *                                                     offset,xtype_tmp,\
+ *                                                     ndims,dim_sizes)
+ *                     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     return xtype
+ */
+          __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
+          if (__pyx_t_5) {
+
+            /* "netCDF4.pyx":3927
+ *                                                     ndims,dim_sizes)
+ *                     if ierr != NC_NOERR:
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *     return xtype
+ * 
+ */
+            __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
+            __pyx_t_8 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_8);
+            __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_12);
+            __Pyx_INCREF(__pyx_t_8);
+            PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8);
+            __Pyx_GIVEREF(__pyx_t_8);
+            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+            __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_8);
+            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+            __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+        }
+        __pyx_L28:;
+      }
+      __pyx_L24:;
+    }
+    __pyx_L12:;
+
+    /* "netCDF4.pyx":3881
+ *     formats = _sortbylist(formats, offsets)
+ *     offsets.sort()
+ *     for name, format, offset in zip(names, formats, offsets):             # <<<<<<<<<<<<<<
+ *         bytestr = _strencode(name)
+ *         namstring = bytestr
+ */
+  }
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+  /* "netCDF4.pyx":3928
+ *                     if ierr != NC_NOERR:
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     return xtype             # <<<<<<<<<<<<<<
+ * 
+ * cdef _find_cmptype(grp, dtype):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_6 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_r = __pyx_t_6;
+  __pyx_t_6 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":3858
+ *         (self.name,self.dtype)
+ * 
+ * cdef _def_compound(grp, object dt, object dtype_name):             # <<<<<<<<<<<<<<
+ *     # private function used to construct a netcdf compound data type
+ *     # from a numpy dtype object by CompoundType.__init__.
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_12);
+  __Pyx_XDECREF(__pyx_t_13);
+  __Pyx_AddTraceback("netCDF4._def_compound", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_bytestr);
+  __Pyx_XDECREF(__pyx_v_names);
+  __Pyx_XDECREF(__pyx_v_formats);
+  __Pyx_XDECREF(__pyx_v_offsets);
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XDECREF(__pyx_v_format);
+  __Pyx_XDECREF(__pyx_v_v);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3930
+ *     return xtype
+ * 
+ * cdef _find_cmptype(grp, dtype):             # <<<<<<<<<<<<<<
+ *     # look for data type in this group and it's parents.
+ *     # return datatype id when found, if not found, raise exception.
+ */
+
+static PyObject *__pyx_f_7netCDF4__find_cmptype(PyObject *__pyx_v_grp, PyObject *__pyx_v_dtype) {
+  nc_type __pyx_v_xtype;
+  int __pyx_v_match;
+  CYTHON_UNUSED PyObject *__pyx_v_cmpname = NULL;
+  PyObject *__pyx_v_cmpdt = NULL;
+  PyObject *__pyx_v_names1 = NULL;
+  PyObject *__pyx_v_names2 = NULL;
+  PyObject *__pyx_v_formats1 = NULL;
+  PyObject *__pyx_v_formats2 = NULL;
+  PyObject *__pyx_v_parent_grp = NULL;
+  PyObject *__pyx_v_v = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  Py_ssize_t __pyx_t_4;
+  PyObject *(*__pyx_t_5)(PyObject *);
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *(*__pyx_t_8)(PyObject *);
+  nc_type __pyx_t_9;
+  Py_ssize_t __pyx_t_10;
+  PyObject *(*__pyx_t_11)(PyObject *);
+  int __pyx_t_12;
+  int __pyx_t_13;
+  PyObject *__pyx_t_14 = NULL;
+  PyObject *__pyx_t_15 = NULL;
+  PyObject *__pyx_t_16 = NULL;
+  int __pyx_t_17;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_find_cmptype", 0);
+
+  /* "netCDF4.pyx":3934
+ *     # return datatype id when found, if not found, raise exception.
+ *     cdef nc_type xtype
+ *     match = False             # <<<<<<<<<<<<<<
+ *     for cmpname, cmpdt in grp.cmptypes.items():
+ *         xtype = cmpdt._nc_type
+ */
+  __pyx_v_match = 0;
+
+  /* "netCDF4.pyx":3935
+ *     cdef nc_type xtype
+ *     match = False
+ *     for cmpname, cmpdt in grp.cmptypes.items():             # <<<<<<<<<<<<<<
+ *         xtype = cmpdt._nc_type
+ *         names1 = dtype.names; names2 = cmpdt.dtype.names
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_cmptypes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_2)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+    }
+  }
+  if (__pyx_t_2) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
+    __pyx_t_5 = NULL;
+  } else {
+    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_5)) {
+      if (likely(PyList_CheckExact(__pyx_t_3))) {
+        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_1 = __pyx_t_5(__pyx_t_3);
+      if (unlikely(!__pyx_t_1)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+      PyObject* sequence = __pyx_t_1;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
+      } else {
+        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
+      }
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_6);
+      #else
+      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      #endif
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
+      index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_2);
+      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_6);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = NULL;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      goto __pyx_L6_unpacking_done;
+      __pyx_L5_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_8 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L6_unpacking_done:;
+    }
+    __Pyx_XDECREF_SET(__pyx_v_cmpname, __pyx_t_2);
+    __pyx_t_2 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_cmpdt, __pyx_t_6);
+    __pyx_t_6 = 0;
+
+    /* "netCDF4.pyx":3936
+ *     match = False
+ *     for cmpname, cmpdt in grp.cmptypes.items():
+ *         xtype = cmpdt._nc_type             # <<<<<<<<<<<<<<
+ *         names1 = dtype.names; names2 = cmpdt.dtype.names
+ *         formats1 = [v[0] for v in dtype.fields.values()]
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmpdt, __pyx_n_s_nc_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_9 = __Pyx_PyInt_As_nc_type(__pyx_t_1); if (unlikely((__pyx_t_9 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_xtype = __pyx_t_9;
+
+    /* "netCDF4.pyx":3937
+ *     for cmpname, cmpdt in grp.cmptypes.items():
+ *         xtype = cmpdt._nc_type
+ *         names1 = dtype.names; names2 = cmpdt.dtype.names             # <<<<<<<<<<<<<<
+ *         formats1 = [v[0] for v in dtype.fields.values()]
+ *         formats2 = [v[0] for v in cmpdt.dtype.fields.values()]
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_names); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_XDECREF_SET(__pyx_v_names1, __pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmpdt, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_names2, __pyx_t_6);
+    __pyx_t_6 = 0;
+
+    /* "netCDF4.pyx":3938
+ *         xtype = cmpdt._nc_type
+ *         names1 = dtype.names; names2 = cmpdt.dtype.names
+ *         formats1 = [v[0] for v in dtype.fields.values()]             # <<<<<<<<<<<<<<
+ *         formats2 = [v[0] for v in cmpdt.dtype.fields.values()]
+ *         # match names, formats, but not offsets (they may be changed
+ */
+    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+      if (likely(__pyx_t_2)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+        __Pyx_INCREF(__pyx_t_2);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_7, function);
+      }
+    }
+    if (__pyx_t_2) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+      __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); __pyx_t_10 = 0;
+      __pyx_t_11 = NULL;
+    } else {
+      __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_11 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    for (;;) {
+      if (likely(!__pyx_t_11)) {
+        if (likely(PyList_CheckExact(__pyx_t_7))) {
+          if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_7)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        }
+      } else {
+        __pyx_t_1 = __pyx_t_11(__pyx_t_7);
+        if (unlikely(!__pyx_t_1)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_1);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1);
+      __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_1);
+      if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_formats1, ((PyObject*)__pyx_t_6));
+    __pyx_t_6 = 0;
+
+    /* "netCDF4.pyx":3939
+ *         names1 = dtype.names; names2 = cmpdt.dtype.names
+ *         formats1 = [v[0] for v in dtype.fields.values()]
+ *         formats2 = [v[0] for v in cmpdt.dtype.fields.values()]             # <<<<<<<<<<<<<<
+ *         # match names, formats, but not offsets (they may be changed
+ *         # by netcdf lib).
+ */
+    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmpdt, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+      if (likely(__pyx_t_2)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+        __Pyx_INCREF(__pyx_t_2);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_1, function);
+      }
+    }
+    if (__pyx_t_2) {
+      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    } else {
+      __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
+      __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
+      __pyx_t_11 = NULL;
+    } else {
+      __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    for (;;) {
+      if (likely(!__pyx_t_11)) {
+        if (likely(PyList_CheckExact(__pyx_t_1))) {
+          if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        }
+      } else {
+        __pyx_t_7 = __pyx_t_11(__pyx_t_1);
+        if (unlikely(!__pyx_t_7)) {
+          PyObject* exc_type = PyErr_Occurred();
+          if (exc_type) {
+            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_7);
+      }
+      __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
+      __pyx_t_7 = 0;
+      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3939; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_7);
+      if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_formats2, ((PyObject*)__pyx_t_6));
+    __pyx_t_6 = 0;
+
+    /* "netCDF4.pyx":3942
+ *         # match names, formats, but not offsets (they may be changed
+ *         # by netcdf lib).
+ *         if names1==names2 and formats1==formats2:             # <<<<<<<<<<<<<<
+ *             match = True
+ *             break
+ */
+    __pyx_t_6 = PyObject_RichCompare(__pyx_v_names1, __pyx_v_names2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    if (__pyx_t_13) {
+    } else {
+      __pyx_t_12 = __pyx_t_13;
+      goto __pyx_L12_bool_binop_done;
+    }
+    __pyx_t_6 = PyObject_RichCompare(__pyx_v_formats1, __pyx_v_formats2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_12 = __pyx_t_13;
+    __pyx_L12_bool_binop_done:;
+    if (__pyx_t_12) {
+
+      /* "netCDF4.pyx":3943
+ *         # by netcdf lib).
+ *         if names1==names2 and formats1==formats2:
+ *             match = True             # <<<<<<<<<<<<<<
+ *             break
+ *     if not match:
+ */
+      __pyx_v_match = 1;
+
+      /* "netCDF4.pyx":3944
+ *         if names1==names2 and formats1==formats2:
+ *             match = True
+ *             break             # <<<<<<<<<<<<<<
+ *     if not match:
+ *         try:
+ */
+      goto __pyx_L4_break;
+    }
+
+    /* "netCDF4.pyx":3935
+ *     cdef nc_type xtype
+ *     match = False
+ *     for cmpname, cmpdt in grp.cmptypes.items():             # <<<<<<<<<<<<<<
+ *         xtype = cmpdt._nc_type
+ *         names1 = dtype.names; names2 = cmpdt.dtype.names
+ */
+  }
+  __pyx_L4_break:;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+  /* "netCDF4.pyx":3945
+ *             match = True
+ *             break
+ *     if not match:             # <<<<<<<<<<<<<<
+ *         try:
+ *             parent_grp = grp.parent
+ */
+  __pyx_t_12 = ((!(__pyx_v_match != 0)) != 0);
+  if (__pyx_t_12) {
+
+    /* "netCDF4.pyx":3946
+ *             break
+ *     if not match:
+ *         try:             # <<<<<<<<<<<<<<
+ *             parent_grp = grp.parent
+ *         except AttributeError:
+ */
+    {
+      __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
+      __Pyx_XGOTREF(__pyx_t_14);
+      __Pyx_XGOTREF(__pyx_t_15);
+      __Pyx_XGOTREF(__pyx_t_16);
+      /*try:*/ {
+
+        /* "netCDF4.pyx":3947
+ *     if not match:
+ *         try:
+ *             parent_grp = grp.parent             # <<<<<<<<<<<<<<
+ *         except AttributeError:
+ *             raise ValueError("cannot find compound type in this group or parent groups")
+ */
+        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3947; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_v_parent_grp = __pyx_t_3;
+        __pyx_t_3 = 0;
+      }
+      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+      goto __pyx_L22_try_end;
+      __pyx_L15_error:;
+      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+      /* "netCDF4.pyx":3948
+ *         try:
+ *             parent_grp = grp.parent
+ *         except AttributeError:             # <<<<<<<<<<<<<<
+ *             raise ValueError("cannot find compound type in this group or parent groups")
+ *         if parent_grp is None:
+ */
+      __pyx_t_17 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
+      if (__pyx_t_17) {
+        __Pyx_AddTraceback("netCDF4._find_cmptype", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3948; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_GOTREF(__pyx_t_1);
+
+        /* "netCDF4.pyx":3949
+ *             parent_grp = grp.parent
+ *         except AttributeError:
+ *             raise ValueError("cannot find compound type in this group or parent groups")             # <<<<<<<<<<<<<<
+ *         if parent_grp is None:
+ *             raise ValueError("cannot find compound type in this group or parent groups")
+ */
+        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__108, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3949; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3949; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
+      }
+      goto __pyx_L17_except_error;
+      __pyx_L17_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_14);
+      __Pyx_XGIVEREF(__pyx_t_15);
+      __Pyx_XGIVEREF(__pyx_t_16);
+      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
+      goto __pyx_L1_error;
+      __pyx_L22_try_end:;
+    }
+
+    /* "netCDF4.pyx":3950
+ *         except AttributeError:
+ *             raise ValueError("cannot find compound type in this group or parent groups")
+ *         if parent_grp is None:             # <<<<<<<<<<<<<<
+ *             raise ValueError("cannot find compound type in this group or parent groups")
+ *         else:
+ */
+    __pyx_t_12 = (__pyx_v_parent_grp == Py_None);
+    __pyx_t_13 = (__pyx_t_12 != 0);
+    if (__pyx_t_13) {
+
+      /* "netCDF4.pyx":3951
+ *             raise ValueError("cannot find compound type in this group or parent groups")
+ *         if parent_grp is None:
+ *             raise ValueError("cannot find compound type in this group or parent groups")             # <<<<<<<<<<<<<<
+ *         else:
+ *             xtype = _find_cmptype(parent_grp,dtype)
+ */
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":3953
+ *             raise ValueError("cannot find compound type in this group or parent groups")
+ *         else:
+ *             xtype = _find_cmptype(parent_grp,dtype)             # <<<<<<<<<<<<<<
+ *     return xtype
+ * 
+ */
+      __pyx_t_1 = __pyx_f_7netCDF4__find_cmptype(__pyx_v_parent_grp, __pyx_v_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_9 = __Pyx_PyInt_As_nc_type(__pyx_t_1); if (unlikely((__pyx_t_9 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_xtype = __pyx_t_9;
+    }
+    goto __pyx_L14;
+  }
+  __pyx_L14:;
+
+  /* "netCDF4.pyx":3954
+ *         else:
+ *             xtype = _find_cmptype(parent_grp,dtype)
+ *     return xtype             # <<<<<<<<<<<<<<
+ * 
+ * cdef _read_compound(group, nc_type xtype):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":3930
+ *     return xtype
+ * 
+ * cdef _find_cmptype(grp, dtype):             # <<<<<<<<<<<<<<
+ *     # look for data type in this group and it's parents.
+ *     # return datatype id when found, if not found, raise exception.
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_AddTraceback("netCDF4._find_cmptype", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_cmpname);
+  __Pyx_XDECREF(__pyx_v_cmpdt);
+  __Pyx_XDECREF(__pyx_v_names1);
+  __Pyx_XDECREF(__pyx_v_names2);
+  __Pyx_XDECREF(__pyx_v_formats1);
+  __Pyx_XDECREF(__pyx_v_formats2);
+  __Pyx_XDECREF(__pyx_v_parent_grp);
+  __Pyx_XDECREF(__pyx_v_v);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":3956
+ *     return xtype
+ * 
+ * cdef _read_compound(group, nc_type xtype):             # <<<<<<<<<<<<<<
+ *     # read a compound data type id from an existing file,
+ *     # construct a corresponding numpy dtype instance,
+ */
+
+static PyObject *__pyx_f_7netCDF4__read_compound(PyObject *__pyx_v_group, nc_type __pyx_v_xtype) {
+  int __pyx_v_ierr;
+  int __pyx_v_nf;
+  int __pyx_v_numdims;
+  int __pyx_v_ndim;
+  int __pyx_v_classp;
+  size_t __pyx_v_nfields;
+  size_t __pyx_v_offset;
+  nc_type __pyx_v_field_typeid;
+  int __pyx_v_dim_sizes[NC_MAX_DIMS];
+  char __pyx_v_field_namstring[(NC_MAX_NAME + 1)];
+  char __pyx_v_cmp_namstring[(NC_MAX_NAME + 1)];
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_v_names = NULL;
+  PyObject *__pyx_v_formats = NULL;
+  PyObject *__pyx_v_offsets = NULL;
+  PyObject *__pyx_v_field_name = NULL;
+  PyObject *__pyx_v_field_shape = NULL;
+  PyObject *__pyx_v_field_type = NULL;
+  PyObject *__pyx_v_dtype_dict = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  char *__pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  Py_ssize_t __pyx_t_9;
+  PyObject *__pyx_t_10 = NULL;
+  size_t __pyx_t_11;
+  int __pyx_t_12;
+  PyObject *__pyx_t_13 = NULL;
+  PyObject *__pyx_t_14 = NULL;
+  PyObject *__pyx_t_15 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_read_compound", 0);
+
+  /* "netCDF4.pyx":3969
+ *     cdef char cmp_namstring[NC_MAX_NAME+1]
+ *     # get name and number of fields.
+ *     ierr = nc_inq_compound(group._grpid, xtype, cmp_namstring, NULL, &nfields)             # <<<<<<<<<<<<<<
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_ierr = nc_inq_compound(__pyx_t_2, __pyx_v_xtype, __pyx_v_cmp_namstring, NULL, (&__pyx_v_nfields));
+
+  /* "netCDF4.pyx":3970
+ *     # get name and number of fields.
+ *     ierr = nc_inq_compound(group._grpid, xtype, cmp_namstring, NULL, &nfields)
+ *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     name = cmp_namstring.decode(default_encoding,unicode_error)
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4.pyx":3971
+ *     ierr = nc_inq_compound(group._grpid, xtype, cmp_namstring, NULL, &nfields)
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *     name = cmp_namstring.decode(default_encoding,unicode_error)
+ *     # loop over fields.
+ */
+    __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_t_1);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":3972
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     name = cmp_namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+ *     # loop over fields.
+ *     names = []
+ */
+  __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_cmp_namstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_8 = NULL;
+  __pyx_t_9 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+    if (likely(__pyx_t_8)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_8);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_6, function);
+      __pyx_t_9 = 1;
+    }
+  }
+  __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  if (__pyx_t_8) {
+    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+  }
+  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
+  __Pyx_GIVEREF(__pyx_t_7);
+  __pyx_t_5 = 0;
+  __pyx_t_7 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_v_name = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":3974
+ *     name = cmp_namstring.decode(default_encoding,unicode_error)
+ *     # loop over fields.
+ *     names = []             # <<<<<<<<<<<<<<
+ *     formats = []
+ *     offsets = []
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_names = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":3975
+ *     # loop over fields.
+ *     names = []
+ *     formats = []             # <<<<<<<<<<<<<<
+ *     offsets = []
+ *     for nf from 0 <= nf < nfields:
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_formats = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":3976
+ *     names = []
+ *     formats = []
+ *     offsets = []             # <<<<<<<<<<<<<<
+ *     for nf from 0 <= nf < nfields:
+ *         ierr = nc_inq_compound_field(group._grpid,
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_offsets = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":3977
+ *     formats = []
+ *     offsets = []
+ *     for nf from 0 <= nf < nfields:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_compound_field(group._grpid,
+ *                                      xtype,
+ */
+  __pyx_t_11 = __pyx_v_nfields;
+  for (__pyx_v_nf = 0; __pyx_v_nf < __pyx_t_11; __pyx_v_nf++) {
+
+    /* "netCDF4.pyx":3978
+ *     offsets = []
+ *     for nf from 0 <= nf < nfields:
+ *         ierr = nc_inq_compound_field(group._grpid,             # <<<<<<<<<<<<<<
+ *                                      xtype,
+ *                                      nf,
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":3985
+ *                                      &field_typeid,
+ *                                      &numdims,
+ *                                      dim_sizes)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+    __pyx_v_ierr = nc_inq_compound_field(__pyx_t_2, __pyx_v_xtype, __pyx_v_nf, __pyx_v_field_namstring, (&__pyx_v_offset), (&__pyx_v_field_typeid), (&__pyx_v_numdims), __pyx_v_dim_sizes);
+
+    /* "netCDF4.pyx":3986
+ *                                      &numdims,
+ *                                      dim_sizes)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         field_name = field_namstring.decode(default_encoding,unicode_error)
+ */
+    __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":3987
+ *                                      dim_sizes)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         field_name = field_namstring.decode(default_encoding,unicode_error)
+ *         names.append(field_name)
+ */
+      __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_1);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":3988
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         field_name = field_namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+ *         names.append(field_name)
+ *         offsets.append(offset)
+ */
+    __pyx_t_6 = __Pyx_PyObject_FromString(__pyx_v_field_namstring); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_5 = NULL;
+    __pyx_t_9 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_10, function);
+        __pyx_t_9 = 1;
+      }
+    }
+    __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    if (__pyx_t_5) {
+      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+    }
+    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_t_6);
+    __Pyx_GIVEREF(__pyx_t_6);
+    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_t_7);
+    __Pyx_GIVEREF(__pyx_t_7);
+    __pyx_t_6 = 0;
+    __pyx_t_7 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":3989
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         field_name = field_namstring.decode(default_encoding,unicode_error)
+ *         names.append(field_name)             # <<<<<<<<<<<<<<
+ *         offsets.append(offset)
+ *         # if numdims=0, not an array.
+ */
+    __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_names, __pyx_v_field_name); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "netCDF4.pyx":3990
+ *         field_name = field_namstring.decode(default_encoding,unicode_error)
+ *         names.append(field_name)
+ *         offsets.append(offset)             # <<<<<<<<<<<<<<
+ *         # if numdims=0, not an array.
+ *         field_shape = ()
+ */
+    __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_offsets, __pyx_t_1); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":3992
+ *         offsets.append(offset)
+ *         # if numdims=0, not an array.
+ *         field_shape = ()             # <<<<<<<<<<<<<<
+ *         if numdims != 0:
+ *             for ndim from 0 <= ndim < numdims:
+ */
+    __Pyx_INCREF(__pyx_empty_tuple);
+    __Pyx_XDECREF_SET(__pyx_v_field_shape, __pyx_empty_tuple);
+
+    /* "netCDF4.pyx":3993
+ *         # if numdims=0, not an array.
+ *         field_shape = ()
+ *         if numdims != 0:             # <<<<<<<<<<<<<<
+ *             for ndim from 0 <= ndim < numdims:
+ *                 field_shape = field_shape + (dim_sizes[ndim],)
+ */
+    __pyx_t_3 = ((__pyx_v_numdims != 0) != 0);
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":3994
+ *         field_shape = ()
+ *         if numdims != 0:
+ *             for ndim from 0 <= ndim < numdims:             # <<<<<<<<<<<<<<
+ *                 field_shape = field_shape + (dim_sizes[ndim],)
+ *         # check to see if this field is a nested compound type.
+ */
+      __pyx_t_2 = __pyx_v_numdims;
+      for (__pyx_v_ndim = 0; __pyx_v_ndim < __pyx_t_2; __pyx_v_ndim++) {
+
+        /* "netCDF4.pyx":3995
+ *         if numdims != 0:
+ *             for ndim from 0 <= ndim < numdims:
+ *                 field_shape = field_shape + (dim_sizes[ndim],)             # <<<<<<<<<<<<<<
+ *         # check to see if this field is a nested compound type.
+ *         try:
+ */
+        __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_dim_sizes[__pyx_v_ndim])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
+        __Pyx_GIVEREF(__pyx_t_1);
+        __pyx_t_1 = 0;
+        __pyx_t_1 = PyNumber_Add(__pyx_v_field_shape, __pyx_t_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_DECREF_SET(__pyx_v_field_shape, __pyx_t_1);
+        __pyx_t_1 = 0;
+      }
+      goto __pyx_L7;
+    }
+    __pyx_L7:;
+
+    /* "netCDF4.pyx":3997
+ *                 field_shape = field_shape + (dim_sizes[ndim],)
+ *         # check to see if this field is a nested compound type.
+ *         try:             # <<<<<<<<<<<<<<
+ *             field_type =  _nctonptype[field_typeid]
+ *         except KeyError:
+ */
+    {
+      __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
+      __Pyx_XGOTREF(__pyx_t_13);
+      __Pyx_XGOTREF(__pyx_t_14);
+      __Pyx_XGOTREF(__pyx_t_15);
+      /*try:*/ {
+
+        /* "netCDF4.pyx":3998
+ *         # check to see if this field is a nested compound type.
+ *         try:
+ *             field_type =  _nctonptype[field_typeid]             # <<<<<<<<<<<<<<
+ *         except KeyError:
+ *             ierr = nc_inq_user_type(group._grpid,
+ */
+        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3998; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_field_typeid, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3998; __pyx_clineno = __LINE__; goto __pyx_L10_error;};
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_field_type, __pyx_t_10);
+        __pyx_t_10 = 0;
+      }
+      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+      goto __pyx_L17_try_end;
+      __pyx_L10_error:;
+      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+
+      /* "netCDF4.pyx":3999
+ *         try:
+ *             field_type =  _nctonptype[field_typeid]
+ *         except KeyError:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_user_type(group._grpid,
+ *                    field_typeid,NULL,NULL,NULL,NULL,&classp)
+ */
+      __pyx_t_2 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+      if (__pyx_t_2) {
+        __Pyx_AddTraceback("netCDF4._read_compound", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_1, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3999; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_GOTREF(__pyx_t_8);
+
+        /* "netCDF4.pyx":4000
+ *             field_type =  _nctonptype[field_typeid]
+ *         except KeyError:
+ *             ierr = nc_inq_user_type(group._grpid,             # <<<<<<<<<<<<<<
+ *                    field_typeid,NULL,NULL,NULL,NULL,&classp)
+ *             if classp == NC_COMPOUND: # a compound type
+ */
+        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4000; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+        /* "netCDF4.pyx":4001
+ *         except KeyError:
+ *             ierr = nc_inq_user_type(group._grpid,
+ *                    field_typeid,NULL,NULL,NULL,NULL,&classp)             # <<<<<<<<<<<<<<
+ *             if classp == NC_COMPOUND: # a compound type
+ *                 # recursively call this function?
+ */
+        __pyx_v_ierr = nc_inq_user_type(__pyx_t_2, __pyx_v_field_typeid, NULL, NULL, NULL, NULL, (&__pyx_v_classp));
+
+        /* "netCDF4.pyx":4002
+ *             ierr = nc_inq_user_type(group._grpid,
+ *                    field_typeid,NULL,NULL,NULL,NULL,&classp)
+ *             if classp == NC_COMPOUND: # a compound type             # <<<<<<<<<<<<<<
+ *                 # recursively call this function?
+ *                 field_type = _read_compound(group, field_typeid)
+ */
+        __pyx_t_3 = ((__pyx_v_classp == NC_COMPOUND) != 0);
+        if (__pyx_t_3) {
+
+          /* "netCDF4.pyx":4004
+ *             if classp == NC_COMPOUND: # a compound type
+ *                 # recursively call this function?
+ *                 field_type = _read_compound(group, field_typeid)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 raise KeyError('compound field of an unsupported data type')
+ */
+          __pyx_t_7 = __pyx_f_7netCDF4__read_compound(__pyx_v_group, __pyx_v_field_typeid); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4004; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_XDECREF_SET(__pyx_v_field_type, __pyx_t_7);
+          __pyx_t_7 = 0;
+          goto __pyx_L20;
+        }
+        /*else*/ {
+
+          /* "netCDF4.pyx":4006
+ *                 field_type = _read_compound(group, field_typeid)
+ *             else:
+ *                 raise KeyError('compound field of an unsupported data type')             # <<<<<<<<<<<<<<
+ *         if field_shape != ():
+ *             formats.append((field_type,field_shape))
+ */
+          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__110, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4006; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4006; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+        }
+        __pyx_L20:;
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        goto __pyx_L11_exception_handled;
+      }
+      goto __pyx_L12_except_error;
+      __pyx_L12_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_13);
+      __Pyx_XGIVEREF(__pyx_t_14);
+      __Pyx_XGIVEREF(__pyx_t_15);
+      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
+      goto __pyx_L1_error;
+      __pyx_L11_exception_handled:;
+      __Pyx_XGIVEREF(__pyx_t_13);
+      __Pyx_XGIVEREF(__pyx_t_14);
+      __Pyx_XGIVEREF(__pyx_t_15);
+      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
+      __pyx_L17_try_end:;
+    }
+
+    /* "netCDF4.pyx":4007
+ *             else:
+ *                 raise KeyError('compound field of an unsupported data type')
+ *         if field_shape != ():             # <<<<<<<<<<<<<<
+ *             formats.append((field_type,field_shape))
+ *         else:
+ */
+    __pyx_t_8 = PyObject_RichCompare(__pyx_v_field_shape, __pyx_empty_tuple, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    if (__pyx_t_3) {
+
+      /* "netCDF4.pyx":4008
+ *                 raise KeyError('compound field of an unsupported data type')
+ *         if field_shape != ():
+ *             formats.append((field_type,field_shape))             # <<<<<<<<<<<<<<
+ *         else:
+ *             formats.append(field_type)
+ */
+      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_INCREF(__pyx_v_field_type);
+      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_field_type);
+      __Pyx_GIVEREF(__pyx_v_field_type);
+      __Pyx_INCREF(__pyx_v_field_shape);
+      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_field_shape);
+      __Pyx_GIVEREF(__pyx_v_field_shape);
+      __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_formats, __pyx_t_8); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      goto __pyx_L21;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":4010
+ *             formats.append((field_type,field_shape))
+ *         else:
+ *             formats.append(field_type)             # <<<<<<<<<<<<<<
+ *     # make sure entries in lists sorted by offset.
+ *     names = _sortbylist(names, offsets)
+ */
+      __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_formats, __pyx_v_field_type); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __pyx_L21:;
+  }
+
+  /* "netCDF4.pyx":4012
+ *             formats.append(field_type)
+ *     # make sure entries in lists sorted by offset.
+ *     names = _sortbylist(names, offsets)             # <<<<<<<<<<<<<<
+ *     formats = _sortbylist(formats, offsets)
+ *     offsets.sort()
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_10 = NULL;
+  __pyx_t_9 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_10)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_10);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+      __pyx_t_9 = 1;
+    }
+  }
+  __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (__pyx_t_10) {
+    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = NULL;
+  }
+  __Pyx_INCREF(__pyx_v_names);
+  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, __pyx_v_names);
+  __Pyx_GIVEREF(__pyx_v_names);
+  __Pyx_INCREF(__pyx_v_offsets);
+  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_v_offsets);
+  __Pyx_GIVEREF(__pyx_v_offsets);
+  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF_SET(__pyx_v_names, __pyx_t_8);
+  __pyx_t_8 = 0;
+
+  /* "netCDF4.pyx":4013
+ *     # make sure entries in lists sorted by offset.
+ *     names = _sortbylist(names, offsets)
+ *     formats = _sortbylist(formats, offsets)             # <<<<<<<<<<<<<<
+ *     offsets.sort()
+ *     # create a dict that can be converted into a numpy dtype.
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_7 = NULL;
+  __pyx_t_9 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_7)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_7);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+      __pyx_t_9 = 1;
+    }
+  }
+  __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  if (__pyx_t_7) {
+    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL;
+  }
+  __Pyx_INCREF(__pyx_v_formats);
+  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_formats);
+  __Pyx_GIVEREF(__pyx_v_formats);
+  __Pyx_INCREF(__pyx_v_offsets);
+  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_offsets);
+  __Pyx_GIVEREF(__pyx_v_offsets);
+  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF_SET(__pyx_v_formats, __pyx_t_8);
+  __pyx_t_8 = 0;
+
+  /* "netCDF4.pyx":4014
+ *     names = _sortbylist(names, offsets)
+ *     formats = _sortbylist(formats, offsets)
+ *     offsets.sort()             # <<<<<<<<<<<<<<
+ *     # create a dict that can be converted into a numpy dtype.
+ *     dtype_dict = {'names':names,'formats':formats,'offsets':offsets}
+ */
+  __pyx_t_12 = PyList_Sort(__pyx_v_offsets); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":4016
+ *     offsets.sort()
+ *     # create a dict that can be converted into a numpy dtype.
+ *     dtype_dict = {'names':names,'formats':formats,'offsets':offsets}             # <<<<<<<<<<<<<<
+ *     return CompoundType(group, dtype_dict, name, typeid=xtype)
+ * 
+ */
+  __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_names, __pyx_v_names) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_formats, __pyx_v_formats) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_offsets, __pyx_v_offsets) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_dtype_dict = ((PyObject*)__pyx_t_8);
+  __pyx_t_8 = 0;
+
+  /* "netCDF4.pyx":4017
+ *     # create a dict that can be converted into a numpy dtype.
+ *     dtype_dict = {'names':names,'formats':formats,'offsets':offsets}
+ *     return CompoundType(group, dtype_dict, name, typeid=xtype)             # <<<<<<<<<<<<<<
+ * 
+ * # VLEN datatype support.
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_INCREF(__pyx_v_group);
+  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_group);
+  __Pyx_GIVEREF(__pyx_v_group);
+  __Pyx_INCREF(__pyx_v_dtype_dict);
+  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_dtype_dict);
+  __Pyx_GIVEREF(__pyx_v_dtype_dict);
+  __Pyx_INCREF(__pyx_v_name);
+  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_name);
+  __Pyx_GIVEREF(__pyx_v_name);
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_10 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_typeid, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_CompoundType)), __pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_r = __pyx_t_10;
+  __pyx_t_10 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":3956
+ *     return xtype
+ * 
+ * cdef _read_compound(group, nc_type xtype):             # <<<<<<<<<<<<<<
+ *     # read a compound data type id from an existing file,
+ *     # construct a corresponding numpy dtype instance,
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4._read_compound", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XDECREF(__pyx_v_names);
+  __Pyx_XDECREF(__pyx_v_formats);
+  __Pyx_XDECREF(__pyx_v_offsets);
+  __Pyx_XDECREF(__pyx_v_field_name);
+  __Pyx_XDECREF(__pyx_v_field_shape);
+  __Pyx_XDECREF(__pyx_v_field_type);
+  __Pyx_XDECREF(__pyx_v_dtype_dict);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":4055
+ *     cdef public nc_type _nc_type
+ *     cdef public dtype, name
+ *     def __init__(self, grp, object dt, object dtype_name, **kwargs):             # <<<<<<<<<<<<<<
+ *         cdef nc_type xtype
+ *         if 'typeid' in kwargs:
+ */
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_6VLType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_7netCDF4_6VLType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_grp = 0;
+  PyObject *__pyx_v_dt = 0;
+  PyObject *__pyx_v_dtype_name = 0;
+  PyObject *__pyx_v_kwargs = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+  __Pyx_GOTREF(__pyx_v_kwargs);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grp_2,&__pyx_n_s_dt,&__pyx_n_s_dtype_name,0};
+    PyObject* values[3] = {0,0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grp_2)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dt)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4055; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtype_name)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4055; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4055; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+    }
+    __pyx_v_grp = values[0];
+    __pyx_v_dt = values[1];
+    __pyx_v_dtype_name = values[2];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4055; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("netCDF4.VLType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_6VLType___init__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self), __pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name, __pyx_v_kwargs);
+
+  /* function exit code */
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_6VLType___init__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_grp, PyObject *__pyx_v_dt, PyObject *__pyx_v_dtype_name, PyObject *__pyx_v_kwargs) {
+  nc_type __pyx_v_xtype;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  nc_type __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *(*__pyx_t_8)(PyObject *);
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__init__", 0);
+  __Pyx_INCREF(__pyx_v_dt);
+
+  /* "netCDF4.pyx":4057
+ *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
+ *         cdef nc_type xtype
+ *         if 'typeid' in kwargs:             # <<<<<<<<<<<<<<
+ *             xtype = kwargs['typeid']
+ *         else:
+ */
+  __pyx_t_1 = (__Pyx_PyDict_Contains(__pyx_n_s_typeid, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":4058
+ *         cdef nc_type xtype
+ *         if 'typeid' in kwargs:
+ *             xtype = kwargs['typeid']             # <<<<<<<<<<<<<<
+ *         else:
+ *             xtype, dt = _def_vlen(grp, dt, dtype_name)
+ */
+    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_typeid); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4058; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = __Pyx_PyInt_As_nc_type(__pyx_t_3); if (unlikely((__pyx_t_4 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_v_xtype = __pyx_t_4;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":4060
+ *             xtype = kwargs['typeid']
+ *         else:
+ *             xtype, dt = _def_vlen(grp, dt, dtype_name)             # <<<<<<<<<<<<<<
+ *         self._nc_type = xtype
+ *         self.dtype = dt
+ */
+    __pyx_t_3 = __pyx_f_7netCDF4__def_vlen(__pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
+      PyObject* sequence = __pyx_t_3;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
+      } else {
+        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
+      }
+      __Pyx_INCREF(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_6);
+      #else
+      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      #endif
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
+      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_5);
+      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_6);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = NULL;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      goto __pyx_L5_unpacking_done;
+      __pyx_L4_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_8 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L5_unpacking_done:;
+    }
+    __pyx_t_4 = __Pyx_PyInt_As_nc_type(__pyx_t_5); if (unlikely((__pyx_t_4 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_v_xtype = __pyx_t_4;
+    __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_6);
+    __pyx_t_6 = 0;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":4061
+ *         else:
+ *             xtype, dt = _def_vlen(grp, dt, dtype_name)
+ *         self._nc_type = xtype             # <<<<<<<<<<<<<<
+ *         self.dtype = dt
+ *         if dt == str:
+ */
+  __pyx_v_self->_nc_type = __pyx_v_xtype;
+
+  /* "netCDF4.pyx":4062
+ *             xtype, dt = _def_vlen(grp, dt, dtype_name)
+ *         self._nc_type = xtype
+ *         self.dtype = dt             # <<<<<<<<<<<<<<
+ *         if dt == str:
+ *             self.name = None
+ */
+  __Pyx_INCREF(__pyx_v_dt);
+  __Pyx_GIVEREF(__pyx_v_dt);
+  __Pyx_GOTREF(__pyx_v_self->dtype);
+  __Pyx_DECREF(__pyx_v_self->dtype);
+  __pyx_v_self->dtype = __pyx_v_dt;
+
+  /* "netCDF4.pyx":4063
+ *         self._nc_type = xtype
+ *         self.dtype = dt
+ *         if dt == str:             # <<<<<<<<<<<<<<
+ *             self.name = None
+ *         else:
+ */
+  __pyx_t_3 = PyObject_RichCompare(__pyx_v_dt, ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":4064
+ *         self.dtype = dt
+ *         if dt == str:
+ *             self.name = None             # <<<<<<<<<<<<<<
+ *         else:
+ *             self.name = dtype_name
+ */
+    __Pyx_INCREF(Py_None);
+    __Pyx_GIVEREF(Py_None);
+    __Pyx_GOTREF(__pyx_v_self->name);
+    __Pyx_DECREF(__pyx_v_self->name);
+    __pyx_v_self->name = Py_None;
+    goto __pyx_L6;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":4066
+ *             self.name = None
+ *         else:
+ *             self.name = dtype_name             # <<<<<<<<<<<<<<
+ * 
+ *     def __repr__(self):
+ */
+    __Pyx_INCREF(__pyx_v_dtype_name);
+    __Pyx_GIVEREF(__pyx_v_dtype_name);
+    __Pyx_GOTREF(__pyx_v_self->name);
+    __Pyx_DECREF(__pyx_v_self->name);
+    __pyx_v_self->name = __pyx_v_dtype_name;
+  }
+  __pyx_L6:;
+
+  /* "netCDF4.pyx":4055
+ *     cdef public nc_type _nc_type
+ *     cdef public dtype, name
+ *     def __init__(self, grp, object dt, object dtype_name, **kwargs):             # <<<<<<<<<<<<<<
+ *         cdef nc_type xtype
+ *         if 'typeid' in kwargs:
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_AddTraceback("netCDF4.VLType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_dt);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":4068
+ *             self.name = dtype_name
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *            return self.__unicode__()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_6VLType_3__repr__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_6VLType_3__repr__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_6VLType_2__repr__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_6VLType_2__repr__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__repr__", 0);
+
+  /* "netCDF4.pyx":4069
+ * 
+ *     def __repr__(self):
+ *         if python3:             # <<<<<<<<<<<<<<
+ *            return self.__unicode__()
+ *         else:
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":4070
+ *     def __repr__(self):
+ *         if python3:
+ *            return self.__unicode__()             # <<<<<<<<<<<<<<
+ *         else:
+ *            return unicode(self).encode(default_encoding)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (__pyx_t_4) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":4072
+ *            return self.__unicode__()
+ *         else:
+ *            return unicode(self).encode(default_encoding)             # <<<<<<<<<<<<<<
+ * 
+ *     def __unicode__(self):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_INCREF(((PyObject *)__pyx_v_self));
+    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
+    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+      if (likely(__pyx_t_5)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+        __Pyx_INCREF(__pyx_t_5);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_3, function);
+      }
+    }
+    if (!__pyx_t_5) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
+      __Pyx_GIVEREF(__pyx_t_4);
+      __pyx_t_4 = 0;
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":4068
+ *             self.name = dtype_name
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *            return self.__unicode__()
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netCDF4.VLType.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":4074
+ *            return unicode(self).encode(default_encoding)
+ * 
+ *     def __unicode__(self):             # <<<<<<<<<<<<<<
+ *         if self.dtype == str:
+ *             return repr(type(self))+': string type'
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_6VLType_5__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_6VLType_5__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__unicode__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_6VLType_4__unicode__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_6VLType_4__unicode__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__unicode__", 0);
+
+  /* "netCDF4.pyx":4075
+ * 
+ *     def __unicode__(self):
+ *         if self.dtype == str:             # <<<<<<<<<<<<<<
+ *             return repr(type(self))+': string type'
+ *         else:
+ */
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":4076
+ *     def __unicode__(self):
+ *         if self.dtype == str:
+ *             return repr(type(self))+': string type'             # <<<<<<<<<<<<<<
+ *         else:
+ *             return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_s_string_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_r = __pyx_t_3;
+    __pyx_t_3 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":4078
+ *             return repr(type(self))+': string type'
+ *         else:
+ *             return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\             # <<<<<<<<<<<<<<
+ *             (self.name, self.dtype)
+ * 
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+
+    /* "netCDF4.pyx":4079
+ *         else:
+ *             return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
+ *             (self.name, self.dtype)             # <<<<<<<<<<<<<<
+ * 
+ * cdef _def_vlen(grp, object dt, object dtype_name):
+ */
+    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_INCREF(__pyx_v_self->name);
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
+    __Pyx_GIVEREF(__pyx_v_self->name);
+    __Pyx_INCREF(__pyx_v_self->dtype);
+    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->dtype);
+    __Pyx_GIVEREF(__pyx_v_self->dtype);
+
+    /* "netCDF4.pyx":4078
+ *             return repr(type(self))+': string type'
+ *         else:
+ *             return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\             # <<<<<<<<<<<<<<
+ *             (self.name, self.dtype)
+ * 
+ */
+    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_name_s_numpy_dtype_s, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":4074
+ *            return unicode(self).encode(default_encoding)
+ * 
+ *     def __unicode__(self):             # <<<<<<<<<<<<<<
+ *         if self.dtype == str:
+ *             return repr(type(self))+': string type'
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4.VLType.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":4053
+ * @ivar name: A python string describing the VLEN type.
+ * """
+ *     cdef public nc_type _nc_type             # <<<<<<<<<<<<<<
+ *     cdef public dtype, name
+ *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_6VLType_8_nc_type_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_6VLType_8_nc_type_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_6VLType_8_nc_type___get__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_6VLType_8_nc_type___get__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_self->_nc_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4.VLType._nc_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_6VLType_8_nc_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_6VLType_8_nc_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_6VLType_8_nc_type_2__set__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_6VLType_8_nc_type_2__set__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  nc_type __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __pyx_t_1 = __Pyx_PyInt_As_nc_type(__pyx_v_value); if (unlikely((__pyx_t_1 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_nc_type = __pyx_t_1;
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4.VLType._nc_type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":4054
+ * """
+ *     cdef public nc_type _nc_type
+ *     cdef public dtype, name             # <<<<<<<<<<<<<<
+ *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
+ *         cdef nc_type xtype
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_6VLType_5dtype_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_6VLType_5dtype_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_6VLType_5dtype___get__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_6VLType_5dtype___get__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->dtype);
+  __pyx_r = __pyx_v_self->dtype;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_6VLType_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_6VLType_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_6VLType_5dtype_2__set__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_6VLType_5dtype_2__set__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->dtype);
+  __Pyx_DECREF(__pyx_v_self->dtype);
+  __pyx_v_self->dtype = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_6VLType_5dtype_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_6VLType_5dtype_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_6VLType_5dtype_4__del__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_6VLType_5dtype_4__del__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->dtype);
+  __Pyx_DECREF(__pyx_v_self->dtype);
+  __pyx_v_self->dtype = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_6VLType_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_6VLType_4name_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_6VLType_4name___get__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_6VLType_4name___get__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->name);
+  __pyx_r = __pyx_v_self->name;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_6VLType_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_6VLType_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_6VLType_4name_2__set__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_6VLType_4name_2__set__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_INCREF(__pyx_v_value);
+  __Pyx_GIVEREF(__pyx_v_value);
+  __Pyx_GOTREF(__pyx_v_self->name);
+  __Pyx_DECREF(__pyx_v_self->name);
+  __pyx_v_self->name = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_6VLType_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_6VLType_4name_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_6VLType_4name_4__del__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_6VLType_4name_4__del__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
+  __Pyx_INCREF(Py_None);
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->name);
+  __Pyx_DECREF(__pyx_v_self->name);
+  __pyx_v_self->name = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":4081
+ *             (self.name, self.dtype)
+ * 
+ * cdef _def_vlen(grp, object dt, object dtype_name):             # <<<<<<<<<<<<<<
+ *     # private function used to construct a netcdf VLEN data type
+ *     # from a numpy dtype object or python str object by VLType.__init__.
+ */
+
+static PyObject *__pyx_f_7netCDF4__def_vlen(PyObject *__pyx_v_grp, PyObject *__pyx_v_dt, PyObject *__pyx_v_dtype_name) {
+  nc_type __pyx_v_xtype;
+  nc_type __pyx_v_xtype_tmp;
+  int __pyx_v_ierr;
+  char *__pyx_v_namstring;
+  PyObject *__pyx_v_bytestr = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  char *__pyx_t_3;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_t_7;
+  nc_type __pyx_t_8;
+  int __pyx_t_9;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_def_vlen", 0);
+  __Pyx_INCREF(__pyx_v_dt);
+
+  /* "netCDF4.pyx":4090
+ *     cdef char *nested_namstring
+ *     cdef int dim_sizes[NC_MAX_DIMS]
+ *     if dt == str: # python string, use NC_STRING             # <<<<<<<<<<<<<<
+ *         xtype = NC_STRING
+ *         # dtype_name ignored
+ */
+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_dt, ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":4091
+ *     cdef int dim_sizes[NC_MAX_DIMS]
+ *     if dt == str: # python string, use NC_STRING
+ *         xtype = NC_STRING             # <<<<<<<<<<<<<<
+ *         # dtype_name ignored
+ *     else: # numpy datatype
+ */
+    __pyx_v_xtype = NC_STRING;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":4094
+ *         # dtype_name ignored
+ *     else: # numpy datatype
+ *         bytestr = _strencode(dtype_name)             # <<<<<<<<<<<<<<
+ *         namstring = bytestr
+ *         dt = numpy.dtype(dt) # convert to numpy datatype.
+ */
+    __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_dtype_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_v_bytestr = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":4095
+ *     else: # numpy datatype
+ *         bytestr = _strencode(dtype_name)
+ *         namstring = bytestr             # <<<<<<<<<<<<<<
+ *         dt = numpy.dtype(dt) # convert to numpy datatype.
+ *         if dt.str[1:] in _supportedtypes:
+ */
+    __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_namstring = __pyx_t_3;
+
+    /* "netCDF4.pyx":4096
+ *         bytestr = _strencode(dtype_name)
+ *         namstring = bytestr
+ *         dt = numpy.dtype(dt) # convert to numpy datatype.             # <<<<<<<<<<<<<<
+ *         if dt.str[1:] in _supportedtypes:
+ *             # find netCDF primitive data type corresponding to
+ */
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_4 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
+      if (likely(__pyx_t_4)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+        __Pyx_INCREF(__pyx_t_4);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_5, function);
+      }
+    }
+    if (!__pyx_t_4) {
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_dt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+    } else {
+      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+      __Pyx_INCREF(__pyx_v_dt);
+      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_dt);
+      __Pyx_GIVEREF(__pyx_v_dt);
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":4097
+ *         namstring = bytestr
+ *         dt = numpy.dtype(dt) # convert to numpy datatype.
+ *         if dt.str[1:] in _supportedtypes:             # <<<<<<<<<<<<<<
+ *             # find netCDF primitive data type corresponding to
+ *             # specified numpy data type.
+ */
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__111, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_t_5, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_7 = (__pyx_t_2 != 0);
+    if (__pyx_t_7) {
+
+      /* "netCDF4.pyx":4100
+ *             # find netCDF primitive data type corresponding to
+ *             # specified numpy data type.
+ *             xtype_tmp = _nptonctype[dt.str[1:]]             # <<<<<<<<<<<<<<
+ *             ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype);
+ *             if ierr != NC_NOERR:
+ */
+      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_5, 1, 0, NULL, NULL, &__pyx_slice__112, 1, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = PyObject_GetItem(__pyx_t_1, __pyx_t_6); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4100; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_8 = __Pyx_PyInt_As_nc_type(__pyx_t_5); if (unlikely((__pyx_t_8 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_v_xtype_tmp = __pyx_t_8;
+
+      /* "netCDF4.pyx":4101
+ *             # specified numpy data type.
+ *             xtype_tmp = _nptonctype[dt.str[1:]]
+ *             ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype);             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_v_ierr = nc_def_vlen(__pyx_t_9, __pyx_v_namstring, __pyx_v_xtype_tmp, (&__pyx_v_xtype));
+
+      /* "netCDF4.pyx":4102
+ *             xtype_tmp = _nptonctype[dt.str[1:]]
+ *             ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype);
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         else:
+ */
+      __pyx_t_7 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_7) {
+
+        /* "netCDF4.pyx":4103
+ *             ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype);
+ *             if ierr != NC_NOERR:
+ *                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise KeyError("unsupported datatype specified for VLEN")
+ */
+        __pyx_t_3 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_5);
+        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
+        __Pyx_GIVEREF(__pyx_t_5);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      goto __pyx_L4;
+    }
+    /*else*/ {
+
+      /* "netCDF4.pyx":4105
+ *                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         else:
+ *             raise KeyError("unsupported datatype specified for VLEN")             # <<<<<<<<<<<<<<
+ *     return xtype, dt
+ * 
+ */
+      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __pyx_L4:;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":4106
+ *         else:
+ *             raise KeyError("unsupported datatype specified for VLEN")
+ *     return xtype, dt             # <<<<<<<<<<<<<<
+ * 
+ * cdef _read_vlen(group, nc_type xtype):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_5 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
+  __Pyx_INCREF(__pyx_v_dt);
+  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_dt);
+  __Pyx_GIVEREF(__pyx_v_dt);
+  __pyx_t_5 = 0;
+  __pyx_r = __pyx_t_6;
+  __pyx_t_6 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":4081
+ *             (self.name, self.dtype)
+ * 
+ * cdef _def_vlen(grp, object dt, object dtype_name):             # <<<<<<<<<<<<<<
+ *     # private function used to construct a netcdf VLEN data type
+ *     # from a numpy dtype object or python str object by VLType.__init__.
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netCDF4._def_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_bytestr);
+  __Pyx_XDECREF(__pyx_v_dt);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":4108
+ *     return xtype, dt
+ * 
+ * cdef _read_vlen(group, nc_type xtype):             # <<<<<<<<<<<<<<
+ *     # read a VLEN data type id from an existing file,
+ *     # construct a corresponding numpy dtype instance,
+ */
+
+static PyObject *__pyx_f_7netCDF4__read_vlen(PyObject *__pyx_v_group, nc_type __pyx_v_xtype) {
+  int __pyx_v_ierr;
+  size_t __pyx_v_vlsize;
+  nc_type __pyx_v_base_xtype;
+  char __pyx_v_vl_namstring[(NC_MAX_NAME + 1)];
+  PyObject *__pyx_v_dt = NULL;
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_3;
+  char *__pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  Py_ssize_t __pyx_t_9;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  PyObject *__pyx_t_12 = NULL;
+  PyObject *__pyx_t_13 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_read_vlen", 0);
+
+  /* "netCDF4.pyx":4117
+ *     cdef nc_type base_xtype
+ *     cdef char vl_namstring[NC_MAX_NAME+1]
+ *     if xtype == NC_STRING:             # <<<<<<<<<<<<<<
+ *         dt = str
+ *         name = None
+ */
+  __pyx_t_1 = ((__pyx_v_xtype == NC_STRING) != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4.pyx":4118
+ *     cdef char vl_namstring[NC_MAX_NAME+1]
+ *     if xtype == NC_STRING:
+ *         dt = str             # <<<<<<<<<<<<<<
+ *         name = None
+ *     else:
+ */
+    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+    __pyx_v_dt = ((PyObject *)((PyObject*)(&PyString_Type)));
+
+    /* "netCDF4.pyx":4119
+ *     if xtype == NC_STRING:
+ *         dt = str
+ *         name = None             # <<<<<<<<<<<<<<
+ *     else:
+ *         ierr = nc_inq_vlen(group._grpid, xtype, vl_namstring, &vlsize, &base_xtype)
+ */
+    __Pyx_INCREF(Py_None);
+    __pyx_v_name = Py_None;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "netCDF4.pyx":4121
+ *         name = None
+ *     else:
+ *         ierr = nc_inq_vlen(group._grpid, xtype, vl_namstring, &vlsize, &base_xtype)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_v_ierr = nc_inq_vlen(__pyx_t_3, __pyx_v_xtype, __pyx_v_vl_namstring, (&__pyx_v_vlsize), (&__pyx_v_base_xtype));
+
+    /* "netCDF4.pyx":4122
+ *     else:
+ *         ierr = nc_inq_vlen(group._grpid, xtype, vl_namstring, &vlsize, &base_xtype)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         name = vl_namstring.decode(default_encoding,unicode_error)
+ */
+    __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_1) {
+
+      /* "netCDF4.pyx":4123
+ *         ierr = nc_inq_vlen(group._grpid, xtype, vl_namstring, &vlsize, &base_xtype)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         name = vl_namstring.decode(default_encoding,unicode_error)
+ *         try:
+ */
+      __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+      __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_INCREF(__pyx_t_2);
+      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
+      __Pyx_GIVEREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4.pyx":4124
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         name = vl_namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+ *         try:
+ *             dt = numpy.dtype(_nctonptype[base_xtype]) # see if it is a primitive type
+ */
+    __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_vl_namstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_8 = NULL;
+    __pyx_t_9 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+      if (likely(__pyx_t_8)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+        __Pyx_INCREF(__pyx_t_8);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_6, function);
+        __pyx_t_9 = 1;
+      }
+    }
+    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    if (__pyx_t_8) {
+      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+    }
+    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
+    __Pyx_GIVEREF(__pyx_t_5);
+    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7);
+    __Pyx_GIVEREF(__pyx_t_7);
+    __pyx_t_5 = 0;
+    __pyx_t_7 = 0;
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_v_name = __pyx_t_2;
+    __pyx_t_2 = 0;
+
+    /* "netCDF4.pyx":4125
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         name = vl_namstring.decode(default_encoding,unicode_error)
+ *         try:             # <<<<<<<<<<<<<<
+ *             dt = numpy.dtype(_nctonptype[base_xtype]) # see if it is a primitive type
+ *         except KeyError:
+ */
+    {
+      __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
+      __Pyx_XGOTREF(__pyx_t_11);
+      __Pyx_XGOTREF(__pyx_t_12);
+      __Pyx_XGOTREF(__pyx_t_13);
+      /*try:*/ {
+
+        /* "netCDF4.pyx":4126
+ *         name = vl_namstring.decode(default_encoding,unicode_error)
+ *         try:
+ *             dt = numpy.dtype(_nctonptype[base_xtype]) # see if it is a primitive type             # <<<<<<<<<<<<<<
+ *         except KeyError:
+ *             raise KeyError("unsupported component type for VLEN")
+ */
+        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4126; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_dtype); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4126; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4126; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_base_xtype, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4126; __pyx_clineno = __LINE__; goto __pyx_L5_error;};
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __pyx_t_6 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
+          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
+          if (likely(__pyx_t_6)) {
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+            __Pyx_INCREF(__pyx_t_6);
+            __Pyx_INCREF(function);
+            __Pyx_DECREF_SET(__pyx_t_10, function);
+          }
+        }
+        if (!__pyx_t_6) {
+          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4126; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+          __Pyx_GOTREF(__pyx_t_2);
+        } else {
+          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4126; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+          __Pyx_GOTREF(__pyx_t_5);
+          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7);
+          __Pyx_GIVEREF(__pyx_t_7);
+          __pyx_t_7 = 0;
+          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4126; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __pyx_v_dt = __pyx_t_2;
+        __pyx_t_2 = 0;
+      }
+      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+      goto __pyx_L12_try_end;
+      __pyx_L5_error:;
+      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+      /* "netCDF4.pyx":4127
+ *         try:
+ *             dt = numpy.dtype(_nctonptype[base_xtype]) # see if it is a primitive type
+ *         except KeyError:             # <<<<<<<<<<<<<<
+ *             raise KeyError("unsupported component type for VLEN")
+ *     return VLType(group, dt, name, typeid=xtype)
+ */
+      __pyx_t_3 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+      if (__pyx_t_3) {
+        __Pyx_AddTraceback("netCDF4._read_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_10, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4127; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_GOTREF(__pyx_t_5);
+
+        /* "netCDF4.pyx":4128
+ *             dt = numpy.dtype(_nctonptype[base_xtype]) # see if it is a primitive type
+ *         except KeyError:
+ *             raise KeyError("unsupported component type for VLEN")             # <<<<<<<<<<<<<<
+ *     return VLType(group, dt, name, typeid=xtype)
+ * 
+ */
+        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__114, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4128; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4128; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
+      }
+      goto __pyx_L7_except_error;
+      __pyx_L7_except_error:;
+      __Pyx_XGIVEREF(__pyx_t_11);
+      __Pyx_XGIVEREF(__pyx_t_12);
+      __Pyx_XGIVEREF(__pyx_t_13);
+      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
+      goto __pyx_L1_error;
+      __pyx_L12_try_end:;
+    }
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":4129
+ *         except KeyError:
+ *             raise KeyError("unsupported component type for VLEN")
+ *     return VLType(group, dt, name, typeid=xtype)             # <<<<<<<<<<<<<<
+ * 
+ * cdef _strencode(pystr,encoding=None):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __Pyx_INCREF(__pyx_v_group);
+  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_group);
+  __Pyx_GIVEREF(__pyx_v_group);
+  __Pyx_INCREF(__pyx_v_dt);
+  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_dt);
+  __Pyx_GIVEREF(__pyx_v_dt);
+  __Pyx_INCREF(__pyx_v_name);
+  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_name);
+  __Pyx_GIVEREF(__pyx_v_name);
+  __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  __pyx_t_2 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_typeid, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_VLType)), __pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4.pyx":4108
+ *     return xtype, dt
+ * 
+ * cdef _read_vlen(group, nc_type xtype):             # <<<<<<<<<<<<<<
+ *     # read a VLEN data type id from an existing file,
+ *     # construct a corresponding numpy dtype instance,
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4._read_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_dt);
+  __Pyx_XDECREF(__pyx_v_name);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4.pyx":4131
+ *     return VLType(group, dt, name, typeid=xtype)
+ * 
+ * cdef _strencode(pystr,encoding=None):             # <<<<<<<<<<<<<<
+ *     # encode a string into bytes.  If already bytes, do nothing.
+ *     # uses default_encoding module variable for default encoding.
+ */
+
+static PyObject *__pyx_f_7netCDF4__strencode(PyObject *__pyx_v_pystr, struct __pyx_opt_args_7netCDF4__strencode *__pyx_optional_args) {
+  PyObject *__pyx_v_encoding = ((PyObject *)Py_None);
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  int __pyx_t_10;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_strencode", 0);
+  if (__pyx_optional_args) {
+    if (__pyx_optional_args->__pyx_n > 0) {
+      __pyx_v_encoding = __pyx_optional_args->encoding;
+    }
+  }
+  __Pyx_INCREF(__pyx_v_encoding);
+
+  /* "netCDF4.pyx":4134
+ *     # encode a string into bytes.  If already bytes, do nothing.
+ *     # uses default_encoding module variable for default encoding.
+ *     if encoding is None:             # <<<<<<<<<<<<<<
+ *         encoding = default_encoding
+ *     try:
+ */
+  __pyx_t_1 = (__pyx_v_encoding == Py_None);
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "netCDF4.pyx":4135
+ *     # uses default_encoding module variable for default encoding.
+ *     if encoding is None:
+ *         encoding = default_encoding             # <<<<<<<<<<<<<<
+ *     try:
+ *         return pystr.encode(encoding)
+ */
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_3);
+    __pyx_t_3 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4.pyx":4136
+ *     if encoding is None:
+ *         encoding = default_encoding
+ *     try:             # <<<<<<<<<<<<<<
+ *         return pystr.encode(encoding)
+ *     except (AttributeError, UnicodeDecodeError):
+ */
+  {
+    __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
+    __Pyx_XGOTREF(__pyx_t_4);
+    __Pyx_XGOTREF(__pyx_t_5);
+    __Pyx_XGOTREF(__pyx_t_6);
+    /*try:*/ {
+
+      /* "netCDF4.pyx":4137
+ *         encoding = default_encoding
+ *     try:
+ *         return pystr.encode(encoding)             # <<<<<<<<<<<<<<
+ *     except (AttributeError, UnicodeDecodeError):
+ *         return pystr # already bytes or unicode?
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_pystr, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4137; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_8 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+        if (likely(__pyx_t_8)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+          __Pyx_INCREF(__pyx_t_8);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_7, function);
+        }
+      }
+      if (!__pyx_t_8) {
+        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_encoding); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4137; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+      } else {
+        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4137; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __Pyx_GOTREF(__pyx_t_9);
+        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
+        __Pyx_INCREF(__pyx_v_encoding);
+        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_encoding);
+        __Pyx_GIVEREF(__pyx_v_encoding);
+        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4137; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_r = __pyx_t_3;
+      __pyx_t_3 = 0;
+      goto __pyx_L8_try_return;
+    }
+    __pyx_L4_error:;
+    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+    /* "netCDF4.pyx":4138
+ *     try:
+ *         return pystr.encode(encoding)
+ *     except (AttributeError, UnicodeDecodeError):             # <<<<<<<<<<<<<<
+ *         return pystr # already bytes or unicode?
+ */
+    __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
+    if (__pyx_t_10) {
+      __Pyx_AddTraceback("netCDF4._strencode", __pyx_clineno, __pyx_lineno, __pyx_filename);
+      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_7, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_GOTREF(__pyx_t_9);
+
+      /* "netCDF4.pyx":4139
+ *         return pystr.encode(encoding)
+ *     except (AttributeError, UnicodeDecodeError):
+ *         return pystr # already bytes or unicode?             # <<<<<<<<<<<<<<
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __Pyx_INCREF(__pyx_v_pystr);
+      __pyx_r = __pyx_v_pystr;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      goto __pyx_L7_except_return;
+    }
+    goto __pyx_L6_except_error;
+    __pyx_L6_except_error:;
+    __Pyx_XGIVEREF(__pyx_t_4);
+    __Pyx_XGIVEREF(__pyx_t_5);
+    __Pyx_XGIVEREF(__pyx_t_6);
+    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
+    goto __pyx_L1_error;
+    __pyx_L8_try_return:;
+    __Pyx_XGIVEREF(__pyx_t_4);
+    __Pyx_XGIVEREF(__pyx_t_5);
+    __Pyx_XGIVEREF(__pyx_t_6);
+    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
+    goto __pyx_L0;
+    __pyx_L7_except_return:;
+    __Pyx_XGIVEREF(__pyx_t_4);
+    __Pyx_XGIVEREF(__pyx_t_5);
+    __Pyx_XGIVEREF(__pyx_t_6);
+    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4.pyx":4131
+ *     return VLType(group, dt, name, typeid=xtype)
+ * 
+ * cdef _strencode(pystr,encoding=None):             # <<<<<<<<<<<<<<
+ *     # encode a string into bytes.  If already bytes, do nothing.
+ *     # uses default_encoding module variable for default encoding.
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_AddTraceback("netCDF4._strencode", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_encoding);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_tp_new_7netCDF4_Dataset(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_7netCDF4_Dataset *p;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_7netCDF4_Dataset *)o);
+  p->groups = Py_None; Py_INCREF(Py_None);
+  p->dimensions = Py_None; Py_INCREF(Py_None);
+  p->variables = Py_None; Py_INCREF(Py_None);
+  p->disk_format = Py_None; Py_INCREF(Py_None);
+  p->path = Py_None; Py_INCREF(Py_None);
+  p->parent = Py_None; Py_INCREF(Py_None);
+  p->file_format = Py_None; Py_INCREF(Py_None);
+  p->data_model = Py_None; Py_INCREF(Py_None);
+  p->cmptypes = Py_None; Py_INCREF(Py_None);
+  p->vltypes = Py_None; Py_INCREF(Py_None);
+  p->keepweakref = Py_None; Py_INCREF(Py_None);
+  return o;
+}
+
+static void __pyx_tp_dealloc_7netCDF4_Dataset(PyObject *o) {
+  struct __pyx_obj_7netCDF4_Dataset *p = (struct __pyx_obj_7netCDF4_Dataset *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  PyObject_GC_UnTrack(o);
+  {
+    PyObject *etype, *eval, *etb;
+    PyErr_Fetch(&etype, &eval, &etb);
+    ++Py_REFCNT(o);
+    __pyx_pw_7netCDF4_7Dataset_15__dealloc__(o);
+    --Py_REFCNT(o);
+    PyErr_Restore(etype, eval, etb);
+  }
+  if (p->__weakref__) PyObject_ClearWeakRefs(o);
+  Py_CLEAR(p->groups);
+  Py_CLEAR(p->dimensions);
+  Py_CLEAR(p->variables);
+  Py_CLEAR(p->disk_format);
+  Py_CLEAR(p->path);
+  Py_CLEAR(p->parent);
+  Py_CLEAR(p->file_format);
+  Py_CLEAR(p->data_model);
+  Py_CLEAR(p->cmptypes);
+  Py_CLEAR(p->vltypes);
+  Py_CLEAR(p->keepweakref);
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_7netCDF4_Dataset(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_7netCDF4_Dataset *p = (struct __pyx_obj_7netCDF4_Dataset *)o;
+  if (p->groups) {
+    e = (*v)(p->groups, a); if (e) return e;
+  }
+  if (p->dimensions) {
+    e = (*v)(p->dimensions, a); if (e) return e;
+  }
+  if (p->variables) {
+    e = (*v)(p->variables, a); if (e) return e;
+  }
+  if (p->disk_format) {
+    e = (*v)(p->disk_format, a); if (e) return e;
+  }
+  if (p->path) {
+    e = (*v)(p->path, a); if (e) return e;
+  }
+  if (p->parent) {
+    e = (*v)(p->parent, a); if (e) return e;
+  }
+  if (p->file_format) {
+    e = (*v)(p->file_format, a); if (e) return e;
+  }
+  if (p->data_model) {
+    e = (*v)(p->data_model, a); if (e) return e;
+  }
+  if (p->cmptypes) {
+    e = (*v)(p->cmptypes, a); if (e) return e;
+  }
+  if (p->vltypes) {
+    e = (*v)(p->vltypes, a); if (e) return e;
+  }
+  if (p->keepweakref) {
+    e = (*v)(p->keepweakref, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_7netCDF4_Dataset(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_7netCDF4_Dataset *p = (struct __pyx_obj_7netCDF4_Dataset *)o;
+  tmp = ((PyObject*)p->groups);
+  p->groups = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->dimensions);
+  p->dimensions = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->variables);
+  p->variables = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->disk_format);
+  p->disk_format = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->path);
+  p->path = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->parent);
+  p->parent = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->file_format);
+  p->file_format = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->data_model);
+  p->data_model = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->cmptypes);
+  p->cmptypes = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->vltypes);
+  p->vltypes = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->keepweakref);
+  p->keepweakref = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyObject *__pyx_tp_getattro_7netCDF4_Dataset(PyObject *o, PyObject *n) {
+  PyObject *v = PyObject_GenericGetAttr(o, n);
+  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
+    PyErr_Clear();
+    v = __pyx_pw_7netCDF4_7Dataset_55__getattr__(o, n);
+  }
+  return v;
+}
+
+static int __pyx_tp_setattro_7netCDF4_Dataset(PyObject *o, PyObject *n, PyObject *v) {
+  if (v) {
+    return __pyx_pw_7netCDF4_7Dataset_53__setattr__(o, n, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_7Dataset_49__delattr__(o, n);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_7Dataset__grpid(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_7Dataset_6_grpid_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_7Dataset__grpid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_7Dataset_6_grpid_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_7Dataset__isopen(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_7Dataset_7_isopen_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_7Dataset__isopen(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_7Dataset_7_isopen_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_7Dataset_groups(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_7Dataset_6groups_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_7Dataset_groups(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_7Dataset_6groups_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_7Dataset_6groups_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_7Dataset_dimensions(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_7Dataset_10dimensions_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_7Dataset_dimensions(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_7Dataset_10dimensions_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_7Dataset_10dimensions_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_7Dataset_variables(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_7Dataset_9variables_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_7Dataset_variables(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_7Dataset_9variables_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_7Dataset_9variables_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_7Dataset_disk_format(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_7Dataset_11disk_format_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_7Dataset_disk_format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_7Dataset_11disk_format_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_7Dataset_11disk_format_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_7Dataset_path(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_7Dataset_4path_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_7Dataset_path(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_7Dataset_4path_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_7Dataset_4path_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_7Dataset_parent(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_7Dataset_6parent_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_7Dataset_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_7Dataset_6parent_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_7Dataset_6parent_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_7Dataset_file_format(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_7Dataset_11file_format_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_7Dataset_file_format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_7Dataset_11file_format_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_7Dataset_11file_format_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_7Dataset_data_model(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_7Dataset_10data_model_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_7Dataset_data_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_7Dataset_10data_model_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_7Dataset_10data_model_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_7Dataset_cmptypes(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_7Dataset_8cmptypes_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_7Dataset_cmptypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_7Dataset_8cmptypes_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_7Dataset_8cmptypes_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_7Dataset_vltypes(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_7Dataset_7vltypes_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_7Dataset_vltypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_7Dataset_7vltypes_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_7Dataset_7vltypes_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_7Dataset_keepweakref(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_7Dataset_11keepweakref_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_7Dataset_keepweakref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_7Dataset_11keepweakref_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_7Dataset_11keepweakref_5__del__(o);
+  }
+}
+
+static PyMethodDef __pyx_methods_7netCDF4_Dataset[] = {
+  {"__enter__", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_3__enter__, METH_NOARGS, 0},
+  {"__exit__", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_5__exit__, METH_VARARGS|METH_KEYWORDS, 0},
+  {"filepath", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_7filepath, METH_NOARGS, __pyx_doc_7netCDF4_7Dataset_6filepath},
+  {"__unicode__", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_11__unicode__, METH_NOARGS, 0},
+  {"close", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_13close, METH_NOARGS, __pyx_doc_7netCDF4_7Dataset_12close},
+  {"sync", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_17sync, METH_NOARGS, __pyx_doc_7netCDF4_7Dataset_16sync},
+  {"_redef", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_19_redef, METH_NOARGS, 0},
+  {"_enddef", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_21_enddef, METH_NOARGS, 0},
+  {"set_fill_on", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_23set_fill_on, METH_NOARGS, __pyx_doc_7netCDF4_7Dataset_22set_fill_on},
+  {"set_fill_off", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_25set_fill_off, METH_NOARGS, __pyx_doc_7netCDF4_7Dataset_24set_fill_off},
+  {"createDimension", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_27createDimension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_7Dataset_26createDimension},
+  {"renameDimension", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_29renameDimension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_7Dataset_28renameDimension},
+  {"createCompoundType", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_31createCompoundType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_7Dataset_30createCompoundType},
+  {"createVLType", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_33createVLType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_7Dataset_32createVLType},
+  {"createVariable", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_35createVariable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_7Dataset_34createVariable},
+  {"renameVariable", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_37renameVariable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_7Dataset_36renameVariable},
+  {"createGroup", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_39createGroup, METH_O, __pyx_doc_7netCDF4_7Dataset_38createGroup},
+  {"ncattrs", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_41ncattrs, METH_NOARGS, __pyx_doc_7netCDF4_7Dataset_40ncattrs},
+  {"setncattr", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_43setncattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_7Dataset_42setncattr},
+  {"setncatts", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_45setncatts, METH_O, __pyx_doc_7netCDF4_7Dataset_44setncatts},
+  {"getncattr", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_47getncattr, METH_O, __pyx_doc_7netCDF4_7Dataset_46getncattr},
+  {"delncattr", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_51delncattr, METH_O, __pyx_doc_7netCDF4_7Dataset_50delncattr},
+  {"__getattr__", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_55__getattr__, METH_O|METH_COEXIST, 0},
+  {"renameAttribute", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_57renameAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_7Dataset_56renameAttribute},
+  {"renameGroup", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_59renameGroup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_7Dataset_58renameGroup},
+  {"set_auto_maskandscale", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_61set_auto_maskandscale, METH_O, __pyx_doc_7netCDF4_7Dataset_60set_auto_maskandscale},
+  {"set_auto_mask", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_63set_auto_mask, METH_O, __pyx_doc_7netCDF4_7Dataset_62set_auto_mask},
+  {"set_auto_scale", (PyCFunction)__pyx_pw_7netCDF4_7Dataset_65set_auto_scale, METH_O, __pyx_doc_7netCDF4_7Dataset_64set_auto_scale},
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_7netCDF4_Dataset[] = {
+  {(char *)"_grpid", __pyx_getprop_7netCDF4_7Dataset__grpid, __pyx_setprop_7netCDF4_7Dataset__grpid, 0, 0},
+  {(char *)"_isopen", __pyx_getprop_7netCDF4_7Dataset__isopen, __pyx_setprop_7netCDF4_7Dataset__isopen, 0, 0},
+  {(char *)"groups", __pyx_getprop_7netCDF4_7Dataset_groups, __pyx_setprop_7netCDF4_7Dataset_groups, 0, 0},
+  {(char *)"dimensions", __pyx_getprop_7netCDF4_7Dataset_dimensions, __pyx_setprop_7netCDF4_7Dataset_dimensions, 0, 0},
+  {(char *)"variables", __pyx_getprop_7netCDF4_7Dataset_variables, __pyx_setprop_7netCDF4_7Dataset_variables, 0, 0},
+  {(char *)"disk_format", __pyx_getprop_7netCDF4_7Dataset_disk_format, __pyx_setprop_7netCDF4_7Dataset_disk_format, 0, 0},
+  {(char *)"path", __pyx_getprop_7netCDF4_7Dataset_path, __pyx_setprop_7netCDF4_7Dataset_path, 0, 0},
+  {(char *)"parent", __pyx_getprop_7netCDF4_7Dataset_parent, __pyx_setprop_7netCDF4_7Dataset_parent, 0, 0},
+  {(char *)"file_format", __pyx_getprop_7netCDF4_7Dataset_file_format, __pyx_setprop_7netCDF4_7Dataset_file_format, 0, 0},
+  {(char *)"data_model", __pyx_getprop_7netCDF4_7Dataset_data_model, __pyx_setprop_7netCDF4_7Dataset_data_model, 0, 0},
+  {(char *)"cmptypes", __pyx_getprop_7netCDF4_7Dataset_cmptypes, __pyx_setprop_7netCDF4_7Dataset_cmptypes, 0, 0},
+  {(char *)"vltypes", __pyx_getprop_7netCDF4_7Dataset_vltypes, __pyx_setprop_7netCDF4_7Dataset_vltypes, 0, 0},
+  {(char *)"keepweakref", __pyx_getprop_7netCDF4_7Dataset_keepweakref, __pyx_setprop_7netCDF4_7Dataset_keepweakref, 0, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_7netCDF4_Dataset = {
+  PyVarObject_HEAD_INIT(0, 0)
+  "netCDF4.Dataset", /*tp_name*/
+  sizeof(struct __pyx_obj_7netCDF4_Dataset), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_7netCDF4_Dataset, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  __pyx_pw_7netCDF4_7Dataset_9__repr__, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  __pyx_tp_getattro_7netCDF4_Dataset, /*tp_getattro*/
+  __pyx_tp_setattro_7netCDF4_Dataset, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  "\nDataset(self, filename, mode=\"r\", clobber=True, diskless=False, persist=False, keepweakref=False, format='NETCDF4')\n\nA netCDF L{Dataset} is a collection of dimensions, groups, variables and \nattributes. Together they describe the meaning of data and relations among \ndata fields stored in a netCDF file.\n\nB{Parameters:}\n\nB{C{filename}} - Name of netCDF file to hold dataset.\n\nB{Keywords}:\n\nB{C{mode}} - access mode. C{r} means read-only; no data can be\nmodified. C{w} mean [...]
+  __pyx_tp_traverse_7netCDF4_Dataset, /*tp_traverse*/
+  __pyx_tp_clear_7netCDF4_Dataset, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_7netCDF4_Dataset, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_7netCDF4_Dataset, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_7netCDF4_7Dataset_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_7netCDF4_Dataset, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  0, /*tp_version_tag*/
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static PyObject *__pyx_tp_new_7netCDF4_Group(PyTypeObject *t, PyObject *a, PyObject *k) {
+  PyObject *o = __pyx_tp_new_7netCDF4_Dataset(t, a, k);
+  if (unlikely(!o)) return 0;
+  return o;
+}
+
+static PyObject *__pyx_getprop_7netCDF4_5Group_name(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_5Group_4name_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_5Group_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_5Group_4name_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyMethodDef __pyx_methods_7netCDF4_Group[] = {
+  {"close", (PyCFunction)__pyx_pw_7netCDF4_5Group_3close, METH_NOARGS, __pyx_doc_7netCDF4_5Group_2close},
+  {"_getname", (PyCFunction)__pyx_pw_7netCDF4_5Group_5_getname, METH_NOARGS, 0},
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_7netCDF4_Group[] = {
+  {(char *)"name", __pyx_getprop_7netCDF4_5Group_name, __pyx_setprop_7netCDF4_5Group_name, __pyx_k_string_name_of_Group_instance, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_7netCDF4_Group = {
+  PyVarObject_HEAD_INIT(0, 0)
+  "netCDF4.Group", /*tp_name*/
+  sizeof(struct __pyx_obj_7netCDF4_Group), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_7netCDF4_Dataset, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  #if CYTHON_COMPILING_IN_PYPY
+  __pyx_pw_7netCDF4_7Dataset_9__repr__, /*tp_repr*/
+  #else
+  0, /*tp_repr*/
+  #endif
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  "\nGroup(self, parent, name) \n\nGroups define a hierarchical namespace within a netCDF file. They are \nanalagous to directories in a unix filesystem. Each L{Group} behaves like \na L{Dataset} within a Dataset, and can contain it's own variables, \ndimensions and attributes (and other Groups).\n\nL{Group} instances should be created using the\nL{createGroup<Dataset.createGroup>} method of a L{Dataset} instance, or\nanother L{Group} instance, not using this class directly.\n\nB{Paramet [...]
+  __pyx_tp_traverse_7netCDF4_Dataset, /*tp_traverse*/
+  __pyx_tp_clear_7netCDF4_Dataset, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_7netCDF4_Group, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_7netCDF4_Group, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_7netCDF4_5Group_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_7netCDF4_Group, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  0, /*tp_version_tag*/
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static PyObject *__pyx_tp_new_7netCDF4_Dimension(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_7netCDF4_Dimension *p;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_7netCDF4_Dimension *)o);
+  p->_data_model = Py_None; Py_INCREF(Py_None);
+  p->_name = Py_None; Py_INCREF(Py_None);
+  p->_grp = Py_None; Py_INCREF(Py_None);
+  return o;
+}
+
+static void __pyx_tp_dealloc_7netCDF4_Dimension(PyObject *o) {
+  struct __pyx_obj_7netCDF4_Dimension *p = (struct __pyx_obj_7netCDF4_Dimension *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  PyObject_GC_UnTrack(o);
+  Py_CLEAR(p->_data_model);
+  Py_CLEAR(p->_name);
+  Py_CLEAR(p->_grp);
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_7netCDF4_Dimension(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_7netCDF4_Dimension *p = (struct __pyx_obj_7netCDF4_Dimension *)o;
+  if (p->_data_model) {
+    e = (*v)(p->_data_model, a); if (e) return e;
+  }
+  if (p->_name) {
+    e = (*v)(p->_name, a); if (e) return e;
+  }
+  if (p->_grp) {
+    e = (*v)(p->_grp, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_7netCDF4_Dimension(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_7netCDF4_Dimension *p = (struct __pyx_obj_7netCDF4_Dimension *)o;
+  tmp = ((PyObject*)p->_data_model);
+  p->_data_model = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->_name);
+  p->_name = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->_grp);
+  p->_grp = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyObject *__pyx_getprop_7netCDF4_9Dimension_name(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_9Dimension_4name_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_9Dimension_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_9Dimension_4name_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_9Dimension__dimid(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_9Dimension_6_dimid_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_9Dimension__dimid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_9Dimension_6_dimid_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_9Dimension__grpid(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_9Dimension_6_grpid_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_9Dimension__grpid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_9Dimension_6_grpid_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_9Dimension__data_model(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_9Dimension_11_data_model_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_9Dimension__data_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_9Dimension_11_data_model_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_9Dimension_11_data_model_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_9Dimension__name(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_9Dimension_5_name_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_9Dimension__name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_9Dimension_5_name_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_9Dimension_5_name_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_9Dimension__grp(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_9Dimension_4_grp_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_9Dimension__grp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_9Dimension_4_grp_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_9Dimension_4_grp_5__del__(o);
+  }
+}
+
+static PyMethodDef __pyx_methods_7netCDF4_Dimension[] = {
+  {"_getname", (PyCFunction)__pyx_pw_7netCDF4_9Dimension_3_getname, METH_NOARGS, 0},
+  {"__unicode__", (PyCFunction)__pyx_pw_7netCDF4_9Dimension_7__unicode__, METH_NOARGS, 0},
+  {"group", (PyCFunction)__pyx_pw_7netCDF4_9Dimension_11group, METH_NOARGS, __pyx_doc_7netCDF4_9Dimension_10group},
+  {"isunlimited", (PyCFunction)__pyx_pw_7netCDF4_9Dimension_13isunlimited, METH_NOARGS, __pyx_doc_7netCDF4_9Dimension_12isunlimited},
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_7netCDF4_Dimension[] = {
+  {(char *)"name", __pyx_getprop_7netCDF4_9Dimension_name, __pyx_setprop_7netCDF4_9Dimension_name, __pyx_k_string_name_of_Dimension_instanc, 0},
+  {(char *)"_dimid", __pyx_getprop_7netCDF4_9Dimension__dimid, __pyx_setprop_7netCDF4_9Dimension__dimid, 0, 0},
+  {(char *)"_grpid", __pyx_getprop_7netCDF4_9Dimension__grpid, __pyx_setprop_7netCDF4_9Dimension__grpid, 0, 0},
+  {(char *)"_data_model", __pyx_getprop_7netCDF4_9Dimension__data_model, __pyx_setprop_7netCDF4_9Dimension__data_model, 0, 0},
+  {(char *)"_name", __pyx_getprop_7netCDF4_9Dimension__name, __pyx_setprop_7netCDF4_9Dimension__name, 0, 0},
+  {(char *)"_grp", __pyx_getprop_7netCDF4_9Dimension__grp, __pyx_setprop_7netCDF4_9Dimension__grp, 0, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_Dimension = {
+  __pyx_pw_7netCDF4_9Dimension_9__len__, /*sq_length*/
+  0, /*sq_concat*/
+  0, /*sq_repeat*/
+  0, /*sq_item*/
+  0, /*sq_slice*/
+  0, /*sq_ass_item*/
+  0, /*sq_ass_slice*/
+  0, /*sq_contains*/
+  0, /*sq_inplace_concat*/
+  0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_Dimension = {
+  __pyx_pw_7netCDF4_9Dimension_9__len__, /*mp_length*/
+  0, /*mp_subscript*/
+  0, /*mp_ass_subscript*/
+};
+
+static PyTypeObject __pyx_type_7netCDF4_Dimension = {
+  PyVarObject_HEAD_INIT(0, 0)
+  "netCDF4.Dimension", /*tp_name*/
+  sizeof(struct __pyx_obj_7netCDF4_Dimension), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_7netCDF4_Dimension, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  __pyx_pw_7netCDF4_9Dimension_5__repr__, /*tp_repr*/
+  0, /*tp_as_number*/
+  &__pyx_tp_as_sequence_Dimension, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_Dimension, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  "\nDimension(self, group, name, size=None)\n\nA netCDF L{Dimension} is used to describe the coordinates of a L{Variable}.\n\nL{Dimension} instances should be created using the\nL{createDimension<Dataset.createDimension>} method of a L{Group} or\nL{Dataset} instance, not using this class directly.\n\nB{Parameters:}\n\nB{C{group}} - L{Group} instance to associate with dimension.\n\nB{C{name}}  - Name of the dimension.\n\nB{Keywords:}\n\nB{C{size}}  - Size of the dimension. C{None} or 0 m [...]
+  __pyx_tp_traverse_7netCDF4_Dimension, /*tp_traverse*/
+  __pyx_tp_clear_7netCDF4_Dimension, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_7netCDF4_Dimension, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_7netCDF4_Dimension, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_7netCDF4_9Dimension_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_7netCDF4_Dimension, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  0, /*tp_version_tag*/
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static PyObject *__pyx_tp_new_7netCDF4_Variable(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_7netCDF4_Variable *p;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_7netCDF4_Variable *)o);
+  p->_name = Py_None; Py_INCREF(Py_None);
+  p->ndim = Py_None; Py_INCREF(Py_None);
+  p->dtype = Py_None; Py_INCREF(Py_None);
+  p->mask = Py_None; Py_INCREF(Py_None);
+  p->scale = Py_None; Py_INCREF(Py_None);
+  p->_isprimitive = Py_None; Py_INCREF(Py_None);
+  p->_iscompound = Py_None; Py_INCREF(Py_None);
+  p->_isvlen = Py_None; Py_INCREF(Py_None);
+  p->_grp = Py_None; Py_INCREF(Py_None);
+  p->_cmptype = Py_None; Py_INCREF(Py_None);
+  p->_vltype = Py_None; Py_INCREF(Py_None);
+  return o;
+}
+
+static void __pyx_tp_dealloc_7netCDF4_Variable(PyObject *o) {
+  struct __pyx_obj_7netCDF4_Variable *p = (struct __pyx_obj_7netCDF4_Variable *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  PyObject_GC_UnTrack(o);
+  Py_CLEAR(p->_name);
+  Py_CLEAR(p->ndim);
+  Py_CLEAR(p->dtype);
+  Py_CLEAR(p->mask);
+  Py_CLEAR(p->scale);
+  Py_CLEAR(p->_isprimitive);
+  Py_CLEAR(p->_iscompound);
+  Py_CLEAR(p->_isvlen);
+  Py_CLEAR(p->_grp);
+  Py_CLEAR(p->_cmptype);
+  Py_CLEAR(p->_vltype);
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_7netCDF4_Variable(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_7netCDF4_Variable *p = (struct __pyx_obj_7netCDF4_Variable *)o;
+  if (p->_name) {
+    e = (*v)(p->_name, a); if (e) return e;
+  }
+  if (p->ndim) {
+    e = (*v)(p->ndim, a); if (e) return e;
+  }
+  if (p->dtype) {
+    e = (*v)(p->dtype, a); if (e) return e;
+  }
+  if (p->mask) {
+    e = (*v)(p->mask, a); if (e) return e;
+  }
+  if (p->scale) {
+    e = (*v)(p->scale, a); if (e) return e;
+  }
+  if (p->_isprimitive) {
+    e = (*v)(p->_isprimitive, a); if (e) return e;
+  }
+  if (p->_iscompound) {
+    e = (*v)(p->_iscompound, a); if (e) return e;
+  }
+  if (p->_isvlen) {
+    e = (*v)(p->_isvlen, a); if (e) return e;
+  }
+  if (p->_grp) {
+    e = (*v)(p->_grp, a); if (e) return e;
+  }
+  if (p->_cmptype) {
+    e = (*v)(p->_cmptype, a); if (e) return e;
+  }
+  if (p->_vltype) {
+    e = (*v)(p->_vltype, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_7netCDF4_Variable(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_7netCDF4_Variable *p = (struct __pyx_obj_7netCDF4_Variable *)o;
+  tmp = ((PyObject*)p->_name);
+  p->_name = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->ndim);
+  p->ndim = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->dtype);
+  p->dtype = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->mask);
+  p->mask = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->scale);
+  p->scale = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->_isprimitive);
+  p->_isprimitive = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->_iscompound);
+  p->_iscompound = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->_isvlen);
+  p->_isvlen = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->_grp);
+  p->_grp = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->_cmptype);
+  p->_cmptype = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->_vltype);
+  p->_vltype = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+static PyObject *__pyx_sq_item_7netCDF4_Variable(PyObject *o, Py_ssize_t i) {
+  PyObject *r;
+  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
+  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
+  Py_DECREF(x);
+  return r;
+}
+
+static int __pyx_mp_ass_subscript_7netCDF4_Variable(PyObject *o, PyObject *i, PyObject *v) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_49__setitem__(o, i, v);
+  }
+  else {
+    PyErr_Format(PyExc_NotImplementedError,
+      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
+    return -1;
+  }
+}
+
+static PyObject *__pyx_tp_getattro_7netCDF4_Variable(PyObject *o, PyObject *n) {
+  PyObject *v = PyObject_GenericGetAttr(o, n);
+  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
+    PyErr_Clear();
+    v = __pyx_pw_7netCDF4_8Variable_39__getattr__(o, n);
+  }
+  return v;
+}
+
+static int __pyx_tp_setattro_7netCDF4_Variable(PyObject *o, PyObject *n, PyObject *v) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_37__setattr__(o, n, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_8Variable_35__delattr__(o, n);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable_name(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_4name_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_4name_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable_datatype(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_8datatype_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable_shape(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_5shape_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable_shape(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_5shape_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable_size(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_4size_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable_dimensions(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_10dimensions_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable_dimensions(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_10dimensions_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable__varid(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_6_varid_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable__varid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_6_varid_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable__grpid(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_6_grpid_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable__grpid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_6_grpid_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable__nunlimdim(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_10_nunlimdim_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable__nunlimdim(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_10_nunlimdim_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable__name(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_5_name_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable__name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_5_name_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_8Variable_5_name_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable_ndim(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_4ndim_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable_ndim(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_4ndim_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_8Variable_4ndim_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable_dtype(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_5dtype_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable_dtype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_5dtype_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_8Variable_5dtype_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable_mask(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_4mask_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable_mask(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_4mask_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_8Variable_4mask_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable_scale(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_5scale_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable_scale(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_5scale_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_8Variable_5scale_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable__isprimitive(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_12_isprimitive_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable__isprimitive(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_12_isprimitive_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_8Variable_12_isprimitive_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable__iscompound(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_11_iscompound_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable__iscompound(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_11_iscompound_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_8Variable_11_iscompound_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable__isvlen(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_7_isvlen_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable__isvlen(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_7_isvlen_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_8Variable_7_isvlen_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable__grp(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_4_grp_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable__grp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_4_grp_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_8Variable_4_grp_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable__cmptype(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_8_cmptype_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable__cmptype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_8_cmptype_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_8Variable_8_cmptype_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8Variable__vltype(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8Variable_7_vltype_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8Variable__vltype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8Variable_7_vltype_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_8Variable_7_vltype_5__del__(o);
+  }
+}
+
+static PyMethodDef __pyx_methods_7netCDF4_Variable[] = {
+  {"__array__", (PyCFunction)__pyx_pw_7netCDF4_8Variable_3__array__, METH_NOARGS, 0},
+  {"__unicode__", (PyCFunction)__pyx_pw_7netCDF4_8Variable_7__unicode__, METH_NOARGS, 0},
+  {"_getdims", (PyCFunction)__pyx_pw_7netCDF4_8Variable_9_getdims, METH_NOARGS, 0},
+  {"_getname", (PyCFunction)__pyx_pw_7netCDF4_8Variable_11_getname, METH_NOARGS, 0},
+  {"group", (PyCFunction)__pyx_pw_7netCDF4_8Variable_13group, METH_NOARGS, __pyx_doc_7netCDF4_8Variable_12group},
+  {"ncattrs", (PyCFunction)__pyx_pw_7netCDF4_8Variable_15ncattrs, METH_NOARGS, __pyx_doc_7netCDF4_8Variable_14ncattrs},
+  {"setncattr", (PyCFunction)__pyx_pw_7netCDF4_8Variable_17setncattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8Variable_16setncattr},
+  {"setncatts", (PyCFunction)__pyx_pw_7netCDF4_8Variable_19setncatts, METH_O, __pyx_doc_7netCDF4_8Variable_18setncatts},
+  {"getncattr", (PyCFunction)__pyx_pw_7netCDF4_8Variable_21getncattr, METH_O, __pyx_doc_7netCDF4_8Variable_20getncattr},
+  {"delncattr", (PyCFunction)__pyx_pw_7netCDF4_8Variable_23delncattr, METH_O, __pyx_doc_7netCDF4_8Variable_22delncattr},
+  {"filters", (PyCFunction)__pyx_pw_7netCDF4_8Variable_25filters, METH_NOARGS, __pyx_doc_7netCDF4_8Variable_24filters},
+  {"endian", (PyCFunction)__pyx_pw_7netCDF4_8Variable_27endian, METH_NOARGS, __pyx_doc_7netCDF4_8Variable_26endian},
+  {"chunking", (PyCFunction)__pyx_pw_7netCDF4_8Variable_29chunking, METH_NOARGS, __pyx_doc_7netCDF4_8Variable_28chunking},
+  {"get_var_chunk_cache", (PyCFunction)__pyx_pw_7netCDF4_8Variable_31get_var_chunk_cache, METH_NOARGS, __pyx_doc_7netCDF4_8Variable_30get_var_chunk_cache},
+  {"set_var_chunk_cache", (PyCFunction)__pyx_pw_7netCDF4_8Variable_33set_var_chunk_cache, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8Variable_32set_var_chunk_cache},
+  {"__getattr__", (PyCFunction)__pyx_pw_7netCDF4_8Variable_39__getattr__, METH_O|METH_COEXIST, 0},
+  {"renameAttribute", (PyCFunction)__pyx_pw_7netCDF4_8Variable_41renameAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8Variable_40renameAttribute},
+  {"_toma", (PyCFunction)__pyx_pw_7netCDF4_8Variable_45_toma, METH_O, 0},
+  {"_assign_vlen", (PyCFunction)__pyx_pw_7netCDF4_8Variable_47_assign_vlen, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8Variable_46_assign_vlen},
+  {"assignValue", (PyCFunction)__pyx_pw_7netCDF4_8Variable_53assignValue, METH_O, __pyx_doc_7netCDF4_8Variable_52assignValue},
+  {"getValue", (PyCFunction)__pyx_pw_7netCDF4_8Variable_55getValue, METH_NOARGS, __pyx_doc_7netCDF4_8Variable_54getValue},
+  {"set_auto_maskandscale", (PyCFunction)__pyx_pw_7netCDF4_8Variable_57set_auto_maskandscale, METH_O, __pyx_doc_7netCDF4_8Variable_56set_auto_maskandscale},
+  {"set_auto_scale", (PyCFunction)__pyx_pw_7netCDF4_8Variable_59set_auto_scale, METH_O, __pyx_doc_7netCDF4_8Variable_58set_auto_scale},
+  {"set_auto_mask", (PyCFunction)__pyx_pw_7netCDF4_8Variable_61set_auto_mask, METH_O, __pyx_doc_7netCDF4_8Variable_60set_auto_mask},
+  {"_put", (PyCFunction)__pyx_pw_7netCDF4_8Variable_63_put, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8Variable_62_put},
+  {"_get", (PyCFunction)__pyx_pw_7netCDF4_8Variable_65_get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8Variable_64_get},
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_7netCDF4_Variable[] = {
+  {(char *)"name", __pyx_getprop_7netCDF4_8Variable_name, __pyx_setprop_7netCDF4_8Variable_name, __pyx_k_string_name_of_Variable_instance, 0},
+  {(char *)"datatype", __pyx_getprop_7netCDF4_8Variable_datatype, 0, __pyx_k_numpy_data_type_for_primitive_da, 0},
+  {(char *)"shape", __pyx_getprop_7netCDF4_8Variable_shape, __pyx_setprop_7netCDF4_8Variable_shape, __pyx_k_find_current_sizes_of_all_variab, 0},
+  {(char *)"size", __pyx_getprop_7netCDF4_8Variable_size, 0, __pyx_k_Return_the_number_of_stored_elem, 0},
+  {(char *)"dimensions", __pyx_getprop_7netCDF4_8Variable_dimensions, __pyx_setprop_7netCDF4_8Variable_dimensions, __pyx_k_get_variables_s_dimension_names, 0},
+  {(char *)"_varid", __pyx_getprop_7netCDF4_8Variable__varid, __pyx_setprop_7netCDF4_8Variable__varid, 0, 0},
+  {(char *)"_grpid", __pyx_getprop_7netCDF4_8Variable__grpid, __pyx_setprop_7netCDF4_8Variable__grpid, 0, 0},
+  {(char *)"_nunlimdim", __pyx_getprop_7netCDF4_8Variable__nunlimdim, __pyx_setprop_7netCDF4_8Variable__nunlimdim, 0, 0},
+  {(char *)"_name", __pyx_getprop_7netCDF4_8Variable__name, __pyx_setprop_7netCDF4_8Variable__name, 0, 0},
+  {(char *)"ndim", __pyx_getprop_7netCDF4_8Variable_ndim, __pyx_setprop_7netCDF4_8Variable_ndim, 0, 0},
+  {(char *)"dtype", __pyx_getprop_7netCDF4_8Variable_dtype, __pyx_setprop_7netCDF4_8Variable_dtype, 0, 0},
+  {(char *)"mask", __pyx_getprop_7netCDF4_8Variable_mask, __pyx_setprop_7netCDF4_8Variable_mask, 0, 0},
+  {(char *)"scale", __pyx_getprop_7netCDF4_8Variable_scale, __pyx_setprop_7netCDF4_8Variable_scale, 0, 0},
+  {(char *)"_isprimitive", __pyx_getprop_7netCDF4_8Variable__isprimitive, __pyx_setprop_7netCDF4_8Variable__isprimitive, 0, 0},
+  {(char *)"_iscompound", __pyx_getprop_7netCDF4_8Variable__iscompound, __pyx_setprop_7netCDF4_8Variable__iscompound, 0, 0},
+  {(char *)"_isvlen", __pyx_getprop_7netCDF4_8Variable__isvlen, __pyx_setprop_7netCDF4_8Variable__isvlen, 0, 0},
+  {(char *)"_grp", __pyx_getprop_7netCDF4_8Variable__grp, __pyx_setprop_7netCDF4_8Variable__grp, 0, 0},
+  {(char *)"_cmptype", __pyx_getprop_7netCDF4_8Variable__cmptype, __pyx_setprop_7netCDF4_8Variable__cmptype, 0, 0},
+  {(char *)"_vltype", __pyx_getprop_7netCDF4_8Variable__vltype, __pyx_setprop_7netCDF4_8Variable__vltype, 0, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_Variable = {
+  __pyx_pw_7netCDF4_8Variable_51__len__, /*sq_length*/
+  0, /*sq_concat*/
+  0, /*sq_repeat*/
+  __pyx_sq_item_7netCDF4_Variable, /*sq_item*/
+  0, /*sq_slice*/
+  0, /*sq_ass_item*/
+  0, /*sq_ass_slice*/
+  0, /*sq_contains*/
+  0, /*sq_inplace_concat*/
+  0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_Variable = {
+  __pyx_pw_7netCDF4_8Variable_51__len__, /*mp_length*/
+  __pyx_pw_7netCDF4_8Variable_43__getitem__, /*mp_subscript*/
+  __pyx_mp_ass_subscript_7netCDF4_Variable, /*mp_ass_subscript*/
+};
+
+static PyTypeObject __pyx_type_7netCDF4_Variable = {
+  PyVarObject_HEAD_INIT(0, 0)
+  "netCDF4.Variable", /*tp_name*/
+  sizeof(struct __pyx_obj_7netCDF4_Variable), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_7netCDF4_Variable, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  __pyx_pw_7netCDF4_8Variable_5__repr__, /*tp_repr*/
+  0, /*tp_as_number*/
+  &__pyx_tp_as_sequence_Variable, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_Variable, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  __pyx_tp_getattro_7netCDF4_Variable, /*tp_getattro*/
+  __pyx_tp_setattro_7netCDF4_Variable, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  "\nVariable(self, group, name, datatype, dimensions=(), zlib=False, complevel=4, shuffle=True, fletcher32=False, contiguous=False, chunksizes=None, endian='native', least_significant_digit=None,fill_value=None)\n\nA netCDF L{Variable} is used to read and write netCDF data.  They are \nanalagous to numpy array objects.\n\nL{Variable} instances should be created using the\nL{createVariable<Dataset.createVariable>} method of a L{Dataset} or\nL{Group} instance, not using this class directl [...]
+  __pyx_tp_traverse_7netCDF4_Variable, /*tp_traverse*/
+  __pyx_tp_clear_7netCDF4_Variable, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_7netCDF4_Variable, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_7netCDF4_Variable, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_7netCDF4_8Variable_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_7netCDF4_Variable, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  0, /*tp_version_tag*/
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static PyObject *__pyx_tp_new_7netCDF4_CompoundType(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_7netCDF4_CompoundType *p;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_7netCDF4_CompoundType *)o);
+  p->dtype = Py_None; Py_INCREF(Py_None);
+  p->name = Py_None; Py_INCREF(Py_None);
+  return o;
+}
+
+static void __pyx_tp_dealloc_7netCDF4_CompoundType(PyObject *o) {
+  struct __pyx_obj_7netCDF4_CompoundType *p = (struct __pyx_obj_7netCDF4_CompoundType *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  PyObject_GC_UnTrack(o);
+  Py_CLEAR(p->dtype);
+  Py_CLEAR(p->name);
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_7netCDF4_CompoundType(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_7netCDF4_CompoundType *p = (struct __pyx_obj_7netCDF4_CompoundType *)o;
+  if (p->dtype) {
+    e = (*v)(p->dtype, a); if (e) return e;
+  }
+  if (p->name) {
+    e = (*v)(p->name, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_7netCDF4_CompoundType(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_7netCDF4_CompoundType *p = (struct __pyx_obj_7netCDF4_CompoundType *)o;
+  tmp = ((PyObject*)p->dtype);
+  p->dtype = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->name);
+  p->name = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyObject *__pyx_getprop_7netCDF4_12CompoundType__nc_type(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_12CompoundType_8_nc_type_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_12CompoundType__nc_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_12CompoundType_8_nc_type_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_12CompoundType_dtype(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_12CompoundType_5dtype_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_12CompoundType_dtype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_12CompoundType_5dtype_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_12CompoundType_5dtype_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_12CompoundType_name(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_12CompoundType_4name_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_12CompoundType_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_12CompoundType_4name_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_12CompoundType_4name_5__del__(o);
+  }
+}
+
+static PyMethodDef __pyx_methods_7netCDF4_CompoundType[] = {
+  {"__unicode__", (PyCFunction)__pyx_pw_7netCDF4_12CompoundType_5__unicode__, METH_NOARGS, 0},
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_7netCDF4_CompoundType[] = {
+  {(char *)"_nc_type", __pyx_getprop_7netCDF4_12CompoundType__nc_type, __pyx_setprop_7netCDF4_12CompoundType__nc_type, 0, 0},
+  {(char *)"dtype", __pyx_getprop_7netCDF4_12CompoundType_dtype, __pyx_setprop_7netCDF4_12CompoundType_dtype, 0, 0},
+  {(char *)"name", __pyx_getprop_7netCDF4_12CompoundType_name, __pyx_setprop_7netCDF4_12CompoundType_name, 0, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_7netCDF4_CompoundType = {
+  PyVarObject_HEAD_INIT(0, 0)
+  "netCDF4.CompoundType", /*tp_name*/
+  sizeof(struct __pyx_obj_7netCDF4_CompoundType), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_7netCDF4_CompoundType, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  __pyx_pw_7netCDF4_12CompoundType_3__repr__, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  "\nA L{CompoundType} instance is used to describe a compound data type.\n\nConstructor: C{CompoundType(group, datatype, datatype_name)}\n\n at attention: When creating nested compound data types,\nthe inner compound data types must already be associated with CompoundType\ninstances (so create CompoundType instances for the innermost structures\nfirst).\n\nL{CompoundType} instances should be created using the\nL{createCompoundType<Dataset.createCompoundType>}\nmethod of a Dataset or L{Grou [...]
+  __pyx_tp_traverse_7netCDF4_CompoundType, /*tp_traverse*/
+  __pyx_tp_clear_7netCDF4_CompoundType, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_7netCDF4_CompoundType, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_7netCDF4_CompoundType, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_7netCDF4_12CompoundType_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_7netCDF4_CompoundType, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  0, /*tp_version_tag*/
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static PyObject *__pyx_tp_new_7netCDF4_VLType(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_7netCDF4_VLType *p;
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  p = ((struct __pyx_obj_7netCDF4_VLType *)o);
+  p->dtype = Py_None; Py_INCREF(Py_None);
+  p->name = Py_None; Py_INCREF(Py_None);
+  return o;
+}
+
+static void __pyx_tp_dealloc_7netCDF4_VLType(PyObject *o) {
+  struct __pyx_obj_7netCDF4_VLType *p = (struct __pyx_obj_7netCDF4_VLType *)o;
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  PyObject_GC_UnTrack(o);
+  Py_CLEAR(p->dtype);
+  Py_CLEAR(p->name);
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_7netCDF4_VLType(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_7netCDF4_VLType *p = (struct __pyx_obj_7netCDF4_VLType *)o;
+  if (p->dtype) {
+    e = (*v)(p->dtype, a); if (e) return e;
+  }
+  if (p->name) {
+    e = (*v)(p->name, a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_7netCDF4_VLType(PyObject *o) {
+  PyObject* tmp;
+  struct __pyx_obj_7netCDF4_VLType *p = (struct __pyx_obj_7netCDF4_VLType *)o;
+  tmp = ((PyObject*)p->dtype);
+  p->dtype = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->name);
+  p->name = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
+  return 0;
+}
+
+static PyObject *__pyx_getprop_7netCDF4_6VLType__nc_type(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_6VLType_8_nc_type_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_6VLType__nc_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_6VLType_8_nc_type_3__set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_6VLType_dtype(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_6VLType_5dtype_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_6VLType_dtype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_6VLType_5dtype_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_6VLType_5dtype_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_6VLType_name(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_6VLType_4name_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_6VLType_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_6VLType_4name_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_6VLType_4name_5__del__(o);
+  }
+}
+
+static PyMethodDef __pyx_methods_7netCDF4_VLType[] = {
+  {"__unicode__", (PyCFunction)__pyx_pw_7netCDF4_6VLType_5__unicode__, METH_NOARGS, 0},
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_7netCDF4_VLType[] = {
+  {(char *)"_nc_type", __pyx_getprop_7netCDF4_6VLType__nc_type, __pyx_setprop_7netCDF4_6VLType__nc_type, 0, 0},
+  {(char *)"dtype", __pyx_getprop_7netCDF4_6VLType_dtype, __pyx_setprop_7netCDF4_6VLType_dtype, 0, 0},
+  {(char *)"name", __pyx_getprop_7netCDF4_6VLType_name, __pyx_setprop_7netCDF4_6VLType_name, 0, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_7netCDF4_VLType = {
+  PyVarObject_HEAD_INIT(0, 0)
+  "netCDF4.VLType", /*tp_name*/
+  sizeof(struct __pyx_obj_7netCDF4_VLType), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_7netCDF4_VLType, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  __pyx_pw_7netCDF4_6VLType_3__repr__, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  "\nA L{VLType} instance is used to describe a variable length (VLEN) data type.\n\nConstructor: C{VLType(group, datatype, datatype_name)}\n\nL{VLType} instances should be created using the \nL{createVLType<Dataset.createVLType>}\nmethod of a Dataset or L{Group} instance, not using this class directly.\n\nB{Parameters:}\n\nB{C{group}} - L{Group} instance to associate with the VLEN datatype.\n\nB{C{datatype}} - An numpy dtype object describing a the component type for the\nvariable lengt [...]
+  __pyx_tp_traverse_7netCDF4_VLType, /*tp_traverse*/
+  __pyx_tp_clear_7netCDF4_VLType, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_7netCDF4_VLType, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_7netCDF4_VLType, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_7netCDF4_6VLType_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_7netCDF4_VLType, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  0, /*tp_version_tag*/
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static PyMethodDef __pyx_methods[] = {
+  {0, 0, 0, 0}
+};
+
+#if PY_MAJOR_VERSION >= 3
+static struct PyModuleDef __pyx_moduledef = {
+  #if PY_VERSION_HEX < 0x03020000
+    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
+  #else
+    PyModuleDef_HEAD_INIT,
+  #endif
+    "netCDF4",
+    __pyx_k_Introduction_Python_interface_t, /* m_doc */
+    -1, /* m_size */
+    __pyx_methods /* m_methods */,
+    NULL, /* m_reload */
+    NULL, /* m_traverse */
+    NULL, /* m_clear */
+    NULL /* m_free */
+};
+#endif
+
+static __Pyx_StringTabEntry __pyx_string_tab[] = {
+  {&__pyx_n_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 1},
+  {&__pyx_kp_s_0m, __pyx_k_0m, sizeof(__pyx_k_0m), 0, 0, 1, 0},
+  {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
+  {&__pyx_kp_s_1_1_4, __pyx_k_1_1_4, sizeof(__pyx_k_1_1_4), 0, 0, 1, 0},
+  {&__pyx_kp_s_4_2_1, __pyx_k_4_2_1, sizeof(__pyx_k_4_2_1), 0, 0, 1, 0},
+  {&__pyx_kp_s_4m, __pyx_k_4m, sizeof(__pyx_k_4m), 0, 0, 1, 0},
+  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
+  {&__pyx_n_s_Dimension, __pyx_k_Dimension, sizeof(__pyx_k_Dimension), 0, 0, 1, 1},
+  {&__pyx_n_s_Dimension___init, __pyx_k_Dimension___init, sizeof(__pyx_k_Dimension___init), 0, 0, 1, 1},
+  {&__pyx_n_s_Dimension___len, __pyx_k_Dimension___len, sizeof(__pyx_k_Dimension___len), 0, 0, 1, 1},
+  {&__pyx_n_s_Dimension___repr, __pyx_k_Dimension___repr, sizeof(__pyx_k_Dimension___repr), 0, 0, 1, 1},
+  {&__pyx_n_s_Dimension_isunlimited, __pyx_k_Dimension_isunlimited, sizeof(__pyx_k_Dimension_isunlimited), 0, 0, 1, 1},
+  {&__pyx_kp_s_Dimension_object_no_longer_valid, __pyx_k_Dimension_object_no_longer_valid, sizeof(__pyx_k_Dimension_object_no_longer_valid), 0, 0, 1, 0},
+  {&__pyx_n_s_FillValue, __pyx_k_FillValue, sizeof(__pyx_k_FillValue), 0, 0, 1, 1},
+  {&__pyx_kp_s_FillValue_attribute_must_be_set, __pyx_k_FillValue_attribute_must_be_set, sizeof(__pyx_k_FillValue_attribute_must_be_set), 0, 0, 1, 0},
+  {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
+  {&__pyx_kp_s_Illegal_index, __pyx_k_Illegal_index, sizeof(__pyx_k_Illegal_index), 0, 0, 1, 0},
+  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
+  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
+  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
+  {&__pyx_n_s_MFDataset, __pyx_k_MFDataset, sizeof(__pyx_k_MFDataset), 0, 0, 1, 1},
+  {&__pyx_n_s_MFDataset___getattribute, __pyx_k_MFDataset___getattribute, sizeof(__pyx_k_MFDataset___getattribute), 0, 0, 1, 1},
+  {&__pyx_n_s_MFDataset___init, __pyx_k_MFDataset___init, sizeof(__pyx_k_MFDataset___init), 0, 0, 1, 1},
+  {&__pyx_n_s_MFDataset___repr, __pyx_k_MFDataset___repr, sizeof(__pyx_k_MFDataset___repr), 0, 0, 1, 1},
+  {&__pyx_n_s_MFDataset___setattr, __pyx_k_MFDataset___setattr, sizeof(__pyx_k_MFDataset___setattr), 0, 0, 1, 1},
+  {&__pyx_n_s_MFDataset_close, __pyx_k_MFDataset_close, sizeof(__pyx_k_MFDataset_close), 0, 0, 1, 1},
+  {&__pyx_n_s_MFDataset_ncattrs, __pyx_k_MFDataset_ncattrs, sizeof(__pyx_k_MFDataset_ncattrs), 0, 0, 1, 1},
+  {&__pyx_kp_s_MFDataset_self_files_check_Fals, __pyx_k_MFDataset_self_files_check_Fals, sizeof(__pyx_k_MFDataset_self_files_check_Fals), 0, 0, 1, 0},
+  {&__pyx_kp_s_MFNetCDF4_only_works_with_NETCDF, __pyx_k_MFNetCDF4_only_works_with_NETCDF, sizeof(__pyx_k_MFNetCDF4_only_works_with_NETCDF), 0, 0, 1, 0},
+  {&__pyx_n_s_MFTime, __pyx_k_MFTime, sizeof(__pyx_k_MFTime), 0, 0, 1, 1},
+  {&__pyx_n_s_MFTime___getitem, __pyx_k_MFTime___getitem, sizeof(__pyx_k_MFTime___getitem), 0, 0, 1, 1},
+  {&__pyx_n_s_MFTime___init, __pyx_k_MFTime___init, sizeof(__pyx_k_MFTime___init), 0, 0, 1, 1},
+  {&__pyx_n_s_MFTime__delta, __pyx_k_MFTime__delta, sizeof(__pyx_k_MFTime__delta), 0, 0, 1, 1},
+  {&__pyx_n_s_MFTime__time, __pyx_k_MFTime__time, sizeof(__pyx_k_MFTime__time), 0, 0, 1, 1},
+  {&__pyx_kp_s_MFTime_requires_that_the_same_ti, __pyx_k_MFTime_requires_that_the_same_ti, sizeof(__pyx_k_MFTime_requires_that_the_same_ti), 0, 0, 1, 0},
+  {&__pyx_kp_s_MFTime_requires_that_the_time_va, __pyx_k_MFTime_requires_that_the_time_va, sizeof(__pyx_k_MFTime_requires_that_the_time_va), 0, 0, 1, 0},
+  {&__pyx_kp_s_MFTime_self_time_units_None_Cla, __pyx_k_MFTime_self_time_units_None_Cla, sizeof(__pyx_k_MFTime_self_time_units_None_Cla), 0, 0, 1, 0},
+  {&__pyx_n_s_NC_DISKLESS, __pyx_k_NC_DISKLESS, sizeof(__pyx_k_NC_DISKLESS), 0, 0, 1, 1},
+  {&__pyx_n_s_NETCDF3, __pyx_k_NETCDF3, sizeof(__pyx_k_NETCDF3), 0, 0, 1, 1},
+  {&__pyx_n_s_NETCDF3_64BIT, __pyx_k_NETCDF3_64BIT, sizeof(__pyx_k_NETCDF3_64BIT), 0, 0, 1, 1},
+  {&__pyx_n_s_NETCDF3_CLASSIC, __pyx_k_NETCDF3_CLASSIC, sizeof(__pyx_k_NETCDF3_CLASSIC), 0, 0, 1, 1},
+  {&__pyx_n_s_NETCDF4, __pyx_k_NETCDF4, sizeof(__pyx_k_NETCDF4), 0, 0, 1, 1},
+  {&__pyx_n_s_NETCDF4_CLASSIC, __pyx_k_NETCDF4_CLASSIC, sizeof(__pyx_k_NETCDF4_CLASSIC), 0, 0, 1, 1},
+  {&__pyx_n_s_NUMCHARS, __pyx_k_NUMCHARS, sizeof(__pyx_k_NUMCHARS), 0, 0, 1, 1},
+  {&__pyx_n_s_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 1, 1},
+  {&__pyx_n_s_OrderedDict, __pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 0, 1, 1},
+  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
+  {&__pyx_n_s_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 0, 1, 1},
+  {&__pyx_n_s_S1, __pyx_k_S1, sizeof(__pyx_k_S1), 0, 0, 1, 1},
+  {&__pyx_n_s_StartCountStride, __pyx_k_StartCountStride, sizeof(__pyx_k_StartCountStride), 0, 0, 1, 1},
+  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
+  {&__pyx_n_s_U, __pyx_k_U, sizeof(__pyx_k_U), 0, 0, 1, 1},
+  {&__pyx_n_s_U1, __pyx_k_U1, sizeof(__pyx_k_U1), 0, 0, 1, 1},
+  {&__pyx_n_s_UNDEFINED, __pyx_k_UNDEFINED, sizeof(__pyx_k_UNDEFINED), 0, 0, 1, 1},
+  {&__pyx_n_s_UnicodeDecodeError, __pyx_k_UnicodeDecodeError, sizeof(__pyx_k_UnicodeDecodeError), 0, 0, 1, 1},
+  {&__pyx_kp_s_Unsupported_compound_type_elemen, __pyx_k_Unsupported_compound_type_elemen, sizeof(__pyx_k_Unsupported_compound_type_elemen), 0, 0, 1, 0},
+  {&__pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_k_Users_jsw_python_netcdf4_python, sizeof(__pyx_k_Users_jsw_python_netcdf4_python), 0, 0, 1, 0},
+  {&__pyx_kp_s_Users_jsw_python_netcdf4_python_2, __pyx_k_Users_jsw_python_netcdf4_python_2, sizeof(__pyx_k_Users_jsw_python_netcdf4_python_2), 0, 0, 1, 0},
+  {&__pyx_n_s_V, __pyx_k_V, sizeof(__pyx_k_V), 0, 0, 1, 1},
+  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
+  {&__pyx_n_s_Variable, __pyx_k_Variable, sizeof(__pyx_k_Variable), 0, 0, 1, 1},
+  {&__pyx_n_s_Variable___getattr, __pyx_k_Variable___getattr, sizeof(__pyx_k_Variable___getattr), 0, 0, 1, 1},
+  {&__pyx_n_s_Variable___getitem, __pyx_k_Variable___getitem, sizeof(__pyx_k_Variable___getitem), 0, 0, 1, 1},
+  {&__pyx_n_s_Variable___init, __pyx_k_Variable___init, sizeof(__pyx_k_Variable___init), 0, 0, 1, 1},
+  {&__pyx_n_s_Variable___len, __pyx_k_Variable___len, sizeof(__pyx_k_Variable___len), 0, 0, 1, 1},
+  {&__pyx_n_s_Variable___repr, __pyx_k_Variable___repr, sizeof(__pyx_k_Variable___repr), 0, 0, 1, 1},
+  {&__pyx_n_s_Variable__shape, __pyx_k_Variable__shape, sizeof(__pyx_k_Variable__shape), 0, 0, 1, 1},
+  {&__pyx_kp_s_Variable_length_strings_are_only, __pyx_k_Variable_length_strings_are_only, sizeof(__pyx_k_Variable_length_strings_are_only), 0, 0, 1, 0},
+  {&__pyx_n_s_Variable_ncattrs, __pyx_k_Variable_ncattrs, sizeof(__pyx_k_Variable_ncattrs), 0, 0, 1, 1},
+  {&__pyx_kp_s_Variable_object_no_longer_valid, __pyx_k_Variable_object_no_longer_valid, sizeof(__pyx_k_Variable_object_no_longer_valid), 0, 0, 1, 0},
+  {&__pyx_n_s_Variable_set_auto_maskandscale, __pyx_k_Variable_set_auto_maskandscale, sizeof(__pyx_k_Variable_set_auto_maskandscale), 0, 0, 1, 1},
+  {&__pyx_n_s_Variable_typecode, __pyx_k_Variable_typecode, sizeof(__pyx_k_Variable_typecode), 0, 0, 1, 1},
+  {&__pyx_kp_s__116, __pyx_k__116, sizeof(__pyx_k__116), 0, 0, 1, 0},
+  {&__pyx_kp_s__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 0, 1, 0},
+  {&__pyx_kp_s__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 1, 0},
+  {&__pyx_kp_s__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 0, 1, 0},
+  {&__pyx_kp_s__36, __pyx_k__36, sizeof(__pyx_k__36), 0, 0, 1, 0},
+  {&__pyx_kp_s__38, __pyx_k__38, sizeof(__pyx_k__38), 0, 0, 1, 0},
+  {&__pyx_kp_s__39, __pyx_k__39, sizeof(__pyx_k__39), 0, 0, 1, 0},
+  {&__pyx_kp_s__41, __pyx_k__41, sizeof(__pyx_k__41), 0, 0, 1, 0},
+  {&__pyx_kp_s__42, __pyx_k__42, sizeof(__pyx_k__42), 0, 0, 1, 0},
+  {&__pyx_n_s__44, __pyx_k__44, sizeof(__pyx_k__44), 0, 0, 1, 1},
+  {&__pyx_kp_s__51, __pyx_k__51, sizeof(__pyx_k__51), 0, 0, 1, 0},
+  {&__pyx_kp_s__52, __pyx_k__52, sizeof(__pyx_k__52), 0, 0, 1, 0},
+  {&__pyx_kp_s__53, __pyx_k__53, sizeof(__pyx_k__53), 0, 0, 1, 0},
+  {&__pyx_kp_s__54, __pyx_k__54, sizeof(__pyx_k__54), 0, 0, 1, 0},
+  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
+  {&__pyx_n_s_add_offset, __pyx_k_add_offset, sizeof(__pyx_k_add_offset), 0, 0, 1, 1},
+  {&__pyx_n_s_aggDimId, __pyx_k_aggDimId, sizeof(__pyx_k_aggDimId), 0, 0, 1, 1},
+  {&__pyx_n_s_aggDimName, __pyx_k_aggDimName, sizeof(__pyx_k_aggDimName), 0, 0, 1, 1},
+  {&__pyx_n_s_aggdim, __pyx_k_aggdim, sizeof(__pyx_k_aggdim), 0, 0, 1, 1},
+  {&__pyx_kp_s_aggregation_variable_s_not_defin, __pyx_k_aggregation_variable_s_not_defin, sizeof(__pyx_k_aggregation_variable_s_not_defin), 0, 0, 1, 0},
+  {&__pyx_n_s_align, __pyx_k_align, sizeof(__pyx_k_align), 0, 0, 1, 1},
+  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
+  {&__pyx_n_s_any, __pyx_k_any, sizeof(__pyx_k_any), 0, 0, 1, 1},
+  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
+  {&__pyx_n_s_around, __pyx_k_around, sizeof(__pyx_k_around), 0, 0, 1, 1},
+  {&__pyx_n_s_arr, __pyx_k_arr, sizeof(__pyx_k_arr), 0, 0, 1, 1},
+  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
+  {&__pyx_n_s_as, __pyx_k_as, sizeof(__pyx_k_as), 0, 0, 1, 1},
+  {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1},
+  {&__pyx_n_s_assign_vlen, __pyx_k_assign_vlen, sizeof(__pyx_k_assign_vlen), 0, 0, 1, 1},
+  {&__pyx_kp_s_assign_vlen_method_only_for_use, __pyx_k_assign_vlen_method_only_for_use, sizeof(__pyx_k_assign_vlen_method_only_for_use), 0, 0, 1, 0},
+  {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1},
+  {&__pyx_kp_s_attribute_s_has_unsupported_data, __pyx_k_attribute_s_has_unsupported_data, sizeof(__pyx_k_attribute_s_has_unsupported_data), 0, 0, 1, 0},
+  {&__pyx_n_s_attrs, __pyx_k_attrs, sizeof(__pyx_k_attrs), 0, 0, 1, 1},
+  {&__pyx_n_s_atype, __pyx_k_atype, sizeof(__pyx_k_atype), 0, 0, 1, 1},
+  {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
+  {&__pyx_n_s_basedate, __pyx_k_basedate, sizeof(__pyx_k_basedate), 0, 0, 1, 1},
+  {&__pyx_n_s_big, __pyx_k_big, sizeof(__pyx_k_big), 0, 0, 1, 1},
+  {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1},
+  {&__pyx_n_s_bs, __pyx_k_bs, sizeof(__pyx_k_bs), 0, 0, 1, 1},
+  {&__pyx_n_s_byteorder, __pyx_k_byteorder, sizeof(__pyx_k_byteorder), 0, 0, 1, 1},
+  {&__pyx_n_s_byteswap, __pyx_k_byteswap, sizeof(__pyx_k_byteswap), 0, 0, 1, 1},
+  {&__pyx_n_s_calendar, __pyx_k_calendar, sizeof(__pyx_k_calendar), 0, 0, 1, 1},
+  {&__pyx_kp_s_cannot_assign_fill_value_for_mas, __pyx_k_cannot_assign_fill_value_for_mas, sizeof(__pyx_k_cannot_assign_fill_value_for_mas), 0, 0, 1, 0},
+  {&__pyx_kp_s_cannot_close_a_L_Group_only_appl, __pyx_k_cannot_close_a_L_Group_only_appl, sizeof(__pyx_k_cannot_close_a_L_Group_only_appl), 0, 0, 1, 0},
+  {&__pyx_kp_s_cannot_find_compound_type_in_thi, __pyx_k_cannot_find_compound_type_in_thi, sizeof(__pyx_k_cannot_find_compound_type_in_thi), 0, 0, 1, 0},
+  {&__pyx_kp_s_cannot_set__FillValue_attribute, __pyx_k_cannot_set__FillValue_attribute, sizeof(__pyx_k_cannot_set__FillValue_attribute), 0, 0, 1, 0},
+  {&__pyx_kp_s_cannot_specify_chunksizes_for_a, __pyx_k_cannot_specify_chunksizes_for_a, sizeof(__pyx_k_cannot_specify_chunksizes_for_a), 0, 0, 1, 0},
+  {&__pyx_kp_s_cannot_using_file_globbing_for_r, __pyx_k_cannot_using_file_globbing_for_r, sizeof(__pyx_k_cannot_using_file_globbing_for_r), 0, 0, 1, 0},
+  {&__pyx_n_s_cdf, __pyx_k_cdf, sizeof(__pyx_k_cdf), 0, 0, 1, 1},
+  {&__pyx_n_s_cdfRecVar, __pyx_k_cdfRecVar, sizeof(__pyx_k_cdfRecVar), 0, 0, 1, 1},
+  {&__pyx_n_s_cdfRecVar_2, __pyx_k_cdfRecVar_2, sizeof(__pyx_k_cdfRecVar_2), 0, 0, 1, 1},
+  {&__pyx_n_s_cdfTLen, __pyx_k_cdfTLen, sizeof(__pyx_k_cdfTLen), 0, 0, 1, 1},
+  {&__pyx_n_s_cdfVLen, __pyx_k_cdfVLen, sizeof(__pyx_k_cdfVLen), 0, 0, 1, 1},
+  {&__pyx_n_s_cdfVLen_2, __pyx_k_cdfVLen_2, sizeof(__pyx_k_cdfVLen_2), 0, 0, 1, 1},
+  {&__pyx_n_s_cdf_2, __pyx_k_cdf_2, sizeof(__pyx_k_cdf_2), 0, 0, 1, 1},
+  {&__pyx_n_s_cdfm, __pyx_k_cdfm, sizeof(__pyx_k_cdfm), 0, 0, 1, 1},
+  {&__pyx_n_s_cdftime, __pyx_k_cdftime, sizeof(__pyx_k_cdftime), 0, 0, 1, 1},
+  {&__pyx_n_s_char, __pyx_k_char, sizeof(__pyx_k_char), 0, 0, 1, 1},
+  {&__pyx_n_s_chartostring, __pyx_k_chartostring, sizeof(__pyx_k_chartostring), 0, 0, 1, 1},
+  {&__pyx_n_s_check, __pyx_k_check, sizeof(__pyx_k_check), 0, 0, 1, 1},
+  {&__pyx_n_s_chunk_cache, __pyx_k_chunk_cache, sizeof(__pyx_k_chunk_cache), 0, 0, 1, 1},
+  {&__pyx_n_s_chunksizes, __pyx_k_chunksizes, sizeof(__pyx_k_chunksizes), 0, 0, 1, 1},
+  {&__pyx_kp_s_chunksizes_must_be_a_sequence_wi, __pyx_k_chunksizes_must_be_a_sequence_wi, sizeof(__pyx_k_chunksizes_must_be_a_sequence_wi), 0, 0, 1, 0},
+  {&__pyx_n_s_clobber, __pyx_k_clobber, sizeof(__pyx_k_clobber), 0, 0, 1, 1},
+  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
+  {&__pyx_n_s_cmptype, __pyx_k_cmptype, sizeof(__pyx_k_cmptype), 0, 0, 1, 1},
+  {&__pyx_n_s_cmptypes, __pyx_k_cmptypes, sizeof(__pyx_k_cmptypes), 0, 0, 1, 1},
+  {&__pyx_n_s_cnt, __pyx_k_cnt, sizeof(__pyx_k_cnt), 0, 0, 1, 1},
+  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
+  {&__pyx_n_s_complevel, __pyx_k_complevel, sizeof(__pyx_k_complevel), 0, 0, 1, 1},
+  {&__pyx_n_s_compound, __pyx_k_compound, sizeof(__pyx_k_compound), 0, 0, 1, 1},
+  {&__pyx_kp_s_compound_data_type_s, __pyx_k_compound_data_type_s, sizeof(__pyx_k_compound_data_type_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_compound_field_of_an_unsupported, __pyx_k_compound_field_of_an_unsupported, sizeof(__pyx_k_compound_field_of_an_unsupported), 0, 0, 1, 0},
+  {&__pyx_n_s_concatenate, __pyx_k_concatenate, sizeof(__pyx_k_concatenate), 0, 0, 1, 1},
+  {&__pyx_n_s_contiguous, __pyx_k_contiguous, sizeof(__pyx_k_contiguous), 0, 0, 1, 1},
+  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
+  {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
+  {&__pyx_kp_s_created_using_fill_value_keyword, __pyx_k_created_using_fill_value_keyword, sizeof(__pyx_k_created_using_fill_value_keyword), 0, 0, 1, 0},
+  {&__pyx_kp_s_current_shape_s, __pyx_k_current_shape_s, sizeof(__pyx_k_current_shape_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_current_size_s, __pyx_k_current_size_s, sizeof(__pyx_k_current_size_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_d_d_d, __pyx_k_d_d_d, sizeof(__pyx_k_d_d_d), 0, 0, 1, 0},
+  {&__pyx_kp_s_d_d_d_s, __pyx_k_d_d_d_s, sizeof(__pyx_k_d_d_d_s), 0, 0, 1, 0},
+  {&__pyx_n_s_dat, __pyx_k_dat, sizeof(__pyx_k_dat), 0, 0, 1, 1},
+  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
+  {&__pyx_n_s_data_model, __pyx_k_data_model, sizeof(__pyx_k_data_model), 0, 0, 1, 1},
+  {&__pyx_n_s_data_model_2, __pyx_k_data_model_2, sizeof(__pyx_k_data_model_2), 0, 0, 1, 1},
+  {&__pyx_kp_s_data_to_put_in_string_variable_m, __pyx_k_data_to_put_in_string_variable_m, sizeof(__pyx_k_data_to_put_in_string_variable_m), 0, 0, 1, 0},
+  {&__pyx_n_s_datashape, __pyx_k_datashape, sizeof(__pyx_k_datashape), 0, 0, 1, 1},
+  {&__pyx_n_s_datatype, __pyx_k_datatype, sizeof(__pyx_k_datatype), 0, 0, 1, 1},
+  {&__pyx_n_s_datatype_name, __pyx_k_datatype_name, sizeof(__pyx_k_datatype_name), 0, 0, 1, 1},
+  {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1},
+  {&__pyx_n_s_date2index, __pyx_k_date2index, sizeof(__pyx_k_date2index), 0, 0, 1, 1},
+  {&__pyx_n_s_date2num, __pyx_k_date2num, sizeof(__pyx_k_date2num), 0, 0, 1, 1},
+  {&__pyx_n_s_dateparse, __pyx_k_dateparse, sizeof(__pyx_k_dateparse), 0, 0, 1, 1},
+  {&__pyx_n_s_dates, __pyx_k_dates, sizeof(__pyx_k_dates), 0, 0, 1, 1},
+  {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
+  {&__pyx_kp_s_dateutil_module_required_for_acc, __pyx_k_dateutil_module_required_for_acc, sizeof(__pyx_k_dateutil_module_required_for_acc), 0, 0, 1, 0},
+  {&__pyx_n_s_dateutil_parser, __pyx_k_dateutil_parser, sizeof(__pyx_k_dateutil_parser), 0, 0, 1, 1},
+  {&__pyx_n_s_dateutil_tz, __pyx_k_dateutil_tz, sizeof(__pyx_k_dateutil_tz), 0, 0, 1, 1},
+  {&__pyx_n_s_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 0, 1, 1},
+  {&__pyx_n_s_days, __pyx_k_days, sizeof(__pyx_k_days), 0, 0, 1, 1},
+  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
+  {&__pyx_n_s_default_encoding, __pyx_k_default_encoding, sizeof(__pyx_k_default_encoding), 0, 0, 1, 1},
+  {&__pyx_n_s_default_fillvals, __pyx_k_default_fillvals, sizeof(__pyx_k_default_fillvals), 0, 0, 1, 1},
+  {&__pyx_n_s_delncattr, __pyx_k_delncattr, sizeof(__pyx_k_delncattr), 0, 0, 1, 1},
+  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
+  {&__pyx_n_s_dim, __pyx_k_dim, sizeof(__pyx_k_dim), 0, 0, 1, 1},
+  {&__pyx_kp_s_dimension_s_not_defined_in_group, __pyx_k_dimension_s_not_defined_in_group, sizeof(__pyx_k_dimension_s_not_defined_in_group), 0, 0, 1, 0},
+  {&__pyx_n_s_dimensions, __pyx_k_dimensions, sizeof(__pyx_k_dimensions), 0, 0, 1, 1},
+  {&__pyx_kp_s_dimensions_cannot_be_altered, __pyx_k_dimensions_cannot_be_altered, sizeof(__pyx_k_dimensions_cannot_be_altered), 0, 0, 1, 0},
+  {&__pyx_kp_s_dimensions_s, __pyx_k_dimensions_s, sizeof(__pyx_k_dimensions_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_dimensions_sizes_s, __pyx_k_dimensions_sizes_s, sizeof(__pyx_k_dimensions_sizes_s), 0, 0, 1, 0},
+  {&__pyx_n_s_dimid, __pyx_k_dimid, sizeof(__pyx_k_dimid), 0, 0, 1, 1},
+  {&__pyx_n_s_dimlens, __pyx_k_dimlens, sizeof(__pyx_k_dimlens), 0, 0, 1, 1},
+  {&__pyx_n_s_dimname, __pyx_k_dimname, sizeof(__pyx_k_dimname), 0, 0, 1, 1},
+  {&__pyx_n_s_dimnames, __pyx_k_dimnames, sizeof(__pyx_k_dimnames), 0, 0, 1, 1},
+  {&__pyx_n_s_dims, __pyx_k_dims, sizeof(__pyx_k_dims), 0, 0, 1, 1},
+  {&__pyx_n_s_dims_2, __pyx_k_dims_2, sizeof(__pyx_k_dims_2), 0, 0, 1, 1},
+  {&__pyx_n_s_dimtotlen, __pyx_k_dimtotlen, sizeof(__pyx_k_dimtotlen), 0, 0, 1, 1},
+  {&__pyx_n_s_disk_format, __pyx_k_disk_format, sizeof(__pyx_k_disk_format), 0, 0, 1, 1},
+  {&__pyx_n_s_disk_format_2, __pyx_k_disk_format_2, sizeof(__pyx_k_disk_format_2), 0, 0, 1, 1},
+  {&__pyx_n_s_diskless, __pyx_k_diskless, sizeof(__pyx_k_diskless), 0, 0, 1, 1},
+  {&__pyx_kp_s_diskless_mode_requires_netcdf_li, __pyx_k_diskless_mode_requires_netcdf_li, sizeof(__pyx_k_diskless_mode_requires_netcdf_li), 0, 0, 1, 0},
+  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
+  {&__pyx_n_s_dparse, __pyx_k_dparse, sizeof(__pyx_k_dparse), 0, 0, 1, 1},
+  {&__pyx_n_s_dset, __pyx_k_dset, sizeof(__pyx_k_dset), 0, 0, 1, 1},
+  {&__pyx_n_s_dset_2, __pyx_k_dset_2, sizeof(__pyx_k_dset_2), 0, 0, 1, 1},
+  {&__pyx_n_s_dt, __pyx_k_dt, sizeof(__pyx_k_dt), 0, 0, 1, 1},
+  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
+  {&__pyx_kp_s_dtype_must_string_or_unicode_S_o, __pyx_k_dtype_must_string_or_unicode_S_o, sizeof(__pyx_k_dtype_must_string_or_unicode_S_o), 0, 0, 1, 0},
+  {&__pyx_n_s_dtype_name, __pyx_k_dtype_name, sizeof(__pyx_k_dtype_name), 0, 0, 1, 1},
+  {&__pyx_n_s_elem, __pyx_k_elem, sizeof(__pyx_k_elem), 0, 0, 1, 1},
+  {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
+  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
+  {&__pyx_n_s_enddef, __pyx_k_enddef, sizeof(__pyx_k_enddef), 0, 0, 1, 1},
+  {&__pyx_n_s_endian, __pyx_k_endian, sizeof(__pyx_k_endian), 0, 0, 1, 1},
+  {&__pyx_kp_s_endian_keyword_argument_must_be, __pyx_k_endian_keyword_argument_must_be, sizeof(__pyx_k_endian_keyword_argument_must_be), 0, 0, 1, 0},
+  {&__pyx_kp_s_endian_ness_of_dtype_and_endian, __pyx_k_endian_ness_of_dtype_and_endian, sizeof(__pyx_k_endian_ness_of_dtype_and_endian), 0, 0, 1, 0},
+  {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1},
+  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
+  {&__pyx_n_s_exact, __pyx_k_exact, sizeof(__pyx_k_exact), 0, 0, 1, 1},
+  {&__pyx_n_s_exclude, __pyx_k_exclude, sizeof(__pyx_k_exclude), 0, 0, 1, 1},
+  {&__pyx_n_s_extDims, __pyx_k_extDims, sizeof(__pyx_k_extDims), 0, 0, 1, 1},
+  {&__pyx_n_s_extShape, __pyx_k_extShape, sizeof(__pyx_k_extShape), 0, 0, 1, 1},
+  {&__pyx_n_s_extType, __pyx_k_extType, sizeof(__pyx_k_extType), 0, 0, 1, 1},
+  {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
+  {&__pyx_n_s_f4, __pyx_k_f4, sizeof(__pyx_k_f4), 0, 0, 1, 1},
+  {&__pyx_kp_s_f4_2, __pyx_k_f4_2, sizeof(__pyx_k_f4_2), 0, 0, 1, 0},
+  {&__pyx_kp_s_f4_3, __pyx_k_f4_3, sizeof(__pyx_k_f4_3), 0, 0, 1, 0},
+  {&__pyx_n_s_f8, __pyx_k_f8, sizeof(__pyx_k_f8), 0, 0, 1, 1},
+  {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1},
+  {&__pyx_n_s_file_format, __pyx_k_file_format, sizeof(__pyx_k_file_format), 0, 0, 1, 1},
+  {&__pyx_n_s_file_format_2, __pyx_k_file_format_2, sizeof(__pyx_k_file_format_2), 0, 0, 1, 1},
+  {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
+  {&__pyx_kp_s_filepath_method_not_enabled_To, __pyx_k_filepath_method_not_enabled_To, sizeof(__pyx_k_filepath_method_not_enabled_To), 0, 0, 1, 0},
+  {&__pyx_n_s_files, __pyx_k_files, sizeof(__pyx_k_files), 0, 0, 1, 1},
+  {&__pyx_n_s_files_2, __pyx_k_files_2, sizeof(__pyx_k_files_2), 0, 0, 1, 1},
+  {&__pyx_n_s_fill_value, __pyx_k_fill_value, sizeof(__pyx_k_fill_value), 0, 0, 1, 1},
+  {&__pyx_n_s_filled, __pyx_k_filled, sizeof(__pyx_k_filled), 0, 0, 1, 1},
+  {&__pyx_kp_s_filling_off, __pyx_k_filling_off, sizeof(__pyx_k_filling_off), 0, 0, 1, 0},
+  {&__pyx_kp_s_filling_on, __pyx_k_filling_on, sizeof(__pyx_k_filling_on), 0, 0, 1, 0},
+  {&__pyx_kp_s_filling_on_default__FillValue_of, __pyx_k_filling_on_default__FillValue_of, sizeof(__pyx_k_filling_on_default__FillValue_of), 0, 0, 1, 0},
+  {&__pyx_kp_s_filling_on_default__FillValue_of_2, __pyx_k_filling_on_default__FillValue_of_2, sizeof(__pyx_k_filling_on_default__FillValue_of_2), 0, 0, 1, 0},
+  {&__pyx_n_s_find, __pyx_k_find, sizeof(__pyx_k_find), 0, 0, 1, 1},
+  {&__pyx_n_s_find_dim, __pyx_k_find_dim, sizeof(__pyx_k_find_dim), 0, 0, 1, 1},
+  {&__pyx_n_s_flatten, __pyx_k_flatten, sizeof(__pyx_k_flatten), 0, 0, 1, 1},
+  {&__pyx_n_s_fletcher32, __pyx_k_fletcher32, sizeof(__pyx_k_fletcher32), 0, 0, 1, 1},
+  {&__pyx_n_s_float, __pyx_k_float, sizeof(__pyx_k_float), 0, 0, 1, 1},
+  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
+  {&__pyx_kp_s_format_must_be_NETCDF4_NETCDF4_C, __pyx_k_format_must_be_NETCDF4_NETCDF4_C, sizeof(__pyx_k_format_must_be_NETCDF4_NETCDF4_C), 0, 0, 1, 0},
+  {&__pyx_n_s_formats, __pyx_k_formats, sizeof(__pyx_k_formats), 0, 0, 1, 1},
+  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
+  {&__pyx_n_s_get_var_chunk_cache, __pyx_k_get_var_chunk_cache, sizeof(__pyx_k_get_var_chunk_cache), 0, 0, 1, 1},
+  {&__pyx_n_s_getattr, __pyx_k_getattr, sizeof(__pyx_k_getattr), 0, 0, 1, 1},
+  {&__pyx_n_s_getattribute, __pyx_k_getattribute, sizeof(__pyx_k_getattribute), 0, 0, 1, 1},
+  {&__pyx_n_s_getdims, __pyx_k_getdims, sizeof(__pyx_k_getdims), 0, 0, 1, 1},
+  {&__pyx_n_s_gethdf5libversion, __pyx_k_gethdf5libversion, sizeof(__pyx_k_gethdf5libversion), 0, 0, 1, 1},
+  {&__pyx_n_s_getitem, __pyx_k_getitem, sizeof(__pyx_k_getitem), 0, 0, 1, 1},
+  {&__pyx_n_s_getlibversion, __pyx_k_getlibversion, sizeof(__pyx_k_getlibversion), 0, 0, 1, 1},
+  {&__pyx_n_s_getname, __pyx_k_getname, sizeof(__pyx_k_getname), 0, 0, 1, 1},
+  {&__pyx_n_s_getncattr, __pyx_k_getncattr, sizeof(__pyx_k_getncattr), 0, 0, 1, 1},
+  {&__pyx_n_s_glob, __pyx_k_glob, sizeof(__pyx_k_glob), 0, 0, 1, 1},
+  {&__pyx_n_s_gregorian, __pyx_k_gregorian, sizeof(__pyx_k_gregorian), 0, 0, 1, 1},
+  {&__pyx_kp_s_group_s, __pyx_k_group_s, sizeof(__pyx_k_group_s), 0, 0, 1, 0},
+  {&__pyx_n_s_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 0, 0, 1, 1},
+  {&__pyx_kp_s_groups_s, __pyx_k_groups_s, sizeof(__pyx_k_groups_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_groups_s_2, __pyx_k_groups_s_2, sizeof(__pyx_k_groups_s_2), 0, 0, 1, 0},
+  {&__pyx_n_s_grp, __pyx_k_grp, sizeof(__pyx_k_grp), 0, 0, 1, 1},
+  {&__pyx_n_s_grp_2, __pyx_k_grp_2, sizeof(__pyx_k_grp_2), 0, 0, 1, 1},
+  {&__pyx_n_s_grpid, __pyx_k_grpid, sizeof(__pyx_k_grpid), 0, 0, 1, 1},
+  {&__pyx_n_s_grpnames, __pyx_k_grpnames, sizeof(__pyx_k_grpnames), 0, 0, 1, 1},
+  {&__pyx_n_s_grps, __pyx_k_grps, sizeof(__pyx_k_grps), 0, 0, 1, 1},
+  {&__pyx_n_s_has_nc_inq_format_extended, __pyx_k_has_nc_inq_format_extended, sizeof(__pyx_k_has_nc_inq_format_extended), 0, 0, 1, 1},
+  {&__pyx_n_s_has_nc_inq_path, __pyx_k_has_nc_inq_path, sizeof(__pyx_k_has_nc_inq_path), 0, 0, 1, 1},
+  {&__pyx_n_s_has_rename_grp, __pyx_k_has_rename_grp, sizeof(__pyx_k_has_rename_grp), 0, 0, 1, 1},
+  {&__pyx_n_s_hdf5libversion, __pyx_k_hdf5libversion, sizeof(__pyx_k_hdf5libversion), 0, 0, 1, 1},
+  {&__pyx_n_s_hour, __pyx_k_hour, sizeof(__pyx_k_hour), 0, 0, 1, 1},
+  {&__pyx_n_s_hours, __pyx_k_hours, sizeof(__pyx_k_hours), 0, 0, 1, 1},
+  {&__pyx_n_s_http, __pyx_k_http, sizeof(__pyx_k_http), 0, 0, 1, 1},
+  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
+  {&__pyx_n_s_i0, __pyx_k_i0, sizeof(__pyx_k_i0), 0, 0, 1, 1},
+  {&__pyx_n_s_i1, __pyx_k_i1, sizeof(__pyx_k_i1), 0, 0, 1, 1},
+  {&__pyx_n_s_i2, __pyx_k_i2, sizeof(__pyx_k_i2), 0, 0, 1, 1},
+  {&__pyx_n_s_i4, __pyx_k_i4, sizeof(__pyx_k_i4), 0, 0, 1, 1},
+  {&__pyx_n_s_i8, __pyx_k_i8, sizeof(__pyx_k_i8), 0, 0, 1, 1},
+  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
+  {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1},
+  {&__pyx_kp_s_illegal_data_type_for_attribute, __pyx_k_illegal_data_type_for_attribute, sizeof(__pyx_k_illegal_data_type_for_attribute), 0, 0, 1, 0},
+  {&__pyx_kp_s_illegal_primitive_data_type_must, __pyx_k_illegal_primitive_data_type_must, sizeof(__pyx_k_illegal_primitive_data_type_must), 0, 0, 1, 0},
+  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+  {&__pyx_n_s_in1d, __pyx_k_in1d, sizeof(__pyx_k_in1d), 0, 0, 1, 1},
+  {&__pyx_n_s_ind, __pyx_k_ind, sizeof(__pyx_k_ind), 0, 0, 1, 1},
+  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
+  {&__pyx_kp_s_invalid_scale_factor_or_add_offs, __pyx_k_invalid_scale_factor_or_add_offs, sizeof(__pyx_k_invalid_scale_factor_or_add_offs), 0, 0, 1, 0},
+  {&__pyx_n_s_isMA, __pyx_k_isMA, sizeof(__pyx_k_isMA), 0, 0, 1, 1},
+  {&__pyx_n_s_is_native_big, __pyx_k_is_native_big, sizeof(__pyx_k_is_native_big), 0, 0, 1, 1},
+  {&__pyx_n_s_is_native_little, __pyx_k_is_native_little, sizeof(__pyx_k_is_native_little), 0, 0, 1, 1},
+  {&__pyx_n_s_iscompound, __pyx_k_iscompound, sizeof(__pyx_k_iscompound), 0, 0, 1, 1},
+  {&__pyx_n_s_ismasked, __pyx_k_ismasked, sizeof(__pyx_k_ismasked), 0, 0, 1, 1},
+  {&__pyx_n_s_isnan, __pyx_k_isnan, sizeof(__pyx_k_isnan), 0, 0, 1, 1},
+  {&__pyx_n_s_isostring, __pyx_k_isostring, sizeof(__pyx_k_isostring), 0, 0, 1, 1},
+  {&__pyx_n_s_isprimitive, __pyx_k_isprimitive, sizeof(__pyx_k_isprimitive), 0, 0, 1, 1},
+  {&__pyx_n_s_isscalar, __pyx_k_isscalar, sizeof(__pyx_k_isscalar), 0, 0, 1, 1},
+  {&__pyx_n_s_isunlimited, __pyx_k_isunlimited, sizeof(__pyx_k_isunlimited), 0, 0, 1, 1},
+  {&__pyx_n_s_isvlen, __pyx_k_isvlen, sizeof(__pyx_k_isvlen), 0, 0, 1, 1},
+  {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
+  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
+  {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
+  {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1},
+  {&__pyx_n_s_izip, __pyx_k_izip, sizeof(__pyx_k_izip), 0, 0, 1, 1},
+  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
+  {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
+  {&__pyx_n_s_keepweakref, __pyx_k_keepweakref, sizeof(__pyx_k_keepweakref), 0, 0, 1, 1},
+  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
+  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
+  {&__pyx_n_s_kind, __pyx_k_kind, sizeof(__pyx_k_kind), 0, 0, 1, 1},
+  {&__pyx_n_s_least_significant_digit, __pyx_k_least_significant_digit, sizeof(__pyx_k_least_significant_digit), 0, 0, 1, 1},
+  {&__pyx_n_s_len, __pyx_k_len, sizeof(__pyx_k_len), 0, 0, 1, 1},
+  {&__pyx_n_s_little, __pyx_k_little, sizeof(__pyx_k_little), 0, 0, 1, 1},
+  {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1},
+  {&__pyx_n_s_lst, __pyx_k_lst, sizeof(__pyx_k_lst), 0, 0, 1, 1},
+  {&__pyx_n_s_lstArr, __pyx_k_lstArr, sizeof(__pyx_k_lstArr), 0, 0, 1, 1},
+  {&__pyx_n_s_ma, __pyx_k_ma, sizeof(__pyx_k_ma), 0, 0, 1, 1},
+  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+  {&__pyx_n_s_majorvers, __pyx_k_majorvers, sizeof(__pyx_k_majorvers), 0, 0, 1, 1},
+  {&__pyx_n_s_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 0, 1, 1},
+  {&__pyx_n_s_masked_array, __pyx_k_masked_array, sizeof(__pyx_k_masked_array), 0, 0, 1, 1},
+  {&__pyx_n_s_master, __pyx_k_master, sizeof(__pyx_k_master), 0, 0, 1, 1},
+  {&__pyx_n_s_masterDims, __pyx_k_masterDims, sizeof(__pyx_k_masterDims), 0, 0, 1, 1},
+  {&__pyx_n_s_masterRecVar, __pyx_k_masterRecVar, sizeof(__pyx_k_masterRecVar), 0, 0, 1, 1},
+  {&__pyx_n_s_masterShape, __pyx_k_masterShape, sizeof(__pyx_k_masterShape), 0, 0, 1, 1},
+  {&__pyx_n_s_masterType, __pyx_k_masterType, sizeof(__pyx_k_masterType), 0, 0, 1, 1},
+  {&__pyx_kp_s_master_dataset_s_does_not_have_a, __pyx_k_master_dataset_s_does_not_have_a, sizeof(__pyx_k_master_dataset_s_does_not_have_a), 0, 0, 1, 0},
+  {&__pyx_kp_s_master_dataset_s_does_not_have_a_2, __pyx_k_master_dataset_s_does_not_have_a_2, sizeof(__pyx_k_master_dataset_s_does_not_have_a_2), 0, 0, 1, 0},
+  {&__pyx_n_s_mastervar, __pyx_k_mastervar, sizeof(__pyx_k_mastervar), 0, 0, 1, 1},
+  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
+  {&__pyx_n_s_microsecond, __pyx_k_microsecond, sizeof(__pyx_k_microsecond), 0, 0, 1, 1},
+  {&__pyx_n_s_microseconds, __pyx_k_microseconds, sizeof(__pyx_k_microseconds), 0, 0, 1, 1},
+  {&__pyx_n_s_millisecond, __pyx_k_millisecond, sizeof(__pyx_k_millisecond), 0, 0, 1, 1},
+  {&__pyx_n_s_milliseconds, __pyx_k_milliseconds, sizeof(__pyx_k_milliseconds), 0, 0, 1, 1},
+  {&__pyx_kp_s_milliseconds_microseconds_not_su, __pyx_k_milliseconds_microseconds_not_su, sizeof(__pyx_k_milliseconds_microseconds_not_su), 0, 0, 1, 0},
+  {&__pyx_n_s_minorvers, __pyx_k_minorvers, sizeof(__pyx_k_minorvers), 0, 0, 1, 1},
+  {&__pyx_n_s_missing_value, __pyx_k_missing_value, sizeof(__pyx_k_missing_value), 0, 0, 1, 1},
+  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
+  {&__pyx_kp_s_mode_must_be_w_r_a_or_r_got_s, __pyx_k_mode_must_be_w_r_a_or_r_got_s, sizeof(__pyx_k_mode_must_be_w_r_a_or_r_got_s), 0, 0, 1, 0},
+  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
+  {&__pyx_n_s_msecs, __pyx_k_msecs, sizeof(__pyx_k_msecs), 0, 0, 1, 1},
+  {&__pyx_n_s_msecsd, __pyx_k_msecsd, sizeof(__pyx_k_msecsd), 0, 0, 1, 1},
+  {&__pyx_n_s_msg, __pyx_k_msg, sizeof(__pyx_k_msg), 0, 0, 1, 1},
+  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
+  {&__pyx_n_s_n1, __pyx_k_n1, sizeof(__pyx_k_n1), 0, 0, 1, 1},
+  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
+  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
+  {&__pyx_kp_s_name_cannot_be_altered, __pyx_k_name_cannot_be_altered, sizeof(__pyx_k_name_cannot_be_altered), 0, 0, 1, 0},
+  {&__pyx_kp_s_name_s_numpy_dtype_s, __pyx_k_name_s_numpy_dtype_s, sizeof(__pyx_k_name_s_numpy_dtype_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_name_s_size_s, __pyx_k_name_s_size_s, sizeof(__pyx_k_name_s_size_s), 0, 0, 1, 0},
+  {&__pyx_n_s_names, __pyx_k_names, sizeof(__pyx_k_names), 0, 0, 1, 1},
+  {&__pyx_n_s_native, __pyx_k_native, sizeof(__pyx_k_native), 0, 0, 1, 1},
+  {&__pyx_n_s_nc_type, __pyx_k_nc_type, sizeof(__pyx_k_nc_type), 0, 0, 1, 1},
+  {&__pyx_n_s_ncattrs, __pyx_k_ncattrs, sizeof(__pyx_k_ncattrs), 0, 0, 1, 1},
+  {&__pyx_n_s_ncdump, __pyx_k_ncdump, sizeof(__pyx_k_ncdump), 0, 0, 1, 1},
+  {&__pyx_n_s_ncdump_var, __pyx_k_ncdump_var, sizeof(__pyx_k_ncdump_var), 0, 0, 1, 1},
+  {&__pyx_n_s_nctime, __pyx_k_nctime, sizeof(__pyx_k_nctime), 0, 0, 1, 1},
+  {&__pyx_n_s_nctonptype, __pyx_k_nctonptype, sizeof(__pyx_k_nctonptype), 0, 0, 1, 1},
+  {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
+  {&__pyx_kp_s_negative_strides_not_allowed_whe, __pyx_k_negative_strides_not_allowed_whe, sizeof(__pyx_k_negative_strides_not_allowed_whe), 0, 0, 1, 0},
+  {&__pyx_n_s_nelems, __pyx_k_nelems, sizeof(__pyx_k_nelems), 0, 0, 1, 1},
+  {&__pyx_n_s_netCDF4, __pyx_k_netCDF4, sizeof(__pyx_k_netCDF4), 0, 0, 1, 1},
+  {&__pyx_n_s_netCDF4_utils, __pyx_k_netCDF4_utils, sizeof(__pyx_k_netCDF4_utils), 0, 0, 1, 1},
+  {&__pyx_n_s_netcdf4libversion, __pyx_k_netcdf4libversion, sizeof(__pyx_k_netcdf4libversion), 0, 0, 1, 1},
+  {&__pyx_n_s_netcdftime, __pyx_k_netcdftime, sizeof(__pyx_k_netcdftime), 0, 0, 1, 1},
+  {&__pyx_n_s_newSlice, __pyx_k_newSlice, sizeof(__pyx_k_newSlice), 0, 0, 1, 1},
+  {&__pyx_n_s_newname, __pyx_k_newname, sizeof(__pyx_k_newname), 0, 0, 1, 1},
+  {&__pyx_kp_s_no_since_in_unit_string, __pyx_k_no_since_in_unit_string, sizeof(__pyx_k_no_since_in_unit_string), 0, 0, 1, 0},
+  {&__pyx_n_s_nptonctype, __pyx_k_nptonctype, sizeof(__pyx_k_nptonctype), 0, 0, 1, 1},
+  {&__pyx_n_s_npversion, __pyx_k_npversion, sizeof(__pyx_k_npversion), 0, 0, 1, 1},
+  {&__pyx_n_s_num, __pyx_k_num, sizeof(__pyx_k_num), 0, 0, 1, 1},
+  {&__pyx_n_s_num2date, __pyx_k_num2date, sizeof(__pyx_k_num2date), 0, 0, 1, 1},
+  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
+  {&__pyx_n_s_numv, __pyx_k_numv, sizeof(__pyx_k_numv), 0, 0, 1, 1},
+  {&__pyx_n_s_nunlimdim, __pyx_k_nunlimdim, sizeof(__pyx_k_nunlimdim), 0, 0, 1, 1},
+  {&__pyx_n_s_nv, __pyx_k_nv, sizeof(__pyx_k_nv), 0, 0, 1, 1},
+  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
+  {&__pyx_n_s_offsets, __pyx_k_offsets, sizeof(__pyx_k_offsets), 0, 0, 1, 1},
+  {&__pyx_n_s_oldname, __pyx_k_oldname, sizeof(__pyx_k_oldname), 0, 0, 1, 1},
+  {&__pyx_kp_s_only_endian_native_allowed_for_N, __pyx_k_only_endian_native_allowed_for_N, sizeof(__pyx_k_only_endian_native_allowed_for_N), 0, 0, 1, 0},
+  {&__pyx_kp_s_only_numpy_string_unicode_or_obj, __pyx_k_only_numpy_string_unicode_or_obj, sizeof(__pyx_k_only_numpy_string_unicode_or_obj), 0, 0, 1, 0},
+  {&__pyx_n_s_ordereddict, __pyx_k_ordereddict, sizeof(__pyx_k_ordereddict), 0, 0, 1, 1},
+  {&__pyx_n_s_out_array_shape, __pyx_k_out_array_shape, sizeof(__pyx_k_out_array_shape), 0, 0, 1, 1},
+  {&__pyx_n_s_parent, __pyx_k_parent, sizeof(__pyx_k_parent), 0, 0, 1, 1},
+  {&__pyx_n_s_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 0, 0, 1, 1},
+  {&__pyx_n_s_part, __pyx_k_part, sizeof(__pyx_k_part), 0, 0, 1, 1},
+  {&__pyx_n_s_patchstring, __pyx_k_patchstring, sizeof(__pyx_k_patchstring), 0, 0, 1, 1},
+  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
+  {&__pyx_n_s_path_2, __pyx_k_path_2, sizeof(__pyx_k_path_2), 0, 0, 1, 1},
+  {&__pyx_kp_s_path_s, __pyx_k_path_s, sizeof(__pyx_k_path_s), 0, 0, 1, 0},
+  {&__pyx_n_s_persist, __pyx_k_persist, sizeof(__pyx_k_persist), 0, 0, 1, 1},
+  {&__pyx_kp_s_please_install_ordereddict_https, __pyx_k_please_install_ordereddict_https, sizeof(__pyx_k_please_install_ordereddict_https), 0, 0, 1, 0},
+  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
+  {&__pyx_n_s_posixpath, __pyx_k_posixpath, sizeof(__pyx_k_posixpath), 0, 0, 1, 1},
+  {&__pyx_n_s_preemption, __pyx_k_preemption, sizeof(__pyx_k_preemption), 0, 0, 1, 1},
+  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
+  {&__pyx_n_s_private_atts, __pyx_k_private_atts, sizeof(__pyx_k_private_atts), 0, 0, 1, 1},
+  {&__pyx_n_s_prod, __pyx_k_prod, sizeof(__pyx_k_prod), 0, 0, 1, 1},
+  {&__pyx_n_s_proleptic_gregorian, __pyx_k_proleptic_gregorian, sizeof(__pyx_k_proleptic_gregorian), 0, 0, 1, 1},
+  {&__pyx_n_s_proxy, __pyx_k_proxy, sizeof(__pyx_k_proxy), 0, 0, 1, 1},
+  {&__pyx_n_s_put, __pyx_k_put, sizeof(__pyx_k_put), 0, 0, 1, 1},
+  {&__pyx_n_s_put_2, __pyx_k_put_2, sizeof(__pyx_k_put_2), 0, 0, 1, 1},
+  {&__pyx_n_s_put_ind, __pyx_k_put_ind, sizeof(__pyx_k_put_ind), 0, 0, 1, 1},
+  {&__pyx_n_s_python3, __pyx_k_python3, sizeof(__pyx_k_python3), 0, 0, 1, 1},
+  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
+  {&__pyx_n_s_quantize, __pyx_k_quantize, sizeof(__pyx_k_quantize), 0, 0, 1, 1},
+  {&__pyx_kp_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 0},
+  {&__pyx_n_s_r_2, __pyx_k_r_2, sizeof(__pyx_k_r_2), 0, 0, 1, 1},
+  {&__pyx_kp_s_r_3, __pyx_k_r_3, sizeof(__pyx_k_r_3), 0, 0, 1, 0},
+  {&__pyx_kp_s_r_s, __pyx_k_r_s, sizeof(__pyx_k_r_s), 0, 0, 1, 0},
+  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
+  {&__pyx_n_s_ravel, __pyx_k_ravel, sizeof(__pyx_k_ravel), 0, 0, 1, 1},
+  {&__pyx_n_s_recLen, __pyx_k_recLen, sizeof(__pyx_k_recLen), 0, 0, 1, 1},
+  {&__pyx_n_s_recVar, __pyx_k_recVar, sizeof(__pyx_k_recVar), 0, 0, 1, 1},
+  {&__pyx_n_s_recdimlen, __pyx_k_recdimlen, sizeof(__pyx_k_recdimlen), 0, 0, 1, 1},
+  {&__pyx_n_s_recdimname, __pyx_k_recdimname, sizeof(__pyx_k_recdimname), 0, 0, 1, 1},
+  {&__pyx_n_s_recdimname_2, __pyx_k_recdimname_2, sizeof(__pyx_k_recdimname_2), 0, 0, 1, 1},
+  {&__pyx_n_s_redef, __pyx_k_redef, sizeof(__pyx_k_redef), 0, 0, 1, 1},
+  {&__pyx_n_s_ref_date, __pyx_k_ref_date, sizeof(__pyx_k_ref_date), 0, 0, 1, 1},
+  {&__pyx_n_s_ref_num, __pyx_k_ref_num, sizeof(__pyx_k_ref_num), 0, 0, 1, 1},
+  {&__pyx_n_s_releasevers, __pyx_k_releasevers, sizeof(__pyx_k_releasevers), 0, 0, 1, 1},
+  {&__pyx_kp_s_renameGroup_method_not_enabled, __pyx_k_renameGroup_method_not_enabled, sizeof(__pyx_k_renameGroup_method_not_enabled), 0, 0, 1, 0},
+  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
+  {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1},
+  {&__pyx_kp_s_requires_numpy_version_1_0rc1_or, __pyx_k_requires_numpy_version_1_0rc1_or, sizeof(__pyx_k_requires_numpy_version_1_0rc1_or), 0, 0, 1, 0},
+  {&__pyx_n_s_reshape, __pyx_k_reshape, sizeof(__pyx_k_reshape), 0, 0, 1, 1},
+  {&__pyx_kp_s_root_group_s_data_model_file_for, __pyx_k_root_group_s_data_model_file_for, sizeof(__pyx_k_root_group_s_data_model_file_for), 0, 0, 1, 0},
+  {&__pyx_kp_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 0},
+  {&__pyx_n_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 1},
+  {&__pyx_kp_s_s_is_one_of_the_reserved_attrib, __pyx_k_s_is_one_of_the_reserved_attrib, sizeof(__pyx_k_s_is_one_of_the_reserved_attrib), 0, 0, 1, 0},
+  {&__pyx_kp_s_s_is_one_of_the_reserved_attrib_2, __pyx_k_s_is_one_of_the_reserved_attrib_2, sizeof(__pyx_k_s_is_one_of_the_reserved_attrib_2), 0, 0, 1, 0},
+  {&__pyx_kp_s_s_not_a_valid_dimension_name, __pyx_k_s_not_a_valid_dimension_name, sizeof(__pyx_k_s_not_a_valid_dimension_name), 0, 0, 1, 0},
+  {&__pyx_kp_s_s_not_a_valid_variable_name, __pyx_k_s_not_a_valid_variable_name, sizeof(__pyx_k_s_not_a_valid_variable_name), 0, 0, 1, 0},
+  {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_s_s_s, __pyx_k_s_s_s, sizeof(__pyx_k_s_s_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_s_s_s_2, __pyx_k_s_s_s_2, sizeof(__pyx_k_s_s_s_2), 0, 0, 1, 0},
+  {&__pyx_n_s_scale, __pyx_k_scale, sizeof(__pyx_k_scale), 0, 0, 1, 1},
+  {&__pyx_n_s_scale_factor, __pyx_k_scale_factor, sizeof(__pyx_k_scale_factor), 0, 0, 1, 1},
+  {&__pyx_n_s_second, __pyx_k_second, sizeof(__pyx_k_second), 0, 0, 1, 1},
+  {&__pyx_n_s_seconds, __pyx_k_seconds, sizeof(__pyx_k_seconds), 0, 0, 1, 1},
+  {&__pyx_n_s_secs, __pyx_k_secs, sizeof(__pyx_k_secs), 0, 0, 1, 1},
+  {&__pyx_n_s_select, __pyx_k_select, sizeof(__pyx_k_select), 0, 0, 1, 1},
+  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
+  {&__pyx_n_s_set_auto_mask, __pyx_k_set_auto_mask, sizeof(__pyx_k_set_auto_mask), 0, 0, 1, 1},
+  {&__pyx_n_s_set_auto_maskandscale, __pyx_k_set_auto_maskandscale, sizeof(__pyx_k_set_auto_maskandscale), 0, 0, 1, 1},
+  {&__pyx_n_s_set_auto_scale, __pyx_k_set_auto_scale, sizeof(__pyx_k_set_auto_scale), 0, 0, 1, 1},
+  {&__pyx_n_s_set_default_format, __pyx_k_set_default_format, sizeof(__pyx_k_set_default_format), 0, 0, 1, 1},
+  {&__pyx_n_s_setattr, __pyx_k_setattr, sizeof(__pyx_k_setattr), 0, 0, 1, 1},
+  {&__pyx_n_s_setncattr, __pyx_k_setncattr, sizeof(__pyx_k_setncattr), 0, 0, 1, 1},
+  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
+  {&__pyx_n_s_shape_2, __pyx_k_shape_2, sizeof(__pyx_k_shape_2), 0, 0, 1, 1},
+  {&__pyx_kp_s_shape_cannot_be_altered, __pyx_k_shape_cannot_be_altered, sizeof(__pyx_k_shape_cannot_be_altered), 0, 0, 1, 0},
+  {&__pyx_n_s_shuffle, __pyx_k_shuffle, sizeof(__pyx_k_shuffle), 0, 0, 1, 1},
+  {&__pyx_n_s_since, __pyx_k_since, sizeof(__pyx_k_since), 0, 0, 1, 1},
+  {&__pyx_kp_s_single_element_VLEN_slices_must, __pyx_k_single_element_VLEN_slices_must, sizeof(__pyx_k_single_element_VLEN_slices_must), 0, 0, 1, 0},
+  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
+  {&__pyx_kp_s_size_of_data_array_does_not_conf, __pyx_k_size_of_data_array_does_not_conf, sizeof(__pyx_k_size_of_data_array_does_not_conf), 0, 0, 1, 0},
+  {&__pyx_n_s_slen, __pyx_k_slen, sizeof(__pyx_k_slen), 0, 0, 1, 1},
+  {&__pyx_n_s_sortbylist, __pyx_k_sortbylist, sizeof(__pyx_k_sortbylist), 0, 0, 1, 1},
+  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
+  {&__pyx_n_s_squeeze, __pyx_k_squeeze, sizeof(__pyx_k_squeeze), 0, 0, 1, 1},
+  {&__pyx_n_s_sta, __pyx_k_sta, sizeof(__pyx_k_sta), 0, 0, 1, 1},
+  {&__pyx_n_s_standard, __pyx_k_standard, sizeof(__pyx_k_standard), 0, 0, 1, 1},
+  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
+  {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
+  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
+  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
+  {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
+  {&__pyx_n_s_strd, __pyx_k_strd, sizeof(__pyx_k_strd), 0, 0, 1, 1},
+  {&__pyx_n_s_stride, __pyx_k_stride, sizeof(__pyx_k_stride), 0, 0, 1, 1},
+  {&__pyx_kp_s_strides_must_all_be_1_for_string, __pyx_k_strides_must_all_be_1_for_string, sizeof(__pyx_k_strides_must_all_be_1_for_string), 0, 0, 1, 0},
+  {&__pyx_kp_s_strides_must_all_be_1_for_vlen_v, __pyx_k_strides_must_all_be_1_for_vlen_v, sizeof(__pyx_k_strides_must_all_be_1_for_vlen_v), 0, 0, 1, 0},
+  {&__pyx_n_s_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 0, 1, 1},
+  {&__pyx_kp_s_string_type, __pyx_k_string_type, sizeof(__pyx_k_string_type), 0, 0, 1, 0},
+  {&__pyx_n_s_stringtoarr, __pyx_k_stringtoarr, sizeof(__pyx_k_stringtoarr), 0, 0, 1, 1},
+  {&__pyx_n_s_stringtochar, __pyx_k_stringtochar, sizeof(__pyx_k_stringtochar), 0, 0, 1, 1},
+  {&__pyx_n_s_strt, __pyx_k_strt, sizeof(__pyx_k_strt), 0, 0, 1, 1},
+  {&__pyx_n_s_subdtype, __pyx_k_subdtype, sizeof(__pyx_k_subdtype), 0, 0, 1, 1},
+  {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
+  {&__pyx_n_s_supportedtypes, __pyx_k_supportedtypes, sizeof(__pyx_k_supportedtypes), 0, 0, 1, 1},
+  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
+  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
+  {&__pyx_n_s_td, __pyx_k_td, sizeof(__pyx_k_td), 0, 0, 1, 1},
+  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+  {&__pyx_n_s_tile, __pyx_k_tile, sizeof(__pyx_k_tile), 0, 0, 1, 1},
+  {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
+  {&__pyx_n_s_time2index, __pyx_k_time2index, sizeof(__pyx_k_time2index), 0, 0, 1, 1},
+  {&__pyx_n_s_timedelta, __pyx_k_timedelta, sizeof(__pyx_k_timedelta), 0, 0, 1, 1},
+  {&__pyx_n_s_times, __pyx_k_times, sizeof(__pyx_k_times), 0, 0, 1, 1},
+  {&__pyx_n_s_timestr, __pyx_k_timestr, sizeof(__pyx_k_timestr), 0, 0, 1, 1},
+  {&__pyx_n_s_timestr_split, __pyx_k_timestr_split, sizeof(__pyx_k_timestr_split), 0, 0, 1, 1},
+  {&__pyx_kp_s_to_assign_values_to_a_non_scalar, __pyx_k_to_assign_values_to_a_non_scalar, sizeof(__pyx_k_to_assign_values_to_a_non_scalar), 0, 0, 1, 0},
+  {&__pyx_kp_s_to_retrieve_values_from_a_non_sc, __pyx_k_to_retrieve_values_from_a_non_sc, sizeof(__pyx_k_to_retrieve_values_from_a_non_sc), 0, 0, 1, 0},
+  {&__pyx_n_s_tolist, __pyx_k_tolist, sizeof(__pyx_k_tolist), 0, 0, 1, 1},
+  {&__pyx_n_s_toma, __pyx_k_toma, sizeof(__pyx_k_toma), 0, 0, 1, 1},
+  {&__pyx_n_s_tostr, __pyx_k_tostr, sizeof(__pyx_k_tostr), 0, 0, 1, 1},
+  {&__pyx_n_s_tostring, __pyx_k_tostring, sizeof(__pyx_k_tostring), 0, 0, 1, 1},
+  {&__pyx_n_s_totaltime, __pyx_k_totaltime, sizeof(__pyx_k_totaltime), 0, 0, 1, 1},
+  {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1},
+  {&__pyx_n_s_tsecs, __pyx_k_tsecs, sizeof(__pyx_k_tsecs), 0, 0, 1, 1},
+  {&__pyx_kp_s_type_must_string_or_unicode_S_or, __pyx_k_type_must_string_or_unicode_S_or, sizeof(__pyx_k_type_must_string_or_unicode_S_or), 0, 0, 1, 0},
+  {&__pyx_n_s_typecode, __pyx_k_typecode, sizeof(__pyx_k_typecode), 0, 0, 1, 1},
+  {&__pyx_n_s_typeid, __pyx_k_typeid, sizeof(__pyx_k_typeid), 0, 0, 1, 1},
+  {&__pyx_n_s_tzinfo, __pyx_k_tzinfo, sizeof(__pyx_k_tzinfo), 0, 0, 1, 1},
+  {&__pyx_n_s_tzutc, __pyx_k_tzutc, sizeof(__pyx_k_tzutc), 0, 0, 1, 1},
+  {&__pyx_kp_s_u, __pyx_k_u, sizeof(__pyx_k_u), 0, 0, 1, 0},
+  {&__pyx_n_s_u1, __pyx_k_u1, sizeof(__pyx_k_u1), 0, 0, 1, 1},
+  {&__pyx_n_s_u2, __pyx_k_u2, sizeof(__pyx_k_u2), 0, 0, 1, 1},
+  {&__pyx_n_s_u4, __pyx_k_u4, sizeof(__pyx_k_u4), 0, 0, 1, 1},
+  {&__pyx_n_s_u8, __pyx_k_u8, sizeof(__pyx_k_u8), 0, 0, 1, 1},
+  {&__pyx_n_s_unicode, __pyx_k_unicode, sizeof(__pyx_k_unicode), 0, 0, 1, 1},
+  {&__pyx_n_s_unicode_error, __pyx_k_unicode_error, sizeof(__pyx_k_unicode_error), 0, 0, 1, 1},
+  {&__pyx_n_s_unit, __pyx_k_unit, sizeof(__pyx_k_unit), 0, 0, 1, 1},
+  {&__pyx_n_s_units, __pyx_k_units, sizeof(__pyx_k_units), 0, 0, 1, 1},
+  {&__pyx_n_s_unlimdims, __pyx_k_unlimdims, sizeof(__pyx_k_unlimdims), 0, 0, 1, 1},
+  {&__pyx_kp_s_unlimited_dimensions_s, __pyx_k_unlimited_dimensions_s, sizeof(__pyx_k_unlimited_dimensions_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_unlimited_dimensions_s_2, __pyx_k_unlimited_dimensions_s_2, sizeof(__pyx_k_unlimited_dimensions_s_2), 0, 0, 1, 0},
+  {&__pyx_kp_s_unlimited_name_s_size_s, __pyx_k_unlimited_name_s_size_s, sizeof(__pyx_k_unlimited_name_s_size_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_unsupported_component_type_for_V, __pyx_k_unsupported_component_type_for_V, sizeof(__pyx_k_unsupported_component_type_for_V), 0, 0, 1, 0},
+  {&__pyx_kp_s_unsupported_datatype_specified_f, __pyx_k_unsupported_datatype_specified_f, sizeof(__pyx_k_unsupported_datatype_specified_f), 0, 0, 1, 0},
+  {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
+  {&__pyx_n_s_utime, __pyx_k_utime, sizeof(__pyx_k_utime), 0, 0, 1, 1},
+  {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
+  {&__pyx_n_s_vInst, __pyx_k_vInst, sizeof(__pyx_k_vInst), 0, 0, 1, 1},
+  {&__pyx_n_s_vName, __pyx_k_vName, sizeof(__pyx_k_vName), 0, 0, 1, 1},
+  {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
+  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
+  {&__pyx_n_s_value_2, __pyx_k_value_2, sizeof(__pyx_k_value_2), 0, 0, 1, 1},
+  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
+  {&__pyx_n_s_var, __pyx_k_var, sizeof(__pyx_k_var), 0, 0, 1, 1},
+  {&__pyx_n_s_varInfo, __pyx_k_varInfo, sizeof(__pyx_k_varInfo), 0, 0, 1, 1},
+  {&__pyx_kp_s_variable_s_data_type_mismatch_be, __pyx_k_variable_s_data_type_mismatch_be, sizeof(__pyx_k_variable_s_data_type_mismatch_be), 0, 0, 1, 0},
+  {&__pyx_kp_s_variable_s_dimensions_mismatch_b, __pyx_k_variable_s_dimensions_mismatch_b, sizeof(__pyx_k_variable_s_dimensions_mismatch_b), 0, 0, 1, 0},
+  {&__pyx_kp_s_variable_s_rank_mismatch_between, __pyx_k_variable_s_rank_mismatch_between, sizeof(__pyx_k_variable_s_rank_mismatch_between), 0, 0, 1, 0},
+  {&__pyx_kp_s_variable_s_shape_mismatch_betwee, __pyx_k_variable_s_shape_mismatch_betwee, sizeof(__pyx_k_variable_s_shape_mismatch_betwee), 0, 0, 1, 0},
+  {&__pyx_n_s_variables, __pyx_k_variables, sizeof(__pyx_k_variables), 0, 0, 1, 1},
+  {&__pyx_kp_s_variables_dimensions_s, __pyx_k_variables_dimensions_s, sizeof(__pyx_k_variables_dimensions_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_variables_s, __pyx_k_variables_s, sizeof(__pyx_k_variables_s), 0, 0, 1, 0},
+  {&__pyx_n_s_varid, __pyx_k_varid, sizeof(__pyx_k_varid), 0, 0, 1, 1},
+  {&__pyx_n_s_varname, __pyx_k_varname, sizeof(__pyx_k_varname), 0, 0, 1, 1},
+  {&__pyx_n_s_varnames, __pyx_k_varnames, sizeof(__pyx_k_varnames), 0, 0, 1, 1},
+  {&__pyx_n_s_vars, __pyx_k_vars, sizeof(__pyx_k_vars), 0, 0, 1, 1},
+  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
+  {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
+  {&__pyx_n_s_vid, __pyx_k_vid, sizeof(__pyx_k_vid), 0, 0, 1, 1},
+  {&__pyx_n_s_view, __pyx_k_view, sizeof(__pyx_k_view), 0, 0, 1, 1},
+  {&__pyx_n_s_vlen, __pyx_k_vlen, sizeof(__pyx_k_vlen), 0, 0, 1, 1},
+  {&__pyx_kp_s_vlen_data_type_s, __pyx_k_vlen_data_type_s, sizeof(__pyx_k_vlen_data_type_s), 0, 0, 1, 0},
+  {&__pyx_kp_s_vlen_string_array_attributes_not, __pyx_k_vlen_string_array_attributes_not, sizeof(__pyx_k_vlen_string_array_attributes_not), 0, 0, 1, 0},
+  {&__pyx_n_s_vltype, __pyx_k_vltype, sizeof(__pyx_k_vltype), 0, 0, 1, 1},
+  {&__pyx_n_s_vltypes, __pyx_k_vltypes, sizeof(__pyx_k_vltypes), 0, 0, 1, 1},
+  {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
+  {&__pyx_n_s_walk_grps, __pyx_k_walk_grps, sizeof(__pyx_k_walk_grps), 0, 0, 1, 1},
+  {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
+  {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
+  {&__pyx_n_s_weakref, __pyx_k_weakref, sizeof(__pyx_k_weakref), 0, 0, 1, 1},
+  {&__pyx_kp_s_wrong_data_type_in_object_array, __pyx_k_wrong_data_type_in_object_array, sizeof(__pyx_k_wrong_data_type_in_object_array), 0, 0, 1, 0},
+  {&__pyx_kp_s_wrong_data_type_should_be_s_got, __pyx_k_wrong_data_type_should_be_s_got, sizeof(__pyx_k_wrong_data_type_should_be_s_got), 0, 0, 1, 0},
+  {&__pyx_n_s_ws, __pyx_k_ws, sizeof(__pyx_k_ws), 0, 0, 1, 1},
+  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
+  {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
+  {&__pyx_n_s_zlib, __pyx_k_zlib, sizeof(__pyx_k_zlib), 0, 0, 1, 1},
+  {0, 0, 0, 0, 0, 0, 0}
+};
+static int __Pyx_InitCachedBuiltins(void) {
+  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  return 0;
+  __pyx_L1_error:;
+  return -1;
+}
+
+static int __Pyx_InitCachedConstants(void) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
+
+  /* "utils.pyx":17
+ *     units = timestr_split[0].lower()
+ *     if timestr_split[1].lower() != 'since':
+ *         raise ValueError("no 'since' in unit_string")             # <<<<<<<<<<<<<<
+ *     # parse the date string.
+ *     n = timestr.find('since')+6
+ */
+  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_since_in_unit_string); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__2);
+  __Pyx_GIVEREF(__pyx_tuple__2);
+
+  /* "utils.pyx":19
+ *         raise ValueError("no 'since' in unit_string")
+ *     # parse the date string.
+ *     n = timestr.find('since')+6             # <<<<<<<<<<<<<<
+ *     isostring = timestr[n:]
+ *     basedate = dparse.parse(isostring)
+ */
+  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_n_s_since); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__3);
+  __Pyx_GIVEREF(__pyx_tuple__3);
+
+  /* "utils.pyx":46
+ * (default) or 'U1' (if dtype='U')"""
+ *     if dtype not in ["S","U"]:
+ *         raise ValueError("dtype must string or unicode ('S' or 'U')")             # <<<<<<<<<<<<<<
+ *     arr = numpy.zeros(NUMCHARS,dtype+'1')
+ *     arr[0:len(string)] = tuple(string)
+ */
+  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_dtype_must_string_or_unicode_S_o); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__4);
+  __Pyx_GIVEREF(__pyx_tuple__4);
+
+  /* "utils.pyx":65
+ *     dtype = a.dtype.kind
+ *     if dtype not in ["S","U"]:
+ *         raise ValueError("type must string or unicode ('S' or 'U')")             # <<<<<<<<<<<<<<
+ *     b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1')
+ *     b.shape = a.shape + (a.itemsize,)
+ */
+  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__5);
+  __Pyx_GIVEREF(__pyx_tuple__5);
+
+  /* "utils.pyx":84
+ *     dtype = b.dtype.kind
+ *     if dtype not in ["S","U"]:
+ *         raise ValueError("type must string or unicode ('S' or 'U')")             # <<<<<<<<<<<<<<
+ *     bs = b.tostring().decode(default_encoding)
+ *     slen = int(b.shape[-1])
+ */
+  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__6);
+  __Pyx_GIVEREF(__pyx_tuple__6);
+
+  /* "utils.pyx":88
+ *     slen = int(b.shape[-1])
+ *     a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen))
+ *     a.shape = b.shape[:-1]             # <<<<<<<<<<<<<<
+ *     return a
+ * 
+ */
+  __pyx_slice__7 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__7);
+  __Pyx_GIVEREF(__pyx_slice__7);
+
+  /* "utils.pyx":387
+ *         # can be used like a CDF instance.
+ *         if isinstance(files, str):
+ *             if files.startswith('http'):             # <<<<<<<<<<<<<<
+ *                 msg='cannot using file globbing for remote (OPeNDAP) datasets'
+ *                 raise ValueError(msg)
+ */
+  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_n_s_http); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__8);
+  __Pyx_GIVEREF(__pyx_tuple__8);
+
+  /* "utils.pyx":449
+ *         # Make sure each file defines the same aggregation variables as the master
+ *         # and that the variables are defined in the same way (name, shape and type)
+ *         for f in files[1:]:             # <<<<<<<<<<<<<<
+ *             part = Dataset(f)
+ *             varInfo = part.variables
+ */
+  __pyx_slice__9 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__9);
+  __Pyx_GIVEREF(__pyx_slice__9);
+
+  /* "utils.pyx":460
+ *                     #if not vInst.dimensions[0] != aggDimName:
+ * 
+ *                     masterDims, masterShape, masterType = masterRecVar[v][:3]             # <<<<<<<<<<<<<<
+ *                     extDims, extShape, extType = varInfo[v][:3]
+ *                     extDims = varInfo[v].dimensions
+ */
+  __pyx_slice__10 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__10);
+  __Pyx_GIVEREF(__pyx_slice__10);
+
+  /* "utils.pyx":461
+ * 
+ *                     masterDims, masterShape, masterType = masterRecVar[v][:3]
+ *                     extDims, extShape, extType = varInfo[v][:3]             # <<<<<<<<<<<<<<
+ *                     extDims = varInfo[v].dimensions
+ *                     extShape = varInfo[v].shape
+ */
+  __pyx_slice__11 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__11);
+  __Pyx_GIVEREF(__pyx_slice__11);
+
+  /* "utils.pyx":478
+ *                                        "master %s (%s) and extension %s (%s)" %
+ *                                        (v, master, len(masterShape), f, len(extShape)))
+ *                     if masterShape[1:] != extShape[1:]:             # <<<<<<<<<<<<<<
+ *                         raise IOError("variable %s : shape mismatch between "
+ *                                        "master %s (%s) and extension %s (%s)" %
+ */
+  __pyx_slice__12 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__12);
+  __Pyx_GIVEREF(__pyx_slice__12);
+  __pyx_slice__13 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__13);
+  __Pyx_GIVEREF(__pyx_slice__13);
+
+  /* "utils.pyx":521
+ *         for dset in self._cdf:
+ *             if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4':
+ *                 raise ValueError('MFNetCDF4 only works with NETCDF3_CLASSIC, NETCDF3_64BIT and NETCDF4_CLASSIC formatted files, not NETCDF4')             # <<<<<<<<<<<<<<
+ *             self._file_format.append(dset.file_format)
+ *             self._data_model.append(dset.data_model)
+ */
+  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_MFNetCDF4_only_works_with_NETCDF); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__14);
+  __Pyx_GIVEREF(__pyx_tuple__14);
+
+  /* "utils.pyx":629
+ *     def _shape(self):
+ *         recdimlen = len(self._dset.dimensions[self._recdimname])
+ *         return (recdimlen,) + self._mastervar.shape[1:]             # <<<<<<<<<<<<<<
+ *     def set_auto_maskandscale(self,val):
+ *         for v in self._recVar:
+ */
+  __pyx_slice__17 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__17);
+  __Pyx_GIVEREF(__pyx_slice__17);
+
+  /* "utils.pyx":650
+ *         # The convention used is that for those cases,
+ *         # put_ind for this dimension is set to -1 by _StartCountStride.
+ *         squeeze = data.ndim * [slice(None),]             # <<<<<<<<<<<<<<
+ *         for i,n in enumerate(put_ind.shape[:-1]):
+ *             if n == 1 and put_ind[...,i].ravel()[0] == -1:
+ */
+  __pyx_slice__18 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__18)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__18);
+  __Pyx_GIVEREF(__pyx_slice__18);
+
+  /* "utils.pyx":651
+ *         # put_ind for this dimension is set to -1 by _StartCountStride.
+ *         squeeze = data.ndim * [slice(None),]
+ *         for i,n in enumerate(put_ind.shape[:-1]):             # <<<<<<<<<<<<<<
+ *             if n == 1 and put_ind[...,i].ravel()[0] == -1:
+ *                 squeeze[i] = 0
+ */
+  __pyx_slice__19 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__19)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__19);
+  __Pyx_GIVEREF(__pyx_slice__19);
+
+  /* "utils.pyx":668
+ *             count = [abs(cnt) for cnt in count]
+ *             if (numpy.array(stride) < 0).any():
+ *                 raise IndexError('negative strides not allowed when slicing MFVariable Variable instance')             # <<<<<<<<<<<<<<
+ *             # Start, stop and step along 1st dimension, eg the unlimited
+ *             # dimension.
+ */
+  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_negative_strides_not_allowed_whe); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__20);
+  __Pyx_GIVEREF(__pyx_tuple__20);
+
+  /* "utils.pyx":692
+ * 
+ *             # Rebuild the slicing expression for dimensions 1 and ssq.
+ *             newSlice = [slice(None, None, None)]             # <<<<<<<<<<<<<<
+ *             for n in range(1, len(start)):   # skip dimension 0
+ *                 s = slice(start[n],start[n] + count[n] * stride[n], stride[n])
+ */
+  __pyx_slice__21 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__21)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__21);
+  __Pyx_GIVEREF(__pyx_slice__21);
+
+  /* "utils.pyx":793
+ *         for t in self._recVar:
+ *             if not hasattr(t,'calendar'):
+ *                 raise ValueError('MFTime requires that the time variable in all files have a calendar attribute')             # <<<<<<<<<<<<<<
+ * 
+ *         # Check that calendar is the same in all files.
+ */
+  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_MFTime_requires_that_the_time_va); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__22);
+  __Pyx_GIVEREF(__pyx_tuple__22);
+
+  /* "utils.pyx":797
+ *         # Check that calendar is the same in all files.
+ *         if len(set([t.calendar for t in self._recVar])) > 1:
+ *             raise ValueError('MFTime requires that the same time calendar is used by all files.')             # <<<<<<<<<<<<<<
+ * 
+ *         # Override units if units is specified.
+ */
+  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_MFTime_requires_that_the_same_ti); if (unlikely(!__pyx_tuple__23)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__23);
+  __Pyx_GIVEREF(__pyx_tuple__23);
+
+  /* "utils.pyx":803
+ * 
+ *         # Reference date to compute the difference between different time units.
+ *         ref_date = datetime.datetime(1900,1,1)             # <<<<<<<<<<<<<<
+ *         ref_num = date2num(ref_date, self.units, self.calendar)
+ * 
+ */
+  __pyx_tuple__24 = PyTuple_Pack(3, __pyx_int_1900, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__24);
+  __Pyx_GIVEREF(__pyx_tuple__24);
+
+  /* "netCDF4.pyx":951
+ *         else:
+ *             pstring =\
+ *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')             # <<<<<<<<<<<<<<
+ *         return pstring
+ *     elif att_type == NC_STRING:
+ */
+  __pyx_tuple__26 = PyTuple_Pack(2, __pyx_kp_s__25, __pyx_kp_s__16); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__26);
+  __Pyx_GIVEREF(__pyx_tuple__26);
+
+  /* "netCDF4.pyx":956
+ *         if att_len == 1:
+ *             ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)
+ *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')             # <<<<<<<<<<<<<<
+ *             return pstring
+ *         else:
+ */
+  __pyx_tuple__27 = PyTuple_Pack(2, __pyx_kp_s__25, __pyx_kp_s__16); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__27);
+  __Pyx_GIVEREF(__pyx_tuple__27);
+
+  /* "netCDF4.pyx":959
+ *             return pstring
+ *         else:
+ *             raise KeyError('vlen string array attributes not supported')             # <<<<<<<<<<<<<<
+ *     else:
+ *     # a regular numeric or compound type.
+ */
+  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_vlen_string_array_attributes_not); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__28);
+  __Pyx_GIVEREF(__pyx_tuple__28);
+
+  /* "netCDF4.pyx":1050
+ *     # if 64-bit datatype not supported, cast to 32 bit integers.
+ *     fmt = _get_format(grp._grpid)
+ *     is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC'             # <<<<<<<<<<<<<<
+ *     if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\
+ *        is_netcdf3):
+ */
+  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s_NETCDF3); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__29);
+  __Pyx_GIVEREF(__pyx_tuple__29);
+
+  /* "netCDF4.pyx":1051
+ *     fmt = _get_format(grp._grpid)
+ *     is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC'
+ *     if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\             # <<<<<<<<<<<<<<
+ *        is_netcdf3):
+ *         value_arr = value_arr.astype('i4')
+ */
+  __pyx_slice__30 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__30);
+  __Pyx_GIVEREF(__pyx_slice__30);
+
+  /* "netCDF4.pyx":1053
+ *     if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\
+ *        is_netcdf3):
+ *         value_arr = value_arr.astype('i4')             # <<<<<<<<<<<<<<
+ *     # if array contains strings, write a text attribute.
+ *     if value_arr.dtype.char in ['S','U']:
+ */
+  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__31);
+  __Pyx_GIVEREF(__pyx_tuple__31);
+
+  /* "netCDF4.pyx":1073
+ *         if value_arr.dtype.kind == 'V': # compound attribute.
+ *             xtype = _find_cmptype(grp,value_arr.dtype)
+ *         elif value_arr.dtype.str[1:] not in _supportedtypes:             # <<<<<<<<<<<<<<
+ *             raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:])
+ *         else:
+ */
+  __pyx_slice__32 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__32);
+  __Pyx_GIVEREF(__pyx_slice__32);
+
+  /* "netCDF4.pyx":1074
+ *             xtype = _find_cmptype(grp,value_arr.dtype)
+ *         elif value_arr.dtype.str[1:] not in _supportedtypes:
+ *             raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:])             # <<<<<<<<<<<<<<
+ *         else:
+ *             xtype = _nptonctype[value_arr.dtype.str[1:]]
+ */
+  __pyx_slice__33 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__33);
+  __Pyx_GIVEREF(__pyx_slice__33);
+
+  /* "netCDF4.pyx":1076
+ *             raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:])
+ *         else:
+ *             xtype = _nptonctype[value_arr.dtype.str[1:]]             # <<<<<<<<<<<<<<
+ *         lenarr = PyArray_SIZE(value_arr)
+ *         ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data)
+ */
+  __pyx_slice__34 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__34);
+  __Pyx_GIVEREF(__pyx_slice__34);
+
+  /* "netCDF4.pyx":1540
+ *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+
+ *         (((_tostr(self.variables[varname].dimensions)
+ *         .replace("u'",""))\             # <<<<<<<<<<<<<<
+ *         .replace("'",""))\
+ *         .replace(", ",","))\
+ */
+  __pyx_tuple__35 = PyTuple_Pack(2, __pyx_kp_s_u, __pyx_kp_s__16); if (unlikely(!__pyx_tuple__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__35);
+  __Pyx_GIVEREF(__pyx_tuple__35);
+
+  /* "netCDF4.pyx":1541
+ *         (((_tostr(self.variables[varname].dimensions)
+ *         .replace("u'",""))\
+ *         .replace("'",""))\             # <<<<<<<<<<<<<<
+ *         .replace(", ",","))\
+ *         .replace(",)",")") for varname in self.variables.keys()])
+ */
+  __pyx_tuple__37 = PyTuple_Pack(2, __pyx_kp_s__36, __pyx_kp_s__16); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__37);
+  __Pyx_GIVEREF(__pyx_tuple__37);
+
+  /* "netCDF4.pyx":1542
+ *         .replace("u'",""))\
+ *         .replace("'",""))\
+ *         .replace(", ",","))\             # <<<<<<<<<<<<<<
+ *         .replace(",)",")") for varname in self.variables.keys()])
+ *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
+ */
+  __pyx_tuple__40 = PyTuple_Pack(2, __pyx_kp_s__38, __pyx_kp_s__39); if (unlikely(!__pyx_tuple__40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__40);
+  __Pyx_GIVEREF(__pyx_tuple__40);
+
+  /* "netCDF4.pyx":1543
+ *         .replace("'",""))\
+ *         .replace(", ",","))\
+ *         .replace(",)",")") for varname in self.variables.keys()])             # <<<<<<<<<<<<<<
+ *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
+ *         if self.path == '/':
+ */
+  __pyx_tuple__43 = PyTuple_Pack(2, __pyx_kp_s__41, __pyx_kp_s__42); if (unlikely(!__pyx_tuple__43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__43);
+  __Pyx_GIVEREF(__pyx_tuple__43);
+
+  /* "netCDF4.pyx":1922
+ *         if name not in _private_atts:
+ *             self.setncattr(name, value)
+ *         elif not name.endswith('__'):             # <<<<<<<<<<<<<<
+ *             if hasattr(self,name):
+ *                 raise AttributeError(
+ */
+  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_n_s__44); if (unlikely(!__pyx_tuple__45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__45);
+  __Pyx_GIVEREF(__pyx_tuple__45);
+
+  /* "netCDF4.pyx":1932
+ *         # if name in _private_atts, it is stored at the python
+ *         # level and not in the netCDF file.
+ *         if name.startswith('__') and name.endswith('__'):             # <<<<<<<<<<<<<<
+ *             # if __dict__ requested, return a dict with netCDF attributes.
+ *             if name == '__dict__':
+ */
+  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_n_s__44); if (unlikely(!__pyx_tuple__46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__46);
+  __Pyx_GIVEREF(__pyx_tuple__46);
+  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_n_s__44); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__47);
+  __Pyx_GIVEREF(__pyx_tuple__47);
+
+  /* "netCDF4.pyx":2138
+ * overrides L{Dataset} close method which does not apply to L{Group}
+ * instances, raises IOError."""
+ *         raise IOError('cannot close a L{Group} (only applies to Dataset)')             # <<<<<<<<<<<<<<
+ * 
+ *     def _getname(self):
+ */
+  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_cannot_close_a_L_Group_only_appl); if (unlikely(!__pyx_tuple__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__48);
+  __Pyx_GIVEREF(__pyx_tuple__48);
+
+  /* "netCDF4.pyx":2154
+ *             return self._getname()
+ *         def __set__(self,value):
+ *             raise AttributeError("name cannot be altered")             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__49);
+  __Pyx_GIVEREF(__pyx_tuple__49);
+
+  /* "netCDF4.pyx":2231
+ *             return self._getname()
+ *         def __set__(self,value):
+ *             raise AttributeError("name cannot be altered")             # <<<<<<<<<<<<<<
+ * 
+ *     def __repr__(self):
+ */
+  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__50);
+  __Pyx_GIVEREF(__pyx_tuple__50);
+
+  /* "netCDF4.pyx":2495
+ *             if datatype==str:
+ *                 if grp.data_model != 'NETCDF4':
+ *                     raise ValueError(             # <<<<<<<<<<<<<<
+ *                         'Variable length strings are only supported for the '
+ *                         'NETCDF4 format. For other formats, consider using '
+ */
+  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_Variable_length_strings_are_only); if (unlikely(!__pyx_tuple__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__55);
+  __Pyx_GIVEREF(__pyx_tuple__55);
+
+  /* "netCDF4.pyx":2505
+ *             # dtype variable attribute is a numpy datatype object.
+ *             self.dtype = datatype.dtype
+ *         elif datatype.str[1:] in _supportedtypes:             # <<<<<<<<<<<<<<
+ *             self._isprimitive = True
+ *             # find netCDF primitive data type corresponding to
+ */
+  __pyx_slice__56 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__56);
+  __Pyx_GIVEREF(__pyx_slice__56);
+
+  /* "netCDF4.pyx":2509
+ *             # find netCDF primitive data type corresponding to
+ *             # specified numpy data type.
+ *             xtype = _nptonctype[datatype.str[1:]]             # <<<<<<<<<<<<<<
+ *             # dtype variable attribute is a numpy datatype object.
+ *             self.dtype = datatype
+ */
+  __pyx_slice__57 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__57);
+  __Pyx_GIVEREF(__pyx_slice__57);
+
+  /* "netCDF4.pyx":2545
+ *             # of vars are created.  This change only lasts as long as file is
+ *             # open.
+ *             if grp.data_model.startswith('NETCDF4') and chunk_cache is not None:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,
+ *                         &nelemsp, &preemptionp)
+ */
+  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_n_s_NETCDF4); if (unlikely(!__pyx_tuple__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__58);
+  __Pyx_GIVEREF(__pyx_tuple__58);
+
+  /* "netCDF4.pyx":2587
+ *                         icontiguous = NC_CONTIGUOUS
+ *                         if chunksizes is not None:
+ *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         icontiguous = NC_CHUNKED
+ */
+  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_cannot_specify_chunksizes_for_a); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__59);
+  __Pyx_GIVEREF(__pyx_tuple__59);
+
+  /* "netCDF4.pyx":2595
+ *                         if len(chunksizes) != len(dimensions):
+ *                             if grp.data_model != 'NETCDF4': grp._enddef()
+ *                             raise ValueError('chunksizes must be a sequence with the same length as dimensions')             # <<<<<<<<<<<<<<
+ *                         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
+ *                         for n from 0 <= n < ndims:
+ */
+  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_chunksizes_must_be_a_sequence_wi); if (unlikely(!__pyx_tuple__60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__60);
+  __Pyx_GIVEREF(__pyx_tuple__60);
+
+  /* "netCDF4.pyx":2642
+ *                         _set_att(self._grp, self._varid, '_FillValue', fillval)
+ *                     else:
+ *                         raise AttributeError("cannot set _FillValue attribute for VLEN or compound variable")             # <<<<<<<<<<<<<<
+ *             if least_significant_digit is not None:
+ *                 self.least_significant_digit = least_significant_digit
+ */
+  __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_cannot_set__FillValue_attribute); if (unlikely(!__pyx_tuple__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__61);
+  __Pyx_GIVEREF(__pyx_tuple__61);
+
+  /* "netCDF4.pyx":2715
+ *                     msg = 'filling on'
+ *                 except AttributeError:
+ *                     fillval = default_fillvals[self.dtype.str[1:]]             # <<<<<<<<<<<<<<
+ *                     if self.dtype.str[1:] in ['u1','i1']:
+ *                         msg = 'filling on, default _FillValue of %s ignored\n' % fillval
+ */
+  __pyx_slice__62 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__62);
+  __Pyx_GIVEREF(__pyx_slice__62);
+
+  /* "netCDF4.pyx":2716
+ *                 except AttributeError:
+ *                     fillval = default_fillvals[self.dtype.str[1:]]
+ *                     if self.dtype.str[1:] in ['u1','i1']:             # <<<<<<<<<<<<<<
+ *                         msg = 'filling on, default _FillValue of %s ignored\n' % fillval
+ *                     else:
+ */
+  __pyx_slice__63 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__63);
+  __Pyx_GIVEREF(__pyx_slice__63);
+
+  /* "netCDF4.pyx":2764
+ *             return self._getname()
+ *         def __set__(self,value):
+ *             raise AttributeError("name cannot be altered")             # <<<<<<<<<<<<<<
+ * 
+ *     property datatype:
+ */
+  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__64);
+  __Pyx_GIVEREF(__pyx_tuple__64);
+
+  /* "netCDF4.pyx":2786
+ *             return shape
+ *         def __set__(self,value):
+ *             raise AttributeError("shape cannot be altered")             # <<<<<<<<<<<<<<
+ * 
+ *     property size:
+ */
+  __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_shape_cannot_be_altered); if (unlikely(!__pyx_tuple__65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__65);
+  __Pyx_GIVEREF(__pyx_tuple__65);
+
+  /* "netCDF4.pyx":2798
+ *             return self._getdims()
+ *         def __set__(self,value):
+ *             raise AttributeError("dimensions cannot be altered")             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_dimensions_cannot_be_altered); if (unlikely(!__pyx_tuple__66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__66);
+  __Pyx_GIVEREF(__pyx_tuple__66);
+
+  /* "netCDF4.pyx":3003
+ *                 value = numpy.array(value, self.dtype)
+ *             self.setncattr(name, value)
+ *         elif not name.endswith('__'):             # <<<<<<<<<<<<<<
+ *             if hasattr(self,name):
+ *                 raise AttributeError(
+ */
+  __pyx_tuple__67 = PyTuple_Pack(1, __pyx_n_s__44); if (unlikely(!__pyx_tuple__67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__67);
+  __Pyx_GIVEREF(__pyx_tuple__67);
+
+  /* "netCDF4.pyx":3013
+ *         # if name in _private_atts, it is stored at the python
+ *         # level and not in the netCDF file.
+ *         if name.startswith('__') and name.endswith('__'):             # <<<<<<<<<<<<<<
+ *             # if __dict__ requested, return a dict with netCDF attributes.
+ *             if name == '__dict__':
+ */
+  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_n_s__44); if (unlikely(!__pyx_tuple__68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__68);
+  __Pyx_GIVEREF(__pyx_tuple__68);
+  __pyx_tuple__69 = PyTuple_Pack(1, __pyx_n_s__44); if (unlikely(!__pyx_tuple__69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__69);
+  __Pyx_GIVEREF(__pyx_tuple__69);
+
+  /* "netCDF4.pyx":3061
+ *         # The convention used is that for those cases,
+ *         # put_ind for this dimension is set to -1 by _StartCountStride.
+ *         squeeze = data.ndim * [slice(None),]             # <<<<<<<<<<<<<<
+ *         for i,n in enumerate(put_ind.shape[:-1]):
+ *             if n == 1 and put_ind[...,i].ravel()[0] == -1:
+ */
+  __pyx_slice__70 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__70);
+  __Pyx_GIVEREF(__pyx_slice__70);
+
+  /* "netCDF4.pyx":3062
+ *         # put_ind for this dimension is set to -1 by _StartCountStride.
+ *         squeeze = data.ndim * [slice(None),]
+ *         for i,n in enumerate(put_ind.shape[:-1]):             # <<<<<<<<<<<<<<
+ *             if n == 1 and put_ind[...,i].ravel()[0] == -1:
+ *                 squeeze[i] = 0
+ */
+  __pyx_slice__71 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__71);
+  __Pyx_GIVEREF(__pyx_slice__71);
+
+  /* "netCDF4.pyx":3131
+ *             if (self.endian() == 'big' and is_native_little) or\
+ *                (self.endian() == 'little' and is_native_big):
+ *                      mval.byteswap(True)             # <<<<<<<<<<<<<<
+ *             if mval.shape == (): # mval a scalar.
+ *                 hasmval = data==mval
+ */
+  __pyx_tuple__72 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__72);
+  __Pyx_GIVEREF(__pyx_tuple__72);
+
+  /* "netCDF4.pyx":3159
+ *             if (self.endian() == 'big' and is_native_little) or\
+ *                (self.endian() == 'little' and is_native_big):
+ *                      fval.byteswap(True)             # <<<<<<<<<<<<<<
+ *             # is _FillValue a NaN?
+ *             try:
+ */
+  __pyx_tuple__73 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__73);
+  __Pyx_GIVEREF(__pyx_tuple__73);
+
+  /* "netCDF4.pyx":3193
+ *              # small to assume one of the values should appear as a missing
+ *              # value unless a _FillValue attribute is set explicitly."
+ *              if no_fill != 1 and self.dtype.str[1:] not in ['u1','i1']:             # <<<<<<<<<<<<<<
+ *                  fillval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype)
+ *                  # byte swap the _FillValue if endian-ness of the variable
+ */
+  __pyx_slice__74 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__74);
+  __Pyx_GIVEREF(__pyx_slice__74);
+
+  /* "netCDF4.pyx":3194
+ *              # value unless a _FillValue attribute is set explicitly."
+ *              if no_fill != 1 and self.dtype.str[1:] not in ['u1','i1']:
+ *                  fillval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype)             # <<<<<<<<<<<<<<
+ *                  # byte swap the _FillValue if endian-ness of the variable
+ *                  # is not native.
+ */
+  __pyx_slice__75 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__75);
+  __Pyx_GIVEREF(__pyx_slice__75);
+
+  /* "netCDF4.pyx":3199
+ *                  if (self.endian() == 'big' and is_native_little) or\
+ *                     (self.endian() == 'little' and is_native_big):
+ *                      fillval.byteswap(True)             # <<<<<<<<<<<<<<
+ *                  has_fillval = data == fillval
+ *                  # if data is an array scalar, has_fillval will be a boolean.
+ */
+  __pyx_tuple__76 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__76);
+  __Pyx_GIVEREF(__pyx_tuple__76);
+
+  /* "netCDF4.pyx":3225
+ *         cdef ndarray data2
+ *         if not self._isvlen:
+ *             raise TypeError('_assign_vlen method only for use with VLEN variables')             # <<<<<<<<<<<<<<
+ *         ndims = self.ndim
+ *         msg="single element VLEN slices must be specified by integers only"
+ */
+  __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_s_assign_vlen_method_only_for_use); if (unlikely(!__pyx_tuple__77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__77);
+  __Pyx_GIVEREF(__pyx_tuple__77);
+
+  /* "netCDF4.pyx":3237
+ *                     elem = self.shape[0]+elem
+ *                 else:
+ *                     raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
+ *         elif isinstance(elem, tuple):
+ *             if len(elem) != ndims:
+ */
+  __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__78);
+  __Pyx_GIVEREF(__pyx_tuple__78);
+
+  /* "netCDF4.pyx":3240
+ *         elif isinstance(elem, tuple):
+ *             if len(elem) != ndims:
+ *                 raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
+ *             elemnew = []
+ *             for n,e in enumerate(elem):
+ */
+  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__79);
+  __Pyx_GIVEREF(__pyx_tuple__79);
+
+  /* "netCDF4.pyx":3248
+ *                     enew = self.shape[n]+e
+ *                     if enew < 0:
+ *                         raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         elemnew.append(self.shape[n]+e)
+ */
+  __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__80);
+  __Pyx_GIVEREF(__pyx_tuple__80);
+
+  /* "netCDF4.pyx":3396
+ *                         fillval = self._FillValue
+ *                     else:
+ *                         fillval = default_fillvals[self.dtype.str[1:]]             # <<<<<<<<<<<<<<
+ *                     data = data.filled(fill_value=fillval)
+ * 
+ */
+  __pyx_slice__81 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__81);
+  __Pyx_GIVEREF(__pyx_slice__81);
+
+  /* "netCDF4.pyx":3423
+ * Scientific.IO.NetCDF, can also be done by assigning to a slice ([:])."""
+ *         if len(self.dimensions):
+ *             raise IndexError('to assign values to a non-scalar variable, use a slice')             # <<<<<<<<<<<<<<
+ *         self[:]=val
+ * 
+ */
+  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_s_to_assign_values_to_a_non_scalar); if (unlikely(!__pyx_tuple__82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__82);
+  __Pyx_GIVEREF(__pyx_tuple__82);
+
+  /* "netCDF4.pyx":3424
+ *         if len(self.dimensions):
+ *             raise IndexError('to assign values to a non-scalar variable, use a slice')
+ *         self[:]=val             # <<<<<<<<<<<<<<
+ * 
+ *     def getValue(self):
+ */
+  __pyx_slice__83 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__83);
+  __Pyx_GIVEREF(__pyx_slice__83);
+
+  /* "netCDF4.pyx":3433
+ * Scientific.IO.NetCDF, can also be done by slicing ([:])."""
+ *         if len(self.dimensions):
+ *             raise IndexError('to retrieve values from a non-scalar variable, use slicing')             # <<<<<<<<<<<<<<
+ *         return self[slice(None)]
+ * 
+ */
+  __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_s_to_retrieve_values_from_a_non_sc); if (unlikely(!__pyx_tuple__84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__84);
+  __Pyx_GIVEREF(__pyx_tuple__84);
+
+  /* "netCDF4.pyx":3434
+ *         if len(self.dimensions):
+ *             raise IndexError('to retrieve values from a non-scalar variable, use slicing')
+ *         return self[slice(None)]             # <<<<<<<<<<<<<<
+ * 
+ *     def set_auto_maskandscale(self,maskandscale):
+ */
+  __pyx_slice__85 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__85);
+  __Pyx_GIVEREF(__pyx_slice__85);
+
+  /* "netCDF4.pyx":3572
+ *                 startp[n] = start[n]+stride[n]*(count[n]-1)
+ *                 stride[n] = -stride[n]
+ *                 sl.append(slice(None, None, -1)) # this slice will reverse the data             # <<<<<<<<<<<<<<
+ *             else:
+ *                 startp[n] = start[n]
+ */
+  __pyx_slice__86 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__86);
+  __Pyx_GIVEREF(__pyx_slice__86);
+
+  /* "netCDF4.pyx":3576
+ *                 startp[n] = start[n]
+ *                 stridep[n] = stride[n]
+ *                 sl.append(slice(None,None, 1))             # <<<<<<<<<<<<<<
+ *             totelem = totelem*countp[n]
+ *         # check to see that size of data array is what is expected
+ */
+  __pyx_slice__87 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__87);
+  __Pyx_GIVEREF(__pyx_slice__87);
+
+  /* "netCDF4.pyx":3582
+ *         dataelem = PyArray_SIZE(data)
+ *         if totelem != dataelem:
+ *             raise IndexError('size of data array does not conform to slice')             # <<<<<<<<<<<<<<
+ *         if negstride:
+ *             # reverse data along axes with negative strides.
+ */
+  __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_s_size_of_data_array_does_not_conf); if (unlikely(!__pyx_tuple__88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__88);
+  __Pyx_GIVEREF(__pyx_tuple__88);
+
+  /* "netCDF4.pyx":3596
+ *             if self.endian() == 'native':
+ *                 if is_native_little and data.dtype.byteorder == '>':
+ *                     data.byteswap(True)             # <<<<<<<<<<<<<<
+ *                 if is_native_big and data.dtype.byteorder == '<':
+ *                     data.byteswap(True)
+ */
+  __pyx_tuple__89 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__89);
+  __Pyx_GIVEREF(__pyx_tuple__89);
+
+  /* "netCDF4.pyx":3598
+ *                     data.byteswap(True)
+ *                 if is_native_big and data.dtype.byteorder == '<':
+ *                     data.byteswap(True)             # <<<<<<<<<<<<<<
+ *             if self.endian() == 'big':
+ *                 if is_native_big and data.dtype.byteorder not in ['=','|']:
+ */
+  __pyx_tuple__90 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__90);
+  __Pyx_GIVEREF(__pyx_tuple__90);
+
+  /* "netCDF4.pyx":3601
+ *             if self.endian() == 'big':
+ *                 if is_native_big and data.dtype.byteorder not in ['=','|']:
+ *                     data.byteswap(True)             # <<<<<<<<<<<<<<
+ *                 if is_native_little and data.dtype.byteorder == '=':
+ *                     data.byteswap(True)
+ */
+  __pyx_tuple__91 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__91);
+  __Pyx_GIVEREF(__pyx_tuple__91);
+
+  /* "netCDF4.pyx":3603
+ *                     data.byteswap(True)
+ *                 if is_native_little and data.dtype.byteorder == '=':
+ *                     data.byteswap(True)             # <<<<<<<<<<<<<<
+ *             if self.endian() == 'little':
+ *                 if is_native_little and data.dtype.byteorder not in ['=','|']:
+ */
+  __pyx_tuple__92 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__92);
+  __Pyx_GIVEREF(__pyx_tuple__92);
+
+  /* "netCDF4.pyx":3606
+ *             if self.endian() == 'little':
+ *                 if is_native_little and data.dtype.byteorder not in ['=','|']:
+ *                     data.byteswap(True)             # <<<<<<<<<<<<<<
+ *                 if is_native_big and data.dtype.byteorder == '=':
+ *                     data.byteswap(True)
+ */
+  __pyx_tuple__93 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__93);
+  __Pyx_GIVEREF(__pyx_tuple__93);
+
+  /* "netCDF4.pyx":3608
+ *                     data.byteswap(True)
+ *                 if is_native_big and data.dtype.byteorder == '=':
+ *                     data.byteswap(True)             # <<<<<<<<<<<<<<
+ *             # strides all 1 or scalar variable, use put_vara (faster)
+ *             if sum(stride) == ndims or ndims == 0:
+ */
+  __pyx_tuple__94 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__94);
+  __Pyx_GIVEREF(__pyx_tuple__94);
+
+  /* "netCDF4.pyx":3620
+ *         elif self._isvlen:
+ *             if data.dtype.char !='O':
+ *                 raise TypeError('data to put in string variable must be an object array containing Python strings')             # <<<<<<<<<<<<<<
+ *             # flatten data array.
+ *             data = data.flatten()
+ */
+  __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_s_data_to_put_in_string_variable_m); if (unlikely(!__pyx_tuple__95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__95);
+  __Pyx_GIVEREF(__pyx_tuple__95);
+
+  /* "netCDF4.pyx":3639
+ *                                        startp, countp, strdata)
+ *                 else:
+ *                     raise IndexError('strides must all be 1 for string variables')             # <<<<<<<<<<<<<<
+ *                     #ierr = nc_put_vars(self._grpid, self._varid,
+ *                     #                   startp, countp, stridep, strdata)
+ */
+  __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__96);
+  __Pyx_GIVEREF(__pyx_tuple__96);
+
+  /* "netCDF4.pyx":3655
+ *                     elptr = (<void**>databuff)[0]
+ *                     dataarr = <ndarray>elptr
+ *                     if self.dtype != dataarr.dtype.str[1:]:             # <<<<<<<<<<<<<<
+ *                         #dataarr = dataarr.astype(self.dtype) # cast data, if necessary.
+ *                         # casting doesn't work ?? just raise TypeError
+ */
+  __pyx_slice__97 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__97);
+  __Pyx_GIVEREF(__pyx_slice__97);
+
+  /* "netCDF4.pyx":3667
+ *                                        startp, countp, vldata)
+ *                 else:
+ *                     raise IndexError('strides must all be 1 for vlen variables')             # <<<<<<<<<<<<<<
+ *                     #ierr = nc_put_vars(self._grpid, self._varid,
+ *                     #                   startp, countp, stridep, vldata)
+ */
+  __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_vlen_v); if (unlikely(!__pyx_tuple__98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__98);
+  __Pyx_GIVEREF(__pyx_tuple__98);
+
+  /* "netCDF4.pyx":3692
+ *         for lendim in count:
+ *             if lendim == -1:
+ *                 shapeout = shapeout + (1,)             # <<<<<<<<<<<<<<
+ *                 squeeze_out = True
+ *             else:
+ */
+  __pyx_tuple__99 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__99);
+  __Pyx_GIVEREF(__pyx_tuple__99);
+
+  /* "netCDF4.pyx":3710
+ *                 startp[n] = start[n]+stride[n]*(count[n]-1)
+ *                 stride[n] = -stride[n]
+ *                 sl.append(slice(None, None, -1)) # this slice will reverse the data             # <<<<<<<<<<<<<<
+ *             else:
+ *                 startp[n] = start[n]
+ */
+  __pyx_slice__100 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__100);
+  __Pyx_GIVEREF(__pyx_slice__100);
+
+  /* "netCDF4.pyx":3714
+ *                 startp[n] = start[n]
+ *                 stridep[n] = stride[n]
+ *                 sl.append(slice(None,None, 1))             # <<<<<<<<<<<<<<
+ *         if self._isprimitive or self._iscompound:
+ *             data = numpy.empty(shapeout, self.dtype)
+ */
+  __pyx_slice__101 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__101);
+  __Pyx_GIVEREF(__pyx_slice__101);
+
+  /* "netCDF4.pyx":3744
+ *                 else:
+ *                     # FIXME: is this a bug in netCDF4?
+ *                     raise IndexError('strides must all be 1 for string variables')             # <<<<<<<<<<<<<<
+ *                     #ierr = nc_get_vars(self._grpid, self._varid,
+ *                     #                   startp, countp, stridep, strdata)
+ */
+  __pyx_tuple__102 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__102);
+  __Pyx_GIVEREF(__pyx_tuple__102);
+
+  /* "netCDF4.pyx":3767
+ *                                        startp, countp, vldata)
+ *                 else:
+ *                     raise IndexError('strides must all be 1 for vlen variables')             # <<<<<<<<<<<<<<
+ *                     #ierr = nc_get_vars(self._grpid, self._varid,
+ *                     #                   startp, countp, stridep, vldata)
+ */
+  __pyx_tuple__103 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_vlen_v); if (unlikely(!__pyx_tuple__103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__103);
+  __Pyx_GIVEREF(__pyx_tuple__103);
+
+  /* "netCDF4.pyx":3886
+ *         if format.kind != 'V': # scalar primitive type
+ *             try:
+ *                 xtype_tmp = _nptonctype[format.str[1:]]             # <<<<<<<<<<<<<<
+ *             except KeyError:
+ *                 raise ValueError('Unsupported compound type element')
+ */
+  __pyx_slice__104 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__104);
+  __Pyx_GIVEREF(__pyx_slice__104);
+
+  /* "netCDF4.pyx":3888
+ *                 xtype_tmp = _nptonctype[format.str[1:]]
+ *             except KeyError:
+ *                 raise ValueError('Unsupported compound type element')             # <<<<<<<<<<<<<<
+ *             ierr = nc_insert_compound(grp._grpid, xtype, namstring,
+ *                                       offset, xtype_tmp)
+ */
+  __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__105);
+  __Pyx_GIVEREF(__pyx_tuple__105);
+
+  /* "netCDF4.pyx":3910
+ *                 if format.subdtype[0].str[1] != 'V': # primitive type.
+ *                     try:
+ *                         xtype_tmp = _nptonctype[format.subdtype[0].str[1:]]             # <<<<<<<<<<<<<<
+ *                     except KeyError:
+ *                         raise ValueError('Unsupported compound type element')
+ */
+  __pyx_slice__106 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__106);
+  __Pyx_GIVEREF(__pyx_slice__106);
+
+  /* "netCDF4.pyx":3912
+ *                         xtype_tmp = _nptonctype[format.subdtype[0].str[1:]]
+ *                     except KeyError:
+ *                         raise ValueError('Unsupported compound type element')             # <<<<<<<<<<<<<<
+ *                     ierr = nc_insert_array_compound(grp._grpid,xtype,namstring,
+ *                            offset,xtype_tmp,ndims,dim_sizes)
+ */
+  __pyx_tuple__107 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__107);
+  __Pyx_GIVEREF(__pyx_tuple__107);
+
+  /* "netCDF4.pyx":3949
+ *             parent_grp = grp.parent
+ *         except AttributeError:
+ *             raise ValueError("cannot find compound type in this group or parent groups")             # <<<<<<<<<<<<<<
+ *         if parent_grp is None:
+ *             raise ValueError("cannot find compound type in this group or parent groups")
+ */
+  __pyx_tuple__108 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__108);
+  __Pyx_GIVEREF(__pyx_tuple__108);
+
+  /* "netCDF4.pyx":3951
+ *             raise ValueError("cannot find compound type in this group or parent groups")
+ *         if parent_grp is None:
+ *             raise ValueError("cannot find compound type in this group or parent groups")             # <<<<<<<<<<<<<<
+ *         else:
+ *             xtype = _find_cmptype(parent_grp,dtype)
+ */
+  __pyx_tuple__109 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__109);
+  __Pyx_GIVEREF(__pyx_tuple__109);
+
+  /* "netCDF4.pyx":4006
+ *                 field_type = _read_compound(group, field_typeid)
+ *             else:
+ *                 raise KeyError('compound field of an unsupported data type')             # <<<<<<<<<<<<<<
+ *         if field_shape != ():
+ *             formats.append((field_type,field_shape))
+ */
+  __pyx_tuple__110 = PyTuple_Pack(1, __pyx_kp_s_compound_field_of_an_unsupported); if (unlikely(!__pyx_tuple__110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__110);
+  __Pyx_GIVEREF(__pyx_tuple__110);
+
+  /* "netCDF4.pyx":4097
+ *         namstring = bytestr
+ *         dt = numpy.dtype(dt) # convert to numpy datatype.
+ *         if dt.str[1:] in _supportedtypes:             # <<<<<<<<<<<<<<
+ *             # find netCDF primitive data type corresponding to
+ *             # specified numpy data type.
+ */
+  __pyx_slice__111 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__111);
+  __Pyx_GIVEREF(__pyx_slice__111);
+
+  /* "netCDF4.pyx":4100
+ *             # find netCDF primitive data type corresponding to
+ *             # specified numpy data type.
+ *             xtype_tmp = _nptonctype[dt.str[1:]]             # <<<<<<<<<<<<<<
+ *             ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype);
+ *             if ierr != NC_NOERR:
+ */
+  __pyx_slice__112 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__112);
+  __Pyx_GIVEREF(__pyx_slice__112);
+
+  /* "netCDF4.pyx":4105
+ *                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         else:
+ *             raise KeyError("unsupported datatype specified for VLEN")             # <<<<<<<<<<<<<<
+ *     return xtype, dt
+ * 
+ */
+  __pyx_tuple__113 = PyTuple_Pack(1, __pyx_kp_s_unsupported_datatype_specified_f); if (unlikely(!__pyx_tuple__113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__113);
+  __Pyx_GIVEREF(__pyx_tuple__113);
+
+  /* "netCDF4.pyx":4128
+ *             dt = numpy.dtype(_nctonptype[base_xtype]) # see if it is a primitive type
+ *         except KeyError:
+ *             raise KeyError("unsupported component type for VLEN")             # <<<<<<<<<<<<<<
+ *     return VLType(group, dt, name, typeid=xtype)
+ * 
+ */
+  __pyx_tuple__114 = PyTuple_Pack(1, __pyx_kp_s_unsupported_component_type_for_V); if (unlikely(!__pyx_tuple__114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__114);
+  __Pyx_GIVEREF(__pyx_tuple__114);
+
+  /* "netCDF4.pyx":807
+ *         from ordereddict import OrderedDict
+ *     except ImportError:
+ *         raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)')             # <<<<<<<<<<<<<<
+ * try:
+ *     from itertools import izip as zip
+ */
+  __pyx_tuple__115 = PyTuple_Pack(1, __pyx_kp_s_please_install_ordereddict_https); if (unlikely(!__pyx_tuple__115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__115);
+  __Pyx_GIVEREF(__pyx_tuple__115);
+
+  /* "netCDF4.pyx":826
+ * from numpy import ma
+ * from numpy import __version__ as _npversion
+ * if _npversion.split('.')[0] < '1':             # <<<<<<<<<<<<<<
+ *     raise ImportError('requires numpy version 1.0rc1 or later')
+ * import_array()
+ */
+  __pyx_tuple__117 = PyTuple_Pack(1, __pyx_kp_s__116); if (unlikely(!__pyx_tuple__117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__117);
+  __Pyx_GIVEREF(__pyx_tuple__117);
+
+  /* "netCDF4.pyx":827
+ * from numpy import __version__ as _npversion
+ * if _npversion.split('.')[0] < '1':
+ *     raise ImportError('requires numpy version 1.0rc1 or later')             # <<<<<<<<<<<<<<
+ * import_array()
+ * include "netCDF4.pxi"
+ */
+  __pyx_tuple__118 = PyTuple_Pack(1, __pyx_kp_s_requires_numpy_version_1_0rc1_or); if (unlikely(!__pyx_tuple__118)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__118);
+  __Pyx_GIVEREF(__pyx_tuple__118);
+
+  /* "utils.pyx":3
+ * from datetime import timedelta, datetime
+ * 
+ * gregorian = datetime(1582,10,15)             # <<<<<<<<<<<<<<
+ * 
+ * def _dateparse(timestr):
+ */
+  __pyx_tuple__119 = PyTuple_Pack(3, __pyx_int_1582, __pyx_int_10, __pyx_int_15); if (unlikely(!__pyx_tuple__119)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__119);
+  __Pyx_GIVEREF(__pyx_tuple__119);
+
+  /* "utils.pyx":5
+ * gregorian = datetime(1582,10,15)
+ * 
+ * def _dateparse(timestr):             # <<<<<<<<<<<<<<
+ *     """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss,
+ *     return a datetime instance"""
+ */
+  __pyx_tuple__120 = PyTuple_Pack(9, __pyx_n_s_timestr, __pyx_n_s_dparse, __pyx_n_s_tzutc, __pyx_n_s_msg, __pyx_n_s_timestr_split, __pyx_n_s_units, __pyx_n_s_n, __pyx_n_s_isostring, __pyx_n_s_basedate); if (unlikely(!__pyx_tuple__120)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__120);
+  __Pyx_GIVEREF(__pyx_tuple__120);
+  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_dateparse, 5, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":28
+ * # utility functions (visible from python).
+ * 
+ * def stringtoarr(string,NUMCHARS,dtype='S'):             # <<<<<<<<<<<<<<
+ *     """
+ * stringtoarr(a, NUMCHARS,dtype='S')
+ */
+  __pyx_tuple__122 = PyTuple_Pack(4, __pyx_n_s_string, __pyx_n_s_NUMCHARS, __pyx_n_s_dtype, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__122)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__122);
+  __Pyx_GIVEREF(__pyx_tuple__122);
+  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_stringtoarr, 28, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":51
+ *     return arr
+ * 
+ * def stringtochar(a):             # <<<<<<<<<<<<<<
+ *     """
+ * stringtochar(a)
+ */
+  __pyx_tuple__124 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_n_s_dtype, __pyx_n_s_b); if (unlikely(!__pyx_tuple__124)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__124);
+  __Pyx_GIVEREF(__pyx_tuple__124);
+  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_stringtochar, 51, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":70
+ *     return b
+ * 
+ * def chartostring(b):             # <<<<<<<<<<<<<<
+ *     """
+ * chartostring(b)
+ */
+  __pyx_tuple__126 = PyTuple_Pack(6, __pyx_n_s_b, __pyx_n_s_dtype, __pyx_n_s_bs, __pyx_n_s_slen, __pyx_n_s_a, __pyx_n_s_n1); if (unlikely(!__pyx_tuple__126)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__126);
+  __Pyx_GIVEREF(__pyx_tuple__126);
+  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_chartostring, 70, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":91
+ *     return a
+ * 
+ * def date2num(dates,units,calendar='standard'):             # <<<<<<<<<<<<<<
+ *     """
+ * date2num(dates,units,calendar='standard')
+ */
+  __pyx_tuple__128 = PyTuple_Pack(15, __pyx_n_s_dates, __pyx_n_s_units, __pyx_n_s_calendar, __pyx_n_s_unit, __pyx_n_s_basedate, __pyx_n_s_tzutc, __pyx_n_s_msg, __pyx_n_s_isscalar, __pyx_n_s_ismasked, __pyx_n_s_mask, __pyx_n_s_times, __pyx_n_s_date, __pyx_n_s_td, __pyx_n_s_totaltime, __pyx_n_s_cdftime); if (unlikely(!__pyx_tuple__128)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__128);
+  __Pyx_GIVEREF(__pyx_tuple__128);
+  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_date2num, 91, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":168
+ *         return cdftime.date2num(dates)
+ * 
+ * def num2date(times,units,calendar='standard'):             # <<<<<<<<<<<<<<
+ *     """
+ * num2date(times,units,calendar='standard')
+ */
+  __pyx_tuple__130 = PyTuple_Pack(20, __pyx_n_s_times, __pyx_n_s_units, __pyx_n_s_calendar, __pyx_n_s_unit, __pyx_n_s_basedate, __pyx_n_s_tzutc, __pyx_n_s_msg, __pyx_n_s_isscalar, __pyx_n_s_ismasked, __pyx_n_s_mask, __pyx_n_s_dates, __pyx_n_s_time, __pyx_n_s_tsecs, __pyx_n_s_days, __pyx_n_s_msecsd, __pyx_n_s_secs, __pyx_n_s_msecs, __pyx_n_s_td, __pyx_n_s_date, __pyx_n_s_cdftime); if (unlikely(!__pyx_tuple__130)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__;  [...]
+  __Pyx_GOTREF(__pyx_tuple__130);
+  __Pyx_GIVEREF(__pyx_tuple__130);
+  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(3, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_num2date, 168, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":260
+ *         return cdftime.num2date(times)
+ * 
+ * def date2index(dates, nctime, calendar=None, select='exact'):             # <<<<<<<<<<<<<<
+ *     """
+ * date2index(dates, nctime, calendar=None, select='exact')
+ */
+  __pyx_tuple__132 = PyTuple_Pack(9, __pyx_n_s_dates, __pyx_n_s_nctime, __pyx_n_s_calendar, __pyx_n_s_select, __pyx_n_s_unit, __pyx_n_s_basedate, __pyx_n_s_tzutc, __pyx_n_s_msg, __pyx_n_s_times); if (unlikely(!__pyx_tuple__132)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__132);
+  __Pyx_GIVEREF(__pyx_tuple__132);
+  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_date2index, 260, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":308
+ *         return netcdftime.date2index(dates, nctime, calendar, select)
+ * 
+ * def getlibversion():             # <<<<<<<<<<<<<<
+ *     """
+ * getlibversion()
+ */
+  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_getlibversion, 308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":349
+ *     """
+ * 
+ *     def __init__(self, files, check=False, aggdim=None, exclude=[]):             # <<<<<<<<<<<<<<
+ *         """
+ * Open a Dataset spanning multiple files, making it look as if it was a
+ */
+  __pyx_tuple__135 = PyTuple_Pack(36, __pyx_n_s_self, __pyx_n_s_files, __pyx_n_s_check, __pyx_n_s_aggdim, __pyx_n_s_exclude, __pyx_n_s_msg, __pyx_n_s_master, __pyx_n_s_cdfm, __pyx_n_s_name, __pyx_n_s_value, __pyx_n_s_aggDimId, __pyx_n_s_dimname, __pyx_n_s_dim, __pyx_n_s_aggDimName, __pyx_n_s_masterRecVar, __pyx_n_s_vName, __pyx_n_s_v, __pyx_n_s_dims_2, __pyx_n_s_shape, __pyx_n_s_dtype, __pyx_n_s_cdf_2, __pyx_n_s_cdfVLen_2, __pyx_n_s_cdfRecVar_2, __pyx_n_s_f, __pyx_n_s_part, __pyx_n_s_var [...]
+  __Pyx_GOTREF(__pyx_tuple__135);
+  __Pyx_GIVEREF(__pyx_tuple__135);
+  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(5, 0, 36, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_init, 349, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":527
+ *         self._path = '/'
+ * 
+ *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
+ *         """override base class attribute creation"""
+ *         self.__dict__[name] = value
+ */
+  __pyx_tuple__137 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__137)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__137);
+  __Pyx_GIVEREF(__pyx_tuple__137);
+  __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_setattr, 527, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":531
+ *         self.__dict__[name] = value
+ * 
+ *     def __getattribute__(self, name):             # <<<<<<<<<<<<<<
+ *         if name in ['variables','dimensions','file_format','groups',\
+ *                     'data_model','disk_format','path']:
+ */
+  __pyx_tuple__139 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__139)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__139);
+  __Pyx_GIVEREF(__pyx_tuple__139);
+  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_getattribute, 531, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":544
+ *             return Dataset.__getattribute__(self, name)
+ * 
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         return self._cdf[0].__dict__.keys()
+ * 
+ */
+  __pyx_tuple__141 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__141)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__141);
+  __Pyx_GIVEREF(__pyx_tuple__141);
+  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_ncattrs, 544, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":547
+ *         return self._cdf[0].__dict__.keys()
+ * 
+ *     def close(self):             # <<<<<<<<<<<<<<
+ *         for dset in self._cdf:
+ *             dset.close()
+ */
+  __pyx_tuple__143 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_dset); if (unlikely(!__pyx_tuple__143)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__143);
+  __Pyx_GIVEREF(__pyx_tuple__143);
+  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_close, 547, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":551
+ *             dset.close()
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         ncdump = ['%r\n' % type(self)]
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
+ */
+  __pyx_tuple__145 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_ncdump, __pyx_n_s_dimnames, __pyx_n_s_varnames, __pyx_n_s_grpnames, __pyx_n_s_attrs, __pyx_n_s_dimname, __pyx_n_s_varname, __pyx_n_s_name); if (unlikely(!__pyx_tuple__145)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__145);
+  __Pyx_GIVEREF(__pyx_tuple__145);
+  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_repr, 551, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":570
+ * 
+ * class _Dimension(object):
+ *     def __init__(self, dimname, dim, dimlens, dimtotlen):             # <<<<<<<<<<<<<<
+ *         self.dimlens = dimlens
+ *         self.dimtotlen = dimtotlen
+ */
+  __pyx_tuple__147 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_dimname, __pyx_n_s_dim, __pyx_n_s_dimlens, __pyx_n_s_dimtotlen); if (unlikely(!__pyx_tuple__147)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__147);
+  __Pyx_GIVEREF(__pyx_tuple__147);
+  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_init, 570, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":574
+ *         self.dimtotlen = dimtotlen
+ *         self._name = dimname
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self.dimtotlen
+ *     def isunlimited(self):
+ */
+  __pyx_tuple__149 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__149)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__149);
+  __Pyx_GIVEREF(__pyx_tuple__149);
+  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_len, 574, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":576
+ *     def __len__(self):
+ *         return self.dimtotlen
+ *     def isunlimited(self):             # <<<<<<<<<<<<<<
+ *         return True
+ *     def __repr__(self):
+ */
+  __pyx_tuple__151 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__151)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__151);
+  __Pyx_GIVEREF(__pyx_tuple__151);
+  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_isunlimited, 576, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":578
+ *     def isunlimited(self):
+ *         return True
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if self.isunlimited():
+ *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
+ */
+  __pyx_tuple__153 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__153)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__153);
+  __Pyx_GIVEREF(__pyx_tuple__153);
+  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_repr, 578, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":585
+ * 
+ * class _Variable(object):
+ *     def __init__(self, dset, varname, var, recdimname):             # <<<<<<<<<<<<<<
+ *         self.dimensions = var.dimensions
+ *         self._dset = dset
+ */
+  __pyx_tuple__155 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_dset, __pyx_n_s_varname, __pyx_n_s_var, __pyx_n_s_recdimname, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__155)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__155);
+  __Pyx_GIVEREF(__pyx_tuple__155);
+  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_init, 585, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":598
+ *         for name, value in var.__dict__.items():
+ *             self.__dict__[name] = value
+ *     def typecode(self):             # <<<<<<<<<<<<<<
+ *         return self.dtype
+ *     def ncattrs(self):
+ */
+  __pyx_tuple__157 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__157)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__157);
+  __Pyx_GIVEREF(__pyx_tuple__157);
+  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_typecode, 598, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":600
+ *     def typecode(self):
+ *         return self.dtype
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         return self._mastervar.__dict__.keys()
+ *     def __getattr__(self,name):
+ */
+  __pyx_tuple__159 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__159)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__159);
+  __Pyx_GIVEREF(__pyx_tuple__159);
+  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_ncattrs, 600, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":602
+ *     def ncattrs(self):
+ *         return self._mastervar.__dict__.keys()
+ *     def __getattr__(self,name):             # <<<<<<<<<<<<<<
+ *         if name == 'shape': return self._shape()
+ *         if name == 'ndim': return len(self._shape())
+ */
+  __pyx_tuple__161 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__161)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__161);
+  __Pyx_GIVEREF(__pyx_tuple__161);
+  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_getattr, 602, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":609
+ *         except:
+ *             raise AttributeError(name)
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         ncdump_var = ['%r\n' % type(self)]
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
+ */
+  __pyx_tuple__163 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_ncdump_var, __pyx_n_s_dimnames, __pyx_n_s_attrs, __pyx_n_s_unlimdims, __pyx_n_s_dimname, __pyx_n_s_dim, __pyx_n_s_name); if (unlikely(!__pyx_tuple__163)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__163);
+  __Pyx_GIVEREF(__pyx_tuple__163);
+  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_repr, 609, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":625
+ *         ncdump_var.append('current size = %s\n' % repr(self.shape))
+ *         return ''.join(ncdump_var)
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self._shape()[0]
+ *     def _shape(self):
+ */
+  __pyx_tuple__165 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__165)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__165);
+  __Pyx_GIVEREF(__pyx_tuple__165);
+  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_len, 625, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":627
+ *     def __len__(self):
+ *         return self._shape()[0]
+ *     def _shape(self):             # <<<<<<<<<<<<<<
+ *         recdimlen = len(self._dset.dimensions[self._recdimname])
+ *         return (recdimlen,) + self._mastervar.shape[1:]
+ */
+  __pyx_tuple__167 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_recdimlen); if (unlikely(!__pyx_tuple__167)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__167);
+  __Pyx_GIVEREF(__pyx_tuple__167);
+  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_shape_2, 627, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":630
+ *         recdimlen = len(self._dset.dimensions[self._recdimname])
+ *         return (recdimlen,) + self._mastervar.shape[1:]
+ *     def set_auto_maskandscale(self,val):             # <<<<<<<<<<<<<<
+ *         for v in self._recVar:
+ *             v.set_auto_maskandscale(val)
+ */
+  __pyx_tuple__169 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_val, __pyx_n_s_v); if (unlikely(!__pyx_tuple__169)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__169);
+  __Pyx_GIVEREF(__pyx_tuple__169);
+  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_set_auto_maskandscale, 630, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":633
+ *         for v in self._recVar:
+ *             v.set_auto_maskandscale(val)
+ *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
+ *         """Get records from a concatenated set of variables."""
+ * 
+ */
+  __pyx_tuple__171 = PyTuple_Pack(30, __pyx_n_s_self, __pyx_n_s_elem, __pyx_n_s_start, __pyx_n_s_count, __pyx_n_s_stride, __pyx_n_s_put_ind, __pyx_n_s_datashape, __pyx_n_s_data, __pyx_n_s_squeeze, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_strt, __pyx_n_s_cnt, __pyx_n_s_strd, __pyx_n_s_nv, __pyx_n_s_ind, __pyx_n_s_sta, __pyx_n_s_step, __pyx_n_s_stop, __pyx_n_s_idx, __pyx_n_s_vid, __pyx_n_s_k, __pyx_n_s_lst, __pyx_n_s_newSlice, __pyx_n_s_s_2, __pyx_n_s_lstArr, __pyx_n_s_ismasked, __pyx_n_s_dat,  [...]
+  __Pyx_GOTREF(__pyx_tuple__171);
+  __Pyx_GIVEREF(__pyx_tuple__171);
+  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(2, 0, 30, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_getitem, 633, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "utils.pyx":773
+ *     """
+ * 
+ *     def __init__(self, time, units=None):             # <<<<<<<<<<<<<<
+ *         """
+ * Create a time Variable with units consistent across a multifile
+ */
+  __pyx_tuple__173 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_time, __pyx_n_s_units, __pyx_n_s_datetime, __pyx_n_s_name, __pyx_n_s_value, __pyx_n_s_t, __pyx_n_s_ref_date, __pyx_n_s_ref_num, __pyx_n_s_i0, __pyx_n_s_i1, __pyx_n_s_i, __pyx_n_s_v, __pyx_n_s_n, __pyx_n_s_num); if (unlikely(!__pyx_tuple__173)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__173);
+  __Pyx_GIVEREF(__pyx_tuple__173);
+  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_init, 773, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__175 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__175)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__175);
+  __Pyx_GIVEREF(__pyx_tuple__175);
+
+  /* "utils.pyx":819
+ * 
+ * 
+ *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
+ *         return self.__time[elem] + self.__delta[elem]
+ */
+  __pyx_tuple__176 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__176)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__176);
+  __Pyx_GIVEREF(__pyx_tuple__176);
+  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_getitem, 819, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":838
+ * # check for required version of netcdf-4 and hdf5.
+ * 
+ * def _gethdf5libversion():             # <<<<<<<<<<<<<<
+ *     majorvers = H5_VERS_MAJOR
+ *     minorvers = H5_VERS_MINOR
+ */
+  __pyx_tuple__178 = PyTuple_Pack(4, __pyx_n_s_majorvers, __pyx_n_s_minorvers, __pyx_n_s_releasevers, __pyx_n_s_patchstring); if (unlikely(!__pyx_tuple__178)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__178);
+  __Pyx_GIVEREF(__pyx_tuple__178);
+  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python_2, __pyx_n_s_gethdf5libversion, 838, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":884
+ *                      'f8':NC_FILL_DOUBLE}
+ * 
+ * is_native_little = numpy.dtype('<f4').byteorder == '='             # <<<<<<<<<<<<<<
+ * is_native_big = numpy.dtype('>f4').byteorder == '='
+ * 
+ */
+  __pyx_tuple__180 = PyTuple_Pack(1, __pyx_kp_s_f4_2); if (unlikely(!__pyx_tuple__180)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__180);
+  __Pyx_GIVEREF(__pyx_tuple__180);
+
+  /* "netCDF4.pyx":885
+ * 
+ * is_native_little = numpy.dtype('<f4').byteorder == '='
+ * is_native_big = numpy.dtype('>f4').byteorder == '='             # <<<<<<<<<<<<<<
+ * 
+ * # hard code this here, instead of importing from netcdf.h
+ */
+  __pyx_tuple__181 = PyTuple_Pack(1, __pyx_kp_s_f4_3); if (unlikely(!__pyx_tuple__181)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__181);
+  __Pyx_GIVEREF(__pyx_tuple__181);
+
+  /* "netCDF4.pyx":985
+ *             return value_arr
+ * 
+ * def _set_default_format(object format='NETCDF4'):             # <<<<<<<<<<<<<<
+ *     # Private function to set the netCDF file format
+ *     if format == 'NETCDF4':
+ */
+  __pyx_tuple__182 = PyTuple_Pack(1, __pyx_n_s_format); if (unlikely(!__pyx_tuple__182)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__182);
+  __Pyx_GIVEREF(__pyx_tuple__182);
+  __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python_2, __pyx_n_s_set_default_format, 985, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_RefNannyFinishContext();
+  return 0;
+  __pyx_L1_error:;
+  __Pyx_RefNannyFinishContext();
+  return -1;
+}
+
+static int __Pyx_InitGlobals(void) {
+  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_float_24_ = PyFloat_FromDouble(24.); if (unlikely(!__pyx_float_24_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_float_1_e3 = PyFloat_FromDouble(1.e3); if (unlikely(!__pyx_float_1_e3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_float_1_e6 = PyFloat_FromDouble(1.e6); if (unlikely(!__pyx_float_1_e6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_float_3600_ = PyFloat_FromDouble(3600.); if (unlikely(!__pyx_float_3600_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_float_86400_ = PyFloat_FromDouble(86400.); if (unlikely(!__pyx_float_86400_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_24 = PyInt_FromLong(24); if (unlikely(!__pyx_int_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_1582 = PyInt_FromLong(1582); if (unlikely(!__pyx_int_1582)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_1900 = PyInt_FromLong(1900); if (unlikely(!__pyx_int_1900)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_3600 = PyInt_FromLong(3600); if (unlikely(!__pyx_int_3600)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  return 0;
+  __pyx_L1_error:;
+  return -1;
+}
+
+#if PY_MAJOR_VERSION < 3
+PyMODINIT_FUNC initnetCDF4(void); /*proto*/
+PyMODINIT_FUNC initnetCDF4(void)
+#else
+PyMODINIT_FUNC PyInit_netCDF4(void); /*proto*/
+PyMODINIT_FUNC PyInit_netCDF4(void)
+#endif
+{
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_t_6;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  PyObject *__pyx_t_12 = NULL;
+  PyObject *__pyx_t_13 = NULL;
+  PyObject *__pyx_t_14 = NULL;
+  int __pyx_t_15;
+  Py_ssize_t __pyx_t_16;
+  PyObject *(*__pyx_t_17)(PyObject *);
+  PyObject *(*__pyx_t_18)(PyObject *);
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannyDeclarations
+  #if CYTHON_REFNANNY
+  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+  if (!__Pyx_RefNanny) {
+      PyErr_Clear();
+      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+      if (!__Pyx_RefNanny)
+          Py_FatalError("failed to import 'refnanny' module");
+  }
+  #endif
+  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_netCDF4(void)", 0);
+  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #ifdef __Pyx_CyFunction_USED
+  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  #ifdef __Pyx_FusedFunction_USED
+  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  #ifdef __Pyx_Generator_USED
+  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  /*--- Library function declarations ---*/
+  /*--- Threads initialization code ---*/
+  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
+  #ifdef WITH_THREAD /* Python build with threading support? */
+  PyEval_InitThreads();
+  #endif
+  #endif
+  /*--- Module creation code ---*/
+  #if PY_MAJOR_VERSION < 3
+  __pyx_m = Py_InitModule4("netCDF4", __pyx_methods, __pyx_k_Introduction_Python_interface_t, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+  #else
+  __pyx_m = PyModule_Create(&__pyx_moduledef);
+  #endif
+  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  Py_INCREF(__pyx_d);
+  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if CYTHON_COMPILING_IN_PYPY
+  Py_INCREF(__pyx_b);
+  #endif
+  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  /*--- Initialize various global constants etc. ---*/
+  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  if (__pyx_module_is_main_netCDF4) {
+    if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  }
+  #if PY_MAJOR_VERSION >= 3
+  {
+    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!PyDict_GetItemString(modules, "netCDF4")) {
+      if (unlikely(PyDict_SetItemString(modules, "netCDF4", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+  #endif
+  /*--- Builtin init code ---*/
+  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Constants init code ---*/
+  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Global init code ---*/
+  /*--- Variable export code ---*/
+  /*--- Function export code ---*/
+  /*--- Type init code ---*/
+  __pyx_ptype_7netCDF4_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_7netCDF4_ndarray)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_7netCDF4_Dataset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_7netCDF4_Dataset.tp_print = 0;
+  if (PyObject_SetAttrString(__pyx_m, "Dataset", (PyObject *)&__pyx_type_7netCDF4_Dataset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_type_7netCDF4_Dataset.tp_weaklistoffset == 0) __pyx_type_7netCDF4_Dataset.tp_weaklistoffset = offsetof(struct __pyx_obj_7netCDF4_Dataset, __weakref__);
+  __pyx_ptype_7netCDF4_Dataset = &__pyx_type_7netCDF4_Dataset;
+  __pyx_type_7netCDF4_Group.tp_base = __pyx_ptype_7netCDF4_Dataset;
+  if (PyType_Ready(&__pyx_type_7netCDF4_Group) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_7netCDF4_Group.tp_print = 0;
+  if (PyObject_SetAttrString(__pyx_m, "Group", (PyObject *)&__pyx_type_7netCDF4_Group) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_type_7netCDF4_Group.tp_weaklistoffset == 0) __pyx_type_7netCDF4_Group.tp_weaklistoffset = offsetof(struct __pyx_obj_7netCDF4_Group, __pyx_base.__weakref__);
+  __pyx_ptype_7netCDF4_Group = &__pyx_type_7netCDF4_Group;
+  if (PyType_Ready(&__pyx_type_7netCDF4_Dimension) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_7netCDF4_Dimension.tp_print = 0;
+  if (PyObject_SetAttrString(__pyx_m, "Dimension", (PyObject *)&__pyx_type_7netCDF4_Dimension) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_7netCDF4_Dimension = &__pyx_type_7netCDF4_Dimension;
+  if (PyType_Ready(&__pyx_type_7netCDF4_Variable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_7netCDF4_Variable.tp_print = 0;
+  if (PyObject_SetAttrString(__pyx_m, "Variable", (PyObject *)&__pyx_type_7netCDF4_Variable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_7netCDF4_Variable = &__pyx_type_7netCDF4_Variable;
+  if (PyType_Ready(&__pyx_type_7netCDF4_CompoundType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_7netCDF4_CompoundType.tp_print = 0;
+  if (PyObject_SetAttrString(__pyx_m, "CompoundType", (PyObject *)&__pyx_type_7netCDF4_CompoundType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_7netCDF4_CompoundType = &__pyx_type_7netCDF4_CompoundType;
+  if (PyType_Ready(&__pyx_type_7netCDF4_VLType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_7netCDF4_VLType.tp_print = 0;
+  if (PyObject_SetAttrString(__pyx_m, "VLType", (PyObject *)&__pyx_type_7netCDF4_VLType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_7netCDF4_VLType = &__pyx_type_7netCDF4_VLType;
+  /*--- Type import code ---*/
+  /*--- Variable import code ---*/
+  /*--- Function import code ---*/
+  /*--- Execution code ---*/
+
+  /* "netCDF4.pyx":792
+ * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE."""
+ * __test__ = None             # <<<<<<<<<<<<<<
+ * del __test__ # hack so epydoc doesn't show __test__
+ * 
+ */
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":793
+ * PERFORMANCE OF THIS SOFTWARE."""
+ * __test__ = None
+ * del __test__ # hack so epydoc doesn't show __test__             # <<<<<<<<<<<<<<
+ * 
+ * # Make changes to this file, not the c-wrappers that Pyrex generates.
+ */
+  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_test) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":798
+ * 
+ * # pure python utilities
+ * from netCDF4_utils import _StartCountStride, _quantize, _find_dim, _walk_grps, \             # <<<<<<<<<<<<<<
+ *                           _out_array_shape, _sortbylist, _tostr
+ * # try to use built-in ordered dict in python >= 2.7
+ */
+  __pyx_t_1 = PyList_New(7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_n_s_StartCountStride);
+  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_StartCountStride);
+  __Pyx_GIVEREF(__pyx_n_s_StartCountStride);
+  __Pyx_INCREF(__pyx_n_s_quantize);
+  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_quantize);
+  __Pyx_GIVEREF(__pyx_n_s_quantize);
+  __Pyx_INCREF(__pyx_n_s_find_dim);
+  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_find_dim);
+  __Pyx_GIVEREF(__pyx_n_s_find_dim);
+  __Pyx_INCREF(__pyx_n_s_walk_grps);
+  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_walk_grps);
+  __Pyx_GIVEREF(__pyx_n_s_walk_grps);
+  __Pyx_INCREF(__pyx_n_s_out_array_shape);
+  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_out_array_shape);
+  __Pyx_GIVEREF(__pyx_n_s_out_array_shape);
+  __Pyx_INCREF(__pyx_n_s_sortbylist);
+  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_sortbylist);
+  __Pyx_GIVEREF(__pyx_n_s_sortbylist);
+  __Pyx_INCREF(__pyx_n_s_tostr);
+  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_tostr);
+  __Pyx_GIVEREF(__pyx_n_s_tostr);
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_netCDF4_utils, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_StartCountStride, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_quantize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_quantize, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_find_dim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_find_dim, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_walk_grps, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_out_array_shape, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sortbylist, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_tostr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tostr, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":801
+ *                           _out_array_shape, _sortbylist, _tostr
+ * # try to use built-in ordered dict in python >= 2.7
+ * try:             # <<<<<<<<<<<<<<
+ *     from collections import OrderedDict
+ * except ImportError: # or else use drop-in substitute
+ */
+  {
+    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
+    __Pyx_XGOTREF(__pyx_t_3);
+    __Pyx_XGOTREF(__pyx_t_4);
+    __Pyx_XGOTREF(__pyx_t_5);
+    /*try:*/ {
+
+      /* "netCDF4.pyx":802
+ * # try to use built-in ordered dict in python >= 2.7
+ * try:
+ *     from collections import OrderedDict             # <<<<<<<<<<<<<<
+ * except ImportError: # or else use drop-in substitute
+ *     try:
+ */
+      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_n_s_OrderedDict);
+      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_OrderedDict);
+      __Pyx_GIVEREF(__pyx_n_s_OrderedDict);
+      __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      if (PyDict_SetItem(__pyx_d, __pyx_n_s_OrderedDict, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    }
+    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+    goto __pyx_L9_try_end;
+    __pyx_L2_error:;
+    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "netCDF4.pyx":803
+ * try:
+ *     from collections import OrderedDict
+ * except ImportError: # or else use drop-in substitute             # <<<<<<<<<<<<<<
+ *     try:
+ *         from ordereddict import OrderedDict
+ */
+    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_ImportError);
+    if (__pyx_t_6) {
+      __Pyx_AddTraceback("netCDF4", __pyx_clineno, __pyx_lineno, __pyx_filename);
+      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_GOTREF(__pyx_t_7);
+
+      /* "netCDF4.pyx":804
+ *     from collections import OrderedDict
+ * except ImportError: # or else use drop-in substitute
+ *     try:             # <<<<<<<<<<<<<<
+ *         from ordereddict import OrderedDict
+ *     except ImportError:
+ */
+      {
+        __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
+        __Pyx_XGOTREF(__pyx_t_8);
+        __Pyx_XGOTREF(__pyx_t_9);
+        __Pyx_XGOTREF(__pyx_t_10);
+        /*try:*/ {
+
+          /* "netCDF4.pyx":805
+ * except ImportError: # or else use drop-in substitute
+ *     try:
+ *         from ordereddict import OrderedDict             # <<<<<<<<<<<<<<
+ *     except ImportError:
+ *         raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)')
+ */
+          __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
+          __Pyx_GOTREF(__pyx_t_11);
+          __Pyx_INCREF(__pyx_n_s_OrderedDict);
+          PyList_SET_ITEM(__pyx_t_11, 0, __pyx_n_s_OrderedDict);
+          __Pyx_GIVEREF(__pyx_n_s_OrderedDict);
+          __pyx_t_12 = __Pyx_Import(__pyx_n_s_ordereddict, __pyx_t_11, -1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+          __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_12, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
+          __Pyx_GOTREF(__pyx_t_11);
+          if (PyDict_SetItem(__pyx_d, __pyx_n_s_OrderedDict, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
+          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        }
+        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+        goto __pyx_L19_try_end;
+        __pyx_L12_error:;
+        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+
+        /* "netCDF4.pyx":806
+ *     try:
+ *         from ordereddict import OrderedDict
+ *     except ImportError:             # <<<<<<<<<<<<<<
+ *         raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)')
+ * try:
+ */
+        __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_ImportError);
+        if (__pyx_t_6) {
+          __Pyx_AddTraceback("netCDF4", __pyx_clineno, __pyx_lineno, __pyx_filename);
+          if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_11, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          __Pyx_GOTREF(__pyx_t_11);
+          __Pyx_GOTREF(__pyx_t_13);
+
+          /* "netCDF4.pyx":807
+ *         from ordereddict import OrderedDict
+ *     except ImportError:
+ *         raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)')             # <<<<<<<<<<<<<<
+ * try:
+ *     from itertools import izip as zip
+ */
+          __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          __Pyx_Raise(__pyx_t_14, 0, 0, 0);
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
+        }
+        goto __pyx_L14_except_error;
+        __pyx_L14_except_error:;
+        __Pyx_XGIVEREF(__pyx_t_8);
+        __Pyx_XGIVEREF(__pyx_t_9);
+        __Pyx_XGIVEREF(__pyx_t_10);
+        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
+        goto __pyx_L4_except_error;
+        __pyx_L19_try_end:;
+      }
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      goto __pyx_L3_exception_handled;
+    }
+    goto __pyx_L4_except_error;
+    __pyx_L4_except_error:;
+    __Pyx_XGIVEREF(__pyx_t_3);
+    __Pyx_XGIVEREF(__pyx_t_4);
+    __Pyx_XGIVEREF(__pyx_t_5);
+    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
+    goto __pyx_L1_error;
+    __pyx_L3_exception_handled:;
+    __Pyx_XGIVEREF(__pyx_t_3);
+    __Pyx_XGIVEREF(__pyx_t_4);
+    __Pyx_XGIVEREF(__pyx_t_5);
+    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
+    __pyx_L9_try_end:;
+  }
+
+  /* "netCDF4.pyx":808
+ *     except ImportError:
+ *         raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)')
+ * try:             # <<<<<<<<<<<<<<
+ *     from itertools import izip as zip
+ * except ImportError:
+ */
+  {
+    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
+    __Pyx_XGOTREF(__pyx_t_5);
+    __Pyx_XGOTREF(__pyx_t_4);
+    __Pyx_XGOTREF(__pyx_t_3);
+    /*try:*/ {
+
+      /* "netCDF4.pyx":809
+ *         raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)')
+ * try:
+ *     from itertools import izip as zip             # <<<<<<<<<<<<<<
+ * except ImportError:
+ *     # python3: zip is already python2's itertools.izip
+ */
+      __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_INCREF(__pyx_n_s_izip);
+      PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_izip);
+      __Pyx_GIVEREF(__pyx_n_s_izip);
+      __pyx_t_2 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_7, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_izip); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+      __Pyx_GOTREF(__pyx_t_7);
+      if (PyDict_SetItem(__pyx_d, __pyx_n_s_zip, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    }
+    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+    goto __pyx_L29_try_end;
+    __pyx_L22_error:;
+    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+    /* "netCDF4.pyx":810
+ * try:
+ *     from itertools import izip as zip
+ * except ImportError:             # <<<<<<<<<<<<<<
+ *     # python3: zip is already python2's itertools.izip
+ *     pass
+ */
+    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_ImportError);
+    if (__pyx_t_6) {
+      PyErr_Restore(0,0,0);
+      goto __pyx_L23_exception_handled;
+    }
+    goto __pyx_L24_except_error;
+    __pyx_L24_except_error:;
+    __Pyx_XGIVEREF(__pyx_t_5);
+    __Pyx_XGIVEREF(__pyx_t_4);
+    __Pyx_XGIVEREF(__pyx_t_3);
+    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
+    goto __pyx_L1_error;
+    __pyx_L23_exception_handled:;
+    __Pyx_XGIVEREF(__pyx_t_5);
+    __Pyx_XGIVEREF(__pyx_t_4);
+    __Pyx_XGIVEREF(__pyx_t_3);
+    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
+    __pyx_L29_try_end:;
+  }
+
+  /* "netCDF4.pyx":814
+ *     pass
+ * 
+ * __version__ = "1.1.4"             # <<<<<<<<<<<<<<
+ * 
+ * # Initialize numpy
+ */
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_1_1_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":817
+ * 
+ * # Initialize numpy
+ * import posixpath             # <<<<<<<<<<<<<<
+ * import netcdftime
+ * import numpy
+ */
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_posixpath, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_posixpath, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":818
+ * # Initialize numpy
+ * import posixpath
+ * import netcdftime             # <<<<<<<<<<<<<<
+ * import numpy
+ * import weakref
+ */
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_netcdftime, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_netcdftime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":819
+ * import posixpath
+ * import netcdftime
+ * import numpy             # <<<<<<<<<<<<<<
+ * import weakref
+ * import sys
+ */
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":820
+ * import netcdftime
+ * import numpy
+ * import weakref             # <<<<<<<<<<<<<<
+ * import sys
+ * import warnings
+ */
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_weakref, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_weakref, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":821
+ * import numpy
+ * import weakref
+ * import sys             # <<<<<<<<<<<<<<
+ * import warnings
+ * from glob import glob
+ */
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":822
+ * import weakref
+ * import sys
+ * import warnings             # <<<<<<<<<<<<<<
+ * from glob import glob
+ * from numpy import ma
+ */
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_warnings, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":823
+ * import sys
+ * import warnings
+ * from glob import glob             # <<<<<<<<<<<<<<
+ * from numpy import ma
+ * from numpy import __version__ as _npversion
+ */
+  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(__pyx_n_s_glob);
+  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_glob);
+  __Pyx_GIVEREF(__pyx_n_s_glob);
+  __pyx_t_7 = __Pyx_Import(__pyx_n_s_glob, __pyx_t_2, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_glob); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_glob, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "netCDF4.pyx":824
+ * import warnings
+ * from glob import glob
+ * from numpy import ma             # <<<<<<<<<<<<<<
+ * from numpy import __version__ as _npversion
+ * if _npversion.split('.')[0] < '1':
+ */
+  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_INCREF(__pyx_n_s_ma);
+  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_ma);
+  __Pyx_GIVEREF(__pyx_n_s_ma);
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, __pyx_t_7, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ma); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ma, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":825
+ * from glob import glob
+ * from numpy import ma
+ * from numpy import __version__ as _npversion             # <<<<<<<<<<<<<<
+ * if _npversion.split('.')[0] < '1':
+ *     raise ImportError('requires numpy version 1.0rc1 or later')
+ */
+  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(__pyx_n_s_version);
+  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_version);
+  __Pyx_GIVEREF(__pyx_n_s_version);
+  __pyx_t_7 = __Pyx_Import(__pyx_n_s_numpy, __pyx_t_2, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_npversion, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "netCDF4.pyx":826
+ * from numpy import ma
+ * from numpy import __version__ as _npversion
+ * if _npversion.split('.')[0] < '1':             # <<<<<<<<<<<<<<
+ *     raise ImportError('requires numpy version 1.0rc1 or later')
+ * import_array()
+ */
+  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_npversion); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__117, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_1, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  if (__pyx_t_15) {
+
+    /* "netCDF4.pyx":827
+ * from numpy import __version__ as _npversion
+ * if _npversion.split('.')[0] < '1':
+ *     raise ImportError('requires numpy version 1.0rc1 or later')             # <<<<<<<<<<<<<<
+ * import_array()
+ * include "netCDF4.pxi"
+ */
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__118, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4.pyx":828
+ * if _npversion.split('.')[0] < '1':
+ *     raise ImportError('requires numpy version 1.0rc1 or later')
+ * import_array()             # <<<<<<<<<<<<<<
+ * include "netCDF4.pxi"
+ * # include pure python utility functions and MFDataset class.
+ */
+  import_array();
+
+  /* "utils.pyx":1
+ * from datetime import timedelta, datetime             # <<<<<<<<<<<<<<
+ * 
+ * gregorian = datetime(1582,10,15)
+ */
+  __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_INCREF(__pyx_n_s_timedelta);
+  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_timedelta);
+  __Pyx_GIVEREF(__pyx_n_s_timedelta);
+  __Pyx_INCREF(__pyx_n_s_datetime);
+  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_datetime);
+  __Pyx_GIVEREF(__pyx_n_s_datetime);
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_7, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_timedelta); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_timedelta, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "utils.pyx":3
+ * from datetime import timedelta, datetime
+ * 
+ * gregorian = datetime(1582,10,15)             # <<<<<<<<<<<<<<
+ * 
+ * def _dateparse(timestr):
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__119, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gregorian, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "utils.pyx":5
+ * gregorian = datetime(1582,10,15)
+ * 
+ * def _dateparse(timestr):             # <<<<<<<<<<<<<<
+ *     """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss,
+ *     return a datetime instance"""
+ */
+  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_1_dateparse, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_dateparse, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "utils.pyx":28
+ * # utility functions (visible from python).
+ * 
+ * def stringtoarr(string,NUMCHARS,dtype='S'):             # <<<<<<<<<<<<<<
+ *     """
+ * stringtoarr(a, NUMCHARS,dtype='S')
+ */
+  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_3stringtoarr, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtoarr, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "utils.pyx":51
+ *     return arr
+ * 
+ * def stringtochar(a):             # <<<<<<<<<<<<<<
+ *     """
+ * stringtochar(a)
+ */
+  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_5stringtochar, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtochar, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "utils.pyx":70
+ *     return b
+ * 
+ * def chartostring(b):             # <<<<<<<<<<<<<<
+ *     """
+ * chartostring(b)
+ */
+  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_7chartostring, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chartostring, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "utils.pyx":91
+ *     return a
+ * 
+ * def date2num(dates,units,calendar='standard'):             # <<<<<<<<<<<<<<
+ *     """
+ * date2num(dates,units,calendar='standard')
+ */
+  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_9date2num, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2num, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "utils.pyx":168
+ *         return cdftime.date2num(dates)
+ * 
+ * def num2date(times,units,calendar='standard'):             # <<<<<<<<<<<<<<
+ *     """
+ * num2date(times,units,calendar='standard')
+ */
+  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_11num2date, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_num2date, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "utils.pyx":260
+ *         return cdftime.num2date(times)
+ * 
+ * def date2index(dates, nctime, calendar=None, select='exact'):             # <<<<<<<<<<<<<<
+ *     """
+ * date2index(dates, nctime, calendar=None, select='exact')
+ */
+  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_13date2index, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2index, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "utils.pyx":308
+ *         return netcdftime.date2index(dates, nctime, calendar, select)
+ * 
+ * def getlibversion():             # <<<<<<<<<<<<<<
+ *     """
+ * getlibversion()
+ */
+  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_15getlibversion, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getlibversion, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "utils.pyx":317
+ *     return (<char *>nc_inq_libvers()).decode('ascii')
+ * 
+ * class MFDataset(Dataset):             # <<<<<<<<<<<<<<
+ *     """
+ * MFDataset(self, files, check=False, aggdim=None, exclude=[])
+ */
+  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dataset)));
+  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dataset)));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dataset)));
+  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_n_s_MFDataset, __pyx_n_s_MFDataset, (PyObject *) NULL, __pyx_n_s_netCDF4, __pyx_kp_s_MFDataset_self_files_check_Fals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+
+  /* "utils.pyx":349
+ *     """
+ * 
+ *     def __init__(self, files, check=False, aggdim=None, exclude=[]):             # <<<<<<<<<<<<<<
+ *         """
+ * Open a Dataset spanning multiple files, making it look as if it was a
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9MFDataset_1__init__, 0, __pyx_n_s_MFDataset___init, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_13, sizeof(__pyx_defaults), 1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_13)->__pyx_arg_exclude = __pyx_t_11;
+  __Pyx_GIVEREF(__pyx_t_11);
+  __pyx_t_11 = 0;
+  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_13, __pyx_pf_7netCDF4_9MFDataset_12__defaults__);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":527
+ *         self._path = '/'
+ * 
+ *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
+ *         """override base class attribute creation"""
+ *         self.__dict__[name] = value
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9MFDataset_3__setattr__, 0, __pyx_n_s_MFDataset___setattr, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_setattr, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":531
+ *         self.__dict__[name] = value
+ * 
+ *     def __getattribute__(self, name):             # <<<<<<<<<<<<<<
+ *         if name in ['variables','dimensions','file_format','groups',\
+ *                     'data_model','disk_format','path']:
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9MFDataset_5__getattribute__, 0, __pyx_n_s_MFDataset___getattribute, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getattribute, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":544
+ *             return Dataset.__getattribute__(self, name)
+ * 
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         return self._cdf[0].__dict__.keys()
+ * 
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9MFDataset_7ncattrs, 0, __pyx_n_s_MFDataset_ncattrs, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ncattrs, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":547
+ *         return self._cdf[0].__dict__.keys()
+ * 
+ *     def close(self):             # <<<<<<<<<<<<<<
+ *         for dset in self._cdf:
+ *             dset.close()
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9MFDataset_9close, 0, __pyx_n_s_MFDataset_close, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_close, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":551
+ *             dset.close()
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         ncdump = ['%r\n' % type(self)]
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9MFDataset_11__repr__, 0, __pyx_n_s_MFDataset___repr, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":317
+ *     return (<char *>nc_inq_libvers()).decode('ascii')
+ * 
+ * class MFDataset(Dataset):             # <<<<<<<<<<<<<<
+ *     """
+ * MFDataset(self, files, check=False, aggdim=None, exclude=[])
+ */
+  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_MFDataset, __pyx_t_7, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFDataset, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "utils.pyx":569
+ *         return ''.join(ncdump)
+ * 
+ * class _Dimension(object):             # <<<<<<<<<<<<<<
+ *     def __init__(self, dimname, dim, dimlens, dimtotlen):
+ *         self.dimlens = dimlens
+ */
+  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_INCREF(__pyx_builtin_object);
+  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_builtin_object);
+  __Pyx_GIVEREF(__pyx_builtin_object);
+  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_n_s_Dimension, __pyx_n_s_Dimension, (PyObject *) NULL, __pyx_n_s_netCDF4, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+
+  /* "utils.pyx":570
+ * 
+ * class _Dimension(object):
+ *     def __init__(self, dimname, dim, dimlens, dimtotlen):             # <<<<<<<<<<<<<<
+ *         self.dimlens = dimlens
+ *         self.dimtotlen = dimtotlen
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_10_Dimension_1__init__, 0, __pyx_n_s_Dimension___init, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":574
+ *         self.dimtotlen = dimtotlen
+ *         self._name = dimname
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self.dimtotlen
+ *     def isunlimited(self):
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_10_Dimension_3__len__, 0, __pyx_n_s_Dimension___len, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_len, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":576
+ *     def __len__(self):
+ *         return self.dimtotlen
+ *     def isunlimited(self):             # <<<<<<<<<<<<<<
+ *         return True
+ *     def __repr__(self):
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_10_Dimension_5isunlimited, 0, __pyx_n_s_Dimension_isunlimited, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_isunlimited, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":578
+ *     def isunlimited(self):
+ *         return True
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if self.isunlimited():
+ *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_10_Dimension_7__repr__, 0, __pyx_n_s_Dimension___repr, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":569
+ *         return ''.join(ncdump)
+ * 
+ * class _Dimension(object):             # <<<<<<<<<<<<<<
+ *     def __init__(self, dimname, dim, dimlens, dimtotlen):
+ *         self.dimlens = dimlens
+ */
+  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Dimension, __pyx_t_7, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Dimension, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "utils.pyx":584
+ *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
+ * 
+ * class _Variable(object):             # <<<<<<<<<<<<<<
+ *     def __init__(self, dset, varname, var, recdimname):
+ *         self.dimensions = var.dimensions
+ */
+  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_INCREF(__pyx_builtin_object);
+  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_builtin_object);
+  __Pyx_GIVEREF(__pyx_builtin_object);
+  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_n_s_Variable, __pyx_n_s_Variable, (PyObject *) NULL, __pyx_n_s_netCDF4, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+
+  /* "utils.pyx":585
+ * 
+ * class _Variable(object):
+ *     def __init__(self, dset, varname, var, recdimname):             # <<<<<<<<<<<<<<
+ *         self.dimensions = var.dimensions
+ *         self._dset = dset
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9_Variable_1__init__, 0, __pyx_n_s_Variable___init, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":598
+ *         for name, value in var.__dict__.items():
+ *             self.__dict__[name] = value
+ *     def typecode(self):             # <<<<<<<<<<<<<<
+ *         return self.dtype
+ *     def ncattrs(self):
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9_Variable_3typecode, 0, __pyx_n_s_Variable_typecode, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_typecode, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":600
+ *     def typecode(self):
+ *         return self.dtype
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         return self._mastervar.__dict__.keys()
+ *     def __getattr__(self,name):
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9_Variable_5ncattrs, 0, __pyx_n_s_Variable_ncattrs, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ncattrs, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":602
+ *     def ncattrs(self):
+ *         return self._mastervar.__dict__.keys()
+ *     def __getattr__(self,name):             # <<<<<<<<<<<<<<
+ *         if name == 'shape': return self._shape()
+ *         if name == 'ndim': return len(self._shape())
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9_Variable_7__getattr__, 0, __pyx_n_s_Variable___getattr, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getattr, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":609
+ *         except:
+ *             raise AttributeError(name)
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         ncdump_var = ['%r\n' % type(self)]
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9_Variable_9__repr__, 0, __pyx_n_s_Variable___repr, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":625
+ *         ncdump_var.append('current size = %s\n' % repr(self.shape))
+ *         return ''.join(ncdump_var)
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self._shape()[0]
+ *     def _shape(self):
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9_Variable_11__len__, 0, __pyx_n_s_Variable___len, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_len, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":627
+ *     def __len__(self):
+ *         return self._shape()[0]
+ *     def _shape(self):             # <<<<<<<<<<<<<<
+ *         recdimlen = len(self._dset.dimensions[self._recdimname])
+ *         return (recdimlen,) + self._mastervar.shape[1:]
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9_Variable_13_shape, 0, __pyx_n_s_Variable__shape, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_shape_2, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":630
+ *         recdimlen = len(self._dset.dimensions[self._recdimname])
+ *         return (recdimlen,) + self._mastervar.shape[1:]
+ *     def set_auto_maskandscale(self,val):             # <<<<<<<<<<<<<<
+ *         for v in self._recVar:
+ *             v.set_auto_maskandscale(val)
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9_Variable_15set_auto_maskandscale, 0, __pyx_n_s_Variable_set_auto_maskandscale, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_set_auto_maskandscale, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":633
+ *         for v in self._recVar:
+ *             v.set_auto_maskandscale(val)
+ *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
+ *         """Get records from a concatenated set of variables."""
+ * 
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9_Variable_17__getitem__, 0, __pyx_n_s_Variable___getitem, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getitem, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":584
+ *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
+ * 
+ * class _Variable(object):             # <<<<<<<<<<<<<<
+ *     def __init__(self, dset, varname, var, recdimname):
+ *         self.dimensions = var.dimensions
+ */
+  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Variable, __pyx_t_7, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Variable, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "utils.pyx":737
+ * 
+ * 
+ * class MFTime(_Variable):             # <<<<<<<<<<<<<<
+ *     """
+ * MFTime(self, time, units=None)
+ */
+  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Variable); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
+  __Pyx_GIVEREF(__pyx_t_7);
+  __pyx_t_7 = 0;
+  __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_2, __pyx_n_s_MFTime, __pyx_n_s_MFTime, (PyObject *) NULL, __pyx_n_s_netCDF4, __pyx_kp_s_MFTime_self_time_units_None_Cla); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+
+  /* "utils.pyx":773
+ *     """
+ * 
+ *     def __init__(self, time, units=None):             # <<<<<<<<<<<<<<
+ *         """
+ * Create a time Variable with units consistent across a multifile
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_6MFTime_1__init__, 0, __pyx_n_s_MFTime___init, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_13, __pyx_tuple__175);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":819
+ * 
+ * 
+ *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
+ *         return self.__time[elem] + self.__delta[elem]
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_6MFTime_3__getitem__, 0, __pyx_n_s_MFTime___getitem, NULL, __pyx_n_s_netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getitem, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "utils.pyx":737
+ * 
+ * 
+ * class MFTime(_Variable):             # <<<<<<<<<<<<<<
+ *     """
+ * MFTime(self, time, units=None)
+ */
+  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_MFTime, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFTime, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":838
+ * # check for required version of netcdf-4 and hdf5.
+ * 
+ * def _gethdf5libversion():             # <<<<<<<<<<<<<<
+ *     majorvers = H5_VERS_MAJOR
+ *     minorvers = H5_VERS_MINOR
+ */
+  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_17_gethdf5libversion, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gethdf5libversion, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":848
+ *        return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
+ * 
+ * __netcdf4libversion__ = getlibversion().split()[0]             # <<<<<<<<<<<<<<
+ * __hdf5libversion__ = _gethdf5libversion()
+ * __has_rename_grp__ = HAS_RENAME_GRP
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_getlibversion); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_13 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_13)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_13);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+    }
+  }
+  if (__pyx_t_13) {
+    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_13); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+  } else {
+    __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __pyx_t_7 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_7)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_7);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+    }
+  }
+  if (__pyx_t_7) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  } else {
+    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_netcdf4libversion, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":849
+ * 
+ * __netcdf4libversion__ = getlibversion().split()[0]
+ * __hdf5libversion__ = _gethdf5libversion()             # <<<<<<<<<<<<<<
+ * __has_rename_grp__ = HAS_RENAME_GRP
+ * __has_nc_inq_path__ = HAS_NC_INQ_PATH
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_gethdf5libversion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_7 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_7)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_7);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (__pyx_t_7) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_hdf5libversion, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":850
+ * __netcdf4libversion__ = getlibversion().split()[0]
+ * __hdf5libversion__ = _gethdf5libversion()
+ * __has_rename_grp__ = HAS_RENAME_GRP             # <<<<<<<<<<<<<<
+ * __has_nc_inq_path__ = HAS_NC_INQ_PATH
+ * __has_nc_inq_format_extended__ = HAS_NC_INQ_FORMAT_EXTENDED
+ */
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_rename_grp, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":851
+ * __hdf5libversion__ = _gethdf5libversion()
+ * __has_rename_grp__ = HAS_RENAME_GRP
+ * __has_nc_inq_path__ = HAS_NC_INQ_PATH             # <<<<<<<<<<<<<<
+ * __has_nc_inq_format_extended__ = HAS_NC_INQ_FORMAT_EXTENDED
+ * 
+ */
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_nc_inq_path, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":852
+ * __has_rename_grp__ = HAS_RENAME_GRP
+ * __has_nc_inq_path__ = HAS_NC_INQ_PATH
+ * __has_nc_inq_format_extended__ = HAS_NC_INQ_FORMAT_EXTENDED             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_nc_inq_format_extended, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":857
+ * # numpy data type <--> netCDF 4 data type mapping.
+ * 
+ * _nptonctype  = {'U1' : NC_CHAR,             # <<<<<<<<<<<<<<
+ *                 'S1' : NC_CHAR,
+ *                 'i1' : NC_BYTE,
+ */
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_From_int(NC_CHAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_U1, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":858
+ * 
+ * _nptonctype  = {'U1' : NC_CHAR,
+ *                 'S1' : NC_CHAR,             # <<<<<<<<<<<<<<
+ *                 'i1' : NC_BYTE,
+ *                 'u1' : NC_UBYTE,
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_int(NC_CHAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_S1, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":859
+ * _nptonctype  = {'U1' : NC_CHAR,
+ *                 'S1' : NC_CHAR,
+ *                 'i1' : NC_BYTE,             # <<<<<<<<<<<<<<
+ *                 'u1' : NC_UBYTE,
+ *                 'i2' : NC_SHORT,
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_int(NC_BYTE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i1, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":860
+ *                 'S1' : NC_CHAR,
+ *                 'i1' : NC_BYTE,
+ *                 'u1' : NC_UBYTE,             # <<<<<<<<<<<<<<
+ *                 'i2' : NC_SHORT,
+ *                 'u2' : NC_USHORT,
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_int(NC_UBYTE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u1, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":861
+ *                 'i1' : NC_BYTE,
+ *                 'u1' : NC_UBYTE,
+ *                 'i2' : NC_SHORT,             # <<<<<<<<<<<<<<
+ *                 'u2' : NC_USHORT,
+ *                 'i4' : NC_INT,
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_int(NC_SHORT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":862
+ *                 'u1' : NC_UBYTE,
+ *                 'i2' : NC_SHORT,
+ *                 'u2' : NC_USHORT,             # <<<<<<<<<<<<<<
+ *                 'i4' : NC_INT,
+ *                 'u4' : NC_UINT,
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_int(NC_USHORT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":863
+ *                 'i2' : NC_SHORT,
+ *                 'u2' : NC_USHORT,
+ *                 'i4' : NC_INT,             # <<<<<<<<<<<<<<
+ *                 'u4' : NC_UINT,
+ *                 'i8' : NC_INT64,
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_int(NC_INT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":864
+ *                 'u2' : NC_USHORT,
+ *                 'i4' : NC_INT,
+ *                 'u4' : NC_UINT,             # <<<<<<<<<<<<<<
+ *                 'i8' : NC_INT64,
+ *                 'u8' : NC_UINT64,
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_int(NC_UINT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":865
+ *                 'i4' : NC_INT,
+ *                 'u4' : NC_UINT,
+ *                 'i8' : NC_INT64,             # <<<<<<<<<<<<<<
+ *                 'u8' : NC_UINT64,
+ *                 'f4' : NC_FLOAT,
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_int(NC_INT64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":866
+ *                 'u4' : NC_UINT,
+ *                 'i8' : NC_INT64,
+ *                 'u8' : NC_UINT64,             # <<<<<<<<<<<<<<
+ *                 'f4' : NC_FLOAT,
+ *                 'f8' : NC_DOUBLE}
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_int(NC_UINT64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":867
+ *                 'i8' : NC_INT64,
+ *                 'u8' : NC_UINT64,
+ *                 'f4' : NC_FLOAT,             # <<<<<<<<<<<<<<
+ *                 'f8' : NC_DOUBLE}
+ * 
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_int(NC_FLOAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":868
+ *                 'u8' : NC_UINT64,
+ *                 'f4' : NC_FLOAT,
+ *                 'f8' : NC_DOUBLE}             # <<<<<<<<<<<<<<
+ * 
+ * default_fillvals = {#'S1':NC_FILL_CHAR,
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_int(NC_DOUBLE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nptonctype, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":870
+ *                 'f8' : NC_DOUBLE}
+ * 
+ * default_fillvals = {#'S1':NC_FILL_CHAR,             # <<<<<<<<<<<<<<
+ *                      'U1':'\0',
+ *                      'S1':'\0',
+ */
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_U1, __pyx_kp_s__25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_S1, __pyx_kp_s__25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":873
+ *                      'U1':'\0',
+ *                      'S1':'\0',
+ *                      'i1':NC_FILL_BYTE,             # <<<<<<<<<<<<<<
+ *                      'u1':NC_FILL_UBYTE,
+ *                      'i2':NC_FILL_SHORT,
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_int(NC_FILL_BYTE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i1, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":874
+ *                      'S1':'\0',
+ *                      'i1':NC_FILL_BYTE,
+ *                      'u1':NC_FILL_UBYTE,             # <<<<<<<<<<<<<<
+ *                      'i2':NC_FILL_SHORT,
+ *                      'u2':NC_FILL_USHORT,
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_int(NC_FILL_UBYTE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u1, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":875
+ *                      'i1':NC_FILL_BYTE,
+ *                      'u1':NC_FILL_UBYTE,
+ *                      'i2':NC_FILL_SHORT,             # <<<<<<<<<<<<<<
+ *                      'u2':NC_FILL_USHORT,
+ *                      'i4':NC_FILL_INT,
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_int(NC_FILL_SHORT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":876
+ *                      'u1':NC_FILL_UBYTE,
+ *                      'i2':NC_FILL_SHORT,
+ *                      'u2':NC_FILL_USHORT,             # <<<<<<<<<<<<<<
+ *                      'i4':NC_FILL_INT,
+ *                      'u4':NC_FILL_UINT,
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_int(NC_FILL_USHORT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":877
+ *                      'i2':NC_FILL_SHORT,
+ *                      'u2':NC_FILL_USHORT,
+ *                      'i4':NC_FILL_INT,             # <<<<<<<<<<<<<<
+ *                      'u4':NC_FILL_UINT,
+ *                      'i8':NC_FILL_INT64,
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_long(NC_FILL_INT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":878
+ *                      'u2':NC_FILL_USHORT,
+ *                      'i4':NC_FILL_INT,
+ *                      'u4':NC_FILL_UINT,             # <<<<<<<<<<<<<<
+ *                      'i8':NC_FILL_INT64,
+ *                      'u8':NC_FILL_UINT64,
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_unsigned_long(NC_FILL_UINT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":879
+ *                      'i4':NC_FILL_INT,
+ *                      'u4':NC_FILL_UINT,
+ *                      'i8':NC_FILL_INT64,             # <<<<<<<<<<<<<<
+ *                      'u8':NC_FILL_UINT64,
+ *                      'f4':NC_FILL_FLOAT,
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_PY_LONG_LONG(NC_FILL_INT64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":880
+ *                      'u4':NC_FILL_UINT,
+ *                      'i8':NC_FILL_INT64,
+ *                      'u8':NC_FILL_UINT64,             # <<<<<<<<<<<<<<
+ *                      'f4':NC_FILL_FLOAT,
+ *                      'f8':NC_FILL_DOUBLE}
+ */
+  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(NC_FILL_UINT64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":881
+ *                      'i8':NC_FILL_INT64,
+ *                      'u8':NC_FILL_UINT64,
+ *                      'f4':NC_FILL_FLOAT,             # <<<<<<<<<<<<<<
+ *                      'f8':NC_FILL_DOUBLE}
+ * 
+ */
+  __pyx_t_2 = PyFloat_FromDouble(NC_FILL_FLOAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":882
+ *                      'u8':NC_FILL_UINT64,
+ *                      'f4':NC_FILL_FLOAT,
+ *                      'f8':NC_FILL_DOUBLE}             # <<<<<<<<<<<<<<
+ * 
+ * is_native_little = numpy.dtype('<f4').byteorder == '='
+ */
+  __pyx_t_2 = PyFloat_FromDouble(NC_FILL_DOUBLE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_fillvals, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":884
+ *                      'f8':NC_FILL_DOUBLE}
+ * 
+ * is_native_little = numpy.dtype('<f4').byteorder == '='             # <<<<<<<<<<<<<<
+ * is_native_big = numpy.dtype('>f4').byteorder == '='
+ * 
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__180, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s__51, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_native_little, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":885
+ * 
+ * is_native_little = numpy.dtype('<f4').byteorder == '='
+ * is_native_big = numpy.dtype('>f4').byteorder == '='             # <<<<<<<<<<<<<<
+ * 
+ * # hard code this here, instead of importing from netcdf.h
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__181, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s__51, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_native_big, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4.pyx":889
+ * # hard code this here, instead of importing from netcdf.h
+ * # so it will compile with versions <= 4.2.
+ * NC_DISKLESS = 0x0008             # <<<<<<<<<<<<<<
+ * # encoding used to convert strings to bytes when writing text data
+ * # to the netcdf file, and for converting bytes to strings when reading
+ */
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NC_DISKLESS, __pyx_int_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":893
+ * # to the netcdf file, and for converting bytes to strings when reading
+ * # from the netcdf file.
+ * default_encoding = 'utf-8'             # <<<<<<<<<<<<<<
+ * # unicode decode/encode error handling.  Replace bad chars with "?"
+ * # can be set to 'strict' or 'ignore'.
+ */
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_encoding, __pyx_kp_s_utf_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":896
+ * # unicode decode/encode error handling.  Replace bad chars with "?"
+ * # can be set to 'strict' or 'ignore'.
+ * unicode_error = 'replace'             # <<<<<<<<<<<<<<
+ * python3 = sys.version_info[0] > 2
+ * 
+ */
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_unicode_error, __pyx_n_s_replace) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4.pyx":897
+ * # can be set to 'strict' or 'ignore'.
+ * unicode_error = 'replace'
+ * python3 = sys.version_info[0] > 2             # <<<<<<<<<<<<<<
+ * 
+ * _nctonptype = {}
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_python3, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":899
+ * python3 = sys.version_info[0] > 2
+ * 
+ * _nctonptype = {}             # <<<<<<<<<<<<<<
+ * for _key,_value in _nptonctype.items():
+ *     _nctonptype[_value] = _key
+ */
+  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nctonptype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4.pyx":900
+ * 
+ * _nctonptype = {}
+ * for _key,_value in _nptonctype.items():             # <<<<<<<<<<<<<<
+ *     _nctonptype[_value] = _key
+ * _supportedtypes = _nptonctype.keys()
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_items); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
+    if (likely(__pyx_t_1)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+      __Pyx_INCREF(__pyx_t_1);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_7, function);
+    }
+  }
+  if (__pyx_t_1) {
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  } else {
+    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+    __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_16 = 0;
+    __pyx_t_17 = NULL;
+  } else {
+    __pyx_t_16 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_17 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  for (;;) {
+    if (likely(!__pyx_t_17)) {
+      if (likely(PyList_CheckExact(__pyx_t_7))) {
+        if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_7)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_16); __Pyx_INCREF(__pyx_t_2); __pyx_t_16++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_16 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_16); __Pyx_INCREF(__pyx_t_2); __pyx_t_16++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_2 = __pyx_t_17(__pyx_t_7);
+      if (unlikely(!__pyx_t_2)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+    }
+    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
+      PyObject* sequence = __pyx_t_2;
+      #if CYTHON_COMPILING_IN_CPYTHON
+      Py_ssize_t size = Py_SIZE(sequence);
+      #else
+      Py_ssize_t size = PySequence_Size(sequence);
+      #endif
+      if (unlikely(size != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      #if CYTHON_COMPILING_IN_CPYTHON
+      if (likely(PyTuple_CheckExact(sequence))) {
+        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
+        __pyx_t_13 = PyTuple_GET_ITEM(sequence, 1); 
+      } else {
+        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_13 = PyList_GET_ITEM(sequence, 1); 
+      }
+      __Pyx_INCREF(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_13);
+      #else
+      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_13 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_13);
+      #endif
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_18 = Py_TYPE(__pyx_t_11)->tp_iternext;
+      index = 0; __pyx_t_1 = __pyx_t_18(__pyx_t_11); if (unlikely(!__pyx_t_1)) goto __pyx_L33_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_1);
+      index = 1; __pyx_t_13 = __pyx_t_18(__pyx_t_11); if (unlikely(!__pyx_t_13)) goto __pyx_L33_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_13);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_18(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_18 = NULL;
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      goto __pyx_L34_unpacking_done;
+      __pyx_L33_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __pyx_t_18 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L34_unpacking_done:;
+    }
+    if (PyDict_SetItem(__pyx_d, __pyx_n_s_key, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (PyDict_SetItem(__pyx_d, __pyx_n_s_value_2, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+    /* "netCDF4.pyx":901
+ * _nctonptype = {}
+ * for _key,_value in _nptonctype.items():
+ *     _nctonptype[_value] = _key             # <<<<<<<<<<<<<<
+ * _supportedtypes = _nptonctype.keys()
+ * # make sure NC_CHAR points to S1
+ */
+    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_13);
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_value_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (unlikely(PyObject_SetItem(__pyx_t_13, __pyx_t_1, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+    /* "netCDF4.pyx":900
+ * 
+ * _nctonptype = {}
+ * for _key,_value in _nptonctype.items():             # <<<<<<<<<<<<<<
+ *     _nctonptype[_value] = _key
+ * _supportedtypes = _nptonctype.keys()
+ */
+  }
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "netCDF4.pyx":902
+ * for _key,_value in _nptonctype.items():
+ *     _nctonptype[_value] = _key
+ * _supportedtypes = _nptonctype.keys()             # <<<<<<<<<<<<<<
+ * # make sure NC_CHAR points to S1
+ * _nctonptype[NC_CHAR]='S1'
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_2)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+    }
+  }
+  if (__pyx_t_2) {
+    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  } else {
+    __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_supportedtypes, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "netCDF4.pyx":904
+ * _supportedtypes = _nptonctype.keys()
+ * # make sure NC_CHAR points to S1
+ * _nctonptype[NC_CHAR]='S1'             # <<<<<<<<<<<<<<
+ * 
+ * # internal C functions.
+ */
+  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (unlikely(__Pyx_SetItemInt(__pyx_t_7, NC_CHAR, __pyx_n_s_S1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "netCDF4.pyx":985
+ *             return value_arr
+ * 
+ * def _set_default_format(object format='NETCDF4'):             # <<<<<<<<<<<<<<
+ *     # Private function to set the netCDF file format
+ *     if format == 'NETCDF4':
+ */
+  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_19_set_default_format, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_default_format, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "netCDF4.pyx":1279
+ * 
+ * _private_atts =\
+ * ['_grpid','_grp','_varid','groups','dimensions','variables','dtype','data_model','disk_format',             # <<<<<<<<<<<<<<
+ *  '_nunlimdim','path','parent','ndim','mask','scale','cmptypes','vltypes','_isprimitive',
+ *  'file_format','_isvlen','_iscompound','_cmptype','_vltype','keepweakref','name']
+ */
+  __pyx_t_7 = PyList_New(25); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_INCREF(__pyx_n_s_grpid);
+  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_grpid);
+  __Pyx_GIVEREF(__pyx_n_s_grpid);
+  __Pyx_INCREF(__pyx_n_s_grp);
+  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_grp);
+  __Pyx_GIVEREF(__pyx_n_s_grp);
+  __Pyx_INCREF(__pyx_n_s_varid);
+  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_n_s_varid);
+  __Pyx_GIVEREF(__pyx_n_s_varid);
+  __Pyx_INCREF(__pyx_n_s_groups);
+  PyList_SET_ITEM(__pyx_t_7, 3, __pyx_n_s_groups);
+  __Pyx_GIVEREF(__pyx_n_s_groups);
+  __Pyx_INCREF(__pyx_n_s_dimensions);
+  PyList_SET_ITEM(__pyx_t_7, 4, __pyx_n_s_dimensions);
+  __Pyx_GIVEREF(__pyx_n_s_dimensions);
+  __Pyx_INCREF(__pyx_n_s_variables);
+  PyList_SET_ITEM(__pyx_t_7, 5, __pyx_n_s_variables);
+  __Pyx_GIVEREF(__pyx_n_s_variables);
+  __Pyx_INCREF(__pyx_n_s_dtype);
+  PyList_SET_ITEM(__pyx_t_7, 6, __pyx_n_s_dtype);
+  __Pyx_GIVEREF(__pyx_n_s_dtype);
+  __Pyx_INCREF(__pyx_n_s_data_model_2);
+  PyList_SET_ITEM(__pyx_t_7, 7, __pyx_n_s_data_model_2);
+  __Pyx_GIVEREF(__pyx_n_s_data_model_2);
+  __Pyx_INCREF(__pyx_n_s_disk_format_2);
+  PyList_SET_ITEM(__pyx_t_7, 8, __pyx_n_s_disk_format_2);
+  __Pyx_GIVEREF(__pyx_n_s_disk_format_2);
+  __Pyx_INCREF(__pyx_n_s_nunlimdim);
+  PyList_SET_ITEM(__pyx_t_7, 9, __pyx_n_s_nunlimdim);
+  __Pyx_GIVEREF(__pyx_n_s_nunlimdim);
+  __Pyx_INCREF(__pyx_n_s_path_2);
+  PyList_SET_ITEM(__pyx_t_7, 10, __pyx_n_s_path_2);
+  __Pyx_GIVEREF(__pyx_n_s_path_2);
+  __Pyx_INCREF(__pyx_n_s_parent);
+  PyList_SET_ITEM(__pyx_t_7, 11, __pyx_n_s_parent);
+  __Pyx_GIVEREF(__pyx_n_s_parent);
+  __Pyx_INCREF(__pyx_n_s_ndim);
+  PyList_SET_ITEM(__pyx_t_7, 12, __pyx_n_s_ndim);
+  __Pyx_GIVEREF(__pyx_n_s_ndim);
+  __Pyx_INCREF(__pyx_n_s_mask);
+  PyList_SET_ITEM(__pyx_t_7, 13, __pyx_n_s_mask);
+  __Pyx_GIVEREF(__pyx_n_s_mask);
+  __Pyx_INCREF(__pyx_n_s_scale);
+  PyList_SET_ITEM(__pyx_t_7, 14, __pyx_n_s_scale);
+  __Pyx_GIVEREF(__pyx_n_s_scale);
+  __Pyx_INCREF(__pyx_n_s_cmptypes);
+  PyList_SET_ITEM(__pyx_t_7, 15, __pyx_n_s_cmptypes);
+  __Pyx_GIVEREF(__pyx_n_s_cmptypes);
+  __Pyx_INCREF(__pyx_n_s_vltypes);
+  PyList_SET_ITEM(__pyx_t_7, 16, __pyx_n_s_vltypes);
+  __Pyx_GIVEREF(__pyx_n_s_vltypes);
+  __Pyx_INCREF(__pyx_n_s_isprimitive);
+  PyList_SET_ITEM(__pyx_t_7, 17, __pyx_n_s_isprimitive);
+  __Pyx_GIVEREF(__pyx_n_s_isprimitive);
+  __Pyx_INCREF(__pyx_n_s_file_format_2);
+  PyList_SET_ITEM(__pyx_t_7, 18, __pyx_n_s_file_format_2);
+  __Pyx_GIVEREF(__pyx_n_s_file_format_2);
+  __Pyx_INCREF(__pyx_n_s_isvlen);
+  PyList_SET_ITEM(__pyx_t_7, 19, __pyx_n_s_isvlen);
+  __Pyx_GIVEREF(__pyx_n_s_isvlen);
+  __Pyx_INCREF(__pyx_n_s_iscompound);
+  PyList_SET_ITEM(__pyx_t_7, 20, __pyx_n_s_iscompound);
+  __Pyx_GIVEREF(__pyx_n_s_iscompound);
+  __Pyx_INCREF(__pyx_n_s_cmptype);
+  PyList_SET_ITEM(__pyx_t_7, 21, __pyx_n_s_cmptype);
+  __Pyx_GIVEREF(__pyx_n_s_cmptype);
+  __Pyx_INCREF(__pyx_n_s_vltype);
+  PyList_SET_ITEM(__pyx_t_7, 22, __pyx_n_s_vltype);
+  __Pyx_GIVEREF(__pyx_n_s_vltype);
+  __Pyx_INCREF(__pyx_n_s_keepweakref);
+  PyList_SET_ITEM(__pyx_t_7, 23, __pyx_n_s_keepweakref);
+  __Pyx_GIVEREF(__pyx_n_s_keepweakref);
+  __Pyx_INCREF(__pyx_n_s_name);
+  PyList_SET_ITEM(__pyx_t_7, 24, __pyx_n_s_name);
+  __Pyx_GIVEREF(__pyx_n_s_name);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_private_atts, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "netCDF4.pyx":4131
+ *     return VLType(group, dt, name, typeid=xtype)
+ * 
+ * cdef _strencode(pystr,encoding=None):             # <<<<<<<<<<<<<<
+ *     # encode a string into bytes.  If already bytes, do nothing.
+ *     # uses default_encoding module variable for default encoding.
+ */
+
+  /*--- Wrapped vars code ---*/
+
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_XDECREF(__pyx_t_12);
+  __Pyx_XDECREF(__pyx_t_13);
+  __Pyx_XDECREF(__pyx_t_14);
+  if (__pyx_m) {
+    if (__pyx_d) {
+      __Pyx_AddTraceback("init netCDF4", __pyx_clineno, __pyx_lineno, __pyx_filename);
+    }
+    Py_DECREF(__pyx_m); __pyx_m = 0;
+  } else if (!PyErr_Occurred()) {
+    PyErr_SetString(PyExc_ImportError, "init netCDF4");
+  }
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  #if PY_MAJOR_VERSION < 3
+  return;
+  #else
+  return __pyx_m;
+  #endif
+}
+
+/* --- Runtime support code --- */
+#if CYTHON_REFNANNY
+static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
+    PyObject *m = NULL, *p = NULL;
+    void *r = NULL;
+    m = PyImport_ImportModule((char *)modname);
+    if (!m) goto end;
+    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
+    if (!p) goto end;
+    r = PyLong_AsVoidPtr(p);
+end:
+    Py_XDECREF(p);
+    Py_XDECREF(m);
+    return (__Pyx_RefNannyAPIStruct *)r;
+}
+#endif
+
+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+    if (unlikely(!result)) {
+        PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+            "name '%U' is not defined", name);
+#else
+            "name '%.200s' is not defined", PyString_AS_STRING(name));
+#endif
+    }
+    return result;
+}
+
+static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
+    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
+    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
+        PyErr_Format(PyExc_ImportError,
+        #if PY_MAJOR_VERSION < 3
+            "cannot import name %.230s", PyString_AS_STRING(name));
+        #else
+            "cannot import name %S", name);
+        #endif
+    }
+    return value;
+}
+
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    *type = tstate->exc_type;
+    *value = tstate->exc_value;
+    *tb = tstate->exc_traceback;
+    Py_XINCREF(*type);
+    Py_XINCREF(*value);
+    Py_XINCREF(*tb);
+#else
+    PyErr_GetExcInfo(type, value, tb);
+#endif
+}
+static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = type;
+    tstate->exc_value = value;
+    tstate->exc_traceback = tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_SetExcInfo(type, value, tb);
+#endif
+}
+
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
+    PyObject *local_type, *local_value, *local_tb;
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    local_type = tstate->curexc_type;
+    local_value = tstate->curexc_value;
+    local_tb = tstate->curexc_traceback;
+    tstate->curexc_type = 0;
+    tstate->curexc_value = 0;
+    tstate->curexc_traceback = 0;
+#else
+    PyErr_Fetch(&local_type, &local_value, &local_tb);
+#endif
+    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (unlikely(tstate->curexc_type))
+#else
+    if (unlikely(PyErr_Occurred()))
+#endif
+        goto bad;
+    #if PY_MAJOR_VERSION >= 3
+    if (local_tb) {
+        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+            goto bad;
+    }
+    #endif
+    Py_XINCREF(local_tb);
+    Py_XINCREF(local_type);
+    Py_XINCREF(local_value);
+    *type = local_type;
+    *value = local_value;
+    *tb = local_tb;
+#if CYTHON_COMPILING_IN_CPYTHON
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = local_type;
+    tstate->exc_value = local_value;
+    tstate->exc_traceback = local_tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_SetExcInfo(local_type, local_value, local_tb);
+#endif
+    return 0;
+bad:
+    *type = 0;
+    *value = 0;
+    *tb = 0;
+    Py_XDECREF(local_type);
+    Py_XDECREF(local_value);
+    Py_XDECREF(local_tb);
+    return -1;
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+    PyObject *result;
+    ternaryfunc call = func->ob_type->tp_call;
+    if (unlikely(!call))
+        return PyObject_Call(func, arg, kw);
+    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+        return NULL;
+    result = (*call)(func, arg, kw);
+    Py_LeaveRecursiveCall();
+    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+        PyErr_SetString(
+            PyExc_SystemError,
+            "NULL result without error in PyObject_Call");
+    }
+    return result;
+}
+#endif
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    tmp_type = tstate->curexc_type;
+    tmp_value = tstate->curexc_value;
+    tmp_tb = tstate->curexc_traceback;
+    tstate->curexc_type = type;
+    tstate->curexc_value = value;
+    tstate->curexc_traceback = tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_Restore(type, value, tb);
+#endif
+}
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    *type = tstate->curexc_type;
+    *value = tstate->curexc_value;
+    *tb = tstate->curexc_traceback;
+    tstate->curexc_type = 0;
+    tstate->curexc_value = 0;
+    tstate->curexc_traceback = 0;
+#else
+    PyErr_Fetch(type, value, tb);
+#endif
+}
+
+#if PY_MAJOR_VERSION < 3
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
+                        CYTHON_UNUSED PyObject *cause) {
+    Py_XINCREF(type);
+    if (!value || value == Py_None)
+        value = NULL;
+    else
+        Py_INCREF(value);
+    if (!tb || tb == Py_None)
+        tb = NULL;
+    else {
+        Py_INCREF(tb);
+        if (!PyTraceBack_Check(tb)) {
+            PyErr_SetString(PyExc_TypeError,
+                "raise: arg 3 must be a traceback or None");
+            goto raise_error;
+        }
+    }
+    if (PyType_Check(type)) {
+#if CYTHON_COMPILING_IN_PYPY
+        if (!value) {
+            Py_INCREF(Py_None);
+            value = Py_None;
+        }
+#endif
+        PyErr_NormalizeException(&type, &value, &tb);
+    } else {
+        if (value) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto raise_error;
+        }
+        value = type;
+        type = (PyObject*) Py_TYPE(type);
+        Py_INCREF(type);
+        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
+            PyErr_SetString(PyExc_TypeError,
+                "raise: exception class must be a subclass of BaseException");
+            goto raise_error;
+        }
+    }
+    __Pyx_ErrRestore(type, value, tb);
+    return;
+raise_error:
+    Py_XDECREF(value);
+    Py_XDECREF(type);
+    Py_XDECREF(tb);
+    return;
+}
+#else
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
+    PyObject* owned_instance = NULL;
+    if (tb == Py_None) {
+        tb = 0;
+    } else if (tb && !PyTraceBack_Check(tb)) {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: arg 3 must be a traceback or None");
+        goto bad;
+    }
+    if (value == Py_None)
+        value = 0;
+    if (PyExceptionInstance_Check(type)) {
+        if (value) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto bad;
+        }
+        value = type;
+        type = (PyObject*) Py_TYPE(value);
+    } else if (PyExceptionClass_Check(type)) {
+        PyObject *instance_class = NULL;
+        if (value && PyExceptionInstance_Check(value)) {
+            instance_class = (PyObject*) Py_TYPE(value);
+            if (instance_class != type) {
+                if (PyObject_IsSubclass(instance_class, type)) {
+                    type = instance_class;
+                } else {
+                    instance_class = NULL;
+                }
+            }
+        }
+        if (!instance_class) {
+            PyObject *args;
+            if (!value)
+                args = PyTuple_New(0);
+            else if (PyTuple_Check(value)) {
+                Py_INCREF(value);
+                args = value;
+            } else
+                args = PyTuple_Pack(1, value);
+            if (!args)
+                goto bad;
+            owned_instance = PyObject_Call(type, args, NULL);
+            Py_DECREF(args);
+            if (!owned_instance)
+                goto bad;
+            value = owned_instance;
+            if (!PyExceptionInstance_Check(value)) {
+                PyErr_Format(PyExc_TypeError,
+                             "calling %R should have returned an instance of "
+                             "BaseException, not %R",
+                             type, Py_TYPE(value));
+                goto bad;
+            }
+        }
+    } else {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: exception class must be a subclass of BaseException");
+        goto bad;
+    }
+#if PY_VERSION_HEX >= 0x03030000
+    if (cause) {
+#else
+    if (cause && cause != Py_None) {
+#endif
+        PyObject *fixed_cause;
+        if (cause == Py_None) {
+            fixed_cause = NULL;
+        } else if (PyExceptionClass_Check(cause)) {
+            fixed_cause = PyObject_CallObject(cause, NULL);
+            if (fixed_cause == NULL)
+                goto bad;
+        } else if (PyExceptionInstance_Check(cause)) {
+            fixed_cause = cause;
+            Py_INCREF(fixed_cause);
+        } else {
+            PyErr_SetString(PyExc_TypeError,
+                            "exception causes must derive from "
+                            "BaseException");
+            goto bad;
+        }
+        PyException_SetCause(value, fixed_cause);
+    }
+    PyErr_SetObject(type, value);
+    if (tb) {
+#if CYTHON_COMPILING_IN_PYPY
+        PyObject *tmp_type, *tmp_value, *tmp_tb;
+        PyErr_Fetch(tmp_type, tmp_value, tmp_tb);
+        Py_INCREF(tb);
+        PyErr_Restore(tmp_type, tmp_value, tb);
+        Py_XDECREF(tmp_tb);
+#else
+        PyThreadState *tstate = PyThreadState_GET();
+        PyObject* tmp_tb = tstate->curexc_traceback;
+        if (tb != tmp_tb) {
+            Py_INCREF(tb);
+            tstate->curexc_traceback = tb;
+            Py_XDECREF(tmp_tb);
+        }
+#endif
+    }
+bad:
+    Py_XDECREF(owned_instance);
+    return;
+}
+#endif
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
+    PyObject *self, *result;
+    PyCFunction cfunc;
+    cfunc = PyCFunction_GET_FUNCTION(func);
+    self = PyCFunction_GET_SELF(func);
+    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+        return NULL;
+    result = cfunc(self, arg);
+    Py_LeaveRecursiveCall();
+    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+        PyErr_SetString(
+            PyExc_SystemError,
+            "NULL result without error in PyObject_Call");
+    }
+    return result;
+}
+#endif
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+    PyObject *result;
+    PyObject *args = PyTuple_New(1);
+    if (unlikely(!args)) return NULL;
+    Py_INCREF(arg);
+    PyTuple_SET_ITEM(args, 0, arg);
+    result = __Pyx_PyObject_Call(func, args, NULL);
+    Py_DECREF(args);
+    return result;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+#ifdef __Pyx_CyFunction_USED
+    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
+#else
+    if (likely(PyCFunction_Check(func))) {
+#endif
+        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
+            return __Pyx_PyObject_CallMethO(func, arg);
+        }
+    }
+    return __Pyx__PyObject_CallOneArg(func, arg);
+}
+#else
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+    PyObject* args = PyTuple_Pack(1, arg);
+    return (likely(args)) ? __Pyx_PyObject_Call(func, args, NULL) : NULL;
+}
+#endif
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
+#ifdef __Pyx_CyFunction_USED
+    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
+#else
+    if (likely(PyCFunction_Check(func))) {
+#endif
+        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
+            return __Pyx_PyObject_CallMethO(func, NULL);
+        }
+    }
+    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
+}
+#endif
+
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+    PyObject *r;
+    if (!j) return NULL;
+    r = PyObject_GetItem(o, j);
+    Py_DECREF(j);
+    return r;
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
+    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
+        PyObject *r = PyList_GET_ITEM(o, i);
+        Py_INCREF(r);
+        return r;
+    }
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+    return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
+    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
+        PyObject *r = PyTuple_GET_ITEM(o, i);
+        Py_INCREF(r);
+        return r;
+    }
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+    return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                                     int is_list, int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (is_list || PyList_CheckExact(o)) {
+        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
+        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
+            PyObject *r = PyList_GET_ITEM(o, n);
+            Py_INCREF(r);
+            return r;
+        }
+    }
+    else if (PyTuple_CheckExact(o)) {
+        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
+        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
+            PyObject *r = PyTuple_GET_ITEM(o, n);
+            Py_INCREF(r);
+            return r;
+        }
+    } else {
+        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+        if (likely(m && m->sq_item)) {
+            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+                Py_ssize_t l = m->sq_length(o);
+                if (likely(l >= 0)) {
+                    i += l;
+                } else {
+                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
+                        PyErr_Clear();
+                    else
+                        return NULL;
+                }
+            }
+            return m->sq_item(o, i);
+        }
+    }
+#else
+    if (is_list || PySequence_Check(o)) {
+        return PySequence_GetItem(o, i);
+    }
+#endif
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+}
+
+static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
+#if CYTHON_COMPILING_IN_PYPY
+    return PyObject_RichCompareBool(s1, s2, equals);
+#else
+    if (s1 == s2) {
+        return (equals == Py_EQ);
+    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
+        const char *ps1, *ps2;
+        Py_ssize_t length = PyBytes_GET_SIZE(s1);
+        if (length != PyBytes_GET_SIZE(s2))
+            return (equals == Py_NE);
+        ps1 = PyBytes_AS_STRING(s1);
+        ps2 = PyBytes_AS_STRING(s2);
+        if (ps1[0] != ps2[0]) {
+            return (equals == Py_NE);
+        } else if (length == 1) {
+            return (equals == Py_EQ);
+        } else {
+            int result = memcmp(ps1, ps2, (size_t)length);
+            return (equals == Py_EQ) ? (result == 0) : (result != 0);
+        }
+    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
+        return (equals == Py_NE);
+    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
+        return (equals == Py_NE);
+    } else {
+        int result;
+        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
+        if (!py_result)
+            return -1;
+        result = __Pyx_PyObject_IsTrue(py_result);
+        Py_DECREF(py_result);
+        return result;
+    }
+#endif
+}
+
+static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
+#if CYTHON_COMPILING_IN_PYPY
+    return PyObject_RichCompareBool(s1, s2, equals);
+#else
+#if PY_MAJOR_VERSION < 3
+    PyObject* owned_ref = NULL;
+#endif
+    int s1_is_unicode, s2_is_unicode;
+    if (s1 == s2) {
+        goto return_eq;
+    }
+    s1_is_unicode = PyUnicode_CheckExact(s1);
+    s2_is_unicode = PyUnicode_CheckExact(s2);
+#if PY_MAJOR_VERSION < 3
+    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
+        owned_ref = PyUnicode_FromObject(s2);
+        if (unlikely(!owned_ref))
+            return -1;
+        s2 = owned_ref;
+        s2_is_unicode = 1;
+    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
+        owned_ref = PyUnicode_FromObject(s1);
+        if (unlikely(!owned_ref))
+            return -1;
+        s1 = owned_ref;
+        s1_is_unicode = 1;
+    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
+        return __Pyx_PyBytes_Equals(s1, s2, equals);
+    }
+#endif
+    if (s1_is_unicode & s2_is_unicode) {
+        Py_ssize_t length;
+        int kind;
+        void *data1, *data2;
+        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
+            return -1;
+        length = __Pyx_PyUnicode_GET_LENGTH(s1);
+        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
+            goto return_ne;
+        }
+        kind = __Pyx_PyUnicode_KIND(s1);
+        if (kind != __Pyx_PyUnicode_KIND(s2)) {
+            goto return_ne;
+        }
+        data1 = __Pyx_PyUnicode_DATA(s1);
+        data2 = __Pyx_PyUnicode_DATA(s2);
+        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
+            goto return_ne;
+        } else if (length == 1) {
+            goto return_eq;
+        } else {
+            int result = memcmp(data1, data2, (size_t)(length * kind));
+            #if PY_MAJOR_VERSION < 3
+            Py_XDECREF(owned_ref);
+            #endif
+            return (equals == Py_EQ) ? (result == 0) : (result != 0);
+        }
+    } else if ((s1 == Py_None) & s2_is_unicode) {
+        goto return_ne;
+    } else if ((s2 == Py_None) & s1_is_unicode) {
+        goto return_ne;
+    } else {
+        int result;
+        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
+        if (!py_result)
+            return -1;
+        result = __Pyx_PyObject_IsTrue(py_result);
+        Py_DECREF(py_result);
+        return result;
+    }
+return_eq:
+    #if PY_MAJOR_VERSION < 3
+    Py_XDECREF(owned_ref);
+    #endif
+    return (equals == Py_EQ);
+return_ne:
+    #if PY_MAJOR_VERSION < 3
+    Py_XDECREF(owned_ref);
+    #endif
+    return (equals == Py_NE);
+#endif
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
+        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
+        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
+        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyMappingMethods* mp;
+#if PY_MAJOR_VERSION < 3
+    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
+    if (likely(ms && ms->sq_slice)) {
+        if (!has_cstart) {
+            if (_py_start && (*_py_start != Py_None)) {
+                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
+                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
+            } else
+                cstart = 0;
+        }
+        if (!has_cstop) {
+            if (_py_stop && (*_py_stop != Py_None)) {
+                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
+                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
+            } else
+                cstop = PY_SSIZE_T_MAX;
+        }
+        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
+            Py_ssize_t l = ms->sq_length(obj);
+            if (likely(l >= 0)) {
+                if (cstop < 0) {
+                    cstop += l;
+                    if (cstop < 0) cstop = 0;
+                }
+                if (cstart < 0) {
+                    cstart += l;
+                    if (cstart < 0) cstart = 0;
+                }
+            } else {
+                if (PyErr_ExceptionMatches(PyExc_OverflowError))
+                    PyErr_Clear();
+                else
+                    goto bad;
+            }
+        }
+        return ms->sq_slice(obj, cstart, cstop);
+    }
+#endif
+    mp = Py_TYPE(obj)->tp_as_mapping;
+    if (likely(mp && mp->mp_subscript))
+#endif
+    {
+        PyObject* result;
+        PyObject *py_slice, *py_start, *py_stop;
+        if (_py_slice) {
+            py_slice = *_py_slice;
+        } else {
+            PyObject* owned_start = NULL;
+            PyObject* owned_stop = NULL;
+            if (_py_start) {
+                py_start = *_py_start;
+            } else {
+                if (has_cstart) {
+                    owned_start = py_start = PyInt_FromSsize_t(cstart);
+                    if (unlikely(!py_start)) goto bad;
+                } else
+                    py_start = Py_None;
+            }
+            if (_py_stop) {
+                py_stop = *_py_stop;
+            } else {
+                if (has_cstop) {
+                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
+                    if (unlikely(!py_stop)) {
+                        Py_XDECREF(owned_start);
+                        goto bad;
+                    }
+                } else
+                    py_stop = Py_None;
+            }
+            py_slice = PySlice_New(py_start, py_stop, Py_None);
+            Py_XDECREF(owned_start);
+            Py_XDECREF(owned_stop);
+            if (unlikely(!py_slice)) goto bad;
+        }
+#if CYTHON_COMPILING_IN_CPYTHON
+        result = mp->mp_subscript(obj, py_slice);
+#else
+        result = PyObject_GetItem(obj, py_slice);
+#endif
+        if (!_py_slice) {
+            Py_DECREF(py_slice);
+        }
+        return result;
+    }
+    PyErr_Format(PyExc_TypeError,
+        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
+bad:
+    return NULL;
+}
+
+static void __Pyx_RaiseArgtupleInvalid(
+    const char* func_name,
+    int exact,
+    Py_ssize_t num_min,
+    Py_ssize_t num_max,
+    Py_ssize_t num_found)
+{
+    Py_ssize_t num_expected;
+    const char *more_or_less;
+    if (num_found < num_min) {
+        num_expected = num_min;
+        more_or_less = "at least";
+    } else {
+        num_expected = num_max;
+        more_or_less = "at most";
+    }
+    if (exact) {
+        more_or_less = "exactly";
+    }
+    PyErr_Format(PyExc_TypeError,
+                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+                 func_name, more_or_less, num_expected,
+                 (num_expected == 1) ? "" : "s", num_found);
+}
+
+static void __Pyx_RaiseDoubleKeywordsError(
+    const char* func_name,
+    PyObject* kw_name)
+{
+    PyErr_Format(PyExc_TypeError,
+        #if PY_MAJOR_VERSION >= 3
+        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
+        #else
+        "%s() got multiple values for keyword argument '%s'", func_name,
+        PyString_AsString(kw_name));
+        #endif
+}
+
+static int __Pyx_ParseOptionalKeywords(
+    PyObject *kwds,
+    PyObject **argnames[],
+    PyObject *kwds2,
+    PyObject *values[],
+    Py_ssize_t num_pos_args,
+    const char* function_name)
+{
+    PyObject *key = 0, *value = 0;
+    Py_ssize_t pos = 0;
+    PyObject*** name;
+    PyObject*** first_kw_arg = argnames + num_pos_args;
+    while (PyDict_Next(kwds, &pos, &key, &value)) {
+        name = first_kw_arg;
+        while (*name && (**name != key)) name++;
+        if (*name) {
+            values[name-argnames] = value;
+            continue;
+        }
+        name = first_kw_arg;
+        #if PY_MAJOR_VERSION < 3
+        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
+            while (*name) {
+                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
+                        && _PyString_Eq(**name, key)) {
+                    values[name-argnames] = value;
+                    break;
+                }
+                name++;
+            }
+            if (*name) continue;
+            else {
+                PyObject*** argname = argnames;
+                while (argname != first_kw_arg) {
+                    if ((**argname == key) || (
+                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
+                             && _PyString_Eq(**argname, key))) {
+                        goto arg_passed_twice;
+                    }
+                    argname++;
+                }
+            }
+        } else
+        #endif
+        if (likely(PyUnicode_Check(key))) {
+            while (*name) {
+                int cmp = (**name == key) ? 0 :
+                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
+                #endif
+                    PyUnicode_Compare(**name, key);
+                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+                if (cmp == 0) {
+                    values[name-argnames] = value;
+                    break;
+                }
+                name++;
+            }
+            if (*name) continue;
+            else {
+                PyObject*** argname = argnames;
+                while (argname != first_kw_arg) {
+                    int cmp = (**argname == key) ? 0 :
+                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
+                    #endif
+                        PyUnicode_Compare(**argname, key);
+                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+                    if (cmp == 0) goto arg_passed_twice;
+                    argname++;
+                }
+            }
+        } else
+            goto invalid_keyword_type;
+        if (kwds2) {
+            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
+        } else {
+            goto invalid_keyword;
+        }
+    }
+    return 0;
+arg_passed_twice:
+    __Pyx_RaiseDoubleKeywordsError(function_name, key);
+    goto bad;
+invalid_keyword_type:
+    PyErr_Format(PyExc_TypeError,
+        "%.200s() keywords must be strings", function_name);
+    goto bad;
+invalid_keyword:
+    PyErr_Format(PyExc_TypeError,
+    #if PY_MAJOR_VERSION < 3
+        "%.200s() got an unexpected keyword argument '%.200s'",
+        function_name, PyString_AsString(key));
+    #else
+        "%s() got an unexpected keyword argument '%U'",
+        function_name, key);
+    #endif
+bad:
+    return -1;
+}
+
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
+    PyObject *result;
+#if CYTHON_COMPILING_IN_CPYTHON
+    result = PyDict_GetItem(__pyx_d, name);
+    if (likely(result)) {
+        Py_INCREF(result);
+    } else {
+#else
+    result = PyObject_GetItem(__pyx_d, name);
+    if (!result) {
+        PyErr_Clear();
+#endif
+        result = __Pyx_GetBuiltinName(name);
+    }
+    return result;
+}
+
+static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
+        PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
+        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
+        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyMappingMethods* mp;
+#if PY_MAJOR_VERSION < 3
+    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
+    if (likely(ms && ms->sq_ass_slice)) {
+        if (!has_cstart) {
+            if (_py_start && (*_py_start != Py_None)) {
+                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
+                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
+            } else
+                cstart = 0;
+        }
+        if (!has_cstop) {
+            if (_py_stop && (*_py_stop != Py_None)) {
+                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
+                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
+            } else
+                cstop = PY_SSIZE_T_MAX;
+        }
+        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
+            Py_ssize_t l = ms->sq_length(obj);
+            if (likely(l >= 0)) {
+                if (cstop < 0) {
+                    cstop += l;
+                    if (cstop < 0) cstop = 0;
+                }
+                if (cstart < 0) {
+                    cstart += l;
+                    if (cstart < 0) cstart = 0;
+                }
+            } else {
+                if (PyErr_ExceptionMatches(PyExc_OverflowError))
+                    PyErr_Clear();
+                else
+                    goto bad;
+            }
+        }
+        return ms->sq_ass_slice(obj, cstart, cstop, value);
+    }
+#endif
+    mp = Py_TYPE(obj)->tp_as_mapping;
+    if (likely(mp && mp->mp_ass_subscript))
+#endif
+    {
+        int result;
+        PyObject *py_slice, *py_start, *py_stop;
+        if (_py_slice) {
+            py_slice = *_py_slice;
+        } else {
+            PyObject* owned_start = NULL;
+            PyObject* owned_stop = NULL;
+            if (_py_start) {
+                py_start = *_py_start;
+            } else {
+                if (has_cstart) {
+                    owned_start = py_start = PyInt_FromSsize_t(cstart);
+                    if (unlikely(!py_start)) goto bad;
+                } else
+                    py_start = Py_None;
+            }
+            if (_py_stop) {
+                py_stop = *_py_stop;
+            } else {
+                if (has_cstop) {
+                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
+                    if (unlikely(!py_stop)) {
+                        Py_XDECREF(owned_start);
+                        goto bad;
+                    }
+                } else
+                    py_stop = Py_None;
+            }
+            py_slice = PySlice_New(py_start, py_stop, Py_None);
+            Py_XDECREF(owned_start);
+            Py_XDECREF(owned_stop);
+            if (unlikely(!py_slice)) goto bad;
+        }
+#if CYTHON_COMPILING_IN_CPYTHON
+        result = mp->mp_ass_subscript(obj, py_slice, value);
+#else
+        result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
+#endif
+        if (!_py_slice) {
+            Py_DECREF(py_slice);
+        }
+        return result;
+    }
+    PyErr_Format(PyExc_TypeError,
+        "'%.200s' object does not support slice %.10s",
+        Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion");
+bad:
+    return -1;
+}
+
+static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
+    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
+}
+
+static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
+#if CYTHON_COMPILING_IN_CPYTHON
+#if PY_MAJOR_VERSION >= 3
+    if (likely(PyUnicode_Check(n)))
+#else
+    if (likely(PyString_Check(n)))
+#endif
+        return __Pyx_PyObject_GetAttrStr(o, n);
+#endif
+    return PyObject_GetAttr(o, n);
+}
+
+static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
+    PyObject *r = __Pyx_GetAttr(o, n);
+    if (unlikely(!r)) {
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+            goto bad;
+        PyErr_Clear();
+        r = d;
+        Py_INCREF(d);
+    }
+    return r;
+bad:
+    return NULL;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
+         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
+         const char* encoding, const char* errors,
+         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
+    Py_ssize_t length;
+    if (unlikely((start < 0) | (stop < 0))) {
+        length = strlen(cstring);
+        if (start < 0) {
+            start += length;
+            if (start < 0)
+                start = 0;
+        }
+        if (stop < 0)
+            stop += length;
+    }
+    length = stop - start;
+    if (unlikely(length <= 0))
+        return PyUnicode_FromUnicode(NULL, 0);
+    cstring += start;
+    if (decode_func) {
+        return decode_func(cstring, length, errors);
+    } else {
+        return PyUnicode_Decode(cstring, length, encoding, errors);
+    }
+}
+
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
+    PyErr_Format(PyExc_ValueError,
+                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
+}
+
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+    PyErr_Format(PyExc_ValueError,
+                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
+                 index, (index == 1) ? "" : "s");
+}
+
+static CYTHON_INLINE int __Pyx_IterFinish(void) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    PyObject* exc_type = tstate->curexc_type;
+    if (unlikely(exc_type)) {
+        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
+            PyObject *exc_value, *exc_tb;
+            exc_value = tstate->curexc_value;
+            exc_tb = tstate->curexc_traceback;
+            tstate->curexc_type = 0;
+            tstate->curexc_value = 0;
+            tstate->curexc_traceback = 0;
+            Py_DECREF(exc_type);
+            Py_XDECREF(exc_value);
+            Py_XDECREF(exc_tb);
+            return 0;
+        } else {
+            return -1;
+        }
+    }
+    return 0;
+#else
+    if (unlikely(PyErr_Occurred())) {
+        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
+            PyErr_Clear();
+            return 0;
+        } else {
+            return -1;
+        }
+    }
+    return 0;
+#endif
+}
+
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
+    if (unlikely(retval)) {
+        Py_DECREF(retval);
+        __Pyx_RaiseTooManyValuesError(expected);
+        return -1;
+    } else {
+        return __Pyx_IterFinish();
+    }
+    return 0;
+}
+
+static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
+    PyObject *method, *result = NULL;
+    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
+    if (unlikely(!method)) goto bad;
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (likely(PyMethod_Check(method))) {
+        PyObject *self = PyMethod_GET_SELF(method);
+        if (likely(self)) {
+            PyObject *args;
+            PyObject *function = PyMethod_GET_FUNCTION(method);
+            args = PyTuple_New(2);
+            if (unlikely(!args)) goto bad;
+            Py_INCREF(self);
+            PyTuple_SET_ITEM(args, 0, self);
+            Py_INCREF(arg);
+            PyTuple_SET_ITEM(args, 1, arg);
+            Py_INCREF(function);
+            Py_DECREF(method); method = NULL;
+            result = __Pyx_PyObject_Call(function, args, NULL);
+            Py_DECREF(args);
+            Py_DECREF(function);
+            return result;
+        }
+    }
+#endif
+    result = __Pyx_PyObject_CallOneArg(method, arg);
+bad:
+    Py_XDECREF(method);
+    return result;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) {
+    if (PY_MAJOR_VERSION >= 3)
+        return __Pyx_PyObject_CallMethod1((PyObject*)&PyDict_Type, __pyx_n_s_keys, d);
+    else
+        return PyDict_Keys(d);
+}
+
+static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
+    if (likely(PyList_CheckExact(L))) {
+        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
+    } else {
+        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
+        if (unlikely(!retval))
+            return -1;
+        Py_DECREF(retval);
+    }
+    return 0;
+}
+
+#if !CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
+    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
+}
+#endif
+
+static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
+    int r;
+    if (!j) return -1;
+    r = PyObject_SetItem(o, j, v);
+    Py_DECREF(j);
+    return r;
+}
+static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
+                                               int is_list, int wraparound, int boundscheck) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (is_list || PyList_CheckExact(o)) {
+        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
+        if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
+            PyObject* old = PyList_GET_ITEM(o, n);
+            Py_INCREF(v);
+            PyList_SET_ITEM(o, n, v);
+            Py_DECREF(old);
+            return 1;
+        }
+    } else {
+        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+        if (likely(m && m->sq_ass_item)) {
+            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+                Py_ssize_t l = m->sq_length(o);
+                if (likely(l >= 0)) {
+                    i += l;
+                } else {
+                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
+                        PyErr_Clear();
+                    else
+                        return -1;
+                }
+            }
+            return m->sq_ass_item(o, i, v);
+        }
+    }
+#else
+#if CYTHON_COMPILING_IN_PYPY
+    if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
+#else
+    if (is_list || PySequence_Check(o)) {
+#endif
+        return PySequence_SetItem(o, i, v);
+    }
+#endif
+    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
+}
+
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
+    if (unlikely(!type)) {
+        PyErr_SetString(PyExc_SystemError, "Missing type object");
+        return 0;
+    }
+    if (likely(PyObject_TypeCheck(obj, type)))
+        return 1;
+    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
+                 Py_TYPE(obj)->tp_name, type->tp_name);
+    return 0;
+}
+
+static double __Pyx__PyObject_AsDouble(PyObject* obj) {
+    PyObject* float_value;
+#if CYTHON_COMPILING_IN_PYPY
+    float_value = PyNumber_Float(obj);
+#else
+    PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
+    if (likely(nb) && likely(nb->nb_float)) {
+        float_value = nb->nb_float(obj);
+        if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) {
+            PyErr_Format(PyExc_TypeError,
+                "__float__ returned non-float (type %.200s)",
+                Py_TYPE(float_value)->tp_name);
+            Py_DECREF(float_value);
+            goto bad;
+        }
+    } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
+#if PY_MAJOR_VERSION >= 3
+        float_value = PyFloat_FromString(obj);
+#else
+        float_value = PyFloat_FromString(obj, 0);
+#endif
+    } else {
+        PyObject* args = PyTuple_New(1);
+        if (unlikely(!args)) goto bad;
+        PyTuple_SET_ITEM(args, 0, obj);
+        float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
+        PyTuple_SET_ITEM(args, 0, 0);
+        Py_DECREF(args);
+    }
+#endif
+    if (likely(float_value)) {
+        double value = PyFloat_AS_DOUBLE(float_value);
+        Py_DECREF(float_value);
+        return value;
+    }
+bad:
+    return (double)-1;
+}
+
+static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
+    PyErr_Format(PyExc_TypeError,
+        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
+        name, type->tp_name, Py_TYPE(obj)->tp_name);
+}
+static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
+    const char *name, int exact)
+{
+    if (unlikely(!type)) {
+        PyErr_SetString(PyExc_SystemError, "Missing type object");
+        return 0;
+    }
+    if (none_allowed && obj == Py_None) return 1;
+    else if (exact) {
+        if (likely(Py_TYPE(obj) == type)) return 1;
+        #if PY_MAJOR_VERSION == 2
+        else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
+        #endif
+    }
+    else {
+        if (likely(PyObject_TypeCheck(obj, type))) return 1;
+    }
+    __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
+    return 0;
+}
+
+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
+    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
+    for (i=0; i < nbases; i++) {
+        PyTypeObject *tmptype;
+        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
+        tmptype = Py_TYPE(tmp);
+#if PY_MAJOR_VERSION < 3
+        if (tmptype == &PyClass_Type)
+            continue;
+#endif
+        if (!metaclass) {
+            metaclass = tmptype;
+            continue;
+        }
+        if (PyType_IsSubtype(metaclass, tmptype))
+            continue;
+        if (PyType_IsSubtype(tmptype, metaclass)) {
+            metaclass = tmptype;
+            continue;
+        }
+        PyErr_SetString(PyExc_TypeError,
+                        "metaclass conflict: "
+                        "the metaclass of a derived class "
+                        "must be a (non-strict) subclass "
+                        "of the metaclasses of all its bases");
+        return NULL;
+    }
+    if (!metaclass) {
+#if PY_MAJOR_VERSION < 3
+        metaclass = &PyClass_Type;
+#else
+        metaclass = &PyType_Type;
+#endif
+    }
+    Py_INCREF((PyObject*) metaclass);
+    return (PyObject*) metaclass;
+}
+
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
+    PyObject* fake_module;
+    PyTypeObject* cached_type = NULL;
+    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
+    if (!fake_module) return NULL;
+    Py_INCREF(fake_module);
+    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
+    if (cached_type) {
+        if (!PyType_Check((PyObject*)cached_type)) {
+            PyErr_Format(PyExc_TypeError,
+                "Shared Cython type %.200s is not a type object",
+                type->tp_name);
+            goto bad;
+        }
+        if (cached_type->tp_basicsize != type->tp_basicsize) {
+            PyErr_Format(PyExc_TypeError,
+                "Shared Cython type %.200s has the wrong size, try recompiling",
+                type->tp_name);
+            goto bad;
+        }
+    } else {
+        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
+        PyErr_Clear();
+        if (PyType_Ready(type) < 0) goto bad;
+        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
+            goto bad;
+        Py_INCREF(type);
+        cached_type = type;
+    }
+done:
+    Py_DECREF(fake_module);
+    return cached_type;
+bad:
+    Py_XDECREF(cached_type);
+    cached_type = NULL;
+    goto done;
+}
+
+static PyObject *
+__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
+{
+    if (unlikely(op->func_doc == NULL)) {
+        if (op->func.m_ml->ml_doc) {
+#if PY_MAJOR_VERSION >= 3
+            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
+#else
+            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
+#endif
+            if (unlikely(op->func_doc == NULL))
+                return NULL;
+        } else {
+            Py_INCREF(Py_None);
+            return Py_None;
+        }
+    }
+    Py_INCREF(op->func_doc);
+    return op->func_doc;
+}
+static int
+__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
+{
+    PyObject *tmp = op->func_doc;
+    if (value == NULL) {
+        value = Py_None;
+    }
+    Py_INCREF(value);
+    op->func_doc = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
+{
+    if (unlikely(op->func_name == NULL)) {
+#if PY_MAJOR_VERSION >= 3
+        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
+#else
+        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
+#endif
+        if (unlikely(op->func_name == NULL))
+            return NULL;
+    }
+    Py_INCREF(op->func_name);
+    return op->func_name;
+}
+static int
+__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
+{
+    PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+    if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+        PyErr_SetString(PyExc_TypeError,
+                        "__name__ must be set to a string object");
+        return -1;
+    }
+    tmp = op->func_name;
+    Py_INCREF(value);
+    op->func_name = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
+{
+    Py_INCREF(op->func_qualname);
+    return op->func_qualname;
+}
+static int
+__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
+{
+    PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+    if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+        PyErr_SetString(PyExc_TypeError,
+                        "__qualname__ must be set to a string object");
+        return -1;
+    }
+    tmp = op->func_qualname;
+    Py_INCREF(value);
+    op->func_qualname = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
+{
+    PyObject *self;
+    self = m->func_closure;
+    if (self == NULL)
+        self = Py_None;
+    Py_INCREF(self);
+    return self;
+}
+static PyObject *
+__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
+{
+    if (unlikely(op->func_dict == NULL)) {
+        op->func_dict = PyDict_New();
+        if (unlikely(op->func_dict == NULL))
+            return NULL;
+    }
+    Py_INCREF(op->func_dict);
+    return op->func_dict;
+}
+static int
+__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
+{
+    PyObject *tmp;
+    if (unlikely(value == NULL)) {
+        PyErr_SetString(PyExc_TypeError,
+               "function's dictionary may not be deleted");
+        return -1;
+    }
+    if (unlikely(!PyDict_Check(value))) {
+        PyErr_SetString(PyExc_TypeError,
+               "setting function's dictionary to a non-dict");
+        return -1;
+    }
+    tmp = op->func_dict;
+    Py_INCREF(value);
+    op->func_dict = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
+{
+    Py_INCREF(op->func_globals);
+    return op->func_globals;
+}
+static PyObject *
+__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
+{
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+static PyObject *
+__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
+{
+    PyObject* result = (op->func_code) ? op->func_code : Py_None;
+    Py_INCREF(result);
+    return result;
+}
+static int
+__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
+    PyObject *res = op->defaults_getter((PyObject *) op);
+    if (unlikely(!res))
+        return -1;
+    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
+    Py_INCREF(op->defaults_tuple);
+    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
+    Py_INCREF(op->defaults_kwdict);
+    Py_DECREF(res);
+    return 0;
+}
+static int
+__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
+    PyObject* tmp;
+    if (!value) {
+        value = Py_None;
+    } else if (value != Py_None && !PyTuple_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__defaults__ must be set to a tuple object");
+        return -1;
+    }
+    Py_INCREF(value);
+    tmp = op->defaults_tuple;
+    op->defaults_tuple = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
+    PyObject* result = op->defaults_tuple;
+    if (unlikely(!result)) {
+        if (op->defaults_getter) {
+            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+            result = op->defaults_tuple;
+        } else {
+            result = Py_None;
+        }
+    }
+    Py_INCREF(result);
+    return result;
+}
+static int
+__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
+    PyObject* tmp;
+    if (!value) {
+        value = Py_None;
+    } else if (value != Py_None && !PyDict_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__kwdefaults__ must be set to a dict object");
+        return -1;
+    }
+    Py_INCREF(value);
+    tmp = op->defaults_kwdict;
+    op->defaults_kwdict = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
+    PyObject* result = op->defaults_kwdict;
+    if (unlikely(!result)) {
+        if (op->defaults_getter) {
+            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+            result = op->defaults_kwdict;
+        } else {
+            result = Py_None;
+        }
+    }
+    Py_INCREF(result);
+    return result;
+}
+static int
+__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
+    PyObject* tmp;
+    if (!value || value == Py_None) {
+        value = NULL;
+    } else if (!PyDict_Check(value)) {
+        PyErr_SetString(PyExc_TypeError,
+                        "__annotations__ must be set to a dict object");
+        return -1;
+    }
+    Py_XINCREF(value);
+    tmp = op->func_annotations;
+    op->func_annotations = value;
+    Py_XDECREF(tmp);
+    return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
+    PyObject* result = op->func_annotations;
+    if (unlikely(!result)) {
+        result = PyDict_New();
+        if (unlikely(!result)) return NULL;
+        op->func_annotations = result;
+    }
+    Py_INCREF(result);
+    return result;
+}
+static PyGetSetDef __pyx_CyFunction_getsets[] = {
+    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
+    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
+    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
+    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
+    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
+    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
+    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
+    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
+    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
+    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
+    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
+    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
+    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
+    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
+    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
+    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
+    {0, 0, 0, 0, 0}
+};
+static PyMemberDef __pyx_CyFunction_members[] = {
+    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
+    {0, 0, 0,  0, 0}
+};
+static PyObject *
+__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
+{
+#if PY_MAJOR_VERSION >= 3
+    return PyUnicode_FromString(m->func.m_ml->ml_name);
+#else
+    return PyString_FromString(m->func.m_ml->ml_name);
+#endif
+}
+static PyMethodDef __pyx_CyFunction_methods[] = {
+    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
+    {0, 0, 0, 0}
+};
+#if PY_VERSION_HEX < 0x030500A0
+#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
+#else
+#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
+#endif
+static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
+                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
+    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
+    if (op == NULL)
+        return NULL;
+    op->flags = flags;
+    __Pyx_CyFunction_weakreflist(op) = NULL;
+    op->func.m_ml = ml;
+    op->func.m_self = (PyObject *) op;
+    Py_XINCREF(closure);
+    op->func_closure = closure;
+    Py_XINCREF(module);
+    op->func.m_module = module;
+    op->func_dict = NULL;
+    op->func_name = NULL;
+    Py_INCREF(qualname);
+    op->func_qualname = qualname;
+    op->func_doc = NULL;
+    op->func_classobj = NULL;
+    op->func_globals = globals;
+    Py_INCREF(op->func_globals);
+    Py_XINCREF(code);
+    op->func_code = code;
+    op->defaults_pyobjects = 0;
+    op->defaults = NULL;
+    op->defaults_tuple = NULL;
+    op->defaults_kwdict = NULL;
+    op->defaults_getter = NULL;
+    op->func_annotations = NULL;
+    PyObject_GC_Track(op);
+    return (PyObject *) op;
+}
+static int
+__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
+{
+    Py_CLEAR(m->func_closure);
+    Py_CLEAR(m->func.m_module);
+    Py_CLEAR(m->func_dict);
+    Py_CLEAR(m->func_name);
+    Py_CLEAR(m->func_qualname);
+    Py_CLEAR(m->func_doc);
+    Py_CLEAR(m->func_globals);
+    Py_CLEAR(m->func_code);
+    Py_CLEAR(m->func_classobj);
+    Py_CLEAR(m->defaults_tuple);
+    Py_CLEAR(m->defaults_kwdict);
+    Py_CLEAR(m->func_annotations);
+    if (m->defaults) {
+        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
+        int i;
+        for (i = 0; i < m->defaults_pyobjects; i++)
+            Py_XDECREF(pydefaults[i]);
+        PyMem_Free(m->defaults);
+        m->defaults = NULL;
+    }
+    return 0;
+}
+static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
+{
+    PyObject_GC_UnTrack(m);
+    if (__Pyx_CyFunction_weakreflist(m) != NULL)
+        PyObject_ClearWeakRefs((PyObject *) m);
+    __Pyx_CyFunction_clear(m);
+    PyObject_GC_Del(m);
+}
+static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
+{
+    Py_VISIT(m->func_closure);
+    Py_VISIT(m->func.m_module);
+    Py_VISIT(m->func_dict);
+    Py_VISIT(m->func_name);
+    Py_VISIT(m->func_qualname);
+    Py_VISIT(m->func_doc);
+    Py_VISIT(m->func_globals);
+    Py_VISIT(m->func_code);
+    Py_VISIT(m->func_classobj);
+    Py_VISIT(m->defaults_tuple);
+    Py_VISIT(m->defaults_kwdict);
+    if (m->defaults) {
+        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
+        int i;
+        for (i = 0; i < m->defaults_pyobjects; i++)
+            Py_VISIT(pydefaults[i]);
+    }
+    return 0;
+}
+static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
+{
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
+        Py_INCREF(func);
+        return func;
+    }
+    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
+        if (type == NULL)
+            type = (PyObject *)(Py_TYPE(obj));
+        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
+    }
+    if (obj == Py_None)
+        obj = NULL;
+    return __Pyx_PyMethod_New(func, obj, type);
+}
+static PyObject*
+__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
+{
+#if PY_MAJOR_VERSION >= 3
+    return PyUnicode_FromFormat("<cyfunction %U at %p>",
+                                op->func_qualname, (void *)op);
+#else
+    return PyString_FromFormat("<cyfunction %s at %p>",
+                               PyString_AsString(op->func_qualname), (void *)op);
+#endif
+}
+#if CYTHON_COMPILING_IN_PYPY
+static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+    PyCFunctionObject* f = (PyCFunctionObject*)func;
+    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
+    PyObject *self = PyCFunction_GET_SELF(func);
+    Py_ssize_t size;
+    switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
+    case METH_VARARGS:
+        if (likely(kw == NULL) || PyDict_Size(kw) == 0)
+            return (*meth)(self, arg);
+        break;
+    case METH_VARARGS | METH_KEYWORDS:
+        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
+    case METH_NOARGS:
+        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
+            size = PyTuple_GET_SIZE(arg);
+            if (size == 0)
+                return (*meth)(self, NULL);
+            PyErr_Format(PyExc_TypeError,
+                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
+                f->m_ml->ml_name, size);
+            return NULL;
+        }
+        break;
+    case METH_O:
+        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
+            size = PyTuple_GET_SIZE(arg);
+            if (size == 1)
+                return (*meth)(self, PyTuple_GET_ITEM(arg, 0));
+            PyErr_Format(PyExc_TypeError,
+                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
+                f->m_ml->ml_name, size);
+            return NULL;
+        }
+        break;
+    default:
+        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
+                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
+                        "longer supported!");
+        return NULL;
+    }
+    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
+                 f->m_ml->ml_name);
+    return NULL;
+}
+#else
+static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+	return PyCFunction_Call(func, arg, kw);
+}
+#endif
+static PyTypeObject __pyx_CyFunctionType_type = {
+    PyVarObject_HEAD_INIT(0, 0)
+    "cython_function_or_method",
+    sizeof(__pyx_CyFunctionObject),
+    0,
+    (destructor) __Pyx_CyFunction_dealloc,
+    0,
+    0,
+    0,
+#if PY_MAJOR_VERSION < 3
+    0,
+#else
+    0,
+#endif
+    (reprfunc) __Pyx_CyFunction_repr,
+    0,
+    0,
+    0,
+    0,
+    __Pyx_CyFunction_Call,
+    0,
+    0,
+    0,
+    0,
+    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
+    0,
+    (traverseproc) __Pyx_CyFunction_traverse,
+    (inquiry) __Pyx_CyFunction_clear,
+    0,
+#if PY_VERSION_HEX < 0x030500A0
+    offsetof(__pyx_CyFunctionObject, func_weakreflist),
+#else
+    offsetof(PyCFunctionObject, m_weakreflist),
+#endif
+    0,
+    0,
+    __pyx_CyFunction_methods,
+    __pyx_CyFunction_members,
+    __pyx_CyFunction_getsets,
+    0,
+    0,
+    __Pyx_CyFunction_descr_get,
+    0,
+    offsetof(__pyx_CyFunctionObject, func_dict),
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+#if PY_VERSION_HEX >= 0x030400a1
+    0,
+#endif
+};
+static int __Pyx_CyFunction_init(void) {
+#if !CYTHON_COMPILING_IN_PYPY
+    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
+#endif
+    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
+    if (__pyx_CyFunctionType == NULL) {
+        return -1;
+    }
+    return 0;
+}
+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    m->defaults = PyMem_Malloc(size);
+    if (!m->defaults)
+        return PyErr_NoMemory();
+    memset(m->defaults, 0, size);
+    m->defaults_pyobjects = pyobjects;
+    return m->defaults;
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    m->defaults_tuple = tuple;
+    Py_INCREF(tuple);
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    m->defaults_kwdict = dict;
+    Py_INCREF(dict);
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
+    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+    m->func_annotations = dict;
+    Py_INCREF(dict);
+}
+
+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
+                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
+    PyObject *ns;
+    if (metaclass) {
+        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
+        if (prep) {
+            PyObject *pargs = PyTuple_Pack(2, name, bases);
+            if (unlikely(!pargs)) {
+                Py_DECREF(prep);
+                return NULL;
+            }
+            ns = PyObject_Call(prep, pargs, mkw);
+            Py_DECREF(prep);
+            Py_DECREF(pargs);
+        } else {
+            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
+                return NULL;
+            PyErr_Clear();
+            ns = PyDict_New();
+        }
+    } else {
+        ns = PyDict_New();
+    }
+    if (unlikely(!ns))
+        return NULL;
+    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
+    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
+    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
+    return ns;
+bad:
+    Py_DECREF(ns);
+    return NULL;
+}
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
+                                      PyObject *dict, PyObject *mkw,
+                                      int calculate_metaclass, int allow_py2_metaclass) {
+    PyObject *result, *margs;
+    PyObject *owned_metaclass = NULL;
+    if (allow_py2_metaclass) {
+        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
+        if (owned_metaclass) {
+            metaclass = owned_metaclass;
+        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
+            PyErr_Clear();
+        } else {
+            return NULL;
+        }
+    }
+    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
+        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
+        Py_XDECREF(owned_metaclass);
+        if (unlikely(!metaclass))
+            return NULL;
+        owned_metaclass = metaclass;
+    }
+    margs = PyTuple_Pack(3, name, bases, dict);
+    if (unlikely(!margs)) {
+        result = NULL;
+    } else {
+        result = PyObject_Call(metaclass, margs, mkw);
+        Py_DECREF(margs);
+    }
+    Py_XDECREF(owned_metaclass);
+    return result;
+}
+
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
+    int start = 0, mid = 0, end = count - 1;
+    if (end >= 0 && code_line > entries[end].code_line) {
+        return count;
+    }
+    while (start < end) {
+        mid = (start + end) / 2;
+        if (code_line < entries[mid].code_line) {
+            end = mid;
+        } else if (code_line > entries[mid].code_line) {
+             start = mid + 1;
+        } else {
+            return mid;
+        }
+    }
+    if (code_line <= entries[mid].code_line) {
+        return mid;
+    } else {
+        return mid + 1;
+    }
+}
+static PyCodeObject *__pyx_find_code_object(int code_line) {
+    PyCodeObject* code_object;
+    int pos;
+    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
+        return NULL;
+    }
+    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
+        return NULL;
+    }
+    code_object = __pyx_code_cache.entries[pos].code_object;
+    Py_INCREF(code_object);
+    return code_object;
+}
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
+    int pos, i;
+    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
+    if (unlikely(!code_line)) {
+        return;
+    }
+    if (unlikely(!entries)) {
+        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
+        if (likely(entries)) {
+            __pyx_code_cache.entries = entries;
+            __pyx_code_cache.max_count = 64;
+            __pyx_code_cache.count = 1;
+            entries[0].code_line = code_line;
+            entries[0].code_object = code_object;
+            Py_INCREF(code_object);
+        }
+        return;
+    }
+    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
+        PyCodeObject* tmp = entries[pos].code_object;
+        entries[pos].code_object = code_object;
+        Py_DECREF(tmp);
+        return;
+    }
+    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
+        int new_max = __pyx_code_cache.max_count + 64;
+        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
+            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
+        if (unlikely(!entries)) {
+            return;
+        }
+        __pyx_code_cache.entries = entries;
+        __pyx_code_cache.max_count = new_max;
+    }
+    for (i=__pyx_code_cache.count; i>pos; i--) {
+        entries[i] = entries[i-1];
+    }
+    entries[pos].code_line = code_line;
+    entries[pos].code_object = code_object;
+    __pyx_code_cache.count++;
+    Py_INCREF(code_object);
+}
+
+#include "compile.h"
+#include "frameobject.h"
+#include "traceback.h"
+static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
+            const char *funcname, int c_line,
+            int py_line, const char *filename) {
+    PyCodeObject *py_code = 0;
+    PyObject *py_srcfile = 0;
+    PyObject *py_funcname = 0;
+    #if PY_MAJOR_VERSION < 3
+    py_srcfile = PyString_FromString(filename);
+    #else
+    py_srcfile = PyUnicode_FromString(filename);
+    #endif
+    if (!py_srcfile) goto bad;
+    if (c_line) {
+        #if PY_MAJOR_VERSION < 3
+        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+        #else
+        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+        #endif
+    }
+    else {
+        #if PY_MAJOR_VERSION < 3
+        py_funcname = PyString_FromString(funcname);
+        #else
+        py_funcname = PyUnicode_FromString(funcname);
+        #endif
+    }
+    if (!py_funcname) goto bad;
+    py_code = __Pyx_PyCode_New(
+        0,
+        0,
+        0,
+        0,
+        0,
+        __pyx_empty_bytes, /*PyObject *code,*/
+        __pyx_empty_tuple, /*PyObject *consts,*/
+        __pyx_empty_tuple, /*PyObject *names,*/
+        __pyx_empty_tuple, /*PyObject *varnames,*/
+        __pyx_empty_tuple, /*PyObject *freevars,*/
+        __pyx_empty_tuple, /*PyObject *cellvars,*/
+        py_srcfile,   /*PyObject *filename,*/
+        py_funcname,  /*PyObject *name,*/
+        py_line,
+        __pyx_empty_bytes  /*PyObject *lnotab*/
+    );
+    Py_DECREF(py_srcfile);
+    Py_DECREF(py_funcname);
+    return py_code;
+bad:
+    Py_XDECREF(py_srcfile);
+    Py_XDECREF(py_funcname);
+    return NULL;
+}
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+                               int py_line, const char *filename) {
+    PyCodeObject *py_code = 0;
+    PyFrameObject *py_frame = 0;
+    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
+    if (!py_code) {
+        py_code = __Pyx_CreateCodeObjectForTraceback(
+            funcname, c_line, py_line, filename);
+        if (!py_code) goto bad;
+        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
+    }
+    py_frame = PyFrame_New(
+        PyThreadState_GET(), /*PyThreadState *tstate,*/
+        py_code,             /*PyCodeObject *code,*/
+        __pyx_d,      /*PyObject *globals,*/
+        0                    /*PyObject *locals*/
+    );
+    if (!py_frame) goto bad;
+    py_frame->f_lineno = py_line;
+    PyTraceBack_Here(py_frame);
+bad:
+    Py_XDECREF(py_code);
+    Py_XDECREF(py_frame);
+}
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+    PyObject *empty_list = 0;
+    PyObject *module = 0;
+    PyObject *global_dict = 0;
+    PyObject *empty_dict = 0;
+    PyObject *list;
+    #if PY_VERSION_HEX < 0x03030000
+    PyObject *py_import;
+    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+    if (!py_import)
+        goto bad;
+    #endif
+    if (from_list)
+        list = from_list;
+    else {
+        empty_list = PyList_New(0);
+        if (!empty_list)
+            goto bad;
+        list = empty_list;
+    }
+    global_dict = PyModule_GetDict(__pyx_m);
+    if (!global_dict)
+        goto bad;
+    empty_dict = PyDict_New();
+    if (!empty_dict)
+        goto bad;
+    {
+        #if PY_MAJOR_VERSION >= 3
+        if (level == -1) {
+            if (strchr(__Pyx_MODULE_NAME, '.')) {
+                #if PY_VERSION_HEX < 0x03030000
+                PyObject *py_level = PyInt_FromLong(1);
+                if (!py_level)
+                    goto bad;
+                module = PyObject_CallFunctionObjArgs(py_import,
+                    name, global_dict, empty_dict, list, py_level, NULL);
+                Py_DECREF(py_level);
+                #else
+                module = PyImport_ImportModuleLevelObject(
+                    name, global_dict, empty_dict, list, 1);
+                #endif
+                if (!module) {
+                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
+                        goto bad;
+                    PyErr_Clear();
+                }
+            }
+            level = 0;
+        }
+        #endif
+        if (!module) {
+            #if PY_VERSION_HEX < 0x03030000
+            PyObject *py_level = PyInt_FromLong(level);
+            if (!py_level)
+                goto bad;
+            module = PyObject_CallFunctionObjArgs(py_import,
+                name, global_dict, empty_dict, list, py_level, NULL);
+            Py_DECREF(py_level);
+            #else
+            module = PyImport_ImportModuleLevelObject(
+                name, global_dict, empty_dict, list, level);
+            #endif
+        }
+    }
+bad:
+    #if PY_VERSION_HEX < 0x03030000
+    Py_XDECREF(py_import);
+    #endif
+    Py_XDECREF(empty_list);
+    Py_XDECREF(empty_dict);
+    return module;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+    const long neg_one = (long) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(long) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(long) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(long),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
+    const int neg_one = (int) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(int) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(int) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(int) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(int),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) {
+    const unsigned long neg_one = (unsigned long) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(unsigned long) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(unsigned long) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(unsigned long) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(unsigned long) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(unsigned long) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(unsigned long),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value) {
+    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(PY_LONG_LONG) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(PY_LONG_LONG) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(PY_LONG_LONG),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_PY_LONG_LONG(unsigned PY_LONG_LONG value) {
+    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(unsigned PY_LONG_LONG) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(unsigned PY_LONG_LONG) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(unsigned PY_LONG_LONG),
+                                     little, !is_unsigned);
+    }
+}
+
+#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)       \
+    {                                                                     \
+        func_type value = func_value;                                     \
+        if (sizeof(target_type) < sizeof(func_type)) {                    \
+            if (unlikely(value != (func_type) (target_type) value)) {     \
+                func_type zero = 0;                                       \
+                if (is_unsigned && unlikely(value < zero))                \
+                    goto raise_neg_overflow;                              \
+                else                                                      \
+                    goto raise_overflow;                                  \
+            }                                                             \
+        }                                                                 \
+        return (target_type) value;                                       \
+    }
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+    const int neg_one = (int) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(int) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                goto raise_neg_overflow;
+            }
+            return (int) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            switch (Py_SIZE(x)) {
+                case  0: return 0;
+                case  1: __PYX_VERIFY_RETURN_INT(int, digit, ((PyLongObject*)x)->ob_digit[0]);
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                goto raise_neg_overflow;
+            }
+            if (sizeof(int) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong(x))
+            } else if (sizeof(int) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong(x))
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            switch (Py_SIZE(x)) {
+                case  0: return 0;
+                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +(((PyLongObject*)x)->ob_digit[0]));
+                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
+            }
+ #endif
+#endif
+            if (sizeof(int) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong(x))
+            } else if (sizeof(int) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong(x))
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            int val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (int) -1;
+        }
+    } else {
+        int val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (int) -1;
+        val = __Pyx_PyInt_As_int(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+raise_overflow:
+    PyErr_SetString(PyExc_OverflowError,
+        "value too large to convert to int");
+    return (int) -1;
+raise_neg_overflow:
+    PyErr_SetString(PyExc_OverflowError,
+        "can't convert negative value to int");
+    return (int) -1;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_nc_type(nc_type value) {
+    const nc_type neg_one = (nc_type) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(nc_type) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(nc_type) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(nc_type) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(nc_type) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(nc_type) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(nc_type),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE nc_type __Pyx_PyInt_As_nc_type(PyObject *x) {
+    const nc_type neg_one = (nc_type) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(nc_type) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(nc_type, long, PyInt_AS_LONG(x))
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                goto raise_neg_overflow;
+            }
+            return (nc_type) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            switch (Py_SIZE(x)) {
+                case  0: return 0;
+                case  1: __PYX_VERIFY_RETURN_INT(nc_type, digit, ((PyLongObject*)x)->ob_digit[0]);
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                goto raise_neg_overflow;
+            }
+            if (sizeof(nc_type) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(nc_type, unsigned long, PyLong_AsUnsignedLong(x))
+            } else if (sizeof(nc_type) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(nc_type, unsigned long long, PyLong_AsUnsignedLongLong(x))
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            switch (Py_SIZE(x)) {
+                case  0: return 0;
+                case  1: __PYX_VERIFY_RETURN_INT(nc_type,  digit, +(((PyLongObject*)x)->ob_digit[0]));
+                case -1: __PYX_VERIFY_RETURN_INT(nc_type, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
+            }
+ #endif
+#endif
+            if (sizeof(nc_type) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(nc_type, long, PyLong_AsLong(x))
+            } else if (sizeof(nc_type) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(nc_type, long long, PyLong_AsLongLong(x))
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            nc_type val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (nc_type) -1;
+        }
+    } else {
+        nc_type val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (nc_type) -1;
+        val = __Pyx_PyInt_As_nc_type(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+raise_overflow:
+    PyErr_SetString(PyExc_OverflowError,
+        "value too large to convert to nc_type");
+    return (nc_type) -1;
+raise_neg_overflow:
+    PyErr_SetString(PyExc_OverflowError,
+        "can't convert negative value to nc_type");
+    return (nc_type) -1;
+}
+
+static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
+    const size_t neg_one = (size_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(size_t) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                goto raise_neg_overflow;
+            }
+            return (size_t) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            switch (Py_SIZE(x)) {
+                case  0: return 0;
+                case  1: __PYX_VERIFY_RETURN_INT(size_t, digit, ((PyLongObject*)x)->ob_digit[0]);
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                goto raise_neg_overflow;
+            }
+            if (sizeof(size_t) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(size_t, unsigned long, PyLong_AsUnsignedLong(x))
+            } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(size_t, unsigned long long, PyLong_AsUnsignedLongLong(x))
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            switch (Py_SIZE(x)) {
+                case  0: return 0;
+                case  1: __PYX_VERIFY_RETURN_INT(size_t,  digit, +(((PyLongObject*)x)->ob_digit[0]));
+                case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
+            }
+ #endif
+#endif
+            if (sizeof(size_t) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(size_t, long, PyLong_AsLong(x))
+            } else if (sizeof(size_t) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(size_t, long long, PyLong_AsLongLong(x))
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            size_t val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (size_t) -1;
+        }
+    } else {
+        size_t val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (size_t) -1;
+        val = __Pyx_PyInt_As_size_t(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+raise_overflow:
+    PyErr_SetString(PyExc_OverflowError,
+        "value too large to convert to size_t");
+    return (size_t) -1;
+raise_neg_overflow:
+    PyErr_SetString(PyExc_OverflowError,
+        "can't convert negative value to size_t");
+    return (size_t) -1;
+}
+
+static CYTHON_INLINE ptrdiff_t __Pyx_PyInt_As_ptrdiff_t(PyObject *x) {
+    const ptrdiff_t neg_one = (ptrdiff_t) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(ptrdiff_t) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(ptrdiff_t, long, PyInt_AS_LONG(x))
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                goto raise_neg_overflow;
+            }
+            return (ptrdiff_t) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            switch (Py_SIZE(x)) {
+                case  0: return 0;
+                case  1: __PYX_VERIFY_RETURN_INT(ptrdiff_t, digit, ((PyLongObject*)x)->ob_digit[0]);
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                goto raise_neg_overflow;
+            }
+            if (sizeof(ptrdiff_t) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(ptrdiff_t, unsigned long, PyLong_AsUnsignedLong(x))
+            } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(ptrdiff_t, unsigned long long, PyLong_AsUnsignedLongLong(x))
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            switch (Py_SIZE(x)) {
+                case  0: return 0;
+                case  1: __PYX_VERIFY_RETURN_INT(ptrdiff_t,  digit, +(((PyLongObject*)x)->ob_digit[0]));
+                case -1: __PYX_VERIFY_RETURN_INT(ptrdiff_t, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
+            }
+ #endif
+#endif
+            if (sizeof(ptrdiff_t) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(ptrdiff_t, long, PyLong_AsLong(x))
+            } else if (sizeof(ptrdiff_t) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(ptrdiff_t, long long, PyLong_AsLongLong(x))
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            ptrdiff_t val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (ptrdiff_t) -1;
+        }
+    } else {
+        ptrdiff_t val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (ptrdiff_t) -1;
+        val = __Pyx_PyInt_As_ptrdiff_t(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+raise_overflow:
+    PyErr_SetString(PyExc_OverflowError,
+        "value too large to convert to ptrdiff_t");
+    return (ptrdiff_t) -1;
+raise_neg_overflow:
+    PyErr_SetString(PyExc_OverflowError,
+        "can't convert negative value to ptrdiff_t");
+    return (ptrdiff_t) -1;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_intp(npy_intp value) {
+    const npy_intp neg_one = (npy_intp) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(npy_intp) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(npy_intp) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(npy_intp) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(npy_intp) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(npy_intp) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(npy_intp),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+    const long neg_one = (long) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(long) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                goto raise_neg_overflow;
+            }
+            return (long) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            switch (Py_SIZE(x)) {
+                case  0: return 0;
+                case  1: __PYX_VERIFY_RETURN_INT(long, digit, ((PyLongObject*)x)->ob_digit[0]);
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                goto raise_neg_overflow;
+            }
+            if (sizeof(long) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong(x))
+            } else if (sizeof(long) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong(x))
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            switch (Py_SIZE(x)) {
+                case  0: return 0;
+                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +(((PyLongObject*)x)->ob_digit[0]));
+                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
+            }
+ #endif
+#endif
+            if (sizeof(long) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong(x))
+            } else if (sizeof(long) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong(x))
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            long val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (long) -1;
+        }
+    } else {
+        long val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (long) -1;
+        val = __Pyx_PyInt_As_long(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+raise_overflow:
+    PyErr_SetString(PyExc_OverflowError,
+        "value too large to convert to long");
+    return (long) -1;
+raise_neg_overflow:
+    PyErr_SetString(PyExc_OverflowError,
+        "can't convert negative value to long");
+    return (long) -1;
+}
+
+static int __Pyx_check_binary_version(void) {
+    char ctversion[4], rtversion[4];
+    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
+    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
+    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
+        char message[200];
+        PyOS_snprintf(message, sizeof(message),
+                      "compiletime version %s of module '%.100s' "
+                      "does not match runtime version %s",
+                      ctversion, __Pyx_MODULE_NAME, rtversion);
+        return PyErr_WarnEx(NULL, message, 1);
+    }
+    return 0;
+}
+
+#ifndef __PYX_HAVE_RT_ImportModule
+#define __PYX_HAVE_RT_ImportModule
+static PyObject *__Pyx_ImportModule(const char *name) {
+    PyObject *py_name = 0;
+    PyObject *py_module = 0;
+    py_name = __Pyx_PyIdentifier_FromString(name);
+    if (!py_name)
+        goto bad;
+    py_module = PyImport_Import(py_name);
+    Py_DECREF(py_name);
+    return py_module;
+bad:
+    Py_XDECREF(py_name);
+    return 0;
+}
+#endif
+
+#ifndef __PYX_HAVE_RT_ImportType
+#define __PYX_HAVE_RT_ImportType
+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
+    size_t size, int strict)
+{
+    PyObject *py_module = 0;
+    PyObject *result = 0;
+    PyObject *py_name = 0;
+    char warning[200];
+    Py_ssize_t basicsize;
+#ifdef Py_LIMITED_API
+    PyObject *py_basicsize;
+#endif
+    py_module = __Pyx_ImportModule(module_name);
+    if (!py_module)
+        goto bad;
+    py_name = __Pyx_PyIdentifier_FromString(class_name);
+    if (!py_name)
+        goto bad;
+    result = PyObject_GetAttr(py_module, py_name);
+    Py_DECREF(py_name);
+    py_name = 0;
+    Py_DECREF(py_module);
+    py_module = 0;
+    if (!result)
+        goto bad;
+    if (!PyType_Check(result)) {
+        PyErr_Format(PyExc_TypeError,
+            "%.200s.%.200s is not a type object",
+            module_name, class_name);
+        goto bad;
+    }
+#ifndef Py_LIMITED_API
+    basicsize = ((PyTypeObject *)result)->tp_basicsize;
+#else
+    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
+    if (!py_basicsize)
+        goto bad;
+    basicsize = PyLong_AsSsize_t(py_basicsize);
+    Py_DECREF(py_basicsize);
+    py_basicsize = 0;
+    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
+        goto bad;
+#endif
+    if (!strict && (size_t)basicsize > size) {
+        PyOS_snprintf(warning, sizeof(warning),
+            "%s.%s size changed, may indicate binary incompatibility",
+            module_name, class_name);
+        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
+    }
+    else if ((size_t)basicsize != size) {
+        PyErr_Format(PyExc_ValueError,
+            "%.200s.%.200s has the wrong size, try recompiling",
+            module_name, class_name);
+        goto bad;
+    }
+    return (PyTypeObject *)result;
+bad:
+    Py_XDECREF(py_module);
+    Py_XDECREF(result);
+    return NULL;
+}
+#endif
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
+    while (t->p) {
+        #if PY_MAJOR_VERSION < 3
+        if (t->is_unicode) {
+            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
+        } else if (t->intern) {
+            *t->p = PyString_InternFromString(t->s);
+        } else {
+            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
+        }
+        #else
+        if (t->is_unicode | t->is_str) {
+            if (t->intern) {
+                *t->p = PyUnicode_InternFromString(t->s);
+            } else if (t->encoding) {
+                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
+            } else {
+                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
+            }
+        } else {
+            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
+        }
+        #endif
+        if (!*t->p)
+            return -1;
+        ++t;
+    }
+    return 0;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
+    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
+    Py_ssize_t ignore;
+    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+    if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+            __Pyx_sys_getdefaultencoding_not_ascii &&
+#endif
+            PyUnicode_Check(o)) {
+#if PY_VERSION_HEX < 0x03030000
+        char* defenc_c;
+        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+        if (!defenc) return NULL;
+        defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        {
+            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+            char* c;
+            for (c = defenc_c; c < end; c++) {
+                if ((unsigned char) (*c) >= 128) {
+                    PyUnicode_AsASCIIString(o);
+                    return NULL;
+                }
+            }
+        }
+#endif
+        *length = PyBytes_GET_SIZE(defenc);
+        return defenc_c;
+#else
+        if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        if (PyUnicode_IS_ASCII(o)) {
+            *length = PyUnicode_GET_LENGTH(o);
+            return PyUnicode_AsUTF8(o);
+        } else {
+            PyUnicode_AsASCIIString(o);
+            return NULL;
+        }
+#else
+        return PyUnicode_AsUTF8AndSize(o, length);
+#endif
+#endif
+    } else
+#endif
+#if !CYTHON_COMPILING_IN_PYPY
+    if (PyByteArray_Check(o)) {
+        *length = PyByteArray_GET_SIZE(o);
+        return PyByteArray_AS_STRING(o);
+    } else
+#endif
+    {
+        char* result;
+        int r = PyBytes_AsStringAndSize(o, &result, length);
+        if (unlikely(r < 0)) {
+            return NULL;
+        } else {
+            return result;
+        }
+    }
+}
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
+   int is_true = x == Py_True;
+   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
+   else return PyObject_IsTrue(x);
+}
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
+  PyNumberMethods *m;
+  const char *name = NULL;
+  PyObject *res = NULL;
+#if PY_MAJOR_VERSION < 3
+  if (PyInt_Check(x) || PyLong_Check(x))
+#else
+  if (PyLong_Check(x))
+#endif
+    return Py_INCREF(x), x;
+  m = Py_TYPE(x)->tp_as_number;
+#if PY_MAJOR_VERSION < 3
+  if (m && m->nb_int) {
+    name = "int";
+    res = PyNumber_Int(x);
+  }
+  else if (m && m->nb_long) {
+    name = "long";
+    res = PyNumber_Long(x);
+  }
+#else
+  if (m && m->nb_int) {
+    name = "int";
+    res = PyNumber_Long(x);
+  }
+#endif
+  if (res) {
+#if PY_MAJOR_VERSION < 3
+    if (!PyInt_Check(res) && !PyLong_Check(res)) {
+#else
+    if (!PyLong_Check(res)) {
+#endif
+      PyErr_Format(PyExc_TypeError,
+                   "__%.4s__ returned non-%.4s (type %.200s)",
+                   name, name, Py_TYPE(res)->tp_name);
+      Py_DECREF(res);
+      return NULL;
+    }
+  }
+  else if (!PyErr_Occurred()) {
+    PyErr_SetString(PyExc_TypeError,
+                    "an integer is required");
+  }
+  return res;
+}
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+  Py_ssize_t ival;
+  PyObject *x;
+#if PY_MAJOR_VERSION < 3
+  if (likely(PyInt_CheckExact(b)))
+      return PyInt_AS_LONG(b);
+#endif
+  if (likely(PyLong_CheckExact(b))) {
+    #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+     #if CYTHON_USE_PYLONG_INTERNALS
+       switch (Py_SIZE(b)) {
+       case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0];
+       case  0: return 0;
+       case  1: return ((PyLongObject*)b)->ob_digit[0];
+       }
+     #endif
+    #endif
+    return PyLong_AsSsize_t(b);
+  }
+  x = PyNumber_Index(b);
+  if (!x) return -1;
+  ival = PyInt_AsSsize_t(x);
+  Py_DECREF(x);
+  return ival;
+}
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
+    return PyInt_FromSize_t(ival);
+}
+
+
+#endif /* Py_PYTHON_H */
diff --git a/netCDF4.egg-info/PKG-INFO b/netCDF4.egg-info/PKG-INFO
new file mode 100644
index 0000000..b878864
--- /dev/null
+++ b/netCDF4.egg-info/PKG-INFO
@@ -0,0 +1,20 @@
+Metadata-Version: 1.1
+Name: netCDF4
+Version: 1.1.4.1
+Summary: Provides an object-oriented python interface to the netCDF version 4 library.
+Home-page: http://github.com/Unidata/netcdf4-python
+Author: Jeff Whitaker
+Author-email: jeffrey.s.whitaker at noaa.gov
+License: OSI Approved
+Download-URL: http://python.org/pypi/netCDF4
+Description: netCDF version 4 has many features not found in earlier versions of the library, such as hierarchical groups, zlib compression, multiple unlimited dimensions, and new data types.  It is implemented on top of HDF5.  This module implements most of the new features, and can read and write netCDF files compatible with older versions of the library.  The API is modelled after Scientific.IO.NetCDF, and should be familiar to users of that module.
+        
+        This project has a `Subversion repository <http://code.google.com/p/netcdf4-python/source>`_ where you may access the most up-to-date source.
+Keywords: numpy,netcdf,data,science,network,oceanography,meteorology,climate
+Platform: any
+Classifier: Development Status :: 3 - Alpha
+Classifier: Intended Audience :: Science/Research
+Classifier: License :: OSI Approved
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Topic :: System :: Archiving :: Compression
+Classifier: Operating System :: OS Independent
diff --git a/netCDF4.egg-info/SOURCES.txt b/netCDF4.egg-info/SOURCES.txt
new file mode 100644
index 0000000..b77580b
--- /dev/null
+++ b/netCDF4.egg-info/SOURCES.txt
@@ -0,0 +1,94 @@
+COPYING
+Changelog
+MANIFEST.in
+README.macosx
+README.md
+constants.pyx
+netCDF4.c
+netCDF4.pxi
+netCDF4.pyx
+netCDF4_utils.py
+setup.cfg.template
+setup.py
+utils.pyx
+docs/api-objects.txt
+docs/class-tree.html
+docs/crarr.png
+docs/epydoc.css
+docs/epydoc.js
+docs/help.html
+docs/identifier-index.html
+docs/index.html
+docs/module-tree.html
+docs/netCDF3-module.html
+docs/netCDF3.Dataset-class.html
+docs/netCDF3.Dimension-class.html
+docs/netCDF3.MFDataset-class.html
+docs/netCDF3.Variable-class.html
+docs/netCDF4-module.html
+docs/netCDF4.CompoundType-class.html
+docs/netCDF4.Dataset-class.html
+docs/netCDF4.Dimension-class.html
+docs/netCDF4.Group-class.html
+docs/netCDF4.MFDataset-class.html
+docs/netCDF4.MFTime-class.html
+docs/netCDF4.VLType-class.html
+docs/netCDF4.Variable-class.html
+docs/netcdftime.netcdftime-module.html
+docs/netcdftime.netcdftime-pysrc.html
+docs/netcdftime.netcdftime.datetime-class.html
+docs/netcdftime.netcdftime.utime-class.html
+docs/redirect.html
+examples/bench.py
+examples/bench_compress.py
+examples/bench_compress2.py
+examples/bench_compress3.py
+examples/bench_diskless.py
+examples/test_stringarr.py
+examples/tutorial.py
+netCDF4.egg-info/PKG-INFO
+netCDF4.egg-info/SOURCES.txt
+netCDF4.egg-info/dependency_links.txt
+netCDF4.egg-info/requires.txt
+netCDF4.egg-info/top_level.txt
+netcdftime/__init__.py
+netcdftime/_datetime.c
+netcdftime/_datetime.pyx
+netcdftime/netcdftime.py
+ports/README
+ports/python/py-netcdf4/Portfile
+test/run_all.py
+test/tst_atts.py
+test/tst_compound_alignment.py
+test/tst_compoundatt.py
+test/tst_compoundvar.py
+test/tst_compression.py
+test/tst_dap.py
+test/tst_dims.py
+test/tst_diskless.py
+test/tst_endian.py
+test/tst_fancyslicing.py
+test/tst_grps.py
+test/tst_masked.py
+test/tst_masked2.py
+test/tst_masked3.py
+test/tst_multifile.py
+test/tst_multifile2.py
+test/tst_netcdftime.py
+test/tst_refcount.py
+test/tst_rename.py
+test/tst_scalarvar.py
+test/tst_scaled.py
+test/tst_shape.py
+test/tst_slicing.py
+test/tst_stringarr.py
+test/tst_types.py
+test/tst_unicode.py
+test/tst_unicode3.py
+test/tst_unlimdim.py
+test/tst_utils.py
+test/tst_vars.py
+test/tst_vlen.py
+utils/nc3tonc4
+utils/nc4tonc3
+utils/ncinfo
\ No newline at end of file
diff --git a/netCDF4.egg-info/dependency_links.txt b/netCDF4.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/netCDF4.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/netCDF4.egg-info/requires.txt b/netCDF4.egg-info/requires.txt
new file mode 100644
index 0000000..f090cd2
--- /dev/null
+++ b/netCDF4.egg-info/requires.txt
@@ -0,0 +1 @@
+numpy>=1.3
diff --git a/netCDF4.egg-info/top_level.txt b/netCDF4.egg-info/top_level.txt
new file mode 100644
index 0000000..d823084
--- /dev/null
+++ b/netCDF4.egg-info/top_level.txt
@@ -0,0 +1,3 @@
+netCDF4
+netCDF4_utils
+netcdftime
diff --git a/netCDF4.pxi b/netCDF4.pxi
new file mode 100644
index 0000000..20a7345
--- /dev/null
+++ b/netCDF4.pxi
@@ -0,0 +1,717 @@
+# size_t, ptrdiff_t are defined in stdlib.h
+cdef extern from "stdlib.h":
+    ctypedef long size_t
+    ctypedef long ptrdiff_t
+    void *malloc(size_t size)
+    void free(void *ptr)
+
+# hdf5 version info.
+cdef extern from "H5public.h":
+    cdef char *H5_VERS_INFO
+    cdef char *H5_VERS_SUBRELEASE
+    cdef enum:
+        H5_VERS_MAJOR
+        H5_VERS_MINOR
+        H5_VERS_RELEASE
+
+cdef extern from *:
+    ctypedef char* const_char_ptr "const char*"
+ 
+# netcdf functions.
+cdef extern from "netcdf.h":
+    ctypedef int nclong
+    ctypedef int nc_type
+    ctypedef struct nc_vlen_t:
+        size_t len                 # Length of VL data (in base type units) 
+        void *p                    # Pointer to VL data 
+# default fill values.
+# could define these in the anonymous enum, but then they
+# would be assumed to be integers.
+#define NC_FILL_BYTE	((signed char)-127)
+#define NC_FILL_CHAR	((char)0)
+#define NC_FILL_SHORT	((short)-32767)
+#define NC_FILL_INT	(-2147483647L)
+#define NC_FILL_FLOAT	(9.9692099683868690e+36f) /* near 15 * 2^119 */
+#define NC_FILL_DOUBLE	(9.9692099683868690e+36)
+#define NC_FILL_UBYTE   (255)
+#define NC_FILL_USHORT  (65535)
+#define NC_FILL_UINT    (4294967295U)
+#define NC_FILL_INT64   ((long long)-9223372036854775806)
+#define NC_FILL_UINT64  ((unsigned long long)18446744073709551614)
+    float NC_FILL_FLOAT
+    long NC_FILL_INT
+    double NC_FILL_DOUBLE
+    char NC_FILL_CHAR
+    long long NC_FILL_INT64
+    unsigned long NC_FILL_UINT
+    unsigned long long NC_FILL_UINT64
+    cdef enum:
+        NC_NAT # NAT = 'Not A Type' (c.f. NaN) 
+        NC_BYTE # signed 1 byte integer 
+        NC_CHAR # ISO/ASCII character 
+        NC_SHORT # signed 2 byte integer 
+        NC_INT # signed 4 byte integer 
+        NC_LONG # deprecated, but required for backward compatibility. 
+        NC_FLOAT # single precision floating point number 
+        NC_DOUBLE # double precision floating point number 
+        NC_UBYTE # unsigned 1 byte int 
+        NC_USHORT # unsigned 2-byte int 
+        NC_UINT # unsigned 4-byte int 
+        NC_INT64 # signed 8-byte int 
+        NC_UINT64 # unsigned 8-byte int 
+        NC_STRING # string 
+        NC_VLEN # used internally for vlen types 
+        NC_OPAQUE # used internally for opaque types 
+        NC_COMPOUND # used internally for compound types 
+        # Use these 'mode' flags for nc_open.
+        NC_NOWRITE # default is read only 
+        NC_WRITE # read & write 
+        # Use these 'mode' flags for nc_create.
+        NC_CLOBBER
+        NC_NOCLOBBER # Don't destroy existing file on create 
+        NC_64BIT_OFFSET # Use large (64-bit) file offsets 
+        NC_NETCDF4 # Use netCDF-4/HDF5 format 
+        NC_CLASSIC_MODEL # Enforce strict netcdf-3 rules. 
+        # Use these 'mode' flags for both nc_create and nc_open.
+        NC_SHARE # Share updates, limit cacheing 
+        NC_MPIIO
+        NC_MPIPOSIX
+        # The following flag currently is ignored, but use in
+        # nc_open() or nc_create() may someday support use of advisory
+        # locking to prevent multiple writers from clobbering a file 
+        NC_LOCK  # Use locking if available 
+        #       Default fill values, used unless _FillValue attribute is set.
+        # These values are stuffed into newly allocated space as appropriate.
+        # The hope is that one might use these to notice that a particular datum
+        # has not been set.
+        NC_FILL_BYTE    
+        #NC_FILL_CHAR    
+        NC_FILL_SHORT   
+        #NC_FILL_INT     
+        #NC_FILL_FLOAT   
+        #NC_FILL_DOUBLE  
+        NC_FILL_UBYTE  
+        NC_FILL_USHORT 
+        #NC_FILL_UINT   
+        #NC_FILL_INT64  
+        #NC_FILL_UINT64 
+        # These represent the max and min values that can be stored in a
+        # netCDF file for their associated types. Recall that a C compiler
+        # may define int to be any length it wants, but a NC_INT is *always*
+        # a 4 byte signed int. On a platform with has 64 bit ints, there will
+        # be many ints which are outside the range supported by NC_INT. But
+        # since NC_INT is an external format, it has to mean the same thing
+        # everywhere. 
+        NC_MAX_BYTE 
+        NC_MIN_BYTE 
+        NC_MAX_CHAR 
+        NC_MAX_SHORT
+        NC_MIN_SHORT
+        NC_MAX_INT 
+        NC_MIN_INT 
+        NC_MAX_FLOAT 
+        NC_MIN_FLOAT 
+        NC_MAX_DOUBLE8 
+        NC_MIN_DOUBLE
+        NC_MAX_UBYTE 
+        NC_MAX_USHORT 
+        NC_MAX_UINT 
+        NC_MAX_INT64
+        NC_MIN_INT64
+        NC_MAX_UINT64 
+        X_INT64_MAX   
+        X_INT64_MIN   
+        X_UINT64_MAX  
+        # The above values are defaults.
+        # If you wish a variable to use a different value than the above
+        # defaults, create an attribute with the same type as the variable
+        # and the following reserved name. The value you give the attribute
+        # will be used as the fill value for that variable.
+        _FillValue
+        NC_FILL
+        NC_NOFILL
+        # Starting with version 3.6, there are different format netCDF
+        # files. 4.0 instroduces the third one. These defines are only for
+        # the nc_set_default_format function.
+        NC_FORMAT_CLASSIC 
+        NC_FORMAT_64BIT   
+        NC_FORMAT_NETCDF4 
+        NC_FORMAT_NETCDF4_CLASSIC  
+        NC_FORMAT_NC3
+        NC_FORMAT_NC_HDF4
+        NC_FORMAT_NC_HDF5
+        NC_FORMAT_DAP2
+        NC_FORMAT_DAP4
+        NC_FORMAT_PNETCDF
+        NC_FORMAT_UNDEFINED
+        # Let nc__create() or nc__open() figure out
+        # as suitable chunk size.
+        NC_SIZEHINT_DEFAULT 
+        # In nc__enddef(), align to the chunk size.
+        NC_ALIGN_CHUNK 
+        # 'size' argument to ncdimdef for an unlimited dimension
+        NC_UNLIMITED 
+        # attribute id to put/get a global attribute
+        NC_GLOBAL 
+        # These maximums are enforced by the interface, to facilitate writing
+        # applications and utilities.  However, nothing is statically allocated to
+        # these sizes internally.
+        NC_MAX_DIMS
+        NC_MAX_ATTRS
+        NC_MAX_VARS
+        NC_MAX_NAME
+        NC_MAX_VAR_DIMS        
+        #   Algorithms for netcdf-4 chunking. 
+        NC_CHUNK_SEQ 
+        NC_CHUNK_SUB 
+        NC_CHUNK_SIZES   
+        NC_CHUNKED
+        NC_CONTIGUOUS
+        # The netcdf version 3 functions all return integer error status.
+        # These are the possible values, in addition to certain
+        # values from the system errno.h.
+        NC_ISSYSERR       
+        NC_NOERR       
+        NC2_ERR         
+        NC_EBADID
+        NC_ENFILE
+        NC_EEXIST
+        NC_EINVAL
+        NC_EPERM
+        NC_ENOTINDEFINE
+        NC_EINDEFINE    
+        NC_EINVALCOORDS 
+        NC_EMAXDIMS     
+        NC_ENAMEINUSE   
+        NC_ENOTATT             
+        NC_EMAXATTS     
+        NC_EBADTYPE    
+        NC_EBADDIM     
+        NC_EUNLIMPOS   
+        NC_EMAXVARS     
+        NC_ENOTVAR        
+        NC_EGLOBAL        
+        NC_ENOTNC         
+        NC_ESTS                
+        NC_EMAXNAME            
+        NC_EUNLIMIT            
+        NC_ENORECVARS          
+        NC_ECHAR       
+        NC_EEDGE       
+        NC_ESTRIDE     
+        NC_EBADNAME                           
+        # N.B. following must match value in ncx.h 
+        NC_ERANGE         # Math result not representable 
+        NC_ENOMEM         # Memory allocation (malloc) failure 
+        NC_EVARSIZE        # One or more variable sizes violate format constraints  
+        NC_EDIMSIZE        # Invalid dimension size 
+        NC_ETRUNC          # NetCDFFile likely truncated or possibly corrupted 
+        # The following was added in support of netcdf-4. Make all netcdf-4
+        # error codes < -100 so that errors can be added to netcdf-3 if
+        # needed. 
+        NC4_FIRST_ERROR 
+        NC_EHDFERR      
+        NC_ECANTREAD    
+        NC_ECANTWRITE   
+        NC_ECANTCREATE  
+        NC_EFILEMETA    
+        NC_EDIMMETA     
+        NC_EATTMETA     
+        NC_EVARMETA     
+        NC_ENOCOMPOUND  
+        NC_EATTEXISTS   
+        NC_ENOTNC4      
+        NC_ESTRICTNC3     
+        NC_ENOTNC3      
+        NC_ENOPAR         
+        NC_EPARINIT     
+        NC_EBADGRPID    
+        NC_EBADTYPID    
+        NC_ETYPDEFINED  
+        NC_EBADFIELD    
+        NC_EBADCLASS    
+        NC4_LAST_ERROR  
+        NC_ENDIAN_NATIVE 
+        NC_ENDIAN_LITTLE 
+        NC_ENDIAN_BIG 
+        NC_SZIP_EC_OPTION_MASK  # entropy encoding
+        NC_SZIP_NN_OPTION_MASK  # nearest neighbor encoding
+    const_char_ptr *nc_inq_libvers()
+    const_char_ptr *nc_strerror(int ncerr)
+    int nc_create(char *path, int cmode, int *ncidp)
+    int nc__create(char *path, int cmode, size_t initialsz, size_t *chunksizehintp, int *ncidp)
+    int nc_open(char *path, int mode, int *ncidp)
+    int nc__open(char *path, int mode, size_t *chunksizehintp, int *ncidp)
+    int nc_inq_path(int ncid, size_t *pathlen, char *path)
+    int nc_inq_format_extended(int ncid, int *formatp, int* modep)
+    int nc_inq_ncid(int ncid, char *name, int *grp_ncid)
+    int nc_inq_grps(int ncid, int *numgrps, int *ncids)
+    int nc_inq_grpname(int ncid, char *name)
+    int nc_inq_grp_parent(int ncid, int *parent_ncid)
+    int nc_inq_varids(int ncid, int *nvars, int *varids)
+    int nc_inq_dimids(int ncid, int *ndims, int *dimids, int include_parents)
+    int nc_def_grp(int parent_ncid, char *name, int *new_ncid)
+    int nc_def_compound(int ncid, size_t size, char *name, nc_type *typeidp)
+    int nc_insert_compound(int ncid, nc_type xtype, char *name, 
+                   size_t offset, nc_type field_typeid)
+    int nc_insert_array_compound(int ncid, nc_type xtype, char *name, 
+                         size_t offset, nc_type field_typeid,
+                         int ndims, int *dim_sizes)
+    int nc_inq_type(int ncid, nc_type xtype, char *name, size_t *size)
+    int nc_inq_compound(int ncid, nc_type xtype, char *name, size_t *size, 
+                size_t *nfieldsp)
+    int nc_inq_compound_name(int ncid, nc_type xtype, char *name)
+    int nc_inq_compound_size(int ncid, nc_type xtype, size_t *size)
+    int nc_inq_compound_nfields(int ncid, nc_type xtype, size_t *nfieldsp)
+    int nc_inq_compound_field(int ncid, nc_type xtype, int fieldid, char *name,
+                      size_t *offsetp, nc_type *field_typeidp, int *ndimsp, 
+                      int *dim_sizesp)
+    int nc_inq_compound_fieldname(int ncid, nc_type xtype, int fieldid, 
+                          char *name)
+    int nc_inq_compound_fieldindex(int ncid, nc_type xtype, char *name, 
+                           int *fieldidp)
+    int nc_inq_compound_fieldoffset(int ncid, nc_type xtype, int fieldid, 
+                            size_t *offsetp)
+    int nc_inq_compound_fieldtype(int ncid, nc_type xtype, int fieldid, 
+                          nc_type *field_typeidp)
+    int nc_inq_compound_fieldndims(int ncid, nc_type xtype, int fieldid, 
+                           int *ndimsp)
+    int nc_inq_compound_fielddim_sizes(int ncid, nc_type xtype, int fieldid, 
+                               int *dim_sizes)
+    int nc_def_vlen(int ncid, char *name, nc_type base_typeid, nc_type *xtypep)
+    int nc_inq_vlen(int ncid, nc_type xtype, char *name, size_t *datum_sizep, 
+            nc_type *base_nc_typep)
+    int nc_inq_user_type(int ncid, nc_type xtype, char *name, size_t *size, 
+                     nc_type *base_nc_typep, size_t *nfieldsp, int *classp)
+    int nc_inq_typeids(int ncid, int *ntypes, int *typeids)
+    int nc_put_att(int ncid, int varid, char *name, nc_type xtype, 
+               size_t len, void *op)
+    int nc_get_att(int ncid, int varid, char *name, void *ip)
+    int nc_get_att_string(int ncid, int varid, char *name, char **ip)
+    int nc_def_opaque(int ncid, size_t size, char *name, nc_type *xtypep)
+    int nc_inq_opaque(int ncid, nc_type xtype, char *name, size_t *sizep)
+    int nc_put_att_opaque(int ncid, int varid, char *name,
+                      size_t len, void *op)
+    int nc_get_att_opaque(int ncid, int varid, char *name, 
+                      void *ip)
+    int nc_put_cmp_att_opaque(int ncid, nc_type xtype, int fieldid, 
+                          char *name, size_t len, void *op)
+    int nc_get_cmp_att_opaque(int ncid, nc_type xtype, int fieldid, 
+                          char *name, void *ip)
+    int nc_put_var1(int ncid, int varid, size_t *indexp,
+                void *op)
+    int nc_get_var1(int ncid, int varid,  size_t *indexp,
+                void *ip)
+    int nc_put_vara(int ncid, int varid,  size_t *startp, 
+                size_t *countp, void *op)
+    int nc_get_vara(int ncid, int varid,  size_t *startp, 
+                size_t *countp, void *ip)
+    int nc_put_vars(int ncid, int varid,  size_t *startp, 
+                size_t *countp, ptrdiff_t *stridep,
+                void *op)
+    int nc_get_vars(int ncid, int varid,  size_t *startp, 
+                size_t *countp, ptrdiff_t *stridep,
+                void *ip)
+    int nc_put_varm(int ncid, int varid,  size_t *startp, 
+                size_t *countp, ptrdiff_t *stridep,
+                ptrdiff_t *imapp, void *op)
+    int nc_get_varm(int ncid, int varid,  size_t *startp, 
+                size_t *countp, ptrdiff_t *stridep,
+                ptrdiff_t *imapp, void *ip)
+    int nc_put_var(int ncid, int varid,  void *op)
+    int nc_get_var(int ncid, int varid,  void *ip)
+    int nc_def_var_deflate(int ncid, int varid, int shuffle, int deflate, 
+	           	   int deflate_level)
+    int nc_def_var_fletcher32(int ncid, int varid, int fletcher32)
+    int nc_inq_var_fletcher32(int ncid, int varid, int *fletcher32p)
+    int nc_def_var_chunking(int ncid, int varid, int contiguous, size_t *chunksizesp)
+    int nc_def_var_fill(int ncid, int varid, int no_fill, void *fill_value)
+    int nc_def_var_endian(int ncid, int varid, int endian)
+    int nc_inq_var_chunking(int ncid, int varid, int *contiguousp, size_t *chunksizesp)
+    int nc_inq_var_deflate(int ncid, int varid, int *shufflep, 
+      		   int *deflatep, int *deflate_levelp)
+    int nc_inq_var_fill(int ncid, int varid, int *no_fill, void *fill_value)
+    int nc_inq_var_endian(int ncid, int varid, int *endianp)
+    int nc_set_fill(int ncid, int fillmode, int *old_modep)
+    int nc_set_default_format(int format, int *old_formatp)
+    int nc_redef(int ncid)
+    int nc__enddef(int ncid, size_t h_minfree, size_t v_align,
+            size_t v_minfree, size_t r_align)
+    int nc_enddef(int ncid)
+    int nc_sync(int ncid)
+    int nc_abort(int ncid)
+    int nc_close(int ncid)
+    int nc_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp)
+    int nc_inq_ndims(int ncid, int *ndimsp)
+    int nc_inq_nvars(int ncid, int *nvarsp)
+    int nc_inq_natts(int ncid, int *nattsp)
+    int nc_inq_unlimdim(int ncid, int *unlimdimidp)
+    int nc_inq_unlimdims(int ncid, int *nunlimdimsp, int *unlimdimidsp)
+    int nc_inq_format(int ncid, int *formatp)
+    int nc_def_dim(int ncid, char *name, size_t len, int *idp)
+    int nc_inq_dimid(int ncid, char *name, int *idp)
+    int nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp)
+    int nc_inq_dimname(int ncid, int dimid, char *name)
+    int nc_inq_dimlen(int ncid, int dimid, size_t *lenp)
+    int nc_rename_dim(int ncid, int dimid, char *name)
+    int nc_inq_att(int ncid, int varid, char *name,
+               nc_type *xtypep, size_t *lenp)
+    int nc_inq_attid(int ncid, int varid, char *name, int *idp)
+    int nc_inq_atttype(int ncid, int varid, char *name, nc_type *xtypep)
+    int nc_inq_attlen(int ncid, int varid, char *name, size_t *lenp)
+    int nc_inq_attname(int ncid, int varid, int attnum, char *name)
+    int nc_copy_att(int ncid_in, int varid_in, char *name, int ncid_out, int varid_out)
+    int nc_rename_att(int ncid, int varid, char *name, char *newname)
+    int nc_del_att(int ncid, int varid, char *name)
+    int nc_put_att_text(int ncid, int varid, char *name,
+                    size_t len, char *op)
+    int nc_get_att_text(int ncid, int varid, char *name, char *ip)
+    int nc_get_att_string(int ncid, int varid, char *name, char **ip)
+    int nc_put_att_uchar(int ncid, int varid, char *name, nc_type xtype,
+                     size_t len, unsigned char *op)
+    int nc_get_att_uchar(int ncid, int varid, char *name, unsigned char *ip)
+    int nc_put_att_schar(int ncid, int varid, char *name, nc_type xtype,
+                     size_t len, signed char *op)
+    int nc_get_att_schar(int ncid, int varid, char *name, signed char *ip)
+    int nc_put_att_short(int ncid, int varid, char *name, nc_type xtype,
+                     size_t len, short *op)
+    int nc_get_att_short(int ncid, int varid, char *name, short *ip)
+    int nc_put_att_int(int ncid, int varid, char *name, nc_type xtype,
+                   size_t len, int *op)
+    int nc_get_att_int(int ncid, int varid, char *name, int *ip)
+    int nc_put_att_long(int ncid, int varid, char *name, nc_type xtype,
+                    size_t len, long *op)
+    int nc_get_att_long(int ncid, int varid, char *name, long *ip)
+    int nc_put_att_float(int ncid, int varid, char *name, nc_type xtype,
+                     size_t len, float *op)
+    int nc_get_att_float(int ncid, int varid, char *name, float *ip)
+    int nc_put_att_double(int ncid, int varid, char *name, nc_type xtype,
+                      size_t len, double *op)
+    int nc_get_att_double(int ncid, int varid, char *name, double *ip)
+    int nc_put_att_ushort(int ncid, int varid, char *name, nc_type xtype,
+                      size_t len, unsigned short *op)
+    int nc_get_att_ushort(int ncid, int varid, char *name, unsigned short *ip)
+    int nc_put_att_uint(int ncid, int varid, char *name, nc_type xtype,
+                    size_t len, unsigned int *op)
+    int nc_get_att_uint(int ncid, int varid, char *name, unsigned int *ip)
+    int nc_put_att_longlong(int ncid, int varid, char *name, nc_type xtype,
+                     size_t len, long long *op)
+    int nc_get_att_longlong(int ncid, int varid, char *name, long long *ip)
+    int nc_put_att_ulonglong(int ncid, int varid, char *name, nc_type xtype,
+                         size_t len, unsigned long long *op)
+    int nc_get_att_ulonglong(int ncid, int varid, char *name, 
+                         unsigned long long *ip)
+    int nc_def_var(int ncid, char *name, nc_type xtype, int ndims, 
+               int *dimidsp, int *varidp)
+    int nc_inq_var(int ncid, int varid, char *name, nc_type *xtypep, 
+               int *ndimsp, int *dimidsp, int *nattsp)
+    int nc_inq_varid(int ncid, char *name, int *varidp)
+    int nc_inq_varname(int ncid, int varid, char *name)
+    int nc_inq_vartype(int ncid, int varid, nc_type *xtypep)
+    int nc_inq_varndims(int ncid, int varid, int *ndimsp)
+    int nc_inq_vardimid(int ncid, int varid, int *dimidsp)
+    int nc_inq_varnatts(int ncid, int varid, int *nattsp)
+    int nc_rename_var(int ncid, int varid, char *name)
+    int nc_copy_var(int ncid_in, int varid, int ncid_out)
+    int nc_put_var1_text(int ncid, int varid, size_t *indexp, char *op)
+    int nc_get_var1_text(int ncid, int varid, size_t *indexp, char *ip)
+    int nc_put_var1_uchar(int ncid, int varid, size_t *indexp,
+                      unsigned char *op)
+    int nc_get_var1_uchar(int ncid, int varid, size_t *indexp,
+                      unsigned char *ip)
+    int nc_put_var1_schar(int ncid, int varid, size_t *indexp,
+                      signed char *op)
+    int nc_get_var1_schar(int ncid, int varid, size_t *indexp,
+                      signed char *ip)
+    int nc_put_var1_short(int ncid, int varid, size_t *indexp,
+                      short *op)
+    int nc_get_var1_short(int ncid, int varid, size_t *indexp,
+                      short *ip)
+    int nc_put_var1_int(int ncid, int varid, size_t *indexp, int *op)
+    int nc_get_var1_int(int ncid, int varid, size_t *indexp, int *ip)
+    int nc_put_var1_long(int ncid, int varid, size_t *indexp, long *op)
+    int nc_get_var1_long(int ncid, int varid, size_t *indexp, long *ip)
+    int nc_put_var1_float(int ncid, int varid, size_t *indexp, float *op)
+    int nc_get_var1_float(int ncid, int varid, size_t *indexp, float *ip)
+    int nc_put_var1_double(int ncid, int varid, size_t *indexp, double *op)
+    int nc_get_var1_double(int ncid, int varid, size_t *indexp, double *ip)
+    int nc_put_var1_ubyte(int ncid, int varid, size_t *indexp, 
+                      unsigned char *op)
+    int nc_get_var1_ubyte(int ncid, int varid, size_t *indexp, 
+                      unsigned char *ip)
+    int nc_put_var1_ushort(int ncid, int varid, size_t *indexp, 
+                       unsigned short *op)
+    int nc_get_var1_ushort(int ncid, int varid, size_t *indexp, 
+                       unsigned short *ip)
+    int nc_put_var1_uint(int ncid, int varid, size_t *indexp, 
+                     unsigned int *op)
+    int nc_get_var1_uint(int ncid, int varid, size_t *indexp, 
+                     unsigned int *ip)
+    int nc_put_var1_longlong(int ncid, int varid, size_t *indexp, 
+                         long long *op)
+    int nc_get_var1_longlong(int ncid, int varid, size_t *indexp, 
+                      long long *ip)
+    int nc_put_var1_ulonglong(int ncid, int varid, size_t *indexp, 
+                       unsigned long long *op)
+    int nc_get_var1_ulonglong(int ncid, int varid, size_t *indexp, 
+                       unsigned long long *ip)
+    int nc_put_vara_text(int ncid, int varid,
+            size_t *startp, size_t *countp, char *op)
+    int nc_get_vara_text(int ncid, int varid,
+            size_t *startp, size_t *countp, char *ip)
+    int nc_put_vara_uchar(int ncid, int varid,
+            size_t *startp, size_t *countp, unsigned char *op)
+    int nc_get_vara_uchar(int ncid, int varid, size_t *startp, 
+                      size_t *countp, unsigned char *ip)
+    int nc_put_vara_schar(int ncid, int varid, size_t *startp, 
+                      size_t *countp, signed char *op)
+    int nc_get_vara_schar(int ncid, int varid, size_t *startp, 
+                      size_t *countp, signed char *ip)
+    int nc_put_vara_short(int ncid, int varid, size_t *startp, 
+                      size_t *countp, short *op)
+    int nc_get_vara_short(int ncid, int varid, size_t *startp, 
+                      size_t *countp, short *ip)
+    int nc_put_vara_int(int ncid, int varid, size_t *startp, 
+                    size_t *countp, int *op)
+    int nc_get_vara_int(int ncid, int varid, size_t *startp, 
+                    size_t *countp, int *ip)
+    int nc_put_vara_long(int ncid, int varid, size_t *startp, 
+                     size_t *countp, long *op)
+    int nc_get_vara_long(int ncid, int varid,
+            size_t *startp, size_t *countp, long *ip)
+    int nc_put_vara_float(int ncid, int varid,
+            size_t *startp, size_t *countp, float *op)
+    int nc_get_vara_float(int ncid, int varid,
+            size_t *startp, size_t *countp, float *ip)
+    int nc_put_vara_double(int ncid, int varid, size_t *startp, 
+                       size_t *countp, double *op)
+    int nc_get_vara_double(int ncid, int varid, size_t *startp, 
+                       size_t *countp, double *ip)
+    int nc_put_vara_ubyte(int ncid, int varid, size_t *startp, 
+                      size_t *countp, unsigned char *op)
+    int nc_get_vara_ubyte(int ncid, int varid, size_t *startp, 
+                      size_t *countp, unsigned char *ip)
+    int nc_put_vara_ushort(int ncid, int varid, size_t *startp, 
+                       size_t *countp, unsigned short *op)
+    int nc_get_vara_ushort(int ncid, int varid, size_t *startp, 
+                       size_t *countp, unsigned short *ip)
+    int nc_put_vara_uint(int ncid, int varid, size_t *startp, 
+                     size_t *countp, unsigned int *op)
+    int nc_get_vara_uint(int ncid, int varid, size_t *startp, 
+                     size_t *countp, unsigned int *ip)
+    int nc_put_vara_longlong(int ncid, int varid, size_t *startp, 
+                      size_t *countp, long long *op)
+    int nc_get_vara_longlong(int ncid, int varid, size_t *startp, 
+                      size_t *countp, long long *ip)
+    int nc_put_vara_ulonglong(int ncid, int varid, size_t *startp, 
+                       size_t *countp, unsigned long long *op)
+    int nc_get_vara_ulonglong(int ncid, int varid, size_t *startp, 
+                       size_t *countp, unsigned long long *ip)
+    int nc_put_vars_text(int ncid, int varid,
+            size_t *startp, size_t *countp, ptrdiff_t *stridep,
+            char *op)
+    int nc_get_vars_text(int ncid, int varid,
+            size_t *startp, size_t *countp, ptrdiff_t *stridep,
+            char *ip)
+    int nc_put_vars_uchar(int ncid, int varid,
+            size_t *startp, size_t *countp, ptrdiff_t *stridep,
+            unsigned char *op)
+    int nc_get_vars_uchar(int ncid, int varid,
+            size_t *startp, size_t *countp, ptrdiff_t *stridep,
+            unsigned char *ip)
+    int nc_put_vars_schar(int ncid, int varid,
+            size_t *startp, size_t *countp, ptrdiff_t *stridep,
+            signed char *op)
+    int nc_get_vars_schar(int ncid, int varid,
+            size_t *startp, size_t *countp, ptrdiff_t *stridep,
+            signed char *ip)
+    int nc_put_vars_short(int ncid, int varid,
+            size_t *startp, size_t *countp, ptrdiff_t *stridep,
+            short *op)
+    int nc_get_vars_short(int ncid, int varid, size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep,
+                      short *ip)
+    int nc_put_vars_int(int ncid, int varid,
+            size_t *startp, size_t *countp, ptrdiff_t *stridep,
+            int *op)
+    int nc_get_vars_int(int ncid, int varid,
+            size_t *startp, size_t *countp, ptrdiff_t *stridep,
+            int *ip)
+    int nc_put_vars_long(int ncid, int varid,
+            size_t *startp, size_t *countp, ptrdiff_t *stridep,
+            long *op) 
+    int nc_get_vars_long(int ncid, int varid,
+            size_t *startp, size_t *countp, ptrdiff_t *stridep,
+            long *ip)
+    int nc_put_vars_float(int ncid, int varid,
+            size_t *startp, size_t *countp, ptrdiff_t *stridep,
+            float *op) 
+    int nc_get_vars_float(int ncid, int varid,
+            size_t *startp, size_t *countp, ptrdiff_t *stridep,
+            float *ip)
+    int nc_put_vars_double(int ncid, int varid,
+            size_t *startp, size_t *countp, ptrdiff_t *stridep,
+            double *op)
+    int nc_get_vars_double(int ncid, int varid, size_t *startp, 
+                       size_t *countp, ptrdiff_t *stridep,
+                       double *ip)
+    int nc_put_vars_ubyte(int ncid, int varid, size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep, 
+                      unsigned char *op)
+    int nc_get_vars_ubyte(int ncid, int varid, size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep, 
+                      unsigned char *ip)
+    int nc_put_vars_ushort(int ncid, int varid, size_t *startp, 
+                       size_t *countp, ptrdiff_t *stridep, 
+                       unsigned short *op)
+    int nc_get_vars_ushort(int ncid, int varid, size_t *startp, 
+                       size_t *countp, ptrdiff_t *stridep, 
+                       unsigned short *ip)
+    int nc_put_vars_uint(int ncid, int varid, size_t *startp, 
+                     size_t *countp, ptrdiff_t *stridep, 
+                     unsigned int *op)
+    int nc_get_vars_uint(int ncid, int varid, size_t *startp, 
+                     size_t *countp, ptrdiff_t *stridep, 
+                     unsigned int *ip)
+    int nc_put_vars_longlong(int ncid, int varid, size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep, 
+                      long long *op)
+    int nc_get_vars_longlong(int ncid, int varid, size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep, 
+                      long long *ip)
+    int nc_put_vars_ulonglong(int ncid, int varid, size_t *startp, 
+                       size_t *countp, ptrdiff_t *stridep, 
+                       unsigned long long *op)
+    int nc_get_vars_ulonglong(int ncid, int varid, size_t *startp, 
+                       size_t *countp, ptrdiff_t *stridep, 
+                       unsigned long long *ip)
+    int nc_put_varm_text(int ncid, int varid, size_t *startp, 
+                     size_t *countp, ptrdiff_t *stridep,
+                     ptrdiff_t *imapp, char *op)
+    int nc_get_varm_text(int ncid, int varid, size_t *startp, 
+                     size_t *countp, ptrdiff_t *stridep,
+                     ptrdiff_t *imapp, char *ip)
+    int nc_put_varm_uchar(int ncid, int varid, size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep,
+                      ptrdiff_t *imapp, unsigned char *op)
+    int nc_get_varm_uchar(int ncid, int varid, size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep,
+                      ptrdiff_t *imapp, unsigned char *ip)
+    int nc_put_varm_schar(int ncid, int varid, size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep,
+                      ptrdiff_t *imapp, signed char *op)
+    int nc_get_varm_schar(int ncid, int varid, size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep,
+                      ptrdiff_t *imapp, signed char *ip)
+    int nc_put_varm_short(int ncid, int varid, size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep,
+                      ptrdiff_t *imapp, short *op)
+    int nc_get_varm_short(int ncid, int varid, size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep,
+                      ptrdiff_t *imapp, short *ip)
+    int nc_put_varm_int(int ncid, int varid, size_t *startp, 
+                    size_t *countp, ptrdiff_t *stridep,
+                    ptrdiff_t *imapp, int *op)
+    int nc_get_varm_int(int ncid, int varid, size_t *startp, 
+                    size_t *countp, ptrdiff_t *stridep,
+                    ptrdiff_t *imapp, int *ip)
+    int nc_put_varm_long(int ncid, int varid, size_t *startp, 
+                     size_t *countp, ptrdiff_t *stridep,
+                     ptrdiff_t *imapp, long *op)
+    int nc_get_varm_long(int ncid, int varid, size_t *startp, 
+                     size_t *countp, ptrdiff_t *stridep,
+                     ptrdiff_t *imapp, long *ip)
+    int nc_put_varm_float(int ncid, int varid,size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep,
+                      ptrdiff_t *imapp, float *op)
+    int nc_get_varm_float(int ncid, int varid,size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep,
+                      ptrdiff_t *imapp, float *ip)
+    int nc_put_varm_double(int ncid, int varid, size_t *startp, 
+                       size_t *countp, ptrdiff_t *stridep,
+                       ptrdiff_t *imapp, double *op)
+    int nc_get_varm_double(int ncid, int varid, size_t *startp, 
+                       size_t *countp, ptrdiff_t *stridep,
+                       ptrdiff_t * imapp, double *ip)
+    int nc_put_varm_ubyte(int ncid, int varid, size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep, 
+                      ptrdiff_t * imapp, unsigned char *op)
+    int nc_get_varm_ubyte(int ncid, int varid, size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep, 
+                      ptrdiff_t * imapp, unsigned char *ip)
+    int nc_put_varm_ushort(int ncid, int varid, size_t *startp, 
+                       size_t *countp, ptrdiff_t *stridep, 
+                       ptrdiff_t * imapp, unsigned short *op)
+    int nc_get_varm_ushort(int ncid, int varid, size_t *startp, 
+                       size_t *countp, ptrdiff_t *stridep, 
+                       ptrdiff_t * imapp, unsigned short *ip)
+    int nc_put_varm_uint(int ncid, int varid, size_t *startp, 
+                     size_t *countp, ptrdiff_t *stridep, 
+                     ptrdiff_t * imapp, unsigned int *op)
+    int nc_get_varm_uint(int ncid, int varid, size_t *startp, 
+                     size_t *countp, ptrdiff_t *stridep, 
+                     ptrdiff_t * imapp, unsigned int *ip)
+    int nc_put_varm_longlong(int ncid, int varid, size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep, 
+                      ptrdiff_t * imapp, long long *op)
+    int nc_get_varm_longlong(int ncid, int varid, size_t *startp, 
+                      size_t *countp, ptrdiff_t *stridep, 
+                      ptrdiff_t * imapp, long long *ip)
+    int nc_put_varm_ulonglong(int ncid, int varid, size_t *startp, 
+                       size_t *countp, ptrdiff_t *stridep, 
+                       ptrdiff_t * imapp, unsigned long long *op)
+    int nc_get_varm_ulonglong(int ncid, int varid, size_t *startp, 
+                       size_t *countp, ptrdiff_t *stridep, 
+                       ptrdiff_t * imapp, unsigned long long *ip)
+    int nc_put_var_text(int ncid, int varid, char *op)
+    int nc_get_var_text(int ncid, int varid, char *ip)
+    int nc_put_var_uchar(int ncid, int varid, unsigned char *op)
+    int nc_get_var_uchar(int ncid, int varid, unsigned char *ip)
+    int nc_put_var_schar(int ncid, int varid, signed char *op)
+    int nc_get_var_schar(int ncid, int varid, signed char *ip)
+    int nc_put_var_short(int ncid, int varid, short *op)
+    int nc_get_var_short(int ncid, int varid, short *ip)
+    int nc_put_var_int(int ncid, int varid, int *op)
+    int nc_get_var_int(int ncid, int varid, int *ip)
+    int nc_put_var_long(int ncid, int varid, long *op)
+    int nc_get_var_long(int ncid, int varid, long *ip)
+    int nc_put_var_float(int ncid, int varid, float *op)
+    int nc_get_var_float(int ncid, int varid, float *ip)
+    int nc_put_var_double(int ncid, int varid, double *op)
+    int nc_get_var_double(int ncid, int varid, double *ip)
+    int nc_put_var_ubyte(int ncid, int varid, unsigned char *op)
+    int nc_get_var_ubyte(int ncid, int varid, unsigned char *ip)
+    int nc_put_var_ushort(int ncid, int varid, unsigned short *op)
+    int nc_get_var_ushort(int ncid, int varid, unsigned short *ip)
+    int nc_put_var_uint(int ncid, int varid, unsigned int *op)
+    int nc_get_var_uint(int ncid, int varid, unsigned int *ip)
+    int nc_put_var_longlong(int ncid, int varid, long long *op)
+    int nc_get_var_longlong(int ncid, int varid, long long *ip)
+    int nc_put_var_ulonglong(int ncid, int varid, unsigned long long *op)
+    int nc_get_var_ulonglong(int ncid, int varid, unsigned long long *ip)
+    # set logging verbosity level.
+    void nc_set_log_level(int new_level)
+    int nc_show_metadata(int ncid)
+    int nc_free_vlen(nc_vlen_t *vl)
+    int nc_free_string(size_t len, char **data)
+    int nc_set_chunk_cache(size_t size, size_t nelems, float preemption)
+    int nc_get_chunk_cache(size_t *sizep, size_t *nelemsp, float *preemptionp)
+    int nc_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems, float preemption)
+    int nc_get_var_chunk_cache(int ncid, int varid, size_t *sizep, size_t *nelemsp, float *preemptionp)
+    int nc_rename_grp(int grpid, char *name)
+
+# taken from numpy.pxi in numpy 1.0rc2.
+cdef extern from "numpy/arrayobject.h":
+    ctypedef int npy_intp 
+    ctypedef extern class numpy.ndarray [object PyArrayObject]:
+        cdef char *data
+        cdef int nd
+        cdef npy_intp *dimensions
+        cdef npy_intp *strides
+        cdef object base
+#       cdef dtype descr
+        cdef int flags
+    npy_intp PyArray_SIZE(ndarray arr)
+    npy_intp PyArray_ISCONTIGUOUS(ndarray arr)
+    npy_intp PyArray_ISALIGNED(ndarray arr)
+    void import_array()
diff --git a/netCDF4.pyx b/netCDF4.pyx
new file mode 100644
index 0000000..d4265d5
--- /dev/null
+++ b/netCDF4.pyx
@@ -0,0 +1,4139 @@
+"""
+Introduction
+============
+
+Python interface to the netCDF version 4 library.  U{netCDF version 4 
+<http://www.unidata.ucar.edu/software/netcdf/netcdf-4>} has many features 
+not found in earlier versions of the library and is implemented on top of 
+U{HDF5 <http://www.hdfgroup.org/HDF5>}. This module can read and write 
+files in both the new netCDF 4 and the old netCDF 3 format, and can create 
+files that are readable by HDF5 clients. The API modelled after 
+U{Scientific.IO.NetCDF 
+<http://dirac.cnrs-orleans.fr/plone/software/scientificpython/>}, and should be 
+familiar to users of that module.
+
+Most new features of netCDF 4 are implemented, such as multiple
+unlimited dimensions, groups and zlib data compression.  All the new
+numeric data types (such as 64 bit and unsigned integer types) are
+implemented. Compound and variable length (vlen) data types are supported, 
+but the enum and opaque data types are not. Mixtures of compound and vlen
+data types (compound types containing vlens, and vlens containing compound 
+types) are not supported.
+
+Download 
+========
+
+ - Latest bleeding-edge code from the U{github repository
+   <http://github.com/Unidata/netcdf4-python>}.
+ - Latest U{releases <https://pypi.python.org/pypi/netCDF4>}
+   (source code and windows installers).
+
+Requires 
+======== 
+
+ - Python 2.5 or later (python 3 works too).
+ - numpy array module U{http://numpy.scipy.org}, version 1.3.0 or later (1.5.1
+   or higher recommended, required if using python 3).
+ - U{Cython <http://cython.org>} is optional - if it is installed setup.py will 
+   use it to recompile the Cython source code into C, using conditional compilation
+   to enable features in the netCDF API that have been added since version 4.1.1.  If
+   Cython is not installed, these features (such as the ability to rename Group objects)
+   will be disabled to preserve backward compatibility with older versions of the netCDF
+   library.
+ - For python < 2.7, the ordereddict module U{http://python.org/pypi/ordereddict}.
+ - The HDF5 C library version 1.8.4-patch1 or higher (1.8.8 or higher
+ recommended) from U{ftp://ftp.hdfgroup.org/HDF5/current/src}.
+ Be sure to build with 'C{--enable-hl --enable-shared}'.
+ - U{Libcurl <http://curl.haxx.se/libcurl/>}, if you want
+ U{OPeNDAP<http://opendap.org/>} support.
+ - U{HDF4 <http://www.hdfgroup.org/products/hdf4/>}, if you want
+ to be able to read HDF4 "Scientific Dataset" (SD) files.
+ - The netCDF-4 C library from U{ftp://ftp.unidata.ucar.edu/pub/netcdf}.
+ Version 4.1.1 or higher is required (4.2 or higher recommended).
+ Be sure to build with 'C{--enable-netcdf-4 --enable-shared}', and set
+ C{CPPFLAGS="-I $HDF5_DIR/include"} and C{LDFLAGS="-L $HDF5_DIR/lib"},
+ where C{$HDF5_DIR} is the directory where HDF5 was installed.
+ If you want U{OPeNDAP<http://opendap.org/>} support, add 'C{--enable-dap}'.
+ If you want HDF4 SD support, add 'C{--enable-hdf4}' and add
+ the location of the HDF4 headers and library to C{CPPFLAGS} and C{LDFLAGS}.
+
+
+Install
+=======
+
+ - install the requisite python modules and C libraries (see above). It's
+ easiest if all the C libs are built as shared libraries.
+ - optionally, set the C{HDF5_DIR} environment variable to point to where HDF5
+ is installed (the libs in C{$HDF5_DIR/lib}, the headers in
+ C{$HDF5_DIR/include}). If the headers and libs are installed in different
+ places, you can use C{HDF5_INCDIR} and C{HDF5_LIBDIR} to define the locations
+ of the headers and libraries independently.
+ - optionally, set the C{NETCDF4_DIR} (or C{NETCDF4_INCDIR} and C{NETCDF4_LIBDIR})
+ environment variable(s) to point to
+ where the netCDF version 4 library and headers are installed.
+ - If the locations of the HDF5 and netCDF libs and headers are not specified
+ with environment variables, some standard locations will be searched.
+ - if HDF5 was built as a static library  with U{szip
+ <http://www.hdfgroup.org/doc_resource/SZIP/>} support,
+ you may also need to set the C{SZIP_DIR} (or C{SZIP_INCDIR} and C{SZIP_LIBDIR})
+ environment variable(s) to point to where szip is installed. Note that
+ the netCDF library does not support creating szip compressed files, but can read szip
+ compressed files if the HDF5 lib is configured to support szip.
+ - if netCDF lib was built as a static library with HDF4 and/or OpenDAP
+ support, you may also need to set C{HDF4_DIR}, C{JPEG_DIR} and/or
+ C{CURL_DIR}.
+ - Instead of using environment variables to specify the locations of the
+ required libraries, you can either let setup.py try to auto-detect their
+ locations, or use the file C{setup.cfg} to specify them.  To use this 
+ method, copy the file C{setup.cfg.template} to C{setup.cfg},
+ then open C{setup.cfg} in a text editor and follow the instructions in the  
+ comments for editing.  If you use C{setup.cfg}, environment variables will be
+ ignored.
+ - If you are using netcdf 4.1.2 or higher, instead of setting all those
+ enviroment variables defining where libs are installed, you can just set one 
+ environment variable, USE_NCCONFIG, to 1.  This will tell python to run the
+ netcdf nc-config utility to determine where all the dependencies live.
+ - run C{python setup.py build}, then C{python setup.py install} (as root if
+ necessary).
+ - If using environment variables to specify build options, be sure to run
+ 'python setup.py build' *without* using sudo.  sudo does not pass environment
+ variables. If you run 'setup.py build' first without sudo, you can run
+ 'setup.py install' with sudo.  
+ - run the tests in the 'test' directory by running C{python run_all.py}.
+
+Tutorial
+========
+
+1) Creating/Opening/Closing a netCDF file
+-----------------------------------------
+
+To create a netCDF file from python, you simply call the L{Dataset}
+constructor. This is also the method used to open an existing netCDF
+file.  If the file is open for write access (C{w, r+} or C{a}), you may
+write any type of data including new dimensions, groups, variables and
+attributes.  netCDF files come in several flavors (C{NETCDF3_CLASSIC,
+NETCDF3_64BIT, NETCDF4_CLASSIC}, and C{NETCDF4}). The first two flavors
+are supported by version 3 of the netCDF library. C{NETCDF4_CLASSIC}
+files use the version 4 disk format (HDF5), but do not use any features
+not found in the version 3 API. They can be read by netCDF 3 clients
+only if they have been relinked against the netCDF 4 library. They can
+also be read by HDF5 clients. C{NETCDF4} files use the version 4 disk
+format (HDF5) and use the new features of the version 4 API.  The
+C{netCDF4} module can read and write files in any of these formats. When
+creating a new file, the format may be specified using the C{format}
+keyword in the C{Dataset} constructor.  The default format is
+C{NETCDF4}. To see how a given file is formatted, you can examine the
+C{data_model} L{Dataset} attribute.  Closing the netCDF file is
+accomplished via the L{close<Dataset.close>} method of the L{Dataset}
+instance.
+
+Here's an example:
+
+>>> from netCDF4 import Dataset
+>>> rootgrp = Dataset('test.nc', 'w', format='NETCDF4')
+>>> print rootgrp.data_model
+NETCDF4
+>>>
+>>> rootgrp.close()
+
+Remote U{OPeNDAP<http://opendap.org>}-hosted datasets can be accessed for
+reading over http if a URL is provided to the L{Dataset} constructor instead of a 
+filename.  However, this requires that the netCDF library be built with
+OPenDAP support, via the C{--enable-dap} configure option (added in
+version 4.0.1).
+            
+
+2) Groups in a netCDF file
+--------------------------
+
+netCDF version 4 added support for organizing data in hierarchical
+groups, which are analagous to directories in a filesystem. Groups serve
+as containers for variables, dimensions and attributes, as well as other
+groups.  A C{netCDF4.Dataset} defines creates a special group, called
+the 'root group', which is similar to the root directory in a unix
+filesystem.  To create L{Group} instances, use the
+L{createGroup<Dataset.createGroup>} method of a L{Dataset} or L{Group}
+instance. L{createGroup<Dataset.createGroup>} takes a single argument, a
+python string containing the name of the new group. The new L{Group}
+instances contained within the root group can be accessed by name using
+the C{groups} dictionary attribute of the L{Dataset} instance.  Only
+C{NETCDF4} formatted files support Groups, if you try to create a Group
+in a netCDF 3 file you will get an error message.
+
+>>> rootgrp = Dataset('test.nc', 'a')
+>>> fcstgrp = rootgrp.createGroup('forecasts')
+>>> analgrp = rootgrp.createGroup('analyses')
+>>> print rootgrp.groups
+OrderedDict([('forecasts', <netCDF4.Group object at 0x1b4b7b0>),
+             ('analyses', <netCDF4.Group object at 0x1b4b970>)])
+>>>
+
+Groups can exist within groups in a L{Dataset}, just as directories
+exist within directories in a unix filesystem. Each L{Group} instance
+has a C{'groups'} attribute dictionary containing all of the group
+instances contained within that group. Each L{Group} instance also has a
+C{'path'} attribute that contains a simulated unix directory path to
+that group. 
+
+Here's an example that shows how to navigate all the groups in a
+L{Dataset}. The function C{walktree} is a Python generator that is used
+to walk the directory tree. Note that printing the L{Dataset} or L{Group}
+object yields summary information about it's contents.
+
+>>> fcstgrp1 = fcstgrp.createGroup('model1')
+>>> fcstgrp2 = fcstgrp.createGroup('model2')
+>>> def walktree(top):
+>>>     values = top.groups.values()
+>>>     yield values
+>>>     for value in top.groups.values():
+>>>         for children in walktree(value):
+>>>             yield children
+>>> print rootgrp
+>>> for children in walktree(rootgrp):
+>>>      for child in children:
+>>>          print child
+<type 'netCDF4.Dataset'>
+root group (NETCDF4 file format):
+    dimensions: 
+    variables: 
+        groups: forecasts, analyses
+<type 'netCDF4.Group'>
+group /forecasts:
+    dimensions:
+    variables:
+    groups: model1, model2
+<type 'netCDF4.Group'>
+group /analyses:
+    dimensions:
+    variables:
+    groups:
+<type 'netCDF4.Group'>
+group /forecasts/model1:
+    dimensions:
+    variables:
+    groups:
+<type 'netCDF4.Group'>
+group /forecasts/model2:
+    dimensions:
+    variables:
+    groups:
+>>>
+
+3) Dimensions in a netCDF file
+------------------------------
+
+netCDF defines the sizes of all variables in terms of dimensions, so
+before any variables can be created the dimensions they use must be
+created first. A special case, not often used in practice, is that of a
+scalar variable, which has no dimensions. A dimension is created using
+the L{createDimension<Dataset.createDimension>} method of a L{Dataset}
+or L{Group} instance. A Python string is used to set the name of the
+dimension, and an integer value is used to set the size. To create an
+unlimited dimension (a dimension that can be appended to), the size
+value is set to C{None} or 0. In this example, there both the C{time} and
+C{level} dimensions are unlimited.  Having more than one unlimited
+dimension is a new netCDF 4 feature, in netCDF 3 files there may be only
+one, and it must be the first (leftmost) dimension of the variable.
+
+>>> level = rootgrp.createDimension('level', None)
+>>> time = rootgrp.createDimension('time', None)
+>>> lat = rootgrp.createDimension('lat', 73)
+>>> lon = rootgrp.createDimension('lon', 144)
+            
+
+All of the L{Dimension} instances are stored in a python dictionary.
+
+>>> print rootgrp.dimensions
+OrderedDict([('level', <netCDF4.Dimension object at 0x1b48030>),
+             ('time', <netCDF4.Dimension object at 0x1b481c0>),
+             ('lat', <netCDF4.Dimension object at 0x1b480f8>),
+             ('lon', <netCDF4.Dimension object at 0x1b48a08>)])
+>>>
+
+Calling the python C{len} function with a L{Dimension} instance returns
+the current size of that dimension.
+The L{isunlimited<Dimension.isunlimited>} method of a L{Dimension} instance
+can be used to determine if the dimensions is unlimited, or appendable.
+
+>>> print len(lon)
+144
+>>> print len.is_unlimited()
+False
+>>> print time.is_unlimited()
+True
+>>>
+
+Printing the L{Dimension} object
+provides useful summary info, including the name and length of the dimension,
+and whether it is unlimited.
+
+>>> for dimobj in rootgrp.dimensions.values():
+>>>    print dimobj
+<type 'netCDF4.Dimension'> (unlimited): name = 'level', size = 0
+<type 'netCDF4.Dimension'> (unlimited): name = 'time', size = 0
+<type 'netCDF4.Dimension'>: name = 'lat', size = 73
+<type 'netCDF4.Dimension'>: name = 'lon', size = 144
+<type 'netCDF4.Dimension'> (unlimited): name = 'time', size = 0
+>>>
+
+L{Dimension} names can be changed using the
+L{renameDimension<Dataset.renameDimension>} method of a L{Dataset} or
+L{Group} instance.
+            
+4) Variables in a netCDF file
+-----------------------------
+
+netCDF variables behave much like python multidimensional array objects
+supplied by the U{numpy module <http://numpy.scipy.org>}. However,
+unlike numpy arrays, netCDF4 variables can be appended to along one or
+more 'unlimited' dimensions. To create a netCDF variable, use the
+L{createVariable<Dataset.createVariable>} method of a L{Dataset} or
+L{Group} instance. The L{createVariable<Dataset.createVariable>} method
+has two mandatory arguments, the variable name (a Python string), and
+the variable datatype. The variable's dimensions are given by a tuple
+containing the dimension names (defined previously with
+L{createDimension<Dataset.createDimension>}). To create a scalar
+variable, simply leave out the dimensions keyword. The variable
+primitive datatypes correspond to the dtype attribute of a numpy array. 
+You can specify the datatype as a numpy dtype object, or anything that
+can be converted to a numpy dtype object.  Valid datatype specifiers
+include: C{'f4'} (32-bit floating point), C{'f8'} (64-bit floating
+point), C{'i4'} (32-bit signed integer), C{'i2'} (16-bit signed
+integer), C{'i8'} (64-bit singed integer), C{'i1'} (8-bit signed
+integer), C{'u1'} (8-bit unsigned integer), C{'u2'} (16-bit unsigned
+integer), C{'u4'} (32-bit unsigned integer), C{'u8'} (64-bit unsigned
+integer), or C{'S1'} (single-character string).  The old Numeric
+single-character typecodes (C{'f'},C{'d'},C{'h'},
+C{'s'},C{'b'},C{'B'},C{'c'},C{'i'},C{'l'}), corresponding to
+(C{'f4'},C{'f8'},C{'i2'},C{'i2'},C{'i1'},C{'i1'},C{'S1'},C{'i4'},C{'i4'}),
+will also work. The unsigned integer types and the 64-bit integer type
+can only be used if the file format is C{NETCDF4}.
+
+The dimensions themselves are usually also defined as variables, called
+coordinate variables. The L{createVariable<Dataset.createVariable>}
+method returns an instance of the L{Variable} class whose methods can be
+used later to access and set variable data and attributes.
+
+>>> times = rootgrp.createVariable('time','f8',('time',))
+>>> levels = rootgrp.createVariable('level','i4',('level',))
+>>> latitudes = rootgrp.createVariable('latitude','f4',('lat',))
+>>> longitudes = rootgrp.createVariable('longitude','f4',('lon',))
+>>> # two dimensions unlimited.
+>>> temp = rootgrp.createVariable('temp','f4',('time','level','lat','lon',))
+
+All of the variables in the L{Dataset} or L{Group} are stored in a
+Python dictionary, in the same way as the dimensions:
+
+>>> print rootgrp.variables
+OrderedDict([('time', <netCDF4.Variable object at 0x1b4ba70>),
+             ('level', <netCDF4.Variable object at 0x1b4bab0>), 
+             ('latitude', <netCDF4.Variable object at 0x1b4baf0>),
+             ('longitude', <netCDF4.Variable object at 0x1b4bb30>),
+             ('temp', <netCDF4.Variable object at 0x1b4bb70>)])
+>>>
+
+To get summary info on a L{Variable} instance in an interactive session, just print it.
+
+>>> print rootgrp.variables['temp']
+<type 'netCDF4.Variable'>
+float32 temp(time, level, lat, lon)
+    least_significant_digit: 3
+    units: K
+unlimited dimensions: time, level
+current shape = (0, 0, 73, 144)
+>>>
+
+L{Variable} names can be changed using the
+L{renameVariable<Dataset.renameVariable>} method of a L{Dataset}
+instance.
+            
+
+5) Attributes in a netCDF file
+------------------------------
+
+There are two types of attributes in a netCDF file, global and variable. 
+Global attributes provide information about a group, or the entire
+dataset, as a whole. L{Variable} attributes provide information about
+one of the variables in a group. Global attributes are set by assigning
+values to L{Dataset} or L{Group} instance variables. L{Variable}
+attributes are set by assigning values to L{Variable} instances
+variables. Attributes can be strings, numbers or sequences. Returning to
+our example,
+
+>>> import time
+>>> rootgrp.description = 'bogus example script'
+>>> rootgrp.history = 'Created ' + time.ctime(time.time())
+>>> rootgrp.source = 'netCDF4 python module tutorial'
+>>> latitudes.units = 'degrees north'
+>>> longitudes.units = 'degrees east'
+>>> levels.units = 'hPa'
+>>> temp.units = 'K'
+>>> times.units = 'hours since 0001-01-01 00:00:00.0'
+>>> times.calendar = 'gregorian'
+
+The L{ncattrs<Dataset.ncattrs>} method of a L{Dataset}, L{Group} or
+L{Variable} instance can be used to retrieve the names of all the netCDF
+attributes. This method is provided as a convenience, since using the
+built-in C{dir} Python function will return a bunch of private methods
+and attributes that cannot (or should not) be modified by the user.
+
+>>> for name in rootgrp.ncattrs():
+>>>     print 'Global attr', name, '=', getattr(rootgrp,name)
+Global attr description = bogus example script
+Global attr history = Created Mon Nov  7 10.30:56 2005
+Global attr source = netCDF4 python module tutorial
+
+The C{__dict__} attribute of a L{Dataset}, L{Group} or L{Variable} 
+instance provides all the netCDF attribute name/value pairs in a python 
+dictionary:
+
+>>> print rootgrp.__dict__
+OrderedDict([(u'description', u'bogus example script'),
+             (u'history', u'Created Thu Mar  3 19:30:33 2011'), 
+             (u'source', u'netCDF4 python module tutorial')])
+
+Attributes can be deleted from a netCDF L{Dataset}, L{Group} or
+L{Variable} using the python C{del} statement (i.e. C{del grp.foo}
+removes the attribute C{foo} the the group C{grp}).
+
+6) Writing data to and retrieving data from a netCDF variable
+-------------------------------------------------------------
+
+Now that you have a netCDF L{Variable} instance, how do you put data
+into it? You can just treat it like an array and assign data to a slice.
+
+>>> import numpy 
+>>> lats =  numpy.arange(-90,91,2.5)
+>>> lons =  numpy.arange(-180,180,2.5)
+>>> latitudes[:] = lats
+>>> longitudes[:] = lons
+>>> print 'latitudes =\\n',latitudes[:]
+latitudes =
+[-90.  -87.5 -85.  -82.5 -80.  -77.5 -75.  -72.5 -70.  -67.5 -65.  -62.5
+ -60.  -57.5 -55.  -52.5 -50.  -47.5 -45.  -42.5 -40.  -37.5 -35.  -32.5
+ -30.  -27.5 -25.  -22.5 -20.  -17.5 -15.  -12.5 -10.   -7.5  -5.   -2.5
+   0.    2.5   5.    7.5  10.   12.5  15.   17.5  20.   22.5  25.   27.5
+  30.   32.5  35.   37.5  40.   42.5  45.   47.5  50.   52.5  55.   57.5
+  60.   62.5  65.   67.5  70.   72.5  75.   77.5  80.   82.5  85.   87.5
+  90. ]
+>>>
+
+Unlike NumPy's array objects, netCDF L{Variable} 
+objects with unlimited dimensions will grow along those dimensions if you 
+assign data outside the currently defined range of indices.
+
+>>> # append along two unlimited dimensions by assigning to slice.
+>>> nlats = len(rootgrp.dimensions['lat'])
+>>> nlons = len(rootgrp.dimensions['lon'])
+>>> print 'temp shape before adding data = ',temp.shape
+temp shape before adding data =  (0, 0, 73, 144)
+>>>
+>>> from numpy.random import uniform
+>>> temp[0:5,0:10,:,:] = uniform(size=(5,10,nlats,nlons))
+>>> print 'temp shape after adding data = ',temp.shape
+temp shape after adding data =  (6, 10, 73, 144)
+>>>
+>>> # levels have grown, but no values yet assigned.
+>>> print 'levels shape after adding pressure data = ',levels.shape
+levels shape after adding pressure data =  (10,)
+>>>
+
+Note that the size of the levels variable grows when data is appended
+along the C{level} dimension of the variable C{temp}, even though no
+data has yet been assigned to levels.
+
+>>> # now, assign data to levels dimension variable.
+>>> levels[:] =  [1000.,850.,700.,500.,300.,250.,200.,150.,100.,50.]
+
+However, that there are some differences between NumPy and netCDF 
+variable slicing rules. Slices behave as usual, being specified as a 
+C{start:stop:step} triplet. Using a scalar integer index C{i} takes the ith 
+element and reduces the rank of the output array by one. Boolean array and
+integer sequence indexing behaves differently for netCDF variables
+than for numpy arrays.  Only 1-d boolean arrays and integer sequences are
+allowed, and these indices work independently along each dimension (similar
+to the way vector subscripts work in fortran).  This means that
+
+>>> temp[0, 0, [0,1,2,3], [0,1,2,3]]
+
+returns an array of shape (4,4) when slicing a netCDF variable, but for a
+numpy array it returns an array of shape (4,).  
+Similarly, a netCDF variable of shape C{(2,3,4,5)} indexed
+with C{[0, array([True, False, True]), array([False, True, True, True]), :]}
+would return a C{(2, 3, 5)} array. In NumPy, this would raise an error since
+it would be equivalent to C{[0, [0,1], [1,2,3], :]}. When slicing with integer
+sequences, the indices must be sorted in increasing order and contain no duplicates.
+While this behaviour may cause some confusion for those used to NumPy's 'fancy indexing' rules,
+it provides a very powerful way to extract data from multidimensional netCDF
+variables by using logical operations on the dimension arrays to create slices.
+
+For example, 
+
+>>> tempdat = temp[::2, [1,3,6], lats>0, lons>0]
+
+will extract time indices 0,2 and 4, pressure levels
+850, 500 and 200 hPa, all Northern Hemisphere latitudes and Eastern
+Hemisphere longitudes, resulting in a numpy array of shape  (3, 3, 36, 71).
+
+>>> print 'shape of fancy temp slice = ',tempdat.shape
+shape of fancy temp slice =  (3, 3, 36, 71)
+>>>
+
+Time coordinate values pose a special challenge to netCDF users.  Most
+metadata standards (such as CF and COARDS) specify that time should be
+measure relative to a fixed date using a certain calendar, with units
+specified like C{hours since YY:MM:DD hh-mm-ss}.  These units can be
+awkward to deal with, without a utility to convert the values to and
+from calendar dates.  The functione called L{num2date} and L{date2num} are
+provided with this package to do just that.  Here's an example of how they
+can be used:
+
+>>> # fill in times.
+>>> from datetime import datetime, timedelta
+>>> from netCDF4 import num2date, date2num
+>>> dates = [datetime(2001,3,1)+n*timedelta(hours=12) for n in range(temp.shape[0])]
+>>> times[:] = date2num(dates,units=times.units,calendar=times.calendar)
+>>> print 'time values (in units %s): ' % times.units+'\\n',times[:]
+time values (in units hours since January 1, 0001): 
+[ 17533056.  17533068.  17533080.  17533092.  17533104.]
+>>>
+>>> dates = num2date(times[:],units=times.units,calendar=times.calendar)
+>>> print 'dates corresponding to time values:\\n',dates
+dates corresponding to time values:
+[2001-03-01 00:00:00 2001-03-01 12:00:00 2001-03-02 00:00:00
+ 2001-03-02 12:00:00 2001-03-03 00:00:00]
+>>>
+
+L{num2date} converts numeric values of time in the specified C{units}
+and C{calendar} to datetime objects, and L{date2num} does the reverse.
+All the calendars currently defined in the U{CF metadata convention 
+<http://cf-pcmdi.llnl.gov/documents/cf-conventions/>} are supported.
+A function called L{date2index} is also provided which returns the indices
+of a netCDF time variable corresponding to a sequence of datetime instances.
+
+
+7) Reading data from a multi-file netCDF dataset.
+-------------------------------------------------
+
+If you want to read data from a variable that spans multiple netCDF files,
+you can use the L{MFDataset} class to read the data as if it were 
+contained in a single file. Instead of using a single filename to create
+a L{Dataset} instance, create a L{MFDataset} instance with either a list
+of filenames, or a string with a wildcard (which is then converted to
+a sorted list of files using the python glob module).
+Variables in the list of files that share the same unlimited 
+dimension are aggregated together, and can be sliced across multiple
+files.  To illustrate this, let's first create a bunch of netCDF files with
+the same variable (with the same unlimited dimension).  The files
+must in be in C{NETCDF3_64BIT}, C{NETCDF3_CLASSIC} or 
+C{NETCDF4_CLASSIC format} (C{NETCDF4} formatted multi-file
+datasets are not supported).
+
+>>> for nfile in range(10):
+>>>     f = Dataset('mftest'+repr(nfile)+'.nc','w',format='NETCDF4_CLASSIC')
+>>>     f.createDimension('x',None)
+>>>     x = f.createVariable('x','i',('x',))
+>>>     x[0:10] = numpy.arange(nfile*10,10*(nfile+1))
+>>>     f.close()
+
+Now read all the files back in at once with L{MFDataset}
+
+>>> from netCDF4 import MFDataset
+>>> f = MFDataset('mftest*nc')
+>>> print f.variables['x'][:]
+[ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
+ 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
+ 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
+ 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99]
+>>>
+
+Note that MFDataset can only be used to read, not write, multi-file
+datasets. 
+
+8) Efficient compression of netCDF variables
+--------------------------------------------
+
+Data stored in netCDF 4 L{Variable} objects can be compressed and
+decompressed on the fly. The parameters for the compression are
+determined by the C{zlib}, C{complevel} and C{shuffle} keyword arguments
+to the L{createVariable<Dataset.createVariable>} method. To turn on
+compression, set C{zlib=True}.  The C{complevel} keyword regulates the
+speed and efficiency of the compression (1 being fastest, but lowest
+compression ratio, 9 being slowest but best compression ratio). The
+default value of C{complevel} is 4. Setting C{shuffle=False} will turn
+off the HDF5 shuffle filter, which de-interlaces a block of data before
+compression by reordering the bytes.  The shuffle filter can
+significantly improve compression ratios, and is on by default.  Setting
+C{fletcher32} keyword argument to
+L{createVariable<Dataset.createVariable>} to C{True} (it's C{False} by
+default) enables the Fletcher32 checksum algorithm for error detection.
+It's also possible to set the HDF5 chunking parameters and endian-ness
+of the binary data stored in the HDF5 file with the C{chunksizes}
+and C{endian} keyword arguments to
+L{createVariable<Dataset.createVariable>}.  These keyword arguments only
+are relevant for C{NETCDF4} and C{NETCDF4_CLASSIC} files (where the
+underlying file format is HDF5) and are silently ignored if the file
+format is C{NETCDF3_CLASSIC} or C{NETCDF3_64BIT},
+
+If your data only has a certain number of digits of precision (say for
+example, it is temperature data that was measured with a precision of
+0.1 degrees), you can dramatically improve zlib compression by
+quantizing (or truncating) the data using the C{least_significant_digit}
+keyword argument to L{createVariable<Dataset.createVariable>}. The least
+significant digit is the power of ten of the smallest decimal place in
+the data that is a reliable value. For example if the data has a
+precision of 0.1, then setting C{least_significant_digit=1} will cause
+data the data to be quantized using C{numpy.around(scale*data)/scale}, where
+scale = 2**bits, and bits is determined so that a precision of 0.1 is
+retained (in this case bits=4).  Effectively, this makes the compression
+'lossy' instead of 'lossless', that is some precision in the data is
+sacrificed for the sake of disk space.
+
+In our example, try replacing the line
+
+>>> temp = rootgrp.createVariable('temp','f4',('time','level','lat','lon',))
+
+with
+
+>>> temp = dataset.createVariable('temp','f4',('time','level','lat','lon',),zlib=True)
+
+and then
+
+>>> temp = dataset.createVariable('temp','f4',('time','level','lat','lon',),zlib=True,least_significant_digit=3)
+
+and see how much smaller the resulting files are.
+
+9) Beyond homogenous arrays of a fixed type - compound data types
+-----------------------------------------------------------------
+
+Compound data types map directly to numpy structured (a.k.a 'record'
+arrays).  Structured arrays are akin to C structs, or derived types
+in Fortran. They allow for the construction of table-like structures
+composed of combinations of other data types, including other 
+compound types. Compound types might be useful for representing multiple
+parameter values at each point on a grid, or at each time and space
+location for scattered (point) data. You can then access all the
+information for a point by reading one variable, instead of reading
+different parameters from different variables.  Compound data types
+are created from the corresponding numpy data type using the 
+L{createCompoundType<Dataset.createCompoundType>} method of a L{Dataset} or L{Group} instance.
+Since there is no native complex data type in netcdf, compound types are handy
+for storing numpy complex arrays.  Here's an example:
+
+>>> f = Dataset('complex.nc','w')
+>>> size = 3 # length of 1-d complex array
+>>> # create sample complex data.
+>>> datac = numpy.exp(1j*(1.+numpy.linspace(0, numpy.pi, size)))
+>>> # create complex128 compound data type.
+>>> complex128 = numpy.dtype([('real',numpy.float64),('imag',numpy.float64)])
+>>> complex128_t = f.createCompoundType(complex128,'complex128')
+>>> # create a variable with this data type, write some data to it.
+>>> f.createDimension('x_dim',None)
+>>> v = f.createVariable('cmplx_var',complex128_t,'x_dim')
+>>> data = numpy.empty(size,complex128) # numpy structured array
+>>> data['real'] = datac.real; data['imag'] = datac.imag
+>>> v[:] = data # write numpy structured array to netcdf compound var
+>>> # close and reopen the file, check the contents.
+>>> f.close(); f = Dataset('complex.nc')
+>>> v = f.variables['cmplx_var']
+>>> datain = v[:] # read in all the data into a numpy structured array
+>>> # create an empty numpy complex array
+>>> datac2 = numpy.empty(datain.shape,numpy.complex128)
+>>> # .. fill it with contents of structured array.
+>>> datac2.real = datain['real']; datac2.imag = datain['imag']
+>>> print datac.dtype,datac # original data
+complex128 [ 0.54030231+0.84147098j -0.84147098+0.54030231j  -0.54030231-0.84147098j]
+>>>
+>>> print datac2.dtype,datac2 # data from file
+complex128 [ 0.54030231+0.84147098j -0.84147098+0.54030231j  -0.54030231-0.84147098j]
+>>>
+
+Compound types can be nested, but you must create the 'inner'
+ones first. All of the compound types defined for a L{Dataset} or L{Group} are stored in a
+Python dictionary, just like variables and dimensions. As always, printing
+objects gives useful summary information in an interactive session:
+
+>>> print f
+<type 'netCDF4.Dataset'>
+root group (NETCDF4 file format):
+    dimensions: x_dim
+    variables: cmplx_var
+    groups:
+<type 'netCDF4.Variable'>
+>>> print f.variables['cmplx_var']
+compound cmplx_var(x_dim)
+compound data type: [('real', '<f8'), ('imag', '<f8')]
+unlimited dimensions: x_dim
+current shape = (3,)
+>>> print f.cmptypes
+OrderedDict([('complex128', <netCDF4.CompoundType object at 0x1029eb7e8>)])
+>>> print f.cmptypes['complex128']
+<type 'netCDF4.CompoundType'>: name = 'complex128', numpy dtype = [(u'real','<f8'), (u'imag', '<f8')]
+>>>
+
+10) Variable-length (vlen) data types.
+--------------------------------------
+
+NetCDF 4 has support for variable-length or "ragged" arrays.  These are arrays
+of variable length sequences having the same type. To create a variable-length 
+data type, use the L{createVLType<Dataset.createVLType>} method
+method of a L{Dataset} or L{Group} instance.
+
+>>> f = Dataset('tst_vlen.nc','w')
+>>> vlen_t = f.createVLType(numpy.int32, 'phony_vlen')
+
+The numpy datatype of the variable-length sequences and the name of the 
+new datatype must be specified. Any of the primitive datatypes can be 
+used (signed and unsigned integers, 32 and 64 bit floats, and characters),
+but compound data types cannot.
+A new variable can then be created using this datatype.
+
+>>> x = f.createDimension('x',3)
+>>> y = f.createDimension('y',4)
+>>> vlvar = f.createVariable('phony_vlen_var', vlen_t, ('y','x'))
+
+Since there is no native vlen datatype in numpy, vlen arrays are represented
+in python as object arrays (arrays of dtype C{object}). These are arrays whose 
+elements are Python object pointers, and can contain any type of python object.
+For this application, they must contain 1-D numpy arrays all of the same type
+but of varying length.
+In this case, they contain 1-D numpy C{int32} arrays of random length betwee
+1 and 10.
+
+>>> import random
+>>> data = numpy.empty(len(y)*len(x),object)
+>>> for n in range(len(y)*len(x)):
+>>>    data[n] = numpy.arange(random.randint(1,10),dtype='int32')+1
+>>> data = numpy.reshape(data,(len(y),len(x)))
+>>> vlvar[:] = data
+>>> print 'vlen variable =\\n',vlvar[:]
+vlen variable =
+[[[ 1  2  3  4  5  6  7  8  9 10] [1 2 3 4 5] [1 2 3 4 5 6 7 8]]
+ [[1 2 3 4 5 6 7] [1 2 3 4 5 6] [1 2 3 4 5]]
+ [[1 2 3 4 5] [1 2 3 4] [1]]
+ [[ 1  2  3  4  5  6  7  8  9 10] [ 1  2  3  4  5  6  7  8  9 10]
+  [1 2 3 4 5 6 7 8]]]
+>>> print f
+<type 'netCDF4.Dataset'>
+root group (NETCDF4 file format):
+    dimensions: x, y
+    variables: phony_vlen_var
+    groups:
+>>> print f.variables['phony_vlen_var']
+<type 'netCDF4.Variable'>
+vlen phony_vlen_var(y, x)
+vlen data type: int32
+unlimited dimensions:
+current shape = (4, 3)
+>>> print f.VLtypes['phony_vlen']
+<type 'netCDF4.VLType'>: name = 'phony_vlen', numpy dtype = int32
+>>>
+
+Numpy object arrays containing python strings can also be written as vlen
+variables,  For vlen strings, you don't need to create a vlen data type. 
+Instead, simply use the python C{str} builtin (or a numpy string datatype
+with fixed length greater than 1) when calling the
+L{createVariable<Dataset.createVariable>} method.  
+
+>>> z = f.createDimension('z',10)
+>>> strvar = rootgrp.createVariable('strvar', str, 'z')
+
+In this example, an object array is filled with random python strings with
+random lengths between 2 and 12 characters, and the data in the object 
+array is assigned to the vlen string variable.
+
+>>> chars = '1234567890aabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+>>> data = numpy.empty(10,'O')
+>>> for n in range(10):
+>>>     stringlen = random.randint(2,12)
+>>>     data[n] = ''.join([random.choice(chars) for i in range(stringlen)])
+>>> strvar[:] = data
+>>> print 'variable-length string variable:\\n',strvar[:]
+variable-length string variable:
+[aDy29jPt jd7aplD b8t4RM jHh8hq KtaPWF9cQj Q1hHN5WoXSiT MMxsVeq td LUzvVTzj
+ 5DS9X8S]
+>>> print f
+<type 'netCDF4.Dataset'>
+root group (NETCDF4 file format):
+    dimensions: x, y, z
+    variables: phony_vlen_var, strvar
+    groups:
+>>> print f.variables['strvar']
+<type 'netCDF4.Variable'>
+vlen strvar(z)
+vlen data type: <type 'str'>
+unlimited dimensions:
+current size = (10,)
+>>>
+
+It is also possible to set contents of vlen string variables with numpy arrays
+of any string or unicode data type. Note, however, that accessing the contents
+of such variables will always return numpy arrays with dtype C{object}.
+
+All of the code in this tutorial is available in C{examples/tutorial.py},
+Unit tests are in the C{test} directory.
+
+ at contact: Jeffrey Whitaker <jeffrey.s.whitaker at noaa.gov>
+
+ at copyright: 2008 by Jeffrey Whitaker.
+
+ at license: Permission to use, copy, modify, and distribute this software and
+its documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both the copyright notice and this permission notice appear in
+supporting documentation.
+THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
+EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE."""
+__test__ = None
+del __test__ # hack so epydoc doesn't show __test__
+
+# Make changes to this file, not the c-wrappers that Pyrex generates.
+
+# pure python utilities
+from netCDF4_utils import _StartCountStride, _quantize, _find_dim, _walk_grps, \
+                          _out_array_shape, _sortbylist, _tostr
+# try to use built-in ordered dict in python >= 2.7
+try:
+    from collections import OrderedDict
+except ImportError: # or else use drop-in substitute
+    try:
+        from ordereddict import OrderedDict
+    except ImportError:
+        raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)')
+try:
+    from itertools import izip as zip
+except ImportError:
+    # python3: zip is already python2's itertools.izip
+    pass
+
+__version__ = "1.1.4"
+
+# Initialize numpy
+import posixpath
+import netcdftime
+import numpy
+import weakref
+import sys
+import warnings
+from glob import glob
+from numpy import ma
+from numpy import __version__ as _npversion
+if _npversion.split('.')[0] < '1':
+    raise ImportError('requires numpy version 1.0rc1 or later')
+import_array()
+include "netCDF4.pxi"
+# include pure python utility functions and MFDataset class.
+# (use include instead of importing them so docstrings
+#  get included in C extension code).
+include "utils.pyx"
+include "constants.pyx"
+
+# check for required version of netcdf-4 and hdf5.
+
+def _gethdf5libversion():
+    majorvers = H5_VERS_MAJOR
+    minorvers = H5_VERS_MINOR
+    releasevers = H5_VERS_RELEASE
+    patchstring = H5_VERS_SUBRELEASE.decode('ascii')
+    if not patchstring:
+       return '%d.%d.%d' % (majorvers,minorvers,releasevers)
+    else:
+       return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
+
+__netcdf4libversion__ = getlibversion().split()[0]
+__hdf5libversion__ = _gethdf5libversion()
+__has_rename_grp__ = HAS_RENAME_GRP
+__has_nc_inq_path__ = HAS_NC_INQ_PATH
+__has_nc_inq_format_extended__ = HAS_NC_INQ_FORMAT_EXTENDED
+
+
+# numpy data type <--> netCDF 4 data type mapping.
+
+_nptonctype  = {'U1' : NC_CHAR,
+                'S1' : NC_CHAR,
+                'i1' : NC_BYTE,
+                'u1' : NC_UBYTE,
+                'i2' : NC_SHORT,
+                'u2' : NC_USHORT,
+                'i4' : NC_INT,
+                'u4' : NC_UINT,
+                'i8' : NC_INT64,
+                'u8' : NC_UINT64,
+                'f4' : NC_FLOAT,
+                'f8' : NC_DOUBLE}
+
+default_fillvals = {#'S1':NC_FILL_CHAR, 
+                     'U1':'\0',
+                     'S1':'\0',
+                     'i1':NC_FILL_BYTE,
+                     'u1':NC_FILL_UBYTE,
+                     'i2':NC_FILL_SHORT,
+                     'u2':NC_FILL_USHORT,
+                     'i4':NC_FILL_INT,
+                     'u4':NC_FILL_UINT,
+                     'i8':NC_FILL_INT64,
+                     'u8':NC_FILL_UINT64,
+                     'f4':NC_FILL_FLOAT,
+                     'f8':NC_FILL_DOUBLE}
+
+is_native_little = numpy.dtype('<f4').byteorder == '='
+is_native_big = numpy.dtype('>f4').byteorder == '='
+
+# hard code this here, instead of importing from netcdf.h
+# so it will compile with versions <= 4.2.
+NC_DISKLESS = 0x0008
+# encoding used to convert strings to bytes when writing text data
+# to the netcdf file, and for converting bytes to strings when reading
+# from the netcdf file.
+default_encoding = 'utf-8'
+# unicode decode/encode error handling.  Replace bad chars with "?"
+# can be set to 'strict' or 'ignore'.
+unicode_error = 'replace'
+python3 = sys.version_info[0] > 2
+
+_nctonptype = {}
+for _key,_value in _nptonctype.items():
+    _nctonptype[_value] = _key
+_supportedtypes = _nptonctype.keys()
+# make sure NC_CHAR points to S1
+_nctonptype[NC_CHAR]='S1'
+
+# internal C functions.
+
+cdef _get_att_names(int grpid, int varid):
+    # Private function to get all the attribute names in a group
+    cdef int ierr, numatts, n
+    cdef char namstring[NC_MAX_NAME+1]
+    if varid == NC_GLOBAL:
+        ierr = nc_inq_natts(grpid, &numatts)
+    else:
+        ierr = nc_inq_varnatts(grpid, varid, &numatts)
+    if ierr != NC_NOERR:
+        raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+    attslist = []
+    for n from 0 <= n < numatts:
+        ierr = nc_inq_attname(grpid, varid, n, namstring)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        attslist.append(namstring.decode(default_encoding,unicode_error))
+    return attslist
+
+cdef _get_att(grp, int varid, name):
+    # Private function to get an attribute value given its name
+    cdef int ierr, n
+    cdef size_t att_len
+    cdef char *attname
+    cdef char *stratt
+    cdef nc_type att_type
+    cdef ndarray value_arr
+    bytestr = _strencode(name)
+    attname = bytestr
+    ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)
+    if ierr != NC_NOERR:
+        raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+    # attribute is a character or string ...
+    if att_type == NC_CHAR:
+        value_arr = numpy.empty(att_len,'S1')
+        ierr = nc_get_att_text(grp._grpid, varid, attname, <char *>value_arr.data)
+        if ierr != NC_NOERR:
+            raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        if name == '_FillValue' and python3:
+            # make sure _FillValue for character arrays is a byte on python 3
+            # (issue 271).
+            pstring = bytes(value_arr)
+        else:
+            pstring =\
+            value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
+        return pstring
+    elif att_type == NC_STRING:
+        if att_len == 1:
+            ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)
+            pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
+            return pstring
+        else:
+            raise KeyError('vlen string array attributes not supported')
+    else:
+    # a regular numeric or compound type.
+        if att_type == NC_LONG:
+            att_type = NC_INT
+        try:
+            type_att = _nctonptype[att_type] # see if it is a primitive type
+        except KeyError:
+            # check if it's a compound
+            try:
+                type_att = _read_compound(grp, att_type)
+            except:
+                raise KeyError('attribute %s has unsupported datatype' % attname)
+        value_arr = numpy.empty(att_len,type_att)
+        ierr = nc_get_att(grp._grpid, varid, attname, value_arr.data)
+        if ierr != NC_NOERR:
+            raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        if value_arr.shape == ():
+            # return a scalar for a scalar array
+            return value_arr.item()
+        elif att_len == 1:
+            # return a scalar for a single element array
+            return value_arr[0]
+        else:
+            return value_arr
+
+def _set_default_format(object format='NETCDF4'):
+    # Private function to set the netCDF file format
+    if format == 'NETCDF4':
+        nc_set_default_format(NC_FORMAT_NETCDF4, NULL)
+    elif format == 'NETCDF4_CLASSIC':
+        nc_set_default_format(NC_FORMAT_NETCDF4_CLASSIC, NULL)
+    elif format == 'NETCDF3_64BIT':
+        nc_set_default_format(NC_FORMAT_64BIT, NULL)
+    elif format == 'NETCDF3_CLASSIC':
+        nc_set_default_format(NC_FORMAT_CLASSIC, NULL)
+    else:
+        raise ValueError("format must be 'NETCDF4', 'NETCDF4_CLASSIC', 'NETCDF3_64BIT', or 'NETCDF3_CLASSIC', got '%s'" % format)
+
+cdef _get_format(int grpid):
+    # Private function to get the netCDF file format
+    cdef int ierr, formatp
+    ierr = nc_inq_format(grpid, &formatp)
+    if ierr != NC_NOERR:
+        raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+    if formatp == NC_FORMAT_NETCDF4:
+        return 'NETCDF4'
+    elif formatp == NC_FORMAT_NETCDF4_CLASSIC:
+        return 'NETCDF4_CLASSIC'
+    elif formatp == NC_FORMAT_64BIT:
+        return 'NETCDF3_64BIT'
+    elif formatp == NC_FORMAT_CLASSIC:
+        return 'NETCDF3_CLASSIC'
+
+cdef _get_full_format(int grpid):
+    # Private function to get the underlying disk format
+    cdef int ierr, formatp, modep
+    IF HAS_NC_INQ_FORMAT_EXTENDED:
+        ierr = nc_inq_format_extended(grpid, &formatp, &modep)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        if formatp == NC_FORMAT_NC3:
+            return 'NETCDF3'
+        elif formatp == NC_FORMAT_NC_HDF5:
+            return 'HDF5'
+        elif formatp == NC_FORMAT_NC_HDF4:
+            return 'HDF4'
+        elif formatp == NC_FORMAT_PNETCDF:
+            return 'PNETCDF'
+        elif formatp == NC_FORMAT_DAP2:
+            return 'DAP2'
+        elif formatp == NC_FORMAT_DAP4:
+            return 'DAP4'
+        elif formatp == NC_FORMAT_UNDEFINED:
+            return 'UNDEFINED'
+    ELSE:
+        return 'UNDEFINED'
+
+cdef _set_att(grp, int varid, name, value):
+    # Private function to set an attribute name/value pair
+    cdef int i, ierr, lenarr, n
+    cdef char *attname
+    cdef char *datstring
+    cdef ndarray value_arr 
+    bytestr = _strencode(name)
+    attname = bytestr
+    # put attribute value into a numpy array.
+    value_arr = numpy.array(value)
+    # if array is 64 bit integers or
+    # if 64-bit datatype not supported, cast to 32 bit integers.
+    fmt = _get_format(grp._grpid)
+    is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC'
+    if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\
+       is_netcdf3):
+        value_arr = value_arr.astype('i4')
+    # if array contains strings, write a text attribute.
+    if value_arr.dtype.char in ['S','U']:
+        if not value_arr.shape:
+            dats = _strencode(value_arr.item())
+        else:
+            value_arr1 = value_arr.ravel()
+            dats = _strencode(''.join(value_arr1.tolist()))
+        lenarr = len(dats)
+        datstring = dats
+        if lenarr == 0:
+            # write null byte
+            lenarr=1; datstring = '\x00'
+        ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
+        if ierr != NC_NOERR:
+            raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+    # a 'regular' array type ('f4','i4','f8' etc)
+    else:
+        if value_arr.dtype.kind == 'V': # compound attribute.
+            xtype = _find_cmptype(grp,value_arr.dtype)
+        elif value_arr.dtype.str[1:] not in _supportedtypes:
+            raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:])
+        else:
+            xtype = _nptonctype[value_arr.dtype.str[1:]]
+        lenarr = PyArray_SIZE(value_arr)
+        ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data)
+        if ierr != NC_NOERR:
+            raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+
+cdef _get_types(group):
+    # Private function to create L{CompoundType} or L{VLType} instances for all the
+    # compound or VLEN types in a L{Group} or L{Dataset}.
+    cdef int ierr, ntypes, classp, n
+    cdef nc_type xtype
+    cdef nc_type typeids[NC_MAX_VARS]
+    cdef char namstring[NC_MAX_NAME+1]
+    # get the number of user defined types in this group.
+    ierr = nc_inq_typeids(group._grpid, &ntypes, typeids)
+    if ierr != NC_NOERR:
+        raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+    # create empty dictionary for CompoundType instances.
+    cmptypes = OrderedDict()
+    vltypes = OrderedDict()
+    if ntypes > 0:
+        for n from 0 <= n < ntypes:
+            xtype = typeids[n]
+            ierr = nc_inq_user_type(group._grpid, xtype, namstring,
+                                    NULL,NULL,NULL,&classp)
+            if ierr != NC_NOERR:
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+            if classp == NC_COMPOUND: # a compound
+                name = namstring.decode(default_encoding,unicode_error)
+                # read the compound type info from the file,
+                # create a CompoundType instance from it.
+                try:
+                    cmptype = _read_compound(group, xtype)
+                except KeyError:
+                    #print 'WARNING: unsupported compound type, skipping...'
+                    continue
+                cmptypes[name] = cmptype
+            elif classp == NC_VLEN: # a vlen
+                name = namstring.decode(default_encoding,unicode_error)
+                # read the VLEN type info from the file,
+                # create a VLType instance from it.
+                try:
+                    vltype = _read_vlen(group, xtype)
+                except KeyError:
+                    #print 'WARNING: unsupported VLEN type, skipping...'
+                    continue
+                vltypes[name] = vltype
+                pass
+    return cmptypes, vltypes
+
+cdef _get_dims(group):
+    # Private function to create L{Dimension} instances for all the
+    # dimensions in a L{Group} or Dataset
+    cdef int ierr, numdims, n
+    cdef int dimids[NC_MAX_DIMS]
+    cdef char namstring[NC_MAX_NAME+1]
+    # get number of dimensions in this Group.
+    ierr = nc_inq_ndims(group._grpid, &numdims)
+    if ierr != NC_NOERR:
+        raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+    # create empty dictionary for dimensions.
+    dimensions = OrderedDict()
+    if numdims > 0:
+        if group.data_model == 'NETCDF4':
+            ierr = nc_inq_dimids(group._grpid, &numdims, dimids, 0)
+            if ierr != NC_NOERR:
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        else:
+            for n from 0 <= n < numdims:
+                dimids[n] = n
+        for n from 0 <= n < numdims:
+            ierr = nc_inq_dimname(group._grpid, dimids[n], namstring)
+            if ierr != NC_NOERR:
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+            name = namstring.decode(default_encoding,unicode_error)
+            dimensions[name] = Dimension(group, name, id=dimids[n])
+    return dimensions
+
+cdef _get_grps(group):
+    # Private function to create L{Group} instances for all the
+    # groups in a L{Group} or Dataset
+    cdef int ierr, numgrps, n
+    cdef int *grpids
+    cdef char namstring[NC_MAX_NAME+1]
+    # get number of groups in this Group.
+    ierr = nc_inq_grps(group._grpid, &numgrps, NULL)
+    if ierr != NC_NOERR:
+        raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+    # create dictionary containing L{Group} instances for groups in this group
+    groups = OrderedDict()
+    if numgrps > 0:
+        grpids = <int *>malloc(sizeof(int) * numgrps)
+        ierr = nc_inq_grps(group._grpid, NULL, grpids)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        for n from 0 <= n < numgrps:
+             ierr = nc_inq_grpname(grpids[n], namstring)
+             if ierr != NC_NOERR:
+                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+             name = namstring.decode(default_encoding,unicode_error)
+             groups[name] = Group(group, name, id=grpids[n])
+        free(grpids)
+    return groups
+
+cdef _get_vars(group):
+    # Private function to create L{Variable} instances for all the
+    # variables in a L{Group} or Dataset
+    cdef int ierr, numvars, n, nn, numdims, varid, classp
+    cdef int *varids
+    cdef int dim_sizes[NC_MAX_DIMS]
+    cdef int dimids[NC_MAX_DIMS]
+    cdef nc_type xtype
+    cdef char namstring[NC_MAX_NAME+1]
+    cdef char namstring_cmp[NC_MAX_NAME+1]
+    # get number of variables in this Group.
+    ierr = nc_inq_nvars(group._grpid, &numvars)
+    if ierr != NC_NOERR:
+        raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+    # create empty dictionary for variables.
+    variables = OrderedDict()
+    if numvars > 0:
+        # get variable ids.
+        varids = <int *>malloc(sizeof(int) * numvars)
+        if group.data_model == 'NETCDF4':
+            ierr = nc_inq_varids(group._grpid, &numvars, varids)
+            if ierr != NC_NOERR:
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        else:
+            for n from 0 <= n < numvars:
+                varids[n] = n
+        # loop over variables. 
+        for n from 0 <= n < numvars:
+             varid = varids[n]
+             # get variable name.
+             ierr = nc_inq_varname(group._grpid, varid, namstring)
+             if ierr != NC_NOERR:
+                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+             name = namstring.decode(default_encoding,unicode_error)
+             if ierr != NC_NOERR:
+                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+             # get variable type.
+             ierr = nc_inq_vartype(group._grpid, varid, &xtype)
+             if ierr != NC_NOERR:
+                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+             # check to see if it is a supported user-defined type.
+             try:
+                 datatype = _nctonptype[xtype]
+             except KeyError:
+                 if xtype == NC_STRING:
+                     datatype = str
+                 else:
+                     ierr = nc_inq_user_type(group._grpid, xtype, namstring_cmp,
+                                             NULL, NULL, NULL, &classp)
+                     if classp == NC_COMPOUND: # a compound type
+                         # create CompoundType instance describing this compound type.
+                         try:
+                             datatype = _read_compound(group, xtype)
+                         except KeyError:
+                             #print "WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
+                             continue
+                     elif classp == NC_VLEN: # a compound type
+                         # create VLType instance describing this compound type.
+                         try:
+                             datatype = _read_vlen(group, xtype)
+                         except KeyError:
+                             #print "WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name
+                             continue
+                     else:
+                         #print "WARNING: variable '%s' has unsupported datatype, skipping .." % name
+                         continue
+             # get number of dimensions.
+             ierr = nc_inq_varndims(group._grpid, varid, &numdims)
+             if ierr != NC_NOERR:
+                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+             # get dimension ids.
+             ierr = nc_inq_vardimid(group._grpid, varid, dimids)
+             if ierr != NC_NOERR:
+                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+             # loop over dimensions, retrieve names.
+             # if not found in current group, look in parents.
+             # QUESTION:  what if grp1 has a dimension named 'foo'
+             # and so does it's parent - can a variable in grp1
+             # use the 'foo' dimension from the parent?  
+             dimensions = []
+             for nn from 0 <= nn < numdims:
+                 grp = group
+                 found = False
+                 while not found:
+                     for key, value in grp.dimensions.items():
+                         if value._dimid == dimids[nn]:
+                             dimensions.append(key)
+                             found = True
+                             break
+                     grp = grp.parent 
+             # create new variable instance.
+             variables[name] = Variable(group, name, datatype, dimensions, id=varid)
+        free(varids) # free pointer holding variable ids.
+    return variables
+
+# these are class attributes that 
+# only exist at the python level (not in the netCDF file).
+
+_private_atts =\
+['_grpid','_grp','_varid','groups','dimensions','variables','dtype','data_model','disk_format',
+ '_nunlimdim','path','parent','ndim','mask','scale','cmptypes','vltypes','_isprimitive',
+ 'file_format','_isvlen','_iscompound','_cmptype','_vltype','keepweakref','name']
+
+
+cdef class Dataset:
+    """
+Dataset(self, filename, mode="r", clobber=True, diskless=False, persist=False, keepweakref=False, format='NETCDF4')
+
+A netCDF L{Dataset} is a collection of dimensions, groups, variables and 
+attributes. Together they describe the meaning of data and relations among 
+data fields stored in a netCDF file.
+
+B{Parameters:}
+
+B{C{filename}} - Name of netCDF file to hold dataset.
+
+B{Keywords}:
+
+B{C{mode}} - access mode. C{r} means read-only; no data can be
+modified. C{w} means write; a new file is created, an existing file with
+the same name is deleted. C{a} and C{r+} mean append (in analogy with
+serial files); an existing file is opened for reading and writing.
+Appending C{s} to modes C{w}, C{r+} or C{a} will enable unbuffered shared
+access to C{NETCDF3_CLASSIC} or C{NETCDF3_64BIT} formatted files.
+Unbuffered acesss may be useful even if you don't need shared 
+access, since it may be faster for programs that don't access data
+sequentially. This option is ignored for C{NETCDF4} and C{NETCDF4_CLASSIC}
+formatted files.
+
+B{C{clobber}} - if C{True} (default), opening a file with C{mode='w'}
+will clobber an existing file with the same name.  if C{False}, an
+exception will be raised if a file with the same name already exists.
+
+B{C{format}} - underlying file format (one of C{'NETCDF4', 
+'NETCDF4_CLASSIC', 'NETCDF3_CLASSIC'} or C{'NETCDF3_64BIT'}.  Only 
+relevant if C{mode = 'w'} (if C{mode = 'r','a'} or C{'r+'} the file format 
+is automatically detected). Default C{'NETCDF4'}, which means the data is 
+stored in an HDF5 file, using netCDF 4 API features.  Setting 
+C{format='NETCDF4_CLASSIC'} will create an HDF5 file, using only netCDF 3 
+compatibile API features. netCDF 3 clients must be recompiled and linked 
+against the netCDF 4 library to read files in C{NETCDF4_CLASSIC} format. 
+C{'NETCDF3_CLASSIC'} is the classic netCDF 3 file format that does not 
+handle 2+ Gb files very well. C{'NETCDF3_64BIT'} is the 64-bit offset 
+version of the netCDF 3 file format, which fully supports 2+ GB files, but 
+is only compatible with clients linked against netCDF version 3.6.0 or 
+later.
+
+C{diskless} - create diskless (in memory) file.  This is an experimental 
+feature added to the C library after the netcdf-4.2 release.
+
+C{persist} - if diskless=True, persist file to disk when closed (default False).
+
+C{keepweakref} - if keepweakref=True, child Dimension and Variable instances will keep weak
+references to the parent Dataset or Group object.  Default is False, which
+means strong references will be kept.  Having Dimension and Variable instances
+keep a strong reference to the parent Dataset instance, which in turn keeps a
+reference to child Dimension and Variable instances, creates circular references.
+Circular references complicate garbage collection, which may mean increased
+memory usage for programs that create may Dataset instances with lots of
+Variables.  Setting keepweakref to True allows Dataset instances to be 
+garbage collected as soon as they go out of scope, potential reducing memory
+usage.  However, in most cases this is not desirable, since the associated
+Variable instances may still be needed, but are rendered unusable when the
+parent Dataset instance is garbage collected.
+
+B{Returns:}
+
+a L{Dataset} instance.  All further operations on the netCDF
+Dataset are accomplised via L{Dataset} instance methods.
+
+A list of attribute names corresponding to global netCDF attributes 
+defined for the L{Dataset} can be obtained with the L{ncattrs()} method. 
+These attributes can be created by assigning to an attribute of the 
+L{Dataset} instance. A dictionary containing all the netCDF attribute
+name/value pairs is provided by the C{__dict__} attribute of a
+L{Dataset} instance.
+
+The instance variables C{dimensions, variables, groups, 
+cmptypes, data_model, disk_format} and C{path} are read-only (and should not be modified by the 
+user).
+
+ at ivar dimensions: The C{dimensions} dictionary maps the names of 
+dimensions defined for the L{Group} or L{Dataset} to instances of the 
+L{Dimension} class.
+
+ at ivar variables: The C{variables} dictionary maps the names of variables 
+defined for this L{Dataset} or L{Group} to instances of the L{Variable} 
+class.
+
+ at ivar groups: The groups dictionary maps the names of groups created for 
+this L{Dataset} or L{Group} to instances of the L{Group} class (the 
+L{Dataset} class is simply a special case of the L{Group} class which 
+describes the root group in the netCDF file).
+
+ at ivar cmptypes: The C{cmptypes} dictionary maps the names of 
+compound types defined for the L{Group} or L{Dataset} to instances of the 
+L{CompoundType} class.
+
+ at ivar vltypes: The C{vltypes} dictionary maps the names of 
+variable-length types defined for the L{Group} or L{Dataset} to instances of the 
+L{VLType} class.
+
+ at ivar data_model: The C{data_model} attribute describes the netCDF
+data model version, one of C{NETCDF3_CLASSIC}, C{NETCDF4},
+C{NETCDF4_CLASSIC} or C{NETCDF3_64BIT}. 
+
+ at ivar file_format: same as C{data_model}, retained for backwards
+compatibility.
+
+ at ivar disk_format: The C{disk_format} attribute describes the underlying
+file format, one of C{NETCDF3}, C{HDF5}, C{HDF4},
+C{PNETCDF}, C{DAP2}, C{DAP4} or C{UNDEFINED}. Only available if using
+netcdf C library version >= 4.3.1, otherwise will always return C{UNDEFINED}.
+
+ at ivar path: The C{path} attribute shows the location of the L{Group} in
+the L{Dataset} in a unix directory format (the names of groups in the
+hierarchy separated by backslashes). A L{Dataset} instance is the root
+group, so the path is simply C{'/'}.
+
+ at ivar parent:  The C{parent} attribute is a reference to the parent
+L{Group} instance. C{None} for a the root group or L{Dataset} instance"""
+    cdef object __weakref__
+    cdef public int _grpid
+    cdef public int _isopen
+    cdef public groups, dimensions, variables, disk_format, path, parent,\
+    file_format, data_model, cmptypes, vltypes, keepweakref
+
+    def __init__(self, filename, mode='r', clobber=True, format='NETCDF4',
+                 diskless=False, persist=False, keepweakref=False, **kwargs):
+        cdef int grpid, ierr, numgrps, numdims, numvars
+        cdef char *path
+        cdef char namstring[NC_MAX_NAME+1]
+        if diskless and __netcdf4libversion__ < '4.2.1':
+            #diskless = False # don't raise error, instead silently ignore
+            raise ValueError('diskless mode requires netcdf lib >= 4.2.1, you have %s' % __netcdf4libversion__)
+        bytestr = _strencode(filename)
+        path = bytestr
+        if mode == 'w':
+            _set_default_format(format=format)
+            if clobber:
+                if diskless:
+                    if persist:
+                        ierr = nc_create(path, NC_WRITE | NC_CLOBBER | NC_DISKLESS , &grpid)
+                    else:
+                        ierr = nc_create(path, NC_CLOBBER | NC_DISKLESS , &grpid)
+                else:
+                    ierr = nc_create(path, NC_CLOBBER, &grpid)
+            else:
+                if diskless:
+                    if persist:
+                        ierr = nc_create(path, NC_WRITE | NC_NOCLOBBER | NC_DISKLESS , &grpid)
+                    else:
+                        ierr = nc_create(path, NC_NOCLOBBER | NC_DISKLESS , &grpid)
+                else:
+                    ierr = nc_create(path, NC_NOCLOBBER, &grpid)
+            # reset default format to netcdf3 - this is a workaround
+            # for issue 170 (nc_open'ing a DAP dataset after switching
+            # format to NETCDF4). This bug should be fixed in version
+            # 4.3.0 of the netcdf library (add a version check here?).
+            _set_default_format(format='NETCDF3_64BIT')
+        elif mode == 'r':
+            if diskless:
+                ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid)
+            else:
+                ierr = nc_open(path, NC_NOWRITE, &grpid)
+        elif mode == 'r+' or mode == 'a':
+            if diskless:
+                ierr = nc_open(path, NC_WRITE | NC_DISKLESS, &grpid)
+            else:
+                ierr = nc_open(path, NC_WRITE, &grpid)
+        elif mode == 'as' or mode == 'r+s':
+            if diskless:
+                ierr = nc_open(path, NC_SHARE | NC_DISKLESS, &grpid)
+            else:
+                ierr = nc_open(path, NC_SHARE, &grpid)
+        elif mode == 'ws':
+            if clobber:
+                if diskless:
+                    if persist:
+                        ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid)
+                    else:
+                        ierr = nc_create(path, NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid)
+                else:
+                    ierr = nc_create(path, NC_SHARE | NC_CLOBBER, &grpid)
+            else:
+                if diskless:
+                    if persist:
+                        ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid)
+                    else:
+                        ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid)
+                else:
+                    ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER, &grpid)
+        else:
+            raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        # data model and file format attributes
+        self.data_model = _get_format(grpid)
+        # data_model attribute used to be file_format (versions < 1.0.8), retain
+        # file_format for backwards compatibility.
+        self.file_format = self.data_model
+        self.disk_format = _get_full_format(grpid)
+        # diskless read access only works with NETCDF_CLASSIC (for now)
+        #ncopen = mode.startswith('a') or mode.startswith('r')
+        #if diskless and self.data_model != 'NETCDF3_CLASSIC' and ncopen:
+        #    raise ValueError("diskless access only supported for NETCDF3_CLASSIC format")
+        self._grpid = grpid
+        self._isopen = 1
+        self.path = '/'
+        self.parent = None
+        self.keepweakref = keepweakref
+        # get compound and vlen types in the root Group.
+        self.cmptypes, self.vltypes = _get_types(self)
+        # get dimensions in the root group.
+        self.dimensions = _get_dims(self)
+        # get variables in the root Group.
+        self.variables = _get_vars(self)
+        # get groups in the root Group.
+        if self.data_model == 'NETCDF4':
+            self.groups = _get_grps(self)
+        else:
+            self.groups = OrderedDict()
+
+    # these allow Dataset objects to be used via a "with" statement.
+    def __enter__(self):
+        return self
+    def __exit__(self,atype,value,traceback):
+        self.close()
+
+    def filepath(self):
+        """
+filepath(self)
+
+Get the file system path (or the opendap URL) which was used to
+open/create the Dataset. Requires netcdf >= 4.1.2"""
+        cdef int ierr
+        cdef size_t pathlen
+        cdef char path[NC_MAX_NAME + 1]
+        IF HAS_NC_INQ_PATH:
+            ierr = nc_inq_path(self._grpid, &pathlen, path)
+            return path.decode('ascii')
+        ELSE:
+            msg = """
+filepath method not enabled.  To enable, install Cython, make sure you have 
+version 4.1.2 or higher of the netcdf C lib, and rebuild netcdf4-python."""
+            raise ValueError(msg)
+
+    def __repr__(self):
+        if python3:
+           return self.__unicode__()
+        else:
+           return unicode(self).encode(default_encoding)
+
+    def __unicode__(self):
+        ncdump = ['%r\n' % type(self)]
+        dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\
+        for dimname in self.dimensions.keys()])
+        varnames = tuple(\
+        [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+
+        (((_tostr(self.variables[varname].dimensions)
+        .replace("u'",""))\
+        .replace("'",""))\
+        .replace(", ",","))\
+        .replace(",)",")") for varname in self.variables.keys()])
+        grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
+        if self.path == '/':
+            ncdump.append('root group (%s data model, file format %s):\n' %
+                    (self.data_model, self.disk_format))
+        else:
+            ncdump.append('group %s:\n' % self.path)
+        attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\
+                self.ncattrs()]
+        ncdump = ncdump + attrs
+        ncdump.append('    dimensions(sizes): %s\n' % ', '.join(dimnames))
+        ncdump.append('    variables(dimensions): %s\n' % ', '.join(varnames))
+        ncdump.append('    groups: %s\n' % ', '.join(grpnames))
+        return ''.join(ncdump)
+
+    def close(self):
+        """
+close(self)
+
+Close the Dataset."""
+        cdef int ierr 
+        ierr = nc_close(self._grpid)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        self._isopen = 0 # indicates file already closed, checked by __dealloc__
+
+    def __dealloc__(self):
+        # close file when there are no references to object left
+        cdef int ierr
+        if self._isopen:
+            ierr = nc_close(self._grpid)
+
+    def sync(self):
+        """
+sync(self)
+
+Writes all buffered data in the L{Dataset} to the disk file."""
+        cdef int ierr
+        ierr = nc_sync(self._grpid)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+
+    def _redef(self):
+        cdef int ierr
+        ierr = nc_redef(self._grpid)
+
+    def _enddef(self):
+        cdef int ierr
+        ierr = nc_enddef(self._grpid)
+
+    def set_fill_on(self):
+        """
+set_fill_on(self)
+
+Sets the fill mode for a L{Dataset} open for writing to C{on}.
+
+This causes data to be pre-filled with fill values. The fill values can be 
+controlled by the variable's C{_Fill_Value} attribute, but is usually 
+sufficient to the use the netCDF default C{_Fill_Value} (defined 
+separately for each variable type). The default behavior of the netCDF 
+library correspongs to C{set_fill_on}.  Data which are equal to the 
+C{_Fill_Value} indicate that the variable was created, but never written 
+to."""
+        cdef int ierr, oldmode
+        ierr = nc_set_fill (self._grpid, NC_FILL, &oldmode)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+
+    def set_fill_off(self):
+        """
+set_fill_off(self)
+
+Sets the fill mode for a L{Dataset} open for writing to C{off}. 
+
+This will prevent the data from being pre-filled with fill values, which 
+may result in some performance improvements. However, you must then make 
+sure the data is actually written before being read."""
+        cdef int ierr, oldmode
+        ierr = nc_set_fill (self._grpid, NC_NOFILL, &oldmode)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+
+    def createDimension(self, dimname, size=None):
+        """
+createDimension(self, dimname, size=None)
+
+Creates a new dimension with the given C{dimname} and C{size}. 
+
+C{size} must be a positive integer or C{None}, which stands for 
+"unlimited" (default is C{None}). Specifying a size of 0 also
+results in an unlimited dimension. The return value is the L{Dimension} 
+class instance describing the new dimension.  To determine the current 
+maximum size of the dimension, use the C{len} function on the L{Dimension} 
+instance. To determine if a dimension is 'unlimited', use the 
+C{isunlimited()} method of the L{Dimension} instance."""
+        self.dimensions[dimname] = Dimension(self, dimname, size=size)
+        return self.dimensions[dimname]
+
+    def renameDimension(self, oldname, newname):
+        """
+renameDimension(self, oldname, newname)
+
+rename a L{Dimension} named C{oldname} to C{newname}."""
+        cdef char *namstring
+        bytestr = _strencode(newname)
+        namstring = bytestr
+        if self.data_model != 'NETCDF4': self._redef()
+        try:
+            dim = self.dimensions[oldname]
+        except KeyError:
+            raise KeyError('%s not a valid dimension name' % oldname)
+        ierr = nc_rename_dim(self._grpid, dim._dimid, namstring)
+        if self.data_model != 'NETCDF4': self._enddef()
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        # remove old key from dimensions dict.
+        self.dimensions.pop(oldname)
+        # add new key.
+        self.dimensions[newname] = dim
+        # Variable.dimensions is determined by a method that
+        # looks in the file, so no need to manually update.
+
+    def createCompoundType(self, datatype, datatype_name):
+        """
+createCompoundType(self, datatype, datatype_name)
+
+Creates a new compound data type named C{datatype_name} from the numpy
+dtype object C{datatype}.
+
+ at attention: If the new compound data type contains other compound data types
+(i.e. it is a 'nested' compound type, where not all of the elements
+are homogenous numeric data types), then the 'inner' compound types B{must} be
+created first.
+
+The return value is the L{CompoundType} class instance describing the new
+datatype."""
+        self.cmptypes[datatype_name] = CompoundType(self, datatype,\
+                datatype_name)
+        return self.cmptypes[datatype_name]
+
+    def createVLType(self, datatype, datatype_name):
+        """
+createVLType(self, datatype, datatype_name)
+
+Creates a new VLEN data type named C{datatype_name} from a numpy
+dtype object C{datatype}.
+
+The return value is the L{VLType} class instance describing the new
+datatype."""
+        self.vltypes[datatype_name] = VLType(self, datatype, datatype_name)
+        return self.vltypes[datatype_name]
+
+    def createVariable(self, varname, datatype, dimensions=(), zlib=False,
+            complevel=4, shuffle=True, fletcher32=False, contiguous=False,
+            chunksizes=None, endian='native', least_significant_digit=None,
+            fill_value=None, chunk_cache=None):
+        """
+createVariable(self, varname, datatype, dimensions=(), zlib=False, complevel=4, shuffle=True, fletcher32=False, contiguous=False, chunksizes=None, endian='native', least_significant_digit=None, fill_value=None)
+
+Creates a new variable with the given C{varname}, C{datatype}, and 
+C{dimensions}. If dimensions are not given, the variable is assumed to be 
+a scalar.
+
+The C{datatype} can be a numpy datatype object, or a string that describes 
+a numpy dtype object (like the C{dtype.str} attribue of a numpy array). 
+Supported specifiers include: C{'S1' or 'c' (NC_CHAR), 'i1' or 'b' or 'B' 
+(NC_BYTE), 'u1' (NC_UBYTE), 'i2' or 'h' or 's' (NC_SHORT), 'u2' 
+(NC_USHORT), 'i4' or 'i' or 'l' (NC_INT), 'u4' (NC_UINT), 'i8' (NC_INT64), 
+'u8' (NC_UINT64), 'f4' or 'f' (NC_FLOAT), 'f8' or 'd' (NC_DOUBLE)}.
+C{datatype} can also be a L{CompoundType} instance
+(for a structured, or compound array), a L{VLType} instance
+(for a variable-length array), or the python C{str} builtin 
+(for a variable-length string array). Numpy string and unicode datatypes with
+length greater than one are aliases for C{str}.
+
+Data from netCDF variables is presented to python as numpy arrays with
+the corresponding data type. 
+
+C{dimensions} must be a tuple containing dimension names (strings) that 
+have been defined previously using C{createDimension}. The default value 
+is an empty tuple, which means the variable is a scalar.
+
+If the optional keyword C{zlib} is C{True}, the data will be compressed in 
+the netCDF file using gzip compression (default C{False}).
+
+The optional keyword C{complevel} is an integer between 1 and 9 describing 
+the level of compression desired (default 4). Ignored if C{zlib=False}.
+
+If the optional keyword C{shuffle} is C{True}, the HDF5 shuffle filter 
+will be applied before compressing the data (default C{True}).  This 
+significantly improves compression. Default is C{True}. Ignored if
+C{zlib=False}.
+
+If the optional keyword C{fletcher32} is C{True}, the Fletcher32 HDF5 
+checksum algorithm is activated to detect errors. Default C{False}.
+
+If the optional keyword C{contiguous} is C{True}, the variable data is 
+stored contiguously on disk.  Default C{False}. Setting to C{True} for
+a variable with an unlimited dimension will trigger an error.
+
+The optional keyword C{chunksizes} can be used to manually specify the
+HDF5 chunksizes for each dimension of the variable. A detailed
+discussion of HDF chunking and I/O performance is available U{here
+<http://www.hdfgroup.org/HDF5/doc/H5.user/Chunking.html>}. 
+Basically, you want the chunk size for each dimension to match as
+closely as possible the size of the data block that users will read
+from the file.  C{chunksizes} cannot be set if C{contiguous=True}.
+
+The optional keyword C{endian} can be used to control whether the
+data is stored in little or big endian format on disk. Possible
+values are C{little, big} or C{native} (default). The library
+will automatically handle endian conversions when the data is read,
+but if the data is always going to be read on a computer with the
+opposite format as the one used to create the file, there may be
+some performance advantage to be gained by setting the endian-ness.
+
+The C{zlib, complevel, shuffle, fletcher32, contiguous, chunksizes} and C{endian}
+keywords are silently ignored for netCDF 3 files that do not use HDF5.
+
+The optional keyword C{fill_value} can be used to override the default 
+netCDF C{_FillValue} (the value that the variable gets filled with before 
+any data is written to it, defaults given in netCDF4.default_fillvals).
+If fill_value is set to C{False}, then the variable is not pre-filled.
+
+If the optional keyword parameter C{least_significant_digit} is
+specified, variable data will be truncated (quantized). In conjunction
+with C{zlib=True} this produces 'lossy', but significantly more
+efficient compression. For example, if C{least_significant_digit=1},
+data will be quantized using C{numpy.around(scale*data)/scale}, where
+scale = 2**bits, and bits is determined so that a precision of 0.1 is
+retained (in this case bits=4). From
+U{http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml}:
+"least_significant_digit -- power of ten of the smallest decimal place
+in unpacked data that is a reliable value." Default is C{None}, or no
+quantization, or 'lossless' compression.
+
+When creating variables in a C{NETCDF4} or C{NETCDF4_CLASSIC} formatted file, 
+HDF5 creates something called a 'chunk cache' for each variable.  The
+default size of the chunk cache may be large enough to completely fill 
+available memory when creating thousands of variables.  The optional
+keyword C{chunk_cache} allows you to reduce (or increase) the size of
+the default chunk cache when creating a variable.  The setting only
+persists as long as the Dataset is open - you can use the set_var_chunk_cache
+method to change it the next time the Dataset is opened.
+Warning - messing with this parameter can seriously degrade performance.
+
+The return value is the L{Variable} class instance describing the new 
+variable.
+
+A list of names corresponding to netCDF variable attributes can be 
+obtained with the L{Variable} method C{ncattrs()}. A dictionary
+containing all the netCDF attribute name/value pairs is provided by
+the C{__dict__} attribute of a L{Variable} instance.
+
+L{Variable} instances behave much like array objects. Data can be
+assigned to or retrieved from a variable with indexing and slicing
+operations on the L{Variable} instance. A L{Variable} instance has six
+Dataset standard attributes: C{dimensions, dtype, shape, ndim, name} and
+C{least_significant_digit}. Application programs should never modify
+these attributes. The C{dimensions} attribute is a tuple containing the
+names of the dimensions associated with this variable. The C{dtype}
+attribute is a string describing the variable's data type (C{i4, f8,
+S1,} etc). The C{shape} attribute is a tuple describing the current
+sizes of all the variable's dimensions. The C{name} attribute is a
+string containing the name of the Variable instance.
+The C{least_significant_digit}
+attributes describes the power of ten of the smallest decimal place in
+the data the contains a reliable value.  assigned to the L{Variable}
+instance. If C{None}, the data is not truncated. The C{ndim} attribute
+is the number of variable dimensions."""
+        self.variables[varname] = Variable(self, varname, datatype,
+        dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle,
+        fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,
+        endian=endian, least_significant_digit=least_significant_digit,
+        fill_value=fill_value, chunk_cache=chunk_cache)
+        return self.variables[varname]
+
+    def renameVariable(self, oldname, newname):
+        """
+renameVariable(self, oldname, newname)
+
+rename a L{Variable} named C{oldname} to C{newname}"""
+        cdef char *namstring
+        try:
+            var = self.variables[oldname]
+        except KeyError:
+            raise KeyError('%s not a valid variable name' % oldname)
+        bytestr = _strencode(newname)
+        namstring = bytestr
+        if self.data_model != 'NETCDF4': self._redef()
+        ierr = nc_rename_var(self._grpid, var._varid, namstring)
+        if self.data_model != 'NETCDF4': self._enddef()
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        # remove old key from dimensions dict.
+        self.variables.pop(oldname)
+        # add new key.
+        self.variables[newname] = var
+
+    def createGroup(self, groupname):
+        """
+createGroup(self, groupname)
+
+Creates a new L{Group} with the given C{groupname}.
+
+The return value is a L{Group} class instance describing the new group."""
+        self.groups[groupname] = Group(self, groupname)
+        return self.groups[groupname]
+     
+    def ncattrs(self):
+        """
+ncattrs(self)
+
+return netCDF global attribute names for this L{Dataset} or L{Group} in a list."""
+        return _get_att_names(self._grpid, NC_GLOBAL)
+
+    def setncattr(self,name,value):
+        """
+setncattr(self,name,value)
+
+set a netCDF dataset or group attribute using name,value pair.  Only use if you need to set a
+netCDF attribute with the same name as one of the reserved python
+attributes."""
+        if self.data_model != 'NETCDF4': self._redef()
+        _set_att(self, NC_GLOBAL, name, value)
+        if self.data_model !=  'NETCDF4': self._enddef()
+
+    def setncatts(self,attdict):
+        """
+setncatts(self,attdict)
+
+set a bunch of netCDF dataset or group attributes at once using a python dictionary. 
+This may be faster when setting a lot of attributes for a NETCDF3 
+formatted file, since nc_redef/nc_enddef is not called in between setting
+each attribute"""
+        if self.data_model != 'NETCDF4': self._redef()
+        for name, value in attdict.items():
+            _set_att(self, NC_GLOBAL, name, value)
+        if self.data_model != 'NETCDF4': self._enddef()
+
+    def getncattr(self,name):
+        """
+getncattr(self,name)
+
+retrievel a netCDF dataset or group attribute.  Only use if you need to set a
+netCDF attribute with the same name as one of the reserved python
+attributes."""
+        return _get_att(self, NC_GLOBAL, name)
+
+    def __delattr__(self,name):
+        # if it's a netCDF attribute, remove it
+        if name not in _private_atts:
+            self.delncattr(name)
+        else:
+            raise AttributeError(
+            "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
+
+    def delncattr(self, name):
+        """
+delncattr(self,name,value)
+
+delete a netCDF dataset or group attribute.  Only use if you need to delete a
+netCDF attribute with the same name as one of the reserved python
+attributes."""
+        cdef char *attname
+        cdef int ierr
+        bytestr = _strencode(name)
+        attname = bytestr
+        if self.data_model != 'NETCDF4': self._redef()
+        ierr = nc_del_att(self._grpid, NC_GLOBAL, attname)
+        if self.data_model != 'NETCDF4': self._enddef()
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+
+    def __setattr__(self,name,value):
+        # if name in _private_atts, it is stored at the python
+        # level and not in the netCDF file.
+        if name not in _private_atts:
+            self.setncattr(name, value)
+        elif not name.endswith('__'):
+            if hasattr(self,name):
+                raise AttributeError(
+            "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts)))
+            else:
+                self.__dict__[name]=value
+
+    def __getattr__(self,name):
+        # if name in _private_atts, it is stored at the python
+        # level and not in the netCDF file.
+        if name.startswith('__') and name.endswith('__'):
+            # if __dict__ requested, return a dict with netCDF attributes.
+            if name == '__dict__': 
+                names = self.ncattrs()
+                values = []
+                for name in names:
+                    values.append(_get_att(self, NC_GLOBAL, name))
+                return OrderedDict(zip(names,values))
+            else:
+                raise AttributeError
+        elif name in _private_atts:
+            return self.__dict__[name]
+        else:
+            return self.getncattr(name)
+
+    def renameAttribute(self, oldname, newname):
+        """
+renameAttribute(self, oldname, newname)
+
+rename a L{Dataset} or L{Group} attribute named C{oldname} to C{newname}."""
+        cdef int ierr
+        cdef char *oldnamec
+        cdef char *newnamec
+        bytestr = _strencode(oldname)
+        oldnamec = bytestr
+        bytestr = _strencode(newname)
+        newnamec = bytestr
+        ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+
+    def renameGroup(self, oldname, newname):
+        """
+renameGroup(self, oldname, newname)
+
+rename a L{Group} named C{oldname} to C{newname} (requires netcdf >= 4.3.1)."""
+        cdef int ierr
+        cdef char *newnamec
+        IF HAS_RENAME_GRP:
+            bytestr = _strencode(newname)
+            newnamec = bytestr
+            try:
+                grp = self.groups[oldname]
+            except KeyError:
+                raise KeyError('%s not a valid group name' % oldname)
+            ierr = nc_rename_grp(grp._grpid, newnamec)
+            if ierr != NC_NOERR:
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+            # remove old key from groups dict.
+            self.groups.pop(oldname)
+            # add new key.
+            self.groups[newname] = grp
+        ELSE:
+            msg = """
+renameGroup method not enabled.  To enable, install Cython, make sure you have 
+version 4.3.1 or higher of the netcdf C lib, and rebuild netcdf4-python."""
+            raise ValueError(msg)
+
+    def set_auto_maskandscale(self, value):
+        """
+set_auto_maskandscale(self, True_or_False)
+
+Call L{set_auto_maskandscale} for all variables contained in this L{Dataset} or
+L{Group}, as well as for all variables in all its subgroups.
+
+B{Parameters}:
+
+B{C{True_or_False}} - Boolean determining if automatic conversion to masked arrays
+and variable scaling shall be applied for all variables.
+
+B{Notes}:
+
+Calling this function only affects existing variables. Variables created
+after calling this function will follow the default behaviour.
+        """
+
+        for var in self.variables.values():
+            var.set_auto_maskandscale(value)
+
+        for groups in _walk_grps(self):
+            for group in groups:
+                for var in group.variables.values():
+                    var.set_auto_maskandscale(value)
+
+
+    def set_auto_mask(self, value):
+        """
+set_auto_mask(self, True_or_False)
+
+Call L{set_auto_mask} for all variables contained in this L{Dataset} or
+L{Group}, as well as for all variables in all its subgroups.
+
+B{Parameters}:
+
+B{C{True_or_False}} - Boolean determining if automatic conversion to masked arrays
+shall be applied for all variables.
+
+B{Notes}:
+
+Calling this function only affects existing variables. Variables created
+after calling this function will follow the default behaviour.
+        """
+
+        for var in self.variables.values():
+            var.set_auto_mask(value)
+
+        for groups in _walk_grps(self):
+            for group in groups:
+                for var in group.variables.values():
+                    var.set_auto_mask(value)
+
+    def set_auto_scale(self, value):
+        """
+set_auto_scale(self, True_or_False)
+
+Call L{set_auto_scale} for all variables contained in this L{Dataset} or
+L{Group}, as well as for all variables in all its subgroups.
+
+B{Parameters}:
+
+B{C{True_or_False}} - Boolean determining if automatic variable scaling
+shall be applied for all variables.
+
+B{Notes}:
+
+Calling this function only affects existing variables. Variables created
+after calling this function will follow the default behaviour.
+        """
+
+        for var in self.variables.values():
+            var.set_auto_scale(value)
+
+        for groups in _walk_grps(self):
+            for group in groups:
+                for var in group.variables.values():
+                    var.set_auto_scale(value)
+
+
+cdef class Group(Dataset):
+    """
+Group(self, parent, name) 
+
+Groups define a hierarchical namespace within a netCDF file. They are 
+analagous to directories in a unix filesystem. Each L{Group} behaves like 
+a L{Dataset} within a Dataset, and can contain it's own variables, 
+dimensions and attributes (and other Groups).
+
+L{Group} instances should be created using the
+L{createGroup<Dataset.createGroup>} method of a L{Dataset} instance, or
+another L{Group} instance, not using this class directly.
+
+B{Parameters:}
+
+B{C{parent}} - L{Group} instance for the parent group.  If being created
+in the root group, use a L{Dataset} instance.
+
+B{C{name}} - Name of the group.
+
+B{Returns:}
+
+a L{Group} instance.  All further operations on the netCDF
+Group are accomplished via L{Group} instance methods.
+
+L{Group} inherits from L{Dataset}, so all the L{Dataset} class methods and 
+variables are available to a L{Group} instance (except the C{close} 
+method)."""
+    def __init__(self, parent, name, **kwargs):
+        cdef int ierr
+        cdef char *groupname
+        # set data_model and file_format attributes.
+        self.data_model = parent.data_model
+        self.file_format = parent.file_format
+        # full path to Group.
+        self.path = posixpath.join(parent.path, name)
+        # parent group.
+        self.parent = parent
+        # propagate weak reference setting from parent.
+        self.keepweakref = parent.keepweakref
+        if 'id' in kwargs:
+            self._grpid = kwargs['id']
+            # get compound and vlen types in this Group.
+            self.cmptypes, self.vltypes = _get_types(self)
+            # get dimensions in this Group.
+            self.dimensions = _get_dims(self)
+            # get variables in this Group.
+            self.variables = _get_vars(self)
+            # get groups in this Group.
+            self.groups = _get_grps(self)
+        else:
+            bytestr = _strencode(name)
+            groupname = bytestr
+            ierr = nc_def_grp(parent._grpid, groupname, &self._grpid)
+            if ierr != NC_NOERR:
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+            self.cmptypes = OrderedDict()
+            self.vltypes = OrderedDict()
+            self.dimensions = OrderedDict()
+            self.variables = OrderedDict()
+            self.groups = OrderedDict()
+
+    def close(self):
+        """
+close(self)
+
+overrides L{Dataset} close method which does not apply to L{Group} 
+instances, raises IOError."""
+        raise IOError('cannot close a L{Group} (only applies to Dataset)')
+
+    def _getname(self):
+        # private method to get name associated with instance.
+        cdef int err
+        cdef char namstring[NC_MAX_NAME+1]
+        ierr = nc_inq_grpname(self._grp._grpid, namstring)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        return namstring.decode(default_encoding,unicode_error)
+
+    property name:
+        """string name of Group instance"""
+        def __get__(self):
+            return self._getname()
+        def __set__(self,value):
+            raise AttributeError("name cannot be altered")
+
+
+cdef class Dimension:
+    """
+Dimension(self, group, name, size=None)
+
+A netCDF L{Dimension} is used to describe the coordinates of a L{Variable}.
+
+L{Dimension} instances should be created using the
+L{createDimension<Dataset.createDimension>} method of a L{Group} or
+L{Dataset} instance, not using this class directly.
+
+B{Parameters:}
+
+B{C{group}} - L{Group} instance to associate with dimension.
+
+B{C{name}}  - Name of the dimension.
+
+B{Keywords:}
+
+B{C{size}}  - Size of the dimension. C{None} or 0 means unlimited. (Default C{None}).
+
+B{Returns:}
+
+a L{Dimension} instance.  All further operations on the netCDF Dimension 
+are accomplised via L{Dimension} instance methods.
+
+The current maximum size of a L{Dimension} instance can be obtained by
+calling the python C{len} function on the L{Dimension} instance. The
+C{isunlimited()} method of a L{Dimension} instance can be used to
+determine if the dimension is unlimited"""
+    cdef public int _dimid, _grpid
+    cdef public _data_model, _name, _grp
+
+    def __init__(self, grp, name, size=None, **kwargs):
+        cdef int ierr
+        cdef char *dimname
+        cdef size_t lendim
+        self._grpid = grp._grpid
+        # make a weakref to group to avoid circular ref (issue 218)
+        # keep strong reference the default behaviour (issue 251)
+        if grp.keepweakref:
+            self._grp = weakref.proxy(grp)
+        else:
+            self._grp = grp
+        self._data_model = grp.data_model
+        self._name = name
+        if 'id' in kwargs:
+            self._dimid = kwargs['id']
+        else:
+            bytestr = _strencode(name)
+            dimname = bytestr
+            if size is not None:
+                lendim = size
+            else:
+                lendim = NC_UNLIMITED
+            if grp.data_model != 'NETCDF4': grp._redef()
+            ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid)
+            if grp.data_model != 'NETCDF4': grp._enddef()
+            if ierr != NC_NOERR:
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+
+    def _getname(self):
+        # private method to get name associated with instance.
+        cdef int err
+        cdef char namstring[NC_MAX_NAME+1]
+        ierr = nc_inq_dimname(self._grp._grpid, self._dimid, namstring)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        return namstring.decode(default_encoding,unicode_error)
+
+    property name:
+        """string name of Dimension instance"""
+        def __get__(self):
+            return self._getname()
+        def __set__(self,value):
+            raise AttributeError("name cannot be altered")
+
+    def __repr__(self):
+        if python3:
+           return self.__unicode__()
+        else:
+           return unicode(self).encode(default_encoding)
+
+    def __unicode__(self):
+        if not dir(self._grp):
+            return 'Dimension object no longer valid'
+        if self.isunlimited():
+            return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
+        else:
+            return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
+ 
+    def __len__(self):
+        # len(L{Dimension} instance) returns current size of dimension
+        cdef int ierr
+        cdef size_t lengthp
+        ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        return lengthp
+
+    def group(self):
+        """
+group(self)
+
+return the group that this L{Dimension} is a member of."""
+        return self._grp
+
+    def isunlimited(self):
+        """
+isunlimited(self)
+
+returns C{True} if the L{Dimension} instance is unlimited, C{False} otherwise."""
+        cdef int ierr, n, numunlimdims, ndims, nvars, ngatts, xdimid
+        cdef int unlimdimids[NC_MAX_DIMS]
+        if self._data_model == 'NETCDF4':
+            ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, NULL)
+            if ierr != NC_NOERR:
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+            if numunlimdims == 0:
+                return False
+            else:
+                dimid = self._dimid
+                ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)
+                if ierr != NC_NOERR:
+                    raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+                unlimdim_ids = []
+                for n from 0 <= n < numunlimdims:
+                    unlimdim_ids.append(unlimdimids[n])
+                if dimid in unlimdim_ids: 
+                    return True
+                else:
+                    return False
+        else: # if not NETCDF4, there is only one unlimited dimension.
+            # nc_inq_unlimdims only works for NETCDF4.
+            ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid)
+            if self._dimid == xdimid:
+                return True
+            else:
+                return False
+
+cdef class Variable:
+    """
+Variable(self, group, name, datatype, dimensions=(), zlib=False, complevel=4, shuffle=True, fletcher32=False, contiguous=False, chunksizes=None, endian='native', least_significant_digit=None,fill_value=None)
+
+A netCDF L{Variable} is used to read and write netCDF data.  They are 
+analagous to numpy array objects.
+
+L{Variable} instances should be created using the
+L{createVariable<Dataset.createVariable>} method of a L{Dataset} or
+L{Group} instance, not using this class directly.
+
+B{Parameters:}
+
+B{C{group}} - L{Group} or L{Dataset} instance to associate with variable.
+
+B{C{name}}  - Name of the variable.
+
+B{C{datatype}} - L{Variable} data type. Can be specified by providing a 
+numpy dtype object, or a string that describes a numpy dtype object. 
+Supported values, corresponding to C{str} attribute of numpy dtype 
+objects, include C{'f4'} (32-bit floating point), C{'f8'} (64-bit floating 
+point), C{'i4'} (32-bit signed integer), C{'i2'} (16-bit signed integer), 
+C{'i8'} (64-bit singed integer), C{'i4'} (8-bit singed integer), C{'i1'} 
+(8-bit signed integer), C{'u1'} (8-bit unsigned integer), C{'u2'} (16-bit 
+unsigned integer), C{'u4'} (32-bit unsigned integer), C{'u8'} (64-bit 
+unsigned integer), or C{'S1'} (single-character string).  From 
+compatibility with Scientific.IO.NetCDF, the old Numeric single character 
+typecodes can also be used (C{'f'} instead of C{'f4'}, C{'d'} instead of 
+C{'f8'}, C{'h'} or C{'s'} instead of C{'i2'}, C{'b'} or C{'B'} instead of 
+C{'i1'}, C{'c'} instead of C{'S1'}, and C{'i'} or C{'l'} instead of 
+C{'i4'}). C{datatype} can also be a L{CompoundType} instance
+(for a structured, or compound array), a L{VLType} instance
+(for a variable-length array), or the python C{str} builtin 
+(for a variable-length string array). Numpy string and unicode datatypes with
+length greater than one are aliases for C{str}.
+
+B{Keywords:}
+
+B{C{dimensions}} - a tuple containing the variable's dimension names 
+(defined previously with C{createDimension}). Default is an empty tuple 
+which means the variable is a scalar (and therefore has no dimensions).
+
+B{C{zlib}} - if C{True}, data assigned to the L{Variable}  
+instance is compressed on disk. Default C{False}.
+
+B{C{complevel}} - the level of zlib compression to use (1 is the fastest, 
+but poorest compression, 9 is the slowest but best compression). Default 4.
+Ignored if C{zlib=False}. 
+
+B{C{shuffle}} - if C{True}, the HDF5 shuffle filter is applied 
+to improve compression. Default C{True}. Ignored if C{zlib=False}.
+
+B{C{fletcher32}} - if C{True} (default C{False}), the Fletcher32 checksum 
+algorithm is used for error detection.
+
+B{C{contiguous}} - if C{True} (default C{False}), the variable data is
+stored contiguously on disk.  Default C{False}. Setting to C{True} for
+a variable with an unlimited dimension will trigger an error.
+
+B{C{chunksizes}} - Can be used to specify the HDF5 chunksizes for each
+dimension of the variable. A detailed discussion of HDF chunking and I/O
+performance is available U{here
+<http://www.hdfgroup.org/HDF5/doc/H5.user/Chunking.html>}. 
+Basically, you want the chunk size for each dimension to match as
+closely as possible the size of the data block that users will read
+from the file. C{chunksizes} cannot be set if C{contiguous=True}.
+
+B{C{endian}} - Can be used to control whether the
+data is stored in little or big endian format on disk. Possible
+values are C{little, big} or C{native} (default). The library
+will automatically handle endian conversions when the data is read,
+but if the data is always going to be read on a computer with the
+opposite format as the one used to create the file, there may be
+some performance advantage to be gained by setting the endian-ness.
+For netCDF 3 files (that don't use HDF5), only C{endian='native'} is allowed.
+
+The C{zlib, complevel, shuffle, fletcher32, contiguous} and {chunksizes}
+keywords are silently ignored for netCDF 3 files that do not use HDF5.
+
+B{C{least_significant_digit}} - If specified, variable data will be
+truncated (quantized). In conjunction with C{zlib=True} this produces
+'lossy', but significantly more efficient compression. For example, if
+C{least_significant_digit=1}, data will be quantized using
+around(scale*data)/scale, where scale = 2**bits, and bits is determined
+so that a precision of 0.1 is retained (in this case bits=4). Default is
+C{None}, or no quantization.
+
+B{C{fill_value}} - If specified, the default netCDF C{_FillValue} (the 
+value that the variable gets filled with before any data is written to it) 
+is replaced with this value.  If fill_value is set to C{False}, then
+the variable is not pre-filled. The default netCDF fill values can be found
+in netCDF4.default_fillvals.
+ 
+B{Returns:}
+
+a L{Variable} instance.  All further operations on the netCDF Variable are 
+accomplised via L{Variable} instance methods.
+
+A list of attribute names corresponding to netCDF attributes defined for
+the variable can be obtained with the C{ncattrs()} method. These
+attributes can be created by assigning to an attribute of the
+L{Variable} instance. A dictionary containing all the netCDF attribute
+name/value pairs is provided by the C{__dict__} attribute of a
+L{Variable} instance.
+
+The instance variables C{dimensions, dtype, ndim, shape}
+and C{least_significant_digit} are read-only (and 
+should not be modified by the user).
+
+ at ivar dimensions: A tuple containing the names of the dimensions 
+associated with this variable.
+
+ at ivar dtype: A numpy dtype object describing the variable's data type.
+
+ at ivar ndim: The number of variable dimensions.
+
+ at ivar shape: a tuple describing the current size of all the variable's 
+dimensions.
+
+ at ivar scale:  if True, C{scale_factor} and C{add_offset} are automatically
+applied. Default is C{True}, can be reset using L{set_auto_scale} and
+L{set_auto_maskandscale} methods.
+
+ at ivar mask:  if True, data is automatically converted to/from masked arrays
+when missing values or fill values are present. Default is C{True}, can be
+reset using L{set_auto_mask} and L{set_auto_maskandscale} methods.
+
+ at ivar least_significant_digit: Describes the power of ten of the smallest
+decimal place in the data the contains a reliable value.  Data is 
+truncated to this decimal place when it is assigned to the L{Variable} 
+instance. If C{None}, the data is not truncated. """
+    cdef public int _varid, _grpid, _nunlimdim
+    cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\
+    _isvlen, _grp,_cmptype,_vltype
+
+    def __init__(self, grp, name, datatype, dimensions=(), zlib=False,
+            complevel=4, shuffle=True, fletcher32=False, contiguous=False,
+            chunksizes=None, endian='native', least_significant_digit=None,
+            fill_value=None, chunk_cache=None, **kwargs):
+        cdef int ierr, ndims, icontiguous, ideflate_level, numdims
+        cdef char *varname
+        cdef nc_type xtype
+        cdef int dimids[NC_MAX_DIMS]
+        cdef size_t sizep, nelemsp
+        cdef size_t *chunksizesp
+        cdef float preemptionp
+        # if complevel is set to zero, set zlib to False.
+        if not complevel:
+            zlib = False
+        # if dimensions is a string, convert to a tuple
+        # this prevents a common error that occurs when
+        # dimensions = 'lat' instead of ('lat',)
+        if type(dimensions) == str or type(dimensions) == bytes or type(dimensions) == unicode:
+            dimensions = dimensions,
+        self._grpid = grp._grpid
+        # make a weakref to group to avoid circular ref (issue 218)
+        # keep strong reference the default behaviour (issue 251)
+        if grp.keepweakref:
+            self._grp = weakref.proxy(grp)
+        else:
+            self._grp = grp
+        # convert to a real numpy datatype object if necessary.
+        if (not isinstance(datatype, CompoundType) and \
+            not isinstance(datatype, VLType)) and \
+            datatype != str and \
+            type(datatype) != numpy.dtype:
+            datatype = numpy.dtype(datatype)
+        # convert numpy string dtype with length > 1 
+        # or any numpy unicode dtype into str
+        if (isinstance(datatype, numpy.dtype) and
+            ((datatype.kind == 'S' and datatype.itemsize > 1) or
+              datatype.kind == 'U')):
+            datatype = str
+	# check if endian keyword consistent with datatype specification.
+        dtype_endian = getattr(datatype,'byteorder',None)
+        if dtype_endian == '=': dtype_endian='native'
+        if dtype_endian == '>': dtype_endian='big'
+        if dtype_endian == '<': dtype_endian='little'
+        if dtype_endian == '|': dtype_endian=None
+        if dtype_endian is not None and dtype_endian != endian:
+            # endian keyword prevails, issue warning
+            msg = 'endian-ness of dtype and endian kwarg do not match, using endian kwarg'
+            #msg = 'endian-ness of dtype and endian kwarg do not match, dtype over-riding endian kwarg'
+            warnings.warn(msg)
+            #endian = dtype_endian # dtype prevails
+        # check validity of datatype.
+        self._isprimitive = False
+        self._iscompound = False
+        self._isvlen = False
+        if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\
+                      or datatype == str:
+            if isinstance(datatype, CompoundType):
+               self._iscompound = True
+               self._cmptype = datatype
+            if isinstance(datatype, VLType) or datatype==str:
+               self._isvlen = True
+               self._vltype = datatype
+            if datatype==str:
+                if grp.data_model != 'NETCDF4':
+                    raise ValueError(
+                        'Variable length strings are only supported for the '
+                        'NETCDF4 format. For other formats, consider using '
+                        'netCDF4.stringtochar to convert string arrays into '
+                        'character arrays with an additional dimension.')
+                datatype = VLType(self._grp, str, None)
+                self._vltype = datatype
+            xtype = datatype._nc_type
+            # dtype variable attribute is a numpy datatype object.
+            self.dtype = datatype.dtype
+        elif datatype.str[1:] in _supportedtypes:
+            self._isprimitive = True
+            # find netCDF primitive data type corresponding to 
+            # specified numpy data type.
+            xtype = _nptonctype[datatype.str[1:]]
+            # dtype variable attribute is a numpy datatype object.
+            self.dtype = datatype
+        else:
+            raise TypeError('illegal primitive data type, must be one of %s, got %s' % (_supportedtypes,datatype))
+        if 'id' in kwargs:
+            self._varid = kwargs['id']
+        else:
+            bytestr = _strencode(name)
+            varname = bytestr
+            ndims = len(dimensions)
+            # find dimension ids.
+            if ndims:
+                for n from 0 <= n < ndims:
+                    dimname = dimensions[n]
+                    # look for dimension in this group, and if not
+                    # found there, look in parent (and it's parent, etc, back to root).
+                    dim = _find_dim(grp, dimname)
+                    if dim is None:
+                        raise KeyError("dimension %s not defined in group %s or any group in it's family tree" % (dimname, grp.path))
+                    dimids[n] = dim._dimid
+            # go into define mode if it's a netCDF 3 compatible
+            # file format.  Be careful to exit define mode before
+            # any exceptions are raised.
+            if grp.data_model != 'NETCDF4': grp._redef()
+            # define variable.
+            if ndims:
+                ierr = nc_def_var(self._grpid, varname, xtype, ndims,
+                                  dimids, &self._varid)
+            else: # a scalar variable.
+                ierr = nc_def_var(self._grpid, varname, xtype, ndims,
+                                  NULL, &self._varid)
+            # set chunk cache size if desired    
+            # default is 1mb per var, can cause problems when many (1000's)
+            # of vars are created.  This change only lasts as long as file is
+            # open.
+            if grp.data_model.startswith('NETCDF4') and chunk_cache is not None:
+                ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,
+                        &nelemsp, &preemptionp)
+                if ierr != NC_NOERR:
+                    raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+                # reset chunk cache size, leave other parameters unchanged.
+                sizep = chunk_cache
+                ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep,
+                        nelemsp, preemptionp)
+                if ierr != NC_NOERR:
+                    raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+            if ierr != NC_NOERR:
+                if grp.data_model != 'NETCDF4': grp._enddef()
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+            # set zlib, shuffle, chunking, fletcher32 and endian
+            # variable settings.
+            # don't bother for NETCDF3* formats.
+            # for NETCDF3* formats, the zlib,shuffle,chunking,
+            # and fletcher32 are silently ignored. Only
+            # endian='native' allowed for NETCDF3.
+            if grp.data_model in ['NETCDF4','NETCDF4_CLASSIC']:
+                # set zlib and shuffle parameters.
+                if zlib and ndims: # don't bother for scalar variable
+                    ideflate_level = complevel
+                    if shuffle:
+                        ierr = nc_def_var_deflate(self._grpid, self._varid, 1, 1, ideflate_level)
+                    else:
+                        ierr = nc_def_var_deflate(self._grpid, self._varid, 0, 1, ideflate_level)
+                    if ierr != NC_NOERR:
+                        if grp.data_model != 'NETCDF4': grp._enddef()
+                        raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+                # set checksum.
+                if fletcher32 and ndims: # don't bother for scalar variable
+                    ierr = nc_def_var_fletcher32(self._grpid, self._varid, 1)
+                    if ierr != NC_NOERR:
+                        if grp.data_model != 'NETCDF4': grp._enddef()
+                        raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+                # set chunking stuff.
+                if ndims: # don't bother for scalar variable.
+                    if contiguous:
+                        icontiguous = NC_CONTIGUOUS
+                        if chunksizes is not None:
+                            raise ValueError('cannot specify chunksizes for a contiguous dataset')
+                    else:
+                        icontiguous = NC_CHUNKED
+                    if chunksizes is None:
+                        chunksizesp = NULL
+                    else:
+                        if len(chunksizes) != len(dimensions):
+                            if grp.data_model != 'NETCDF4': grp._enddef()
+                            raise ValueError('chunksizes must be a sequence with the same length as dimensions')
+                        chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
+                        for n from 0 <= n < ndims:
+                            chunksizesp[n] = chunksizes[n]
+                    if chunksizes is not None or contiguous:
+                        ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp)
+                        free(chunksizesp)
+                        if ierr != NC_NOERR:
+                            if grp.data_model != 'NETCDF4': grp._enddef()
+                            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+                # set endian-ness of variable
+                if endian == 'little':
+                    ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_LITTLE)
+                elif endian == 'big':
+                    ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_BIG)
+                elif endian == 'native':
+                    pass # this is the default format.
+                else:
+                    raise ValueError("'endian' keyword argument must be 'little','big' or 'native', got '%s'" % endian)
+                if ierr != NC_NOERR:
+                    if grp.data_model != 'NETCDF4': grp._enddef()
+                    raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+            else:
+                if endian != 'native':
+                    msg="only endian='native' allowed for NETCDF3 files"
+                    raise RuntimeError(msg)
+            # set a fill value for this variable if fill_value keyword
+            # given.  This avoids the HDF5 overhead of deleting and 
+            # recreating the dataset if it is set later (after the enddef).
+            if fill_value is not None:
+                if not fill_value and isinstance(fill_value,bool):
+                    # no filling for this variable if fill_value==False.
+                    if not self._isprimitive:
+                        # no fill values for VLEN and compound variables
+                        # anyway.
+                        ierr = 0
+                    else:
+                        ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL)
+                    if ierr != NC_NOERR:
+                        if grp.data_model != 'NETCDF4': grp._enddef()
+                        raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+                else:
+                    # cast fill_value to type of variable.
+                    if self._isprimitive:
+                        fillval = numpy.array(fill_value, self.dtype)
+                        _set_att(self._grp, self._varid, '_FillValue', fillval)
+                    else:
+                        raise AttributeError("cannot set _FillValue attribute for VLEN or compound variable")
+            if least_significant_digit is not None:
+                self.least_significant_digit = least_significant_digit
+            # leave define mode if not a NETCDF4 format file.
+            if grp.data_model != 'NETCDF4': grp._enddef()
+        # count how many unlimited dimensions there are.
+        self._nunlimdim = 0
+        for dimname in dimensions:
+            # look in current group, and parents for dim.
+            dim = _find_dim(self._grp, dimname)
+            if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1
+        # set ndim attribute (number of dimensions).
+        ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        self.ndim = numdims
+        self._name = name
+        # default for automatically applying scale_factor and
+        # add_offset, and converting to/from masked arrays is True.
+        self.scale = True
+        self.mask = True
+
+    def __array__(self):
+        # numpy special method that returns a numpy array.
+	# allows numpy ufuncs to work faster on Variable objects 
+	# (issue 216).
+        return self[...]
+
+    def __repr__(self):
+        if python3:
+           return self.__unicode__()
+        else:
+           return unicode(self).encode(default_encoding)
+
+    def __unicode__(self):
+        cdef int ierr, no_fill
+        if not dir(self._grp):
+            return 'Variable object no longer valid'
+        ncdump_var = ['%r\n' % type(self)]
+        dimnames = tuple([_tostr(dimname) for dimname in self.dimensions])
+        attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\
+                self.ncattrs()]
+        if self._iscompound:
+            ncdump_var.append('%s %s(%s)\n' %\
+            ('compound',self._name,', '.join(dimnames)))
+        elif self._isvlen:
+            ncdump_var.append('%s %s(%s)\n' %\
+            ('vlen',self._name,', '.join(dimnames)))
+        else:
+            ncdump_var.append('%s %s(%s)\n' %\
+            (self.dtype,self._name,', '.join(dimnames)))
+        ncdump_var = ncdump_var + attrs
+        if self._iscompound:
+            ncdump_var.append('compound data type: %s\n' % self.dtype)
+        elif self._isvlen:
+            ncdump_var.append('vlen data type: %s\n' % self.dtype)
+        unlimdims = []
+        for dimname in self.dimensions:
+            dim = _find_dim(self._grp, dimname)
+            if dim.isunlimited():
+                unlimdims.append(dimname)
+        if (self._grp.path != '/'): ncdump_var.append('path = %s\n' % self._grp.path)
+        ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims))
+        ncdump_var.append('current shape = %s\n' % repr(self.shape))
+        ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        if self._isprimitive:
+            if no_fill != 1:
+                try:
+                    fillval = self._FillValue
+                    msg = 'filling on'
+                except AttributeError:
+                    fillval = default_fillvals[self.dtype.str[1:]]
+                    if self.dtype.str[1:] in ['u1','i1']:
+                        msg = 'filling on, default _FillValue of %s ignored\n' % fillval
+                    else:
+                        msg = 'filling on, default _FillValue of %s used\n' % fillval
+                ncdump_var.append(msg)
+            else:
+                ncdump_var.append('filling off\n')
+
+
+        return ''.join(ncdump_var)
+
+    def _getdims(self):
+        # Private method to get variables's dimension names
+        cdef int ierr, numdims, n, nn
+        cdef char namstring[NC_MAX_NAME+1]
+        cdef int dimids[NC_MAX_DIMS]
+        # get number of dimensions for this variable.
+        ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        # get dimension ids.
+        ierr = nc_inq_vardimid(self._grpid, self._varid, dimids)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        # loop over dimensions, retrieve names.
+        dimensions = ()
+        for nn from 0 <= nn < numdims:
+            ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
+            if ierr != NC_NOERR:
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+            name = namstring.decode(default_encoding,unicode_error)
+            dimensions = dimensions + (name,)
+        return dimensions
+
+    def _getname(self):
+        # Private method to get name associated with instance
+        cdef int err
+        cdef char namstring[NC_MAX_NAME+1]
+        ierr = nc_inq_varname(self._grp._grpid, self._varid, namstring)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        return namstring.decode(default_encoding,unicode_error)
+
+    property name:
+        """string name of Variable instance"""
+        def __get__(self):
+            return self._getname()
+        def __set__(self,value):
+            raise AttributeError("name cannot be altered")
+
+    property datatype:
+        """numpy data type (for primitive data types) or VLType/CompoundType instance (for compound or vlen data types)"""
+        def __get__(self):
+            if self._iscompound:
+                return self._cmptype
+            elif self._isvlen:
+                return self._vltype
+            elif self._isprimitive:
+                return self.dtype
+
+    property shape:
+        """find current sizes of all variable dimensions"""
+        def __get__(self):
+            shape = ()
+            for dimname in self._getdims():
+                # look in current group, and parents for dim.
+                dim = _find_dim(self._grp,dimname)
+                shape = shape + (len(dim),)
+            return shape
+        def __set__(self,value):
+            raise AttributeError("shape cannot be altered")
+
+    property size:
+        """Return the number of stored elements."""
+        def __get__(self):
+            return numpy.prod(self.shape)
+
+    property dimensions:
+        """get variables's dimension names"""
+        def __get__(self):
+            return self._getdims()
+        def __set__(self,value):
+            raise AttributeError("dimensions cannot be altered")
+
+
+    def group(self):
+        """
+group(self)
+
+return the group that this L{Variable} is a member of."""
+        return self._grp
+
+    def ncattrs(self):
+        """
+ncattrs(self)
+
+return netCDF attribute names for this L{Variable} in a list."""
+        return _get_att_names(self._grpid, self._varid)
+
+    def setncattr(self,name,value):
+        """
+setncattr(self,name,value)
+
+set a netCDF variable attribute using name,value pair.  Only use if you need to set a
+netCDF attribute with the same name as one of the reserved python
+attributes."""
+        if self._grp.data_model != 'NETCDF4': self._grp._redef()
+        _set_att(self._grp, self._varid, name, value)
+        if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+
+    def setncatts(self,attdict):
+        """
+setncatts(self,attdict)
+
+set a bunch of netCDF variable attributes at once using a python dictionary. 
+This may be faster when setting a lot of attributes for a NETCDF3 
+formatted file, since nc_redef/nc_enddef is not called in between setting
+each attribute"""
+        if self._grp.data_model != 'NETCDF4': self._grp._redef()
+        for name, value in attdict.items():
+            _set_att(self._grp, self._varid, name, value)
+        if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+
+    def getncattr(self,name):
+        """
+getncattr(self,name)
+
+retrievel a netCDF variable attribute.  Only use if you need to set a
+netCDF attribute with the same name as one of the reserved python
+attributes."""
+        return _get_att(self._grp, self._varid, name)
+
+    def delncattr(self, name):
+        """
+delncattr(self,name,value)
+
+delete a netCDF variable attribute.  Only use if you need to delete a
+netCDF attribute with the same name as one of the reserved python
+attributes."""
+        cdef char *attname
+        bytestr = _strencode(name)
+        attname = bytestr
+        if self._grp.data_model != 'NETCDF4': self._grp._redef()
+        ierr = nc_del_att(self._grpid, self._varid, attname)
+        if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+
+    def filters(self):
+        """
+filters(self)
+
+return dictionary containing HDF5 filter parameters."""
+        cdef int ierr,ideflate,ishuffle,ideflate_level,ifletcher32
+        filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False}
+        if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return
+        ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        if ideflate:
+            filtdict['zlib']=True
+            filtdict['complevel']=ideflate_level
+        if ishuffle:
+            filtdict['shuffle']=True
+        if ifletcher32:
+            filtdict['fletcher32']=True
+        return filtdict
+
+    def endian(self):
+        """
+endian(self)
+
+return endian-ness (little,big,native) of variable (as stored in HDF5 file)."""
+        cdef int ierr, iendian
+        if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: 
+            return 'native'
+        ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        if iendian == NC_ENDIAN_LITTLE:
+            return 'little'
+        elif iendian == NC_ENDIAN_BIG:
+            return 'big'
+        else:
+            return 'native'
+
+    def chunking(self):
+        """
+chunking(self)
+
+return variable chunking information.  If the dataset is 
+defined to be contiguous (and hence there is no chunking) the word 'contiguous'
+is returned.  Otherwise, a sequence with the chunksize for
+each dimension is returned."""
+        cdef int ierr, icontiguous, ndims
+        cdef size_t *chunksizesp
+        if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return None
+        ndims = self.ndim
+        chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
+        ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        chunksizes=[]
+        for n from 0 <= n < ndims:
+            chunksizes.append(chunksizesp[n])
+        free(chunksizesp)
+        if icontiguous:
+            return 'contiguous'
+        else:
+            return chunksizes
+
+    def get_var_chunk_cache(self):
+        """
+get_var_chunk_cache(self)
+
+return variable chunk cache information in a tuple (size,nelems,preemption).
+See netcdf C library documentation for C{nc_get_var_chunk_cache} for
+details."""
+        cdef int ierr
+        cdef size_t sizep, nelemsp
+        cdef float preemptionp
+        ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,
+               &nelemsp, &preemptionp)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        size = sizep; nelems = nelemsp; preemption = preemptionp
+        return (size,nelems,preemption)
+
+    def set_var_chunk_cache(self,size=None,nelems=None,preemption=None):
+        """
+set_var_chunk_cache(self,size=None,nelems=None,preemption=None)
+
+change variable chunk cache settings.
+See netcdf C library documentation for C{nc_set_var_chunk_cache} for
+details."""
+        cdef int ierr
+        cdef size_t sizep, nelemsp
+        cdef float preemptionp
+        # reset chunk cache size, leave other parameters unchanged.
+        size_orig, nelems_orig, preemption_orig = self.get_var_chunk_cache()
+        if size is not None:
+            sizep = size
+        else:
+            sizep = size_orig
+        if nelems is not None:
+            nelemsp = nelems
+        else:
+            nelemsp = nelems_orig
+        if preemption is not None:
+            preemptionp = preemption
+        else:
+            preemptionp = preemption_orig
+        ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep,
+               nelemsp, preemptionp)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+
+    def __delattr__(self,name):
+        # if it's a netCDF attribute, remove it
+        if name not in _private_atts:
+            self.delncattr(name)
+        else:
+            raise AttributeError(
+            "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
+
+    def __setattr__(self,name,value):
+        # if name in _private_atts, it is stored at the python
+        # level and not in the netCDF file.
+        if name not in _private_atts:
+            # if setting _FillValue or missing_value, make sure value
+            # has same type as variable.
+            if name == '_FillValue':
+                msg='_FillValue attribute must be set when variable is '+\
+                'created (using fill_value keyword to createVariable)'
+                raise AttributeError(msg)
+                #if self._isprimitive:
+                #    value = numpy.array(value, self.dtype)
+                #else:
+                #    msg="cannot set _FillValue attribute for "+\
+                #    "VLEN or compound variable"
+                #    raise AttributeError(msg)
+            elif name == 'missing_value' and self._isprimitive:
+                value = numpy.array(value, self.dtype)
+            self.setncattr(name, value)
+        elif not name.endswith('__'):
+            if hasattr(self,name):
+                raise AttributeError(
+                "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts)))
+            else:
+                self.__dict__[name]=value
+
+    def __getattr__(self,name):
+        # if name in _private_atts, it is stored at the python
+        # level and not in the netCDF file.
+        if name.startswith('__') and name.endswith('__'):
+            # if __dict__ requested, return a dict with netCDF attributes.
+            if name == '__dict__': 
+                names = self.ncattrs()
+                values = []
+                for name in names:
+                    values.append(_get_att(self._grp, self._varid, name))
+                return OrderedDict(zip(names,values))
+            else:
+                raise AttributeError
+        elif name in _private_atts:
+            return self.__dict__[name]
+        else:
+            return self.getncattr(name)
+
+    def renameAttribute(self, oldname, newname):
+        """
+renameAttribute(self, oldname, newname)
+
+rename a L{Variable} attribute named C{oldname} to C{newname}."""
+        cdef int ierr
+        cdef char *oldnamec
+        cdef char *newnamec
+        bytestr = _strencode(oldname)
+        oldnamec = bytestr
+        bytestr = _strencode(newname)
+        newnamec = bytestr
+        ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+
+    def __getitem__(self, elem):
+        # This special method is used to index the netCDF variable
+        # using the "extended slice syntax". The extended slice syntax
+        # is a perfect match for the "start", "count" and "stride"
+        # arguments to the nc_get_var() function, and is much more easy
+        # to use.
+        start, count, stride, put_ind = _StartCountStride(elem,self.shape)
+        datashape = _out_array_shape(count)
+        if self._isvlen:
+            data = numpy.empty(datashape, dtype='O')
+        else:
+            data = numpy.empty(datashape, dtype=self.dtype)
+
+        # Determine which dimensions need to be 
+        # squeezed (those for which elem is an integer scalar).
+        # The convention used is that for those cases, 
+        # put_ind for this dimension is set to -1 by _StartCountStride.
+        squeeze = data.ndim * [slice(None),]
+        for i,n in enumerate(put_ind.shape[:-1]):
+            if n == 1 and put_ind[...,i].ravel()[0] == -1:
+                squeeze[i] = 0
+
+        # Reshape the arrays so we can iterate over them. 
+        start = start.reshape((-1, self.ndim or 1))
+        count = count.reshape((-1, self.ndim or 1))
+        stride = stride.reshape((-1, self.ndim or 1))
+        put_ind = put_ind.reshape((-1, self.ndim or 1))
+
+        # Fill output array with data chunks. 
+        for (a,b,c,i) in zip(start, count, stride, put_ind):
+            datout = self._get(a,b,c)
+            if not hasattr(datout,'shape') or data.shape == datout.shape:
+                data = datout
+            else:
+                shape = getattr(data[tuple(i)], 'shape', ())
+                data[tuple(i)] = datout.reshape(shape)
+
+        # Remove extra singleton dimensions. 
+        if hasattr(data,'shape'):
+            data = data[tuple(squeeze)]
+        if hasattr(data,'ndim') and self.ndim == 0:
+            # Make sure a numpy scalar is returned instead of a 1-d array of
+            # length 1.
+            if data.ndim != 0: data = data[0]
+
+        # if auto_scale mode set to True, (through
+        # a call to set_auto_scale or set_auto_maskandscale),
+        # perform automatic unpacking using scale_factor/add_offset.
+        # if auto_mask mode is set to True (through a call to
+        # set_auto_mask or set_auto_maskandscale), perform
+        # automatic conversion to masked array using
+        # missing_value/_Fill_Value.
+        # ignore for compound and vlen datatypes.
+        try: # check to see if scale_factor and add_offset is valid (issue 176).
+            if hasattr(self,'scale_factor'): float(self.scale_factor)
+            if hasattr(self,'add_offset'): float(self.add_offset)
+            valid_scaleoffset = True
+        except:
+            valid_scaleoffset = False
+            if self.scale:
+                msg = 'invalid scale_factor or add_offset attribute, no unpacking done...'
+                warnings.warn(msg)
+        if self.mask and self._isprimitive:
+            data = self._toma(data)
+        if self.scale and self._isprimitive and valid_scaleoffset:
+            # if variable has scale_factor and add_offset attributes, rescale.
+            if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset') and\
+            (self.add_offset != 0.0 or self.scale_factor != 1.0):
+                data = data*self.scale_factor + self.add_offset
+            # else if variable has only scale_factor attributes, rescale.
+            elif hasattr(self, 'scale_factor') and self.scale_factor != 1.0:
+                data = data*self.scale_factor
+            # else if variable has only add_offset attributes, rescale.
+            elif hasattr(self, 'add_offset') and self.add_offset != 0.0:
+                data += self.add_offset
+        return data
+
+    def _toma(self,data):
+        cdef int ierr, no_fill
+        # private function for creating a masked array, masking missing_values
+        # and/or _FillValues.
+        totalmask = numpy.zeros(data.shape, numpy.bool)
+        fill_value = None
+        if hasattr(self, 'missing_value'):
+            mval = numpy.array(self.missing_value, self.dtype)
+            if (self.endian() == 'big' and is_native_little) or\
+               (self.endian() == 'little' and is_native_big):
+                     mval.byteswap(True)
+            if mval.shape == (): # mval a scalar.
+                hasmval = data==mval 
+                # is scalar missing value a NaN?
+                try:
+                    mvalisnan = numpy.isnan(mval)
+                except TypeError: # isnan fails on some dtypes (issue 206)
+                    mvalisnan = False
+            else: # mval a vector.
+                hasmval = numpy.zeros(data.shape, numpy.bool)
+                for m in mval:
+                    m =  numpy.array(m)
+                    hasmval += data == m
+            if mval.shape == () and mvalisnan:
+                mask = numpy.isnan(data)
+            elif hasmval.any():
+                mask = hasmval
+            else:
+                mask = None
+            if mask is not None:
+                fill_value = mval
+                totalmask += mask
+        if hasattr(self, '_FillValue'):
+            fval = numpy.array(self._FillValue, self.dtype)
+            # byte swap the _FillValue if endian-ness of the variable
+            # is not native.
+            if (self.endian() == 'big' and is_native_little) or\
+               (self.endian() == 'little' and is_native_big):
+                     fval.byteswap(True)
+            # is _FillValue a NaN?
+            try:
+                fvalisnan = numpy.isnan(fval)
+            except TypeError: # isnan fails on some dtypes (issue 202)
+                fvalisnan = False
+            if fvalisnan:
+                mask = numpy.isnan(data)
+            elif (data == fval).any():
+                mask = data==fval
+            else:
+                mask = None
+            if mask is not None:
+                if fill_value is None:
+                    fill_value = fval
+                totalmask += mask
+        # issue 209: don't return masked array if variable filling
+	# is disabled.
+        else:
+             ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
+             if ierr != NC_NOERR:
+                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+             # if no_fill is not 1, and not a byte variable, then use default fill value.
+             # from http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c/Fill-Values.html#Fill-Values
+             # "If you need a fill value for a byte variable, it is recommended
+             # that you explicitly define an appropriate _FillValue attribute, as
+             # generic utilities such as ncdump will not assume a default fill
+             # value for byte variables."
+             # Explained here too:
+             # http://www.unidata.ucar.edu/software/netcdf/docs/known_problems.html#ncdump_ubyte_fill
+             # "There should be no default fill values when reading any byte
+             # type, signed or unsigned, because the byte ranges are too
+             # small to assume one of the values should appear as a missing
+             # value unless a _FillValue attribute is set explicitly."
+             if no_fill != 1 and self.dtype.str[1:] not in ['u1','i1']:
+                 fillval = numpy.array(default_fillvals[self.dtype.str[1:]],self.dtype)
+                 # byte swap the _FillValue if endian-ness of the variable
+                 # is not native.
+                 if (self.endian() == 'big' and is_native_little) or\
+                    (self.endian() == 'little' and is_native_big):
+                     fillval.byteswap(True)
+                 has_fillval = data == fillval
+                 # if data is an array scalar, has_fillval will be a boolean.
+                 # in that case convert to an array.
+                 if type(has_fillval) == bool: has_fillval=numpy.asarray(has_fillval)
+                 if has_fillval.any():
+                     mask=data==fillval
+                     if fill_value is None:
+                         fill_value = fillval
+                     totalmask += mask
+        # all values where data == missing_value or _FillValue are
+        # masked.  fill_value set to missing_value if it exists,
+        # otherwise _FillValue.
+        if fill_value is not None:
+            data = ma.masked_array(data,mask=totalmask,fill_value=fill_value)
+        return data
+
+    def _assign_vlen(self, elem, data):
+        """private method to assign data to a single item in a VLEN variable"""
+        cdef size_t startp[NC_MAX_DIMS]
+        cdef size_t countp[NC_MAX_DIMS]
+        cdef int ndims, n
+        cdef nc_vlen_t *vldata
+        cdef char **strdata
+        cdef ndarray data2
+        if not self._isvlen:
+            raise TypeError('_assign_vlen method only for use with VLEN variables')
+        ndims = self.ndim
+        msg="single element VLEN slices must be specified by integers only"
+        # check to see that elem is a tuple of integers.
+        # handle negative integers.
+        if isinstance(elem, int):
+            if ndims > 1:
+                raise IndexError(msg)
+            if elem < 0: 
+                if self.shape[0]+elem >= 0:
+                    elem = self.shape[0]+elem
+                else:
+                    raise IndexError("Illegal index")
+        elif isinstance(elem, tuple):
+            if len(elem) != ndims:
+                raise IndexError("Illegal index")
+            elemnew = []
+            for n,e in enumerate(elem):
+                if not isinstance(e, int):
+                    raise IndexError(msg)
+                elif e < 0:
+                    enew = self.shape[n]+e
+                    if enew < 0:
+                        raise IndexError("Illegal index")
+                    else:
+                        elemnew.append(self.shape[n]+e)
+                else:
+                    elemnew.append(e)
+            elem = tuple(elemnew)
+        else:
+            raise IndexError(msg)
+        # set start, count
+        if isinstance(elem, tuple):
+            start = list(elem)
+        else:
+            start = [elem]
+        count = [1]*ndims
+        for n from 0 <= n < ndims:
+            startp[n] = start[n] 
+            countp[n] = count[n] 
+        if self.dtype == str: # VLEN string
+            strdata = <char **>malloc(sizeof(char *))
+            bytestr = _strencode(data)
+            strdata[0] = bytestr
+            ierr = nc_put_vara(self._grpid, self._varid,
+                               startp, countp, strdata)
+            if ierr != NC_NOERR:
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+            free(strdata)
+        else: # regular VLEN
+            if data.dtype != self.dtype:
+                raise TypeError("wrong data type: should be %s, got %s" % (self.dtype,data.dtype))
+            data2 = data
+            vldata = <nc_vlen_t *>malloc(sizeof(nc_vlen_t))
+            vldata[0].len = PyArray_SIZE(data2)
+            vldata[0].p = data2.data
+            ierr = nc_put_vara(self._grpid, self._varid,
+                               startp, countp, vldata)
+            if ierr != NC_NOERR:
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+            free(vldata)
+
+    def __setitem__(self, elem, data):
+        # This special method is used to assign to the netCDF variable
+        # using "extended slice syntax". The extended slice syntax
+        # is a perfect match for the "start", "count" and "stride"
+        # arguments to the nc_put_var() function, and is much more easy
+        # to use.
+
+        if self._isvlen: # if vlen, should be object array (don't try casting)
+            if self.dtype == str:
+                # for string vars, if data is not an array
+                # assume it is a python string and raise an error
+                # if it is an array, but not an object array.
+                if not hasattr(data,'ndim'):
+                    self._assign_vlen(elem, data)
+                    return
+                elif data.dtype.kind in ['S', 'U']:
+                    data = data.astype(object)
+                elif data.dtype.kind != 'O':
+                    msg = ('only numpy string, unicode or object arrays can '
+                           'be assigned to VLEN str var slices')
+                    raise TypeError(msg)
+            else:
+                # for non-string vlen arrays, if data is not multi-dim, or
+                # not an object array, assume it represents a single element
+                # of the vlen var.
+                if not hasattr(data,'ndim') or data.dtype.kind != 'O':
+                    self._assign_vlen(elem, data)
+                    return
+
+        # A numpy array is needed. Convert if necessary.
+        # assume it's a numpy or masked array if it has an 'ndim' attribute.
+        if not hasattr(data,'ndim'): 
+            # if auto scaling is to be done, don't cast to an integer yet. 
+            if self.scale and self.dtype.kind == 'i' and \
+               hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'):
+                data = numpy.array(data,numpy.float)
+            else:
+                data = numpy.array(data,self.dtype)
+
+        start, count, stride, put_ind =\
+        _StartCountStride(elem,self.shape,self.dimensions,self._grp,datashape=data.shape,put=True)
+        datashape = _out_array_shape(count)
+
+        # if a numpy scalar, create an array of the right size
+        # and fill with scalar values.
+        if data.shape == ():
+            data = numpy.tile(data,datashape)
+        # reshape data array by adding extra singleton dimensions
+        # if needed to conform with start,count,stride.
+        if len(data.shape) != len(datashape):
+            # create a view so shape in caller is not modified (issue 90)
+            data = data.view()
+            data.shape = tuple(datashape)
+        
+        # Reshape these arrays so we can iterate over them. 
+        start = start.reshape((-1, self.ndim or 1))
+        count = count.reshape((-1, self.ndim or 1))
+        stride = stride.reshape((-1, self.ndim or 1))
+        put_ind = put_ind.reshape((-1, self.ndim or 1))
+
+        if 'least_significant_digit' in self.ncattrs():
+            data = _quantize(data,self.least_significant_digit)
+        # if auto_scale mode set to True, (through
+        # a call to set_auto_scale or set_auto_maskandscale),
+        # perform automatic unpacking using scale_factor/add_offset.
+        # if auto_mask mode is set to True (through a call to
+        # set_auto_mask or set_auto_maskandscale), perform
+        # automatic conversion to masked array using
+        # missing_value/_Fill_Value.
+        # ignore if not a primitive (not compound or vlen) datatype.
+        if self.mask and self._isprimitive:
+            # use missing_value as fill value.
+            # if no missing value set, use _FillValue.
+            if hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'):
+                # if not masked, create a masked array.
+                if not ma.isMA(data): data = self._toma(data)
+        if self.scale and self._isprimitive:
+            # pack non-masked values using scale_factor and add_offset
+            if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset'):
+                data = (data - self.add_offset)/self.scale_factor
+                if self.dtype.kind == 'i': data = numpy.around(data)
+            elif hasattr(self, 'scale_factor'):
+                data = data/self.scale_factor
+                if self.dtype.kind == 'i': data = numpy.around(data)
+            elif hasattr(self, 'add_offset'):
+                data = data - self.add_offset
+                if self.dtype.kind == 'i': data = numpy.around(data)
+            if ma.isMA(data):
+                # if underlying data in masked regions of masked array
+                # corresponds to missing values, don't fill masked array -
+                # just use underlying data instead
+                if hasattr(self, 'missing_value') and \
+                   numpy.all(numpy.in1d(data.data[data.mask],self.missing_value)):
+                    data = data.data
+                else:
+                    if hasattr(self, 'missing_value'):
+                        # if missing value is a scalar, use it as fill_value.
+                        # if missing value is a vector, raise an exception
+                        # since we then don't know how to fill in masked values.
+                        if numpy.array(self.missing_value).shape == ():
+                            fillval = self.missing_value
+                        else:
+                            msg="cannot assign fill_value for masked array when missing_value attribute is not a scalar"
+                            raise RuntimeError(msg)
+                        if numpy.array(fillval).shape != ():
+                            fillval = fillval[0]
+                    elif hasattr(self, '_FillValue'):
+                        fillval = self._FillValue
+                    else:
+                        fillval = default_fillvals[self.dtype.str[1:]]
+                    data = data.filled(fill_value=fillval)
+
+        # Fill output array with data chunks. 
+        for (a,b,c,i) in zip(start, count, stride, put_ind):
+            dataput = data[tuple(i)]
+            if dataput.size == 0: continue # nothing to write
+            # convert array scalar to regular array with one element.
+            if dataput.shape == (): 
+                if self._isvlen:
+                    dataput=numpy.array(dataput,'O')
+                else:
+                    dataput=numpy.array(dataput,dataput.dtype)
+            self._put(dataput,a,b,c)
+
+
+    def __len__(self):
+        return self.shape[0]
+
+
+    def assignValue(self,val):
+        """
+assignValue(self, val)
+
+assign a value to a scalar variable.  Provided for compatibility with 
+Scientific.IO.NetCDF, can also be done by assigning to a slice ([:])."""
+        if len(self.dimensions):
+            raise IndexError('to assign values to a non-scalar variable, use a slice')
+        self[:]=val
+
+    def getValue(self):
+        """
+getValue(self)
+
+get the value of a scalar variable.  Provided for compatibility with 
+Scientific.IO.NetCDF, can also be done by slicing ([:])."""
+        if len(self.dimensions):
+            raise IndexError('to retrieve values from a non-scalar variable, use slicing')
+        return self[slice(None)]
+
+    def set_auto_maskandscale(self,maskandscale):
+        """
+set_auto_maskandscale(self,maskandscale)
+
+turn on or off automatic conversion of variable data to and
+from masked arrays and automatic packing/unpacking of variable
+data using C{scale_factor} and C{add_offset} attributes.
+
+If C{maskandscale} is set to C{True}, when data is read from a variable
+it is converted to a masked array if any of the values are exactly
+equal to the either the netCDF _FillValue or the value specified by the 
+missing_value variable attribute. The fill_value of the masked array
+is set to the missing_value attribute (if it exists), otherwise
+the netCDF _FillValue attribute (which has a default value
+for each data type).  When data is written to a variable, the masked
+array is converted back to a regular numpy array by replacing all the
+masked values by the fill_value of the masked array.
+
+If C{maskandscale} is set to C{True}, and the variable has a
+C{scale_factor} or an C{add_offset} attribute, then data read
+from that variable is unpacked using::
+
+    data = self.scale_factor*data + self.add_offset
+            
+When data is written to a variable it is packed using::
+
+    data = (data - self.add_offset)/self.scale_factor
+
+If either scale_factor is present, but add_offset is missing, add_offset
+is assumed zero.  If add_offset is present, but scale_factor is missing,
+scale_factor is assumed to be one.
+For more information on how C{scale_factor} and C{add_offset} can be 
+used to provide simple compression, see
+U{http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml
+<http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml>}.
+
+The default value of C{maskandscale} is C{True}
+(automatic conversions are performed).
+        """
+        if maskandscale:
+            self.scale = True
+            self.mask = True
+        else:
+            self.scale = False
+            self.mask = False
+
+    def set_auto_scale(self,scale):
+        """
+set_auto_scale(self,scale)
+
+turn on or off automatic packing/unpacking of variable
+data using C{scale_factor} and C{add_offset} attributes.
+
+If C{scale} is set to C{True}, and the variable has a
+C{scale_factor} or an C{add_offset} attribute, then data read
+from that variable is unpacked using::
+
+    data = self.scale_factor*data + self.add_offset
+
+When data is written to a variable it is packed using::
+
+    data = (data - self.add_offset)/self.scale_factor
+
+If either scale_factor is present, but add_offset is missing, add_offset
+is assumed zero.  If add_offset is present, but scale_factor is missing,
+scale_factor is assumed to be one.
+For more information on how C{scale_factor} and C{add_offset} can be
+used to provide simple compression, see
+U{http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml
+<http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml>}.
+
+The default value of C{scale} is C{True}
+(automatic conversions are performed).
+        """
+        if scale:
+            self.scale = True
+        else:
+            self.scale = False
+
+    def set_auto_mask(self,mask):
+        """
+set_auto_mask(self,mask)
+
+turn on or off automatic conversion of variable data to and
+from masked arrays .
+
+If C{mask} is set to C{True}, when data is read from a variable
+it is converted to a masked array if any of the values are exactly
+equal to the either the netCDF _FillValue or the value specified by the
+missing_value variable attribute. The fill_value of the masked array
+is set to the missing_value attribute (if it exists), otherwise
+the netCDF _FillValue attribute (which has a default value
+for each data type).  When data is written to a variable, the masked
+array is converted back to a regular numpy array by replacing all the
+masked values by the fill_value of the masked array.
+
+The default value of C{mask} is C{True}
+(automatic conversions are performed).
+        """
+        if mask:
+            self.mask = True
+        else:
+            self.mask = False
+
+
+    def _put(self,ndarray data,start,count,stride):
+        """Private method to put data into a netCDF variable"""
+        cdef int ierr, ndims
+        cdef npy_intp totelem
+        cdef size_t startp[NC_MAX_DIMS]
+        cdef size_t countp[NC_MAX_DIMS]
+        cdef ptrdiff_t stridep[NC_MAX_DIMS]
+        cdef char **strdata
+        cdef void* elptr
+        cdef char* databuff
+        cdef ndarray dataarr
+        cdef nc_vlen_t *vldata
+        # rank of variable.
+        ndims = len(self.dimensions)
+        # make sure data is contiguous.
+        # if not, make a local copy.
+        if not PyArray_ISCONTIGUOUS(data):
+            data = data.copy()
+        # fill up startp,countp,stridep.
+        totelem = 1
+        negstride = 0
+        sl = []
+        for n from 0 <= n < ndims:
+            count[n] = abs(count[n]) # make -1 into +1
+            countp[n] = count[n] 
+            # for neg strides, reverse order (then flip that axis after data read in)
+            if stride[n] < 0: 
+                negstride = 1
+                stridep[n] = -stride[n]
+                startp[n] = start[n]+stride[n]*(count[n]-1)
+                stride[n] = -stride[n]
+                sl.append(slice(None, None, -1)) # this slice will reverse the data
+            else:
+                startp[n] = start[n]
+                stridep[n] = stride[n]
+                sl.append(slice(None,None, 1))
+            totelem = totelem*countp[n]
+        # check to see that size of data array is what is expected
+        # for slice given. 
+        dataelem = PyArray_SIZE(data)
+        if totelem != dataelem:
+            raise IndexError('size of data array does not conform to slice')
+        if negstride:
+            # reverse data along axes with negative strides.
+            data = data[sl].copy() # make sure a copy is made.
+        if self._isprimitive or self._iscompound:
+            # primitive or compound data type.
+            # if data type of array doesn't match variable, 
+            # try to cast the data.
+            if self.dtype != data.dtype:
+                data = data.astype(self.dtype) # cast data, if necessary.
+            # make sure byte-order of data matches byte-order of netcdf
+            # variable.
+            if self.endian() == 'native':
+                if is_native_little and data.dtype.byteorder == '>':
+                    data.byteswap(True)
+                if is_native_big and data.dtype.byteorder == '<':
+                    data.byteswap(True)
+            if self.endian() == 'big':
+                if is_native_big and data.dtype.byteorder not in ['=','|']:
+                    data.byteswap(True)
+                if is_native_little and data.dtype.byteorder == '=':
+                    data.byteswap(True)
+            if self.endian() == 'little':
+                if is_native_little and data.dtype.byteorder not in ['=','|']:
+                    data.byteswap(True)
+                if is_native_big and data.dtype.byteorder == '=':
+                    data.byteswap(True)
+            # strides all 1 or scalar variable, use put_vara (faster)
+            if sum(stride) == ndims or ndims == 0:
+                ierr = nc_put_vara(self._grpid, self._varid,
+                                   startp, countp, data.data)
+            else:  
+                ierr = nc_put_vars(self._grpid, self._varid,
+                                      startp, countp, stridep, data.data)
+            if ierr != NC_NOERR:
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        elif self._isvlen: 
+            if data.dtype.char !='O':
+                raise TypeError('data to put in string variable must be an object array containing Python strings')
+            # flatten data array.
+            data = data.flatten()
+            if self.dtype == str:
+                # convert all elements from strings to bytes
+                for n in range(data.shape[0]):
+                    data[n] = _strencode(data[n])
+                # vlen string (NC_STRING)
+                # loop over elements of object array, put data buffer for
+                # each element in struct.
+                # allocate struct array to hold vlen data.
+                strdata = <char **>malloc(sizeof(char *)*totelem)
+                for i from 0<=i<totelem:
+                    strdata[i] = data[i]
+                # strides all 1 or scalar variable, use put_vara (faster)
+                if sum(stride) == ndims or ndims == 0: 
+                    ierr = nc_put_vara(self._grpid, self._varid,
+                                       startp, countp, strdata)
+                else: 
+                    raise IndexError('strides must all be 1 for string variables')
+                    #ierr = nc_put_vars(self._grpid, self._varid,
+                    #                   startp, countp, stridep, strdata)
+                if ierr != NC_NOERR:
+                    raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+                free(strdata)
+            else:
+                # regular vlen.
+                # loop over elements of object array, put data buffer for
+                # each element in struct.
+                databuff = data.data
+                # allocate struct array to hold vlen data.
+                vldata = <nc_vlen_t *>malloc(<size_t>totelem*sizeof(nc_vlen_t))
+                for i from 0<=i<totelem:
+                    elptr = (<void**>databuff)[0]
+                    dataarr = <ndarray>elptr
+                    if self.dtype != dataarr.dtype.str[1:]:
+                        #dataarr = dataarr.astype(self.dtype) # cast data, if necessary.
+                        # casting doesn't work ?? just raise TypeError
+                        raise TypeError("wrong data type in object array: should be %s, got %s" % (self.dtype,dataarr.dtype))
+                    vldata[i].len = PyArray_SIZE(dataarr)
+                    vldata[i].p = dataarr.data
+                    databuff = databuff + data.strides[0]
+                # strides all 1 or scalar variable, use put_vara (faster)
+                if sum(stride) == ndims or ndims == 0: 
+                    ierr = nc_put_vara(self._grpid, self._varid,
+                                       startp, countp, vldata)
+                else:  
+                    raise IndexError('strides must all be 1 for vlen variables')
+                    #ierr = nc_put_vars(self._grpid, self._varid,
+                    #                   startp, countp, stridep, vldata)
+                if ierr != NC_NOERR:
+                    raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+                # free the pointer array.
+                free(vldata)
+
+    def _get(self,start,count,stride):
+        """Private method to retrieve data from a netCDF variable"""
+        cdef int ierr, ndims
+        cdef size_t startp[NC_MAX_DIMS]
+        cdef size_t countp[NC_MAX_DIMS]
+        cdef ptrdiff_t stridep[NC_MAX_DIMS]
+        cdef ndarray data, dataarr
+        cdef void *elptr
+        cdef char **strdata
+        cdef nc_vlen_t *vldata
+        # if one of the counts is negative, then it is an index
+        # and not a slice so the resulting array
+        # should be 'squeezed' to remove the singleton dimension.
+        shapeout = ()
+        squeeze_out = False
+        for lendim in count:
+            if lendim == -1:
+                shapeout = shapeout + (1,)
+                squeeze_out = True
+            else:
+                shapeout = shapeout + (lendim,)
+        # rank of variable.
+        ndims = len(self.dimensions)
+        # fill up startp,countp,stridep.
+        negstride = 0
+        sl = []
+        for n from 0 <= n < ndims:
+            count[n] = abs(count[n]) # make -1 into +1
+            countp[n] = count[n] 
+            # for neg strides, reverse order (then flip that axis after data read in)
+            if stride[n] < 0: 
+                negstride = 1
+                stridep[n] = -stride[n]
+                startp[n] = start[n]+stride[n]*(count[n]-1)
+                stride[n] = -stride[n]
+                sl.append(slice(None, None, -1)) # this slice will reverse the data
+            else:
+                startp[n] = start[n]
+                stridep[n] = stride[n]
+                sl.append(slice(None,None, 1))
+        if self._isprimitive or self._iscompound:
+            data = numpy.empty(shapeout, self.dtype)
+            # strides all 1 or scalar variable, use get_vara (faster)
+            if sum(stride) == ndims or ndims == 0: 
+                ierr = nc_get_vara(self._grpid, self._varid,
+                                   startp, countp, data.data)
+            else:
+                ierr = nc_get_vars(self._grpid, self._varid,
+                                   startp, countp, stridep, data.data)
+            if ierr == NC_EINVALCOORDS:
+                raise IndexError 
+            elif ierr != NC_NOERR:
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        elif self._isvlen:
+            # allocate array of correct primitive type.
+            data = numpy.empty(shapeout, 'O')
+            # flatten data array.
+            data = data.flatten()
+            totelem = PyArray_SIZE(data)
+            if self.dtype == str:
+                # vlen string (NC_STRING)
+                # allocate pointer array to hold string data.
+                strdata = <char **>malloc(sizeof(char *) * totelem)
+                # strides all 1 or scalar variable, use get_vara (faster)
+                if sum(stride) == ndims or ndims == 0: 
+                    ierr = nc_get_vara(self._grpid, self._varid,
+                                       startp, countp, strdata)
+                else:
+                    # FIXME: is this a bug in netCDF4?
+                    raise IndexError('strides must all be 1 for string variables')
+                    #ierr = nc_get_vars(self._grpid, self._varid,
+                    #                   startp, countp, stridep, strdata)
+                if ierr == NC_EINVALCOORDS:
+                    raise IndexError 
+                elif ierr != NC_NOERR:
+                    raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+                # loop over elements of object array, fill array with
+                # contents of strdata.
+                for i from 0<=i<totelem:
+                    data[i] = strdata[i].decode(default_encoding)
+                # reshape the output array
+                data = numpy.reshape(data, shapeout)
+                free(strdata)
+            else:
+                # regular vlen
+                # allocate struct array to hold vlen data.
+                vldata = <nc_vlen_t *>malloc(totelem*sizeof(nc_vlen_t))
+                # strides all 1 or scalar variable, use get_vara (faster)
+                if sum(stride) == ndims or ndims == 0: 
+                    ierr = nc_get_vara(self._grpid, self._varid,
+                                       startp, countp, vldata)
+                else:
+                    raise IndexError('strides must all be 1 for vlen variables')
+                    #ierr = nc_get_vars(self._grpid, self._varid,
+                    #                   startp, countp, stridep, vldata)
+                if ierr == NC_EINVALCOORDS:
+                    raise IndexError 
+                elif ierr != NC_NOERR:
+                    raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+                # loop over elements of object array, fill array with
+                # contents of vlarray struct, put array in object array.
+                for i from 0<=i<totelem:
+                    arrlen  = vldata[i].len
+                    dataarr = numpy.empty(arrlen, self.dtype)
+                    dataarr.data = <char *>vldata[i].p
+                    data[i] = dataarr
+                # reshape the output array
+                data = numpy.reshape(data, shapeout)
+                # free the pointer array.
+                free(vldata)
+        if negstride:
+            # reverse data along axes with negative strides.
+            data = data[sl].copy() # make a copy so data is contiguous.
+        if not self.dimensions: 
+            return data[0] # a scalar 
+        elif squeeze_out:
+            return numpy.squeeze(data)
+        else:
+            return data
+
+# Compound datatype support.
+
+cdef class CompoundType:
+    """
+A L{CompoundType} instance is used to describe a compound data type.
+
+Constructor: C{CompoundType(group, datatype, datatype_name)}
+
+ at attention: When creating nested compound data types,
+the inner compound data types must already be associated with CompoundType
+instances (so create CompoundType instances for the innermost structures
+first).
+
+L{CompoundType} instances should be created using the
+L{createCompoundType<Dataset.createCompoundType>}
+method of a Dataset or L{Group} instance, not using this class directly.
+
+B{Parameters:}
+
+B{C{group}} - L{Group} instance to associate with the compound datatype.
+
+B{C{datatype}} - A numpy dtype object describing a structured (a.k.a record)
+array.  Can be composed of homogeneous numeric or character data types, or 
+other structured array data types. 
+
+B{C{datatype_name}} - a Python string containing a description of the 
+compound data type.
+
+B{Returns:}
+
+a L{CompoundType} instance, which can be passed to the C{createVariable} 
+method of a L{Dataset} or L{Group} instance.
+
+The instance variables C{dtype} and C{name} should not be modified by
+the user.
+
+ at ivar dtype: A numpy dtype object describing the compound data type.
+
+ at ivar name: A python string describing the compound type.
+"""
+    cdef public nc_type _nc_type
+    cdef public dtype, name
+    def __init__(self, grp, object dt, object dtype_name, **kwargs):
+        cdef nc_type xtype
+        dt = numpy.dtype(dt,align=True)
+        if 'typeid' in kwargs:
+            xtype = kwargs['typeid']
+        else:
+            xtype = _def_compound(grp, dt, dtype_name)
+        self._nc_type = xtype
+        self.dtype = dt
+        self.name = dtype_name
+
+    def __repr__(self):
+        if python3:
+           return self.__unicode__()
+        else:
+           return unicode(self).encode(default_encoding)
+
+    def __unicode__(self):
+        return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
+        (self.name,self.dtype)
+
+cdef _def_compound(grp, object dt, object dtype_name):
+    # private function used to construct a netcdf compound data type
+    # from a numpy dtype object by CompoundType.__init__.
+    cdef nc_type xtype, xtype_tmp
+    cdef int ierr, ndims
+    cdef size_t offset, size
+    cdef char *namstring
+    cdef char *nested_namstring
+    cdef int dim_sizes[NC_MAX_DIMS]
+    bytestr = _strencode(dtype_name)
+    namstring = bytestr
+    size = dt.itemsize
+    ierr = nc_def_compound(grp._grpid, size, namstring, &xtype)
+    if ierr != NC_NOERR:
+        raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+    names = list(dt.fields.keys())
+    formats = [v[0] for v in dt.fields.values()]
+    offsets = [v[1] for v in dt.fields.values()]
+    # make sure entries in lists sorted by offset.
+    # (don't know why this is necessary, but it is for version 4.0.1)
+    names = _sortbylist(names, offsets)
+    formats = _sortbylist(formats, offsets)
+    offsets.sort()
+    for name, format, offset in zip(names, formats, offsets):
+        bytestr = _strencode(name)
+        namstring = bytestr
+        if format.kind != 'V': # scalar primitive type
+            try:
+                xtype_tmp = _nptonctype[format.str[1:]]
+            except KeyError:
+                raise ValueError('Unsupported compound type element')
+            ierr = nc_insert_compound(grp._grpid, xtype, namstring,
+                                      offset, xtype_tmp)
+            if ierr != NC_NOERR:
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        else:
+            if format.shape ==  (): # nested scalar compound type
+                # find this compound type in this group or it's parents.
+                xtype_tmp = _find_cmptype(grp, format) 
+                bytestr = _strencode(name)
+                nested_namstring = bytestr
+                ierr = nc_insert_compound(grp._grpid, xtype,\
+                                          nested_namstring,\
+                                          offset, xtype_tmp)
+                if ierr != NC_NOERR:
+                    raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+            else: # array compound element
+                ndims = len(format.shape)
+                for n from 0 <= n < ndims:
+                    dim_sizes[n] = format.shape[n]
+                if format.subdtype[0].str[1] != 'V': # primitive type.
+                    try:
+                        xtype_tmp = _nptonctype[format.subdtype[0].str[1:]]
+                    except KeyError:
+                        raise ValueError('Unsupported compound type element')
+                    ierr = nc_insert_array_compound(grp._grpid,xtype,namstring,
+                           offset,xtype_tmp,ndims,dim_sizes)
+                    if ierr != NC_NOERR:
+                        raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+                else: # nested array compound type.
+                    # find this compound type in this group or it's parents.
+                    xtype_tmp = _find_cmptype(grp, format.subdtype[0]) 
+                    bytestr = _strencode(name)
+                    nested_namstring = bytestr
+                    ierr = nc_insert_array_compound(grp._grpid,xtype,\
+                                                    nested_namstring,\
+                                                    offset,xtype_tmp,\
+                                                    ndims,dim_sizes)
+                    if ierr != NC_NOERR:
+                        raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+    return xtype
+
+cdef _find_cmptype(grp, dtype):
+    # look for data type in this group and it's parents.
+    # return datatype id when found, if not found, raise exception.
+    cdef nc_type xtype
+    match = False
+    for cmpname, cmpdt in grp.cmptypes.items():
+        xtype = cmpdt._nc_type
+        names1 = dtype.names; names2 = cmpdt.dtype.names
+        formats1 = [v[0] for v in dtype.fields.values()]
+        formats2 = [v[0] for v in cmpdt.dtype.fields.values()]
+        # match names, formats, but not offsets (they may be changed
+        # by netcdf lib).
+        if names1==names2 and formats1==formats2:
+            match = True
+            break
+    if not match: 
+        try:
+            parent_grp = grp.parent
+        except AttributeError:
+            raise ValueError("cannot find compound type in this group or parent groups")
+        if parent_grp is None:
+            raise ValueError("cannot find compound type in this group or parent groups")
+        else:
+            xtype = _find_cmptype(parent_grp,dtype)
+    return xtype
+
+cdef _read_compound(group, nc_type xtype):
+    # read a compound data type id from an existing file,
+    # construct a corresponding numpy dtype instance, 
+    # then use that to create a CompoundType instance.
+    # called by _get_vars, _get_types and _get_att.
+    # Calls itself recursively for nested compound types.
+    cdef int ierr, nf, numdims, ndim, classp
+    cdef size_t nfields, offset
+    cdef nc_type field_typeid
+    cdef int dim_sizes[NC_MAX_DIMS]
+    cdef char field_namstring[NC_MAX_NAME+1]
+    cdef char cmp_namstring[NC_MAX_NAME+1]
+    # get name and number of fields.
+    ierr = nc_inq_compound(group._grpid, xtype, cmp_namstring, NULL, &nfields)
+    if ierr != NC_NOERR:
+        raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+    name = cmp_namstring.decode(default_encoding,unicode_error)
+    # loop over fields.
+    names = []
+    formats = []
+    offsets = []
+    for nf from 0 <= nf < nfields:
+        ierr = nc_inq_compound_field(group._grpid,
+                                     xtype,
+                                     nf,
+                                     field_namstring,
+                                     &offset,
+                                     &field_typeid,
+                                     &numdims,
+                                     dim_sizes)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        field_name = field_namstring.decode(default_encoding,unicode_error)
+        names.append(field_name)
+        offsets.append(offset)
+        # if numdims=0, not an array.
+        field_shape = ()
+        if numdims != 0:
+            for ndim from 0 <= ndim < numdims:
+                field_shape = field_shape + (dim_sizes[ndim],)
+        # check to see if this field is a nested compound type.
+        try: 
+            field_type =  _nctonptype[field_typeid]
+        except KeyError:
+            ierr = nc_inq_user_type(group._grpid,
+                   field_typeid,NULL,NULL,NULL,NULL,&classp)
+            if classp == NC_COMPOUND: # a compound type
+                # recursively call this function?
+                field_type = _read_compound(group, field_typeid)
+            else:
+                raise KeyError('compound field of an unsupported data type')
+        if field_shape != ():
+            formats.append((field_type,field_shape))
+        else:
+            formats.append(field_type)
+    # make sure entries in lists sorted by offset.
+    names = _sortbylist(names, offsets)
+    formats = _sortbylist(formats, offsets)
+    offsets.sort()
+    # create a dict that can be converted into a numpy dtype.
+    dtype_dict = {'names':names,'formats':formats,'offsets':offsets}
+    return CompoundType(group, dtype_dict, name, typeid=xtype)
+
+# VLEN datatype support.
+
+cdef class VLType:
+    """
+A L{VLType} instance is used to describe a variable length (VLEN) data type.
+
+Constructor: C{VLType(group, datatype, datatype_name)}
+
+L{VLType} instances should be created using the 
+L{createVLType<Dataset.createVLType>}
+method of a Dataset or L{Group} instance, not using this class directly.
+
+B{Parameters:}
+
+B{C{group}} - L{Group} instance to associate with the VLEN datatype.
+
+B{C{datatype}} - An numpy dtype object describing a the component type for the
+variable length array.  
+
+B{C{datatype_name}} - a Python string containing a description of the 
+VLEN data type.
+
+B{Returns:}
+
+a L{VLType} instance, which can be passed to the C{createVariable} 
+method of a L{Dataset} or L{Group} instance.
+
+The instance variables C{dtype} and C{name} should not be modified by
+the user.
+
+ at ivar dtype: An object describing the VLEN type.
+
+ at ivar name: A python string describing the VLEN type.
+"""
+    cdef public nc_type _nc_type
+    cdef public dtype, name
+    def __init__(self, grp, object dt, object dtype_name, **kwargs):
+        cdef nc_type xtype
+        if 'typeid' in kwargs:
+            xtype = kwargs['typeid']
+        else:
+            xtype, dt = _def_vlen(grp, dt, dtype_name)
+        self._nc_type = xtype
+        self.dtype = dt
+        if dt == str:
+            self.name = None
+        else:
+            self.name = dtype_name
+
+    def __repr__(self):
+        if python3:
+           return self.__unicode__()
+        else:
+           return unicode(self).encode(default_encoding)
+
+    def __unicode__(self):
+        if self.dtype == str:
+            return repr(type(self))+': string type'
+        else:
+            return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
+            (self.name, self.dtype)
+
+cdef _def_vlen(grp, object dt, object dtype_name):
+    # private function used to construct a netcdf VLEN data type
+    # from a numpy dtype object or python str object by VLType.__init__.
+    cdef nc_type xtype, xtype_tmp
+    cdef int ierr, ndims
+    cdef size_t offset, size
+    cdef char *namstring
+    cdef char *nested_namstring
+    cdef int dim_sizes[NC_MAX_DIMS]
+    if dt == str: # python string, use NC_STRING
+        xtype = NC_STRING
+        # dtype_name ignored
+    else: # numpy datatype
+        bytestr = _strencode(dtype_name)
+        namstring = bytestr
+        dt = numpy.dtype(dt) # convert to numpy datatype.
+        if dt.str[1:] in _supportedtypes:
+            # find netCDF primitive data type corresponding to 
+            # specified numpy data type.
+            xtype_tmp = _nptonctype[dt.str[1:]]
+            ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype);
+            if ierr != NC_NOERR:
+               raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        else:
+            raise KeyError("unsupported datatype specified for VLEN")
+    return xtype, dt
+
+cdef _read_vlen(group, nc_type xtype):
+    # read a VLEN data type id from an existing file,
+    # construct a corresponding numpy dtype instance, 
+    # then use that to create a VLType instance.
+    # called by _get_types, _get_vars.
+    cdef int ierr
+    cdef size_t vlsize
+    cdef nc_type base_xtype
+    cdef char vl_namstring[NC_MAX_NAME+1]
+    if xtype == NC_STRING:
+        dt = str
+        name = None
+    else:
+        ierr = nc_inq_vlen(group._grpid, xtype, vl_namstring, &vlsize, &base_xtype)
+        if ierr != NC_NOERR:
+            raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        name = vl_namstring.decode(default_encoding,unicode_error)
+        try:
+            dt = numpy.dtype(_nctonptype[base_xtype]) # see if it is a primitive type
+        except KeyError:
+            raise KeyError("unsupported component type for VLEN")
+    return VLType(group, dt, name, typeid=xtype)
+
+cdef _strencode(pystr,encoding=None):
+    # encode a string into bytes.  If already bytes, do nothing.
+    # uses default_encoding module variable for default encoding.
+    if encoding is None:
+        encoding = default_encoding
+    try:
+        return pystr.encode(encoding)
+    except (AttributeError, UnicodeDecodeError):
+        return pystr # already bytes or unicode?
diff --git a/netCDF4_utils.py b/netCDF4_utils.py
new file mode 100644
index 0000000..1e24599
--- /dev/null
+++ b/netCDF4_utils.py
@@ -0,0 +1,401 @@
+import numpy as np
+from numpy import ma
+import sys
+
+python3 = sys.version_info[0] > 2
+if python3:
+    # no unicode type in python 3, use bytes instead when testing
+    # for a string-like object
+    unicode = str
+try:
+    bytes
+except NameError:
+    # no bytes type in python < 2.6
+    bytes = str
+
+
+def _sortbylist(A,B):
+    # sort one list (A) using the values from another list (B)
+    return [A[i] for i in sorted(range(len(A)), key=B.__getitem__)]
+
+def _find_dim(grp, dimname):
+    # find Dimension instance given group and name.
+    # look in current group, and parents.
+    group = grp
+    dim = None
+    while 1:
+        try:
+            dim = group.dimensions[dimname]
+            break
+        except:
+            try:
+                group = group.parent
+            except:
+                raise ValueError("cannot find dimension %s in this group or parent groups" % dimname)
+    return dim
+
+def _walk_grps(topgrp):
+    """Iterate through all (sub-) groups of topgrp, similar to os.walktree.
+
+    """
+    grps = topgrp.groups.values()
+    yield grps
+    for grp in topgrp.groups.values():
+        for children in _walk_grps(grp):
+            yield children
+
+def _quantize(data,least_significant_digit):
+    """
+quantize data to improve compression. data is quantized using
+around(scale*data)/scale, where scale is 2**bits, and bits is determined
+from the least_significant_digit. For example, if
+least_significant_digit=1, bits will be 4.
+    """
+    precision = pow(10.,-least_significant_digit)
+    exp = np.log10(precision)
+    if exp < 0:
+        exp = int(np.floor(exp))
+    else:
+        exp = int(np.ceil(exp))
+    bits = np.ceil(np.log2(pow(10.,-exp)))
+    scale = pow(2.,bits)
+    datout = np.around(scale*data)/scale
+    if ma.isMA(datout):
+        datout.set_fill_value(data.fill_value)
+        return datout
+    else:
+        return datout
+
+def _StartCountStride(elem, shape, dimensions=None, grp=None, datashape=None,\
+        put=False):
+    """Return start, count, stride and indices needed to store/extract data
+    into/from a netCDF variable.
+
+    This function is used to convert a NumPy index into a form that is
+    compatible with the nc_get_vars function. Specifically, it needs
+    to interpret slices, ellipses, sequences of integers as well as
+    sequences of booleans.
+
+    Note that all the fancy indexing tricks
+    implemented in NumPy are not supported. In particular, multidimensional
+    indexing is not supported and will raise an IndexError. Note also that
+    boolean indexing does not work as in NumPy. In NumPy, booleans arrays
+    behave identically to integer indices. For netCDF variables, we thought
+    it would be useful to use a different logic, namely dimension independence.
+    What this means is that you can do:
+    >>> v[lat>60, lon<180, :]
+    to fetch the elements of v obeying conditions on latitude and longitude.
+
+    This function is used both by the __setitem__ and __getitem__ method of
+    the Variable class. Although the behavior is similar in both cases, there
+    are some differences to be noted.
+
+    Parameters
+    ----------
+    elem : tuple of integer, slice, ellipsis or sequence of integers.
+      The indexing information for the netCDF Variable: Variable[elem]
+    shape : tuple
+      The current shape of the netCDF variable.
+    dimensions : sequence
+      The name of the dimensions. This is only useful to find out
+      whether or not some dimensions are unlimited. Only needed within
+      __setitem__.
+    grp  : netCDF Group
+      The netCDF group to which the variable being set belongs to.
+      Only needed within __setitem__.
+    datashape : sequence
+      The shape of the data that is being stored. Only needed within
+      __setitem__.
+    put : True|False (default False).  If called from __setitem__, put is True.
+
+    Returns
+    -------
+    start : ndarray (..., n)
+      A starting indices array of dimension n+1. The first n
+      dimensions identify different independent data chunks. The last dimension
+      can be read as the starting indices.
+    count : ndarray (..., n)
+      An array of dimension (n+1) storing the number of elements to get.
+    stride : ndarray (..., n)
+      An array of dimension (n+1) storing the steps between each datum.
+    indices : ndarray (..., n)
+      An array storing the indices describing the location of the
+      data chunk in the target/source array (__getitem__/__setitem__).
+
+    Notes:
+
+    netCDF data is accessed via the function:
+       nc_get_vars(grpid, varid, start, count, stride, data)
+
+    Assume that the variable has dimension n, then
+
+    start is a n-tuple that contains the indices at the beginning of data chunk.
+    count is a n-tuple that contains the number of elements to be accessed.
+    stride is a n-tuple that contains the step length between each element.
+
+    """
+    # Adapted from pycdf (http://pysclint.sourceforge.net/pycdf)
+    # by Andre Gosselin..
+    # Modified by David Huard to handle efficiently fancy indexing with
+    # sequences of integers or booleans.
+
+    nDims = len(shape)
+    if nDims == 0:
+        nDims = 1
+        shape = (1,)
+
+    # When a single array or (non-tuple) sequence of integers is given
+    # as a slice, assume it applies to the first dimension,
+    # and use ellipsis for remaining dimensions.
+    if np.iterable(elem):
+        if type(elem) == np.ndarray or (type(elem) != tuple and \
+            np.array([_is_int(e) for e in elem]).all()):
+            elem = [elem]
+            for n in range(len(elem)+1,nDims+1):
+                elem.append(slice(None,None,None))
+    else:   # Convert single index to sequence
+        elem = [elem]
+
+    # replace sequence of integer indices with boolean arrays
+    newElem = []
+    IndexErrorMsg=\
+    "only integers, slices (`:`), ellipsis (`...`), and 1-d integer or boolean arrays are valid indices"
+    for i, e in enumerate(elem):
+        # string-like object try to cast to int
+        # needs to be done first, since strings are iterable and
+        # hard to distinguish from something castable to an iterable numpy array.
+        if type(e) in [str,bytes,unicode]:
+            try:
+                e = int(e)
+            except:
+                raise IndexError(IndexErrorMsg)
+        ea = np.asarray(e)
+        # Raise error if multidimensional indexing is used.
+        if ea.ndim > 1:
+            raise IndexError("Index cannot be multidimensional")
+        # set unlim to True if dimension is unlimited and put==True
+        # (called from __setitem__)
+        if put and (dimensions is not None and grp is not None) and len(dimensions):
+            dimname = dimensions[i]
+            # is this dimension unlimited?
+            # look in current group, and parents for dim.
+            dim = _find_dim(grp, dimname)
+            unlim = dim.isunlimited()
+        else:
+            unlim = False
+        # an iterable (non-scalar) integer array.
+        if np.iterable(ea) and ea.dtype.kind == 'i':
+            # convert negative indices in 1d array to positive ones.
+            ea = np.where(ea < 0, ea + shape[i], ea)
+            if np.any(ea < 0):
+                raise IndexErro("integer index out of range")
+            if not np.all(np.diff(ea) > 0): # same but cheaper than np.all(np.unique(ea) == ea)
+                # raise an error when new indexing behavior is different
+                # (i.e. when integer sequence not sorted, or there are
+                # duplicate indices in the sequence)
+                msg = "integer sequences in slices must be sorted and cannot have duplicates"
+                raise IndexError(msg)
+            # convert to boolean array.
+            # if unlim, let boolean array be longer than current dimension
+            # length.
+            elen = shape[i]
+            if unlim:
+                elen = max(ea.max()+1,elen)
+            else:
+                if ea.max()+1 > elen:
+                    msg="integer index exceeds dimension size"
+                    raise IndexError(msg)
+            eb = np.zeros(elen,np.bool)
+            eb[ea] = True
+            newElem.append(eb)
+        # an iterable (non-scalar) boolean array
+        elif np.iterable(ea) and ea.dtype.kind =='b':
+            # check that boolen array not too long
+            if not unlim and shape[i] != len(ea):
+                msg="""
+Boolean array must have the same shape as the data along this dimension."""
+                raise IndexError(msg)
+            newElem.append(ea)
+        # integer scalar
+        elif ea.dtype.kind == 'i':
+            newElem.append(e)
+        # slice or ellipsis object
+        elif type(e) == slice or type(e) == type(Ellipsis):
+            newElem.append(e)
+        else:  # castable to a scalar int, otherwise invalid
+            try:
+                e = int(e)
+                newElem.append(e)
+            except:
+                raise IndexError(IndexErrorMsg)
+    elem = newElem
+
+    # replace Ellipsis and boolean arrays with slice objects, if possible.
+    hasEllipsis = False
+    newElem = []
+    for e in elem:
+        ea = np.asarray(e)
+        # Replace ellipsis with slices.
+        if type(e) == type(Ellipsis):
+            if hasEllipsis:
+                raise IndexError("At most one ellipsis allowed in a slicing expression")
+            # The ellipsis stands for the missing dimensions.
+            newElem.extend((slice(None, None, None),) * (nDims - len(elem) + 1))
+            hasEllipsis = True
+        # Replace boolean array with slice object if possible.
+        elif ea.dtype.kind == 'b':
+            if ea.any():
+                indices = np.flatnonzero(ea)
+                start = indices[0]
+                stop = indices[-1] + 1
+                if len(indices) >= 2:
+                    step = indices[1] - indices[0]
+                else:
+                    step = None
+                if np.array_equal(indices, np.arange(start, stop, step)):
+                    newElem.append(slice(start, stop, step))
+                else:
+                    newElem.append(ea)
+            else:
+                newElem.append(slice(0, 0))
+        else:
+            newElem.append(e)
+    elem = newElem
+
+    # If slice doesn't cover all dims, assume ellipsis for rest of dims.
+    if len(elem) < nDims:
+        for n in range(len(elem)+1,nDims+1):
+            elem.append(slice(None,None,None))
+
+    # make sure there are not too many dimensions in slice.
+    if len(elem) > nDims:
+        raise ValueError("slicing expression exceeds the number of dimensions of the variable")
+
+    # Compute the dimensions of the start, count, stride and indices arrays.
+    # The number of elements in the first n dimensions corresponds to the
+    # number of times the _get method will be called.
+    sdim = []
+    for i, e in enumerate(elem):
+        # at this stage e is a slice, a scalar integer, or a 1d boolean array.
+        # Booleans --- _get call for each True value
+        if np.asarray(e).dtype.kind == 'b':
+            sdim.append(e.sum())
+        # Scalar int or slice, just a single _get call
+        else:
+            sdim.append(1)
+
+    # Create the start, count, stride and indices arrays.
+
+    sdim.append(max(nDims, 1))
+    start = np.empty(sdim, dtype=int)
+    count = np.empty(sdim, dtype=int)
+    stride = np.empty(sdim, dtype=int)
+    indices = np.empty(sdim, dtype=object)
+
+    for i, e in enumerate(elem):
+
+        ea = np.asarray(e)
+
+        # set unlim to True if dimension is unlimited and put==True
+        # (called from __setitem__). Note: grp and dimensions must be set.
+        if put and (dimensions is not None and grp is not None) and len(dimensions):
+            dimname = dimensions[i]
+            # is this dimension unlimited?
+            # look in current group, and parents for dim.
+            dim = _find_dim(grp, dimname)
+            unlim = dim.isunlimited()
+        else:
+            unlim = False
+
+        #    SLICE    #
+        if type(e) == slice:
+
+            # determine length parameter for slice.indices.
+
+            # shape[i] can be zero for unlim dim that hasn't been written to
+            # yet.
+            # length of slice may be longer than current shape
+            # if dimension is unlimited (and we are writing, not reading).
+            if unlim and e.stop is not None and e.stop > shape[i]:
+                length = e.stop
+            elif unlim and e.stop is None and datashape != ():
+                if e.start is None:
+                    length = datashape[i]
+                else:
+                    length = e.start+datashape[i]
+            else:
+                if unlim and datashape == () and len(dim) == 0:
+                    # writing scalar along unlimited dimension using slicing
+                    # syntax (var[:] = 1, when var.shape = ())
+                    length = 1
+                else:
+                    length = shape[i]
+
+            beg, end, inc = e.indices(length)
+            n = len(range(beg,end,inc))
+
+            start[...,i] = beg
+            count[...,i] = n
+            stride[...,i] = inc
+            indices[...,i] = slice(None)
+
+        #    BOOLEAN ITERABLE    #
+        elif ea.dtype.kind == 'b':
+            e = np.arange(len(e))[e] # convert to integer array
+            start[...,i] = np.apply_along_axis(lambda x: e*x, i, np.ones(sdim[:-1]))
+            indices[...,i] = np.apply_along_axis(lambda x: np.arange(sdim[i])*x, i, np.ones(sdim[:-1], int))
+
+            count[...,i] = 1
+            stride[...,i] = 1
+
+
+        #   all that's left is SCALAR INTEGER    #
+        else:
+            if e >= 0:
+                start[...,i] = e
+            elif e < 0 and (-e <= shape[i]) :
+                start[...,i] = e+shape[i]
+            else:
+                raise IndexError("Index out of range")
+
+            count[...,i] = 1
+            stride[...,i] = 1
+            indices[...,i] = -1    # Use -1 instead of 0 to indicate that
+                                       # this dimension shall be squeezed.
+
+    return start, count, stride, indices#, out_shape
+
+def _out_array_shape(count):
+    """Return the output array shape given the count array created by getStartCountStride"""
+
+    s = list(count.shape[:-1])
+    out = []
+
+    for i, n in enumerate(s):
+        if n == 1:
+            c = count[..., i].ravel()[0] # All elements should be identical.
+            out.append(c)
+        else:
+            out.append(n)
+    return out
+
+def _is_container(a):
+    # is object container-like?  (can test for
+    # membership with "is in", but not a string)
+    try: 1 in a
+    except: return False
+    if type(a) == type(basestring): return False
+    return True
+
+def _is_int(a):
+    try:
+        return int(a) == a
+    except:
+        return False
+
+def _tostr(s):
+    try:
+        ss = str(s)
+    except:
+        ss = s
+    return ss
diff --git a/netcdftime/__init__.py b/netcdftime/__init__.py
new file mode 100644
index 0000000..39e3fab
--- /dev/null
+++ b/netcdftime/__init__.py
@@ -0,0 +1,2 @@
+from .netcdftime import utime, JulianDayFromDate, DateFromJulianDay
+from .netcdftime import date2index, datetime, date2num, num2date
diff --git a/netcdftime/_datetime.c b/netcdftime/_datetime.c
new file mode 100644
index 0000000..e9c0bdb
--- /dev/null
+++ b/netcdftime/_datetime.c
@@ -0,0 +1,5094 @@
+/* Generated by Cython 0.21.1 */
+
+#define PY_SSIZE_T_CLEAN
+#ifndef CYTHON_USE_PYLONG_INTERNALS
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#else
+#include "pyconfig.h"
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 1
+#else
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#endif
+#endif
+#endif
+#include "Python.h"
+#ifndef Py_PYTHON_H
+    #error Python headers needed to compile C extensions, please install development version of Python.
+#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
+    #error Cython requires Python 2.6+ or Python 3.2+.
+#else
+#define CYTHON_ABI "0_21_1"
+#include <stddef.h>
+#ifndef offsetof
+#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#endif
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+  #ifndef __stdcall
+    #define __stdcall
+  #endif
+  #ifndef __cdecl
+    #define __cdecl
+  #endif
+  #ifndef __fastcall
+    #define __fastcall
+  #endif
+#endif
+#ifndef DL_IMPORT
+  #define DL_IMPORT(t) t
+#endif
+#ifndef DL_EXPORT
+  #define DL_EXPORT(t) t
+#endif
+#ifndef PY_LONG_LONG
+  #define PY_LONG_LONG LONG_LONG
+#endif
+#ifndef Py_HUGE_VAL
+  #define Py_HUGE_VAL HUGE_VAL
+#endif
+#ifdef PYPY_VERSION
+#define CYTHON_COMPILING_IN_PYPY 1
+#define CYTHON_COMPILING_IN_CPYTHON 0
+#else
+#define CYTHON_COMPILING_IN_PYPY 0
+#define CYTHON_COMPILING_IN_CPYTHON 1
+#endif
+#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600
+#define Py_OptimizeFlag 0
+#endif
+#define __PYX_BUILD_PY_SSIZE_T "n"
+#define CYTHON_FORMAT_SSIZE_T "z"
+#if PY_MAJOR_VERSION < 3
+  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
+  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
+          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyClass_Type
+#else
+  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
+          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+  #define __Pyx_DefaultClassType PyType_Type
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define Py_TPFLAGS_CHECKTYPES 0
+  #define Py_TPFLAGS_HAVE_INDEX 0
+  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
+#endif
+#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
+  #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
+#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+  #define CYTHON_PEP393_ENABLED 1
+  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
+                                              0 : _PyUnicode_Ready((PyObject *)(op)))
+  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
+  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
+  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
+  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
+#else
+  #define CYTHON_PEP393_ENABLED 0
+  #define __Pyx_PyUnicode_READY(op)       (0)
+  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
+  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
+  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
+  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
+  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
+  #define __Pyx_PyFrozenSet_Size(s)         PyObject_Size(s)
+#else
+  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
+  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
+      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+  #define __Pyx_PyFrozenSet_Size(s)         PySet_Size(s)
+#endif
+#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
+#else
+  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define PyBaseString_Type            PyUnicode_Type
+  #define PyStringObject               PyUnicodeObject
+  #define PyString_Type                PyUnicode_Type
+  #define PyString_Check               PyUnicode_Check
+  #define PyString_CheckExact          PyUnicode_CheckExact
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
+  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
+#ifndef PySet_CheckExact
+  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
+#endif
+#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#if PY_MAJOR_VERSION >= 3
+  #define PyIntObject                  PyLongObject
+  #define PyInt_Type                   PyLong_Type
+  #define PyInt_Check(op)              PyLong_Check(op)
+  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
+  #define PyInt_FromString             PyLong_FromString
+  #define PyInt_FromUnicode            PyLong_FromUnicode
+  #define PyInt_FromLong               PyLong_FromLong
+  #define PyInt_FromSize_t             PyLong_FromSize_t
+  #define PyInt_FromSsize_t            PyLong_FromSsize_t
+  #define PyInt_AsLong                 PyLong_AsLong
+  #define PyInt_AS_LONG                PyLong_AS_LONG
+  #define PyInt_AsSsize_t              PyLong_AsSsize_t
+  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
+  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+  #define PyNumber_Int                 PyNumber_Long
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define PyBoolObject                 PyLongObject
+#endif
+#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
+  #ifndef PyUnicode_InternFromString
+    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
+  #endif
+#endif
+#if PY_VERSION_HEX < 0x030200A4
+  typedef long Py_hash_t;
+  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
+  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
+#else
+  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
+  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
+#endif
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
+#else
+  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
+#endif
+#ifndef CYTHON_INLINE
+  #if defined(__GNUC__)
+    #define CYTHON_INLINE __inline__
+  #elif defined(_MSC_VER)
+    #define CYTHON_INLINE __inline
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_INLINE inline
+  #else
+    #define CYTHON_INLINE
+  #endif
+#endif
+#ifndef CYTHON_RESTRICT
+  #if defined(__GNUC__)
+    #define CYTHON_RESTRICT __restrict__
+  #elif defined(_MSC_VER) && _MSC_VER >= 1400
+    #define CYTHON_RESTRICT __restrict
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_RESTRICT restrict
+  #else
+    #define CYTHON_RESTRICT
+  #endif
+#endif
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
+   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
+   a quiet NaN. */
+  float value;
+  memset(&value, 0xFF, sizeof(value));
+  return value;
+}
+#endif
+#ifdef __cplusplus
+template<typename T>
+void __Pyx_call_destructor(T* x) {
+    x->~T();
+}
+#endif
+
+
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
+#else
+  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
+#endif
+
+#ifndef __PYX_EXTERN_C
+  #ifdef __cplusplus
+    #define __PYX_EXTERN_C extern "C"
+  #else
+    #define __PYX_EXTERN_C extern
+  #endif
+#endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+#define _USE_MATH_DEFINES
+#endif
+#include <math.h>
+#define __PYX_HAVE__netcdftime___datetime
+#define __PYX_HAVE_API__netcdftime___datetime
+#include "string.h"
+#include "stdio.h"
+#ifdef _OPENMP
+#include <omp.h>
+#endif /* _OPENMP */
+
+#ifdef PYREX_WITHOUT_ASSERTIONS
+#define CYTHON_WITHOUT_ASSERTIONS
+#endif
+
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
+#   else
+#     define CYTHON_UNUSED
+#   endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+#   define CYTHON_UNUSED
+# endif
+#endif
+typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
+                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (    \
+    (sizeof(type) < sizeof(Py_ssize_t))  ||             \
+    (sizeof(type) > sizeof(Py_ssize_t) &&               \
+          likely(v < (type)PY_SSIZE_T_MAX ||            \
+                 v == (type)PY_SSIZE_T_MAX)  &&         \
+          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||       \
+                                v == (type)PY_SSIZE_T_MIN)))  ||  \
+    (sizeof(type) == sizeof(Py_ssize_t) &&              \
+          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||        \
+                               v == (type)PY_SSIZE_T_MAX)))  )
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString        PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
+#if PY_MAJOR_VERSION < 3
+    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((const char*)s)
+#define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((const char*)s)
+#define __Pyx_PyByteArray_FromUString(s)   __Pyx_PyByteArray_FromString((const char*)s)
+#define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((const char*)s)
+#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((const char*)s)
+#if PY_MAJOR_VERSION < 3
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
+{
+    const Py_UNICODE *u_end = u;
+    while (*u_end++) ;
+    return (size_t)(u_end - u - 1);
+}
+#else
+#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
+#endif
+#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
+#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
+#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
+#else
+#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
+#endif
+#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys;
+    PyObject* default_encoding = NULL;
+    PyObject* ascii_chars_u = NULL;
+    PyObject* ascii_chars_b = NULL;
+    const char* default_encoding_c;
+    sys = PyImport_ImportModule("sys");
+    if (!sys) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    Py_DECREF(sys);
+    if (!default_encoding) goto bad;
+    default_encoding_c = PyBytes_AsString(default_encoding);
+    if (!default_encoding_c) goto bad;
+    if (strcmp(default_encoding_c, "ascii") == 0) {
+        __Pyx_sys_getdefaultencoding_not_ascii = 0;
+    } else {
+        char ascii_chars[128];
+        int c;
+        for (c = 0; c < 128; c++) {
+            ascii_chars[c] = c;
+        }
+        __Pyx_sys_getdefaultencoding_not_ascii = 1;
+        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+        if (!ascii_chars_u) goto bad;
+        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+            PyErr_Format(
+                PyExc_ValueError,
+                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+                default_encoding_c);
+            goto bad;
+        }
+        Py_DECREF(ascii_chars_u);
+        Py_DECREF(ascii_chars_b);
+    }
+    Py_DECREF(default_encoding);
+    return 0;
+bad:
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+    PyObject* sys;
+    PyObject* default_encoding = NULL;
+    char* default_encoding_c;
+    sys = PyImport_ImportModule("sys");
+    if (!sys) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    Py_DECREF(sys);
+    if (!default_encoding) goto bad;
+    default_encoding_c = PyBytes_AsString(default_encoding);
+    if (!default_encoding_c) goto bad;
+    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
+    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+    Py_DECREF(default_encoding);
+    return 0;
+bad:
+    Py_XDECREF(default_encoding);
+    return -1;
+}
+#endif
+#endif
+
+
+/* Test for GCC > 2.95 */
+#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
+  #define likely(x)   __builtin_expect(!!(x), 1)
+  #define unlikely(x) __builtin_expect(!!(x), 0)
+#else /* !__GNUC__ or GCC < 2.95 */
+  #define likely(x)   (x)
+  #define unlikely(x) (x)
+#endif /* __GNUC__ */
+
+static PyObject *__pyx_m;
+static PyObject *__pyx_d;
+static PyObject *__pyx_b;
+static PyObject *__pyx_empty_tuple;
+static PyObject *__pyx_empty_bytes;
+static int __pyx_lineno;
+static int __pyx_clineno = 0;
+static const char * __pyx_cfilenm= __FILE__;
+static const char *__pyx_filename;
+
+
+static const char *__pyx_f[] = {
+  "netcdftime/_datetime.pyx",
+};
+
+/*--- Type declarations ---*/
+struct __pyx_obj_10netcdftime_9_datetime_datetime;
+
+/* "netcdftime/_datetime.pyx":9
+ * 
+ * 
+ * cdef class datetime(object):             # <<<<<<<<<<<<<<
+ * 
+ *     """
+ */
+struct __pyx_obj_10netcdftime_9_datetime_datetime {
+  PyObject_HEAD
+  int year;
+  int month;
+  int day;
+  int hour;
+  int minute;
+  int dayofwk;
+  int dayofyr;
+  int second;
+};
+
+#ifndef CYTHON_REFNANNY
+  #define CYTHON_REFNANNY 0
+#endif
+#if CYTHON_REFNANNY
+  typedef struct {
+    void (*INCREF)(void*, PyObject*, int);
+    void (*DECREF)(void*, PyObject*, int);
+    void (*GOTREF)(void*, PyObject*, int);
+    void (*GIVEREF)(void*, PyObject*, int);
+    void* (*SetupContext)(const char*, int, const char*);
+    void (*FinishContext)(void**);
+  } __Pyx_RefNannyAPIStruct;
+  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
+  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
+#ifdef WITH_THREAD
+  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+          if (acquire_gil) { \
+              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
+              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+              PyGILState_Release(__pyx_gilstate_save); \
+          } else { \
+              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+          }
+#else
+  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+#endif
+  #define __Pyx_RefNannyFinishContext() \
+          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
+  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
+  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
+  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
+#else
+  #define __Pyx_RefNannyDeclarations
+  #define __Pyx_RefNannySetupContext(name, acquire_gil)
+  #define __Pyx_RefNannyFinishContext()
+  #define __Pyx_INCREF(r) Py_INCREF(r)
+  #define __Pyx_DECREF(r) Py_DECREF(r)
+  #define __Pyx_GOTREF(r)
+  #define __Pyx_GIVEREF(r)
+  #define __Pyx_XINCREF(r) Py_XINCREF(r)
+  #define __Pyx_XDECREF(r) Py_XDECREF(r)
+  #define __Pyx_XGOTREF(r)
+  #define __Pyx_XGIVEREF(r)
+#endif
+#define __Pyx_XDECREF_SET(r, v) do {                            \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_XDECREF(tmp);                              \
+    } while (0)
+#define __Pyx_DECREF_SET(r, v) do {                             \
+        PyObject *tmp = (PyObject *) r;                         \
+        r = v; __Pyx_DECREF(tmp);                               \
+    } while (0)
+#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
+#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_getattro))
+        return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_getattr))
+        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+    return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+static PyObject *__Pyx_GetBuiltinName(PyObject *name);
+
+static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
+    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
+
+static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
+
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
+    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
+    const char* function_name);
+
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
+#endif
+
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
+#else
+#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
+#endif
+
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb);
+static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);
+
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+    PyListObject* L = (PyListObject*) list;
+    Py_ssize_t len = Py_SIZE(list);
+    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
+        Py_INCREF(x);
+        PyList_SET_ITEM(list, len, x);
+        Py_SIZE(list) = len+1;
+        return 0;
+    }
+    return PyList_Append(list, x);
+}
+#else
+#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
+#endif
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb);
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb);
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
+
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
+        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
+        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
+        int has_cstart, int has_cstop, int wraparound);
+
+static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
+    int result = PySequence_Contains(seq, item);
+    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
+
+typedef struct {
+    int code_line;
+    PyCodeObject* code_object;
+} __Pyx_CodeObjectCacheEntry;
+struct __Pyx_CodeObjectCache {
+    int count;
+    int max_count;
+    __Pyx_CodeObjectCacheEntry* entries;
+};
+static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
+static PyCodeObject *__pyx_find_code_object(int code_line);
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
+
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+                               int py_line, const char *filename);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
+
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+
+static int __Pyx_check_binary_version(void);
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
+
+
+/* Module declarations from 'cpython.ref' */
+
+/* Module declarations from 'libc.string' */
+
+/* Module declarations from 'libc.stdio' */
+
+/* Module declarations from 'cpython.object' */
+
+/* Module declarations from 'netcdftime._datetime' */
+static PyTypeObject *__pyx_ptype_10netcdftime_9_datetime_datetime = 0;
+#define __Pyx_MODULE_NAME "netcdftime._datetime"
+int __pyx_module_is_main_netcdftime___datetime = 0;
+
+/* Implementation of 'netcdftime._datetime' */
+static PyObject *__pyx_builtin_ValueError;
+static PyObject *__pyx_builtin_NotImplemented;
+static PyObject *__pyx_builtin_TypeError;
+static int __pyx_pf_10netcdftime_9_datetime_8datetime___init__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self, PyObject *__pyx_v_year, PyObject *__pyx_v_month, PyObject *__pyx_v_day, PyObject *__pyx_v_hour, PyObject *__pyx_v_minute, PyObject *__pyx_v_second, PyObject *__pyx_v_dayofwk, PyObject *__pyx_v_dayofyr); /* proto */
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_6format___get__(CYTHON_UNUSED struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_2strftime(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self, PyObject *__pyx_v_format); /* proto */
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_4timetuple(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_6_to_real_datetime(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_8__repr__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
+static Py_hash_t __pyx_pf_10netcdftime_9_datetime_8datetime_10__hash__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_12__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_4year___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_5month___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_3day___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_4hour___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_6minute___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_7dayofwk___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_7dayofyr___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_6second___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_9_datetime__findall(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_text, PyObject *__pyx_v_substr); /* proto */
+static PyObject *__pyx_pf_10netcdftime_9_datetime_2_strftime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt, PyObject *__pyx_v_fmt); /* proto */
+static PyObject *__pyx_tp_new_10netcdftime_9_datetime_datetime(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static char __pyx_k_i[] = "i";
+static char __pyx_k_j[] = "j";
+static char __pyx_k_s[] = "((^|[^%])(%%)*%s)";
+static char __pyx_k_4d[] = "%4d";
+static char __pyx_k_dt[] = "dt";
+static char __pyx_k_re[] = "re";
+static char __pyx_k_s1[] = "s1";
+static char __pyx_k_s2[] = "s2";
+static char __pyx_k_day[] = "day";
+static char __pyx_k_fmt[] = "fmt";
+static char __pyx_k_off[] = "off";
+static char __pyx_k_s_2[] = "s";
+static char __pyx_k_find[] = "find";
+static char __pyx_k_hour[] = "hour";
+static char __pyx_k_main[] = "__main__";
+static char __pyx_k_site[] = "site";
+static char __pyx_k_test[] = "__test__";
+static char __pyx_k_text[] = "text";
+static char __pyx_k_time[] = "time";
+static char __pyx_k_year[] = "year";
+static char __pyx_k_delta[] = "delta";
+static char __pyx_k_month[] = "month";
+static char __pyx_k_sites[] = "sites";
+static char __pyx_k_syear[] = "syear";
+static char __pyx_k_format[] = "format";
+static char __pyx_k_import[] = "__import__";
+static char __pyx_k_minute[] = "minute";
+static char __pyx_k_search[] = "search";
+static char __pyx_k_second[] = "second";
+static char __pyx_k_sites1[] = "sites1";
+static char __pyx_k_sites2[] = "sites2";
+static char __pyx_k_substr[] = "substr";
+static char __pyx_k_compile[] = "compile";
+static char __pyx_k_dayofwk[] = "dayofwk";
+static char __pyx_k_dayofyr[] = "dayofyr";
+static char __pyx_k_findall[] = "_findall";
+static char __pyx_k_datetime[] = "datetime";
+static char __pyx_k_operator[] = "operator";
+static char __pyx_k_strftime[] = "_strftime";
+static char __pyx_k_TypeError[] = "TypeError";
+static char __pyx_k_illegal_s[] = "_illegal_s";
+static char __pyx_k_timetuple[] = "timetuple";
+static char __pyx_k_ValueError[] = "ValueError";
+static char __pyx_k_strftime_2[] = "strftime";
+static char __pyx_k_Y_m_d_H_M_S[] = "%Y-%m-%d %H:%M:%S";
+static char __pyx_k_real_datetime[] = "real_datetime";
+static char __pyx_k_NotImplemented[] = "NotImplemented";
+static char __pyx_k_to_real_datetime[] = "_to_real_datetime";
+static char __pyx_k_netcdftime__datetime[] = "netcdftime._datetime";
+static char __pyx_k_Users_shoyer_dev_netcdf4_python[] = "/Users/shoyer/dev/netcdf4-python/netcdftime/_datetime.pyx";
+static char __pyx_k_This_strftime_implementation_doe[] = "This strftime implementation does not handle %s";
+static PyObject *__pyx_kp_s_4d;
+static PyObject *__pyx_n_s_NotImplemented;
+static PyObject *__pyx_kp_s_This_strftime_implementation_doe;
+static PyObject *__pyx_n_s_TypeError;
+static PyObject *__pyx_kp_s_Users_shoyer_dev_netcdf4_python;
+static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_kp_s_Y_m_d_H_M_S;
+static PyObject *__pyx_n_s_compile;
+static PyObject *__pyx_n_s_datetime;
+static PyObject *__pyx_n_s_day;
+static PyObject *__pyx_n_s_dayofwk;
+static PyObject *__pyx_n_s_dayofyr;
+static PyObject *__pyx_n_s_delta;
+static PyObject *__pyx_n_s_dt;
+static PyObject *__pyx_n_s_find;
+static PyObject *__pyx_n_s_findall;
+static PyObject *__pyx_n_s_fmt;
+static PyObject *__pyx_n_s_format;
+static PyObject *__pyx_n_s_hour;
+static PyObject *__pyx_n_s_i;
+static PyObject *__pyx_n_s_illegal_s;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_n_s_j;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_n_s_minute;
+static PyObject *__pyx_n_s_month;
+static PyObject *__pyx_n_s_netcdftime__datetime;
+static PyObject *__pyx_n_s_off;
+static PyObject *__pyx_n_s_operator;
+static PyObject *__pyx_n_s_re;
+static PyObject *__pyx_n_s_real_datetime;
+static PyObject *__pyx_kp_s_s;
+static PyObject *__pyx_n_s_s1;
+static PyObject *__pyx_n_s_s2;
+static PyObject *__pyx_n_s_s_2;
+static PyObject *__pyx_n_s_search;
+static PyObject *__pyx_n_s_second;
+static PyObject *__pyx_n_s_site;
+static PyObject *__pyx_n_s_sites;
+static PyObject *__pyx_n_s_sites1;
+static PyObject *__pyx_n_s_sites2;
+static PyObject *__pyx_n_s_strftime;
+static PyObject *__pyx_n_s_strftime_2;
+static PyObject *__pyx_n_s_substr;
+static PyObject *__pyx_n_s_syear;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_n_s_text;
+static PyObject *__pyx_n_s_time;
+static PyObject *__pyx_n_s_timetuple;
+static PyObject *__pyx_n_s_to_real_datetime;
+static PyObject *__pyx_n_s_year;
+static PyObject *__pyx_int_0;
+static PyObject *__pyx_int_1;
+static PyObject *__pyx_int_4;
+static PyObject *__pyx_int_6;
+static PyObject *__pyx_int_28;
+static PyObject *__pyx_int_100;
+static PyObject *__pyx_int_400;
+static PyObject *__pyx_int_2000;
+static PyObject *__pyx_int_neg_1;
+static PyObject *__pyx_tuple_;
+static PyObject *__pyx_slice__4;
+static PyObject *__pyx_slice__5;
+static PyObject *__pyx_tuple__2;
+static PyObject *__pyx_tuple__3;
+static PyObject *__pyx_tuple__6;
+static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__9;
+static PyObject *__pyx_codeobj__8;
+static PyObject *__pyx_codeobj__10;
+
+/* "netcdftime/_datetime.pyx":26
+ *     cdef readonly int year, month, day, hour, minute, dayofwk, dayofyr, second
+ * 
+ *     def __init__(self, year, month, day, hour=0, minute=0, second=0,             # <<<<<<<<<<<<<<
+ *                  dayofwk=-1, dayofyr=1):
+ *         """dayofyr set to 1 by default - otherwise time.strftime will complain"""
+ */
+
+/* Python wrapper */
+static int __pyx_pw_10netcdftime_9_datetime_8datetime_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_10netcdftime_9_datetime_8datetime___init__[] = "dayofyr set to 1 by default - otherwise time.strftime will complain";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_10netcdftime_9_datetime_8datetime___init__;
+#endif
+static int __pyx_pw_10netcdftime_9_datetime_8datetime_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_year = 0;
+  PyObject *__pyx_v_month = 0;
+  PyObject *__pyx_v_day = 0;
+  PyObject *__pyx_v_hour = 0;
+  PyObject *__pyx_v_minute = 0;
+  PyObject *__pyx_v_second = 0;
+  PyObject *__pyx_v_dayofwk = 0;
+  PyObject *__pyx_v_dayofyr = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_year,&__pyx_n_s_month,&__pyx_n_s_day,&__pyx_n_s_hour,&__pyx_n_s_minute,&__pyx_n_s_second,&__pyx_n_s_dayofwk,&__pyx_n_s_dayofyr,0};
+    PyObject* values[8] = {0,0,0,0,0,0,0,0};
+    values[3] = ((PyObject *)__pyx_int_0);
+    values[4] = ((PyObject *)__pyx_int_0);
+    values[5] = ((PyObject *)__pyx_int_0);
+    values[6] = ((PyObject *)__pyx_int_neg_1);
+    values[7] = ((PyObject *)__pyx_int_1);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_year)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_month)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 8, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  2:
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_day)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 8, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+        case  3:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hour);
+          if (value) { values[3] = value; kw_args--; }
+        }
+        case  4:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minute);
+          if (value) { values[4] = value; kw_args--; }
+        }
+        case  5:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_second);
+          if (value) { values[5] = value; kw_args--; }
+        }
+        case  6:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dayofwk);
+          if (value) { values[6] = value; kw_args--; }
+        }
+        case  7:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dayofyr);
+          if (value) { values[7] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_year = values[0];
+    __pyx_v_month = values[1];
+    __pyx_v_day = values[2];
+    __pyx_v_hour = values[3];
+    __pyx_v_minute = values[4];
+    __pyx_v_second = values[5];
+    __pyx_v_dayofwk = values[6];
+    __pyx_v_dayofyr = values[7];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netcdftime._datetime.datetime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime___init__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self), __pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_dayofwk, __pyx_v_dayofyr);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_10netcdftime_9_datetime_8datetime___init__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self, PyObject *__pyx_v_year, PyObject *__pyx_v_month, PyObject *__pyx_v_day, PyObject *__pyx_v_hour, PyObject *__pyx_v_minute, PyObject *__pyx_v_second, PyObject *__pyx_v_dayofwk, PyObject *__pyx_v_dayofyr) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__init__", 0);
+
+  /* "netcdftime/_datetime.pyx":30
+ *         """dayofyr set to 1 by default - otherwise time.strftime will complain"""
+ * 
+ *         self.year = year             # <<<<<<<<<<<<<<
+ *         self.month = month
+ *         self.day = day
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_year); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->year = __pyx_t_1;
+
+  /* "netcdftime/_datetime.pyx":31
+ * 
+ *         self.year = year
+ *         self.month = month             # <<<<<<<<<<<<<<
+ *         self.day = day
+ *         self.hour = hour
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_month); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->month = __pyx_t_1;
+
+  /* "netcdftime/_datetime.pyx":32
+ *         self.year = year
+ *         self.month = month
+ *         self.day = day             # <<<<<<<<<<<<<<
+ *         self.hour = hour
+ *         self.minute = minute
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_day); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->day = __pyx_t_1;
+
+  /* "netcdftime/_datetime.pyx":33
+ *         self.month = month
+ *         self.day = day
+ *         self.hour = hour             # <<<<<<<<<<<<<<
+ *         self.minute = minute
+ *         self.dayofwk = dayofwk
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_hour); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->hour = __pyx_t_1;
+
+  /* "netcdftime/_datetime.pyx":34
+ *         self.day = day
+ *         self.hour = hour
+ *         self.minute = minute             # <<<<<<<<<<<<<<
+ *         self.dayofwk = dayofwk
+ *         self.dayofyr = dayofyr
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_minute); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->minute = __pyx_t_1;
+
+  /* "netcdftime/_datetime.pyx":35
+ *         self.hour = hour
+ *         self.minute = minute
+ *         self.dayofwk = dayofwk             # <<<<<<<<<<<<<<
+ *         self.dayofyr = dayofyr
+ *         self.second = second
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_dayofwk); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->dayofwk = __pyx_t_1;
+
+  /* "netcdftime/_datetime.pyx":36
+ *         self.minute = minute
+ *         self.dayofwk = dayofwk
+ *         self.dayofyr = dayofyr             # <<<<<<<<<<<<<<
+ *         self.second = second
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_dayofyr); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->dayofyr = __pyx_t_1;
+
+  /* "netcdftime/_datetime.pyx":37
+ *         self.dayofwk = dayofwk
+ *         self.dayofyr = dayofyr
+ *         self.second = second             # <<<<<<<<<<<<<<
+ * 
+ *     property format:
+ */
+  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_second); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->second = __pyx_t_1;
+
+  /* "netcdftime/_datetime.pyx":26
+ *     cdef readonly int year, month, day, hour, minute, dayofwk, dayofyr, second
+ * 
+ *     def __init__(self, year, month, day, hour=0, minute=0, second=0,             # <<<<<<<<<<<<<<
+ *                  dayofwk=-1, dayofyr=1):
+ *         """dayofyr set to 1 by default - otherwise time.strftime will complain"""
+ */
+
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netcdftime._datetime.datetime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netcdftime/_datetime.pyx":40
+ * 
+ *     property format:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return '%Y-%m-%d %H:%M:%S'
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_6format_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_6format_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_6format___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_6format___get__(CYTHON_UNUSED struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+
+  /* "netcdftime/_datetime.pyx":41
+ *     property format:
+ *         def __get__(self):
+ *             return '%Y-%m-%d %H:%M:%S'             # <<<<<<<<<<<<<<
+ * 
+ *     def strftime(self, format=None):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_kp_s_Y_m_d_H_M_S);
+  __pyx_r = __pyx_kp_s_Y_m_d_H_M_S;
+  goto __pyx_L0;
+
+  /* "netcdftime/_datetime.pyx":40
+ * 
+ *     property format:
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return '%Y-%m-%d %H:%M:%S'
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netcdftime/_datetime.pyx":43
+ *             return '%Y-%m-%d %H:%M:%S'
+ * 
+ *     def strftime(self, format=None):             # <<<<<<<<<<<<<<
+ *         if format is None:
+ *             format = self.format
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_3strftime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_3strftime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_format = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("strftime (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_format,0};
+    PyObject* values[1] = {0};
+    values[0] = ((PyObject *)Py_None);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format);
+          if (value) { values[0] = value; kw_args--; }
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "strftime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_format = values[0];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("strftime", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netcdftime._datetime.datetime.strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_2strftime(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self), __pyx_v_format);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_2strftime(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self, PyObject *__pyx_v_format) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  Py_ssize_t __pyx_t_6;
+  PyObject *__pyx_t_7 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("strftime", 0);
+  __Pyx_INCREF(__pyx_v_format);
+
+  /* "netcdftime/_datetime.pyx":44
+ * 
+ *     def strftime(self, format=None):
+ *         if format is None:             # <<<<<<<<<<<<<<
+ *             format = self.format
+ *         return _strftime(self, format)
+ */
+  __pyx_t_1 = (__pyx_v_format == Py_None);
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "netcdftime/_datetime.pyx":45
+ *     def strftime(self, format=None):
+ *         if format is None:
+ *             format = self.format             # <<<<<<<<<<<<<<
+ *         return _strftime(self, format)
+ * 
+ */
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
+    __pyx_t_3 = 0;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netcdftime/_datetime.pyx":46
+ *         if format is None:
+ *             format = self.format
+ *         return _strftime(self, format)             # <<<<<<<<<<<<<<
+ * 
+ *     def timetuple(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_strftime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = NULL;
+  __pyx_t_6 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+    if (likely(__pyx_t_5)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_5);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_4, function);
+      __pyx_t_6 = 1;
+    }
+  }
+  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (__pyx_t_5) {
+    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
+  }
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_self));
+  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+  __Pyx_INCREF(__pyx_v_format);
+  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_format);
+  __Pyx_GIVEREF(__pyx_v_format);
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_r = __pyx_t_3;
+  __pyx_t_3 = 0;
+  goto __pyx_L0;
+
+  /* "netcdftime/_datetime.pyx":43
+ *             return '%Y-%m-%d %H:%M:%S'
+ * 
+ *     def strftime(self, format=None):             # <<<<<<<<<<<<<<
+ *         if format is None:
+ *             format = self.format
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_AddTraceback("netcdftime._datetime.datetime.strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_format);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netcdftime/_datetime.pyx":48
+ *         return _strftime(self, format)
+ * 
+ *     def timetuple(self):             # <<<<<<<<<<<<<<
+ *         return (self.year, self.month, self.day, self.hour,
+ *                 self.minute, self.second, self.dayofwk, self.dayofyr, -1)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_5timetuple(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_5timetuple(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("timetuple (wrapper)", 0);
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_4timetuple(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_4timetuple(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("timetuple", 0);
+
+  /* "netcdftime/_datetime.pyx":49
+ * 
+ *     def timetuple(self):
+ *         return (self.year, self.month, self.day, self.hour,             # <<<<<<<<<<<<<<
+ *                 self.minute, self.second, self.dayofwk, self.dayofyr, -1)
+ * 
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->day); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->hour); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+
+  /* "netcdftime/_datetime.pyx":50
+ *     def timetuple(self):
+ *         return (self.year, self.month, self.day, self.hour,
+ *                 self.minute, self.second, self.dayofwk, self.dayofyr, -1)             # <<<<<<<<<<<<<<
+ * 
+ *     def _to_real_datetime(self):
+ */
+  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->minute); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->second); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->dayofwk); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_self->dayofyr); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+
+  /* "netcdftime/_datetime.pyx":49
+ * 
+ *     def timetuple(self):
+ *         return (self.year, self.month, self.day, self.hour,             # <<<<<<<<<<<<<<
+ *                 self.minute, self.second, self.dayofwk, self.dayofyr, -1)
+ * 
+ */
+  __pyx_t_9 = PyTuple_New(9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
+  __Pyx_GIVEREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_7);
+  __Pyx_GIVEREF(__pyx_t_7);
+  PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_t_8);
+  __Pyx_GIVEREF(__pyx_t_8);
+  __Pyx_INCREF(__pyx_int_neg_1);
+  PyTuple_SET_ITEM(__pyx_t_9, 8, __pyx_int_neg_1);
+  __Pyx_GIVEREF(__pyx_int_neg_1);
+  __pyx_t_1 = 0;
+  __pyx_t_2 = 0;
+  __pyx_t_3 = 0;
+  __pyx_t_4 = 0;
+  __pyx_t_5 = 0;
+  __pyx_t_6 = 0;
+  __pyx_t_7 = 0;
+  __pyx_t_8 = 0;
+  __pyx_r = __pyx_t_9;
+  __pyx_t_9 = 0;
+  goto __pyx_L0;
+
+  /* "netcdftime/_datetime.pyx":48
+ *         return _strftime(self, format)
+ * 
+ *     def timetuple(self):             # <<<<<<<<<<<<<<
+ *         return (self.year, self.month, self.day, self.hour,
+ *                 self.minute, self.second, self.dayofwk, self.dayofyr, -1)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_AddTraceback("netcdftime._datetime.datetime.timetuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netcdftime/_datetime.pyx":52
+ *                 self.minute, self.second, self.dayofwk, self.dayofyr, -1)
+ * 
+ *     def _to_real_datetime(self):             # <<<<<<<<<<<<<<
+ *         return real_datetime(self.year, self.month, self.day,
+ *                              self.hour, self.minute, self.second)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_7_to_real_datetime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_7_to_real_datetime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_to_real_datetime (wrapper)", 0);
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_6_to_real_datetime(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_6_to_real_datetime(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  PyObject *__pyx_t_7 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  Py_ssize_t __pyx_t_10;
+  PyObject *__pyx_t_11 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_to_real_datetime", 0);
+
+  /* "netcdftime/_datetime.pyx":53
+ * 
+ *     def _to_real_datetime(self):
+ *         return real_datetime(self.year, self.month, self.day,             # <<<<<<<<<<<<<<
+ *                              self.hour, self.minute, self.second)
+ * 
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_real_datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->year); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->day); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+
+  /* "netcdftime/_datetime.pyx":54
+ *     def _to_real_datetime(self):
+ *         return real_datetime(self.year, self.month, self.day,
+ *                              self.hour, self.minute, self.second)             # <<<<<<<<<<<<<<
+ * 
+ *     def __repr__(self):
+ */
+  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->hour); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->minute); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_self->second); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __pyx_t_9 = NULL;
+  __pyx_t_10 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_9)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_9);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+      __pyx_t_10 = 1;
+    }
+  }
+  __pyx_t_11 = PyTuple_New(6+__pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_11);
+  if (__pyx_t_9) {
+    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = NULL;
+  }
+  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_t_5);
+  __Pyx_GIVEREF(__pyx_t_5);
+  PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_10, __pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_11, 4+__pyx_t_10, __pyx_t_7);
+  __Pyx_GIVEREF(__pyx_t_7);
+  PyTuple_SET_ITEM(__pyx_t_11, 5+__pyx_t_10, __pyx_t_8);
+  __Pyx_GIVEREF(__pyx_t_8);
+  __pyx_t_3 = 0;
+  __pyx_t_4 = 0;
+  __pyx_t_5 = 0;
+  __pyx_t_6 = 0;
+  __pyx_t_7 = 0;
+  __pyx_t_8 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "netcdftime/_datetime.pyx":52
+ *                 self.minute, self.second, self.dayofwk, self.dayofyr, -1)
+ * 
+ *     def _to_real_datetime(self):             # <<<<<<<<<<<<<<
+ *         return real_datetime(self.year, self.month, self.day,
+ *                              self.hour, self.minute, self.second)
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_AddTraceback("netcdftime._datetime.datetime._to_real_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netcdftime/_datetime.pyx":56
+ *                              self.hour, self.minute, self.second)
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         return self.strftime(self.format)
+ * 
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_9__repr__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_9__repr__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_8__repr__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_8__repr__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__repr__", 0);
+
+  /* "netcdftime/_datetime.pyx":57
+ * 
+ *     def __repr__(self):
+ *         return self.strftime(self.format)             # <<<<<<<<<<<<<<
+ * 
+ *     def __hash__(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strftime_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_4)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (!__pyx_t_4) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_GOTREF(__pyx_t_1);
+  } else {
+    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+    PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
+    __Pyx_GIVEREF(__pyx_t_3);
+    __pyx_t_3 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* "netcdftime/_datetime.pyx":56
+ *                              self.hour, self.minute, self.second)
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         return self.strftime(self.format)
+ * 
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("netcdftime._datetime.datetime.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netcdftime/_datetime.pyx":59
+ *         return self.strftime(self.format)
+ * 
+ *     def __hash__(self):             # <<<<<<<<<<<<<<
+ *         try:
+ *             d = self._to_real_datetime()
+ */
+
+/* Python wrapper */
+static Py_hash_t __pyx_pw_10netcdftime_9_datetime_8datetime_11__hash__(PyObject *__pyx_v_self); /*proto*/
+static Py_hash_t __pyx_pw_10netcdftime_9_datetime_8datetime_11__hash__(PyObject *__pyx_v_self) {
+  Py_hash_t __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_10__hash__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static Py_hash_t __pyx_pf_10netcdftime_9_datetime_8datetime_10__hash__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
+  PyObject *__pyx_v_d = NULL;
+  Py_hash_t __pyx_r;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_t_7;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  Py_hash_t __pyx_t_11;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__hash__", 0);
+
+  /* "netcdftime/_datetime.pyx":60
+ * 
+ *     def __hash__(self):
+ *         try:             # <<<<<<<<<<<<<<
+ *             d = self._to_real_datetime()
+ *         except ValueError:
+ */
+  {
+    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+    __Pyx_XGOTREF(__pyx_t_1);
+    __Pyx_XGOTREF(__pyx_t_2);
+    __Pyx_XGOTREF(__pyx_t_3);
+    /*try:*/ {
+
+      /* "netcdftime/_datetime.pyx":61
+ *     def __hash__(self):
+ *         try:
+ *             d = self._to_real_datetime()             # <<<<<<<<<<<<<<
+ *         except ValueError:
+ *             return hash(self.timetuple())
+ */
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_real_datetime); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_6 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+        if (likely(__pyx_t_6)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+          __Pyx_INCREF(__pyx_t_6);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_5, function);
+        }
+      }
+      if (__pyx_t_6) {
+        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      } else {
+        __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_v_d = __pyx_t_4;
+      __pyx_t_4 = 0;
+    }
+    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+    goto __pyx_L10_try_end;
+    __pyx_L3_error:;
+    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+    /* "netcdftime/_datetime.pyx":62
+ *         try:
+ *             d = self._to_real_datetime()
+ *         except ValueError:             # <<<<<<<<<<<<<<
+ *             return hash(self.timetuple())
+ *         return hash(d)
+ */
+    __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
+    if (__pyx_t_7) {
+      __Pyx_AddTraceback("netcdftime._datetime.datetime.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_GOTREF(__pyx_t_5);
+      __Pyx_GOTREF(__pyx_t_6);
+
+      /* "netcdftime/_datetime.pyx":63
+ *             d = self._to_real_datetime()
+ *         except ValueError:
+ *             return hash(self.timetuple())             # <<<<<<<<<<<<<<
+ *         return hash(d)
+ * 
+ */
+      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_timetuple); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      __Pyx_GOTREF(__pyx_t_9);
+      __pyx_t_10 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
+        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
+        if (likely(__pyx_t_10)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+          __Pyx_INCREF(__pyx_t_10);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_9, function);
+        }
+      }
+      if (__pyx_t_10) {
+        __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      } else {
+        __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      }
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      __pyx_t_11 = PyObject_Hash(__pyx_t_8); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __pyx_r = __pyx_t_11;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      goto __pyx_L6_except_return;
+    }
+    goto __pyx_L5_except_error;
+    __pyx_L5_except_error:;
+    __Pyx_XGIVEREF(__pyx_t_1);
+    __Pyx_XGIVEREF(__pyx_t_2);
+    __Pyx_XGIVEREF(__pyx_t_3);
+    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+    goto __pyx_L1_error;
+    __pyx_L6_except_return:;
+    __Pyx_XGIVEREF(__pyx_t_1);
+    __Pyx_XGIVEREF(__pyx_t_2);
+    __Pyx_XGIVEREF(__pyx_t_3);
+    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+    goto __pyx_L0;
+    __pyx_L10_try_end:;
+  }
+
+  /* "netcdftime/_datetime.pyx":64
+ *         except ValueError:
+ *             return hash(self.timetuple())
+ *         return hash(d)             # <<<<<<<<<<<<<<
+ * 
+ *     def __richcmp__(self, other, int op):
+ */
+  __pyx_t_11 = PyObject_Hash(__pyx_v_d); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_t_11;
+  goto __pyx_L0;
+
+  /* "netcdftime/_datetime.pyx":59
+ *         return self.strftime(self.format)
+ * 
+ *     def __hash__(self):             # <<<<<<<<<<<<<<
+ *         try:
+ *             d = self._to_real_datetime()
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netcdftime._datetime.datetime.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_d);
+  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netcdftime/_datetime.pyx":66
+ *         return hash(d)
+ * 
+ *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
+ *         if hasattr(other, 'strftime'):
+ *             self_str = self.strftime('%Y-%m-%d %H:%M:%S')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_13__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_13__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_12__richcmp__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_12__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
+  PyObject *__pyx_v_self_str = NULL;
+  PyObject *__pyx_v_other_str = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  int __pyx_t_1;
+  int __pyx_t_2;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__richcmp__", 0);
+
+  /* "netcdftime/_datetime.pyx":67
+ * 
+ *     def __richcmp__(self, other, int op):
+ *         if hasattr(other, 'strftime'):             # <<<<<<<<<<<<<<
+ *             self_str = self.strftime('%Y-%m-%d %H:%M:%S')
+ *             other_str = other.strftime('%Y-%m-%d %H:%M:%S')
+ */
+  __pyx_t_1 = PyObject_HasAttr(__pyx_v_other, __pyx_n_s_strftime_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "netcdftime/_datetime.pyx":68
+ *     def __richcmp__(self, other, int op):
+ *         if hasattr(other, 'strftime'):
+ *             self_str = self.strftime('%Y-%m-%d %H:%M:%S')             # <<<<<<<<<<<<<<
+ *             other_str = other.strftime('%Y-%m-%d %H:%M:%S')
+ *             return PyObject_RichCompare(self_str, other_str, op)
+ */
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strftime_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_v_self_str = __pyx_t_4;
+    __pyx_t_4 = 0;
+
+    /* "netcdftime/_datetime.pyx":69
+ *         if hasattr(other, 'strftime'):
+ *             self_str = self.strftime('%Y-%m-%d %H:%M:%S')
+ *             other_str = other.strftime('%Y-%m-%d %H:%M:%S')             # <<<<<<<<<<<<<<
+ *             return PyObject_RichCompare(self_str, other_str, op)
+ *         return NotImplemented
+ */
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_strftime_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_v_other_str = __pyx_t_3;
+    __pyx_t_3 = 0;
+
+    /* "netcdftime/_datetime.pyx":70
+ *             self_str = self.strftime('%Y-%m-%d %H:%M:%S')
+ *             other_str = other.strftime('%Y-%m-%d %H:%M:%S')
+ *             return PyObject_RichCompare(self_str, other_str, op)             # <<<<<<<<<<<<<<
+ *         return NotImplemented
+ * 
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = PyObject_RichCompare(__pyx_v_self_str, __pyx_v_other_str, __pyx_v_op); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_r = __pyx_t_3;
+    __pyx_t_3 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "netcdftime/_datetime.pyx":71
+ *             other_str = other.strftime('%Y-%m-%d %H:%M:%S')
+ *             return PyObject_RichCompare(self_str, other_str, op)
+ *         return NotImplemented             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_builtin_NotImplemented);
+  __pyx_r = __pyx_builtin_NotImplemented;
+  goto __pyx_L0;
+
+  /* "netcdftime/_datetime.pyx":66
+ *         return hash(d)
+ * 
+ *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
+ *         if hasattr(other, 'strftime'):
+ *             self_str = self.strftime('%Y-%m-%d %H:%M:%S')
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netcdftime._datetime.datetime.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_self_str);
+  __Pyx_XDECREF(__pyx_v_other_str);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netcdftime/_datetime.pyx":24
+ * and format.
+ *     """
+ *     cdef readonly int year, month, day, hour, minute, dayofwk, dayofyr, second             # <<<<<<<<<<<<<<
+ * 
+ *     def __init__(self, year, month, day, hour=0, minute=0, second=0,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_4year_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_4year_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_4year___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_4year___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netcdftime._datetime.datetime.year.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_5month_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_5month_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_5month___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_5month___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netcdftime._datetime.datetime.month.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_3day_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_3day_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_3day___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_3day___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netcdftime._datetime.datetime.day.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_4hour_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_4hour_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_4hour___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_4hour___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netcdftime._datetime.datetime.hour.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_6minute_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_6minute_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_6minute___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_6minute___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->minute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netcdftime._datetime.datetime.minute.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_7dayofwk_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_7dayofwk_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_7dayofwk___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_7dayofwk___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dayofwk); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netcdftime._datetime.datetime.dayofwk.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_7dayofyr_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_7dayofyr_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_7dayofyr___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_7dayofyr___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dayofyr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netcdftime._datetime.datetime.dayofyr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_6second_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_6second_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_6second___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_6second___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->second); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netcdftime._datetime.datetime.second.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netcdftime/_datetime.pyx":77
+ * 
+ * 
+ * def _findall(text, substr):             # <<<<<<<<<<<<<<
+ *     # Also finds overlaps
+ *     sites = []
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_9_datetime_1_findall(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_10netcdftime_9_datetime_1_findall = {"_findall", (PyCFunction)__pyx_pw_10netcdftime_9_datetime_1_findall, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_10netcdftime_9_datetime_1_findall(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_text = 0;
+  PyObject *__pyx_v_substr = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_findall (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_text,&__pyx_n_s_substr,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_text)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_substr)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("_findall", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_findall") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_text = values[0];
+    __pyx_v_substr = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("_findall", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netcdftime._datetime._findall", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime__findall(__pyx_self, __pyx_v_text, __pyx_v_substr);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_9_datetime__findall(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_text, PyObject *__pyx_v_substr) {
+  PyObject *__pyx_v_sites = NULL;
+  PyObject *__pyx_v_i = NULL;
+  PyObject *__pyx_v_j = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  Py_ssize_t __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
+  int __pyx_t_6;
+  int __pyx_t_7;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_findall", 0);
+
+  /* "netcdftime/_datetime.pyx":79
+ * def _findall(text, substr):
+ *     # Also finds overlaps
+ *     sites = []             # <<<<<<<<<<<<<<
+ *     i = 0
+ *     while 1:
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_sites = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "netcdftime/_datetime.pyx":80
+ *     # Also finds overlaps
+ *     sites = []
+ *     i = 0             # <<<<<<<<<<<<<<
+ *     while 1:
+ *         j = text.find(substr, i)
+ */
+  __Pyx_INCREF(__pyx_int_0);
+  __pyx_v_i = __pyx_int_0;
+
+  /* "netcdftime/_datetime.pyx":81
+ *     sites = []
+ *     i = 0
+ *     while 1:             # <<<<<<<<<<<<<<
+ *         j = text.find(substr, i)
+ *         if j == -1:
+ */
+  while (1) {
+
+    /* "netcdftime/_datetime.pyx":82
+ *     i = 0
+ *     while 1:
+ *         j = text.find(substr, i)             # <<<<<<<<<<<<<<
+ *         if j == -1:
+ *             break
+ */
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_text, __pyx_n_s_find); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = NULL;
+    __pyx_t_4 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+      if (likely(__pyx_t_3)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+        __Pyx_INCREF(__pyx_t_3);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_2, function);
+        __pyx_t_4 = 1;
+      }
+    }
+    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    if (__pyx_t_3) {
+      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_substr);
+    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_substr);
+    __Pyx_GIVEREF(__pyx_v_substr);
+    __Pyx_INCREF(__pyx_v_i);
+    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_i);
+    __Pyx_GIVEREF(__pyx_v_i);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netcdftime/_datetime.pyx":83
+ *     while 1:
+ *         j = text.find(substr, i)
+ *         if j == -1:             # <<<<<<<<<<<<<<
+ *             break
+ *         sites.append(j)
+ */
+    __pyx_t_1 = PyObject_RichCompare(__pyx_v_j, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_6) {
+
+      /* "netcdftime/_datetime.pyx":84
+ *         j = text.find(substr, i)
+ *         if j == -1:
+ *             break             # <<<<<<<<<<<<<<
+ *         sites.append(j)
+ *         i = j + 1
+ */
+      goto __pyx_L4_break;
+    }
+
+    /* "netcdftime/_datetime.pyx":85
+ *         if j == -1:
+ *             break
+ *         sites.append(j)             # <<<<<<<<<<<<<<
+ *         i = j + 1
+ *     return sites
+ */
+    __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_sites, __pyx_v_j); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "netcdftime/_datetime.pyx":86
+ *             break
+ *         sites.append(j)
+ *         i = j + 1             # <<<<<<<<<<<<<<
+ *     return sites
+ * 
+ */
+    __pyx_t_1 = PyNumber_Add(__pyx_v_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_1);
+    __pyx_t_1 = 0;
+  }
+  __pyx_L4_break:;
+
+  /* "netcdftime/_datetime.pyx":87
+ *         sites.append(j)
+ *         i = j + 1
+ *     return sites             # <<<<<<<<<<<<<<
+ * 
+ * # Every 28 years the calendar repeats, except through century leap
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_sites);
+  __pyx_r = __pyx_v_sites;
+  goto __pyx_L0;
+
+  /* "netcdftime/_datetime.pyx":77
+ * 
+ * 
+ * def _findall(text, substr):             # <<<<<<<<<<<<<<
+ *     # Also finds overlaps
+ *     sites = []
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("netcdftime._datetime._findall", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_sites);
+  __Pyx_XDECREF(__pyx_v_i);
+  __Pyx_XDECREF(__pyx_v_j);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netcdftime/_datetime.pyx":94
+ * 
+ * 
+ * def _strftime(dt, fmt):             # <<<<<<<<<<<<<<
+ *     if _illegal_s.search(fmt):
+ *         raise TypeError("This strftime implementation does not handle %s")
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_9_datetime_3_strftime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_10netcdftime_9_datetime_3_strftime = {"_strftime", (PyCFunction)__pyx_pw_10netcdftime_9_datetime_3_strftime, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_10netcdftime_9_datetime_3_strftime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_dt = 0;
+  PyObject *__pyx_v_fmt = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_strftime (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dt,&__pyx_n_s_fmt,0};
+    PyObject* values[2] = {0,0};
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dt)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt)) != 0)) kw_args--;
+        else {
+          __Pyx_RaiseArgtupleInvalid("_strftime", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
+      }
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_strftime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
+    } else {
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+    }
+    __pyx_v_dt = values[0];
+    __pyx_v_fmt = values[1];
+  }
+  goto __pyx_L4_argument_unpacking_done;
+  __pyx_L5_argtuple_error:;
+  __Pyx_RaiseArgtupleInvalid("_strftime", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netcdftime._datetime._strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_10netcdftime_9_datetime_2_strftime(__pyx_self, __pyx_v_dt, __pyx_v_fmt);
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_9_datetime_2_strftime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt, PyObject *__pyx_v_fmt) {
+  PyObject *__pyx_v_year = NULL;
+  PyObject *__pyx_v_delta = NULL;
+  PyObject *__pyx_v_off = NULL;
+  PyObject *__pyx_v_timetuple = NULL;
+  PyObject *__pyx_v_s1 = NULL;
+  PyObject *__pyx_v_sites1 = NULL;
+  PyObject *__pyx_v_s2 = NULL;
+  PyObject *__pyx_v_sites2 = NULL;
+  PyObject *__pyx_v_sites = NULL;
+  PyObject *__pyx_v_site = NULL;
+  PyObject *__pyx_v_s = NULL;
+  PyObject *__pyx_v_syear = NULL;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_5;
+  PyObject *__pyx_t_6 = NULL;
+  Py_ssize_t __pyx_t_7;
+  PyObject *(*__pyx_t_8)(PyObject *);
+  int __pyx_t_9;
+  int __pyx_t_10;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_strftime", 0);
+
+  /* "netcdftime/_datetime.pyx":95
+ * 
+ * def _strftime(dt, fmt):
+ *     if _illegal_s.search(fmt):             # <<<<<<<<<<<<<<
+ *         raise TypeError("This strftime implementation does not handle %s")
+ *     # don't use strftime method at all.
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_illegal_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_search); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_2)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+    }
+  }
+  if (!__pyx_t_2) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_fmt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+  } else {
+    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+    __Pyx_INCREF(__pyx_v_fmt);
+    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_fmt);
+    __Pyx_GIVEREF(__pyx_v_fmt);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_5) {
+
+    /* "netcdftime/_datetime.pyx":96
+ * def _strftime(dt, fmt):
+ *     if _illegal_s.search(fmt):
+ *         raise TypeError("This strftime implementation does not handle %s")             # <<<<<<<<<<<<<<
+ *     # don't use strftime method at all.
+ *     # if dt.year > 1900:
+ */
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netcdftime/_datetime.pyx":101
+ *     #    return dt.strftime(fmt)
+ * 
+ *     year = dt.year             # <<<<<<<<<<<<<<
+ *     # For every non-leap year century, advance by
+ *     # 6 years to get into the 28-year repeat cycle
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_year = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netcdftime/_datetime.pyx":104
+ *     # For every non-leap year century, advance by
+ *     # 6 years to get into the 28-year repeat cycle
+ *     delta = 2000 - year             # <<<<<<<<<<<<<<
+ *     off = 6 * (delta // 100 + delta // 400)
+ *     year = year + off
+ */
+  __pyx_t_1 = PyNumber_Subtract(__pyx_int_2000, __pyx_v_year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_delta = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netcdftime/_datetime.pyx":105
+ *     # 6 years to get into the 28-year repeat cycle
+ *     delta = 2000 - year
+ *     off = 6 * (delta // 100 + delta // 400)             # <<<<<<<<<<<<<<
+ *     year = year + off
+ * 
+ */
+  __pyx_t_1 = PyNumber_FloorDivide(__pyx_v_delta, __pyx_int_100); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PyNumber_FloorDivide(__pyx_v_delta, __pyx_int_400); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = PyNumber_Multiply(__pyx_int_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_v_off = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "netcdftime/_datetime.pyx":106
+ *     delta = 2000 - year
+ *     off = 6 * (delta // 100 + delta // 400)
+ *     year = year + off             # <<<<<<<<<<<<<<
+ * 
+ *     # Move to around the year 2000
+ */
+  __pyx_t_3 = PyNumber_Add(__pyx_v_year, __pyx_v_off); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF_SET(__pyx_v_year, __pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "netcdftime/_datetime.pyx":109
+ * 
+ *     # Move to around the year 2000
+ *     year = year + ((2000 - year) // 28) * 28             # <<<<<<<<<<<<<<
+ *     timetuple = dt.timetuple()
+ *     s1 = time.strftime(fmt, (year,) + timetuple[1:])
+ */
+  __pyx_t_3 = PyNumber_Subtract(__pyx_int_2000, __pyx_v_year); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = PyNumber_FloorDivide(__pyx_t_3, __pyx_int_28); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_int_28); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_4 = PyNumber_Add(__pyx_v_year, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF_SET(__pyx_v_year, __pyx_t_4);
+  __pyx_t_4 = 0;
+
+  /* "netcdftime/_datetime.pyx":110
+ *     # Move to around the year 2000
+ *     year = year + ((2000 - year) // 28) * 28
+ *     timetuple = dt.timetuple()             # <<<<<<<<<<<<<<
+ *     s1 = time.strftime(fmt, (year,) + timetuple[1:])
+ *     sites1 = _findall(s1, str(year))
+ */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_timetuple); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_1 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+    if (likely(__pyx_t_1)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_1);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_3, function);
+    }
+  }
+  if (__pyx_t_1) {
+    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  } else {
+    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_v_timetuple = __pyx_t_4;
+  __pyx_t_4 = 0;
+
+  /* "netcdftime/_datetime.pyx":111
+ *     year = year + ((2000 - year) // 28) * 28
+ *     timetuple = dt.timetuple()
+ *     s1 = time.strftime(fmt, (year,) + timetuple[1:])             # <<<<<<<<<<<<<<
+ *     sites1 = _findall(s1, str(year))
+ * 
+ */
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strftime_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_INCREF(__pyx_v_year);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_year);
+  __Pyx_GIVEREF(__pyx_v_year);
+  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_timetuple, 1, 0, NULL, NULL, &__pyx_slice__4, 1, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = NULL;
+  __pyx_t_7 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_2)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+      __pyx_t_7 = 1;
+    }
+  }
+  __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  if (__pyx_t_2) {
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+  }
+  __Pyx_INCREF(__pyx_v_fmt);
+  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, __pyx_v_fmt);
+  __Pyx_GIVEREF(__pyx_v_fmt);
+  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  __pyx_t_6 = 0;
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_s1 = __pyx_t_4;
+  __pyx_t_4 = 0;
+
+  /* "netcdftime/_datetime.pyx":112
+ *     timetuple = dt.timetuple()
+ *     s1 = time.strftime(fmt, (year,) + timetuple[1:])
+ *     sites1 = _findall(s1, str(year))             # <<<<<<<<<<<<<<
+ * 
+ *     s2 = time.strftime(fmt, (year + 28,) + timetuple[1:])
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_findall); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_INCREF(__pyx_v_year);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_year);
+  __Pyx_GIVEREF(__pyx_v_year);
+  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = NULL;
+  __pyx_t_7 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+      __pyx_t_7 = 1;
+    }
+  }
+  __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (__pyx_t_3) {
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+  }
+  __Pyx_INCREF(__pyx_v_s1);
+  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_v_s1);
+  __Pyx_GIVEREF(__pyx_v_s1);
+  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  __pyx_t_6 = 0;
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_sites1 = __pyx_t_4;
+  __pyx_t_4 = 0;
+
+  /* "netcdftime/_datetime.pyx":114
+ *     sites1 = _findall(s1, str(year))
+ * 
+ *     s2 = time.strftime(fmt, (year + 28,) + timetuple[1:])             # <<<<<<<<<<<<<<
+ *     sites2 = _findall(s2, str(year + 28))
+ * 
+ */
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strftime_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = PyNumber_Add(__pyx_v_year, __pyx_int_28); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_timetuple, 1, 0, NULL, NULL, &__pyx_slice__5, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = PyNumber_Add(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = NULL;
+  __pyx_t_7 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_1)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_1);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+      __pyx_t_7 = 1;
+    }
+  }
+  __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if (__pyx_t_1) {
+    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+  }
+  __Pyx_INCREF(__pyx_v_fmt);
+  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_fmt);
+  __Pyx_GIVEREF(__pyx_v_fmt);
+  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_3);
+  __Pyx_GIVEREF(__pyx_t_3);
+  __pyx_t_3 = 0;
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_s2 = __pyx_t_4;
+  __pyx_t_4 = 0;
+
+  /* "netcdftime/_datetime.pyx":115
+ * 
+ *     s2 = time.strftime(fmt, (year + 28,) + timetuple[1:])
+ *     sites2 = _findall(s2, str(year + 28))             # <<<<<<<<<<<<<<
+ * 
+ *     sites = []
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_findall); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_6 = PyNumber_Add(__pyx_v_year, __pyx_int_28); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  __pyx_t_6 = 0;
+  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_3 = NULL;
+  __pyx_t_7 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_3)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+      __pyx_t_7 = 1;
+    }
+  }
+  __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (__pyx_t_3) {
+    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+  }
+  __Pyx_INCREF(__pyx_v_s2);
+  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_v_s2);
+  __Pyx_GIVEREF(__pyx_v_s2);
+  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_t_6);
+  __Pyx_GIVEREF(__pyx_t_6);
+  __pyx_t_6 = 0;
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_sites2 = __pyx_t_4;
+  __pyx_t_4 = 0;
+
+  /* "netcdftime/_datetime.pyx":117
+ *     sites2 = _findall(s2, str(year + 28))
+ * 
+ *     sites = []             # <<<<<<<<<<<<<<
+ *     for site in sites1:
+ *         if site in sites2:
+ */
+  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_v_sites = ((PyObject*)__pyx_t_4);
+  __pyx_t_4 = 0;
+
+  /* "netcdftime/_datetime.pyx":118
+ * 
+ *     sites = []
+ *     for site in sites1:             # <<<<<<<<<<<<<<
+ *         if site in sites2:
+ *             sites.append(site)
+ */
+  if (likely(PyList_CheckExact(__pyx_v_sites1)) || PyTuple_CheckExact(__pyx_v_sites1)) {
+    __pyx_t_4 = __pyx_v_sites1; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0;
+    __pyx_t_8 = NULL;
+  } else {
+    __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_sites1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  for (;;) {
+    if (likely(!__pyx_t_8)) {
+      if (likely(PyList_CheckExact(__pyx_t_4))) {
+        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_2 = __pyx_t_8(__pyx_t_4);
+      if (unlikely(!__pyx_t_2)) {
+        PyObject* exc_type = PyErr_Occurred();
+        if (exc_type) {
+          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_2);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_site, __pyx_t_2);
+    __pyx_t_2 = 0;
+
+    /* "netcdftime/_datetime.pyx":119
+ *     sites = []
+ *     for site in sites1:
+ *         if site in sites2:             # <<<<<<<<<<<<<<
+ *             sites.append(site)
+ * 
+ */
+    __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_site, __pyx_v_sites2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = (__pyx_t_5 != 0);
+    if (__pyx_t_9) {
+
+      /* "netcdftime/_datetime.pyx":120
+ *     for site in sites1:
+ *         if site in sites2:
+ *             sites.append(site)             # <<<<<<<<<<<<<<
+ * 
+ *     s = s1
+ */
+      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_sites, __pyx_v_site); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+
+    /* "netcdftime/_datetime.pyx":118
+ * 
+ *     sites = []
+ *     for site in sites1:             # <<<<<<<<<<<<<<
+ *         if site in sites2:
+ *             sites.append(site)
+ */
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "netcdftime/_datetime.pyx":122
+ *             sites.append(site)
+ * 
+ *     s = s1             # <<<<<<<<<<<<<<
+ *     syear = "%4d" % (dt.year,)
+ *     for site in sites:
+ */
+  __Pyx_INCREF(__pyx_v_s1);
+  __pyx_v_s = __pyx_v_s1;
+
+  /* "netcdftime/_datetime.pyx":123
+ * 
+ *     s = s1
+ *     syear = "%4d" % (dt.year,)             # <<<<<<<<<<<<<<
+ *     for site in sites:
+ *         s = s[:site] + syear + s[site + 4:]
+ */
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  __pyx_t_4 = 0;
+  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_4d, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_syear = ((PyObject*)__pyx_t_4);
+  __pyx_t_4 = 0;
+
+  /* "netcdftime/_datetime.pyx":124
+ *     s = s1
+ *     syear = "%4d" % (dt.year,)
+ *     for site in sites:             # <<<<<<<<<<<<<<
+ *         s = s[:site] + syear + s[site + 4:]
+ *     return s
+ */
+  __pyx_t_4 = __pyx_v_sites; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0;
+  for (;;) {
+    if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break;
+    #if CYTHON_COMPILING_IN_CPYTHON
+    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    #else
+    __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    #endif
+    __Pyx_XDECREF_SET(__pyx_v_site, __pyx_t_2);
+    __pyx_t_2 = 0;
+
+    /* "netcdftime/_datetime.pyx":125
+ *     syear = "%4d" % (dt.year,)
+ *     for site in sites:
+ *         s = s[:site] + syear + s[site + 4:]             # <<<<<<<<<<<<<<
+ *     return s
+ */
+    __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_s, 0, 0, NULL, &__pyx_v_site, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_v_syear); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyNumber_Add(__pyx_v_site, __pyx_int_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_s, 0, 0, &__pyx_t_2, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_2);
+    __pyx_t_2 = 0;
+
+    /* "netcdftime/_datetime.pyx":124
+ *     s = s1
+ *     syear = "%4d" % (dt.year,)
+ *     for site in sites:             # <<<<<<<<<<<<<<
+ *         s = s[:site] + syear + s[site + 4:]
+ *     return s
+ */
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "netcdftime/_datetime.pyx":126
+ *     for site in sites:
+ *         s = s[:site] + syear + s[site + 4:]
+ *     return s             # <<<<<<<<<<<<<<
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_s);
+  __pyx_r = __pyx_v_s;
+  goto __pyx_L0;
+
+  /* "netcdftime/_datetime.pyx":94
+ * 
+ * 
+ * def _strftime(dt, fmt):             # <<<<<<<<<<<<<<
+ *     if _illegal_s.search(fmt):
+ *         raise TypeError("This strftime implementation does not handle %s")
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netcdftime._datetime._strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_year);
+  __Pyx_XDECREF(__pyx_v_delta);
+  __Pyx_XDECREF(__pyx_v_off);
+  __Pyx_XDECREF(__pyx_v_timetuple);
+  __Pyx_XDECREF(__pyx_v_s1);
+  __Pyx_XDECREF(__pyx_v_sites1);
+  __Pyx_XDECREF(__pyx_v_s2);
+  __Pyx_XDECREF(__pyx_v_sites2);
+  __Pyx_XDECREF(__pyx_v_sites);
+  __Pyx_XDECREF(__pyx_v_site);
+  __Pyx_XDECREF(__pyx_v_s);
+  __Pyx_XDECREF(__pyx_v_syear);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_tp_new_10netcdftime_9_datetime_datetime(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  PyObject *o;
+  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+    o = (*t->tp_alloc)(t, 0);
+  } else {
+    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+  }
+  if (unlikely(!o)) return 0;
+  return o;
+}
+
+static void __pyx_tp_dealloc_10netcdftime_9_datetime_datetime(PyObject *o) {
+  #if PY_VERSION_HEX >= 0x030400a1
+  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+    if (PyObject_CallFinalizerFromDealloc(o)) return;
+  }
+  #endif
+  (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_format(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_10netcdftime_9_datetime_8datetime_6format_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_year(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_10netcdftime_9_datetime_8datetime_4year_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_month(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_10netcdftime_9_datetime_8datetime_5month_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_day(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_10netcdftime_9_datetime_8datetime_3day_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_hour(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_10netcdftime_9_datetime_8datetime_4hour_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_minute(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_10netcdftime_9_datetime_8datetime_6minute_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_dayofwk(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_10netcdftime_9_datetime_8datetime_7dayofwk_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_dayofyr(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_10netcdftime_9_datetime_8datetime_7dayofyr_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_second(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_10netcdftime_9_datetime_8datetime_6second_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_10netcdftime_9_datetime_datetime[] = {
+  {"strftime", (PyCFunction)__pyx_pw_10netcdftime_9_datetime_8datetime_3strftime, METH_VARARGS|METH_KEYWORDS, 0},
+  {"timetuple", (PyCFunction)__pyx_pw_10netcdftime_9_datetime_8datetime_5timetuple, METH_NOARGS, 0},
+  {"_to_real_datetime", (PyCFunction)__pyx_pw_10netcdftime_9_datetime_8datetime_7_to_real_datetime, METH_NOARGS, 0},
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_10netcdftime_9_datetime_datetime[] = {
+  {(char *)"format", __pyx_getprop_10netcdftime_9_datetime_8datetime_format, 0, 0, 0},
+  {(char *)"year", __pyx_getprop_10netcdftime_9_datetime_8datetime_year, 0, 0, 0},
+  {(char *)"month", __pyx_getprop_10netcdftime_9_datetime_8datetime_month, 0, 0, 0},
+  {(char *)"day", __pyx_getprop_10netcdftime_9_datetime_8datetime_day, 0, 0, 0},
+  {(char *)"hour", __pyx_getprop_10netcdftime_9_datetime_8datetime_hour, 0, 0, 0},
+  {(char *)"minute", __pyx_getprop_10netcdftime_9_datetime_8datetime_minute, 0, 0, 0},
+  {(char *)"dayofwk", __pyx_getprop_10netcdftime_9_datetime_8datetime_dayofwk, 0, 0, 0},
+  {(char *)"dayofyr", __pyx_getprop_10netcdftime_9_datetime_8datetime_dayofyr, 0, 0, 0},
+  {(char *)"second", __pyx_getprop_10netcdftime_9_datetime_8datetime_second, 0, 0, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_10netcdftime_9_datetime_datetime = {
+  PyVarObject_HEAD_INIT(0, 0)
+  "netcdftime._datetime.datetime", /*tp_name*/
+  sizeof(struct __pyx_obj_10netcdftime_9_datetime_datetime), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_10netcdftime_9_datetime_datetime, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  #if PY_MAJOR_VERSION < 3
+  0, /*tp_compare*/
+  #else
+  0, /*reserved*/
+  #endif
+  __pyx_pw_10netcdftime_9_datetime_8datetime_9__repr__, /*tp_repr*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
+  __pyx_pw_10netcdftime_9_datetime_8datetime_11__hash__, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+  "\nPhony datetime object which mimics the python datetime object,\nbut allows for dates that don't exist in the proleptic gregorian calendar.\nDoesn't do timedelta operations, doesn't overload + and -.\n\nHas strftime, timetuple and __repr__ methods.  The format\nof the string produced by __repr__ is controlled by self.format\n(default %Y-%m-%d %H:%M:%S). Does support comparisons with other\nphony datetime and with datetime.datetime objects.\n\nInstance variables are year,month,day,hou [...]
+  0, /*tp_traverse*/
+  0, /*tp_clear*/
+  __pyx_pw_10netcdftime_9_datetime_8datetime_13__richcmp__, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_10netcdftime_9_datetime_datetime, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_10netcdftime_9_datetime_datetime, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_pw_10netcdftime_9_datetime_8datetime_1__init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_10netcdftime_9_datetime_datetime, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+  0, /*tp_del*/
+  0, /*tp_version_tag*/
+  #if PY_VERSION_HEX >= 0x030400a1
+  0, /*tp_finalize*/
+  #endif
+};
+
+static PyMethodDef __pyx_methods[] = {
+  {0, 0, 0, 0}
+};
+
+#if PY_MAJOR_VERSION >= 3
+static struct PyModuleDef __pyx_moduledef = {
+  #if PY_VERSION_HEX < 0x03020000
+    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
+  #else
+    PyModuleDef_HEAD_INIT,
+  #endif
+    "_datetime",
+    0, /* m_doc */
+    -1, /* m_size */
+    __pyx_methods /* m_methods */,
+    NULL, /* m_reload */
+    NULL, /* m_traverse */
+    NULL, /* m_clear */
+    NULL /* m_free */
+};
+#endif
+
+static __Pyx_StringTabEntry __pyx_string_tab[] = {
+  {&__pyx_kp_s_4d, __pyx_k_4d, sizeof(__pyx_k_4d), 0, 0, 1, 0},
+  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
+  {&__pyx_kp_s_This_strftime_implementation_doe, __pyx_k_This_strftime_implementation_doe, sizeof(__pyx_k_This_strftime_implementation_doe), 0, 0, 1, 0},
+  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
+  {&__pyx_kp_s_Users_shoyer_dev_netcdf4_python, __pyx_k_Users_shoyer_dev_netcdf4_python, sizeof(__pyx_k_Users_shoyer_dev_netcdf4_python), 0, 0, 1, 0},
+  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
+  {&__pyx_kp_s_Y_m_d_H_M_S, __pyx_k_Y_m_d_H_M_S, sizeof(__pyx_k_Y_m_d_H_M_S), 0, 0, 1, 0},
+  {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1},
+  {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
+  {&__pyx_n_s_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 0, 1, 1},
+  {&__pyx_n_s_dayofwk, __pyx_k_dayofwk, sizeof(__pyx_k_dayofwk), 0, 0, 1, 1},
+  {&__pyx_n_s_dayofyr, __pyx_k_dayofyr, sizeof(__pyx_k_dayofyr), 0, 0, 1, 1},
+  {&__pyx_n_s_delta, __pyx_k_delta, sizeof(__pyx_k_delta), 0, 0, 1, 1},
+  {&__pyx_n_s_dt, __pyx_k_dt, sizeof(__pyx_k_dt), 0, 0, 1, 1},
+  {&__pyx_n_s_find, __pyx_k_find, sizeof(__pyx_k_find), 0, 0, 1, 1},
+  {&__pyx_n_s_findall, __pyx_k_findall, sizeof(__pyx_k_findall), 0, 0, 1, 1},
+  {&__pyx_n_s_fmt, __pyx_k_fmt, sizeof(__pyx_k_fmt), 0, 0, 1, 1},
+  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
+  {&__pyx_n_s_hour, __pyx_k_hour, sizeof(__pyx_k_hour), 0, 0, 1, 1},
+  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
+  {&__pyx_n_s_illegal_s, __pyx_k_illegal_s, sizeof(__pyx_k_illegal_s), 0, 0, 1, 1},
+  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+  {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
+  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+  {&__pyx_n_s_minute, __pyx_k_minute, sizeof(__pyx_k_minute), 0, 0, 1, 1},
+  {&__pyx_n_s_month, __pyx_k_month, sizeof(__pyx_k_month), 0, 0, 1, 1},
+  {&__pyx_n_s_netcdftime__datetime, __pyx_k_netcdftime__datetime, sizeof(__pyx_k_netcdftime__datetime), 0, 0, 1, 1},
+  {&__pyx_n_s_off, __pyx_k_off, sizeof(__pyx_k_off), 0, 0, 1, 1},
+  {&__pyx_n_s_operator, __pyx_k_operator, sizeof(__pyx_k_operator), 0, 0, 1, 1},
+  {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1},
+  {&__pyx_n_s_real_datetime, __pyx_k_real_datetime, sizeof(__pyx_k_real_datetime), 0, 0, 1, 1},
+  {&__pyx_kp_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 0},
+  {&__pyx_n_s_s1, __pyx_k_s1, sizeof(__pyx_k_s1), 0, 0, 1, 1},
+  {&__pyx_n_s_s2, __pyx_k_s2, sizeof(__pyx_k_s2), 0, 0, 1, 1},
+  {&__pyx_n_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 1},
+  {&__pyx_n_s_search, __pyx_k_search, sizeof(__pyx_k_search), 0, 0, 1, 1},
+  {&__pyx_n_s_second, __pyx_k_second, sizeof(__pyx_k_second), 0, 0, 1, 1},
+  {&__pyx_n_s_site, __pyx_k_site, sizeof(__pyx_k_site), 0, 0, 1, 1},
+  {&__pyx_n_s_sites, __pyx_k_sites, sizeof(__pyx_k_sites), 0, 0, 1, 1},
+  {&__pyx_n_s_sites1, __pyx_k_sites1, sizeof(__pyx_k_sites1), 0, 0, 1, 1},
+  {&__pyx_n_s_sites2, __pyx_k_sites2, sizeof(__pyx_k_sites2), 0, 0, 1, 1},
+  {&__pyx_n_s_strftime, __pyx_k_strftime, sizeof(__pyx_k_strftime), 0, 0, 1, 1},
+  {&__pyx_n_s_strftime_2, __pyx_k_strftime_2, sizeof(__pyx_k_strftime_2), 0, 0, 1, 1},
+  {&__pyx_n_s_substr, __pyx_k_substr, sizeof(__pyx_k_substr), 0, 0, 1, 1},
+  {&__pyx_n_s_syear, __pyx_k_syear, sizeof(__pyx_k_syear), 0, 0, 1, 1},
+  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+  {&__pyx_n_s_text, __pyx_k_text, sizeof(__pyx_k_text), 0, 0, 1, 1},
+  {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
+  {&__pyx_n_s_timetuple, __pyx_k_timetuple, sizeof(__pyx_k_timetuple), 0, 0, 1, 1},
+  {&__pyx_n_s_to_real_datetime, __pyx_k_to_real_datetime, sizeof(__pyx_k_to_real_datetime), 0, 0, 1, 1},
+  {&__pyx_n_s_year, __pyx_k_year, sizeof(__pyx_k_year), 0, 0, 1, 1},
+  {0, 0, 0, 0, 0, 0, 0}
+};
+static int __Pyx_InitCachedBuiltins(void) {
+  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  return 0;
+  __pyx_L1_error:;
+  return -1;
+}
+
+static int __Pyx_InitCachedConstants(void) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
+
+  /* "netcdftime/_datetime.pyx":68
+ *     def __richcmp__(self, other, int op):
+ *         if hasattr(other, 'strftime'):
+ *             self_str = self.strftime('%Y-%m-%d %H:%M:%S')             # <<<<<<<<<<<<<<
+ *             other_str = other.strftime('%Y-%m-%d %H:%M:%S')
+ *             return PyObject_RichCompare(self_str, other_str, op)
+ */
+  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_Y_m_d_H_M_S); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple_);
+  __Pyx_GIVEREF(__pyx_tuple_);
+
+  /* "netcdftime/_datetime.pyx":69
+ *         if hasattr(other, 'strftime'):
+ *             self_str = self.strftime('%Y-%m-%d %H:%M:%S')
+ *             other_str = other.strftime('%Y-%m-%d %H:%M:%S')             # <<<<<<<<<<<<<<
+ *             return PyObject_RichCompare(self_str, other_str, op)
+ *         return NotImplemented
+ */
+  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_Y_m_d_H_M_S); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__2);
+  __Pyx_GIVEREF(__pyx_tuple__2);
+
+  /* "netcdftime/_datetime.pyx":96
+ * def _strftime(dt, fmt):
+ *     if _illegal_s.search(fmt):
+ *         raise TypeError("This strftime implementation does not handle %s")             # <<<<<<<<<<<<<<
+ *     # don't use strftime method at all.
+ *     # if dt.year > 1900:
+ */
+  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_This_strftime_implementation_doe); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__3);
+  __Pyx_GIVEREF(__pyx_tuple__3);
+
+  /* "netcdftime/_datetime.pyx":111
+ *     year = year + ((2000 - year) // 28) * 28
+ *     timetuple = dt.timetuple()
+ *     s1 = time.strftime(fmt, (year,) + timetuple[1:])             # <<<<<<<<<<<<<<
+ *     sites1 = _findall(s1, str(year))
+ * 
+ */
+  __pyx_slice__4 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__4);
+  __Pyx_GIVEREF(__pyx_slice__4);
+
+  /* "netcdftime/_datetime.pyx":114
+ *     sites1 = _findall(s1, str(year))
+ * 
+ *     s2 = time.strftime(fmt, (year + 28,) + timetuple[1:])             # <<<<<<<<<<<<<<
+ *     sites2 = _findall(s2, str(year + 28))
+ * 
+ */
+  __pyx_slice__5 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__5);
+  __Pyx_GIVEREF(__pyx_slice__5);
+
+  /* "netcdftime/_datetime.pyx":74
+ * 
+ * 
+ * _illegal_s = re.compile(r"((^|[^%])(%%)*%s)")             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_s); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__6);
+  __Pyx_GIVEREF(__pyx_tuple__6);
+
+  /* "netcdftime/_datetime.pyx":77
+ * 
+ * 
+ * def _findall(text, substr):             # <<<<<<<<<<<<<<
+ *     # Also finds overlaps
+ *     sites = []
+ */
+  __pyx_tuple__7 = PyTuple_Pack(5, __pyx_n_s_text, __pyx_n_s_substr, __pyx_n_s_sites, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__7);
+  __Pyx_GIVEREF(__pyx_tuple__7);
+  __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_shoyer_dev_netcdf4_python, __pyx_n_s_findall, 77, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netcdftime/_datetime.pyx":94
+ * 
+ * 
+ * def _strftime(dt, fmt):             # <<<<<<<<<<<<<<
+ *     if _illegal_s.search(fmt):
+ *         raise TypeError("This strftime implementation does not handle %s")
+ */
+  __pyx_tuple__9 = PyTuple_Pack(14, __pyx_n_s_dt, __pyx_n_s_fmt, __pyx_n_s_year, __pyx_n_s_delta, __pyx_n_s_off, __pyx_n_s_timetuple, __pyx_n_s_s1, __pyx_n_s_sites1, __pyx_n_s_s2, __pyx_n_s_sites2, __pyx_n_s_sites, __pyx_n_s_site, __pyx_n_s_s_2, __pyx_n_s_syear); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__9);
+  __Pyx_GIVEREF(__pyx_tuple__9);
+  __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(2, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_shoyer_dev_netcdf4_python, __pyx_n_s_strftime, 94, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_RefNannyFinishContext();
+  return 0;
+  __pyx_L1_error:;
+  __Pyx_RefNannyFinishContext();
+  return -1;
+}
+
+static int __Pyx_InitGlobals(void) {
+  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_28 = PyInt_FromLong(28); if (unlikely(!__pyx_int_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_400 = PyInt_FromLong(400); if (unlikely(!__pyx_int_400)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_2000 = PyInt_FromLong(2000); if (unlikely(!__pyx_int_2000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  return 0;
+  __pyx_L1_error:;
+  return -1;
+}
+
+#if PY_MAJOR_VERSION < 3
+PyMODINIT_FUNC init_datetime(void); /*proto*/
+PyMODINIT_FUNC init_datetime(void)
+#else
+PyMODINIT_FUNC PyInit__datetime(void); /*proto*/
+PyMODINIT_FUNC PyInit__datetime(void)
+#endif
+{
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannyDeclarations
+  #if CYTHON_REFNANNY
+  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+  if (!__Pyx_RefNanny) {
+      PyErr_Clear();
+      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+      if (!__Pyx_RefNanny)
+          Py_FatalError("failed to import 'refnanny' module");
+  }
+  #endif
+  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__datetime(void)", 0);
+  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #ifdef __Pyx_CyFunction_USED
+  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  #ifdef __Pyx_FusedFunction_USED
+  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  #ifdef __Pyx_Generator_USED
+  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  /*--- Library function declarations ---*/
+  /*--- Threads initialization code ---*/
+  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
+  #ifdef WITH_THREAD /* Python build with threading support? */
+  PyEval_InitThreads();
+  #endif
+  #endif
+  /*--- Module creation code ---*/
+  #if PY_MAJOR_VERSION < 3
+  __pyx_m = Py_InitModule4("_datetime", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+  #else
+  __pyx_m = PyModule_Create(&__pyx_moduledef);
+  #endif
+  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  Py_INCREF(__pyx_d);
+  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if CYTHON_COMPILING_IN_PYPY
+  Py_INCREF(__pyx_b);
+  #endif
+  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  /*--- Initialize various global constants etc. ---*/
+  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
+  if (__pyx_module_is_main_netcdftime___datetime) {
+    if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  }
+  #if PY_MAJOR_VERSION >= 3
+  {
+    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!PyDict_GetItemString(modules, "netcdftime._datetime")) {
+      if (unlikely(PyDict_SetItemString(modules, "netcdftime._datetime", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
+  #endif
+  /*--- Builtin init code ---*/
+  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Constants init code ---*/
+  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*--- Global init code ---*/
+  /*--- Variable export code ---*/
+  /*--- Function export code ---*/
+  /*--- Type init code ---*/
+  if (PyType_Ready(&__pyx_type_10netcdftime_9_datetime_datetime) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_10netcdftime_9_datetime_datetime.tp_print = 0;
+  #if CYTHON_COMPILING_IN_CPYTHON
+  {
+    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_10netcdftime_9_datetime_datetime, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+      __pyx_wrapperbase_10netcdftime_9_datetime_8datetime___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+      __pyx_wrapperbase_10netcdftime_9_datetime_8datetime___init__.doc = __pyx_doc_10netcdftime_9_datetime_8datetime___init__;
+      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10netcdftime_9_datetime_8datetime___init__;
+    }
+  }
+  #endif
+  if (PyObject_SetAttrString(__pyx_m, "datetime", (PyObject *)&__pyx_type_10netcdftime_9_datetime_datetime) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_10netcdftime_9_datetime_datetime = &__pyx_type_10netcdftime_9_datetime_datetime;
+  /*--- Type import code ---*/
+  /*--- Variable import code ---*/
+  /*--- Function import code ---*/
+  /*--- Execution code ---*/
+
+  /* "netcdftime/_datetime.pyx":1
+ * from datetime import datetime as real_datetime             # <<<<<<<<<<<<<<
+ * import operator
+ * import re
+ */
+  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_n_s_datetime);
+  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_datetime);
+  __Pyx_GIVEREF(__pyx_n_s_datetime);
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_real_datetime, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netcdftime/_datetime.pyx":2
+ * from datetime import datetime as real_datetime
+ * import operator             # <<<<<<<<<<<<<<
+ * import re
+ * import time
+ */
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_operator, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_operator, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netcdftime/_datetime.pyx":3
+ * from datetime import datetime as real_datetime
+ * import operator
+ * import re             # <<<<<<<<<<<<<<
+ * import time
+ * 
+ */
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_re, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netcdftime/_datetime.pyx":4
+ * import operator
+ * import re
+ * import time             # <<<<<<<<<<<<<<
+ * 
+ * from cpython.object cimport PyObject_RichCompare
+ */
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_time, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netcdftime/_datetime.pyx":74
+ * 
+ * 
+ * _illegal_s = re.compile(r"((^|[^%])(%%)*%s)")             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_illegal_s, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netcdftime/_datetime.pyx":77
+ * 
+ * 
+ * def _findall(text, substr):             # <<<<<<<<<<<<<<
+ *     # Also finds overlaps
+ *     sites = []
+ */
+  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_10netcdftime_9_datetime_1_findall, NULL, __pyx_n_s_netcdftime__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_findall, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netcdftime/_datetime.pyx":94
+ * 
+ * 
+ * def _strftime(dt, fmt):             # <<<<<<<<<<<<<<
+ *     if _illegal_s.search(fmt):
+ *         raise TypeError("This strftime implementation does not handle %s")
+ */
+  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_10netcdftime_9_datetime_3_strftime, NULL, __pyx_n_s_netcdftime__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_strftime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netcdftime/_datetime.pyx":1
+ * from datetime import datetime as real_datetime             # <<<<<<<<<<<<<<
+ * import operator
+ * import re
+ */
+  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /*--- Wrapped vars code ---*/
+
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  if (__pyx_m) {
+    if (__pyx_d) {
+      __Pyx_AddTraceback("init netcdftime._datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
+    }
+    Py_DECREF(__pyx_m); __pyx_m = 0;
+  } else if (!PyErr_Occurred()) {
+    PyErr_SetString(PyExc_ImportError, "init netcdftime._datetime");
+  }
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  #if PY_MAJOR_VERSION < 3
+  return;
+  #else
+  return __pyx_m;
+  #endif
+}
+
+/* Runtime support code */
+#if CYTHON_REFNANNY
+static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
+    PyObject *m = NULL, *p = NULL;
+    void *r = NULL;
+    m = PyImport_ImportModule((char *)modname);
+    if (!m) goto end;
+    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
+    if (!p) goto end;
+    r = PyLong_AsVoidPtr(p);
+end:
+    Py_XDECREF(p);
+    Py_XDECREF(m);
+    return (__Pyx_RefNannyAPIStruct *)r;
+}
+#endif
+
+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+    if (unlikely(!result)) {
+        PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+            "name '%U' is not defined", name);
+#else
+            "name '%.200s' is not defined", PyString_AS_STRING(name));
+#endif
+    }
+    return result;
+}
+
+static void __Pyx_RaiseArgtupleInvalid(
+    const char* func_name,
+    int exact,
+    Py_ssize_t num_min,
+    Py_ssize_t num_max,
+    Py_ssize_t num_found)
+{
+    Py_ssize_t num_expected;
+    const char *more_or_less;
+    if (num_found < num_min) {
+        num_expected = num_min;
+        more_or_less = "at least";
+    } else {
+        num_expected = num_max;
+        more_or_less = "at most";
+    }
+    if (exact) {
+        more_or_less = "exactly";
+    }
+    PyErr_Format(PyExc_TypeError,
+                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+                 func_name, more_or_less, num_expected,
+                 (num_expected == 1) ? "" : "s", num_found);
+}
+
+static void __Pyx_RaiseDoubleKeywordsError(
+    const char* func_name,
+    PyObject* kw_name)
+{
+    PyErr_Format(PyExc_TypeError,
+        #if PY_MAJOR_VERSION >= 3
+        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
+        #else
+        "%s() got multiple values for keyword argument '%s'", func_name,
+        PyString_AsString(kw_name));
+        #endif
+}
+
+static int __Pyx_ParseOptionalKeywords(
+    PyObject *kwds,
+    PyObject **argnames[],
+    PyObject *kwds2,
+    PyObject *values[],
+    Py_ssize_t num_pos_args,
+    const char* function_name)
+{
+    PyObject *key = 0, *value = 0;
+    Py_ssize_t pos = 0;
+    PyObject*** name;
+    PyObject*** first_kw_arg = argnames + num_pos_args;
+    while (PyDict_Next(kwds, &pos, &key, &value)) {
+        name = first_kw_arg;
+        while (*name && (**name != key)) name++;
+        if (*name) {
+            values[name-argnames] = value;
+            continue;
+        }
+        name = first_kw_arg;
+        #if PY_MAJOR_VERSION < 3
+        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
+            while (*name) {
+                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
+                        && _PyString_Eq(**name, key)) {
+                    values[name-argnames] = value;
+                    break;
+                }
+                name++;
+            }
+            if (*name) continue;
+            else {
+                PyObject*** argname = argnames;
+                while (argname != first_kw_arg) {
+                    if ((**argname == key) || (
+                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
+                             && _PyString_Eq(**argname, key))) {
+                        goto arg_passed_twice;
+                    }
+                    argname++;
+                }
+            }
+        } else
+        #endif
+        if (likely(PyUnicode_Check(key))) {
+            while (*name) {
+                int cmp = (**name == key) ? 0 :
+                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
+                #endif
+                    PyUnicode_Compare(**name, key);
+                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+                if (cmp == 0) {
+                    values[name-argnames] = value;
+                    break;
+                }
+                name++;
+            }
+            if (*name) continue;
+            else {
+                PyObject*** argname = argnames;
+                while (argname != first_kw_arg) {
+                    int cmp = (**argname == key) ? 0 :
+                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
+                    #endif
+                        PyUnicode_Compare(**argname, key);
+                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+                    if (cmp == 0) goto arg_passed_twice;
+                    argname++;
+                }
+            }
+        } else
+            goto invalid_keyword_type;
+        if (kwds2) {
+            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
+        } else {
+            goto invalid_keyword;
+        }
+    }
+    return 0;
+arg_passed_twice:
+    __Pyx_RaiseDoubleKeywordsError(function_name, key);
+    goto bad;
+invalid_keyword_type:
+    PyErr_Format(PyExc_TypeError,
+        "%.200s() keywords must be strings", function_name);
+    goto bad;
+invalid_keyword:
+    PyErr_Format(PyExc_TypeError,
+    #if PY_MAJOR_VERSION < 3
+        "%.200s() got an unexpected keyword argument '%.200s'",
+        function_name, PyString_AsString(key));
+    #else
+        "%s() got an unexpected keyword argument '%U'",
+        function_name, key);
+    #endif
+bad:
+    return -1;
+}
+
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
+    PyObject *result;
+#if CYTHON_COMPILING_IN_CPYTHON
+    result = PyDict_GetItem(__pyx_d, name);
+    if (likely(result)) {
+        Py_INCREF(result);
+    } else {
+#else
+    result = PyObject_GetItem(__pyx_d, name);
+    if (!result) {
+        PyErr_Clear();
+#endif
+        result = __Pyx_GetBuiltinName(name);
+    }
+    return result;
+}
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+    PyObject *result;
+    ternaryfunc call = func->ob_type->tp_call;
+    if (unlikely(!call))
+        return PyObject_Call(func, arg, kw);
+    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+        return NULL;
+    result = (*call)(func, arg, kw);
+    Py_LeaveRecursiveCall();
+    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+        PyErr_SetString(
+            PyExc_SystemError,
+            "NULL result without error in PyObject_Call");
+    }
+    return result;
+}
+#endif
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
+    PyObject *self, *result;
+    PyCFunction cfunc;
+    cfunc = PyCFunction_GET_FUNCTION(func);
+    self = PyCFunction_GET_SELF(func);
+    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+        return NULL;
+    result = cfunc(self, arg);
+    Py_LeaveRecursiveCall();
+    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+        PyErr_SetString(
+            PyExc_SystemError,
+            "NULL result without error in PyObject_Call");
+    }
+    return result;
+}
+#endif
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+    PyObject *result;
+    PyObject *args = PyTuple_New(1);
+    if (unlikely(!args)) return NULL;
+    Py_INCREF(arg);
+    PyTuple_SET_ITEM(args, 0, arg);
+    result = __Pyx_PyObject_Call(func, args, NULL);
+    Py_DECREF(args);
+    return result;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+#ifdef __Pyx_CyFunction_USED
+    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
+#else
+    if (likely(PyCFunction_Check(func))) {
+#endif
+        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
+            return __Pyx_PyObject_CallMethO(func, arg);
+        }
+    }
+    return __Pyx__PyObject_CallOneArg(func, arg);
+}
+#else
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+    PyObject* args = PyTuple_Pack(1, arg);
+    return (likely(args)) ? __Pyx_PyObject_Call(func, args, NULL) : NULL;
+}
+#endif
+
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
+#ifdef __Pyx_CyFunction_USED
+    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
+#else
+    if (likely(PyCFunction_Check(func))) {
+#endif
+        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
+            return __Pyx_PyObject_CallMethO(func, NULL);
+        }
+    }
+    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
+}
+#endif
+
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    *type = tstate->exc_type;
+    *value = tstate->exc_value;
+    *tb = tstate->exc_traceback;
+    Py_XINCREF(*type);
+    Py_XINCREF(*value);
+    Py_XINCREF(*tb);
+#else
+    PyErr_GetExcInfo(type, value, tb);
+#endif
+}
+static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = type;
+    tstate->exc_value = value;
+    tstate->exc_traceback = tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_SetExcInfo(type, value, tb);
+#endif
+}
+
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
+    PyObject *local_type, *local_value, *local_tb;
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    local_type = tstate->curexc_type;
+    local_value = tstate->curexc_value;
+    local_tb = tstate->curexc_traceback;
+    tstate->curexc_type = 0;
+    tstate->curexc_value = 0;
+    tstate->curexc_traceback = 0;
+#else
+    PyErr_Fetch(&local_type, &local_value, &local_tb);
+#endif
+    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
+#if CYTHON_COMPILING_IN_CPYTHON
+    if (unlikely(tstate->curexc_type))
+#else
+    if (unlikely(PyErr_Occurred()))
+#endif
+        goto bad;
+    #if PY_MAJOR_VERSION >= 3
+    if (local_tb) {
+        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+            goto bad;
+    }
+    #endif
+    Py_XINCREF(local_tb);
+    Py_XINCREF(local_type);
+    Py_XINCREF(local_value);
+    *type = local_type;
+    *value = local_value;
+    *tb = local_tb;
+#if CYTHON_COMPILING_IN_CPYTHON
+    tmp_type = tstate->exc_type;
+    tmp_value = tstate->exc_value;
+    tmp_tb = tstate->exc_traceback;
+    tstate->exc_type = local_type;
+    tstate->exc_value = local_value;
+    tstate->exc_traceback = local_tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_SetExcInfo(local_type, local_value, local_tb);
+#endif
+    return 0;
+bad:
+    *type = 0;
+    *value = 0;
+    *tb = 0;
+    Py_XDECREF(local_type);
+    Py_XDECREF(local_value);
+    Py_XDECREF(local_tb);
+    return -1;
+}
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyObject *tmp_type, *tmp_value, *tmp_tb;
+    PyThreadState *tstate = PyThreadState_GET();
+    tmp_type = tstate->curexc_type;
+    tmp_value = tstate->curexc_value;
+    tmp_tb = tstate->curexc_traceback;
+    tstate->curexc_type = type;
+    tstate->curexc_value = value;
+    tstate->curexc_traceback = tb;
+    Py_XDECREF(tmp_type);
+    Py_XDECREF(tmp_value);
+    Py_XDECREF(tmp_tb);
+#else
+    PyErr_Restore(type, value, tb);
+#endif
+}
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyThreadState *tstate = PyThreadState_GET();
+    *type = tstate->curexc_type;
+    *value = tstate->curexc_value;
+    *tb = tstate->curexc_traceback;
+    tstate->curexc_type = 0;
+    tstate->curexc_value = 0;
+    tstate->curexc_traceback = 0;
+#else
+    PyErr_Fetch(type, value, tb);
+#endif
+}
+
+#if PY_MAJOR_VERSION < 3
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
+                        CYTHON_UNUSED PyObject *cause) {
+    Py_XINCREF(type);
+    if (!value || value == Py_None)
+        value = NULL;
+    else
+        Py_INCREF(value);
+    if (!tb || tb == Py_None)
+        tb = NULL;
+    else {
+        Py_INCREF(tb);
+        if (!PyTraceBack_Check(tb)) {
+            PyErr_SetString(PyExc_TypeError,
+                "raise: arg 3 must be a traceback or None");
+            goto raise_error;
+        }
+    }
+    if (PyType_Check(type)) {
+#if CYTHON_COMPILING_IN_PYPY
+        if (!value) {
+            Py_INCREF(Py_None);
+            value = Py_None;
+        }
+#endif
+        PyErr_NormalizeException(&type, &value, &tb);
+    } else {
+        if (value) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto raise_error;
+        }
+        value = type;
+        type = (PyObject*) Py_TYPE(type);
+        Py_INCREF(type);
+        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
+            PyErr_SetString(PyExc_TypeError,
+                "raise: exception class must be a subclass of BaseException");
+            goto raise_error;
+        }
+    }
+    __Pyx_ErrRestore(type, value, tb);
+    return;
+raise_error:
+    Py_XDECREF(value);
+    Py_XDECREF(type);
+    Py_XDECREF(tb);
+    return;
+}
+#else
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
+    PyObject* owned_instance = NULL;
+    if (tb == Py_None) {
+        tb = 0;
+    } else if (tb && !PyTraceBack_Check(tb)) {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: arg 3 must be a traceback or None");
+        goto bad;
+    }
+    if (value == Py_None)
+        value = 0;
+    if (PyExceptionInstance_Check(type)) {
+        if (value) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto bad;
+        }
+        value = type;
+        type = (PyObject*) Py_TYPE(value);
+    } else if (PyExceptionClass_Check(type)) {
+        PyObject *instance_class = NULL;
+        if (value && PyExceptionInstance_Check(value)) {
+            instance_class = (PyObject*) Py_TYPE(value);
+            if (instance_class != type) {
+                if (PyObject_IsSubclass(instance_class, type)) {
+                    type = instance_class;
+                } else {
+                    instance_class = NULL;
+                }
+            }
+        }
+        if (!instance_class) {
+            PyObject *args;
+            if (!value)
+                args = PyTuple_New(0);
+            else if (PyTuple_Check(value)) {
+                Py_INCREF(value);
+                args = value;
+            } else
+                args = PyTuple_Pack(1, value);
+            if (!args)
+                goto bad;
+            owned_instance = PyObject_Call(type, args, NULL);
+            Py_DECREF(args);
+            if (!owned_instance)
+                goto bad;
+            value = owned_instance;
+            if (!PyExceptionInstance_Check(value)) {
+                PyErr_Format(PyExc_TypeError,
+                             "calling %R should have returned an instance of "
+                             "BaseException, not %R",
+                             type, Py_TYPE(value));
+                goto bad;
+            }
+        }
+    } else {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: exception class must be a subclass of BaseException");
+        goto bad;
+    }
+#if PY_VERSION_HEX >= 0x03030000
+    if (cause) {
+#else
+    if (cause && cause != Py_None) {
+#endif
+        PyObject *fixed_cause;
+        if (cause == Py_None) {
+            fixed_cause = NULL;
+        } else if (PyExceptionClass_Check(cause)) {
+            fixed_cause = PyObject_CallObject(cause, NULL);
+            if (fixed_cause == NULL)
+                goto bad;
+        } else if (PyExceptionInstance_Check(cause)) {
+            fixed_cause = cause;
+            Py_INCREF(fixed_cause);
+        } else {
+            PyErr_SetString(PyExc_TypeError,
+                            "exception causes must derive from "
+                            "BaseException");
+            goto bad;
+        }
+        PyException_SetCause(value, fixed_cause);
+    }
+    PyErr_SetObject(type, value);
+    if (tb) {
+#if CYTHON_COMPILING_IN_PYPY
+        PyObject *tmp_type, *tmp_value, *tmp_tb;
+        PyErr_Fetch(tmp_type, tmp_value, tmp_tb);
+        Py_INCREF(tb);
+        PyErr_Restore(tmp_type, tmp_value, tb);
+        Py_XDECREF(tmp_tb);
+#else
+        PyThreadState *tstate = PyThreadState_GET();
+        PyObject* tmp_tb = tstate->curexc_traceback;
+        if (tb != tmp_tb) {
+            Py_INCREF(tb);
+            tstate->curexc_traceback = tb;
+            Py_XDECREF(tmp_tb);
+        }
+#endif
+    }
+bad:
+    Py_XDECREF(owned_instance);
+    return;
+}
+#endif
+
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
+        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
+        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
+        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
+#if CYTHON_COMPILING_IN_CPYTHON
+    PyMappingMethods* mp;
+#if PY_MAJOR_VERSION < 3
+    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
+    if (likely(ms && ms->sq_slice)) {
+        if (!has_cstart) {
+            if (_py_start && (*_py_start != Py_None)) {
+                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
+                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
+            } else
+                cstart = 0;
+        }
+        if (!has_cstop) {
+            if (_py_stop && (*_py_stop != Py_None)) {
+                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
+                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
+            } else
+                cstop = PY_SSIZE_T_MAX;
+        }
+        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
+            Py_ssize_t l = ms->sq_length(obj);
+            if (likely(l >= 0)) {
+                if (cstop < 0) {
+                    cstop += l;
+                    if (cstop < 0) cstop = 0;
+                }
+                if (cstart < 0) {
+                    cstart += l;
+                    if (cstart < 0) cstart = 0;
+                }
+            } else {
+                if (PyErr_ExceptionMatches(PyExc_OverflowError))
+                    PyErr_Clear();
+                else
+                    goto bad;
+            }
+        }
+        return ms->sq_slice(obj, cstart, cstop);
+    }
+#endif
+    mp = Py_TYPE(obj)->tp_as_mapping;
+    if (likely(mp && mp->mp_subscript))
+#endif
+    {
+        PyObject* result;
+        PyObject *py_slice, *py_start, *py_stop;
+        if (_py_slice) {
+            py_slice = *_py_slice;
+        } else {
+            PyObject* owned_start = NULL;
+            PyObject* owned_stop = NULL;
+            if (_py_start) {
+                py_start = *_py_start;
+            } else {
+                if (has_cstart) {
+                    owned_start = py_start = PyInt_FromSsize_t(cstart);
+                    if (unlikely(!py_start)) goto bad;
+                } else
+                    py_start = Py_None;
+            }
+            if (_py_stop) {
+                py_stop = *_py_stop;
+            } else {
+                if (has_cstop) {
+                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
+                    if (unlikely(!py_stop)) {
+                        Py_XDECREF(owned_start);
+                        goto bad;
+                    }
+                } else
+                    py_stop = Py_None;
+            }
+            py_slice = PySlice_New(py_start, py_stop, Py_None);
+            Py_XDECREF(owned_start);
+            Py_XDECREF(owned_stop);
+            if (unlikely(!py_slice)) goto bad;
+        }
+#if CYTHON_COMPILING_IN_CPYTHON
+        result = mp->mp_subscript(obj, py_slice);
+#else
+        result = PyObject_GetItem(obj, py_slice);
+#endif
+        if (!_py_slice) {
+            Py_DECREF(py_slice);
+        }
+        return result;
+    }
+    PyErr_Format(PyExc_TypeError,
+        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
+bad:
+    return NULL;
+}
+
+static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
+    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
+    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
+        PyErr_Format(PyExc_ImportError,
+        #if PY_MAJOR_VERSION < 3
+            "cannot import name %.230s", PyString_AS_STRING(name));
+        #else
+            "cannot import name %S", name);
+        #endif
+    }
+    return value;
+}
+
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
+    int start = 0, mid = 0, end = count - 1;
+    if (end >= 0 && code_line > entries[end].code_line) {
+        return count;
+    }
+    while (start < end) {
+        mid = (start + end) / 2;
+        if (code_line < entries[mid].code_line) {
+            end = mid;
+        } else if (code_line > entries[mid].code_line) {
+             start = mid + 1;
+        } else {
+            return mid;
+        }
+    }
+    if (code_line <= entries[mid].code_line) {
+        return mid;
+    } else {
+        return mid + 1;
+    }
+}
+static PyCodeObject *__pyx_find_code_object(int code_line) {
+    PyCodeObject* code_object;
+    int pos;
+    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
+        return NULL;
+    }
+    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
+        return NULL;
+    }
+    code_object = __pyx_code_cache.entries[pos].code_object;
+    Py_INCREF(code_object);
+    return code_object;
+}
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
+    int pos, i;
+    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
+    if (unlikely(!code_line)) {
+        return;
+    }
+    if (unlikely(!entries)) {
+        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
+        if (likely(entries)) {
+            __pyx_code_cache.entries = entries;
+            __pyx_code_cache.max_count = 64;
+            __pyx_code_cache.count = 1;
+            entries[0].code_line = code_line;
+            entries[0].code_object = code_object;
+            Py_INCREF(code_object);
+        }
+        return;
+    }
+    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
+        PyCodeObject* tmp = entries[pos].code_object;
+        entries[pos].code_object = code_object;
+        Py_DECREF(tmp);
+        return;
+    }
+    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
+        int new_max = __pyx_code_cache.max_count + 64;
+        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
+            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
+        if (unlikely(!entries)) {
+            return;
+        }
+        __pyx_code_cache.entries = entries;
+        __pyx_code_cache.max_count = new_max;
+    }
+    for (i=__pyx_code_cache.count; i>pos; i--) {
+        entries[i] = entries[i-1];
+    }
+    entries[pos].code_line = code_line;
+    entries[pos].code_object = code_object;
+    __pyx_code_cache.count++;
+    Py_INCREF(code_object);
+}
+
+#include "compile.h"
+#include "frameobject.h"
+#include "traceback.h"
+static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
+            const char *funcname, int c_line,
+            int py_line, const char *filename) {
+    PyCodeObject *py_code = 0;
+    PyObject *py_srcfile = 0;
+    PyObject *py_funcname = 0;
+    #if PY_MAJOR_VERSION < 3
+    py_srcfile = PyString_FromString(filename);
+    #else
+    py_srcfile = PyUnicode_FromString(filename);
+    #endif
+    if (!py_srcfile) goto bad;
+    if (c_line) {
+        #if PY_MAJOR_VERSION < 3
+        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+        #else
+        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+        #endif
+    }
+    else {
+        #if PY_MAJOR_VERSION < 3
+        py_funcname = PyString_FromString(funcname);
+        #else
+        py_funcname = PyUnicode_FromString(funcname);
+        #endif
+    }
+    if (!py_funcname) goto bad;
+    py_code = __Pyx_PyCode_New(
+        0,
+        0,
+        0,
+        0,
+        0,
+        __pyx_empty_bytes, /*PyObject *code,*/
+        __pyx_empty_tuple, /*PyObject *consts,*/
+        __pyx_empty_tuple, /*PyObject *names,*/
+        __pyx_empty_tuple, /*PyObject *varnames,*/
+        __pyx_empty_tuple, /*PyObject *freevars,*/
+        __pyx_empty_tuple, /*PyObject *cellvars,*/
+        py_srcfile,   /*PyObject *filename,*/
+        py_funcname,  /*PyObject *name,*/
+        py_line,
+        __pyx_empty_bytes  /*PyObject *lnotab*/
+    );
+    Py_DECREF(py_srcfile);
+    Py_DECREF(py_funcname);
+    return py_code;
+bad:
+    Py_XDECREF(py_srcfile);
+    Py_XDECREF(py_funcname);
+    return NULL;
+}
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+                               int py_line, const char *filename) {
+    PyCodeObject *py_code = 0;
+    PyFrameObject *py_frame = 0;
+    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
+    if (!py_code) {
+        py_code = __Pyx_CreateCodeObjectForTraceback(
+            funcname, c_line, py_line, filename);
+        if (!py_code) goto bad;
+        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
+    }
+    py_frame = PyFrame_New(
+        PyThreadState_GET(), /*PyThreadState *tstate,*/
+        py_code,             /*PyCodeObject *code,*/
+        __pyx_d,      /*PyObject *globals,*/
+        0                    /*PyObject *locals*/
+    );
+    if (!py_frame) goto bad;
+    py_frame->f_lineno = py_line;
+    PyTraceBack_Here(py_frame);
+bad:
+    Py_XDECREF(py_code);
+    Py_XDECREF(py_frame);
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
+    const int neg_one = (int) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(int) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(int) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(int) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(int) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(int),
+                                     little, !is_unsigned);
+    }
+}
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+    PyObject *empty_list = 0;
+    PyObject *module = 0;
+    PyObject *global_dict = 0;
+    PyObject *empty_dict = 0;
+    PyObject *list;
+    #if PY_VERSION_HEX < 0x03030000
+    PyObject *py_import;
+    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+    if (!py_import)
+        goto bad;
+    #endif
+    if (from_list)
+        list = from_list;
+    else {
+        empty_list = PyList_New(0);
+        if (!empty_list)
+            goto bad;
+        list = empty_list;
+    }
+    global_dict = PyModule_GetDict(__pyx_m);
+    if (!global_dict)
+        goto bad;
+    empty_dict = PyDict_New();
+    if (!empty_dict)
+        goto bad;
+    {
+        #if PY_MAJOR_VERSION >= 3
+        if (level == -1) {
+            if (strchr(__Pyx_MODULE_NAME, '.')) {
+                #if PY_VERSION_HEX < 0x03030000
+                PyObject *py_level = PyInt_FromLong(1);
+                if (!py_level)
+                    goto bad;
+                module = PyObject_CallFunctionObjArgs(py_import,
+                    name, global_dict, empty_dict, list, py_level, NULL);
+                Py_DECREF(py_level);
+                #else
+                module = PyImport_ImportModuleLevelObject(
+                    name, global_dict, empty_dict, list, 1);
+                #endif
+                if (!module) {
+                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
+                        goto bad;
+                    PyErr_Clear();
+                }
+            }
+            level = 0;
+        }
+        #endif
+        if (!module) {
+            #if PY_VERSION_HEX < 0x03030000
+            PyObject *py_level = PyInt_FromLong(level);
+            if (!py_level)
+                goto bad;
+            module = PyObject_CallFunctionObjArgs(py_import,
+                name, global_dict, empty_dict, list, py_level, NULL);
+            Py_DECREF(py_level);
+            #else
+            module = PyImport_ImportModuleLevelObject(
+                name, global_dict, empty_dict, list, level);
+            #endif
+        }
+    }
+bad:
+    #if PY_VERSION_HEX < 0x03030000
+    Py_XDECREF(py_import);
+    #endif
+    Py_XDECREF(empty_list);
+    Py_XDECREF(empty_dict);
+    return module;
+}
+
+#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)       \
+    {                                                                     \
+        func_type value = func_value;                                     \
+        if (sizeof(target_type) < sizeof(func_type)) {                    \
+            if (unlikely(value != (func_type) (target_type) value)) {     \
+                func_type zero = 0;                                       \
+                if (is_unsigned && unlikely(value < zero))                \
+                    goto raise_neg_overflow;                              \
+                else                                                      \
+                    goto raise_overflow;                                  \
+            }                                                             \
+        }                                                                 \
+        return (target_type) value;                                       \
+    }
+
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+  #include "longintrepr.h"
+ #endif
+#endif
+
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+    const int neg_one = (int) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(int) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                goto raise_neg_overflow;
+            }
+            return (int) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            switch (Py_SIZE(x)) {
+                case  0: return 0;
+                case  1: __PYX_VERIFY_RETURN_INT(int, digit, ((PyLongObject*)x)->ob_digit[0]);
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                goto raise_neg_overflow;
+            }
+            if (sizeof(int) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong(x))
+            } else if (sizeof(int) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong(x))
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            switch (Py_SIZE(x)) {
+                case  0: return 0;
+                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +(((PyLongObject*)x)->ob_digit[0]));
+                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
+            }
+ #endif
+#endif
+            if (sizeof(int) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong(x))
+            } else if (sizeof(int) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong(x))
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            int val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (int) -1;
+        }
+    } else {
+        int val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (int) -1;
+        val = __Pyx_PyInt_As_int(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+raise_overflow:
+    PyErr_SetString(PyExc_OverflowError,
+        "value too large to convert to int");
+    return (int) -1;
+raise_neg_overflow:
+    PyErr_SetString(PyExc_OverflowError,
+        "can't convert negative value to int");
+    return (int) -1;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+    const long neg_one = (long) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+    if (is_unsigned) {
+        if (sizeof(long) < sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long)) {
+            return PyLong_FromUnsignedLong((unsigned long) value);
+        } else if (sizeof(long) <= sizeof(unsigned long long)) {
+            return PyLong_FromUnsignedLongLong((unsigned long long) value);
+        }
+    } else {
+        if (sizeof(long) <= sizeof(long)) {
+            return PyInt_FromLong((long) value);
+        } else if (sizeof(long) <= sizeof(long long)) {
+            return PyLong_FromLongLong((long long) value);
+        }
+    }
+    {
+        int one = 1; int little = (int)*(unsigned char *)&one;
+        unsigned char *bytes = (unsigned char *)&value;
+        return _PyLong_FromByteArray(bytes, sizeof(long),
+                                     little, !is_unsigned);
+    }
+}
+
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+    const long neg_one = (long) -1, const_zero = 0;
+    const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+    if (likely(PyInt_Check(x))) {
+        if (sizeof(long) < sizeof(long)) {
+            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
+        } else {
+            long val = PyInt_AS_LONG(x);
+            if (is_unsigned && unlikely(val < 0)) {
+                goto raise_neg_overflow;
+            }
+            return (long) val;
+        }
+    } else
+#endif
+    if (likely(PyLong_Check(x))) {
+        if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            switch (Py_SIZE(x)) {
+                case  0: return 0;
+                case  1: __PYX_VERIFY_RETURN_INT(long, digit, ((PyLongObject*)x)->ob_digit[0]);
+            }
+ #endif
+#endif
+            if (unlikely(Py_SIZE(x) < 0)) {
+                goto raise_neg_overflow;
+            }
+            if (sizeof(long) <= sizeof(unsigned long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong(x))
+            } else if (sizeof(long) <= sizeof(unsigned long long)) {
+                __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong(x))
+            }
+        } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
+            switch (Py_SIZE(x)) {
+                case  0: return 0;
+                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +(((PyLongObject*)x)->ob_digit[0]));
+                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
+            }
+ #endif
+#endif
+            if (sizeof(long) <= sizeof(long)) {
+                __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong(x))
+            } else if (sizeof(long) <= sizeof(long long)) {
+                __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong(x))
+            }
+        }
+        {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+            PyErr_SetString(PyExc_RuntimeError,
+                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+            long val;
+            PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_MAJOR_VERSION < 3
+            if (likely(v) && !PyLong_Check(v)) {
+                PyObject *tmp = v;
+                v = PyNumber_Long(tmp);
+                Py_DECREF(tmp);
+            }
+ #endif
+            if (likely(v)) {
+                int one = 1; int is_little = (int)*(unsigned char *)&one;
+                unsigned char *bytes = (unsigned char *)&val;
+                int ret = _PyLong_AsByteArray((PyLongObject *)v,
+                                              bytes, sizeof(val),
+                                              is_little, !is_unsigned);
+                Py_DECREF(v);
+                if (likely(!ret))
+                    return val;
+            }
+#endif
+            return (long) -1;
+        }
+    } else {
+        long val;
+        PyObject *tmp = __Pyx_PyNumber_Int(x);
+        if (!tmp) return (long) -1;
+        val = __Pyx_PyInt_As_long(tmp);
+        Py_DECREF(tmp);
+        return val;
+    }
+raise_overflow:
+    PyErr_SetString(PyExc_OverflowError,
+        "value too large to convert to long");
+    return (long) -1;
+raise_neg_overflow:
+    PyErr_SetString(PyExc_OverflowError,
+        "can't convert negative value to long");
+    return (long) -1;
+}
+
+static int __Pyx_check_binary_version(void) {
+    char ctversion[4], rtversion[4];
+    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
+    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
+    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
+        char message[200];
+        PyOS_snprintf(message, sizeof(message),
+                      "compiletime version %s of module '%.100s' "
+                      "does not match runtime version %s",
+                      ctversion, __Pyx_MODULE_NAME, rtversion);
+        return PyErr_WarnEx(NULL, message, 1);
+    }
+    return 0;
+}
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
+    while (t->p) {
+        #if PY_MAJOR_VERSION < 3
+        if (t->is_unicode) {
+            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
+        } else if (t->intern) {
+            *t->p = PyString_InternFromString(t->s);
+        } else {
+            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
+        }
+        #else
+        if (t->is_unicode | t->is_str) {
+            if (t->intern) {
+                *t->p = PyUnicode_InternFromString(t->s);
+            } else if (t->encoding) {
+                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
+            } else {
+                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
+            }
+        } else {
+            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
+        }
+        #endif
+        if (!*t->p)
+            return -1;
+        ++t;
+    }
+    return 0;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
+    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
+    Py_ssize_t ignore;
+    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+    if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+            __Pyx_sys_getdefaultencoding_not_ascii &&
+#endif
+            PyUnicode_Check(o)) {
+#if PY_VERSION_HEX < 0x03030000
+        char* defenc_c;
+        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+        if (!defenc) return NULL;
+        defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        {
+            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+            char* c;
+            for (c = defenc_c; c < end; c++) {
+                if ((unsigned char) (*c) >= 128) {
+                    PyUnicode_AsASCIIString(o);
+                    return NULL;
+                }
+            }
+        }
+#endif
+        *length = PyBytes_GET_SIZE(defenc);
+        return defenc_c;
+#else
+        if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        if (PyUnicode_IS_ASCII(o)) {
+            *length = PyUnicode_GET_LENGTH(o);
+            return PyUnicode_AsUTF8(o);
+        } else {
+            PyUnicode_AsASCIIString(o);
+            return NULL;
+        }
+#else
+        return PyUnicode_AsUTF8AndSize(o, length);
+#endif
+#endif
+    } else
+#endif
+#if !CYTHON_COMPILING_IN_PYPY
+    if (PyByteArray_Check(o)) {
+        *length = PyByteArray_GET_SIZE(o);
+        return PyByteArray_AS_STRING(o);
+    } else
+#endif
+    {
+        char* result;
+        int r = PyBytes_AsStringAndSize(o, &result, length);
+        if (unlikely(r < 0)) {
+            return NULL;
+        } else {
+            return result;
+        }
+    }
+}
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
+   int is_true = x == Py_True;
+   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
+   else return PyObject_IsTrue(x);
+}
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
+  PyNumberMethods *m;
+  const char *name = NULL;
+  PyObject *res = NULL;
+#if PY_MAJOR_VERSION < 3
+  if (PyInt_Check(x) || PyLong_Check(x))
+#else
+  if (PyLong_Check(x))
+#endif
+    return Py_INCREF(x), x;
+  m = Py_TYPE(x)->tp_as_number;
+#if PY_MAJOR_VERSION < 3
+  if (m && m->nb_int) {
+    name = "int";
+    res = PyNumber_Int(x);
+  }
+  else if (m && m->nb_long) {
+    name = "long";
+    res = PyNumber_Long(x);
+  }
+#else
+  if (m && m->nb_int) {
+    name = "int";
+    res = PyNumber_Long(x);
+  }
+#endif
+  if (res) {
+#if PY_MAJOR_VERSION < 3
+    if (!PyInt_Check(res) && !PyLong_Check(res)) {
+#else
+    if (!PyLong_Check(res)) {
+#endif
+      PyErr_Format(PyExc_TypeError,
+                   "__%.4s__ returned non-%.4s (type %.200s)",
+                   name, name, Py_TYPE(res)->tp_name);
+      Py_DECREF(res);
+      return NULL;
+    }
+  }
+  else if (!PyErr_Occurred()) {
+    PyErr_SetString(PyExc_TypeError,
+                    "an integer is required");
+  }
+  return res;
+}
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+  Py_ssize_t ival;
+  PyObject *x;
+#if PY_MAJOR_VERSION < 3
+  if (likely(PyInt_CheckExact(b)))
+      return PyInt_AS_LONG(b);
+#endif
+  if (likely(PyLong_CheckExact(b))) {
+    #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+     #if CYTHON_USE_PYLONG_INTERNALS
+       switch (Py_SIZE(b)) {
+       case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0];
+       case  0: return 0;
+       case  1: return ((PyLongObject*)b)->ob_digit[0];
+       }
+     #endif
+    #endif
+    return PyLong_AsSsize_t(b);
+  }
+  x = PyNumber_Index(b);
+  if (!x) return -1;
+  ival = PyInt_AsSsize_t(x);
+  Py_DECREF(x);
+  return ival;
+}
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
+    return PyInt_FromSize_t(ival);
+}
+
+
+#endif /* Py_PYTHON_H */
diff --git a/netcdftime/_datetime.pyx b/netcdftime/_datetime.pyx
new file mode 100644
index 0000000..6014958
--- /dev/null
+++ b/netcdftime/_datetime.pyx
@@ -0,0 +1,126 @@
+from datetime import datetime as real_datetime
+import operator
+import re
+import time
+
+from cpython.object cimport PyObject_RichCompare
+
+
+cdef class datetime(object):
+
+    """
+Phony datetime object which mimics the python datetime object,
+but allows for dates that don't exist in the proleptic gregorian calendar.
+Doesn't do timedelta operations, doesn't overload + and -.
+
+Has strftime, timetuple and __repr__ methods.  The format
+of the string produced by __repr__ is controlled by self.format
+(default %Y-%m-%d %H:%M:%S). Does support comparisons with other
+phony datetime and with datetime.datetime objects.
+
+Instance variables are year,month,day,hour,minute,second,dayofwk,dayofyr
+and format.
+    """
+    cdef readonly int year, month, day, hour, minute, dayofwk, dayofyr, second
+
+    def __init__(self, year, month, day, hour=0, minute=0, second=0,
+                 dayofwk=-1, dayofyr=1):
+        """dayofyr set to 1 by default - otherwise time.strftime will complain"""
+
+        self.year = year
+        self.month = month
+        self.day = day
+        self.hour = hour
+        self.minute = minute
+        self.dayofwk = dayofwk
+        self.dayofyr = dayofyr
+        self.second = second
+
+    property format:
+        def __get__(self):
+            return '%Y-%m-%d %H:%M:%S'
+
+    def strftime(self, format=None):
+        if format is None:
+            format = self.format
+        return _strftime(self, format)
+
+    def timetuple(self):
+        return (self.year, self.month, self.day, self.hour,
+                self.minute, self.second, self.dayofwk, self.dayofyr, -1)
+
+    def _to_real_datetime(self):
+        return real_datetime(self.year, self.month, self.day,
+                             self.hour, self.minute, self.second)
+
+    def __repr__(self):
+        return self.strftime(self.format)
+
+    def __hash__(self):
+        try:
+            d = self._to_real_datetime()
+        except ValueError:
+            return hash(self.timetuple())
+        return hash(d)
+
+    def __richcmp__(self, other, int op):
+        if hasattr(other, 'strftime'):
+            self_str = self.strftime('%Y-%m-%d %H:%M:%S')
+            other_str = other.strftime('%Y-%m-%d %H:%M:%S')
+            return PyObject_RichCompare(self_str, other_str, op)
+        return NotImplemented
+
+
+_illegal_s = re.compile(r"((^|[^%])(%%)*%s)")
+
+
+def _findall(text, substr):
+    # Also finds overlaps
+    sites = []
+    i = 0
+    while 1:
+        j = text.find(substr, i)
+        if j == -1:
+            break
+        sites.append(j)
+        i = j + 1
+    return sites
+
+# Every 28 years the calendar repeats, except through century leap
+# years where it's 6 years.  But only if you're using the Gregorian
+# calendar.  ;)
+
+
+def _strftime(dt, fmt):
+    if _illegal_s.search(fmt):
+        raise TypeError("This strftime implementation does not handle %s")
+    # don't use strftime method at all.
+    # if dt.year > 1900:
+    #    return dt.strftime(fmt)
+
+    year = dt.year
+    # For every non-leap year century, advance by
+    # 6 years to get into the 28-year repeat cycle
+    delta = 2000 - year
+    off = 6 * (delta // 100 + delta // 400)
+    year = year + off
+
+    # Move to around the year 2000
+    year = year + ((2000 - year) // 28) * 28
+    timetuple = dt.timetuple()
+    s1 = time.strftime(fmt, (year,) + timetuple[1:])
+    sites1 = _findall(s1, str(year))
+
+    s2 = time.strftime(fmt, (year + 28,) + timetuple[1:])
+    sites2 = _findall(s2, str(year + 28))
+
+    sites = []
+    for site in sites1:
+        if site in sites2:
+            sites.append(site)
+
+    s = s1
+    syear = "%4d" % (dt.year,)
+    for site in sites:
+        s = s[:site] + syear + s[site + 4:]
+    return s
diff --git a/netcdftime/netcdftime.py b/netcdftime/netcdftime.py
new file mode 100644
index 0000000..fc41aad
--- /dev/null
+++ b/netcdftime/netcdftime.py
@@ -0,0 +1,1189 @@
+"""
+Performs conversions of netCDF time coordinate data to/from datetime objects.
+"""
+import numpy as np
+import math
+import numpy
+import re
+from datetime import datetime as real_datetime
+try:
+    from itertools import izip as zip
+except ImportError:  # python 3.x
+    pass
+
+from ._datetime import datetime
+
+_units = ['days', 'hours', 'minutes', 'seconds',
+          'day', 'hour', 'minute', 'second']
+_calendars = ['standard', 'gregorian', 'proleptic_gregorian',
+              'noleap', 'julian', 'all_leap', '365_day', '366_day', '360_day']
+
+__version__ = '1.3'
+
+# Adapted from http://delete.me.uk/2005/03/iso8601.html
+ISO8601_REGEX = re.compile(r"(?P<year>[0-9]{1,4})(-(?P<month>[0-9]{1,2})(-(?P<day>[0-9]{1,2})"
+                           r"(((?P<separator1>.)(?P<hour>[0-9]{1,2}):(?P<minute>[0-9]{1,2})(:(?P<second>[0-9]{1,2})(\.(?P<fraction>[0-9]+))?)?)?"
+                           r"((?P<separator2>.?)(?P<timezone>Z|(([-+])([0-9]{1,2}):([0-9]{1,2}))))?)?)?)?"
+                           )
+TIMEZONE_REGEX = re.compile(
+    "(?P<prefix>[+-])(?P<hours>[0-9]{1,2}):(?P<minutes>[0-9]{1,2})")
+
+
+def JulianDayFromDate(date, calendar='standard'):
+    """
+
+    creates a Julian Day from a 'datetime-like' object.  Returns the fractional
+    Julian Day (resolution 1 second).
+
+    if calendar='standard' or 'gregorian' (default), Julian day follows Julian
+    Calendar on and before 1582-10-5, Gregorian calendar after 1582-10-15.
+
+    if calendar='proleptic_gregorian', Julian Day follows gregorian calendar.
+
+    if calendar='julian', Julian Day follows julian calendar.
+
+    Algorithm:
+
+    Meeus, Jean (1998) Astronomical Algorithms (2nd Edition). Willmann-Bell,
+    Virginia. p. 63
+
+    """
+
+    # based on redate.py by David Finlayson.
+
+    # check if input was scalar and change return accordingly
+    isscalar = False
+    try:
+        date[0]
+    except:
+        isscalar = True
+
+    date = np.atleast_1d(np.array(date))
+    year = np.empty(len(date), dtype=np.int32)
+    month = year.copy()
+    day = year.copy()
+    hour = year.copy()
+    minute = year.copy()
+    second = year.copy()
+    for i, d in enumerate(date):
+        year[i] = d.year
+        month[i] = d.month
+        day[i] = d.day
+        hour[i] = d.hour
+        minute[i] = d.minute
+        second[i] = d.second
+    # Convert time to fractions of a day
+    day = day + hour / 24.0 + minute / 1440.0 + second / 86400.0
+
+    # Start Meeus algorithm (variables are in his notation)
+    month_lt_3 = month < 3
+    month[month_lt_3] = month[month_lt_3] + 12
+    year[month_lt_3] = year[month_lt_3] - 1
+
+    A = np.int64(year / 100)
+
+    # MC
+    # jd = int(365.25 * (year + 4716)) + int(30.6001 * (month + 1)) + \
+    #      day - 1524.5
+    jd = 365. * year + np.int32(0.25 * year + 2000.) + np.int32(30.6001 * (month + 1)) + \
+        day + 1718994.5
+
+    # optionally adjust the jd for the switch from
+    # the Julian to Gregorian Calendar
+    # here assumed to have occurred the day after 1582 October 4
+    if calendar in ['standard', 'gregorian']:
+        if np.min(jd) >= 2299170.5:
+            # 1582 October 15 (Gregorian Calendar)
+            B = 2 - A + np.int32(A / 4)
+        elif np.max(jd) < 2299160.5:
+            # 1582 October 5 (Julian Calendar)
+            B = np.zeros(len(jd))
+        else:
+            raise ValueError(
+                'impossible date (falls in gap between end of Julian calendar and beginning of Gregorian calendar')
+    elif calendar == 'proleptic_gregorian':
+        B = 2 - A + np.int32(A / 4)
+    elif calendar == 'julian':
+        B = np.zeros(len(jd))
+    else:
+        raise ValueError(
+            'unknown calendar, must be one of julian,standard,gregorian,proleptic_gregorian, got %s' % calendar)
+
+    # adjust for Julian calendar if necessary
+    jd = jd + B
+
+    if isscalar:
+        return jd[0]
+    else:
+        return jd
+
+
+def _NoLeapDayFromDate(date):
+    """
+
+creates a Julian Day for a calendar with no leap years from a datetime
+instance.  Returns the fractional Julian Day (resolution 1 second).
+
+    """
+
+    year = date.year
+    month = date.month
+    day = date.day
+    hour = date.hour
+    minute = date.minute
+    second = date.second
+    # Convert time to fractions of a day
+    day = day + hour / 24.0 + minute / 1440.0 + second / 86400.0
+
+    # Start Meeus algorithm (variables are in his notation)
+    if (month < 3):
+        month = month + 12
+        year = year - 1
+
+    jd = int(365. * (year + 4716)) + int(30.6001 * (month + 1)) + \
+        day - 1524.5
+
+    return jd
+
+
+def _AllLeapFromDate(date):
+    """
+
+creates a Julian Day for a calendar where all years have 366 days from
+a 'datetime-like' object.
+Returns the fractional Julian Day (resolution 1 second).
+
+    """
+
+    year = date.year
+    month = date.month
+    day = date.day
+    hour = date.hour
+    minute = date.minute
+    second = date.second
+    # Convert time to fractions of a day
+    day = day + hour / 24.0 + minute / 1440.0 + second / 86400.0
+
+    # Start Meeus algorithm (variables are in his notation)
+    if (month < 3):
+        month = month + 12
+        year = year - 1
+
+    jd = int(366. * (year + 4716)) + int(30.6001 * (month + 1)) + \
+        day - 1524.5
+
+    return jd
+
+
+def _360DayFromDate(date):
+    """
+
+creates a Julian Day for a calendar where all months have 30 daysfrom
+a 'datetime-like' object.
+Returns the fractional Julian Day (resolution 1 second).
+
+    """
+
+    year = date.year
+    month = date.month
+    day = date.day
+    hour = date.hour
+    minute = date.minute
+    second = date.second
+    # Convert time to fractions of a day
+    day = day + hour / 24.0 + minute / 1440.0 + second / 86400.0
+
+    jd = int(360. * (year + 4716)) + int(30. * (month - 1)) + day
+
+    return jd
+
+
+def DateFromJulianDay(JD, calendar='standard'):
+    """
+
+    returns a 'datetime-like' object given Julian Day. Julian Day is a
+    fractional day with a resolution of 1 second.
+
+    if calendar='standard' or 'gregorian' (default), Julian day follows Julian
+    Calendar on and before 1582-10-5, Gregorian calendar after  1582-10-15.
+
+    if calendar='proleptic_gregorian', Julian Day follows gregorian calendar.
+
+    if calendar='julian', Julian Day follows julian calendar.
+
+    The datetime object is a 'real' datetime object if the date falls in
+    the Gregorian calendar (i.e. calendar='proleptic_gregorian', or
+    calendar = 'standard'/'gregorian' and the date is after 1582-10-15).
+    Otherwise, it's a 'phony' datetime object which is actually an instance
+    of netcdftime.datetime.
+
+
+    Algorithm:
+
+    Meeus, Jean (1998) Astronomical Algorithms (2nd Edition). Willmann-Bell,
+    Virginia. p. 63
+
+    """
+
+    # based on redate.py by David Finlayson.
+
+    julian = np.array(JD, dtype=float)
+
+    if np.min(julian) < 0:
+        raise ValueError('Julian Day must be positive')
+
+    dayofwk = np.atleast_1d(np.int32(np.fmod(np.int32(julian + 1.5), 7)))
+    # get the day (Z) and the fraction of the day (F)
+    # add 0.000005 which is 452 ms in case of jd being after
+    # second 23:59:59 of a day we want to round to the next day see issue #75
+    Z = np.atleast_1d(np.int32(np.round(julian + 0.00005)))
+    F = np.atleast_1d(julian + 0.5 - Z).astype(np.float64)
+    if calendar in ['standard', 'gregorian']:
+        # MC
+        # alpha = int((Z - 1867216.25)/36524.25)
+        # A = Z + 1 + alpha - int(alpha/4)
+        alpha = np.int32(((Z - 1867216.) - 0.25) / 36524.25)
+        A = Z + 1 + alpha - np.int32(0.25 * alpha)
+        # check if dates before oct 5th 1582 are in the array
+        ind_before = np.where(julian < 2299160.5)[0]
+        if len(ind_before) > 0:
+            A[ind_before] = Z[ind_before]
+
+    elif calendar == 'proleptic_gregorian':
+        # MC
+        # alpha = int((Z - 1867216.25)/36524.25)
+        # A = Z + 1 + alpha - int(alpha/4)
+        alpha = np.int32(((Z - 1867216.) - 0.25) / 36524.25)
+        A = Z + 1 + alpha - np.int32(0.25 * alpha)
+    elif calendar == 'julian':
+        A = Z
+    else:
+        raise ValueError(
+            'unknown calendar, must be one of julian,standard,gregorian,proleptic_gregorian, got %s' % calendar)
+
+    B = A + 1524
+    # MC
+    # C = int((B - 122.1)/365.25)
+    # D = int(365.25 * C)
+    C = np.atleast_1d(np.int32(6680. + ((B - 2439870.) - 122.1) / 365.25))
+    D = np.atleast_1d(np.int32(365 * C + np.int32(0.25 * C)))
+    E = np.atleast_1d(np.int32((B - D) / 30.6001))
+
+    # Convert to date
+    day = np.clip(B - D - np.int64(30.6001 * E) + F, 1, None)
+    nday = B - D - 123
+    dayofyr = nday - 305
+    ind_nday_before = np.where(nday <= 305)[0]
+    if len(ind_nday_before) > 0:
+        dayofyr[ind_nday_before] = nday[ind_nday_before] + 60
+    # MC
+    # if E < 14:
+    #     month = E - 1
+    # else:
+    #     month = E - 13
+
+    # if month > 2:
+    #     year = C - 4716
+    # else:
+    #     year = C - 4715
+    month = E - 1
+    month[month > 12] = month[month > 12] - 12
+    year = C - 4715
+    year[month > 2] = year[month > 2] - 1
+    year[year <= 0] = year[year <= 0] - 1
+
+    # a leap year?
+    leap = np.zeros(len(year))
+    leap[year % 4 == 0] = 1
+    if calendar == 'proleptic_gregorian':
+        leap[(year % 100 == 0) & (year % 400 != 0)] = 0
+    elif calendar in ['standard', 'gregorian']:
+        leap[(year % 100 == 0) & (year % 400 != 0) & (julian < 2299160.5)] = 0
+
+    inc_idx = np.where((leap == 1) & (month > 2))[0]
+    dayofyr[inc_idx] = dayofyr[inc_idx] + leap[inc_idx]
+
+    eps = np.clip(
+        (1e-12 * np.abs(Z)).astype(np.float64), np.float64(1e-12), None)
+    hour = np.clip((F * 24. + eps).astype(np.int64), 0, 23)
+    F -= hour / 24.
+    minute = np.clip((F * 1440. + eps).astype(np.int64), 0, 59)
+    # don't attempt microsecond accuracy, just round to nearest
+    # second (issue #330)
+    second = np.round(np.clip((F - minute / 1440.) * 86400., 0, None))
+
+    # convert year, month, day, hour, minute, second to int32
+    year = year.astype(np.int32)
+    month = month.astype(np.int32)
+    day = day.astype(np.int32)
+    hour = hour.astype(np.int32)
+    minute = minute.astype(np.int32)
+    second = second.astype(np.int32)
+
+    # check if input was scalar and change return accordingly
+    isscalar = False
+    try:
+        JD[0]
+    except:
+        isscalar = True
+    # return a 'real' datetime instance if calendar is gregorian.
+    if calendar in 'proleptic_gregorian' or \
+            (calendar in ['standard', 'gregorian'] and len(ind_before) == 0):
+        if not isscalar:
+            return np.array([real_datetime(*args)
+                             for args in
+                             zip(year, month, day, hour, minute, second)])
+
+        else:
+            return real_datetime(year[0], month[0], day[0], hour[0],
+                                 minute[0], second[0])
+    else:
+        # or else, return a 'datetime-like' instance.
+        if not isscalar:
+            return np.array([datetime(*args)
+                             for args in
+                             zip(year, month, day, hour, minute,
+                                 second, dayofwk, dayofyr)])
+        else:
+            return datetime(year[0], month[0], day[0], hour[0],
+                            minute[0], second[0], dayofwk[0],
+                            dayofyr[0])
+
+
+def _DateFromNoLeapDay(JD):
+    """
+
+returns a 'datetime-like' object given Julian Day for a calendar with no leap
+days. Julian Day is a fractional day with a resolution of 1 second.
+
+    """
+
+    # based on redate.py by David Finlayson.
+
+    if JD < 0:
+        raise ValueError('Julian Day must be positive')
+
+    dayofwk = int(math.fmod(int(JD + 1.5), 7))
+    (F, Z) = math.modf(JD + 0.5)
+    Z = int(Z)
+    A = Z
+    B = A + 1524
+    C = int((B - 122.1) / 365.)
+    D = int(365. * C)
+    E = int((B - D) / 30.6001)
+
+    # Convert to date
+    day = B - D - int(30.6001 * E) + F
+    nday = B - D - 123
+    if nday <= 305:
+        dayofyr = nday + 60
+    else:
+        dayofyr = nday - 305
+    if E < 14:
+        month = E - 1
+    else:
+        month = E - 13
+
+    if month > 2:
+        year = C - 4716
+    else:
+        year = C - 4715
+
+    # Convert fractions of a day to time
+    (dfrac, days) = math.modf(day / 1.0)
+    (hfrac, hours) = math.modf(dfrac * 24.0)
+    (mfrac, minutes) = math.modf(hfrac * 60.0)
+    seconds = round(mfrac * 60.0)  # seconds are rounded
+
+    if seconds > 59:
+        seconds = 0
+        minutes = minutes + 1
+    if minutes > 59:
+        minutes = 0
+        hours = hours + 1
+    if hours > 23:
+        hours = 0
+        days = days + 1
+
+    return datetime(year, month, int(days), int(hours), int(minutes), int(seconds), dayofwk, dayofyr)
+
+
+def _DateFromAllLeap(JD):
+    """
+
+returns a 'datetime-like' object given Julian Day for a calendar where all
+years have 366 days.
+Julian Day is a fractional day with a resolution of 1 second.
+
+    """
+
+    # based on redate.py by David Finlayson.
+
+    if JD < 0:
+        raise ValueError('Julian Day must be positive')
+
+    dayofwk = int(math.fmod(int(JD + 1.5), 7))
+    (F, Z) = math.modf(JD + 0.5)
+    Z = int(Z)
+    A = Z
+    B = A + 1524
+    C = int((B - 122.1) / 366.)
+    D = int(366. * C)
+    E = int((B - D) / 30.6001)
+
+    # Convert to date
+    day = B - D - int(30.6001 * E) + F
+    nday = B - D - 123
+    if nday <= 305:
+        dayofyr = nday + 60
+    else:
+        dayofyr = nday - 305
+    if E < 14:
+        month = E - 1
+    else:
+        month = E - 13
+    if month > 2:
+        dayofyr = dayofyr + 1
+
+    if month > 2:
+        year = C - 4716
+    else:
+        year = C - 4715
+
+    # Convert fractions of a day to time
+    (dfrac, days) = math.modf(day / 1.0)
+    (hfrac, hours) = math.modf(dfrac * 24.0)
+    (mfrac, minutes) = math.modf(hfrac * 60.0)
+    seconds = round(mfrac * 60.0)  # seconds are rounded
+
+    if seconds > 59:
+        seconds = 0
+        minutes = minutes + 1
+    if minutes > 59:
+        minutes = 0
+        hours = hours + 1
+    if hours > 23:
+        hours = 0
+        days = days + 1
+
+    return datetime(year, month, int(days), int(hours), int(minutes), int(seconds), dayofwk, dayofyr)
+
+
+def _DateFrom360Day(JD):
+    """
+
+returns a 'datetime-like' object given Julian Day for a calendar where all
+months have 30 days.
+Julian Day is a fractional day with a resolution of 1 second.
+
+    """
+
+    if JD < 0:
+        raise ValueError('Julian Day must be positive')
+
+    #jd = int(360. * (year + 4716)) + int(30. * (month - 1)) + day
+    (F, Z) = math.modf(JD)
+    year = int((Z - 0.5) / 360.) - 4716
+    dayofyr = Z - (year + 4716) * 360
+    month = int((dayofyr - 0.5) / 30) + 1
+    day = dayofyr - (month - 1) * 30 + F
+
+    # Convert fractions of a day to time
+    (dfrac, days) = math.modf(day / 1.0)
+    (hfrac, hours) = math.modf(dfrac * 24.0)
+    (mfrac, minutes) = math.modf(hfrac * 60.0)
+    seconds = round(mfrac * 60.0)  # seconds are rounded
+
+    if seconds > 59:
+        seconds = 0
+        minutes = minutes + 1
+    if minutes > 59:
+        minutes = 0
+        hours = hours + 1
+    if hours > 23:
+        hours = 0
+        days = days + 1
+
+    return datetime(year, month, int(days), int(hours), int(minutes), int(seconds), -1, int(dayofyr))
+
+
+def _dateparse(timestr):
+    """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss
+    return a tuple (units,utc_offset, datetimeinstance)"""
+    timestr_split = timestr.split()
+    units = timestr_split[0].lower()
+    if units not in _units:
+        raise ValueError(
+            "units must be one of 'seconds', 'minutes', 'hours' or 'days' (or singular version of these), got '%s'" % units)
+    if timestr_split[1].lower() != 'since':
+        raise ValueError("no 'since' in unit_string")
+    # parse the date string.
+    n = timestr.find('since') + 6
+    year, month, day, hour, minute, second, utc_offset = _parse_date(
+        timestr[n:].strip())
+    return units, utc_offset, datetime(year, month, day, hour, minute, second)
+
+
+class utime:
+
+    """
+Performs conversions of netCDF time coordinate
+data to/from datetime objects.
+
+To initialize: C{t = utime(unit_string,calendar='standard')}
+
+where
+
+B{C{unit_string}} is a string of the form
+C{'time-units since <time-origin>'} defining the time units.
+
+Valid time-units are days, hours, minutes and seconds (the singular forms
+are also accepted). An example unit_string would be C{'hours
+since 0001-01-01 00:00:00'}.
+
+The B{C{calendar}} keyword describes the calendar used in the time calculations.
+All the values currently defined in the U{CF metadata convention
+<http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.1/cf-conventions.html#time-coordinate>}
+are accepted. The default is C{'standard'}, which corresponds to the mixed
+Gregorian/Julian calendar used by the C{udunits library}. Valid calendars
+are:
+
+C{'gregorian'} or C{'standard'} (default):
+
+Mixed Gregorian/Julian calendar as defined by udunits.
+
+C{'proleptic_gregorian'}:
+
+A Gregorian calendar extended to dates before 1582-10-15. That is, a year
+is a leap year if either (i) it is divisible by 4 but not by 100 or (ii)
+it is divisible by 400.
+
+C{'noleap'} or C{'365_day'}:
+
+Gregorian calendar without leap years, i.e., all years are 365 days long.
+all_leap or 366_day Gregorian calendar with every year being a leap year,
+i.e., all years are 366 days long.
+
+C{'360_day'}:
+
+All years are 360 days divided into 30 day months.
+
+C{'julian'}:
+
+Proleptic Julian calendar, extended to dates after 1582-10-5. A year is a
+leap year if it is divisible by 4.
+
+The C{L{num2date}} and C{L{date2num}} class methods can used to convert datetime
+instances to/from the specified time units using the specified calendar.
+
+The datetime instances returned by C{num2date} are 'real' python datetime
+objects if the date falls in the Gregorian calendar (i.e.
+C{calendar='proleptic_gregorian', 'standard'} or C{'gregorian'} and
+the date is after 1582-10-15). Otherwise, they are 'phony' datetime
+objects which are actually instances of C{L{netcdftime.datetime}}.  This is
+because the python datetime module cannot handle the weird dates in some
+calendars (such as C{'360_day'} and C{'all_leap'}) which don't exist in any real
+world calendar.
+
+
+Example usage:
+
+>>> from netcdftime import utime
+>>> from datetime import  datetime
+>>> cdftime = utime('hours since 0001-01-01 00:00:00')
+>>> date = datetime.now()
+>>> print date
+2006-03-17 16:04:02.561678
+>>>
+>>> t = cdftime.date2num(date)
+>>> print t
+17577328.0672
+>>>
+>>> date = cdftime.num2date(t)
+>>> print date
+2006-03-17 16:04:02
+>>>
+
+The resolution of the transformation operation is 1 second.
+
+Warning:  Dates between 1582-10-5 and 1582-10-15 do not exist in the
+C{'standard'} or C{'gregorian'} calendars.  An exception will be raised if you pass
+a 'datetime-like' object in that range to the C{L{date2num}} class method.
+
+Words of Wisdom from the British MetOffice concerning reference dates:
+
+"udunits implements the mixed Gregorian/Julian calendar system, as
+followed in England, in which dates prior to 1582-10-15 are assumed to use
+the Julian calendar. Other software cannot be relied upon to handle the
+change of calendar in the same way, so for robustness it is recommended
+that the reference date be later than 1582. If earlier dates must be used,
+it should be noted that udunits treats 0 AD as identical to 1 AD."
+
+ at ivar origin: datetime instance defining the origin of the netCDF time variable.
+ at ivar calendar:  the calendar used (as specified by the C{calendar} keyword).
+ at ivar unit_string:  a string defining the the netCDF time variable.
+ at ivar units:  the units part of C{unit_string} (i.e. 'days', 'hours', 'seconds').
+    """
+
+    def __init__(self, unit_string, calendar='standard'):
+        """
+ at param unit_string: a string of the form
+C{'time-units since <time-origin>'} defining the time units.
+
+Valid time-units are days, hours, minutes and seconds (the singular forms
+are also accepted). An example unit_string would be C{'hours
+since 0001-01-01 00:00:00'}.
+
+ at keyword calendar: describes the calendar used in the time calculations.
+All the values currently defined in the U{CF metadata convention
+<http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.1/cf-conventions.html#time-coordinate>}
+are accepted. The default is C{'standard'}, which corresponds to the mixed
+Gregorian/Julian calendar used by the C{udunits library}. Valid calendars
+are:
+ - C{'gregorian'} or C{'standard'} (default):
+ Mixed Gregorian/Julian calendar as defined by udunits.
+ - C{'proleptic_gregorian'}:
+ A Gregorian calendar extended to dates before 1582-10-15. That is, a year
+ is a leap year if either (i) it is divisible by 4 but not by 100 or (ii)
+ it is divisible by 400.
+ - C{'noleap'} or C{'365_day'}:
+ Gregorian calendar without leap years, i.e., all years are 365 days long.
+ - C{'all_leap'} or C{'366_day'}:
+ Gregorian calendar with every year being a leap year, i.e.,
+ all years are 366 days long.
+ -C{'360_day'}:
+ All years are 360 days divided into 30 day months.
+ -C{'julian'}:
+ Proleptic Julian calendar, extended to dates after 1582-10-5. A year is a
+ leap year if it is divisible by 4.
+
+ at returns: A class instance which may be used for converting times from netCDF
+units to datetime objects.
+        """
+        if calendar in _calendars:
+            self.calendar = calendar
+        else:
+            raise ValueError(
+                "calendar must be one of %s, got '%s'" % (str(_calendars), calendar))
+        units, tzoffset, self.origin = _dateparse(unit_string)
+        self.tzoffset = tzoffset  # time zone offset in minutes
+        self.units = units
+        self.unit_string = unit_string
+        if self.calendar in ['noleap', '365_day'] and self.origin.month == 2 and self.origin.day == 29:
+            raise ValueError(
+                'cannot specify a leap day as the reference time with the noleap calendar')
+        if self.calendar == '360_day' and self.origin.day > 30:
+            raise ValueError(
+                'there are only 30 days in every month with the 360_day calendar')
+        if self.calendar in ['noleap', '365_day']:
+            self._jd0 = _NoLeapDayFromDate(self.origin)
+        elif self.calendar in ['all_leap', '366_day']:
+            self._jd0 = _AllLeapFromDate(self.origin)
+        elif self.calendar == '360_day':
+            self._jd0 = _360DayFromDate(self.origin)
+        else:
+            self._jd0 = JulianDayFromDate(self.origin, calendar=self.calendar)
+
+    def date2num(self, date):
+        """
+        Returns C{time_value} in units described by L{unit_string}, using
+        the specified L{calendar}, given a 'datetime-like' object.
+
+        The datetime object must represent UTC with no time-zone offset.
+        If there is a time-zone offset implied by L{unit_string}, it will
+        be applied to the returned numeric values.
+
+        Resolution is 1 second.
+
+        If C{calendar = 'standard'} or C{'gregorian'} (indicating
+        that the mixed Julian/Gregorian calendar is to be used), an
+        exception will be raised if the 'datetime-like' object describes
+        a date between 1582-10-5 and 1582-10-15.
+
+        Works for scalars, sequences and numpy arrays.
+        Returns a scalar if input is a scalar, else returns a numpy array.
+        """
+        isscalar = False
+        try:
+            date[0]
+        except:
+            isscalar = True
+        if not isscalar:
+            date = numpy.array(date)
+            shape = date.shape
+        if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+            if isscalar:
+                jdelta = JulianDayFromDate(date, self.calendar) - self._jd0
+            else:
+                jdelta = JulianDayFromDate(
+                    date.flat, self.calendar) - self._jd0
+        elif self.calendar in ['noleap', '365_day']:
+            if isscalar:
+                if date.month == 2 and date.day == 29:
+                    raise ValueError(
+                        'there is no leap day in the noleap calendar')
+                jdelta = _NoLeapDayFromDate(date) - self._jd0
+            else:
+                jdelta = []
+                for d in date.flat:
+                    if d.month == 2 and d.day == 29:
+                        raise ValueError(
+                            'there is no leap day in the noleap calendar')
+                    jdelta.append(_NoLeapDayFromDate(d) - self._jd0)
+        elif self.calendar in ['all_leap', '366_day']:
+            if isscalar:
+                jdelta = _AllLeapFromDate(date) - self._jd0
+            else:
+                jdelta = [_AllLeapFromDate(d) - self._jd0 for d in date.flat]
+        elif self.calendar == '360_day':
+            if isscalar:
+                if date.day > 30:
+                    raise ValueError(
+                        'there are only 30 days in every month with the 360_day calendar')
+                jdelta = _360DayFromDate(date) - self._jd0
+            else:
+                jdelta = []
+                for d in date.flat:
+                    if d.day > 30:
+                        raise ValueError(
+                            'there are only 30 days in every month with the 360_day calendar')
+                    jdelta.append(_360DayFromDate(d) - self._jd0)
+        if not isscalar:
+            jdelta = numpy.array(jdelta)
+        # convert to desired units, add time zone offset.
+        if self.units in ['second', 'seconds']:
+            jdelta = jdelta * 86400. + self.tzoffset * 60.
+        elif self.units in ['minute', 'minutes']:
+            jdelta = jdelta * 1440. + self.tzoffset
+        elif self.units in ['hour', 'hours']:
+            jdelta = jdelta * 24. + self.tzoffset / 60.
+        elif self.units in ['day', 'days']:
+            jdelta = jdelta + self.tzoffset / 1440.
+        if isscalar:
+            return jdelta
+        else:
+            return numpy.reshape(jdelta, shape)
+
+    def num2date(self, time_value):
+        """
+        Return a 'datetime-like' object given a C{time_value} in units
+        described by L{unit_string}, using L{calendar}.
+
+        dates are in UTC with no offset, even if L{unit_string} contains
+        a time zone offset from UTC.
+
+        Resolution is 1 second.
+
+        Works for scalars, sequences and numpy arrays.
+        Returns a scalar if input is a scalar, else returns a numpy array.
+
+        The datetime instances returned by C{num2date} are 'real' python datetime
+        objects if the date falls in the Gregorian calendar (i.e.
+        C{calendar='proleptic_gregorian'}, or C{calendar = 'standard'/'gregorian'} and
+        the date is after 1582-10-15). Otherwise, they are 'phony' datetime
+        objects which are actually instances of netcdftime.datetime.  This is
+        because the python datetime module cannot handle the weird dates in some
+        calendars (such as C{'360_day'} and C{'all_leap'}) which
+        do not exist in any real world calendar.
+        """
+        isscalar = False
+        try:
+            time_value[0]
+        except:
+            isscalar = True
+        ismasked = False
+        if hasattr(time_value, 'mask'):
+            mask = time_value.mask
+            ismasked = True
+        if not isscalar:
+            time_value = numpy.array(time_value, dtype='d')
+            shape = time_value.shape
+        # convert to desired units, remove time zone offset.
+        if self.units in ['second', 'seconds']:
+            jdelta = time_value / 86400. - self.tzoffset / 1440.
+        elif self.units in ['minute', 'minutes']:
+            jdelta = time_value / 1440. - self.tzoffset / 1440.
+        elif self.units in ['hour', 'hours']:
+            jdelta = time_value / 24. - self.tzoffset / 1440.
+        elif self.units in ['day', 'days']:
+            jdelta = time_value - self.tzoffset / 1440.
+        jd = self._jd0 + jdelta
+        if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+            if not isscalar:
+                if ismasked:
+                    date = []
+                    for j, m in zip(jd.flat, mask.flat):
+                        if not m:
+                            date.append(DateFromJulianDay(j, self.calendar))
+                        else:
+                            date.append(None)
+                else:
+                    date = DateFromJulianDay(jd.flat, self.calendar)
+            else:
+                if ismasked and mask.item():
+                    date = None
+                else:
+                    date = DateFromJulianDay(jd, self.calendar)
+        elif self.calendar in ['noleap', '365_day']:
+            if not isscalar:
+                date = [_DateFromNoLeapDay(j) for j in jd.flat]
+            else:
+                date = _DateFromNoLeapDay(jd)
+        elif self.calendar in ['all_leap', '366_day']:
+            if not isscalar:
+                date = [_DateFromAllLeap(j) for j in jd.flat]
+            else:
+                date = _DateFromAllLeap(jd)
+        elif self.calendar == '360_day':
+            if not isscalar:
+                date = [_DateFrom360Day(j) for j in jd.flat]
+            else:
+                date = _DateFrom360Day(jd)
+        if isscalar:
+            return date
+        else:
+            return numpy.reshape(numpy.array(date), shape)
+
+
+def _parse_timezone(tzstring):
+    """Parses ISO 8601 time zone specs into tzinfo offsets
+
+    Adapted from pyiso8601 (http://code.google.com/p/pyiso8601/)
+    """
+    if tzstring == "Z":
+        return 0
+    # This isn't strictly correct, but it's common to encounter dates without
+    # timezones so I'll assume the default (which defaults to UTC).
+    if tzstring is None:
+        return 0
+    m = TIMEZONE_REGEX.match(tzstring)
+    prefix, hours, minutes = m.groups()
+    hours, minutes = int(hours), int(minutes)
+    if prefix == "-":
+        hours = -hours
+        minutes = -minutes
+    return minutes + hours * 60.
+
+
+def _parse_date(datestring):
+    """Parses ISO 8601 dates into datetime objects
+
+    The timezone is parsed from the date string, assuming UTC
+    by default.
+
+    Adapted from pyiso8601 (http://code.google.com/p/pyiso8601/)
+    """
+    if not isinstance(datestring, str) and not isinstance(datestring, unicode):
+        raise ValueError("Expecting a string %r" % datestring)
+    m = ISO8601_REGEX.match(datestring.strip())
+    if not m:
+        raise ValueError("Unable to parse date string %r" % datestring)
+    groups = m.groupdict()
+    tzoffset_mins = _parse_timezone(groups["timezone"])
+    if groups["hour"] is None:
+        groups["hour"] = 0
+    if groups["minute"] is None:
+        groups["minute"] = 0
+    if groups["second"] is None:
+        groups["second"] = 0
+    # if groups["fraction"] is None:
+    #    groups["fraction"] = 0
+    # else:
+    #    groups["fraction"] = int(float("0.%s" % groups["fraction"]) * 1e6)
+    return int(groups["year"]), int(groups["month"]), int(groups["day"]),\
+        int(groups["hour"]), int(groups["minute"]), int(groups["second"]),\
+        tzoffset_mins
+
+
+def date2num(dates, units, calendar='standard'):
+    """
+date2num(dates,units,calendar='standard')
+
+Return numeric time values given datetime objects. The units
+of the numeric time values are described by the L{units} argument
+and the L{calendar} keyword. The datetime objects must
+be in UTC with no time-zone offset.  If there is a
+time-zone offset in C{units}, it will be applied to the
+returned numeric values.
+
+Like the matplotlib C{date2num} function, except that it allows
+for different units and calendars.  Behaves the same if
+C{units = 'days since 0001-01-01 00:00:00'} and
+C{calendar = 'proleptic_gregorian'}.
+
+ at param dates: A datetime object or a sequence of datetime objects.
+ The datetime objects should not include a time-zone offset.
+
+ at param units: a string of the form C{'B{time units} since B{reference time}}'
+ describing the time units. B{C{time units}} can be days, hours, minutes
+ or seconds.  B{C{reference time}} is the time origin. A valid choice
+ would be units=C{'hours since 1800-01-01 00:00:00 -6:00'}.
+
+ at param calendar: describes the calendar used in the time calculations.
+ All the values currently defined in the U{CF metadata convention
+ <http://cf-pcmdi.llnl.gov/documents/cf-conventions/>} are supported.
+ Valid calendars C{'standard', 'gregorian', 'proleptic_gregorian'
+ 'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'}.
+ Default is C{'standard'}, which is a mixed Julian/Gregorian calendar.
+
+ at return: a numeric time value, or an array of numeric time values.
+
+The maximum resolution of the numeric time values is 1 second.
+    """
+    cdftime = utime(units, calendar=calendar)
+    return cdftime.date2num(dates)
+
+
+def num2date(times, units, calendar='standard'):
+    """
+num2date(times,units,calendar='standard')
+
+Return datetime objects given numeric time values. The units
+of the numeric time values are described by the C{units} argument
+and the C{calendar} keyword. The returned datetime objects represent
+UTC with no time-zone offset, even if the specified
+C{units} contain a time-zone offset.
+
+Like the matplotlib C{num2date} function, except that it allows
+for different units and calendars.  Behaves the same if
+C{units = 'days since 001-01-01 00:00:00'} and
+C{calendar = 'proleptic_gregorian'}.
+
+ at param times: numeric time values. Maximum resolution is 1 second.
+
+ at param units: a string of the form C{'B{time units} since B{reference time}}'
+describing the time units. B{C{time units}} can be days, hours, minutes
+or seconds.  B{C{reference time}} is the time origin. A valid choice
+would be units=C{'hours since 1800-01-01 00:00:00 -6:00'}.
+
+ at param calendar: describes the calendar used in the time calculations.
+All the values currently defined in the U{CF metadata convention
+<http://cf-pcmdi.llnl.gov/documents/cf-conventions/>} are supported.
+Valid calendars C{'standard', 'gregorian', 'proleptic_gregorian'
+'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'}.
+Default is C{'standard'}, which is a mixed Julian/Gregorian calendar.
+
+ at return: a datetime instance, or an array of datetime instances.
+
+The datetime instances returned are 'real' python datetime
+objects if the date falls in the Gregorian calendar (i.e.
+C{calendar='proleptic_gregorian'}, or C{calendar = 'standard'} or C{'gregorian'}
+and the date is after 1582-10-15). Otherwise, they are 'phony' datetime
+objects which support some but not all the methods of 'real' python
+datetime objects.  This is because the python datetime module cannot
+the uses the C{'proleptic_gregorian'} calendar, even before the switch
+occured from the Julian calendar in 1582. The datetime instances
+do not contain a time-zone offset, even if the specified C{units}
+contains one.
+    """
+    cdftime = utime(units, calendar=calendar)
+    return cdftime.num2date(times)
+
+
+def _check_index(indices, times, nctime, calendar, select):
+    """Return True if the time indices given correspond to the given times,
+    False otherwise.
+
+    Parameters:
+
+    indices : sequence of integers
+    Positive integers indexing the time variable.
+
+    times : sequence of times.
+    Reference times.
+
+    nctime : netCDF Variable object
+    NetCDF time object.
+
+    calendar : string
+    Calendar of nctime.
+
+    select : string
+    Index selection method.
+    """
+    N = nctime.shape[0]
+    if (indices < 0).any():
+        return False
+
+    if (indices >= N).any():
+        return False
+
+    try:
+        t = nctime[indices]
+        nctime = nctime
+    # WORKAROUND TO CHANGES IN SLICING BEHAVIOUR in 1.1.2
+    # this may be unacceptably slow...
+    # if indices are unsorted, or there are duplicate
+    # values in indices, read entire time variable into numpy
+    # array so numpy slicing rules can be used.
+    except IndexError:
+        nctime = nctime[:]
+        t = nctime[indices]
+# if fancy indexing not available, fall back on this.
+#   t=[]
+#   for ind in indices:
+#       t.append(nctime[ind])
+
+    if select == 'exact':
+        return numpy.all(t == times)
+
+    elif select == 'before':
+        ta = nctime[numpy.clip(indices + 1, 0, N - 1)]
+        return numpy.all(t <= times) and numpy.all(ta > times)
+
+    elif select == 'after':
+        tb = nctime[numpy.clip(indices - 1, 0, N - 1)]
+        return numpy.all(t >= times) and numpy.all(tb < times)
+
+    elif select == 'nearest':
+        ta = nctime[numpy.clip(indices + 1, 0, N - 1)]
+        tb = nctime[numpy.clip(indices - 1, 0, N - 1)]
+        delta_after = ta - t
+        delta_before = t - tb
+        delta_check = numpy.abs(times - t)
+        return numpy.all(delta_check <= delta_after) and numpy.all(delta_check <= delta_before)
+
+
+def date2index(dates, nctime, calendar=None, select='exact'):
+    """
+    date2index(dates, nctime, calendar=None, select='exact')
+
+    Return indices of a netCDF time variable corresponding to the given dates.
+
+    @param dates: A datetime object or a sequence of datetime objects.
+    The datetime objects should not include a time-zone offset.
+
+    @param nctime: A netCDF time variable object. The nctime object must have a
+    C{units} attribute. The entries are assumed to be stored in increasing
+    order.
+
+    @param calendar: Describes the calendar used in the time calculation.
+    Valid calendars C{'standard', 'gregorian', 'proleptic_gregorian'
+    'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'}.
+    Default is C{'standard'}, which is a mixed Julian/Gregorian calendar
+    If C{calendar} is None, its value is given by C{nctime.calendar} or
+    C{standard} if no such attribute exists.
+
+    @param select: C{'exact', 'before', 'after', 'nearest'}
+    The index selection method. C{exact} will return the indices perfectly
+    matching the dates given. C{before} and C{after} will return the indices
+    corresponding to the dates just before or just after the given dates if
+    an exact match cannot be found. C{nearest} will return the indices that
+    correpond to the closest dates.
+    """
+    # Setting the calendar.
+    if calendar == None:
+        calendar = getattr(nctime, 'calendar', 'standard')
+    times = date2num(dates, nctime.units, calendar=calendar)
+    return time2index(times, nctime, calendar=calendar, select=select)
+
+
+def time2index(times, nctime, calendar=None, select='exact'):
+    """
+    time2index(times, nctime, calendar=None, select='exact')
+
+    Return indices of a netCDF time variable corresponding to the given times.
+
+    @param times: A numeric time or a sequence of numeric times.
+
+    @param nctime: A netCDF time variable object. The nctime object must have a
+    C{units} attribute. The entries are assumed to be stored in increasing
+    order.
+
+    @param calendar: Describes the calendar used in the time calculation.
+    Valid calendars C{'standard', 'gregorian', 'proleptic_gregorian'
+    'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'}.
+    Default is C{'standard'}, which is a mixed Julian/Gregorian calendar
+    If C{calendar} is None, its value is given by C{nctime.calendar} or
+    C{standard} if no such attribute exists.
+
+    @param select: C{'exact', 'before', 'after', 'nearest'}
+    The index selection method. C{exact} will return the indices perfectly
+    matching the times given. C{before} and C{after} will return the indices
+    corresponding to the times just before or just after the given times if
+    an exact match cannot be found. C{nearest} will return the indices that
+    correpond to the closest times.
+    """
+    # Setting the calendar.
+    if calendar == None:
+        calendar = getattr(nctime, 'calendar', 'standard')
+
+    num = numpy.atleast_1d(times)
+    N = len(nctime)
+
+    # Trying to infer the correct index from the starting time and the stride.
+    # This assumes that the times are increasing uniformly.
+    if len(nctime) >= 2:
+        t0, t1 = nctime[:2]
+        dt = t1 - t0
+    else:
+        t0 = nctime[0]
+        dt = 1.
+    if select in ['exact', 'before']:
+        index = numpy.array((num - t0) / dt, int)
+    elif select == 'after':
+        index = numpy.array(numpy.ceil((num - t0) / dt), int)
+    else:
+        index = numpy.array(numpy.around((num - t0) / dt), int)
+
+    # Checking that the index really corresponds to the given time.
+    # If the times do not correspond, then it means that the times
+    # are not increasing uniformly and we try the bisection method.
+    if not _check_index(index, times, nctime, calendar, select):
+
+        # Use the bisection method. Assumes nctime is ordered.
+        import bisect
+        index = numpy.array([bisect.bisect_right(nctime, n) for n in num], int)
+        before = index == 0
+
+        index = numpy.array([bisect.bisect_left(nctime, n) for n in num], int)
+        after = index == N
+
+        if select in ['before', 'exact'] and numpy.any(before):
+            raise ValueError(
+                'Some of the times given are before the first time in `nctime`.')
+
+        if select in ['after', 'exact'] and numpy.any(after):
+            raise ValueError(
+                'Some of the times given are after the last time in `nctime`.')
+
+        # Find the times for which the match is not perfect.
+        # Use list comprehension instead of the simpler `nctime[index]` since
+        # not all time objects support numpy integer indexing (eg dap).
+        index[after] = N - 1
+        ncnum = numpy.squeeze([nctime[i] for i in index])
+        mismatch = numpy.nonzero(ncnum != num)[0]
+
+        if select == 'exact':
+            if len(mismatch) > 0:
+                raise ValueError(
+                    'Some of the times specified were not found in the `nctime` variable.')
+
+        elif select == 'before':
+            index[after] = N
+            index[mismatch] -= 1
+
+        elif select == 'after':
+            pass
+
+        elif select == 'nearest':
+            nearest_to_left = num[mismatch] < numpy.array(
+                [nctime[i - 1] + nctime[i] for i in index[mismatch]]) / 2.
+            index[mismatch] = index[mismatch] - 1 * nearest_to_left
+
+        else:
+            raise ValueError(
+                "%s is not an option for the `select` argument." % select)
+
+        # Correct for indices equal to -1
+        index[before] = 0
+
+    # convert numpy scalars or single element arrays to python ints.
+    return _toscalar(index)
+
+
+def _toscalar(a):
+    if a.shape in [(), (1,)]:
+        return a.item()
+    else:
+        return a
diff --git a/ports/README b/ports/README
new file mode 100644
index 0000000..f92baef
--- /dev/null
+++ b/ports/README
@@ -0,0 +1,14 @@
+* copy this directory to your home directory.
+(cd ..; tar -cvf $HOME/ports.tar ports; cd $HOME; tar -xvf ports.tar; rm ports.tar)
+
+* sudo vi /opt/local/etc/macports/sources.conf, add the line
+file:///Users/<myusername>/ports
+  just *before* the line
+rsync://rsync.macports.org/release/ports [default]
+
+* cd /Users/<myusername>/ports; sudo portindex
+
+* sudo port install py27-netcdf4
+This will install netcdf4-python from svn HEAD. To periodically upgrade, just do
+   - sudo port uninstall py-netcdf4
+   - sudo port install py-netcdf4 (this will re-download and rebuild)
diff --git a/ports/python/py-netcdf4/Portfile b/ports/python/py-netcdf4/Portfile
new file mode 100644
index 0000000..54aef5b
--- /dev/null
+++ b/ports/python/py-netcdf4/Portfile
@@ -0,0 +1,28 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+PortSystem          1.0
+PortGroup           python 1.0
+
+name                py-netcdf4
+version             svnhead
+categories-append   science
+platforms           darwin
+maintainers         openmaintainer
+description         Python interface to the netCDF version 4 library.
+long_description    ${description}
+homepage            http://code.google.com/p/netcdf4-python/
+master_sites        http://netcdf4-python.googlecode.com/files/
+license             MIT
+
+distname            trunk
+
+fetch.type          svn
+svn.url             http://netcdf4-python.googlecode.com/svn/${distname}
+
+depends_lib-append  port:netcdf port:py${python.version}-numpy 
+
+python.default_version 27
+python.versions        26 27
+
+build.env-append USE_NCCONFIG=1
+destroot.env     USE_NCCONFIG=1
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..861a9f5
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,5 @@
+[egg_info]
+tag_build = 
+tag_date = 0
+tag_svn_revision = 0
+
diff --git a/setup.cfg.template b/setup.cfg.template
new file mode 100644
index 0000000..d4f522a
--- /dev/null
+++ b/setup.cfg.template
@@ -0,0 +1,48 @@
+# Rename this file to setup.cfg to set build options.
+# Follow instructions below for editing.
+[options]
+# if true, the nc-config script (installed with netcdf 4.1.2 and higher)
+# will be used to determine the locations of required libraries.
+# Usually, nothing else is needed.
+use_ncconfig=True
+# path to nc-config script (use if not found in unix PATH).
+#ncconfig=/usr/local/bin/nc-config 
+[directories]
+#
+# If nc-config doesn't do the trick, you can specify the locations
+# of the libraries and headers manually below
+#
+# uncomment and set to netCDF install location.
+# Include files should be located in netCDF4_dir/include and
+# the library should be located in netCDF4_dir/lib.
+# If the libraries and include files are installed in separate locations,
+# use netCDF4_libdir and netCDF4_incdir to specify the locations
+# separately.  
+#netCDF4_dir = /usr/local
+# uncomment and set to HDF5 install location.
+# Include files should be located in HDF5_dir/include and
+# the library should be located in HDF5_dir/lib.
+# If the libraries and include files are installed in separate locations,
+# use HDF5_libdir and HDF5_incdir to specify the locations
+# separately.  
+#HDF5_dir = /usr/local
+# if HDF5 was built with szip support as a static lib,
+# uncomment and set to szip lib install location.
+# If the libraries and include files are installed in separate locations,
+# use szip_libdir and szip_incdir.
+#szip_dir = /usr/local
+# if netcdf lib was build statically with HDF4 support,
+# uncomment and set to hdf4 lib (libmfhdf and libdf) nstall location.
+# If the libraries and include files are installed in separate locations,
+# use hdf4_libdir and hdf4_incdir.
+#hdf4_dir = /usr/local
+# if netcdf lib was build statically with HDF4 support,
+# uncomment and set to jpeg lib install location (hdf4 needs jpeg).
+# If the libraries and include files are installed in separate locations,
+# use jpeg_libdir and jpeg_incdir.
+#jpeg_dir = /usr/local
+# if netcdf lib was build statically with OpenDAP support,
+# uncomment and set to curl lib install location.
+# If the libraries and include files are installed in separate locations,
+# use curl_libdir and curl_incdir.
+#curl_dir = /usr/local
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..feff84c
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,374 @@
+import os, sys, subprocess, shutil
+try:
+    from setuptools import setup, Extension
+    setuptools_extra_kwargs = {"install_requires": ["numpy>=1.3"]}
+except ImportError:
+    from distutils.core  import setup, Extension
+    setuptools_extra_kwargs = {}
+from distutils.dist import Distribution
+try:
+    from Cython.Distutils import build_ext
+    has_cython = True
+except ImportError:
+    has_cython = False
+
+if sys.version_info[0] < 3:
+    import ConfigParser as configparser
+    open_kwargs = {}
+else:
+    import configparser
+    open_kwargs = {'encoding':'utf-8'}
+
+def check_hdf5version(hdf5_includedir):
+    try:
+        f = open(os.path.join(hdf5_includedir,'H5pubconf-64.h'),**open_kwargs)
+    except IOError:
+        try:
+            f = open(os.path.join(hdf5_includedir,'H5pubconf-32.h'),**open_kwargs)
+        except IOError:
+            try:
+                f = open(os.path.join(hdf5_includedir,'H5pubconf.h'),**open_kwargs)
+            except IOError:
+                return None
+    hdf5_version = None
+    for line in f:
+        if line.startswith('#define H5_VERSION'):
+            hdf5_version = line.split()[2]
+    return hdf5_version
+
+def check_ifnetcdf4(netcdf4_includedir):
+    try:
+        f = open(os.path.join(netcdf4_includedir,'netcdf.h'),**open_kwargs)
+    except IOError:
+        return False
+    isnetcdf4 = False
+    for line in f:
+        if line.startswith('nc_inq_compound'):
+            isnetcdf4 = True
+    return isnetcdf4
+
+def check_api(inc_dirs):
+    has_rename_grp = False
+    has_nc_inq_path = False
+    has_nc_inq_format_extended = False
+    for d in inc_dirs:
+        try:
+            f = open(os.path.join(d,'netcdf.h'),**open_kwargs)
+        except IOError:
+            continue
+        for line in f:
+            if line.startswith('nc_rename_grp'):
+                has_rename_grp = True
+            if line.startswith('nc_inq_path'):
+                has_nc_inq_path = True
+            if line.startswith('nc_inq_format_extended'):
+                has_nc_inq_format_extended = True
+        break
+    return has_rename_grp, has_nc_inq_path, has_nc_inq_format_extended
+
+def getnetcdfvers(libdirs):
+    """
+    Get the version string for the first netcdf lib found in libdirs.
+    (major.minor.release). If nothing found, return None.
+    """
+
+    import os, re, sys, ctypes
+
+    if sys.platform.startswith('win'):
+        regexp = re.compile('^netcdf.dll$')
+    elif sys.platform.startswith('cygwin'):
+        bindirs = []
+        for d in libdirs:
+            bindirs.append(os.path.dirname(d)+'/bin')
+        regexp = re.compile(r'^cygnetcdf-\d.dll')
+    elif sys.platform.startswith('darwin'):
+        regexp = re.compile(r'^libnetcdf.dylib')
+    else:
+        regexp = re.compile(r'^libnetcdf.so')
+
+
+    if sys.platform.startswith('cygwin'):
+        dirs = bindirs
+    else:
+        dirs = libdirs
+    for d in dirs:
+        try:
+            candidates = [x for x in os.listdir(d) if regexp.match(x)]
+            if len(candidates) != 0:
+                candidates.sort(key=lambda x: len(x))   # Prefer libfoo.so to libfoo.so.X.Y.Z
+                path = os.path.abspath(os.path.join(d, candidates[0]))
+            lib = ctypes.cdll.LoadLibrary(path)
+            inq_libvers = lib.nc_inq_libvers
+            inq_libvers.restype = ctypes.c_char_p
+            vers = lib.nc_inq_libvers()
+            return vers.split()[0]
+        except Exception:
+            pass   # We skip invalid entries, because that's what the C compiler does
+
+    return None
+
+HDF5_dir = os.environ.get('HDF5_DIR')
+HDF5_incdir = os.environ.get('HDF5_INCDIR')
+HDF5_libdir = os.environ.get('HDF5_LIBDIR')
+netCDF4_dir = os.environ.get('NETCDF4_DIR')
+netCDF4_incdir = os.environ.get('NETCDF4_INCDIR')
+netCDF4_libdir = os.environ.get('NETCDF4_LIBDIR')
+szip_dir = os.environ.get('SZIP_DIR')
+szip_libdir = os.environ.get('SZIP_LIBDIR')
+szip_incdir = os.environ.get('SZIP_INCDIR')
+hdf4_dir = os.environ.get('HDF4_DIR')
+hdf4_libdir = os.environ.get('HDF4_LIBDIR')
+hdf4_incdir = os.environ.get('HDF4_INCDIR')
+jpeg_dir = os.environ.get('JPEG_DIR')
+jpeg_libdir = os.environ.get('JPEG_LIBDIR')
+jpeg_incdir = os.environ.get('JPEG_INCDIR')
+curl_dir = os.environ.get('CURL_DIR')
+curl_libdir = os.environ.get('CURL_LIBDIR')
+curl_incdir = os.environ.get('CURL_INCDIR')
+
+USE_NCCONFIG = os.environ.get('USE_NCCONFIG')
+
+setup_cfg = 'setup.cfg'
+# contents of setup.cfg will override env vars.
+ncconfig = None
+if os.path.exists(setup_cfg):
+    sys.stdout.write('reading from setup.cfg...\n')
+    config = configparser.SafeConfigParser()
+    config.read(setup_cfg)
+    try: HDF5_dir = config.get("directories", "HDF5_dir")
+    except: pass
+    try: HDF5_libdir = config.get("directories", "HDF5_libdir")
+    except: pass
+    try: HDF5_incdir = config.get("directories", "HDF5_incdir")
+    except: pass
+    try: netCDF4_dir = config.get("directories", "netCDF4_dir")
+    except: pass
+    try: netCDF4_libdir = config.get("directories", "netCDF4_libdir")
+    except: pass
+    try: netCDF4_incdir = config.get("directories", "netCDF4_incdir")
+    except: pass
+    try: szip_dir = config.get("directories", "szip_dir")
+    except: pass
+    try: szip_libdir = config.get("directories", "szip_libdir")
+    except: pass
+    try: szip_incdir = config.get("directories", "szip_incdir")
+    except: pass
+    try: hdf4_dir = config.get("directories", "hdf4_dir")
+    except: pass
+    try: hdf4_libdir = config.get("directories", "hdf4_libdir")
+    except: pass
+    try: hdf4_incdir = config.get("directories", "hdf4_incdir")
+    except: pass
+    try: jpeg_dir = config.get("directories", "jpeg_dir")
+    except: pass
+    try: jpeg_libdir = config.get("directories", "jpeg_libdir")
+    except: pass
+    try: jpeg_incdir = config.get("directories", "jpeg_incdir")
+    except: pass
+    try: curl_dir = config.get("directories", "curl_dir")
+    except: pass
+    try: curl_libdir = config.get("directories", "curl_libdir")
+    except: pass
+    try: curl_incdir = config.get("directories", "curl_incdir")
+    except: pass
+    try: USE_NCCONFIG = config.get("options", "use_ncconfig")
+    except: pass
+    try: ncconfig = config.get("options", "ncconfig")
+    except: pass
+
+# if USE_NCCONFIG set, and nc-config works, use it.
+if USE_NCCONFIG is not None:
+    # if NETCDF4_DIR env var is set, look for nc-config in NETCDF4_DIR/bin.
+    if ncconfig is None:
+        if netCDF4_dir is not None:
+            ncconfig = os.path.join(netCDF4_dir,'bin/nc-config')
+        else: # otherwise, just hope it's in the users PATH.
+            ncconfig = 'nc-config'
+    retcode =  subprocess.call([ncconfig,'--libs'],stdout=subprocess.PIPE)
+else:
+    retcode = 1
+
+if not retcode:
+    sys.stdout.write('using nc-config ...\n')
+    dep=subprocess.Popen([ncconfig,'--libs'],stdout=subprocess.PIPE).communicate()[0]
+    libs = [str(l[2:].decode()) for l in dep.split() if l[0:2].decode() == '-l' ]
+    lib_dirs = [str(l[2:].decode()) for l in dep.split() if l[0:2].decode() == '-L' ]
+    dep=subprocess.Popen([ncconfig,'--cflags'],stdout=subprocess.PIPE).communicate()[0]
+    inc_dirs = [str(i[2:].decode()) for i in dep.split() if i[0:2].decode() == '-I']
+# if nc-config didn't work (it won't on windows), fall back on brute force method
+else:
+    dirstosearch =  [os.path.expanduser('~'),'/usr/local','/sw','/opt','/opt/local', '/usr']
+
+    if HDF5_incdir is None and HDF5_dir is None:
+        sys.stdout.write("""
+HDF5_DIR environment variable not set, checking some standard locations ..\n""")
+        for direc in dirstosearch:
+            sys.stdout.write('checking %s ...\n' % direc)
+            hdf5_version = check_hdf5version(os.path.join(direc, 'include'))
+            if hdf5_version is None or hdf5_version[1:6] < '1.8.0':
+                continue
+            else:
+                HDF5_dir = direc
+                HDF5_incdir = os.path.join(direc, 'include')
+                sys.stdout.write('HDF5 found in %s\n' % HDF5_dir)
+                break
+        if HDF5_dir is None:
+            raise ValueError('did not find HDF5 headers')
+    else:
+        if HDF5_incdir is None:
+             HDF5_incdir = os.path.join(HDF5_dir, 'include')
+        hdf5_version = check_hdf5version(HDF5_incdir)
+        if hdf5_version is None:
+            raise ValueError('did not find HDF5 headers in %s' % HDF5_incdir)
+        elif hdf5_version[1:6] < '1.8.0':
+            raise ValueError('HDF5 version >= 1.8.0 is required')
+
+    if netCDF4_incdir is None and netCDF4_dir is None:
+        sys.stdout.write( """
+NETCDF4_DIR environment variable not set, checking standard locations.. \n""")
+        for direc in dirstosearch:
+            sys.stdout.write('checking %s ...\n' % direc)
+            isnetcdf4 = check_ifnetcdf4(os.path.join(direc, 'include'))
+            if not isnetcdf4:
+                continue
+            else:
+                netCDF4_dir = direc
+                netCDF4_incdir = os.path.join(direc, 'include')
+                sys.stdout.write('netCDF4 found in %s\n' % netCDF4_dir)
+                break
+        if netCDF4_dir is None:
+            raise ValueError('did not find netCDF version 4 headers')
+    else:
+        if netCDF4_incdir is None:
+            netCDF4_incdir = os.path.join(netCDF4_dir, 'include')
+        isnetcdf4 = check_ifnetcdf4(netCDF4_incdir)
+        if not isnetcdf4:
+            raise ValueError('did not find netCDF version 4 headers %s' % netCDF4_incdir)
+
+    if HDF5_libdir is None and HDF5_dir is not None:
+        HDF5_libdir = os.path.join(HDF5_dir, 'lib')
+
+    if netCDF4_libdir is None and netCDF4_dir is not None:
+        netCDF4_libdir = os.path.join(netCDF4_dir, 'lib')
+
+    libs = ['netcdf','hdf5_hl','hdf5','z']
+    lib_dirs = [netCDF4_libdir,HDF5_libdir]
+    inc_dirs = [netCDF4_incdir,HDF5_incdir]
+
+    # add szip to link if desired.
+    if szip_libdir is None and szip_dir is not None:
+        szip_libdir = os.path.join(szip_dir, 'lib')
+    if szip_incdir is None and szip_dir is not None:
+        szip_incdir = os.path.join(szip_dir, 'include')
+    if szip_incdir is not None and szip_libdir is not None:
+        libs.append('sz')
+        lib_dirs.append(szip_libdir)
+        inc_dirs.append(szip_incdir)
+    # add hdf4 to link if desired.
+    if hdf4_libdir is None and hdf4_dir is not None:
+        hdf4_libdir = os.path.join(hdf4_dir, 'lib')
+    if hdf4_incdir is None and hdf4_dir is not None:
+        hdf4_incdir = os.path.join(hdf4_dir, 'include')
+    if hdf4_incdir is not None and hdf4_libdir is not None:
+        libs.append('mfhdf')
+        libs.append('df')
+        lib_dirs.append(hdf4_libdir)
+        inc_dirs.append(hdf4_incdir)
+    # add jpeg to link if desired.
+    if jpeg_libdir is None and jpeg_dir is not None:
+        jpeg_libdir = os.path.join(jpeg_dir, 'lib')
+    if jpeg_incdir is None and jpeg_dir is not None:
+        jpeg_incdir = os.path.join(jpeg_dir, 'include')
+    if jpeg_incdir is not None and jpeg_libdir is not None:
+        libs.append('jpeg')
+        lib_dirs.append(jpeg_libdir)
+        inc_dirs.append(jpeg_incdir)
+    # add curl to link if desired.
+    if curl_libdir is None and curl_dir is not None:
+        curl_libdir = os.path.join(curl_dir, 'lib')
+    if curl_incdir is None and curl_dir is not None:
+        curl_incdir = os.path.join(curl_dir, 'include')
+    if curl_incdir is not None and curl_libdir is not None:
+        libs.append('curl')
+        lib_dirs.append(curl_libdir)
+        inc_dirs.append(curl_incdir)
+
+# Do not require numpy for just querying the package
+# Taken from the h5py setup file.
+if any('--' + opt in sys.argv for opt in Distribution.display_option_names +
+       ['help-commands', 'help']) or sys.argv[1] == 'egg_info':
+    pass
+else:
+    # append numpy include dir.
+    import numpy
+    inc_dirs.append(numpy.get_include())
+
+# get netcdf library version.
+netcdf_lib_version = getnetcdfvers(lib_dirs)
+if netcdf_lib_version is None:
+    sys.stdout.write('unable to detect netcdf library version')
+else:
+    sys.stdout.write('using netcdf library version %s\n' % netcdf_lib_version)
+
+if has_cython and 'sdist' not in sys.argv[1:]:
+    sys.stdout.write('using Cython to compile netCDF4.pyx...\n')
+    # recompile netCDF4.pyx
+    extensions = [Extension("netCDF4",["netCDF4.pyx"],libraries=libs,library_dirs=lib_dirs,include_dirs=inc_dirs,runtime_library_dirs=lib_dirs),
+                  Extension('netcdftime._datetime', ['netcdftime/_datetime.pyx'])]
+    # remove netCDF4.c file if it exists, so cython will recompile netCDF4.pyx.
+    # run for build *and* install (issue #263). Otherwise 'pip install' will
+    # not regenerate netCDF4.c, even if the C lib supports the new features.
+    if len(sys.argv) >= 2 and os.path.exists('netCDF4.c'):
+        os.remove('netCDF4.c')
+    # this determines whether renameGroup and filepath methods will work.
+    has_rename_grp, has_nc_inq_path, has_nc_inq_format_extended = check_api(inc_dirs)
+    f = open('constants.pyx','w')
+    if has_rename_grp:
+        sys.stdout.write('netcdf lib has group rename capability\n')
+        f.write('DEF HAS_RENAME_GRP = 1\n')
+    else:
+        sys.stdout.write('netcdf lib does not have group rename capability\n')
+        f.write('DEF HAS_RENAME_GRP = 0\n')
+    if has_nc_inq_path:
+        sys.stdout.write('netcdf lib has nc_inq_path function\n')
+        f.write('DEF HAS_NC_INQ_PATH = 1\n')
+    else:
+        sys.stdout.write('netcdf lib does not have nc_inq_path function\n')
+        f.write('DEF HAS_NC_INQ_PATH = 0\n')
+    if has_nc_inq_format_extended:
+        sys.stdout.write('netcdf lib has nc_inq_format_extended function\n')
+        f.write('DEF HAS_NC_INQ_FORMAT_EXTENDED = 1\n')
+    else:
+        sys.stdout.write('netcdf lib does not have nc_inq_format_extended function\n')
+        f.write('DEF HAS_NC_INQ_FORMAT_EXTENDED = 0\n')
+    f.close()
+    cmdclass = {'build_ext': build_ext}
+else:
+    # use existing netCDF4.c, don't need cython.
+    extensions = [Extension("netCDF4",["netCDF4.c"],libraries=libs,library_dirs=lib_dirs,include_dirs=inc_dirs,runtime_library_dirs=lib_dirs),
+                  Extension('netcdftime._datetime', ['netcdftime/_datetime.c'])]
+    cmdclass = {}
+
+setup(name = "netCDF4",
+  cmdclass = cmdclass,
+  version = "1.1.4.1",
+  long_description = "netCDF version 4 has many features not found in earlier versions of the library, such as hierarchical groups, zlib compression, multiple unlimited dimensions, and new data types.  It is implemented on top of HDF5.  This module implements most of the new features, and can read and write netCDF files compatible with older versions of the library.  The API is modelled after Scientific.IO.NetCDF, and should be familiar to users of that module.\n\nThis project has a `Sub [...]
+  author            = "Jeff Whitaker",
+  author_email      = "jeffrey.s.whitaker at noaa.gov",
+  url               = "http://github.com/Unidata/netcdf4-python",
+  download_url      = "http://python.org/pypi/netCDF4",
+  scripts           = ['utils/nc3tonc4','utils/nc4tonc3','utils/ncinfo'],
+  platforms         = ["any"],
+  license           = "OSI Approved",
+  description = "Provides an object-oriented python interface to the netCDF version 4 library.",
+  keywords = ['numpy','netcdf','data','science','network','oceanography','meteorology','climate'],
+  classifiers = ["Development Status :: 3 - Alpha",
+                 "Intended Audience :: Science/Research",
+                 "License :: OSI Approved",
+                 "Topic :: Software Development :: Libraries :: Python Modules",
+                 "Topic :: System :: Archiving :: Compression",
+                 "Operating System :: OS Independent"],
+  py_modules = ["netCDF4_utils"],
+  packages = ['netcdftime'],
+  ext_modules = extensions,
+  **setuptools_extra_kwargs)
diff --git a/test/run_all.py b/test/run_all.py
new file mode 100755
index 0000000..8dba27c
--- /dev/null
+++ b/test/run_all.py
@@ -0,0 +1,42 @@
+import glob, os, sys, unittest, netCDF4
+from netCDF4 import getlibversion,__hdf5libversion__,__netcdf4libversion__,__version__
+
+# can also just run
+# python -m unittest discover . 'tst*py'
+
+python3 = sys.version_info[0] > 2
+
+# Find all test files.
+test_files = glob.glob('tst_*.py')
+if python3:
+    test_files.remove('tst_unicode.py')
+    sys.stdout.write('not running tst_unicode.py ...\n')
+else:
+    test_files.remove('tst_unicode3.py')
+    sys.stdout.write('not running tst_unicode3.py ...\n')
+if __netcdf4libversion__ < '4.2.1':
+    test_files.remove('tst_diskless.py')
+    sys.stdout.write('not running tst_diskless.py ...\n')
+
+# Build the test suite from the tests found in the test files.
+testsuite = unittest.TestSuite()
+for f in test_files:
+    m = __import__(os.path.splitext(f)[0])
+    testsuite.addTests(unittest.TestLoader().loadTestsFromModule(m))
+
+# Run the test suite.
+def test(verbosity=1):
+    runner = unittest.TextTestRunner(verbosity=verbosity)
+    runner.run(testsuite)
+
+if __name__ == '__main__':
+    import numpy
+    sys.stdout.write('\n')
+    sys.stdout.write('netcdf4-python version: %s\n' % __version__)
+    sys.stdout.write('HDF5 lib version:       %s\n' % __hdf5libversion__)
+    sys.stdout.write('netcdf lib version:     %s\n' % __netcdf4libversion__)
+    sys.stdout.write('numpy version           %s\n' % numpy.__version__)
+    runner = unittest.TextTestRunner(verbosity=1)
+    result = runner.run(testsuite)
+    if not result.wasSuccessful():
+        sys.exit(1)
diff --git a/test/tst_atts.py b/test/tst_atts.py
new file mode 100644
index 0000000..65005ee
--- /dev/null
+++ b/test/tst_atts.py
@@ -0,0 +1,156 @@
+import math
+import sys
+import unittest
+import os
+import tempfile
+import numpy as NP
+from numpy.random.mtrand import uniform 
+import netCDF4
+
+try:
+    from collections import OrderedDict
+except ImportError: # or else use drop-in substitute
+    from ordereddict import OrderedDict
+
+# test attribute creation.
+FILE_NAME = tempfile.mktemp(".nc")
+VAR_NAME="dummy_var"
+GROUP_NAME = "dummy_group"
+DIM1_NAME="x"
+DIM1_LEN=2
+DIM2_NAME="y"
+DIM2_LEN=3
+DIM3_NAME="z"
+DIM3_LEN=25
+STRATT = 'string attribute'
+EMPTYSTRATT = ''
+INTATT = 1
+FLOATATT = math.pi
+SEQATT = NP.arange(10)
+STRINGSEQATT = ['mary ','had ','a ','little ','lamb']
+ATTDICT = {'stratt':STRATT,'floatatt':FLOATATT,'seqatt':SEQATT,
+           'stringseqatt':''.join(STRINGSEQATT),
+           'emptystratt':EMPTYSTRATT,'intatt':INTATT}
+
+class VariablesTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        f = netCDF4.Dataset(self.file,'w')
+        # try to set a dataset attribute with one of the reserved names.
+        f.setncattr('file_format','netcdf4_format')
+        # test attribute renameing
+        f.stratt_tmp = STRATT
+        f.renameAttribute('stratt_tmp','stratt')
+        f.emptystratt = EMPTYSTRATT
+        f.intatt = INTATT
+        f.floatatt = FLOATATT
+        f.seqatt = SEQATT
+        # sequences of strings converted to a single string.
+        f.stringseqatt = STRINGSEQATT
+        g = f.createGroup(GROUP_NAME)
+        f.createDimension(DIM1_NAME, DIM1_LEN)
+        f.createDimension(DIM2_NAME, DIM2_LEN)
+        f.createDimension(DIM3_NAME, DIM3_LEN)
+        g.createDimension(DIM1_NAME, DIM1_LEN)
+        g.createDimension(DIM2_NAME, DIM2_LEN)
+        g.createDimension(DIM3_NAME, DIM3_LEN)
+        g.stratt_tmp = STRATT
+        g.renameAttribute('stratt_tmp','stratt')
+        g.emptystratt = EMPTYSTRATT
+        g.intatt = INTATT
+        g.floatatt = FLOATATT
+        g.seqatt = SEQATT
+        g.stringseqatt = STRINGSEQATT
+        v = f.createVariable(VAR_NAME, 'f8',(DIM1_NAME,DIM2_NAME,DIM3_NAME))
+        # try to set a variable attribute with one of the reserved names.
+        v.setncattr('ndim','three')
+        v.setncatts({'foo': 1})
+        v.setncatts(OrderedDict(bar=2))
+        v.stratt_tmp = STRATT
+        v.renameAttribute('stratt_tmp','stratt')
+        v.emptystratt = EMPTYSTRATT
+        v.intatt = INTATT
+        v.floatatt = FLOATATT
+        v.seqatt = SEQATT
+        v.stringseqatt = STRINGSEQATT
+        v1 = g.createVariable(VAR_NAME, 'f8',(DIM1_NAME,DIM2_NAME,DIM3_NAME))
+        v1.stratt = STRATT
+        v1.emptystratt = EMPTYSTRATT
+        v1.intatt = INTATT
+        v1.floatatt = FLOATATT
+        v1.seqatt = SEQATT
+        v1.stringseqatt = STRINGSEQATT
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def runTest(self):
+        """testing attributes"""
+        f  = netCDF4.Dataset(self.file, 'r')
+        v = f.variables[VAR_NAME]
+        g = f.groups[GROUP_NAME]
+        v1 = g.variables[VAR_NAME]
+        # check attributes in root group.
+        # global attributes.
+        # check __dict__ method for accessing all netCDF attributes.
+        for key,val in ATTDICT.items():
+            if type(val) == NP.ndarray:
+                assert f.__dict__[key].tolist() == val.tolist()
+            else:
+                assert f.__dict__[key] == val
+        # check accessing individual attributes.
+        assert f.intatt == INTATT
+        assert f.floatatt == FLOATATT
+        assert f.stratt == STRATT
+        assert f.emptystratt == EMPTYSTRATT
+        assert f.seqatt.tolist() == SEQATT.tolist()
+        assert f.stringseqatt == ''.join(STRINGSEQATT)
+        assert f.getncattr('file_format') == 'netcdf4_format'
+        # variable attributes.
+        # check __dict__ method for accessing all netCDF attributes.
+        for key,val in ATTDICT.items():
+            if type(val) == NP.ndarray:
+                assert v.__dict__[key].tolist() == val.tolist()
+            else:
+                assert v.__dict__[key] == val
+        # check accessing individual attributes.
+        assert v.intatt == INTATT
+        assert v.floatatt == FLOATATT
+        assert v.stratt == STRATT
+        assert v.seqatt.tolist() == SEQATT.tolist()
+        assert v.stringseqatt == ''.join(STRINGSEQATT)
+        assert v.getncattr('ndim') == 'three'
+        assert v.getncattr('foo') == 1
+        assert v.getncattr('bar') == 2
+        # check attributes in subgroup.
+        # global attributes.
+        for key,val in ATTDICT.items():
+            if type(val) == NP.ndarray:
+                assert g.__dict__[key].tolist() == val.tolist()
+            else:
+                assert g.__dict__[key] == val
+        assert g.intatt == INTATT
+        assert g.floatatt == FLOATATT
+        assert g.stratt == STRATT
+        assert g.emptystratt == EMPTYSTRATT
+        assert g.seqatt.tolist() == SEQATT.tolist()
+        assert g.stringseqatt == ''.join(STRINGSEQATT)
+        for key,val in ATTDICT.items():
+            if type(val) == NP.ndarray:
+                assert v1.__dict__[key].tolist() == val.tolist()
+            else:
+                assert v1.__dict__[key] == val
+        assert v1.intatt == INTATT
+        assert v1.floatatt == FLOATATT
+        assert v1.stratt == STRATT
+        assert v1.emptystratt == EMPTYSTRATT
+        assert v1.seqatt.tolist() == SEQATT.tolist()
+        assert v1.stringseqatt == ''.join(STRINGSEQATT)
+        assert getattr(v1,'nonexistantatt',None) == None
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_compound_alignment.py b/test/tst_compound_alignment.py
new file mode 100644
index 0000000..5990053
--- /dev/null
+++ b/test/tst_compound_alignment.py
@@ -0,0 +1,111 @@
+""" This illustrates a bug when a structured array is extracted from a netCDF4.Variable using the slicing operation. 
+
+Bug is observed with EPD 7.3-1 and 7.3-2 (64-bit)
+"""
+import netCDF4, numpy, tempfile, sys, os, unittest
+from numpy.testing import assert_array_equal, assert_array_almost_equal
+
+def string_to_bytes(xstring, size=-1, pad="\0"):
+    nbytes = len(xstring)
+    if (size >= 0):
+        xsize = size
+    else:
+        xsize = nbytes
+    xbytes = numpy.empty(xsize, dtype=numpy.uint8)
+    xbytes[:] = ord(pad)
+    if (nbytes > xsize):
+        nbytes = xsize
+    for i in range(nbytes):
+        xbytes[i] = ord(xstring[i])
+    return xbytes
+
+cells     = numpy.array([ (387, 289, 65.64321899414062, -167.90093994140625, 3555, -10158, 8934, -16608, 19, 34199, 2, 0, 218, 619, 534, 314, 234, 65528, 39, 1524, 2429, 3137, 2795, 3092, 6431, 12949, 6780, 18099, 8248, 9331, 972, 553, 721, 2874, 2488, 3087, 3072, 2537, 3295, 334, 334, 9888, 10552, 7175, 6981, 7250, 8133, 14349, 16565, 17097, 20945, 13, 5, 6, 15, 15, 15, 15, 0, 10, 5, 7, 8, 4, 5, 3, 7, 0, 0, 10, 11, 15, 7, 14, 4, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6,  [...]
+        (387, 290, 65.64067077636719, -167.93258666992188, 3546, -10161, 8934, -16611, 13, 34165, 1, 0, 215, 582, 534, 317, 204, 65528, 34, 1533, 2428, 3161, 2803, 3107, 6336, 12721, 6670, 17775, 7973, 8770, 933, 554, 714, 2904, 2480, 3102, 3087, 2560, 3323, 359, 359, 9934, 10585, 7235, 7007, 7315, 8209, 14421, 16538, 17046, 20924, 13, 6, 6, 15, 15, 15, 15, 0, 10, 5, 7, 8, 4, 5, 3, 7, 0, 0, 11, 11, 15, 6, 15, 3, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 0, 6, 0, 122 [...]
+        (388, 287, 65.65902709960938, -167.84213256835938, 3574, -10167, 8936, -16602, 15, 34269, 1, 0, 213, 626, 521, 313, 230, 64, 35, 1519, 2391, 3091, 2719, 3011, 6313, 12685, 6657, 17785, 8169, 9420, 960, 541, 705, 2881, 2488, 3084, 3065, 2500, 3328, 357, 357, 10023, 10578, 7250, 6986, 7285, 8149, 14469, 16671, 17188, 20849, 13, 4, 6, 15, 15, 15, 15, 0, 10, 5, 7, 8, 4, 5, 3, 7, 0, 0, 11, 12, 15, 6, 15, 4, 4, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 3, 6, 0, 12241 [...]
+        (388, 288, 65.65646362304688, -167.8740692138672, 3565, -10171, 8936, -16605, 17, 34234, 1, 0, 214, 618, 523, 310, 226, 70, 36, 1528, 2408, 3107, 2751, 3026, 6320, 12708, 6673, 17824, 8138, 9309, 960, 541, 712, 2881, 2496, 3084, 3079, 2477, 3259, 349, 349, 10023, 10528, 7281, 7011, 7285, 8149, 14416, 16503, 17057, 20928, 13, 5, 6, 15, 15, 15, 15, 0, 10, 5, 7, 8, 4, 5, 3, 7, 0, 0, 11, 12, 15, 6, 13, 4, 4, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 3, 6, 0, 12239, [...]
+        (388, 289, 65.65390014648438, -167.9058380126953, 3555, -10174, 8935, -16608, 15, 34200, 2, 0, 212, 582, 526, 307, 208, 60, 40, 1519, 2408, 3107, 2751, 3042, 6226, 12504, 6548, 17477, 7880, 8732, 929, 541, 689, 2911, 2496, 3129, 3094, 2500, 3300, 342, 342, 10001, 10595, 7413, 7086, 7396, 8292, 14486, 16601, 16949, 21066, 13, 6, 6, 15, 15, 15, 15, 0, 10, 5, 7, 8, 4, 5, 3, 7, 0, 0, 11, 12, 15, 5, 13, 3, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 3, 6, 0, 12272, [...]
+        (388, 290, 65.6513442993164, -167.9374542236328, 3546, -10177, 8935, -16611, 6, 34166, 2, 0, 213, 568, 531, 315, 198, 64, 34, 1537, 2424, 3147, 2782, 3081, 6242, 12534, 6571, 17524, 7833, 8550, 921, 541, 689, 2926, 2496, 3144, 3102, 2546, 3341, 358, 358, 10045, 10629, 7421, 7078, 7448, 8326, 14485, 16572, 16984, 21085, 13, 6, 6, 15, 15, 15, 15, 0, 10, 5, 7, 8, 4, 5, 3, 7, 0, 0, 11, 12, 15, 5, 13, 3, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 3, 6, 0, 12307, 1 [...]
+        (388, 291, 65.6487808227539, -167.96910095214844, 3536, -10180, 8934, -16614, 5, 34131, 1, 0, 218, 586, 538, 321, 211, 74, 40, 1546, 2424, 3171, 2806, 3113, 6368, 12821, 6704, 17895, 8029, 8835, 937, 549, 705, 2926, 2496, 3152, 3117, 2476, 3286, 350, 350, 9978, 10612, 7468, 7128, 7474, 8360, 14547, 16572, 17019, 20766, 13, 5, 6, 15, 15, 15, 15, 0, 10, 5, 7, 8, 4, 5, 3, 7, 0, 0, 11, 12, 15, 5, 13, 3, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 3, 6, 0, 0, 2, 0, [...]
+        (389, 287, 65.66973876953125, -167.84698486328125, 3574, -10183, 8937, -16603, 8, 34270, 2, 0, 211, 598, 526, 304, 206, 65528, 35, 1516, 2378, 3069, 2697, 2984, 6168, 12394, 6515, 17382, 7931, 9011, 935, 530, 694, 2923, 2495, 3147, 3106, 2530, 3413, 334, 334, 9999, 10723, 7479, 7160, 7494, 8378, 14631, 16670, 17111, 21141, 12, 6, 6, 15, 15, 15, 15, 0, 10, 5, 7, 8, 4, 6, 3, 7, 0, 0, 11, 13, 15, 6, 11, 3, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 3, 0, 6, 0, 1232 [...]
+        (389, 288, 65.66716003417969, -167.87890625, 3565, -10186, 8937, -16606, 9, 34235, 2, 0, 212, 602, 528, 309, 218, 65528, 38, 1525, 2387, 3101, 2736, 3016, 6240, 12542, 6585, 17587, 7994, 9050, 943, 530, 701, 2938, 2503, 3170, 3128, 2552, 3371, 333, 333, 9930, 10706, 7533, 7176, 7546, 8412, 14595, 16697, 17010, 20876, 12, 6, 6, 15, 15, 15, 15, 0, 10, 5, 7, 8, 4, 6, 3, 7, 0, 0, 11, 13, 15, 6, 10, 3, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 3, 0, 6, 0, 12360, 164 [...]
+        (389, 289, 65.66458892822266, -167.91065979003906, 3555, -10190, 8936, -16609, 5, 34201, 2, 0, 212, 561, 527, 311, 202, 65528, 34, 1524, 2412, 3117, 2744, 3032, 6137, 12342, 6461, 17241, 7721, 8408, 897, 530, 678, 2967, 2495, 3185, 3158, 2552, 3344, 335, 335, 9953, 10757, 7586, 7219, 7598, 8474, 14622, 16711, 17085, 20855, 12, 7, 6, 15, 15, 15, 15, 0, 10, 5, 7, 8, 4, 6, 3, 7, 0, 0, 12, 13, 15, 6, 11, 3, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 3, 0, 6, 0, 0, 2 [...]
+        (389, 290, 65.6620101928711, -167.94241333007812, 3546, -10193, 8936, -16611, 5, 34166, 2, 0, 213, 558, 533, 315, 190, 65528, 35, 1533, 2420, 3141, 2767, 3071, 6168, 12424, 6500, 17312, 7721, 8360, 905, 530, 678, 2952, 2495, 3177, 3128, 2507, 3371, 334, 334, 9975, 10689, 7517, 7176, 7546, 8426, 14577, 16559, 17109, 21037, 12, 7, 6, 15, 15, 15, 15, 0, 10, 5, 7, 8, 4, 6, 3, 7, 0, 0, 12, 13, 15, 6, 11, 3, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 3, 0, 6, 0, 0, 2, [...]
+        (389, 291, 65.65943145751953, -167.97409057617188, 3536, -10196, 8935, -16614, 5, 34132, 0, 0, 217, 578, 536, 324, 206, 65528, 36, 1542, 2420, 3165, 2799, 3095, 6303, 12683, 6640, 17713, 7924, 8654, 920, 546, 694, 2938, 2495, 3170, 3143, 2530, 3358, 327, 327, 9952, 10672, 7517, 7184, 7539, 8419, 14550, 16627, 17046, 20934, 12, 7, 6, 15, 15, 15, 15, 0, 10, 5, 7, 8, 4, 6, 3, 7, 0, 0, 11, 12, 15, 6, 11, 3, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 3, 0, 6, 0, 0, 3 [...]
+        (389, 292, 65.65685272216797, -168.0056915283203, 3527, -10199, 8934, -16617, 5, 34097, 1, 0, 226, 625, 545, 329, 232, 65528, 56, 1542, 2428, 3189, 2845, 3165, 6580, 13244, 6943, 18555, 8375, 9328, 973, 569, 732, 2952, 2503, 3155, 3106, 2507, 3289, 341, 341, 9861, 10552, 7494, 7176, 7513, 8405, 14460, 16489, 16983, 20873, 11, 5, 6, 15, 15, 15, 15, 0, 10, 5, 7, 8, 4, 6, 3, 7, 0, 0, 10, 11, 15, 6, 10, 3, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 3, 0, 6, 0, 0, 2, [...]
+        (390, 287, 65.66167449951172, -167.85145568847656, 3573, -10045, 8937, -16603, 14, 34267, 1, 0, 213, 624, 529, 315, 216, 68, 44, 1533, 2414, 3105, 2719, 3022, 6294, 12637, 6630, 17704, 8134, 9315, 969, 542, 712, 2888, 2500, 3097, 3042, 2456, 3268, 334, 334, 10122, 10624, 7274, 7110, 7307, 8181, 14498, 16617, 17137, 21090, 13, 6, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 11, 13, 15, 5, 9, 3, 3, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 3, 6, 0, 12243, [...]
+        (390, 288, 65.65919494628906, -167.88340759277344, 3564, -10048, 8936, -16606, 15, 34233, 2, 0, 215, 610, 526, 316, 213, 72, 38, 1533, 2414, 3105, 2735, 3038, 6278, 12621, 6607, 17641, 8055, 9125, 954, 542, 704, 2910, 2506, 3113, 3071, 2501, 3254, 342, 342, 10032, 10624, 7358, 7181, 7353, 8243, 14453, 16522, 17075, 20905, 13, 6, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 11, 13, 15, 5, 8, 3, 3, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 3, 6, 0, 12255, [...]
+        (390, 289, 65.65672302246094, -167.91519165039062, 3554, -10050, 8935, -16608, 10, 34198, 2, 0, 211, 570, 533, 318, 196, 64, 34, 1524, 2414, 3128, 2751, 3038, 6177, 12399, 6491, 17304, 7774, 8523, 914, 542, 688, 2940, 2500, 3143, 3086, 2523, 3310, 335, 335, 10054, 10691, 7456, 7199, 7470, 8347, 14560, 16656, 17000, 20986, 13, 7, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 13, 15, 5, 9, 3, 3, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 3, 6, 0, 12318, [...]
+        (390, 290, 65.65425109863281, -167.9468994140625, 3545, -10053, 8935, -16611, 5, 34164, 2, 0, 213, 572, 538, 319, 196, 64, 41, 1533, 2438, 3160, 2789, 3077, 6231, 12534, 6561, 17477, 7829, 8538, 922, 542, 696, 2933, 2500, 3151, 3086, 2456, 3324, 343, 343, 10054, 10674, 7441, 7199, 7470, 8340, 14533, 16562, 16987, 20985, 13, 7, 6, 15, 15, 15, 15, 0, 9, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 13, 15, 5, 9, 3, 3, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 3, 6, 0, 0, 2, 0,  [...]
+        (390, 291, 65.65176391601562, -167.97862243652344, 3535, -10056, 8934, -16614, 5, 34129, 2, 0, 220, 600, 544, 324, 209, 78, 52, 1532, 2446, 3175, 2821, 3124, 6426, 12898, 6754, 18017, 8110, 8951, 961, 557, 712, 2948, 2500, 3143, 3094, 2456, 3268, 342, 342, 10054, 10624, 7433, 7181, 7490, 8361, 14524, 16615, 17011, 21005, 13, 6, 6, 15, 15, 15, 15, 0, 9, 5, 8, 8, 4, 5, 4, 7, 0, 0, 11, 12, 15, 5, 9, 3, 3, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 3, 6, 0, 0, 2, 0, [...]
+        (391, 286, 65.67485809326172, -167.82440185546875, 3583, -10058, 8938, -16600, 13, 34302, 2, 0, 209, 603, 516, 306, 206, 69, 42, 1500, 2373, 3048, 2663, 2961, 6145, 12346, 6479, 17279, 7924, 9049, 930, 526, 697, 2902, 2500, 3127, 3090, 2513, 3361, 338, 338, 10063, 10809, 7433, 7131, 7427, 8311, 14635, 16809, 17275, 20874, 13, 5, 7, 15, 15, 15, 15, 0, 10, 6, 8, 8, 4, 5, 4, 7, 0, 0, 11, 13, 15, 6, 12, 3, 2, 5, 3, 15, 15, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 6, 6, 0, 12294 [...]
+        (391, 287, 65.67237854003906, -167.8563232421875, 3573, -10061, 8938, -16603, 7, 34268, 2, 0, 212, 608, 525, 309, 220, 66, 42, 1517, 2389, 3080, 2701, 2985, 6200, 12440, 6557, 17474, 7995, 9121, 946, 534, 697, 2932, 2500, 3165, 3113, 2490, 3320, 329, 329, 10085, 10776, 7527, 7186, 7538, 8414, 14652, 16698, 17108, 20833, 13, 5, 7, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 11, 13, 15, 6, 12, 3, 2, 5, 3, 15, 15, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 6, 6, 0, 12350,  [...]
+        (391, 288, 65.66989135742188, -167.8882598876953, 3564, -10064, 8937, -16606, 6, 34233, 2, 0, 213, 598, 528, 311, 225, 77, 39, 1534, 2405, 3111, 2724, 3016, 6239, 12527, 6572, 17545, 7971, 8954, 946, 542, 704, 2955, 2507, 3172, 3128, 2467, 3320, 353, 353, 9952, 10725, 7534, 7241, 7571, 8441, 14617, 16615, 17081, 20772, 13, 5, 7, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 11, 13, 15, 6, 11, 3, 2, 5, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 6, 6, 0, 12369, 1 [...]
+        (391, 289, 65.66740417480469, -167.9201202392578, 3554, -10066, 8936, -16609, 5, 34198, 2, 0, 209, 552, 534, 314, 188, 62, 40, 1525, 2413, 3119, 2740, 3032, 6114, 12267, 6409, 17084, 7635, 8240, 891, 534, 681, 2940, 2500, 3180, 3135, 2536, 3333, 330, 330, 10018, 10775, 7597, 7214, 7610, 8476, 14660, 16683, 17158, 20892, 13, 7, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 13, 15, 6, 12, 3, 2, 5, 3, 15, 15, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 6, 6, 0, 0, 2, 0 [...]
+        (391, 290, 65.66490936279297, -167.951904296875, 3545, -10069, 8936, -16612, 5, 34164, 2, 0, 212, 560, 530, 319, 192, 61, 38, 1525, 2421, 3143, 2763, 3055, 6184, 12425, 6502, 17326, 7729, 8391, 907, 542, 697, 2962, 2500, 3157, 3135, 2490, 3306, 330, 330, 9952, 10758, 7542, 7214, 7564, 8441, 14582, 16669, 17132, 20831, 13, 7, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 13, 15, 5, 12, 3, 2, 5, 3, 15, 15, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 6, 6, 0, 0, 2, 0,  [...]
+        (391, 291, 65.66241455078125, -167.98362731933594, 3535, -10072, 8935, -16615, 5, 34129, 0, 0, 219, 586, 545, 320, 207, 70, 47, 1543, 2438, 3166, 2802, 3110, 6357, 12780, 6697, 17880, 8011, 8788, 938, 557, 704, 2962, 2500, 3172, 3128, 2490, 3319, 353, 353, 10018, 10691, 7542, 7186, 7557, 8441, 14590, 16614, 17131, 20971, 13, 6, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 11, 12, 15, 5, 12, 3, 2, 5, 3, 15, 15, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 6, 6, 0, 0, 3,  [...]
+        (391, 292, 65.65991973876953, -168.01527404785156, 3526, -10075, 8935, -16618, 5, 34095, 0, 0, 228, 635, 548, 330, 234, 91, 63, 1542, 2446, 3198, 2848, 3165, 6639, 13364, 6985, 18685, 8480, 9494, 993, 573, 744, 2947, 2500, 3165, 3113, 2467, 3250, 353, 353, 9929, 10606, 7518, 7204, 7531, 8407, 14461, 16475, 16938, 20849, 13, 4, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 10, 11, 15, 6, 12, 3, 2, 5, 4, 15, 15, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 6, 6, 0, 0, 3, 0 [...]
+        (392, 286, 65.68557739257812, -167.8292694091797, 3583, -10074, 8939, -16601, 6, 34303, 2, 0, 205, 586, 519, 302, 195, 65528, 36, 1511, 2365, 3033, 2638, 2931, 6076, 12187, 6396, 17037, 7800, 8827, 916, 521, 675, 2950, 2505, 3202, 3155, 2456, 3417, 343, 343, 9789, 10958, 7655, 7207, 7655, 8550, 14842, 16863, 17290, 20901, 13, 5, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 13, 15, 5, 11, 2, 2, 6, 3, 15, 15, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 0, 6, 0, 12393 [...]
+        (392, 287, 65.6830825805664, -167.8612823486328, 3573, -10077, 8939, -16604, 5, 34268, 2, 0, 211, 609, 527, 308, 217, 65528, 38, 1519, 2399, 3073, 2700, 2994, 6226, 12518, 6568, 17499, 8037, 9190, 948, 529, 699, 2957, 2497, 3195, 3140, 2525, 3362, 342, 342, 9765, 10857, 7609, 7207, 7635, 8508, 14686, 16766, 17165, 20820, 13, 5, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 11, 13, 15, 5, 12, 2, 3, 6, 3, 15, 15, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 0, 6, 0, 0, 2,  [...]
+        (392, 288, 65.68058013916016, -167.8932342529297, 3564, -10079, 8938, -16606, 5, 34233, 2, 0, 209, 575, 527, 312, 206, 65528, 29, 1528, 2407, 3105, 2716, 3002, 6163, 12369, 6474, 17264, 7808, 8653, 908, 537, 691, 2950, 2497, 3187, 3132, 2502, 3361, 351, 351, 9601, 10724, 7571, 7188, 7596, 8460, 14572, 16655, 17127, 20820, 13, 6, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 13, 15, 5, 12, 2, 3, 6, 3, 15, 15, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 0, 6, 0, 0, 2, [...]
+        (392, 289, 65.6780776977539, -167.92510986328125, 3554, -10082, 8937, -16609, 5, 34198, 2, 0, 208, 538, 531, 314, 182, 65528, 37, 1519, 2415, 3105, 2732, 3017, 6061, 12148, 6357, 16927, 7539, 8101, 885, 529, 675, 2957, 2505, 3195, 3147, 2502, 3334, 352, 352, 9624, 10740, 7609, 7151, 7609, 8487, 14624, 16737, 17089, 20859, 13, 7, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 13, 15, 5, 11, 2, 3, 6, 3, 15, 15, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 0, 6, 0, 0, 2, [...]
+        (392, 290, 65.67557525634766, -167.9569091796875, 3545, -10085, 8937, -16612, 5, 34163, 0, 0, 212, 550, 530, 320, 185, 65528, 43, 1528, 2423, 3136, 2755, 3056, 6147, 12345, 6459, 17225, 7673, 8283, 885, 529, 683, 2965, 2497, 3195, 3147, 2479, 3334, 344, 344, 9600, 10774, 7608, 7179, 7628, 8508, 14659, 16737, 17113, 20818, 13, 6, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 13, 15, 5, 12, 2, 3, 6, 3, 15, 15, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 0, 6, 0, 0, 3, [...]
+        (392, 291, 65.67306518554688, -167.9886474609375, 3535, -10088, 8936, -16615, 5, 34129, 0, 0, 214, 574, 533, 322, 199, 65528, 49, 1527, 2423, 3160, 2786, 3088, 6297, 12668, 6623, 17664, 7910, 8630, 924, 545, 699, 2972, 2505, 3187, 3139, 2525, 3334, 351, 351, 9647, 10757, 7601, 7169, 7622, 8494, 14633, 16709, 17113, 21018, 13, 6, 6, 15, 15, 15, 15, 0, 10, 5, 8, 7, 4, 5, 4, 7, 0, 0, 11, 12, 15, 5, 11, 2, 3, 6, 3, 15, 15, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 0, 6, 0, 0, 3, [...]
+        (392, 292, 65.67056274414062, -168.02029418945312, 3526, -10091, 8936, -16618, 5, 34095, 2, 0, 225, 627, 539, 327, 220, 65528, 56, 1527, 2431, 3176, 2833, 3150, 6604, 13291, 6951, 18566, 8416, 9411, 979, 568, 738, 2965, 2497, 3187, 3139, 2479, 3292, 350, 350, 9624, 10723, 7585, 7197, 7615, 8487, 14606, 16571, 17037, 20836, 13, 4, 6, 15, 15, 15, 15, 0, 10, 5, 7, 7, 4, 5, 4, 7, 0, 0, 10, 11, 15, 5, 12, 2, 3, 6, 3, 15, 15, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 0, 6, 0, 0, 2 [...]
+        (393, 286, 65.6962890625, -167.834228515625, 3583, -10089, 8940, -16601, 5, 34303, 1, 0, 203, 586, 515, 301, 208, 62, 39, 1504, 2362, 3033, 2647, 2933, 6076, 12190, 6396, 17048, 7825, 8887, 931, 518, 673, 2985, 2506, 3242, 3177, 2499, 3353, 341, 341, 10146, 11031, 7764, 7255, 7766, 8653, 14901, 16912, 17203, 21074, 13, 6, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 11, 14, 15, 5, 9, 2, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 6, 6, 0, 0, 2, 0, 0, 0 [...]
+        (393, 287, 65.69377899169922, -167.8662567138672, 3573, -10092, 8939, -16604, 5, 34268, 0, 0, 205, 592, 521, 303, 211, 61, 38, 1503, 2387, 3057, 2671, 2956, 6139, 12323, 6467, 17236, 7873, 8958, 931, 525, 681, 3000, 2499, 3235, 3185, 2476, 3339, 333, 333, 10101, 11014, 7749, 7264, 7779, 8674, 14910, 16840, 17229, 20975, 13, 6, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 11, 14, 15, 5, 10, 2, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 6, 6, 0, 0, 3, 0 [...]
+        (393, 288, 65.6912612915039, -167.89822387695312, 3564, -10095, 8939, -16607, 5, 34233, 0, 0, 204, 542, 529, 304, 189, 59, 35, 1512, 2403, 3081, 2702, 2987, 6013, 12080, 6318, 16828, 7540, 8173, 892, 518, 666, 2978, 2499, 3227, 3163, 2476, 3353, 350, 350, 9966, 10849, 7679, 7236, 7707, 8585, 14724, 16670, 17097, 21013, 13, 7, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 14, 15, 5, 10, 2, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 6, 6, 0, 0, 3, 0, [...]
+        (393, 289, 65.68875122070312, -167.93011474609375, 3554, -10098, 8938, -16610, 5, 34198, 2, 0, 203, 531, 529, 305, 169, 58, 35, 1521, 2403, 3097, 2726, 3003, 6013, 12064, 6310, 16812, 7460, 7990, 876, 525, 658, 2985, 2499, 3227, 3155, 2499, 3339, 343, 343, 9988, 10799, 7664, 7199, 7680, 8564, 14671, 16726, 17136, 21032, 13, 8, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 14, 15, 5, 10, 2, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 6, 6, 0, 0, 2, 0 [...]
+        (393, 290, 65.68623352050781, -167.9619140625, 3545, -10101, 8938, -16613, 5, 34163, 2, 0, 206, 546, 529, 311, 188, 64, 43, 1520, 2411, 3120, 2741, 3050, 6115, 12300, 6436, 17158, 7643, 8228, 900, 533, 673, 2985, 2506, 3227, 3148, 2453, 3339, 342, 342, 10011, 10832, 7679, 7255, 7680, 8585, 14724, 16698, 17162, 20953, 13, 7, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 13, 15, 5, 9, 2, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 6, 6, 0, 0, 2, 0, 0, [...]
+        (393, 291, 65.6837158203125, -167.99365234375, 3535, -10104, 8937, -16616, 5, 34129, 2, 0, 211, 567, 536, 318, 199, 70, 45, 1520, 2420, 3128, 2773, 3074, 6265, 12590, 6585, 17559, 7850, 8530, 923, 549, 689, 3000, 2499, 3242, 3140, 2499, 3325, 342, 342, 9988, 10782, 7664, 7217, 7674, 8557, 14635, 16655, 17083, 20893, 13, 7, 6, 15, 15, 15, 15, 0, 10, 5, 7, 7, 4, 5, 4, 7, 0, 0, 11, 13, 15, 5, 10, 2, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 6, 6, 0, 0, 2, 0, 0, [...]
+        (393, 292, 65.68119812011719, -168.0253143310547, 3526, -10107, 8937, -16619, 5, 34095, 2, 0, 221, 628, 535, 324, 219, 78, 51, 1529, 2419, 3152, 2804, 3128, 6573, 13234, 6930, 18526, 8430, 9490, 986, 557, 728, 3007, 2491, 3242, 3170, 2453, 3339, 357, 357, 9988, 10832, 7702, 7245, 7713, 8605, 14688, 16711, 17161, 20951, 13, 5, 6, 15, 15, 15, 15, 0, 10, 5, 7, 7, 4, 5, 4, 7, 0, 0, 10, 13, 15, 5, 12, 2, 3, 6, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 6, 6, 0, 0, 2, 0, [...]
+        (394, 286, 65.70700073242188, -167.83920288085938, 3583, -10105, 8941, -16601, 5, 34303, 0, 0, 200, 581, 516, 295, 202, 55, 28, 1489, 2346, 3018, 2636, 2906, 6020, 12097, 6352, 16932, 7760, 8872, 929, 517, 685, 3003, 2495, 3255, 3202, 2549, 3444, 330, 330, 10008, 11099, 7876, 7303, 7860, 8761, 14994, 16898, 17317, 20986, 13, 6, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 11, 14, 15, 5, 11, 3, 2, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 15, 28, 28, 6, 6, 6, 3, 6, 0, 0, 3, [...]
+        (394, 287, 65.70447540283203, -167.87124633789062, 3573, -10108, 8940, -16604, 5, 34268, 2, 0, 200, 568, 515, 297, 200, 59, 31, 1497, 2354, 3042, 2651, 2929, 6012, 12065, 6336, 16885, 7681, 8659, 921, 525, 677, 3010, 2503, 3277, 3217, 2548, 3444, 330, 330, 10054, 11082, 7883, 7321, 7873, 8774, 14967, 16911, 17264, 20995, 14, 6, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 11, 13, 15, 5, 9, 3, 2, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 15, 28, 28, 6, 6, 6, 3, 6, 0, 0, 2,  [...]
+        (394, 288, 65.70195007324219, -167.90321350097656, 3564, -10111, 8940, -16607, 5, 34233, 2, 0, 197, 514, 520, 297, 172, 49, 32, 1506, 2370, 3058, 2667, 2937, 5869, 11783, 6161, 16411, 7286, 7798, 866, 517, 646, 3003, 2503, 3247, 3188, 2525, 3389, 339, 339, 9985, 10951, 7791, 7257, 7801, 8692, 14845, 16843, 17250, 20935, 14, 8, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 14, 15, 5, 9, 3, 2, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 15, 28, 28, 6, 6, 6, 3, 6, 0, 0, 2, 0 [...]
+        (394, 289, 65.69942474365234, -167.9351043701172, 3554, -10114, 8939, -16610, 5, 34198, 2, 0, 197, 513, 527, 301, 166, 51, 31, 1506, 2387, 3090, 2683, 2969, 5909, 11854, 6201, 16514, 7310, 7790, 866, 517, 654, 2980, 2495, 3232, 3180, 2525, 3389, 339, 339, 9962, 10918, 7738, 7239, 7748, 8623, 14792, 16720, 17093, 20954, 14, 8, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 14, 15, 5, 11, 3, 2, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 15, 28, 28, 6, 6, 6, 3, 6, 0, 0, 2, 0 [...]
+        (394, 290, 65.6968994140625, -167.96693420410156, 3545, -10117, 8939, -16613, 5, 34164, 2, 0, 204, 538, 529, 306, 185, 61, 37, 1514, 2395, 3105, 2730, 3008, 6067, 12183, 6376, 16988, 7563, 8146, 889, 525, 670, 3003, 2503, 3255, 3202, 2502, 3389, 339, 339, 9939, 10934, 7791, 7266, 7761, 8664, 14792, 16760, 17171, 21051, 13, 7, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 13, 15, 5, 9, 3, 2, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 15, 28, 28, 6, 6, 6, 3, 6, 0, 0, 2, 0, [...]
+        (394, 291, 65.69436645507812, -167.99867248535156, 3535, -10120, 8938, -16616, 5, 34129, 2, 0, 209, 569, 526, 314, 201, 67, 48, 1514, 2395, 3129, 2761, 3055, 6266, 12591, 6582, 17565, 7879, 8635, 921, 540, 693, 3003, 2488, 3255, 3180, 2502, 3375, 338, 338, 9962, 10835, 7745, 7248, 7748, 8643, 14739, 16637, 17145, 20923, 13, 6, 6, 15, 15, 15, 15, 0, 10, 5, 8, 7, 4, 5, 4, 7, 0, 0, 11, 13, 15, 5, 14, 3, 2, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 15, 28, 28, 6, 6, 6, 3, 6, 0, 0, 2,  [...]
+        (394, 292, 65.69184112548828, -168.0303497314453, 3526, -10123, 8938, -16619, 6, 34095, 2, 0, 220, 651, 526, 318, 234, 85, 48, 1505, 2386, 3121, 2785, 3094, 6590, 13265, 6963, 18615, 8567, 9875, 1015, 564, 740, 3010, 2503, 3255, 3188, 2456, 3361, 345, 345, 9870, 10868, 7783, 7302, 7761, 8650, 14739, 16678, 17144, 20990, 13, 4, 6, 15, 15, 15, 15, 0, 10, 5, 8, 7, 4, 5, 4, 7, 0, 0, 10, 12, 15, 5, 9, 3, 2, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 15, 28, 28, 6, 6, 6, 3, 6, 0, 12383,  [...]
+        (395, 287, 65.71517181396484, -167.87623596191406, 3573, -10124, 8941, -16605, 5, 34268, 0, 0, 198, 542, 513, 300, 183, 60, 29, 1496, 2343, 3027, 2635, 2904, 5886, 11824, 6182, 16478, 7447, 8243, 888, 511, 654, 3031, 2498, 3290, 3230, 2519, 3464, 340, 340, 10093, 11046, 7932, 7323, 7919, 8816, 14994, 16941, 17302, 21015, 13, 7, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 13, 15, 5, 10, 3, 2, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 3, 6, 0, 0, 3,  [...]
+        (395, 288, 65.71263885498047, -167.908203125, 3564, -10127, 8941, -16608, 5, 34233, 2, 0, 194, 500, 516, 295, 158, 47, 25, 1496, 2360, 3035, 2643, 2912, 5775, 11590, 6048, 16115, 7146, 7586, 841, 511, 638, 3001, 2498, 3260, 3186, 2519, 3409, 342, 342, 9957, 10878, 7800, 7279, 7815, 8713, 14916, 16818, 17263, 20857, 13, 8, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 13, 13, 15, 5, 10, 3, 3, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 3, 6, 0, 0, 2, 0, 0,  [...]
+        (395, 289, 65.71009826660156, -167.94012451171875, 3554, -10130, 8940, -16611, 6, 34198, 1, 0, 198, 505, 516, 299, 159, 57, 29, 1505, 2368, 3051, 2659, 2936, 5847, 11746, 6127, 16305, 7226, 7673, 849, 511, 646, 2994, 2490, 3229, 3186, 2519, 3422, 349, 349, 9957, 10861, 7762, 7252, 7743, 8645, 14838, 16831, 17237, 20876, 13, 8, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 13, 13, 15, 5, 12, 3, 3, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 3, 6, 0, 0, 2, 0 [...]
+        (395, 290, 65.70755767822266, -167.97195434570312, 3545, -10133, 8940, -16614, 6, 34164, 2, 0, 202, 530, 516, 305, 170, 59, 33, 1487, 2359, 3051, 2690, 2967, 5974, 12003, 6285, 16740, 7471, 8037, 888, 534, 661, 3024, 2498, 3275, 3223, 2474, 3422, 356, 356, 9957, 10928, 7893, 7332, 7847, 8740, 14855, 16776, 17249, 21150, 13, 7, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 12, 15, 5, 10, 3, 2, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 3, 6, 0, 12421,  [...]
+        (395, 291, 65.70501708984375, -168.0037078857422, 3535, -10136, 8939, -16617, 6, 34129, 1, 0, 211, 587, 521, 310, 202, 76, 50, 1495, 2367, 3067, 2738, 3014, 6259, 12580, 6585, 17570, 7971, 8892, 935, 550, 701, 3061, 2505, 3297, 3223, 2541, 3409, 340, 340, 9979, 10894, 7916, 7332, 7873, 8761, 14838, 16775, 17160, 20953, 13, 6, 6, 15, 15, 15, 15, 0, 10, 5, 7, 8, 4, 5, 4, 7, 0, 0, 11, 12, 15, 4, 8, 3, 2, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 3, 6, 0, 0, 2, 0,  [...]
+        (396, 288, 65.72332000732422, -167.9132080078125, 3564, -10143, 8942, -16608, 5, 34233, 2, 0, 193, 492, 506, 293, 149, 65528, 23, 1499, 2334, 3021, 2614, 2881, 5710, 11442, 5980, 15879, 7044, 7474, 823, 504, 637, 3017, 2504, 3268, 3212, 2535, 3451, 347, 347, 10063, 11038, 7836, 7335, 7844, 8742, 14915, 16850, 17220, 20894, 13, 8, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 13, 14, 15, 5, 12, 2, 2, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 0, 6, 0, 0, 2 [...]
+        (396, 289, 65.72077178955078, -167.94512939453125, 3554, -10146, 8941, -16611, 6, 34198, 2, 0, 195, 501, 510, 300, 157, 65528, 28, 1481, 2334, 3013, 2621, 2904, 5781, 11557, 6051, 16093, 7147, 7624, 847, 504, 637, 3017, 2504, 3253, 3205, 2490, 3410, 332, 332, 10017, 10938, 7821, 7291, 7805, 8707, 14853, 16850, 17207, 21072, 13, 8, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 13, 14, 15, 5, 12, 2, 2, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 0, 6, 0, 124 [...]
+        (396, 290, 65.71821594238281, -167.9770050048828, 3545, -10149, 8941, -16614, 9, 34164, 1, 0, 200, 526, 511, 301, 170, 65528, 35, 1480, 2350, 3029, 2645, 2928, 5907, 11842, 6208, 16528, 7384, 7988, 870, 527, 661, 3054, 2504, 3291, 3235, 2490, 3424, 354, 354, 10039, 10988, 7958, 7395, 7902, 8811, 14853, 16836, 17231, 20852, 13, 7, 6, 15, 15, 15, 15, 0, 10, 5, 8, 8, 4, 5, 4, 7, 0, 0, 12, 13, 15, 5, 12, 2, 2, 6, 3, 15, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 6, 6, 6, 0, 6, 0, 0, 2 [...]
+      dtype=[('mxd03_granule_row', '<i2'), ('mxd03_granule_column', '<i2'), ('mxd03_latitude', '<f4'), ('mxd03_longitude', '<f4'), ('mxd03_sensor_zenith', '<i2'), ('mxd03_sensor_azimuth', '<i2'), ('mxd03_solar_zenith', '<i2'), ('mxd03_solar_azimuth', '<i2'), ('mxd03_height', '<i2'), ('mxd03_range', '<u2'), ('mxd03_land_sea_mask', '|u1'), ('mxd03_gflags', '|u1'), ('mxd02_band_1A', '<u2'), ('mxd02_band_2A', '<u2'), ('mxd02_band_3A', '<u2'), ('mxd02_band_4A', '<u2'), ('mxd02_band_5A', '<u2' [...]
+
+FILE_NAME = tempfile.mktemp(".nc")
+
+class CompoundAlignTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        dataset = netCDF4.Dataset(self.file, "w")
+        # Create the netCDF variable for the cell records, store the cell
+        # records in the variable, and give the variable a md5sum
+        # attribute.
+        cell_cmp_dtype = dataset.createCompoundType(cells.dtype,"cell_cmp_dtype")
+        dataset.createDimension("number_cells", cells.size)
+        v_cells = dataset.createVariable("cells",cell_cmp_dtype,"number_cells")
+        v_cells[:] = cells
+        dataset.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def runTest(self):
+        f = netCDF4.Dataset(self.file, 'r')
+        new_cells = f.variables["cells"][:]
+        assert new_cells.shape == cells.shape 
+        assert new_cells.dtype.names == cells.dtype.names
+        for name in cells.dtype.names:
+            assert cells[name].dtype == new_cells[name].dtype
+            assert cells[name].shape == new_cells[name].shape
+            assert_array_equal(cells[name],new_cells[name])
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
+
diff --git a/test/tst_compoundatt.py b/test/tst_compoundatt.py
new file mode 100644
index 0000000..939039d
--- /dev/null
+++ b/test/tst_compoundatt.py
@@ -0,0 +1,76 @@
+import sys
+import unittest
+import os
+import tempfile
+from netCDF4 import Dataset, CompoundType, chartostring, stringtoarr, \
+default_encoding
+import numpy as np
+from numpy.testing import assert_array_equal, assert_array_almost_equal
+
+# test compound attributes.
+
+FILE_NAME = tempfile.mktemp(".nc")
+DIM_NAME = 'time'
+VAR_NAME = 'wind'
+VAR_NAME2 = 'forecast_wind'
+GROUP_NAME = 'forecasts'
+dtype=np.dtype([('speed', 'f4'), ('direction', 'f4')])
+TYPE_NAME = 'wind_vector_type'
+TYPE_NAMEC = 'wind_vectorunits_type'
+dtypec=np.dtype([('speed', 'c',(8,)), ('direction', 'c',(8,))])
+missvals = np.empty(1,dtype)
+missvals['direction']=1.e20
+missvals['speed']=-999.
+windunits = np.zeros(1,dtypec)
+windunits['speed'] = stringtoarr('m/s',\
+        dtypec.fields['speed'][0].itemsize)
+windunits['direction'] = stringtoarr('degrees',\
+        dtypec.fields['direction'][0].itemsize)
+
+class VariablesTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        f  = Dataset(self.file, 'w')
+        d = f.createDimension(DIM_NAME,None)
+        g = f.createGroup(GROUP_NAME)
+        wind_vector_type = f.createCompoundType(dtype, TYPE_NAME)
+        wind_vectorunits_type = f.createCompoundType(dtypec, TYPE_NAMEC)
+        v = f.createVariable(VAR_NAME,wind_vector_type, DIM_NAME)
+        vv = g.createVariable(VAR_NAME2,wind_vector_type,DIM_NAME)
+        v.missing_values = missvals
+        v.units = windunits
+        vv.missing_values = missvals
+        vv.units = windunits
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def runTest(self):
+        """testing compound attributes"""
+        f = Dataset(self.file, 'r')
+        v = f.variables[VAR_NAME]
+        g = f.groups[GROUP_NAME]
+        vv = g.variables[VAR_NAME2]
+        assert_array_almost_equal(v.missing_values['speed'], missvals['speed'])
+        assert_array_almost_equal(v.missing_values['direction'],\
+                missvals['direction'])
+        assert_array_almost_equal(vv.missing_values['speed'], missvals['speed'])
+        assert_array_almost_equal(vv.missing_values['direction'],\
+                missvals['direction'])
+        assert_array_equal(v.units['speed'], windunits['speed'].squeeze())
+        assert_array_equal(v.units['direction'],\
+                windunits['direction'].squeeze())
+        assert_array_equal(vv.units['speed'], windunits['speed'].squeeze())
+        assert_array_equal(vv.units['direction'],\
+                windunits['direction'].squeeze())
+        assert(chartostring(v.units['speed']).item().rstrip().decode(default_encoding) == 'm/s')
+        assert(chartostring(v.units['direction']).item().rstrip().decode(default_encoding) == 'degrees')
+        assert(chartostring(vv.units['speed']).item().rstrip().decode(default_encoding) == 'm/s')
+        assert(chartostring(vv.units['direction']).item().rstrip().decode(default_encoding) == 'degrees')
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_compoundvar.py b/test/tst_compoundvar.py
new file mode 100644
index 0000000..99164a1
--- /dev/null
+++ b/test/tst_compoundvar.py
@@ -0,0 +1,94 @@
+import sys
+import unittest
+import os
+import tempfile
+from netCDF4 import Dataset, CompoundType
+import numpy as np
+from numpy.testing import assert_array_equal, assert_array_almost_equal
+
+
+# test compound data types.
+
+FILE_NAME = tempfile.mktemp(".nc")
+#FILE_NAME = 'test.nc'
+DIM_NAME = 'phony_dim'
+GROUP_NAME = 'phony_group'
+VAR_NAME = 'phony_compound_var'
+TYPE_NAME1 = 'cmp1'
+TYPE_NAME2 = 'cmp2'
+TYPE_NAME3 = 'cmp3'
+TYPE_NAME4 = 'cmp4'
+TYPE_NAME5 = 'cmp5'
+DIM_SIZE=3 
+dtype1=np.dtype([('i', 'i2'), ('j', 'i8')])
+dtype2=np.dtype([('x', 'f4',), ('y', 'f8',(3,2))])
+dtype3=np.dtype([('xx', dtype1), ('yy', dtype2)])
+dtype4=np.dtype([('xxx',dtype3),('yyy','f8', (4,))])
+dtype5=np.dtype([('x1', dtype1), ('y1', dtype2)])
+data = np.zeros(DIM_SIZE,dtype4)
+data['xxx']['xx']['i']=1
+data['xxx']['xx']['j']=2
+data['xxx']['yy']['x']=3
+data['xxx']['yy']['y']=4
+data['yyy'] = 5
+datag = np.zeros(DIM_SIZE,dtype5)
+datag['x1']['i']=10
+datag['x1']['j']=20
+datag['y1']['x']=30
+datag['y1']['y']=40
+
+class VariablesTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        f  = Dataset(self.file, 'w')
+        d = f.createDimension(DIM_NAME,DIM_SIZE)
+        g = f.createGroup(GROUP_NAME)
+        # simple compound types.
+        cmptype1 = f.createCompoundType(dtype1, TYPE_NAME1)
+        cmptype2 = f.createCompoundType(dtype2, TYPE_NAME2)
+        # close and reopen the file to make sure compound
+        # type info read back in correctly.
+        f.close()
+        f = Dataset(self.file,'r+')
+        g = f.groups[GROUP_NAME]
+        # multiply nested compound types
+        cmptype3 = f.createCompoundType(dtype3, TYPE_NAME3)
+        cmptype4 = f.createCompoundType(dtype4, TYPE_NAME4)
+        cmptype5 = f.createCompoundType(dtype5, TYPE_NAME5)
+        v = f.createVariable(VAR_NAME,cmptype4, DIM_NAME)
+        vv = g.createVariable(VAR_NAME,cmptype5, DIM_NAME)
+        v[:] = data
+        vv[:] = datag
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+        #pass
+
+    def runTest(self):
+        """testing compound variables"""
+        f = Dataset(self.file, 'r')
+        v = f.variables[VAR_NAME]
+        g = f.groups[GROUP_NAME]
+        vv = g.variables[VAR_NAME]
+        dataout = v[:]
+        dataoutg = vv[:]
+        assert(list(f.cmptypes.keys()) ==\
+               [TYPE_NAME1,TYPE_NAME2,TYPE_NAME3,TYPE_NAME4,TYPE_NAME5])
+        assert_array_equal(dataout['xxx']['xx']['i'],data['xxx']['xx']['i'])
+        assert_array_equal(dataout['xxx']['xx']['j'],data['xxx']['xx']['j'])
+        assert_array_almost_equal(dataout['xxx']['yy']['x'],data['xxx']['yy']['x'])
+        assert_array_almost_equal(dataout['xxx']['yy']['y'],data['xxx']['yy']['y'])
+        assert_array_almost_equal(dataout['yyy'],data['yyy'])
+        assert_array_equal(dataoutg['x1']['i'],datag['x1']['i'])
+        assert_array_equal(dataoutg['x1']['j'],datag['x1']['j'])
+        assert_array_almost_equal(dataoutg['y1']['x'],datag['y1']['x'])
+        assert_array_almost_equal(dataoutg['y1']['y'],datag['y1']['y'])
+        f.close()
+
+if __name__ == '__main__':
+    from netCDF4 import getlibversion
+    version =  getlibversion().split()[0]
+    unittest.main()
diff --git a/test/tst_compression.py b/test/tst_compression.py
new file mode 100644
index 0000000..7df8225
--- /dev/null
+++ b/test/tst_compression.py
@@ -0,0 +1,116 @@
+from numpy.random.mtrand import uniform
+from netCDF4 import Dataset, _quantize
+from numpy.testing import assert_almost_equal
+import os, tempfile, unittest
+
+ndim = 100000
+ndim2 = 100
+chunk1 = 10; chunk2 = ndim2
+nfiles = 7
+files = [tempfile.mktemp(".nc") for nfile in range(nfiles)]
+array = uniform(size=(ndim,))
+array2 = uniform(size=(ndim,ndim2))
+lsd = 3
+
+def write_netcdf(filename,zlib,least_significant_digit,data,dtype='f8',shuffle=False,contiguous=False,\
+                 chunksizes=None,complevel=6,fletcher32=False):
+    file = Dataset(filename,'w')
+    file.createDimension('n', ndim)
+    foo = file.createVariable('data',\
+            dtype,('n'),zlib=zlib,least_significant_digit=least_significant_digit,\
+            shuffle=shuffle,contiguous=contiguous,complevel=complevel,fletcher32=fletcher32,chunksizes=chunksizes)
+    foo[:] = data
+    file.close()
+    file = Dataset(filename)
+    data = file.variables['data'][:]
+    file.close()
+
+def write_netcdf2(filename,zlib,least_significant_digit,data,dtype='f8',shuffle=False,contiguous=False,\
+                 chunksizes=None,complevel=6,fletcher32=False):
+    file = Dataset(filename,'w')
+    file.createDimension('n', ndim)
+    file.createDimension('n2', ndim2)
+    foo = file.createVariable('data2',\
+            dtype,('n','n2'),zlib=zlib,least_significant_digit=least_significant_digit,\
+            shuffle=shuffle,contiguous=contiguous,complevel=complevel,fletcher32=fletcher32,chunksizes=chunksizes)
+    foo[:] = data
+    file.close()
+    file = Dataset(filename)
+    data = file.variables['data2'][:]
+    file.close()
+
+class CompressionTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.files = files
+        # no compression
+        write_netcdf(self.files[0],False,None,array)
+        # compressed, lossless, no shuffle.
+        write_netcdf(self.files[1],True,None,array)
+        # compressed, lossless, with shuffle.
+        write_netcdf(self.files[2],True,None,array,shuffle=True)
+        # compressed, lossy, no shuffle.
+        write_netcdf(self.files[3],True,lsd,array)
+        # compressed, lossy, with shuffle.
+        write_netcdf(self.files[4],True,lsd,array,shuffle=True)
+        # compressed, lossy, with shuffle and fletcher32 checksum.
+        write_netcdf(self.files[5],True,lsd,array,shuffle=True,fletcher32=True)
+        # 2-d compressed, lossy, with shuffle and fletcher32 checksum and
+        # chunksizes.
+        write_netcdf2(self.files[6],True,lsd,array2,shuffle=True,fletcher32=True,chunksizes=(chunk1,chunk2))
+
+    def tearDown(self):
+        # Remove the temporary files
+        for file in self.files:
+            os.remove(file)
+
+    def runTest(self):
+        """testing zlib and shuffle compression filters"""
+        uncompressed_size = os.stat(self.files[0]).st_size
+        # check compressed data.
+        f = Dataset(self.files[1])
+        size = os.stat(self.files[1]).st_size
+        assert_almost_equal(array,f.variables['data'][:])
+        assert f.variables['data'].filters() == {'zlib':True,'shuffle':False,'complevel':6,'fletcher32':False}
+        assert(size < 0.95*uncompressed_size)
+        f.close()
+        # check compression with shuffle
+        f = Dataset(self.files[2])
+        size = os.stat(self.files[2]).st_size
+        assert_almost_equal(array,f.variables['data'][:])
+        assert f.variables['data'].filters() == {'zlib':True,'shuffle':True,'complevel':6,'fletcher32':False}
+        assert(size < 0.85*uncompressed_size)
+        f.close()
+        # check lossy compression without shuffle
+        f = Dataset(self.files[3])
+        size = os.stat(self.files[3]).st_size
+        checkarray = _quantize(array,lsd)
+        assert_almost_equal(checkarray,f.variables['data'][:])
+        assert(size < 0.27*uncompressed_size)
+        f.close()
+        # check lossy compression with shuffle
+        f = Dataset(self.files[4])
+        size = os.stat(self.files[4]).st_size
+        assert_almost_equal(checkarray,f.variables['data'][:])
+        assert(size < 0.20*uncompressed_size)
+        size_save = size
+        f.close()
+        # check lossy compression with shuffle and fletcher32 checksum.
+        f = Dataset(self.files[5])
+        size = os.stat(self.files[5]).st_size
+        assert_almost_equal(checkarray,f.variables['data'][:])
+        assert f.variables['data'].filters() == {'zlib':True,'shuffle':True,'complevel':6,'fletcher32':True}
+        assert(size < 0.20*uncompressed_size)
+        # should be slightly larger than without fletcher32
+        assert(size > size_save)
+        # check chunksizes
+        f.close()
+        f = Dataset(self.files[6])
+        checkarray2 = _quantize(array2,lsd)
+        assert_almost_equal(checkarray2,f.variables['data2'][:])
+        assert f.variables['data2'].filters() == {'zlib':True,'shuffle':True,'complevel':6,'fletcher32':True}
+        assert f.variables['data2'].chunking() == [chunk1,chunk2]
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_dap.py b/test/tst_dap.py
new file mode 100644
index 0000000..6347d7d
--- /dev/null
+++ b/test/tst_dap.py
@@ -0,0 +1,32 @@
+import unittest
+import netCDF4
+
+# test accessing data over http with opendap.
+
+URL = 'http://test.opendap.org/opendap/hyrax/data/nc/bears.nc'
+firstvarname = 'shot'
+firstvarmin = 2
+firstvarmax = 7
+firstvarshape = (2,3)
+
+class DapTestCase(unittest.TestCase):
+
+    def setUp(self):
+        pass
+
+    def tearDown(self):
+        pass
+
+    def runTest(self):
+        """testing access of data over http using opendap"""
+        ncfile = netCDF4.Dataset(URL)
+        assert firstvarname in ncfile.variables.keys()
+        firstvar = ncfile.variables[firstvarname]
+        assert firstvar.shape == firstvarshape
+        data = firstvar[:]
+        assert data.min() == firstvarmin
+        assert data.max() == firstvarmax
+        ncfile.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_dims.py b/test/tst_dims.py
new file mode 100644
index 0000000..c1aac2c
--- /dev/null
+++ b/test/tst_dims.py
@@ -0,0 +1,119 @@
+import sys
+import unittest
+import os
+import tempfile
+import numpy as NP
+from numpy.random.mtrand import uniform 
+import netCDF4
+
+FILE_NAME = tempfile.mktemp(".nc")
+LAT_NAME="lat"
+LAT_LEN = 25
+LAT_LENG = 50
+LON_NAME="lon"
+LON_LEN = 50  
+LON_LENG = 100
+LEVEL_NAME="level"
+LEVEL_LEN = None
+LEVEL_LENG = None
+TIME_NAME="time"
+TIME_LEN = None
+TIME_LENG = None
+GROUP_NAME='forecasts'
+VAR_NAME='temp'
+VAR_TYPE='f8'
+
+
+class DimensionsTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        f  = netCDF4.Dataset(self.file, 'w')
+        f.createDimension(LAT_NAME,LAT_LEN)
+        f.createDimension(LON_NAME,LON_LEN)
+        f.createDimension(LEVEL_NAME,LEVEL_LEN)
+        f.createDimension(TIME_NAME,TIME_LEN)
+        f.createVariable(VAR_NAME,VAR_TYPE,(LEVEL_NAME, LAT_NAME, LON_NAME, TIME_NAME))
+        g = f.createGroup(GROUP_NAME)
+        g.createDimension(LAT_NAME,LAT_LENG)
+        g.createDimension(LON_NAME,LON_LENG)
+        # should get dimensions from parent group.
+        # (did not work prior to alpha 18)
+        #g.createDimension(LEVEL_NAME,LEVEL_LENG)
+        #g.createDimension(TIME_NAME,TIME_LENG)
+        g.createVariable(VAR_NAME,VAR_TYPE,(LEVEL_NAME, LAT_NAME, LON_NAME, TIME_NAME))
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary file
+        os.remove(self.file)
+
+    def runTest(self):
+        """testing dimensions"""
+        # check dimensions in root group.
+        f  = netCDF4.Dataset(self.file, 'r+')
+        v = f.variables[VAR_NAME]
+        isunlim = [dim.isunlimited() for dim in f.dimensions.values()]
+        dimlens = [len(dim) for dim in f.dimensions.values()]
+        names_check = [LAT_NAME, LON_NAME, LEVEL_NAME, TIME_NAME]
+        lens_check = [LAT_LEN, LON_LEN, LEVEL_LEN, TIME_LEN]
+        isunlim = [dimlen == None for dimlen in lens_check]
+        for n,dimlen in enumerate(lens_check):
+            if dimlen is None:
+                lens_check[n] = 0
+        lensdict = dict(zip(names_check,lens_check))
+        unlimdict = dict(zip(names_check,isunlim))
+        # check that dimension names are correct.
+        for name in f.dimensions.keys():
+            self.assertTrue(name in names_check)
+        # check that dimension lengths are correct.
+        for name,dim in f.dimensions.items():
+            self.assertTrue(len(dim) == lensdict[name])
+        # check that isunlimited() method works.
+        for name,dim in f.dimensions.items():
+            self.assertTrue(dim.isunlimited() == unlimdict[name])
+        # add some data to variable along unlimited dims,
+        # make sure length of dimensions change correctly.
+        nadd1 = 2
+        nadd2 = 4
+        v[0:nadd1,:,:,0:nadd2] = uniform(size=(nadd1,LAT_LEN,LON_LEN,nadd2))
+        lensdict[LEVEL_NAME]=nadd1
+        lensdict[TIME_NAME]=nadd2
+        # check that dimension lengths are correct.
+        for name,dim in f.dimensions.items():
+            self.assertTrue(len(dim) == lensdict[name])
+        # check dimensions in subgroup.
+        g = f.groups[GROUP_NAME]
+        vg = g.variables[VAR_NAME]
+        isunlim = [dim.isunlimited() for dim in g.dimensions.values()]
+        dimlens = [len(dim) for dim in g.dimensions.values()]
+        names_check = [LAT_NAME, LON_NAME, LEVEL_NAME, TIME_NAME]
+        lens_check = [LAT_LENG, LON_LENG, LEVEL_LENG, TIME_LENG]
+        isunlim = [dimlen == None for dimlen in lens_check]
+        for n,dimlen in enumerate(lens_check):
+            if dimlen is None:
+                lens_check[n] = 0
+        lensdict = dict(zip(names_check,lens_check))
+        unlimdict = dict(zip(names_check,isunlim))
+        # check that dimension names are correct.
+        for name in g.dimensions.keys():
+            self.assertTrue(name in names_check)
+        # check that dimension lengths are correct.
+        for name,dim in g.dimensions.items():
+            self.assertTrue(len(dim) == lensdict[name])
+        # check that isunlimited() method works.
+        for name,dim in g.dimensions.items():
+            self.assertTrue(dim.isunlimited() == unlimdict[name])
+        # add some data to variable along unlimited dims,
+        # make sure length of dimensions change correctly.
+        nadd1 = 8
+        nadd2 = 4
+        vg[0:nadd1,:,:,0:nadd2] = uniform(size=(nadd1,LAT_LENG,LON_LENG,nadd2))
+        lensdict[LEVEL_NAME]=nadd1
+        lensdict[TIME_NAME]=nadd2
+        for name,dim in g.dimensions.items():
+            self.assertTrue(len(dim) == lensdict[name])
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_diskless.py b/test/tst_diskless.py
new file mode 100644
index 0000000..e0ae272
--- /dev/null
+++ b/test/tst_diskless.py
@@ -0,0 +1,81 @@
+import unittest, os, tempfile
+import numpy as np
+from numpy.random.mtrand import uniform 
+from numpy.testing import assert_array_equal, assert_array_almost_equal
+import netCDF4
+
+# rudimentary test of diskless file capability.
+
+# create an n1dim by n2dim by n3dim random array
+n1dim = 10
+n2dim = 73 
+n3dim = 144
+ranarr = 100.*uniform(size=(n1dim,n2dim,n3dim))
+ranarr2 = 100.*uniform(size=(n1dim,n2dim,n3dim))
+FILE_NAME = tempfile.mktemp(".nc")
+FILE_NAME2 = tempfile.mktemp(".nc")
+
+class DisklessTestCase(unittest.TestCase):
+
+    def setUp(self):
+        # in memory file, does not exist on disk (closing it
+        # makes data disappear from memory)
+        self.file = FILE_NAME
+        f = netCDF4.Dataset(self.file,'w',diskless=True, persist=False)
+        self.f = f
+        # foo has a single unlimited dimension
+        f.createDimension('n1', n1dim)
+        f.createDimension('n2', n2dim)
+        f.createDimension('n3', n3dim)
+        foo = f.createVariable('data1', ranarr.dtype.str[1:], ('n1','n2','n3'))
+        # write some data to it.
+        foo[0:n1dim-1] = ranarr[:-1,:,:]
+        foo[n1dim-1] = ranarr[-1,:,:]
+        # bar has 2 unlimited dimensions
+        f.createDimension('n4', None)
+        # write some data to it.
+        bar = f.createVariable('data2', ranarr.dtype.str[1:], ('n1','n2','n4'))
+        bar[0:n1dim,:, 0:n3dim] = ranarr2
+
+        # in memory file, that is persisted to disk when close method called.
+        self.file2 = FILE_NAME2
+        f2 = netCDF4.Dataset(self.file2,'w',diskless=True, persist=True)
+        f2.createDimension('n1', n1dim)
+        f2.createDimension('n2', n2dim)
+        f2.createDimension('n3', n3dim)
+        foo = f2.createVariable('data1', ranarr.dtype.str[1:], ('n1','n2','n3'))
+        # write some data to it.
+        foo[0:n1dim-1] = ranarr[:-1,:,:]
+        foo[n1dim-1] = ranarr[-1,:,:]
+        f2.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file2)
+        self.f.close()
+
+    def runTest(self):
+        """testing diskless file capability"""
+        foo = self.f.variables['data1']
+        bar = self.f.variables['data2']
+        # check shape.
+        self.assertTrue(foo.shape == (n1dim,n2dim,n3dim))
+        self.assertTrue(bar.shape == (n1dim,n2dim,n3dim))
+        # check data.
+        assert_array_almost_equal(foo[:], ranarr)
+        assert_array_almost_equal(bar[:], ranarr2)
+        # file does not actually exist on disk
+        assert(os.path.isfile(self.file)==False)
+        # open persisted file.
+        # first, check that file does actually exist on disk
+        assert(os.path.isfile(self.file2)==True)
+        f = netCDF4.Dataset(self.file2)
+        foo = f.variables['data1']
+        # check shape.
+        self.assertTrue(foo.shape == (n1dim,n2dim,n3dim))
+        # check data.
+        assert_array_almost_equal(foo[:], ranarr)
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_endian.py b/test/tst_endian.py
new file mode 100644
index 0000000..06e16ce
--- /dev/null
+++ b/test/tst_endian.py
@@ -0,0 +1,86 @@
+import netCDF4
+import numpy as np
+import unittest, os, tempfile
+from numpy.testing import assert_array_equal, assert_array_almost_equal
+
+data = np.arange(12,dtype='f4').reshape(3,4)
+FILE_NAME = tempfile.mktemp(".nc")
+FILE_NAME2 = tempfile.mktemp(".nc")
+
+def create_file(file,format,data):
+    import warnings
+    dataset = netCDF4.Dataset(file,'w',format=format)
+    dataset.createDimension('time', None)
+    dataset.createDimension('space', 4)
+    dims = ('time', 'space')
+    little = data.astype('<f4')
+    big = data.astype('>f4')
+    warnings.simplefilter('ignore') # ignore UserWarnings generated below
+    ll = dataset.createVariable('little-little', '<f4', dims)
+    lb = dataset.createVariable('little-big', '<f4', dims)
+    bl = dataset.createVariable('big-little', '>f4', dims)
+    bb = dataset.createVariable('big-big', '>f4', dims)
+    ll[:] = little
+    lb[:] = big
+    bl[:] = little
+    bb[:] = big
+    dataset.close()
+
+def check_data(file, data):
+    f = netCDF4.Dataset(file)
+    ll = f.variables['little-little'][:]
+    lb = f.variables['little-big'][:]
+    bb = f.variables['big-big'][:]
+    bl = f.variables['big-little'][:]
+    # check data.
+    assert_array_almost_equal(ll, data)
+    assert_array_almost_equal(lb, data)
+    assert_array_almost_equal(bl, data)
+    assert_array_almost_equal(bb, data)
+    f.close()
+
+def issue310(file):
+    mval = 999.; fval = -999
+    nc = netCDF4.Dataset(file, "w")
+    nc.createDimension('obs', 10)
+    if netCDF4.is_native_little:
+        endian='big'
+    elif netCDF4.is_native_big:
+        endian='little'
+    else:
+        raise ValueError('cannot determine native endianness')
+    var_big_endian = nc.createVariable(\
+            'obs_big_endian', '>f8', ('obs', ),\
+            endian=endian,fill_value=fval)
+    var_big_endian.missing_value = mval
+    var_big_endian[0]=np.pi
+    var_big_endian[1]=mval
+    var_native_endian = nc.createVariable(\
+             'obs_native_endian', '<f8', ('obs', ),\
+             endian='native',fill_value=fval)
+    var_native_endian.missing_value = mval
+    var_native_endian[0]=np.pi
+    var_native_endian[1]=mval
+    assert_array_almost_equal(var_native_endian[:].filled(),
+                              var_big_endian[:].filled())
+    nc.close()
+
+class EndianTestCase(unittest.TestCase):
+
+    def setUp(self):
+        create_file(FILE_NAME,'NETCDF4_CLASSIC',data); self.file=FILE_NAME
+        create_file(FILE_NAME2,'NETCDF3_CLASSIC',data); self.file2=FILE_NAME2
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+        os.remove(self.file2)
+
+    def runTest(self):
+        """testing endian conversion capability"""
+        check_data(self.file, data)
+        check_data(self.file2, data)
+        issue310(self.file)
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_fancyslicing.py b/test/tst_fancyslicing.py
new file mode 100644
index 0000000..1533819
--- /dev/null
+++ b/test/tst_fancyslicing.py
@@ -0,0 +1,186 @@
+from netCDF4 import Dataset
+from numpy.random import seed, randint
+from numpy.testing import assert_array_equal, assert_equal
+import tempfile, unittest, os, random
+import numpy as np
+
+"""
+Bug note
+
+There seems to be a bug when two unlimited dimensions are used,
+ie ('x', 'y', 'time'), where x and time are unlimited dimensions.
+Specifically, the x dimension is set to a random length after setting
+it from an array. No data is lost, but the shape is wrong, and this
+can hog down the computer when taking all data along x.
+This bug appeared on Huard's box with netCDF4.0 and HDF5 1.8.1, and
+seems to be absent in later versions of those libraries (this needs
+to be checked.)
+
+See test2unlim below for an example.
+"""
+
+file_name = tempfile.mktemp(".nc")
+xdim=9; ydim=10; zdim=11
+i = np.array([2,5,7],'i4')
+i2 = np.array([0,8],'i4')
+i3 = np.array([3,7,9,10],'i4')
+ib = np.zeros(ydim,dtype=np.bool)
+ib[2] = True; ib[5] = True; ib[7] = True
+ib2 = np.zeros(xdim, dtype=np.bool)
+ib2[1] = True; ib2[4] = True; ib2[6] = True
+# this one should be converted to a slice.
+ib3 = np.zeros(xdim, dtype=np.bool)
+ib3[0] = True; ib2[4] = True; ib2[8] = True
+#seed(9) # fix seed
+data = randint(0,10,size=(xdim,ydim,zdim)).astype('i2')
+data1 = data[:,0,0].copy()
+
+class VariablesTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = file_name
+        f = Dataset(file_name,'w')
+        f.createDimension('x',None)
+        f.createDimension('y',ydim)
+        f.createDimension('z',zdim)
+        v = f.createVariable('data','i2',('x','y','z'))
+
+
+        v[:] = data
+
+        v1 = f.createVariable('data1','i2','x')
+        self.data1 = data1
+        self.data = data
+        # test __setitem___
+        v[0:xdim] = self.data
+        # integer array slice.
+        v[:,i,:] = -100
+        self.data[:,i,:] = -100
+        # boolen array slice.
+        v[ib2] = -200
+        self.data[ib2] = -200
+        v[ib3,:,:] = -300
+        self.data[ib3,:,:] = -300
+        # same as above, for 1d array
+        v1[0:xdim] = self.data1
+        v1[i] = -100
+        self.data1[i] = -100
+        v1[ib2] = -200
+        self.data1[ib2] = -200
+        v1[ib3] = -300
+        self.data1[ib3] = -300
+
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def test_get(self):
+        """testing 'fancy indexing'"""
+        f  = Dataset(self.file, 'r')
+        v = f.variables['data']
+        # slice with an array of integers.
+        assert_array_equal(v[0:-1:2,i,:],self.data[0:-1:2,i,:])
+        # slice with an array of booleans.
+        assert_array_equal(v[0:-1:2,ib,:],self.data[0:-1:2,ib,:])
+        # Two slices
+        assert_array_equal(v[1:2,1:3,:], self.data[1:2,1:3,:])
+        # Three integer sequences
+        # sequences should be equivalent to booleans
+        ib1 = np.zeros(v.shape[0], np.bool); ib1[i]=True
+        ib2 = np.zeros(v.shape[1], np.bool); ib2[i2]=True
+        ib3 = np.zeros(v.shape[2], np.bool); ib3[i3]=True
+        assert_array_equal(v[i,i2,i3], v[ib1,ib2,ib3])
+        assert_equal(v[i,i2,i3].shape, (len(i),len(i2),len(i3)))
+
+        # Two booleans and one slice.  Different from NumPy
+        # ibx,ibz should be converted to slice, iby not.
+        ibx = np.array([True, False, True, False, True, False, True, False, True])
+        iby = np.array([True, False, True, False, False, False, True, False, True, False])
+        ibz = np.array([True, False, True, False, True, False, True, False,\
+            True, False, True])
+        datatmp = self.data[::2,:,:]
+        datatmp = datatmp[:,iby,:]
+        assert_array_equal(v[ibx, iby, :], datatmp)
+
+        # Three booleans
+        datatmp = self.data[::2,:,:]
+        datatmp = datatmp[:,iby,::2]
+        assert_array_equal(v[ibx,iby,ibz], datatmp)
+
+        # Empty boolean -- all False
+        d1 = f.variables['data1']
+        m = np.zeros(xdim, bool)
+        assert_equal(d1[m], ())
+
+        # Check that no assignment is made
+        d1[m] = 0
+        assert_equal(d1[:], self.data1)
+
+        # boolean slices, only single items returned.
+        iby = np.array([True, False, False, False, False, False, False, False,\
+            False, False])
+        ibz = np.array([False, True, False, False, False, False, False, False,\
+            False,False,False])
+        assert_array_equal(v[:,iby,ibz],self.data[:,0:1,1:2])
+
+        # test to see that illegal integer sequences raise an IndexError
+        try:
+            v[:,[1,3,2],:] # unsorted indices
+            v[:,[1,2,2],:] # duplicate index
+        except IndexError:
+            pass
+        else:
+            msg='did not catch error for unsorted and/or duplicate indices'
+            raise IndexError(msg)
+
+        # Ellipse
+        assert_array_equal(v[...,::2],self.data[..., ::2])
+        assert_array_equal(v[...,::-2],self.data[..., ::-2])
+        assert_array_equal(v[[1,2],...],self.data[[1,2],...])
+
+        assert_array_equal(v[0], self.data[0])
+
+        f.close()
+
+    def test_set(self):
+        f  = Dataset(self.file, 'a')
+        data = np.arange(xdim*ydim*zdim).reshape((xdim,ydim,zdim)).astype('i4')
+        vu = f.variables['data']
+
+        vu[0,:,:] = data[0,:,:]
+        assert_array_equal(vu[0,:,:], data[0,:,:])
+
+        vu[1:,:,:] = data[:]
+        assert_array_equal(vu[1:, :, :], data)
+
+        f.close()
+
+    def test2unlim(self):
+        """Test with a variable that has two unlimited dimensions."""
+        f  = Dataset(self.file, 'a')
+        f.createDimension('time',None)
+
+        v = f.createVariable('u2data', 'i2', ('time', 'x', 'y'))
+        xdim = len(f.dimensions['x'])
+        data = np.arange(3*xdim*ydim).reshape((3, xdim, ydim))
+
+        v[:] = data
+        assert_equal(v.shape, data.shape)
+
+        v[3:6, 0:xdim, 0:ydim] = data
+        try:
+            assert_equal(v.shape, (6, xdim, ydim))
+        except AssertionError:
+            import warnings
+            warnings.warn("""
+            There seems to be a bug in the netCDF4 or HDF5 library that is
+            installed on your computer. Please upgrade to the latest version
+            to avoid being affected. This only matters if you use more than
+            1 unlimited dimension.""")
+            raise AssertionError
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_grps.py b/test/tst_grps.py
new file mode 100644
index 0000000..dd66674
--- /dev/null
+++ b/test/tst_grps.py
@@ -0,0 +1,85 @@
+import sys
+import unittest
+import os
+import tempfile
+import numpy as NP
+import netCDF4
+
+# test group creation.
+
+FILE_NAME1 = tempfile.mktemp(".nc")
+FILE_NAME2 = tempfile.mktemp(".nc")
+DYNASTY=u"Tudor"
+HENRY_VII=u"Henry_VII"
+MARGARET=u"Margaret"
+JAMES_V_OF_SCOTLAND=u"James_V_of_Scotland"
+MARY_I_OF_SCOTLAND=u"Mary_I_of_Scotland"
+JAMES_VI_OF_SCOTLAND_AND_I_OF_ENGLAND=u"James_VI_of_Scotland_and_I_of_England"
+names = [HENRY_VII,MARGARET,JAMES_V_OF_SCOTLAND,MARY_I_OF_SCOTLAND,JAMES_VI_OF_SCOTLAND_AND_I_OF_ENGLAND]
+root = '/'
+TREE1 = [root]
+for n in range(1,len(names)+1):
+    path = []
+    for name in names[0:n]:
+        path.append(root+name)
+    TREE1.append(''.join(path))
+TREE2 = [root,root+DYNASTY]
+for name in names:
+    TREE2.append(root+DYNASTY+root+name)
+TREE2.sort()
+
+
+# python generator to walk the Group tree.
+def walktree(top):
+    values = top.groups.values()
+    yield values
+    for value in top.groups.values():
+        for children in walktree(value):
+            yield  children
+
+class GroupsTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file1 = FILE_NAME1
+        f  = netCDF4.Dataset(self.file1, 'w')
+        g1 = f.createGroup(HENRY_VII)
+        g2 = g1.createGroup(MARGARET)
+        g3 = g2.createGroup(JAMES_V_OF_SCOTLAND)
+        g4 = g3.createGroup(MARY_I_OF_SCOTLAND)
+        g5 = g4.createGroup(JAMES_VI_OF_SCOTLAND_AND_I_OF_ENGLAND)
+        f.close()
+        self.file2 = FILE_NAME2
+        f  = netCDF4.Dataset(self.file2, 'w')
+        g1 = netCDF4.Group(f,DYNASTY)
+        g2 = g1.createGroup(HENRY_VII)
+        g3 = g1.createGroup(MARGARET)
+        g4 = g1.createGroup(JAMES_V_OF_SCOTLAND)
+        g5 = g1.createGroup(MARY_I_OF_SCOTLAND)
+        g6 = g1.createGroup(JAMES_VI_OF_SCOTLAND_AND_I_OF_ENGLAND)
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file1)
+        os.remove(self.file2)
+
+    def runTest(self):
+        """testing groups"""
+        f  = netCDF4.Dataset(self.file1, 'r')
+        tree = [f.path]
+        for children in walktree(f):
+            for child in children:
+                tree.append(child.path)
+        f.close()
+        assert tree == TREE1
+        f  = netCDF4.Dataset(self.file2, 'r')
+        tree = [f.path]
+        for children in walktree(f):
+            for child in children:
+                tree.append(child.path)
+        tree.sort()
+        f.close()
+        assert tree == TREE2
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_masked.py b/test/tst_masked.py
new file mode 100644
index 0000000..654ed20
--- /dev/null
+++ b/test/tst_masked.py
@@ -0,0 +1,103 @@
+import sys
+import unittest
+import os
+import tempfile
+import numpy as NP
+from numpy import ma
+from numpy.testing import assert_array_equal, assert_array_almost_equal
+from numpy.random.mtrand import uniform
+import netCDF4
+
+# test automatic conversion of masked arrays, and
+# packing/unpacking of short ints.
+
+# create an n1dim by n2dim random ranarr.
+FILE_NAME = tempfile.mktemp(".nc")
+ndim = 10
+ranarr = 100.*uniform(size=(ndim))
+ranarr2 = 100.*uniform(size=(ndim))
+# used for checking vector missing_values
+arr3 = NP.linspace(0,9,ndim)
+mask = NP.zeros(ndim,NP.bool); mask[-1]=True; mask[-2]=True
+marr3 = NP.ma.array(arr3, mask=mask, dtype=NP.int32)
+packeddata = 10.*uniform(size=(ndim))
+missing_value = -9999.
+missing_value2 = NP.nan
+missing_value3 = [8,9]
+ranarr[::2] = missing_value
+ranarr2[::2] = missing_value2
+NP.seterr(invalid='ignore') # silence warnings from ma.masked_values
+maskedarr = ma.masked_values(ranarr,missing_value)
+maskedarr2 = ma.masked_values(ranarr2,missing_value2)
+scale_factor = (packeddata.max()-packeddata.min())/(2.*32766.)
+add_offset = 0.5*(packeddata.max()+packeddata.min())
+packeddata2 = NP.around((packeddata-add_offset)/scale_factor).astype('i2')
+
+class PrimitiveTypesTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        file = netCDF4.Dataset(self.file,'w')
+        file.createDimension('n', ndim)
+        foo = file.createVariable('maskeddata', 'f8', ('n',))
+        foo2 = file.createVariable('maskeddata2', 'f8', ('n',))
+        foo3 = file.createVariable('maskeddata3', 'i4', ('n',))
+        foo.missing_value = missing_value
+        foo.set_auto_maskandscale(True)
+        foo2.missing_value = missing_value2
+        foo2.set_auto_maskandscale(True)
+        foo3.missing_value = missing_value3
+        foo3.set_auto_maskandscale(True)
+        bar = file.createVariable('packeddata', 'i2', ('n',))
+        bar.set_auto_maskandscale(True)
+        bar.scale_factor = scale_factor
+        bar.add_offset = add_offset
+        foo[:] = maskedarr
+        foo2[:] = maskedarr2
+        foo3[:] = arr3
+        bar[:] = packeddata
+        # added to test fix to issue 46
+        doh = file.createVariable('packeddata2','i2','n')
+        doh.scale_factor = 0.1
+        doh.add_offset = 0.
+        doh[0] = 1.1
+        file.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def runTest(self):
+        """testing auto-conversion of masked arrays and packed integers"""
+        file = netCDF4.Dataset(self.file)
+        datamasked = file.variables['maskeddata']
+        datamasked2 = file.variables['maskeddata2']
+        datamasked3 = file.variables['maskeddata3']
+        datapacked = file.variables['packeddata']
+        datapacked2 = file.variables['packeddata2']
+        # check missing_value, scale_factor and add_offset attributes.
+        assert datamasked.missing_value == missing_value
+        assert datapacked.scale_factor == scale_factor
+        assert datapacked.add_offset == add_offset
+        # no auto-conversion.
+        datamasked.set_auto_maskandscale(False)
+        datamasked2.set_auto_maskandscale(False)
+        datapacked.set_auto_maskandscale(False)
+        assert_array_equal(datapacked[:],packeddata2)
+        assert_array_equal(datamasked3[:],marr3)
+        assert_array_almost_equal(datamasked[:],ranarr)
+        assert_array_almost_equal(datamasked2[:],ranarr2)
+        # auto-conversion
+        datamasked.set_auto_maskandscale(True)
+        datamasked2.set_auto_maskandscale(True)
+        datapacked.set_auto_maskandscale(True)
+        datapacked2.set_auto_maskandscale(False)
+        assert_array_almost_equal(datamasked[:].filled(),ranarr)
+        assert_array_almost_equal(datamasked2[:].filled(),ranarr2)
+        assert_array_almost_equal(datapacked[:],packeddata,decimal=4)
+        # added to test fix to issue 46 (result before r865 was 10)
+        assert_array_equal(datapacked2[0],11)
+        file.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_masked2.py b/test/tst_masked2.py
new file mode 100755
index 0000000..7892bd0
--- /dev/null
+++ b/test/tst_masked2.py
@@ -0,0 +1,123 @@
+import sys
+import unittest
+import os
+import tempfile
+import numpy as np
+from numpy import ma, seterr
+from numpy.testing import assert_array_equal, assert_array_almost_equal
+from netCDF4 import Dataset, default_fillvals
+
+seterr(over='ignore') # don't print warning for overflow errors 
+
+# test automatic conversion of masked arrays, and
+# packing/unpacking of short ints.
+
+FILE_NAME1 = tempfile.mktemp(".nc")
+FILE_NAME2 = tempfile.mktemp(".nc")
+FILE_NAME3 = tempfile.mktemp(".nc")
+datacheck1 =\
+ma.array([0,5000.0,4000.0,0],dtype=np.float,mask=[True,False,False,True])
+datacheck2 =\
+ma.array([3000.0,5000.0,4000.0,0],dtype=np.float,mask=[False,False,False,True])
+datacheck3 =\
+ma.array([3000.0,5000.0,0,2000.0],dtype=np.float,mask=[False,False,True,False])
+mask = [False,True,False,False]
+datacheck4 = ma.array([1.5625,0,3.75,4.125],mask=mask,dtype=np.float32)
+fillval = default_fillvals[datacheck4.dtype.str[1:]]
+datacheck5 = np.array([1.5625,fillval,3.75,4.125],dtype=np.float32)
+
+class PrimitiveTypesTestCase(unittest.TestCase):
+
+    def setUp(self):
+
+        self.files = [FILE_NAME1]
+        f = Dataset(FILE_NAME1,'w')
+        x = f.createDimension('x',None)
+        v = f.createVariable('v',np.int16,'x')
+        v.scale_factor = np.array(1,np.float32)
+        v.add_offset = np.array(32066,np.float32)
+        v.missing_value = np.array(-9999,v.dtype)
+        #v[0] not set, will be equal to _FillValue
+        v[1]=5000
+        v[2]=4000
+        v[3]=v.missing_value
+        f.close()
+        
+        self.files.append(FILE_NAME2)
+        f = Dataset(FILE_NAME1,'r')
+        # create a new file, copy data, but change missing value and
+        # scale factor offset.
+        f2 = Dataset(FILE_NAME2,'w')
+        a = f2.createDimension('a',None)
+        b = f2.createVariable('b',np.int16,'a')
+        b.scale_factor = np.array(10.,np.float32)
+        b.add_offset = np.array(0,np.float32)
+        b.missing_value = np.array(9999,v.dtype)
+        b[:] = f.variables['v'][:]
+        f.close()
+        f2.close()
+        
+        self.files.append(FILE_NAME3)
+        f = Dataset(FILE_NAME3,'w')
+        x = f.createDimension('x',None)
+        # create variable with lossy compression
+        v = f.createVariable('v',np.float32,'x',zlib=True,least_significant_digit=1)
+        # assign masked array to that variable with one missing value.
+        data =\
+        ma.array([1.5678,99.99,3.75145,4.127654],mask=np.array([False,True,False,False],np.bool))
+        data.mask[1]=True
+        v[:] = data
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        for f in self.files:
+            os.remove(f)
+
+    def runTest(self):
+        """testing auto-conversion of masked arrays and packed integers""" 
+
+        f = Dataset(self.files[0])
+        data = f.variables['v'][:]
+        assert_array_almost_equal(data,datacheck1)
+        f.close()
+
+        f = Dataset(self.files[1])
+        data = f.variables['b'][:]
+        assert_array_almost_equal(data,datacheck1)
+        f.close()
+
+        f = Dataset(self.files[0],'a')
+        # change first element from _FillValue to actual data.
+        v = f.variables['v']
+        v[0]=3000
+        f.close()
+        f = Dataset(self.files[0],'r')
+        # read data back in, check.
+        data = f.variables['v'][:]
+        assert_array_almost_equal(data,datacheck2)
+        f.close()
+
+        f = Dataset(self.files[0],'a')
+        # change 3rd element to missing, 4 element to valid data.
+        v = f.variables['v']
+        data = v[:]
+        v[2]=-9999
+        v[3]=2000
+        f.close()
+        f = Dataset(self.files[0],'r')
+        # read data back in, check.
+        data = f.variables['v'][:]
+        assert_array_almost_equal(data,datacheck3)
+        f.close()
+
+        # check that masked arrays are handled correctly when lossy compression
+        # is used.
+        f = Dataset(self.files[2],'r')
+        data = f.variables['v'][:]
+        assert_array_almost_equal(data,datacheck4)
+        assert_array_almost_equal(data.filled(),datacheck5)
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_masked3.py b/test/tst_masked3.py
new file mode 100755
index 0000000..c0f8ca8
--- /dev/null
+++ b/test/tst_masked3.py
@@ -0,0 +1,201 @@
+import unittest
+import os
+import tempfile
+
+import numpy as np
+from numpy import ma
+from numpy.testing import assert_array_almost_equal
+from netCDF4 import Dataset, default_fillvals
+
+# Test automatic conversion of masked arrays (set_auto_mask())
+
+class SetAutoMaskTestBase(unittest.TestCase):
+
+    """Base object for tests checking the functionality of set_auto_mask()"""
+
+    def setUp(self):
+
+        self.testfile = tempfile.mktemp(".nc")
+
+        self.fillval = default_fillvals["i2"]
+        self.v    = np.array([self.fillval, 5, 4, -9999], dtype = "i2")
+        self.v_ma = ma.array([self.fillval, 5, 4, -9999], dtype = "i2", mask = [True, False, False, True])
+
+        self.scale_factor = 10.
+        self.add_offset = 5.
+
+        self.v_scaled = self.v * self.scale_factor + self.add_offset
+        self.v_ma_scaled = self.v_ma * self.scale_factor + self.add_offset
+
+        f = Dataset(self.testfile, 'w')
+        _ = f.createDimension('x', None)
+        v = f.createVariable('v', "i2", 'x')
+
+        v.missing_value = np.array(-9999, v.dtype)
+
+        # v[0] not set, will be equal to _FillValue
+        v[1] = self.v[1]
+        v[2] = self.v[2]
+        v[3] = v.missing_value
+
+        f.close()
+
+
+    def tearDown(self):
+
+        os.remove(self.testfile)
+
+
+class SetAutoMaskFalse(SetAutoMaskTestBase):
+
+    def test_unscaled(self):
+
+        """Testing auto-conversion of masked arrays for set_auto_mask(False)"""
+
+        f = Dataset(self.testfile, "r")
+
+        f.variables["v"].set_auto_mask(False)
+        v = f.variables["v"][:]
+
+        self.assertEqual(v.dtype, "i2")
+        self.assertIsInstance(v, np.ndarray)
+        self.assertNotIsInstance(v, ma.core.MaskedArray)
+        assert_array_almost_equal(v, self.v)
+
+        f.close()
+
+
+    def test_scaled(self):
+
+        """Testing auto-conversion of masked arrays for set_auto_mask(False) with scaling"""
+
+        # Update test data file
+
+        f = Dataset(self.testfile, "a")
+        f.variables["v"].scale_factor = self.scale_factor
+        f.variables["v"].add_offset = self.add_offset
+        f.close()
+
+        # Note: Scaling variables is default if scale_factor and/or add_offset are present
+
+        f = Dataset(self.testfile, "r")
+
+        f.variables["v"].set_auto_mask(False)
+        v = f.variables["v"][:]
+
+        self.assertEqual(v.dtype, "f8")
+        self.assertIsInstance(v, np.ndarray)
+        self.assertNotIsInstance(v, ma.core.MaskedArray)
+        assert_array_almost_equal(v, self.v_scaled)
+
+        f.close()
+
+
+class SetAutoMaskTrue(SetAutoMaskTestBase):
+
+    def test_unscaled(self):
+
+        """Testing auto-conversion of masked arrays for set_auto_mask(True)"""
+
+        f = Dataset(self.testfile)
+
+        f.variables["v"].set_auto_mask(True) # The default anyway...
+        v_ma = f.variables['v'][:]
+
+        self.assertEqual(v_ma.dtype, "i2")
+        self.assertIsInstance(v_ma, np.ndarray)
+        self.assertIsInstance(v_ma, ma.core.MaskedArray)
+        assert_array_almost_equal(v_ma, self.v_ma)
+        f.close()
+
+    def test_scaled(self):
+
+        """Testing auto-conversion of masked arrays for set_auto_mask(True)"""
+
+        # Update test data file
+
+        f = Dataset(self.testfile, "a")
+        f.variables["v"].scale_factor = self.scale_factor
+        f.variables["v"].add_offset = self.add_offset
+        f.close()
+
+        # Note: Scaling variables is default if scale_factor and/or add_offset are present
+
+        f = Dataset(self.testfile)
+
+        f.variables["v"].set_auto_mask(True)  # The default anyway...
+        v_ma = f.variables['v'][:]
+
+        self.assertEqual(v_ma.dtype, "f8")
+        self.assertIsInstance(v_ma, np.ndarray)
+        self.assertIsInstance(v_ma, ma.core.MaskedArray)
+        assert_array_almost_equal(v_ma, self.v_ma_scaled)
+        f.close()
+
+
+class GlobalSetAutoMaskTest(unittest.TestCase):
+
+    def setUp(self):
+
+        self.testfile = tempfile.mktemp(".nc")
+
+        f = Dataset(self.testfile, 'w')
+
+        grp1 = f.createGroup('Group1')
+        grp2 = f.createGroup('Group2')
+        f.createGroup('Group3')         # empty group
+
+        f.createVariable('var0', "i2", ())
+        grp1.createVariable('var1', 'f8', ())
+        grp2.createVariable('var2', 'f4', ())
+
+        f.close()
+
+    def tearDown(self):
+
+        os.remove(self.testfile)
+
+    def runTest(self):
+
+        # Note: The default behaviour is to to have both auto-masking and auto-scaling activated.
+        #       This is already tested in tst_scaled.py, so no need to repeat here. Instead,
+        #       disable auto-masking and auto-scaling altogether.
+
+        f = Dataset(self.testfile, "r")
+
+        # Neither scaling and masking enabled
+
+        f.set_auto_maskandscale(False)
+
+        v0 = f.variables['var0']
+        v1 = f.groups['Group1'].variables['var1']
+        v2 = f.groups['Group2'].variables['var2']
+
+        self.assertFalse(v0.scale)
+        self.assertFalse(v0.mask)
+
+        self.assertFalse(v1.scale)
+        self.assertFalse(v1.mask)
+
+        self.assertFalse(v2.scale)
+        self.assertFalse(v2.mask)
+
+        # No auto-masking, but auto-scaling
+
+        f.set_auto_maskandscale(True)
+        f.set_auto_mask(False)
+
+        self.assertTrue(v0.scale)
+        self.assertFalse(v0.mask)
+
+        self.assertTrue(v1.scale)
+        self.assertFalse(v1.mask)
+
+        self.assertTrue(v2.scale)
+        self.assertFalse(v2.mask)
+
+        f.close()
+
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_multifile.py b/test/tst_multifile.py
new file mode 100644
index 0000000..3e4c1dc
--- /dev/null
+++ b/test/tst_multifile.py
@@ -0,0 +1,125 @@
+from netCDF4 import Dataset, MFDataset, MFTime, num2date, date2num, date2index
+import numpy as np
+from numpy.random import seed, randint
+from numpy.testing import assert_array_equal, assert_equal
+from numpy import ma
+import tempfile, unittest, os, datetime
+
+nx=100; ydim=5; zdim=1
+nfiles = 10
+ninc = nx/nfiles
+files = [tempfile.mktemp(".nc") for nfile in range(nfiles)]
+data = randint(0,10,size=(nx,ydim,zdim))
+missval = 99
+data[::10] = missval
+data = ma.masked_values(data,missval)
+
+class VariablesTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.files = files
+        for nfile,file in enumerate(self.files):
+            f = Dataset(file,'w',format='NETCDF4_CLASSIC')
+            f.createDimension('x',None)
+            f.createDimension('y',ydim)
+            f.createDimension('z',zdim)
+            f.history = 'created today'
+            x = f.createVariable('x','i',('x',))
+            x.units = 'zlotys'
+            dat = f.createVariable('data','i',('x','y','z',))
+            dat.long_name = 'phony data'
+            dat.missing_value = missval
+            nx1 = nfile*ninc; nx2 = ninc*(nfile+1)
+            #x[0:ninc] = np.arange(nfile*ninc,ninc*(nfile+1))
+            x[:] = np.arange(nfile*ninc,ninc*(nfile+1))
+            #dat[0:ninc] = data[nx1:nx2]
+            dat[:] = data[nx1:nx2]
+            f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        for file in self.files:
+            os.remove(file)
+
+    def runTest(self):
+        """testing multi-file dataset access"""
+        f = MFDataset(self.files,check=True)
+        assert f.history == 'created today'
+        assert_array_equal(np.arange(0,nx),f.variables['x'][:])
+        varin = f.variables['data']
+        datin = varin[:]
+        assert_array_equal(datin.mask,data.mask)
+        varin.set_auto_maskandscale(False)
+        data2 = data.filled()
+        assert varin.long_name == 'phony data'
+        assert len(varin) == nx
+        assert varin.shape == (nx,ydim,zdim)
+        assert varin.dimensions == ('x','y','z')
+        assert_array_equal(varin[4:-4:4,3:5,2:8],data2[4:-4:4,3:5,2:8])
+        assert varin[0,0,0] == data2[0,0,0]
+        assert_array_equal(varin[:],data2)
+        assert getattr(varin,'nonexistantatt',None) == None
+        f.close()
+
+
+class NonuniformTimeTestCase(unittest.TestCase):
+    ninc = 365
+    def setUp(self):
+
+        self.files = [tempfile.mktemp(".nc") for nfile in range(2)]
+        for nfile,file in enumerate(self.files):
+            f = Dataset(file,'w',format='NETCDF4_CLASSIC')
+            f.createDimension('time',None)
+            f.createDimension('y',ydim)
+            f.createDimension('z',zdim)
+            f.history = 'created today'
+
+            time = f.createVariable('time', 'f', ('time', ))
+            #time.units = 'days since {0}-01-01'.format(1979+nfile)
+            yr = 1979+nfile
+            time.units = 'days since %s-01-01' % yr
+
+            time.calendar = 'standard'
+
+            x = f.createVariable('x','f',('time', 'y', 'z'))
+            x.units = 'potatoes per square mile'
+
+            nx1 = self.ninc*nfile;
+            nx2 = self.ninc*(nfile+1)
+
+            time[:] = np.arange(self.ninc)
+            x[:] = np.arange(nx1, nx2).reshape(self.ninc,1,1) * np.ones((1, ydim, zdim))
+
+            f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        for file in self.files:
+            os.remove(file)
+
+
+    def runTest(self):
+        # Get the real dates
+        dates = []
+        for file in self.files:
+            f = Dataset(file)
+            t = f.variables['time']
+            dates.extend(num2date(t[:], t.units, t.calendar))
+            f.close()
+
+        # Compare with the MF dates
+        f = MFDataset(self.files,check=True)
+        t = f.variables['time']
+        mfdates = num2date(t[:], t.units, t.calendar)
+
+        T = MFTime(t)
+        assert_equal(len(T), len(t))
+        assert_equal(T.shape, t.shape)
+        assert_equal(T.dimensions, t.dimensions)
+        assert_equal(T.typecode(), t.typecode())
+        assert_array_equal(num2date(T[:], T.units, T.calendar), dates)
+        assert_equal(date2index(datetime.datetime(1980, 1, 2), T), 366)
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_multifile2.py b/test/tst_multifile2.py
new file mode 100644
index 0000000..0a59013
--- /dev/null
+++ b/test/tst_multifile2.py
@@ -0,0 +1,127 @@
+from netCDF4 import Dataset, MFDataset, MFTime, num2date, date2num, date2index
+import numpy as np
+from numpy.random import seed, randint
+from numpy.testing import assert_array_equal, assert_equal
+from numpy import ma
+import tempfile, unittest, os, datetime
+
+nx=100; ydim=5; zdim=1
+nfiles = 10
+ninc = nx/nfiles
+files = [tempfile.mktemp(".nc") for nfile in range(nfiles)]
+data = randint(0,10,size=(nx,ydim,zdim))
+missval = 99
+data[::10] = missval
+data = ma.masked_values(data,missval)
+
+class VariablesTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.files = files
+        for nfile,file in enumerate(self.files):
+            f = Dataset(file,'w',format='NETCDF4_CLASSIC')
+            #f.createDimension('x',None)
+            f.createDimension('x',ninc)
+            f.createDimension('y',ydim)
+            f.createDimension('z',zdim)
+            f.history = 'created today'
+            x = f.createVariable('x','i',('x',))
+            x.units = 'zlotys'
+            dat = f.createVariable('data','i',('x','y','z',))
+            dat.long_name = 'phony data'
+            dat.missing_value = missval
+            nx1 = nfile*ninc; nx2 = ninc*(nfile+1)
+            #x[0:ninc] = np.arange(nfile*ninc,ninc*(nfile+1))
+            x[:] = np.arange(nfile*ninc,ninc*(nfile+1))
+            #dat[0:ninc] = data[nx1:nx2]
+            dat[:] = data[nx1:nx2]
+            f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        for file in self.files:
+            os.remove(file)
+
+    def runTest(self):
+        """testing multi-file dataset access"""
+        # specify the aggregation dim (not necessarily unlimited)
+        f = MFDataset(self.files,aggdim='x',check=True)
+        assert f.history == 'created today'
+        assert_array_equal(np.arange(0,nx),f.variables['x'][:])
+        varin = f.variables['data']
+        datin = varin[:]
+        assert_array_equal(datin.mask,data.mask)
+        varin.set_auto_maskandscale(False)
+        data2 = data.filled()
+        assert varin.long_name == 'phony data'
+        assert len(varin) == nx
+        assert varin.shape == (nx,ydim,zdim)
+        assert varin.dimensions == ('x','y','z')
+        assert_array_equal(varin[4:-4:4,3:5,2:8],data2[4:-4:4,3:5,2:8])
+        assert varin[0,0,0] == data2[0,0,0]
+        assert_array_equal(varin[:],data2)
+        assert getattr(varin,'nonexistantatt',None) == None
+        f.close()
+
+
+class NonuniformTimeTestCase(unittest.TestCase):
+    ninc = 365
+    def setUp(self):
+
+        self.files = [tempfile.mktemp(".nc") for nfile in range(2)]
+        for nfile,file in enumerate(self.files):
+            f = Dataset(file,'w',format='NETCDF4_CLASSIC')
+            f.createDimension('time',None)
+            f.createDimension('y',ydim)
+            f.createDimension('z',zdim)
+            f.history = 'created today'
+
+            time = f.createVariable('time', 'f', ('time', ))
+            #time.units = 'days since {0}-01-01'.format(1979+nfile)
+            yr = 1979+nfile
+            time.units = 'days since %s-01-01' % yr
+
+            time.calendar = 'standard'
+
+            x = f.createVariable('x','f',('time', 'y', 'z'))
+            x.units = 'potatoes per square mile'
+
+            nx1 = self.ninc*nfile;
+            nx2 = self.ninc*(nfile+1)
+
+            time[:] = np.arange(self.ninc)
+            x[:] = np.arange(nx1, nx2).reshape(self.ninc,1,1) * np.ones((1, ydim, zdim))
+
+            f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        for file in self.files:
+            os.remove(file)
+
+
+    def runTest(self):
+        # Get the real dates
+        dates = []
+        for file in self.files:
+            f = Dataset(file)
+            t = f.variables['time']
+            dates.extend(num2date(t[:], t.units, t.calendar))
+            f.close()
+
+        # Compare with the MF dates
+        f = MFDataset(self.files,check=True)
+        t = f.variables['time']
+        mfdates = num2date(t[:], t.units, t.calendar)
+
+        T = MFTime(t)
+        assert_equal(len(T), len(t))
+        assert_equal(T.shape, t.shape)
+        assert_equal(T.dimensions, t.dimensions)
+        assert_equal(T.typecode(), t.typecode())
+        assert_array_equal(num2date(T[:], T.units, T.calendar), dates)
+        assert_equal(date2index(datetime.datetime(1980, 1, 2), T), 366)
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_netcdftime.py b/test/tst_netcdftime.py
new file mode 100644
index 0000000..5b14dca
--- /dev/null
+++ b/test/tst_netcdftime.py
@@ -0,0 +1,453 @@
+from netcdftime import utime, JulianDayFromDate, DateFromJulianDay, date2index
+from netcdftime import datetime as datetimex, date2num
+from netCDF4 import Dataset, num2date
+import numpy
+import random
+import sys
+import unittest
+import os
+import tempfile
+from datetime import datetime
+from numpy.testing import assert_almost_equal, assert_equal
+
+# test netcdftime module for netCDF time <--> python datetime conversions.
+
+
+class netcdftimeTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.cdftime_mixed = utime('hours since 0001-01-01 00:00:00')
+        self.cdftime_julian = utime(
+            'hours since 0001-01-01 00:00:00', calendar='julian')
+        self.cdftime_mixed_tz = utime('hours since 0001-01-01 00:00:00 -06:00')
+        self.cdftime_pg = utime('seconds since 0001-01-01 00:00:00',
+                                calendar='proleptic_gregorian')
+        self.cdftime_noleap = utime(
+            'days since 1600-02-28 00:00:00', calendar='noleap')
+        self.cdftime_leap = utime(
+            'days since 1600-02-29 00:00:00', calendar='all_leap')
+        self.cdftime_360day = utime(
+            'days since 1600-02-30 00:00:00', calendar='360_day')
+        self.cdftime_jul = utime(
+            'hours since 1000-01-01 00:00:00', calendar='julian')
+        self.cdftime_iso = utime("seconds since 1970-01-01T00:00:00Z")
+        self.cdftime_leading_space = utime("days since  850-01-01 00:00:00")
+
+    def runTest(self):
+        """testing netcdftime"""
+        # test mixed julian/gregorian calendar
+        # check attributes.
+        self.assertTrue(self.cdftime_mixed.units == 'hours')
+        self.assertTrue(
+            repr(self.cdftime_mixed.origin) == '   1-01-01 00:00:00')
+        self.assertTrue(
+            self.cdftime_mixed.unit_string == 'hours since 0001-01-01 00:00:00')
+        self.assertTrue(self.cdftime_mixed.calendar == 'standard')
+        # check date2num method. (date before switch)
+        d = datetime(1582, 10, 4, 23)
+        t1 = self.cdftime_mixed.date2num(d)
+        assert_almost_equal(t1, 13865687.0)
+        # check num2date method.
+        d2 = self.cdftime_mixed.num2date(t1)
+        self.assertTrue(str(d) == str(d2))
+        # this is a non-existant date, should raise ValueError.
+        d = datetime(1582, 10, 5, 0)
+        self.assertRaises(ValueError, self.cdftime_mixed.date2num, d)
+        # check date2num/num2date with date after switch.
+        d = datetime(1582, 10, 15, 0)
+        t2 = self.cdftime_mixed.date2num(d)
+        assert_almost_equal(t2, 13865688.0)
+        d2 = self.cdftime_mixed.num2date(t2)
+        self.assertTrue(str(d) == str(d2))
+        # check day of year.
+        ndayr = d.timetuple()[7]
+        self.assertTrue(ndayr == 288)
+        # test using numpy arrays.
+        t = numpy.arange(t2, t2 + 240.0, 12.)
+        t = numpy.reshape(t, (4, 5))
+        d = self.cdftime_mixed.num2date(t)
+        self.assertTrue(d.shape == t.shape)
+        d_check = "1582-10-15 00:00:001582-10-15 12:00:001582-10-16 00:00:001582-10-16 12:00:001582-10-17 00:00:001582-10-17 12:00:001582-10-18 00:00:001582-10-18 12:00:001582-10-19 00:00:001582-10-19 12:00:001582-10-20 00:00:001582-10-20 12:00:001582-10-21 00:00:001582-10-21 12:00:001582-10-22 00:00:001582-10-22 12:00:001582-10-23 00:00:001582-10-23 12:00:001582-10-24 00:00:001582-10-24 12:00:00"
+        d2 = [str(dd) for dd in d.flat]
+        self.assertTrue(d_check == ''.join(d2))
+        # test julian calendar with numpy arrays
+        d = self.cdftime_julian.num2date(t)
+        self.assertTrue(d.shape == t.shape)
+        d_check = "1582-10-05 00:00:001582-10-05 12:00:001582-10-06 00:00:001582-10-06 12:00:001582-10-07 00:00:001582-10-07 12:00:001582-10-08 00:00:001582-10-08 12:00:001582-10-09 00:00:001582-10-09 12:00:001582-10-10 00:00:001582-10-10 12:00:001582-10-11 00:00:001582-10-11 12:00:001582-10-12 00:00:001582-10-12 12:00:001582-10-13 00:00:001582-10-13 12:00:001582-10-14 00:00:001582-10-14 12:00:00"
+        d2 = [str(dd) for dd in d.flat]
+        self.assertTrue(d_check == ''.join(d2))
+        # test proleptic gregorian calendar.
+        self.assertTrue(self.cdftime_pg.units == 'seconds')
+        self.assertTrue(repr(self.cdftime_pg.origin) == '   1-01-01 00:00:00')
+        self.assertTrue(
+            self.cdftime_pg.unit_string == 'seconds since 0001-01-01 00:00:00')
+        self.assertTrue(self.cdftime_pg.calendar == 'proleptic_gregorian')
+        # check date2num method.
+        d = datetime(1990, 5, 5, 2, 17)
+        t1 = numpy.around(self.cdftime_pg.date2num(d))
+        self.assertTrue(t1 == 62777470620.0)
+        # check num2date method.
+        d2 = self.cdftime_pg.num2date(t1)
+        self.assertTrue(str(d) == str(d2))
+        # check day of year.
+        ndayr = d.timetuple()[7]
+        self.assertTrue(ndayr == 125)
+        # check noleap calendar.
+        # this is a non-existant date, should raise ValueError.
+        self.assertRaises(
+            ValueError, utime, 'days since 1600-02-29 00:00:00', calendar='noleap')
+        self.assertTrue(self.cdftime_noleap.units == 'days')
+        self.assertTrue(
+            repr(self.cdftime_noleap.origin) == '1600-02-28 00:00:00')
+        self.assertTrue(
+            self.cdftime_noleap.unit_string == 'days since 1600-02-28 00:00:00')
+        self.assertTrue(self.cdftime_noleap.calendar == 'noleap')
+        assert_almost_equal(
+            self.cdftime_noleap.date2num(self.cdftime_noleap.origin), 0.0)
+        # check date2num method.
+        d1 = datetime(2000, 2, 28)
+        d2 = datetime(1600, 2, 28)
+        t1 = self.cdftime_noleap.date2num(d1)
+        t2 = self.cdftime_noleap.date2num(d2)
+        assert_almost_equal(t1, 400 * 365.)
+        assert_almost_equal(t2, 0.)
+        t12 = self.cdftime_noleap.date2num([d1, d2])
+        assert_almost_equal(t12, [400 * 365., 0])
+        # check num2date method.
+        d2 = self.cdftime_noleap.num2date(t1)
+        self.assertTrue(str(d1) == str(d2))
+        # check day of year.
+        ndayr = d2.timetuple()[7]
+        self.assertTrue(ndayr == 59)
+        # non-existant date, should raise ValueError.
+        date = datetime(2000, 2, 29)
+        self.assertRaises(ValueError, self.cdftime_noleap.date2num, date)
+        # check all_leap calendar.
+        self.assertTrue(self.cdftime_leap.units == 'days')
+        self.assertTrue(
+            repr(self.cdftime_leap.origin) == '1600-02-29 00:00:00')
+        self.assertTrue(
+            self.cdftime_leap.unit_string == 'days since 1600-02-29 00:00:00')
+        self.assertTrue(self.cdftime_leap.calendar == 'all_leap')
+        assert_almost_equal(
+            self.cdftime_leap.date2num(self.cdftime_leap.origin), 0.0)
+        # check date2num method.
+        d1 = datetime(2000, 2, 29)
+        d2 = datetime(1600, 2, 29)
+        t1 = self.cdftime_leap.date2num(d1)
+        t2 = self.cdftime_leap.date2num(d2)
+        assert_almost_equal(t1, 400 * 366.)
+        assert_almost_equal(t2, 0.)
+        # check num2date method.
+        d2 = self.cdftime_leap.num2date(t1)
+        self.assertTrue(str(d1) == str(d2))
+        # check day of year.
+        ndayr = d2.timetuple()[7]
+        self.assertTrue(ndayr == 60)
+        # double check date2num,num2date methods.
+        d = datetime(2000, 12, 31)
+        t1 = self.cdftime_mixed.date2num(d)
+        d2 = self.cdftime_mixed.num2date(t1)
+        self.assertTrue(str(d) == str(d2))
+        ndayr = d2.timetuple()[7]
+        self.assertTrue(ndayr == 366)
+        # check 360_day calendar.
+        self.assertTrue(self.cdftime_360day.units == 'days')
+        self.assertTrue(
+            repr(self.cdftime_360day.origin) == '1600-02-30 00:00:00')
+        self.assertTrue(
+            self.cdftime_360day.unit_string == 'days since 1600-02-30 00:00:00')
+        self.assertTrue(self.cdftime_360day.calendar == '360_day')
+        assert_almost_equal(
+            self.cdftime_360day.date2num(self.cdftime_360day.origin), 0.0)
+        # check date2num,num2date methods.
+        # use datetime from netcdftime, since this date doesn't
+        # exist in "normal" calendars.
+        d = datetimex(2000, 2, 30)
+        t1 = self.cdftime_360day.date2num(d)
+        assert_almost_equal(t1, 360 * 400.)
+        d2 = self.cdftime_360day.num2date(t1)
+        assert_equal(str(d), str(d2))
+        # check day of year.
+        d = datetime(2001, 12, 30)
+        t = self.cdftime_360day.date2num(d)
+        assert_almost_equal(t, 144660.0)
+        date = self.cdftime_360day.num2date(t)
+        self.assertTrue(str(d) == str(date))
+        ndayr = date.timetuple()[7]
+        self.assertTrue(ndayr == 360)
+        # Check fraction
+        d = datetime(1969, 12, 30, 12)
+        t = self.cdftime_360day.date2num(d)
+        date = self.cdftime_360day.num2date(t)
+        assert_equal(str(d), str(date))
+        # test proleptic julian calendar.
+        d = datetime(1858, 11, 17, 12)
+        t = self.cdftime_jul.date2num(d)
+        assert_almost_equal(t, 7528932.0)
+        d1 = datetime(1582, 10, 4, 23)
+        d2 = datetime(1582, 10, 15, 0)
+        assert_almost_equal(
+            self.cdftime_jul.date2num(d1) + 241.0, self.cdftime_jul.date2num(d2))
+        date = self.cdftime_jul.num2date(t)
+        self.assertTrue(str(d) == str(date))
+        # test julian day from date, date from julian day
+        d = datetime(1858, 11, 17)
+        mjd = JulianDayFromDate(d)
+        assert_almost_equal(mjd, 2400000.5)
+        date = DateFromJulianDay(mjd)
+        self.assertTrue(str(date) == str(d))
+        # test iso 8601 units string
+        d = datetime(1970, 1, 1, 1)
+        t = self.cdftime_iso.date2num(d)
+        assert_equal(numpy.around(t), 3600)
+        # test fix for issue 75 (seconds hit 60 at end of month,
+        # day goes out of range).
+        t = 733498.999999
+        d = num2date(t, units='days since 0001-01-01 00:00:00')
+        assert_equal(str(d), '2009-04-01 00:00:00')
+        # test edge case of issue 75 for numerical problems
+        for t in (733498.999, 733498.9999, 733498.99999, 733498.999999, 733498.9999999):
+            d = num2date(t, units='days since 0001-01-01 00:00:00')
+            t2 = date2num(d, units='days since 0001-01-01 00:00:00')
+            assert(abs(t2 - t) < 1e-5)  # values should be less than second
+        # Check equality testing
+        d1 = datetimex(1979, 6, 21, 9, 23, 12)
+        d2 = datetime(1979, 6, 21, 9, 23, 12)
+        assert(d1 == d2)
+        # check timezone offset
+        d = datetime(2012, 2, 29, 15)
+        assert(self.cdftime_mixed.date2num(
+            d) - self.cdftime_mixed_tz.date2num(d) == 6)
+
+        # Check comparisons with Python datetime types
+        d1 = num2date(0, 'days since 1000-01-01', 'standard')
+        d2 = datetime(2000, 1, 1)
+        d3 = num2date(0, 'days since 3000-01-01', 'standard')
+        assert d1 < d2
+        assert d2 < d3
+
+        # check all comparisons
+        assert d1 != d2
+        assert d1 <= d2
+        assert d2 > d1
+        assert d2 >= d1
+
+        # check datetime hash
+        d1 = datetimex(1995, 1, 1)
+        d2 = datetime(1995, 1, 1)
+        d3 = datetimex(2001, 2, 30)
+        assert hash(d1) == hash(d1)
+        assert hash(d1) == hash(d2)
+        assert hash(d1) != hash(d3)
+        assert hash(d3) == hash(d3)
+
+        # check datetime immutability
+        with self.assertRaises(AttributeError):
+            d1.year = 1999
+        with self.assertRaises(AttributeError):
+            d1.month = 6
+        with self.assertRaises(AttributeError):
+            d1.day = 5
+        with self.assertRaises(AttributeError):
+            d1.hour = 10
+        with self.assertRaises(AttributeError):
+            d1.minute = 33
+        with self.assertRaises(AttributeError):
+            d1.second = 45
+        with self.assertRaises(AttributeError):
+            d1.dayofwk = 1
+        with self.assertRaises(AttributeError):
+            d1.dayofyr = 52
+        with self.assertRaises(AttributeError):
+            d1.format = '%Y'
+
+        # Check leading white space
+        self.assertEqual(
+            repr(self.cdftime_leading_space.origin), ' 850-01-01 00:00:00')
+
+        #issue 330
+        units = "seconds since 1970-01-01T00:00:00Z"
+        t = utime(units)
+        for n in range(10):
+            assert n == int(round(t.date2num(t.num2date(n))))
+
+
+class TestDate2index(unittest.TestCase):
+
+    class TestTime:
+
+        """Fake a netCDF time variable."""
+
+        def __init__(self, start, n, step, units, calendar='standard'):
+            """Create an object that fakes a netCDF time variable.
+
+            Internally, this object has a _data array attribute whose values
+            corresponds to dates in the given units and calendar. `start`, `n`
+            and `step` define the starting date, the length of the array and
+            the distance between each date (in units).
+
+            :Example:
+            >>> t = TestTime(datetime(1989, 2, 18), 45, 6, 'hours since 1979-01-01')
+            >>> print num2date(t[1], t.units)
+            1989-02-18 06:00:00
+            """
+            self.units = units
+            self.calendar = calendar
+            t0 = date2num(start, units, calendar)
+            self._data = (t0 + numpy.arange(n) * step).astype('float')
+            self.dtype = numpy.float
+
+        def __getitem__(self, item):
+            return self._data[item]
+
+        def __len__(self):
+            return len(self._data)
+
+        def shape():
+            def fget(self):
+                return self._data.shape
+            return locals()
+
+        shape = property(**shape())
+
+    def setUp(self):
+        self.standardtime = self.TestTime(datetime(1950, 1, 1), 366, 24,
+                                          'hours since 1900-01-01', 'standard')
+
+        self.file = tempfile.mktemp(".nc")
+        f = Dataset(self.file, 'w')
+        f.createDimension('time', None)
+        time = f.createVariable('time', float, ('time',))
+        time.units = 'hours since 1900-01-01'
+        time[:] = self.standardtime[:]
+        f.createDimension('time2', 1)
+        time2 = f.createVariable('time2', 'f8', ('time2',))
+        time2.units = 'days since 1901-01-01'
+        self.first_timestamp = datetime(2000, 1, 1)
+        time2[0] = date2num(self.first_timestamp, time2.units)
+        f.close()
+
+    def tearDown(self):
+        os.remove(self.file)
+
+    def test_simple(self):
+        t = date2index(datetime(1950, 2, 1), self.standardtime)
+        assert_equal(t, 31)
+
+    def test_singletime(self):
+        # issue 215 test (date2index with time variable length == 1)
+        f = Dataset(self.file)
+        time2 = f.variables['time2']
+        result_index = date2index(self.first_timestamp, time2, select="exact")
+        assert_equal(result_index, 0)
+        f.close()
+
+    def test_list(self):
+        t = date2index(
+            [datetime(1950, 2, 1), datetime(1950, 2, 3)], self.standardtime)
+        assert_equal(t, [31, 33])
+
+    def test_nonuniform(self):
+        """Check that the fallback mechanism works. """
+        nutime = self.TestTime(datetime(1950, 1, 1), 366, 24,
+                               'hours since 1900-01-01', 'standard')
+
+        # Let's remove the second entry, so that the computed stride is not
+        # representative and the bisection method is needed.
+        nutime._data = nutime._data[numpy.r_[0, slice(2, 200)]]
+
+        t = date2index(datetime(1950, 2, 1), nutime)
+        assert_equal(t, 30)
+
+        t = date2index([datetime(1950, 2, 1), datetime(1950, 2, 3)], nutime)
+        assert_equal(t, [30, 32])
+
+    def test_failure(self):
+        nutime = self.TestTime(datetime(1950, 1, 1), 366, 24,
+                               'hours since 1900-01-01', 'standard')
+        try:
+            t = date2index(datetime(1949, 2, 1), nutime)
+        except ValueError:
+            pass
+        else:
+            raise ValueError('This test should have failed.')
+
+    def test_select_dummy(self):
+        nutime = self.TestTime(datetime(1950, 1, 1), 366, 24,
+                               'hours since 1900-01-01', 'standard')
+
+        dates = [datetime(1950, 1, 2, 6), datetime(
+            1950, 1, 3), datetime(1950, 1, 3, 18)]
+
+        t = date2index(dates, nutime, select='before')
+        assert_equal(t, [1, 2, 2])
+
+        t = date2index(dates, nutime, select='after')
+        assert_equal(t, [2, 2, 3])
+
+        t = date2index(dates, nutime, select='nearest')
+        assert_equal(t, [1, 2, 3])
+
+    def test_select_nc(self):
+        f = Dataset(self.file, 'r')
+        nutime = f.variables['time']
+
+        dates = [datetime(1950, 1, 2, 6), datetime(
+            1950, 1, 3), datetime(1950, 1, 3, 18)]
+
+        t = date2index(dates, nutime, select='before')
+        assert_equal(t, [1, 2, 2])
+
+        t = date2index(dates, nutime, select='after')
+        assert_equal(t, [2, 2, 3])
+
+        t = date2index(dates, nutime, select='nearest')
+        assert_equal(t, [1, 2, 3])
+
+        # Test dates outside the support with select
+        t = date2index(datetime(1949, 12, 1), nutime, select='nearest')
+        assert_equal(t, 0)
+
+        t = date2index(datetime(1978, 1, 1), nutime, select='nearest')
+        assert_equal(t, 365)
+
+        # Test dates outside the support with before
+        self.assertRaises(
+            ValueError, date2index, datetime(1949, 12, 1), nutime, select='before')
+
+        t = date2index(datetime(1978, 1, 1), nutime, select='before')
+        assert_equal(t, 365)
+
+        # Test dates outside the support with after
+        t = date2index(datetime(1949, 12, 1), nutime, select='after')
+        assert_equal(t, 0)
+
+        self.assertRaises(
+            ValueError, date2index, datetime(1978, 1, 1), nutime, select='after')
+        # test microsecond and millisecond units
+        unix_epoch = "milliseconds since 1970-01-01T00:00:00Z"
+        from netCDF4 import date2num
+        d = datetime(2038, 1, 19, 3, 14, 7)
+        millisecs = int(
+            date2num(d, unix_epoch, calendar='proleptic_gregorian'))
+        assert_equal(millisecs, (2 ** 32 / 2 - 1) * 1000)
+        unix_epoch = "microseconds since 1970-01-01T00:00:00Z"
+        microsecs = int(date2num(d, unix_epoch))
+        assert_equal(microsecs, (2 ** 32 / 2 - 1) * 1000000)
+        # test microsecond accuracy in date2num/num2date roundtrip
+        # note: microsecond accuracy lost for time intervals greater
+        # than about 270 years.
+        from dateutil.tz import tzutc
+        units = 'microseconds since 1776-07-04 00:00:00-12:00'
+        dates =\
+            [datetime(1962, 10, 27, 6, 1, 30, 9001), datetime(
+                1993, 11, 21, 12, 5, 25, 999), datetime(1995, 11, 25, 18, 7, 59, 999999)]
+        times2 = date2num(dates, units)
+        dates2 = num2date(times2, units)
+        for date, date2 in zip(dates, dates2):
+            assert_equal(date.replace(tzinfo=tzutc()), date2)
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_refcount.py b/test/tst_refcount.py
new file mode 100644
index 0000000..f0ede72
--- /dev/null
+++ b/test/tst_refcount.py
@@ -0,0 +1,28 @@
+import unittest, netCDF4, tempfile, os
+
+file_name = tempfile.mktemp(".nc")
+
+class RefCountTestCase(unittest.TestCase):
+
+    def setUp(self):
+        nc = netCDF4.Dataset(file_name, mode='w', keepweakref=True, format='NETCDF4')
+        d = nc.createDimension('fred', 2000)
+        v = nc.createVariable('frank','f',('fred',))
+        self.file = file_name
+        self.nc = nc
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def runTest(self):
+        """testing garbage collection (issue 218)"""
+        # this should trigger garbage collection (__dealloc__ method)
+        del self.nc
+        # if __dealloc__ not called to close file, then this
+        # will fail with "Permission denied" error (since you can't
+        # open a file 'w' that is already open for writing).
+        nc = netCDF4.Dataset(self.file, mode='w', format='NETCDF4')
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_rename.py b/test/tst_rename.py
new file mode 100644
index 0000000..42ed395
--- /dev/null
+++ b/test/tst_rename.py
@@ -0,0 +1,143 @@
+import sys
+import unittest
+import os
+import tempfile
+import numpy as NP
+import netCDF4
+from netCDF4 import __has_rename_grp__
+
+# test changing dimension, variable names
+# and deleting attributes.
+
+FILE_NAME = tempfile.mktemp(".nc")
+LAT_NAME="lat"
+LON_NAME="lon"
+LON_NAME2 = "longitude"
+LEVEL_NAME="level"
+TIME_NAME="time"
+VAR_NAME='temp'
+VAR_NAME2='wind'
+GROUP_NAME='subgroup'
+GROUP_NAME2='subgroup2'
+
+class VariablesTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        f  = netCDF4.Dataset(self.file, 'w')
+        f.createDimension(LAT_NAME,73)
+        f.createDimension(LON_NAME,145)
+        f.createDimension(LEVEL_NAME,10)
+        f.createDimension(TIME_NAME,None)
+        if __has_rename_grp__:
+            g = f.createGroup(GROUP_NAME)
+        else:
+            g = f.createGroup(GROUP_NAME2)
+        g.createDimension(LAT_NAME,145)
+        g.createDimension(LON_NAME,289)
+        g.createDimension(LEVEL_NAME,20)
+        g.createDimension(TIME_NAME,None)
+        f.foo = 'bar'
+        f.goober = 2
+        g.foo = 'bar'
+        g.goober = 2
+        f.createVariable(VAR_NAME,'f4',(LAT_NAME, LON_NAME, TIME_NAME))
+        v = f.variables[VAR_NAME]
+        v.bar = 'foo'
+        v.slobber = 3
+        g.createVariable(VAR_NAME,'f4',(LAT_NAME, LON_NAME, TIME_NAME))
+        v2 = g.variables[VAR_NAME]
+        v2.bar = 'foo'
+        v2.slobber = 3
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def runTest(self):
+        """testing renaming of dimensions, variables and attribute deletion"""
+        f  = netCDF4.Dataset(self.file, 'r+')
+        v = f.variables[VAR_NAME]
+        names_check = [LAT_NAME, LON_NAME, LEVEL_NAME, TIME_NAME]
+        # check that dimension names are correct.
+        for name in f.dimensions.keys():
+            self.assertTrue(name in names_check)
+        names_check = [VAR_NAME]
+        # check that variable names are correct.
+        for name in f.variables.keys():
+            self.assertTrue(name in names_check)
+        # rename dimension.
+        f.renameDimension(LON_NAME,LON_NAME2)
+        # rename variable.
+        f.renameVariable(VAR_NAME,VAR_NAME2)
+        # rename group.
+        if __has_rename_grp__:
+            f.renameGroup(GROUP_NAME,GROUP_NAME2)
+        # check that new dimension names are correct.
+        names_check = [LAT_NAME, LON_NAME2, LEVEL_NAME, TIME_NAME]
+        for name in f.dimensions.keys():
+            self.assertTrue(name in names_check)
+        names_check = [VAR_NAME2]
+        # check that new variable names are correct.
+        for name in f.variables.keys():
+            self.assertTrue(name in names_check)
+        g = f.groups[GROUP_NAME2]
+        vg = g.variables[VAR_NAME]
+        names_check = [LAT_NAME, LON_NAME, LEVEL_NAME, TIME_NAME]
+        # check that dimension names are correct.
+        for name in g.dimensions.keys():
+            self.assertTrue(name in names_check)
+        names_check = [VAR_NAME]
+        # check that variable names are correct.
+        for name in g.variables.keys():
+            self.assertTrue(name in names_check)
+        # check that group name is correct.
+        self.assertTrue(GROUP_NAME not in f.groups and GROUP_NAME2 in f.groups)
+        # rename dimension.
+        g.renameDimension(LON_NAME,LON_NAME2)
+        # rename variable.
+        g.renameVariable(VAR_NAME,VAR_NAME2)
+        # check that new dimension names are correct.
+        names_check = [LAT_NAME, LON_NAME2, LEVEL_NAME, TIME_NAME]
+        for name in g.dimensions.keys():
+            self.assertTrue(name in names_check)
+        names_check = [VAR_NAME2]
+        # check that new variable names are correct.
+        for name in g.variables.keys():
+            self.assertTrue(name in names_check)
+        # delete a global attribute.
+        atts = f.ncattrs()
+        del f.goober
+        atts.remove('goober')
+        self.assertTrue(atts == f.ncattrs())
+        atts = g.ncattrs()
+        del g.goober
+        atts.remove('goober')
+        self.assertTrue(atts == g.ncattrs())
+        # delete a variable attribute.
+        atts = v.ncattrs()
+        del v.slobber
+        atts.remove('slobber')
+        self.assertTrue(atts == v.ncattrs())
+        atts = vg.ncattrs()
+        del vg.slobber
+        atts.remove('slobber')
+        self.assertTrue(atts == vg.ncattrs())
+        f.close()
+        # make sure attributes cannot be deleted, or vars/dims renamed
+        # when file is open read-only.
+        f  = netCDF4.Dataset(self.file)
+        v = f.variables[VAR_NAME2]
+        self.assertRaises(RuntimeError, delattr, v, 'bar')
+        self.assertRaises(RuntimeError, f.renameVariable, VAR_NAME2, VAR_NAME)
+        self.assertRaises(RuntimeError, f.renameDimension, LON_NAME2, LON_NAME)
+        g = f.groups[GROUP_NAME2]
+        vg = g.variables[VAR_NAME2]
+        self.assertRaises(RuntimeError, delattr, vg, 'bar')
+        self.assertRaises(RuntimeError, g.renameVariable, VAR_NAME2, VAR_NAME)
+        self.assertRaises(RuntimeError, g.renameDimension, LON_NAME2, LON_NAME)
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_scalarvar.py b/test/tst_scalarvar.py
new file mode 100644
index 0000000..f98e9bc
--- /dev/null
+++ b/test/tst_scalarvar.py
@@ -0,0 +1,59 @@
+import sys
+import unittest
+import os
+import tempfile
+import numpy as NP
+from numpy.testing import assert_almost_equal
+import netCDF4
+import math
+
+VAR_NAME='temp'
+VAR_TYPE='f4'
+VAR_VAL=math.pi
+FILE_NAME = tempfile.mktemp(".nc")
+GROUP_NAME = 'subgroup'
+
+# test scalar variable creation and retrieval.
+
+class ScalarVariableTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        rootgrp = netCDF4.Dataset(self.file, 'w')
+        # scalar variable.
+        temp = rootgrp.createVariable(VAR_NAME,VAR_TYPE)
+        #temp[:] = VAR_VAL
+        temp.assignValue(VAR_VAL)
+        subgroup = rootgrp.createGroup(GROUP_NAME)
+        tempg = subgroup.createVariable(VAR_NAME,VAR_TYPE)
+        tempg[:] = VAR_VAL
+        #tempg.assignValue(VAR_VAL)
+        rootgrp.close()
+
+    def tearDown(self):
+        # Remove the temporary file
+        os.remove(self.file)
+
+    def runTest(self):
+        """testing scalar variables"""
+        # check dimensions in root group.
+        f  = netCDF4.Dataset(self.file, 'r+')
+        v = f.variables[VAR_NAME]
+        # dimensions and shape should be empty tuples
+        self.assertTrue(v.dimensions == ())
+        self.assertTrue(v.shape == ())
+        # check result of getValue and slice
+        assert_almost_equal(v.getValue(), VAR_VAL, decimal=6)
+        assert_almost_equal(v[:], VAR_VAL, decimal=6)
+        g = f.groups[GROUP_NAME]
+        vg = g.variables[VAR_NAME]
+        # dimensions and shape should be empty tuples
+        self.assertTrue(vg.dimensions == ())
+        self.assertTrue(vg.shape == ())
+        # check result of getValue and slice
+        assert_almost_equal(vg.getValue(), VAR_VAL, decimal=6)
+        assert_almost_equal(vg[:], VAR_VAL, decimal=6)
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_scaled.py b/test/tst_scaled.py
new file mode 100755
index 0000000..3e9f688
--- /dev/null
+++ b/test/tst_scaled.py
@@ -0,0 +1,196 @@
+import unittest
+import os
+import tempfile
+
+import numpy as np
+from numpy import ma
+from numpy.testing import assert_array_almost_equal
+
+from netCDF4 import Dataset, default_fillvals
+
+# Test automatic scaling of variables (set_auto_scale())
+
+class SetAutoScaleTestBase(unittest.TestCase):
+
+    """Base object for tests checking the functionality of set_auto_scale()"""
+
+    def setUp(self):
+
+        self.testfile = tempfile.mktemp(".nc")
+
+        self.fillval = default_fillvals["i2"]
+        self.missing_value = -9999
+
+        self.v    = np.array([0, 5, 4, self.missing_value], dtype = "i2")
+        self.v_ma = ma.array([0, 5, 4, self.missing_value], dtype = "i2",
+                             mask = [True, False, False, True], fill_value = self.fillval)
+
+        self.scale_factor = 10.
+        self.add_offset = 5.
+
+        self.v_scaled = self.v * self.scale_factor + self.add_offset
+        self.v_ma_scaled = self.v_ma * self.scale_factor + self.add_offset
+
+        f = Dataset(self.testfile, 'w')
+        x = f.createDimension('x', None)
+        v = f.createVariable('v', "i2", 'x')
+
+        v[:] = self.v
+
+        # Note: Scale factors are only added after writing, so that no auto-scaling takes place!
+
+        v.scale_factor = self.scale_factor
+        v.add_offset = self.add_offset
+
+        f.close()
+
+
+    def tearDown(self):
+
+        os.remove(self.testfile)
+
+
+class SetAutoScaleFalse(SetAutoScaleTestBase):
+
+    def test_unmasked(self):
+
+        """Testing (not) auto-scaling of variables for set_auto_scale(False)"""
+
+        f = Dataset(self.testfile, "r")
+
+        f.variables["v"].set_auto_scale(False)
+        v = f.variables["v"][:]
+
+        self.assertEqual(v.dtype, "i2")
+        self.assertIsInstance(v, np.ndarray)
+        self.assertNotIsInstance(v, ma.core.MaskedArray)
+        assert_array_almost_equal(v, self.v)
+
+        f.close()
+
+
+    def test_masked(self):
+
+        """Testing auto-conversion of masked arrays for set_auto_mask(False) with masking"""
+
+        # Update test data file
+
+        f = Dataset(self.testfile, "a")
+        f.variables["v"].missing_value = self.missing_value
+        f.close()
+
+        # Note: Converting arrays to masked arrays is default if missing_value is present
+
+        f = Dataset(self.testfile, "r")
+
+        f.variables["v"].set_auto_scale(False)
+        v_ma = f.variables["v"][:]
+
+        self.assertEqual(v_ma.dtype, "i2")
+        self.assertIsInstance(v_ma, np.ndarray)
+        self.assertIsInstance(v_ma, ma.core.MaskedArray)
+        assert_array_almost_equal(v_ma, self.v_ma)
+
+        f.close()
+
+
+class SetAutoScaleTrue(SetAutoScaleTestBase):
+
+    def test_unmasked(self):
+
+        """Testing auto-scaling of variables for set_auto_scale(True)"""
+
+        f = Dataset(self.testfile)
+
+        f.variables["v"].set_auto_scale(True) # The default anyway...
+        v_scaled = f.variables['v'][:]
+
+        self.assertEqual(v_scaled.dtype, "f8")
+        self.assertIsInstance(v_scaled, np.ndarray)
+        self.assertNotIsInstance(v_scaled, ma.core.MaskedArray)
+        assert_array_almost_equal(v_scaled, self.v_scaled)
+        f.close()
+
+    def test_masked(self):
+
+        """Testing auto-scaling of variables for set_auto_scale(True) with masking"""
+
+        # Update test data file
+
+        f = Dataset(self.testfile, "a")
+        f.variables["v"].missing_value = self.missing_value
+        f.close()
+
+        # Note: Converting arrays to masked arrays is default if missing_value is present
+
+        f = Dataset(self.testfile)
+
+        f.variables["v"].set_auto_scale(True)  # The default anyway...
+        v_ma_scaled = f.variables['v'][:]
+
+        self.assertEqual(v_ma_scaled.dtype, "f8")
+        self.assertIsInstance(v_ma_scaled, np.ndarray)
+        self.assertIsInstance(v_ma_scaled, ma.core.MaskedArray)
+        assert_array_almost_equal(v_ma_scaled, self.v_ma_scaled)
+        f.close()
+
+
+class GlobalSetAutoScaleTest(unittest.TestCase):
+
+    def setUp(self):
+
+        self.testfile = tempfile.mktemp(".nc")
+
+        f = Dataset(self.testfile, 'w')
+
+        grp1 = f.createGroup('Group1')
+        grp2 = f.createGroup('Group2')
+        f.createGroup('Group3')         # empty group
+
+        f.createVariable('var0', "i2", ())
+        grp1.createVariable('var1', 'f8', ())
+        grp2.createVariable('var2', 'f4', ())
+
+        f.close()
+
+    def tearDown(self):
+
+        os.remove(self.testfile)
+
+    def runTest(self):
+
+        f = Dataset(self.testfile, "r")
+
+        # Default is both scaling and masking enabled
+
+        v0 = f.variables['var0']
+        v1 = f.groups['Group1'].variables['var1']
+        v2 = f.groups['Group2'].variables['var2']
+
+        self.assertTrue(v0.scale)
+        self.assertTrue(v0.mask)
+
+        self.assertTrue(v1.scale)
+        self.assertTrue(v1.mask)
+
+        self.assertTrue(v2.scale)
+        self.assertTrue(v2.mask)
+
+        # No auto-scaling
+
+        f.set_auto_scale(False)
+
+        self.assertFalse(v0.scale)
+        self.assertTrue(v0.mask)
+
+        self.assertFalse(v1.scale)
+        self.assertTrue(v1.mask)
+
+        self.assertFalse(v2.scale)
+        self.assertTrue(v2.mask)
+
+        f.close()
+
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_shape.py b/test/tst_shape.py
new file mode 100644
index 0000000..7f21fe6
--- /dev/null
+++ b/test/tst_shape.py
@@ -0,0 +1,38 @@
+from netCDF4 import Dataset
+import tempfile, unittest, os
+import numpy as np
+
+file_name = tempfile.mktemp(".nc")
+xdim=None; ydim=121; zdim=169
+datashape = (ydim,zdim)
+data = np.ones(datashape,dtype=np.float)
+
+class ShapeTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = file_name
+        f = Dataset(file_name,'w')
+        f.createDimension('x',xdim)
+        f.createDimension('y',ydim)
+        f.createDimension('z',zdim)
+        v = f.createVariable('data',np.float,('x','y','z'))
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def runTest(self):
+        """test for issue 90 (array shape should not be modified by
+        assigment to netCDF variable)"""
+        f  = Dataset(self.file, 'a')
+        v = f.variables['data']
+        v[0] = data
+        # make sure shape of data array
+        # is not changed by assigning it
+        # to a netcdf var with one more dimension (issue 90)
+        assert(data.shape == datashape)
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_slicing.py b/test/tst_slicing.py
new file mode 100644
index 0000000..dfb0870
--- /dev/null
+++ b/test/tst_slicing.py
@@ -0,0 +1,175 @@
+from netCDF4 import Dataset
+from numpy.random import seed, randint
+from numpy.testing import assert_array_equal, assert_equal,\
+assert_array_almost_equal
+import tempfile, unittest, os, random
+import numpy as np
+
+file_name = tempfile.mktemp(".nc")
+xdim=9; ydim=10; zdim=11
+#seed(9) # fix seed
+data = randint(0,10,size=(xdim,ydim,zdim)).astype('u1')
+datarev = data[:,::-1,:]
+
+class VariablesTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = file_name
+        f = Dataset(file_name,'w')
+        f.createDimension('x',xdim)
+        f.createDimension('xu',None)
+        f.createDimension('y',ydim)
+        f.createDimension('z',zdim)
+        f.createDimension('zu',None)
+        v = f.createVariable('data','u1',('x','y','z'))
+        vu = f.createVariable('datau','u1',('xu','y','zu'))
+        v1 = f.createVariable('data1d', 'u1', ('x',))
+        # variable with no unlimited dim.
+        # write slice in reverse order
+        v[:,::-1,:] = data
+        # variable with an unlimited dimension.
+        # write slice in reverse order
+        #vu[0:xdim,::-1,0:zdim] = data
+        vu[:,::-1,:] = data
+
+        v1[:] = data[:, 0, 0]
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def test_3d(self):
+        """testing variable slicing"""
+        f  = Dataset(self.file, 'r')
+        v = f.variables['data']
+        vu = f.variables['datau']
+
+        # test return of array scalar.
+        assert_equal(v[0,0,0].shape,())
+        assert_array_equal(v[:], datarev)
+        # test reading of slices.
+        # negative value means count back from end.
+        assert_array_equal(v[:-1,:-2,:-3],datarev[:-1,:-2,:-3])
+        # every other element (positive step)
+        assert_array_equal(v[2:-1:2,2:-2:2,2:-3:2],datarev[2:-1:2,2:-2:2,2:-3:2])
+        # every other element (negative step)
+        assert_array_equal(v[-1:2:-2,-2:2:-2,-3:2:-2],datarev[-1:2:-2,-2:2:-2,-3:2:-2])
+        # read elements in reverse order
+        assert_array_equal(v[:,::-1,:],data)
+        assert_array_equal(v[::-1,:,::-1],datarev[::-1,:,::-1])
+        assert_array_equal(v[xdim-1::-3,:,zdim-1::-3],datarev[xdim-1::-3,:,zdim-1::-3])
+
+        # ellipsis slice.
+        assert_array_equal(v[...,2:],datarev[...,2:])
+        # variable with an unlimited dimension.
+        assert_array_equal(vu[:], data[:,::-1,:])
+        # read data in reverse order
+        assert_array_equal(vu[:,::-1,:],data)
+        # index using an integer array scalar
+        i = np.ones(1,'i4')[0]
+        assert_array_equal(v[i],datarev[1])
+
+        f.close()
+
+    def test_1d(self):
+        f  = Dataset(self.file, 'r')
+        v1 = f.variables['data1d']
+        d = data[:,0,0]
+        assert_equal(v1[:], d)
+        assert_equal(v1[4:], d[4:])
+        # test return of array scalar.
+        assert_equal(v1[0].shape, ())
+        i1 = np.array([2,3,4])
+        assert_equal(v1[i1], d[i1])
+        i2 = np.array([2,3,5])
+        assert_equal(v1[i2], d[i2])
+        assert_equal(v1[d<5], d[d<5])
+        assert_equal(v1[5], d[5])
+        f.close()
+
+    def test_0d(self):
+        f = Dataset(self.file, 'w')
+        v = f.createVariable('data', float)
+        v[...] = 10
+        assert_array_equal(v[...], 10)
+        assert_equal(v.shape, v[...].shape)
+        f.close()
+
+    def test_issue259(self):
+        dset = Dataset(self.file, 'w', format='NETCDF4_CLASSIC')
+        dset.createDimension('dim', None)
+        a = dset.createVariable('a', 'i', ('dim',))
+        b = dset.createVariable('b', 'i', ('dim',))
+        c = dset.createVariable('c', 'i', ('dim',))
+        c[:] = 1 # c initially is empty, new entry created
+        assert_array_equal(c[...], np.array([1]))
+        b[:] = np.array([1,1])
+        a[:] = 1 # a should be same as b
+        assert_array_equal(a[...], b[...])
+        dset.close()
+
+    def test_issue306(self):
+        f = Dataset(self.file,'w')
+        nlats = 7; lat = f.createDimension('lat',nlats)
+        nlons = 12; lon = f.createDimension('lon',nlons)
+        nlevs = 1; lev = f.createDimension('lev',nlevs)
+        time = f.createDimension('time',None)
+        var = f.createVariable('var',np.float,('time','lev','lat','lon'))
+        a = np.random.uniform(size=(10,nlevs,nlats,nlons))
+        var[0:10] = a
+        f.close()
+        f = Dataset(self.file)
+        aa = f.variables['var'][4,-1,:,:]
+        assert_array_almost_equal(a[4,-1,:,:],aa)
+        v = f.variables['var']
+        try:
+            aa = v[4,-2,:,:] # -2 when dimension is length 1
+        except IndexError:
+            pass
+        else:
+            raise IndexError('This test should have failed.')
+        try:
+            aa = v[4,...,...,:] # more than one Ellipsis
+        except IndexError:
+            pass
+        else:
+            raise IndexError('This test should have failed.')
+        try:
+            aa = v[:,[True,True],:,:] # boolean array too long.
+        except IndexError:
+            pass
+        else:
+            raise IndexError('This test should have failed.')
+        try:
+            aa = v[:,[0,1],:,:] # integer index too large
+        except IndexError:
+            pass
+        else:
+            raise IndexError('This test should have failed.')
+        f.close()
+
+    def test_issue300(self):
+        f = Dataset(self.file,'w')
+        nlats = 11; lat = f.createDimension('lat',nlats)
+        nlons = 20; lon = f.createDimension('lon',nlons)
+        time = f.createDimension('time',None)
+        var = f.createVariable('var',np.float,('time','lat','lon'))
+        a = np.random.uniform(size=(3,nlats,nlons))
+        var[[True,True,False,False,False,True]] = a
+        var[0,2.0,"-1"] = 0 # issue 312
+        a[0,2,-1]=0
+        f.close()
+        f = Dataset(self.file)
+        var = f.variables['var']
+        aa = var[[0,1,5]]
+        bb = var[[True,True,False,False,False,True]]
+        lats = np.arange(nlats); lons = np.arange(nlons)
+        cc = var[-1,lats > 2,lons < 6]
+        assert_array_almost_equal(a,aa)
+        assert_array_almost_equal(bb,aa)
+        assert_array_almost_equal(cc,a[-1,3:,:6])
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_stringarr.py b/test/tst_stringarr.py
new file mode 100644
index 0000000..3c63dfb
--- /dev/null
+++ b/test/tst_stringarr.py
@@ -0,0 +1,50 @@
+from netCDF4 import Dataset, stringtochar, chartostring
+import random, numpy
+import unittest
+import os
+from numpy.testing import assert_array_equal, assert_array_almost_equal
+
+# test utilities for converting arrays of fixed-length strings
+# to arrays of characters (with an extra dimension), and vice-versa.
+
+FILE_NAME = 'tst_stringarr.nc'
+FILE_FORMAT = 'NETCDF4_CLASSIC'
+chars = '1234567890aabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+n2 = 10; nchar = 12; nrecs = 4
+data = numpy.empty((nrecs,n2),'S'+repr(nchar))
+for nrec in range(nrecs):
+    for n in range(n2):
+        data[nrec,n] = ''.join([random.choice(chars) for i in range(nchar)])
+
+class StringArrayTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        nc = Dataset(FILE_NAME,'w',format=FILE_FORMAT)
+        nc.createDimension('n1',None)
+        nc.createDimension('n2',n2)
+        nc.createDimension('nchar',nchar)
+        v = nc.createVariable('strings','S1',('n1','n2','nchar'))
+        for nrec in range(nrecs):
+            datac = stringtochar(data)
+            v[nrec] = datac[nrec]
+        nc.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def runTest(self):
+        """testing functions for converting arrays of chars to fixed-len strings"""
+        nc = Dataset(FILE_NAME)
+        assert nc.dimensions['n1'].isunlimited() == True
+        v = nc.variables['strings']
+        assert v.dtype.str[1:] in ['S1','U1']
+        assert v.shape == (nrecs,n2,nchar)
+        for nrec in range(nrecs):
+            data2 = chartostring(v[nrec])
+            assert_array_equal(data2,data[nrec])
+        nc.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_types.py b/test/tst_types.py
new file mode 100644
index 0000000..cc0d291
--- /dev/null
+++ b/test/tst_types.py
@@ -0,0 +1,89 @@
+import sys
+import unittest
+import os
+import tempfile
+import numpy as NP
+from numpy.testing import assert_array_equal, assert_array_almost_equal
+from numpy.random.mtrand import uniform
+import netCDF4
+
+# test primitive data types.
+
+# create an n1dim by n2dim random ranarr.
+FILE_NAME = tempfile.mktemp(".nc")
+n1dim = 5
+n2dim = 10
+ranarr = 100.*uniform(size=(n1dim,n2dim))
+zlib=False;complevel=0;shuffle=0;least_significant_digit=None
+datatypes = ['f8','f4','i1','i2','i4','i8','u1','u2','u4','u8','S1']
+FillValue = 1.0
+issue273_data = NP.ma.array(['z']*10,dtype='S1',\
+mask=[False,False,False,False,False,True,False,False,False,False])
+
+class PrimitiveTypesTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        file = netCDF4.Dataset(self.file,'w')
+        file.createDimension('n1', None)
+        file.createDimension('n2', n2dim)
+        for typ in datatypes:
+            foo = file.createVariable('data_'+typ, typ, ('n1','n2',),zlib=zlib,complevel=complevel,shuffle=shuffle,least_significant_digit=least_significant_digit,fill_value=FillValue)
+            #foo._FillValue = FillValue
+            # test writing of _FillValue attribute for diff types
+            # (should be cast to type of variable silently)
+            foo[1:n1dim] = ranarr[1:n1dim]
+        v = file.createVariable('issue271', NP.dtype('S1'), [], fill_value=b'Z')
+        v2 = file.createVariable('issue273', NP.dtype('S1'), 'n2',\
+                fill_value='\x00')
+        v2[:] = issue273_data
+        file.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def runTest(self):
+        """testing primitive data type """
+        file = netCDF4.Dataset(self.file)
+        for typ in datatypes:
+            data = file.variables['data_'+typ]
+            data.set_auto_maskandscale(False)
+            datarr = data[1:n1dim]
+            # fill missing data with _FillValue
+            # ('S1' array will have some missing values)
+            if hasattr(datarr, 'mask'):
+                datarr = datarr.filled()
+            datfilled = data[0]
+            # check to see that data type is correct
+            if typ == 'S1':
+                self.assertTrue(data.dtype.str[1:] in ['S1','U1'])
+            else:
+                self.assertTrue(data.dtype.str[1:] == typ)
+            # check data in variable.
+            if data.dtype.str[1:] != 'S1':
+                #assert NP.allclose(datarr, ranarr[1:n1dim].astype(data.dtype))
+                assert_array_almost_equal(datarr,ranarr[1:n1dim].astype(data.dtype))
+            else:
+                assert datarr.tostring() == ranarr[1:n1dim].astype(data.dtype).tostring()
+            # check that variable elements not yet written are filled
+            # with the specified _FillValue.
+            assert_array_equal(datfilled,NP.asarray(data._FillValue,datfilled.dtype))
+        # issue 271 (_FillValue should be a byte for character arrays on
+        # Python 3)
+        v = file.variables['issue271']
+        if type(v._FillValue) == bytes:
+            assert(v._FillValue == b'Z') # python 3
+        else:
+            assert(v._FillValue == u'Z') # python 2
+        # issue 273 (setting _FillValue to null byte manually)
+        v2 = file.variables['issue273']
+        if type(v2._FillValue) == bytes:
+            assert(v2._FillValue == b'\x00') # python 3
+        else:
+            assert(v2._FillValue == u'') # python 2
+        assert(str(issue273_data) == str(v2[:]))
+        file.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_unicode.py b/test/tst_unicode.py
new file mode 100644
index 0000000..bcbe703
--- /dev/null
+++ b/test/tst_unicode.py
@@ -0,0 +1,42 @@
+import netCDF4
+import numpy as np
+import sys, unittest, os, tempfile
+
+netCDF4.default_encoding = 'utf-8'
+
+FILE_NAME = tempfile.mktemp(".nc")
+ATT1 = u'\u03a0\u03a3\u03a9'
+ATT2 = u'x\xb0'
+ATT3 = [u'\u03a0',u'\u03a3',u'\u03a9']
+DIM_NAME = u'x\xb0'
+VAR_NAME = u'Andr\xe9'
+
+class UnicodeTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        f = netCDF4.Dataset(self.file,'w')
+        f.attribute1 = ATT1
+        f.attribute2 = ATT2
+        f.attribute3 = ATT3
+        d = f.createDimension(DIM_NAME, None)
+        v = f.createVariable(VAR_NAME, np.float, (DIM_NAME,))
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def runTest(self):
+        """testing unicode"""
+        f  = netCDF4.Dataset(self.file, 'r')
+        d = f.dimensions[DIM_NAME]
+        v = f.variables[VAR_NAME]
+        # check accessing individual attributes.
+        assert f.attribute1 == ATT1
+        assert f.attribute2 == ATT2
+        assert f.attribute3 == ''.join(ATT3)
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_unicode3.py b/test/tst_unicode3.py
new file mode 100644
index 0000000..bc20e2e
--- /dev/null
+++ b/test/tst_unicode3.py
@@ -0,0 +1,42 @@
+import netCDF4
+import numpy as np
+import sys, unittest, os, tempfile
+
+netCDF4.default_encoding = 'utf-8'
+
+FILE_NAME = tempfile.mktemp(".nc")
+ATT1 = '\u03a0\u03a3\u03a9'
+ATT2 = 'x\xb0'
+ATT3 = ['\u03a0','\u03a3','\u03a9']
+DIM_NAME = 'x\xb0'
+VAR_NAME = 'Andr\xe9'
+
+class UnicodeTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        f = netCDF4.Dataset(self.file,'w')
+        f.attribute1 = ATT1
+        f.attribute2 = ATT2
+        f.attribute3 = ATT3
+        d = f.createDimension(DIM_NAME, None)
+        v = f.createVariable(VAR_NAME, np.float, (DIM_NAME,))
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def runTest(self):
+        """testing unicode"""
+        f  = netCDF4.Dataset(self.file, 'r')
+        d = f.dimensions[DIM_NAME]
+        v = f.variables[VAR_NAME]
+        # check accessing individual attributes.
+        assert f.attribute1 == ATT1
+        assert f.attribute2 == ATT2
+        assert f.attribute3 == ''.join(ATT3)
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_unlimdim.py b/test/tst_unlimdim.py
new file mode 100644
index 0000000..0b42757
--- /dev/null
+++ b/test/tst_unlimdim.py
@@ -0,0 +1,66 @@
+import sys
+import unittest
+import os
+import tempfile
+import numpy as NP
+from numpy.random.mtrand import uniform 
+from numpy.testing import assert_array_equal, assert_array_almost_equal
+import netCDF4
+
+# test creating variables with unlimited dimensions,
+# writing to and retrieving data from such variables.
+
+# create an n1dim by n2dim by n3dim random array
+n1dim = 4
+n2dim = 10
+n3dim = 8
+ranarr = 100.*uniform(size=(n1dim,n2dim,n3dim))
+FILE_NAME = tempfile.mktemp(".nc")
+
+class UnlimdimTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        f  = netCDF4.Dataset(self.file, 'w')
+        # foo has a single unlimited dimension
+        f.createDimension('n1', n1dim)
+        f.createDimension('n2', None)
+        f.createDimension('n3', n3dim)
+        foo = f.createVariable('data1', ranarr.dtype.str[1:], ('n1','n2','n3'))
+        # write some data to it.
+        #foo[:,0:n2dim,:] = ranarr 
+        foo[:] = ranarr 
+        foo[:,n2dim:,:] = 2.*ranarr
+        # bar has 2 unlimited dimensions
+        f.createDimension('n4', None)
+        f.createDimension('n5', n2dim)
+        f.createDimension('n6', None)
+        # write some data to it.
+        bar = f.createVariable('data2', ranarr.dtype.str[1:], ('n4','n5','n6'))
+#       bar[0:n1dim,:, 0:n3dim] = ranarr
+        bar[0:n1dim,:, 0:n3dim] = 2.0
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def runTest(self):
+        """testing unlimited dimensions"""
+        f  = netCDF4.Dataset(self.file, 'r')
+        foo = f.variables['data1']
+        # check shape.
+        self.assertTrue(foo.shape == (n1dim,2*n2dim,n3dim))
+        # check data.
+        assert_array_almost_equal(foo[:,0:n2dim,:], ranarr)
+        assert_array_almost_equal(foo[:,n2dim:2*n2dim,:], 2.*ranarr)
+        bar = f.variables['data2']
+        # check shape.
+        self.assertTrue(bar.shape == (n1dim,n2dim,n3dim))
+        # check data.
+        #assert_array_almost_equal(bar[:,:,:], ranarr)
+        assert_array_almost_equal(bar[:,:,:], 2.*NP.ones((n1dim,n2dim,n3dim),ranarr.dtype))
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_utils.py b/test/tst_utils.py
new file mode 100644
index 0000000..946d5be
--- /dev/null
+++ b/test/tst_utils.py
@@ -0,0 +1,271 @@
+from numpy.testing import assert_equal
+import netCDF4 as nc
+import unittest
+import numpy as np
+
+class TestgetStartCountStride(unittest.TestCase):
+
+    def test_basic(self):
+        # Basic usage
+        elem = [0, slice(None), slice(None)]
+        start, count, stride, put_ind = nc._StartCountStride(elem, (50, 4, 10))
+        assert_equal(start, 0)
+        assert_equal(count[..., 0], 1)
+        assert_equal(count[..., 1], 4)
+        assert_equal(count[..., 2], 10)
+        assert_equal(stride, 1)
+        assert_equal(put_ind[...,0], -1)
+        assert_equal(put_ind[...,1], slice(None))
+        assert_equal(put_ind[...,2], slice(None))
+        assert_equal(nc._out_array_shape(count), (1, 4,10))
+
+    def test_slice(self):
+        # start and stop slice
+        elem = [5, slice(None), slice(5, 8, 2)]
+        start, count, stride, put_ind = nc._StartCountStride(elem, (50, 4, 10))
+        assert_equal(start[..., 0], 5)
+        assert_equal(start[..., 1], 0)
+        assert_equal(start[..., 2], 5)
+        assert_equal(count[..., 0], 1)
+        assert_equal(count[..., 1], 4)
+        assert_equal(count[..., 2], 2)
+        assert_equal(stride[..., 2], 2)
+
+        assert_equal(nc._out_array_shape(count), (1, 4,2))
+
+    def test_fancy(self):
+        # Fancy indexing
+        elem = [slice(None), [1,2,3], 8]
+        start, count, stride, put_ind = nc._StartCountStride(elem, (50, 4, 10))
+        assert_equal(start[..., 0], 0)
+        assert_equal(start[..., 1].squeeze(), 1)
+        assert_equal(start[..., 2], 8)
+        assert_equal(count[...,0], 50)
+        assert_equal(count[...,1], 3)
+        assert_equal(count[...,2], 1)
+        assert_equal(put_ind[...,1].squeeze(), slice(None, None, None))
+
+        assert_equal(nc._out_array_shape(count), (50, 3, 1))
+
+        i = np.array([2,5,7],'i4')
+        elem = [slice(None, -1,2),i,slice(None)]
+        start, count, stride, put_ind = nc._StartCountStride(elem, (9,10,11))
+
+
+        try:
+            elem = ( np.arange(6).reshape((3,2)), slice(None), slice(None) )
+            start, count, stride, put_ind = nc._StartCountStride(elem, (3,4,5))
+        except IndexError:
+            pass
+
+        # this one should be converted to a slice
+        elem = [slice(None), [1,3,5], 8]
+        start, count, stride, put_ind = nc._StartCountStride(elem, (50, 6, 10))
+        assert_equal(put_ind[...,1].squeeze(), slice(None,None,None))
+
+
+    def test_multiple_sequences(self):
+        elem = [[4,6,7], [1,2,3], slice(None)]
+        start, count, stride, put_ind = nc._StartCountStride(elem, (50, 4, 10))
+
+        assert_equal(nc._out_array_shape(count), (3, 3, 10))
+
+        assert_equal(start[..., 0].squeeze(), [4,6,7])
+        assert_equal(start[..., 1].squeeze(), [1,1,1])
+        assert_equal(start[..., 2], 0)
+        assert_equal(count[...,0], 1)
+        assert_equal(count[...,1], 3)
+        assert_equal(count[...,2], 10)
+
+        i = [1,3,4]
+        elem = (i, i, i)
+        start, count, stride, put_ind = nc._StartCountStride(elem, (50, 5, 10))
+        assert_equal(nc._out_array_shape(count), (3,3,3))
+
+    def test_put_indices(self):
+        elem = (1, slice(None), slice(None))
+        start, count, stride, put_ind = nc._StartCountStride(elem, (3,4,5))
+        orig = np.arange(60).reshape((3,4,5))
+        dest = np.empty(nc._out_array_shape(count))
+        dest[tuple(put_ind[0,0,0])] = orig[tuple(elem)]
+
+    def test_boolean(self):
+        elem = (1, slice(None), np.array([True, True, False, False, True]))
+        start, count, stride, put_ind = nc._StartCountStride(elem, (50, 4,5))
+
+        assert_equal(start[..., 2].squeeze(), [0,1,4])
+        assert_equal(count[...,2], 1)
+
+        assert_equal(nc._out_array_shape(count), (1, 4, 3))
+
+        # Multiple booleans --- The behavior is different from NumPy in this case.
+        elem = (np.array([True, True, False]), np.array([True, True, False, True]), slice(None))
+        start, count, stride, put_ind = nc._StartCountStride(elem, (3,4,5))
+        assert_equal(nc._out_array_shape(count), (2,3,5))
+
+        try:
+            elem = (np.array([True, True, False]), np.array([True, True, True, False]), slice(None))
+        except IndexError:
+            pass
+
+
+
+    def test_1d(self):
+        # Scalar
+        elem = (0)
+        start, count, stride, put_ind = nc._StartCountStride(elem, (10,))
+        assert_equal(start, 0)
+        assert_equal(count, 1)
+        assert_equal(stride, 1)
+        assert_equal(put_ind, -1)
+
+        elem = (-1)
+        start, count, stride, put_ind = nc._StartCountStride(elem, (10,))
+        assert_equal(start, 9)
+        assert_equal(count, 1)
+        assert_equal(stride, 1)
+        assert_equal(put_ind, -1)
+
+        elem = (np.array([0]))
+        start, count, stride, put_ind = nc._StartCountStride(elem, (10,))
+        assert_equal(start, 0)
+        assert_equal(count, 1)
+        assert_equal(stride, 1)
+        assert_equal(put_ind[:,0], slice(None,None,None))
+
+        # Slice
+        elem = (slice(2,5,2))
+        start, count, stride, put_ind = nc._StartCountStride(elem, (10,))
+        assert_equal(start, 2)
+        assert_equal(count, 2)
+        assert_equal(stride, 2)
+        assert_equal(put_ind, slice(None))
+
+        # Integer sequence
+        elem = ([2,4,7])
+        start, count, stride, put_ind = nc._StartCountStride(elem, (10,))
+        assert_equal(start.squeeze(), [2,4,7])
+        assert_equal(count, 1)
+        assert_equal(stride, 1)
+        assert_equal(put_ind[:,0], [0,1,2])
+
+        # Boolean slicing
+        elem = (np.array([True, True, False, True, False]),)
+        start, count, stride, put_ind = nc._StartCountStride(elem, (5,))
+        assert_equal(start.squeeze(), [0,1,3])
+        assert_equal(count, 1)
+        assert_equal(stride, 1)
+        assert_equal(put_ind[:,0], [0,1,2])
+
+        # Integer sequence simplification
+        elem = ([2,3,4])
+        start, count, stride, put_ind = nc._StartCountStride(elem, (10,))
+        assert_equal(start, 2)
+        assert_equal(count, 3)
+        assert_equal(stride, 1)
+        assert_equal(put_ind, slice(None))
+
+        # Boolean indices simplification
+        elem = (np.array([False, True, True, True, False]))
+        start, count, stride, put_ind = nc._StartCountStride(elem, (5,))
+        assert_equal(start, 1)
+        assert_equal(count, 3)
+        assert_equal(stride, 1)
+        assert_equal(put_ind, slice(None))
+
+        # All False
+        elem = (np.array([False, False, False, False]))
+        start, count, stride, put_ind = nc._StartCountStride(elem, (4,))
+
+        assert_equal(count, 0)
+        assert_equal(nc._out_array_shape(count), (0,))
+
+
+class TestsetStartCountStride(unittest.TestCase):
+
+    def test_basic(self):
+
+        grp = FakeGroup({'x':False, 'y':False, 'time':True})
+
+        elem=(slice(None), slice(None), 1)
+        start, count, stride, take_ind = nc._StartCountStride(elem, (22, 25, 1), ['x', 'y', 'time'], grp, (22,25))
+        assert_equal(start[0][0][0], [0, 0, 1])
+        assert_equal(count[0][0][0], (22, 25, 1))
+        assert_equal(take_ind[0][0][0], (slice(None), slice(None), -1))
+
+        elem=(slice(None), slice(None), slice(1, 4))
+        start, count, stride, take_ind = nc._StartCountStride(elem, (22,25,1),\
+            ['x', 'y', 'time'], grp, (22,25,3), put=True)
+        assert_equal(start[0][0][0], [0, 0, 1])
+        assert_equal(count[0][0][0], (22, 25, 3))
+        assert_equal(take_ind[0][0][0], (slice(None), slice(None), slice(None)))
+
+    def test_integer(self):
+        grp = FakeGroup({'x':False, 'y':False})
+
+        elem=([0,4,5], slice(20, None))
+        start, count, stride, take_ind = nc._StartCountStride(elem, (22, 25), ['x', 'y'], grp, (3,5))
+        assert_equal(start[0][0], (0, 20))
+        assert_equal(start[1][0], (4, 20))
+        assert_equal(start[2][0], (5, 20))
+        assert_equal(count[0], np.array([[1,5],]))
+        assert_equal(stride[0][0], (1, 1))
+        assert_equal(take_ind[0][0], (0, slice(None)))
+        assert_equal(take_ind[1][0], (1, slice(None)))
+        assert_equal(take_ind[2][0], (2, slice(None)))
+
+
+    def test_booleans(self):
+        grp = FakeGroup({'x':False, 'y':False, 'z':False})
+
+        elem=([0,4,5], np.array([False, True, False, True, True]), slice(None))
+        start, count, stride, take_ind = nc._StartCountStride(elem, (10, 5, 12), ['x', 'y', 'z'], grp, (3, 3, 12))
+        assert_equal(start[0][0][0], (0, 1, 0))
+        assert_equal(start[1][0][0], (4, 1, 0))
+        assert_equal(start[2][0][0], (5, 1, 0))
+        assert_equal(start[0][1][0], (0, 3, 0))
+        assert_equal(count[0][0][0], (1, 1, 12))
+        assert_equal(stride[0][0][0], (1, 1, 1))
+        assert_equal(take_ind[0][0][0], (0, 0, slice(None)))
+        assert_equal(take_ind[1][0][0], (1, 0, slice(None)))
+        assert_equal(take_ind[0][1][0], (0, 1, slice(None)))
+
+    def test_unlim(self):
+        grp = FakeGroup({'time':True,'x':False, 'y':False})
+
+        elem = ([0,2,5], slice(None), slice(None))
+        start, count, stride, take_ind = nc._StartCountStride(elem, (0, 6, 7),\
+                ['time', 'x', 'y'], grp, (3, 6, 7), put=True)
+        assert_equal(start[0][0][0], (0, 0, 0))
+        assert_equal(start[2][0][0], (5, 0, 0))
+        assert_equal(count[2][0][0], (1, 6, 7))
+        assert_equal(take_ind[0][0][0], (0, slice(None), slice(None)))
+        assert_equal(take_ind[2][0][0], (2, slice(None), slice(None)))
+
+
+        elem = (slice(None, None, 2), slice(None), slice(None))
+        start, count, stride, take_ind = nc._StartCountStride(elem, (0, 6, 7),\
+                ['time', 'x', 'y'], grp, (10, 6, 7),put=True)
+        assert_equal(start[0][0][0], (0,0,0))
+        assert_equal(count[0][0][0], (5, 6, 7))
+        assert_equal(stride[0][0][0], (2, 1, 1))
+        assert_equal(take_ind[0][0][0], 3*(slice(None),))
+
+
+class FakeGroup(object):
+    """Create a fake group instance by passing a dictionary of booleans
+    keyed by dimension name."""
+    def __init__(self, dimensions):
+        self.dimensions = {}
+        for k,v in dimensions.items():
+            self.dimensions[k] = FakeDimension(v)
+
+class FakeDimension(object):
+    def __init__(self, unlimited=False):
+        self.unlimited = unlimited
+
+    def isunlimited(self):
+        return self.unlimited
+
+if __name__=='__main__':
+    unittest.main()
diff --git a/test/tst_vars.py b/test/tst_vars.py
new file mode 100644
index 0000000..398c5a2
--- /dev/null
+++ b/test/tst_vars.py
@@ -0,0 +1,94 @@
+import sys
+import unittest
+import os
+import tempfile
+import numpy as NP
+from numpy.random.mtrand import uniform 
+from numpy.testing import assert_array_equal, assert_array_almost_equal
+import netCDF4
+
+# test variable creation.
+
+FILE_NAME = tempfile.mktemp(".nc")
+VAR_DOUBLE_NAME="dummy_var"
+VAR_SHORT_NAME='dummy_var_short'
+VARNAMES = sorted([VAR_DOUBLE_NAME,VAR_SHORT_NAME])
+GROUP_NAME = "dummy_group"
+DIM1_NAME="x"
+DIM1_LEN=2
+DIM2_NAME="y"
+DIM2_LEN=3
+DIM3_NAME="z"
+DIM3_LEN=25
+
+randomdata = uniform(size=(DIM1_LEN,DIM2_LEN,DIM3_LEN))
+
+class VariablesTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        f  = netCDF4.Dataset(self.file, 'w')
+        f.createDimension(DIM1_NAME, DIM1_LEN)
+        f.createDimension(DIM2_NAME, DIM2_LEN)
+        f.createDimension(DIM3_NAME, DIM3_LEN)
+        v1 = f.createVariable(VAR_DOUBLE_NAME, 'f8',(DIM1_NAME,DIM2_NAME,DIM3_NAME))
+        v2 = f.createVariable(VAR_SHORT_NAME, 'i2',(DIM2_NAME,DIM3_NAME))
+        v1.long_name = 'dummy data root'
+        g = f.createGroup(GROUP_NAME)
+        g.createDimension(DIM1_NAME, DIM1_LEN)
+        g.createDimension(DIM2_NAME, DIM2_LEN)
+        g.createDimension(DIM3_NAME, DIM3_LEN)
+        v1g = g.createVariable(VAR_DOUBLE_NAME, 'f8',(DIM1_NAME,DIM2_NAME,DIM3_NAME))
+        v2g = g.createVariable(VAR_SHORT_NAME, 'i2',(DIM2_NAME,DIM3_NAME))
+        v1g.long_name = 'dummy data subgroup'
+        v1[:] = randomdata
+        v1g[:] = randomdata
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def runTest(self):
+        """testing primitive variables"""
+        f  = netCDF4.Dataset(self.file, 'r')
+        # check variables in root group.
+        varnames = sorted(f.variables.keys())
+        v1 = f.variables[VAR_DOUBLE_NAME]
+        v2 = f.variables[VAR_SHORT_NAME]
+        assert varnames == VARNAMES
+        assert v1.dtype.str[1:] == 'f8'
+        assert v2.dtype.str[1:] == 'i2'
+        assert v1.long_name == 'dummy data root'
+        assert v1.dimensions == (DIM1_NAME,DIM2_NAME,DIM3_NAME)
+        assert v2.dimensions == (DIM2_NAME,DIM3_NAME)
+        assert v1.shape == (DIM1_LEN,DIM2_LEN,DIM3_LEN)
+        assert v2.shape == (DIM2_LEN,DIM3_LEN)
+        assert v1.size == DIM1_LEN * DIM2_LEN * DIM3_LEN
+        assert len(v1) == DIM1_LEN
+        
+        #assert NP.allclose(v1[:],randomdata)
+        assert_array_almost_equal(v1[:],randomdata)
+        # check variables in sub group.
+        g = f.groups[GROUP_NAME]
+        varnames = sorted(g.variables.keys())
+        v1 = g.variables[VAR_DOUBLE_NAME]
+        # test iterating over variable (should stop when 
+        # it gets to the end and raises IndexError, issue 121)
+        for v in v1:
+            pass
+        v2 = g.variables[VAR_SHORT_NAME]
+        assert varnames == VARNAMES
+        assert v1.dtype.str[1:] == 'f8'
+        assert v2.dtype.str[1:] == 'i2'
+        assert v1.long_name == 'dummy data subgroup'
+        assert v1.dimensions == (DIM1_NAME,DIM2_NAME,DIM3_NAME)
+        assert v2.dimensions == (DIM2_NAME,DIM3_NAME)
+        assert v1.shape == (DIM1_LEN,DIM2_LEN,DIM3_LEN)
+        assert v2.shape == (DIM2_LEN,DIM3_LEN)
+        #assert NP.allclose(v1[:],randomdata)
+        assert_array_almost_equal(v1[:],randomdata)
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_vlen.py b/test/tst_vlen.py
new file mode 100644
index 0000000..aea1d97
--- /dev/null
+++ b/test/tst_vlen.py
@@ -0,0 +1,123 @@
+import sys
+import unittest
+import os
+import tempfile
+from netCDF4 import Dataset
+import numpy as np
+from numpy.testing import assert_array_equal
+
+FILE_NAME = tempfile.mktemp(".nc")
+VL_NAME = 'vlen_type'
+VL_BASETYPE = np.int16
+DIM1_NAME = 'lon'
+DIM2_NAME = 'lat'
+nlons = 5; nlats = 5
+VAR1_NAME = 'ragged'
+VAR2_NAME = 'strings'
+VAR3_NAME = 'strings_alt'
+data = np.empty(nlats*nlons,object)
+datas = np.empty(nlats*nlons,object)
+nn = 0
+for n in range(nlats*nlons):
+    nn = nn + 1
+    data[n] = np.arange(nn,dtype=VL_BASETYPE)
+    datas[n] = ''.join([chr(i) for i in range(97,97+nn+1)])
+data = np.reshape(data,(nlats,nlons))
+datas = np.reshape(datas,(nlats,nlons))
+
+
+class VariablesTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        f = Dataset(self.file,'w')
+        vlen_t = f.createVLType(VL_BASETYPE, VL_NAME)
+        f.createDimension(DIM1_NAME,nlons)
+        f.createDimension(DIM2_NAME,nlats)
+        ragged = f.createVariable(VAR1_NAME, vlen_t,\
+                (DIM2_NAME,DIM1_NAME))
+        strings = f.createVariable(VAR2_NAME, str,
+                (DIM2_NAME,DIM1_NAME))
+        strings_alt = f.createVariable(VAR3_NAME, datas.astype(str).dtype,
+                                       (DIM2_NAME, DIM1_NAME))
+        ragged[:] = data
+        ragged[-1,-1] = data[-1,-1]
+        strings[:] = datas
+        strings[-2,-2] = datas[-2,-2]
+        strings_alt[:] = datas.astype(str)
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def runTest(self):
+        """testing vlen variables"""
+        f = Dataset(self.file, 'r')
+        v = f.variables[VAR1_NAME]
+        vs = f.variables[VAR2_NAME]
+        vs_alt = f.variables[VAR3_NAME]
+        assert list(f.vltypes.keys()) == [VL_NAME]
+        assert f.vltypes[VL_NAME].dtype == VL_BASETYPE
+        data2 = v[:]
+        data2s = vs[:]
+        for i in range(nlons):
+            for j in range(nlats):
+                assert_array_equal(data2[j,i], data[j,i])
+                assert datas[j,i] == data2s[j,i]
+        assert_array_equal(datas, vs_alt[:])
+        f.close()
+
+
+class TestInvalidDataType(unittest.TestCase):
+    def runTest(self):
+        f = Dataset(FILE_NAME, 'w', format='NETCDF3_CLASSIC')
+        f.createDimension('x', 1)
+        with self.assertRaisesRegexp(ValueError, 'strings are only supported'):
+           f.createVariable('foo', str, ('x',))
+        f.close()
+        os.remove(FILE_NAME)
+
+class TestScalarVlenString(unittest.TestCase):
+    # issue 333
+    def runTest(self):
+        f = Dataset(FILE_NAME, 'w', format='NETCDF4')
+        teststring = f.createVariable('teststring', str)
+        stringout = "yyyymmdd_hhmmss"
+        teststring[()] = stringout
+        f.close()
+        f = Dataset(FILE_NAME)
+        assert f.variables['teststring'][:] == stringout
+        f.close()
+        os.remove(FILE_NAME)
+
+class TestObjectArrayIndexing(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        f = Dataset(self.file,'w')
+        vlen_t = f.createVLType(VL_BASETYPE, VL_NAME)
+        f.createDimension(DIM1_NAME,nlons)
+        f.createDimension(DIM2_NAME,nlats)
+        strings_alt = f.createVariable(VAR3_NAME, datas.astype(str).dtype,
+                                       (DIM2_NAME, DIM1_NAME))
+        strings_alt[:] = datas.astype(str)
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def runTest(self):
+        """testing vlen variables"""
+        f = Dataset(self.file, 'r')
+        vs_alt = f.variables[VAR3_NAME]
+        unicode_strings = vs_alt[:]
+        fancy_indexed = unicode_strings[0][[1,2,4]] 
+        assert fancy_indexed[0] == 'abc'
+        assert fancy_indexed[1] == 'abcd'
+        assert fancy_indexed[2] == 'abcdef'
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/utils.pyx b/utils.pyx
new file mode 100644
index 0000000..9769ec2
--- /dev/null
+++ b/utils.pyx
@@ -0,0 +1,820 @@
+from datetime import timedelta, datetime
+
+gregorian = datetime(1582,10,15)
+
+def _dateparse(timestr):
+    """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss,
+    return a datetime instance"""
+    try:
+        import dateutil.parser as dparse
+        from dateutil.tz import tzutc
+    except ImportError:
+        msg = 'dateutil module required for accuracy < 1 second'
+        raise ImportError(msg)
+    timestr_split = timestr.split()
+    units = timestr_split[0].lower()
+    if timestr_split[1].lower() != 'since':
+        raise ValueError("no 'since' in unit_string")
+    # parse the date string.
+    n = timestr.find('since')+6
+    isostring = timestr[n:]
+    basedate = dparse.parse(isostring)
+    if basedate.tzinfo is None:
+        basedate = basedate.replace(tzinfo=tzutc())
+    return basedate
+
+# utility functions (visible from python).
+
+def stringtoarr(string,NUMCHARS,dtype='S'):
+    """
+stringtoarr(a, NUMCHARS,dtype='S')
+
+convert a string to a character array of length NUMCHARS
+
+ at param a:  Input python string.
+
+ at param NUMCHARS:  number of characters used to represent string 
+(if len(a) < NUMCHARS, it will be padded on the right with blanks).
+
+ at keyword dtype:  type of numpy array to return.  Default is 'S', which 
+means an array of dtype 'S1' will be returned.  If dtype='U', a
+unicode array (dtype = 'U1') will be returned.
+
+ at return: A rank 1 numpy character array of length NUMCHARS with datatype 'S1'
+(default) or 'U1' (if dtype='U')"""
+    if dtype not in ["S","U"]:
+        raise ValueError("dtype must string or unicode ('S' or 'U')")
+    arr = numpy.zeros(NUMCHARS,dtype+'1')
+    arr[0:len(string)] = tuple(string)
+    return arr
+
+def stringtochar(a):
+    """
+stringtochar(a)
+
+convert a string array to a character array with one extra dimension
+
+ at param a:  Input numpy string array with numpy datatype 'SN' or 'UN', where N
+is the number of characters in each string.  Will be converted to
+an array of characters (datatype 'S1' or 'U1') of shape a.shape + (N,).
+
+ at return: A numpy character array with datatype 'S1' or 'U1'
+and shape a.shape + (N,), where N is the length of each string in a."""
+    dtype = a.dtype.kind
+    if dtype not in ["S","U"]:
+        raise ValueError("type must string or unicode ('S' or 'U')")
+    b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1')
+    b.shape = a.shape + (a.itemsize,)
+    return b
+
+def chartostring(b):
+    """
+chartostring(b)
+
+convert a character array to a string array with one less dimension.
+
+ at param b:  Input character array (numpy datatype 'S1' or 'U1').
+Will be converted to a array of strings, where each string has a fixed
+length of b.shape[-1] characters.
+
+ at return: A numpy string array with datatype 'SN' or 'UN' and shape b.shape[:-1],
+where N=b.shape[-1]."""
+    dtype = b.dtype.kind
+    if dtype not in ["S","U"]:
+        raise ValueError("type must string or unicode ('S' or 'U')")
+    bs = b.tostring().decode(default_encoding)
+    slen = int(b.shape[-1])
+    a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen))
+    a.shape = b.shape[:-1]
+    return a
+
+def date2num(dates,units,calendar='standard'):
+    """
+date2num(dates,units,calendar='standard')
+
+Return numeric time values given datetime objects. The units
+of the numeric time values are described by the L{units} argument
+and the L{calendar} keyword. The datetime objects must
+be in UTC with no time-zone offset.  If there is a 
+time-zone offset in C{units}, it will be applied to the
+returned numeric values.
+
+ at param dates: A datetime object or a sequence of datetime objects.
+The datetime objects should not include a time-zone offset.
+
+ at param units: a string of the form C{'B{time units} since B{reference time}}'
+describing the time units. B{C{time units}} can be days, hours, minutes,
+seconds, milliseconds or microseconds. B{C{reference time}} is the time
+origin. Milliseconds and microseconds
+can only be used with the proleptic_gregorian calendar, or the standard
+and gregorian calendars if the time origin is after 1582-10-15.
+A valid choice would be units=C{'milliseconds since 1800-01-01 00:00:00-6:00'}.
+
+ at param calendar: describes the calendar used in the time calculations. 
+All the values currently defined in the U{CF metadata convention 
+<http://cf-pcmdi.llnl.gov/documents/cf-conventions/>} are supported.
+Valid calendars C{'standard', 'gregorian', 'proleptic_gregorian'
+'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'}.
+Default is C{'standard'}, which is a mixed Julian/Gregorian calendar.
+
+ at return: a numeric time value, or an array of numeric time values.
+    """
+    unit = units.split()[0].lower()
+    if unit in ['microseconds','milliseconds','microsecond','millisecond']:
+        basedate = _dateparse(units)
+        from dateutil.tz import tzutc
+        if calendar != 'proleptic_gregorian' and not \
+           (calendar in ['gregorian','standard'] and \
+            basedate > gregorian.replace(tzinfo=tzutc())):
+            msg = 'milliseconds/microseconds not supported for this calendar'
+            raise ValueError(msg)
+        # use python datetime module,
+        isscalar = False
+        try:
+            dates[0]
+        except:
+            isscalar = True
+        if isscalar: dates = [dates]
+        ismasked = False
+        if hasattr(dates,'mask'):
+            mask = dates.mask
+            ismasked = True
+        times = []
+        for date in dates:
+            if ismasked and not date:
+                times.append(None)
+            else:
+                date = date.replace(tzinfo=tzutc())
+                td = date - basedate
+                totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6
+                if unit == 'microseconds' or unit == 'microsecond':
+                    times.append(totaltime)
+                elif unit == 'milliseconds' or unit == 'millisecond':
+                    times.append(totaltime/1.e3)
+                elif unit == 'seconds' or unit == 'second':
+                    times.append(totaltime/1.e6)
+                elif unit == 'hours' or unit == 'hour':
+                    times.append(totaltime/1.e6/3600)
+                elif unit == 'days' or unit == 'day':
+                    times.append(totaltime/1.e6/3600./24.)
+        if isscalar:
+            return times[0]
+        else:
+            return times
+    else: # if only second accuracy required, can use other calendars.
+        cdftime = netcdftime.utime(units,calendar=calendar)
+        return cdftime.date2num(dates)
+
+def num2date(times,units,calendar='standard'):
+    """
+num2date(times,units,calendar='standard')
+
+Return datetime objects given numeric time values. The units
+of the numeric time values are described by the C{units} argument
+and the C{calendar} keyword. The returned datetime objects represent 
+UTC with no time-zone offset, even if the specified 
+C{units} contain a time-zone offset.
+
+ at param times: numeric time values. 
+
+ at param units: a string of the form C{'B{time units} since B{reference time}}'
+describing the time units. B{C{time units}} can be days, hours, minutes,
+seconds, milliseconds or microseconds. B{C{reference time}} is the time
+origin. Milliseconds and microseconds
+can only be used with the proleptic_gregorian calendar, or the standard
+and gregorian calendars if the time origin is after 1582-10-15.
+A valid choice would be units=C{'milliseconds since 1800-01-01 00:00:00-6:00'}.
+
+ at keyword calendar: describes the calendar used in the time calculations. 
+All the values currently defined in the U{CF metadata convention 
+<http://cf-pcmdi.llnl.gov/documents/cf-conventions/>} are supported.
+Valid calendars C{'standard', 'gregorian', 'proleptic_gregorian'
+'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'}.
+Default is C{'standard'}, which is a mixed Julian/Gregorian calendar.
+
+ at return: a datetime instance, or an array of datetime instances.
+
+The datetime instances returned are 'real' python datetime 
+objects if the date falls in the Gregorian calendar (i.e. 
+C{calendar='proleptic_gregorian'}, or C{calendar = 'standard'} or C{'gregorian'}
+and the date is after 1582-10-15). Otherwise, they are 'phony' datetime 
+objects which support some but not all the methods of 'real' python
+datetime objects.  This is because the python datetime module cannot
+the uses the C{'proleptic_gregorian'} calendar, even before the switch
+occured from the Julian calendar in 1582. The datetime instances
+do not contain a time-zone offset, even if the specified C{units}
+contains one.
+    """
+    unit = units.split()[0].lower()
+    if unit in ['microseconds','milliseconds','microsecond','millisecond']:
+        basedate = _dateparse(units)
+        from dateutil.tz import tzutc
+        if calendar != 'proleptic_gregorian' and not \
+           (calendar in ['gregorian','standard'] and \
+            basedate > gregorian.replace(tzinfo=tzutc())):
+            msg = 'milliseconds/microseconds not supported for this calendar'
+            raise ValueError(msg)
+        isscalar = False
+        try:
+            times[0]
+        except:
+            isscalar = True
+        if isscalar: times = [times]
+        ismasked = False
+        if hasattr(times,'mask'):
+            mask = times.mask
+            ismasked = True
+        dates = []
+        for time in times:
+            if ismasked and not time:
+                dates.append(None)
+            else:
+                # convert to total seconds
+                if unit == 'microseconds' or unit == 'microsecond':
+                    tsecs = time/1.e6
+                elif unit == 'milliseconds' or unit == 'millisecond':
+                    tsecs = time/1.e3
+                elif unit == 'seconds' or unit == 'second':
+                    tsecs = time
+                elif unit == 'hours' or unit == 'hour':
+                    tsecs = time*3600.
+                elif unit == 'days' or unit == 'day':
+                    tsecs = time*86400.
+                # compute time delta.
+                days = tsecs // 86400.
+                msecsd = tsecs*1.e6 - days*86400.*1.e6
+                secs = msecsd // 1.e6
+                msecs = int(msecsd - secs*1.e6)
+                td = timedelta(days=days,seconds=secs,microseconds=msecs)
+                # add time delta to base date.
+                date = basedate + td
+                dates.append(date)
+        if isscalar:
+            return dates[0]
+        else:
+            return dates
+    else: # if only second accuracy required, can use other calendars.
+        cdftime = netcdftime.utime(units,calendar=calendar)
+        return cdftime.num2date(times)
+
+def date2index(dates, nctime, calendar=None, select='exact'):
+    """
+date2index(dates, nctime, calendar=None, select='exact')
+
+Return indices of a netCDF time variable corresponding to the given dates.
+
+ at param dates: A datetime object or a sequence of datetime objects.
+The datetime objects should not include a time-zone offset.
+
+ at param nctime: A netCDF time variable object. The nctime object must have a
+C{units} attribute.
+
+ at keyword calendar: Describes the calendar used in the time calculation.
+Valid calendars C{'standard', 'gregorian', 'proleptic_gregorian'
+'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'}.
+Default is C{'standard'}, which is a mixed Julian/Gregorian calendar
+If C{calendar} is None, its value is given by C{nctime.calendar} or
+C{standard} if no such attribute exists.
+
+ at keyword select: C{'exact', 'before', 'after', 'nearest'}
+The index selection method. C{exact} will return the indices perfectly 
+matching the dates given. C{before} and C{after} will return the indices 
+corresponding to the dates just before or just after the given dates if 
+an exact match cannot be found. C{nearest} will return the indices that 
+correspond to the closest dates. 
+      
+ at return: an index (indices) of the netCDF time variable corresponding
+to the given datetime object(s).
+    """
+    unit = nctime.units.split()[0].lower()
+    if calendar == None:
+        calendar = getattr(nctime, 'calendar', 'standard')
+    if unit in ['microseconds','milliseconds','microsecond','millisecond']:
+        # for microsecond and/or millisecond accuracy, convert dates
+        # to numerical times, then use netcdftime.time2index.
+        basedate = _dateparse(nctime.units)
+        from dateutil.tz import tzutc
+        # can only use certain calendars.
+        if calendar != 'proleptic_gregorian' and not \
+           (calendar in ['gregorian','standard'] and \
+            basedate > gregorian.replace(tzinfo=tzutc())):
+            msg = 'milliseconds/microseconds not supported for this calendar'
+            raise ValueError(msg)
+        times = date2num(dates,nctime.units,calendar=calendar)
+        return netcdftime.time2index(times, nctime, calendar, select)
+    else: # if only second accuracy required, can use other calendars.
+        return netcdftime.date2index(dates, nctime, calendar, select)
+
+def getlibversion():
+    """
+getlibversion()
+
+returns a string describing the version of the netcdf library
+used to build the module, and when it was built.
+    """
+    return (<char *>nc_inq_libvers()).decode('ascii')
+
+class MFDataset(Dataset): 
+    """
+MFDataset(self, files, check=False, aggdim=None, exclude=[])
+
+Class for reading multi-file netCDF Datasets, making variables
+spanning multiple files appear as if they were in one file.
+
+Datasets must be in C{NETCDF4_CLASSIC, NETCDF3_CLASSIC or NETCDF3_64BIT}
+format (C{NETCDF4} Datasets won't work).
+
+Adapted from U{pycdf <http://pysclint.sourceforge.net/pycdf>} by Andre Gosselin.
+
+Example usage:
+
+>>> import numpy
+>>> # create a series of netCDF files with a variable sharing
+>>> # the same unlimited dimension.
+>>> for nfile in range(10):
+>>>     f = Dataset('mftest'+repr(nfile)+'.nc','w')
+>>>     f.createDimension('x',None)
+>>>     x = f.createVariable('x','i',('x',))
+>>>     x[0:10] = numpy.arange(nfile*10,10*(nfile+1))
+>>>     f.close()
+>>> # now read all those files in at once, in one Dataset.
+>>> f = MFDataset('mftest*nc')
+>>> print f.variables['x'][:]
+[ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
+ 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
+ 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
+ 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99]
+    """
+
+    def __init__(self, files, check=False, aggdim=None, exclude=[]):
+        """
+Open a Dataset spanning multiple files, making it look as if it was a 
+single file. Variables in the list of files that share the same 
+dimension (specified with the keyword C{aggdim}) are aggregated. If
+C{aggdim} is not specified, the unlimited is aggregated.  Currently,
+C{aggdim} must be the leftmost (slowest varying) dimension of each
+of the variables to be aggregated.
+
+Adapted from U{pycdf <http://pysclint.sourceforge.net/pycdf>} by Andre Gosselin.
+
+Usage:
+
+nc = MFDataset(files, check=False, aggdim=None, exclude=[])
+
+ at param files: either a sequence of netCDF files or a string with a 
+wildcard (converted to a sorted list of files using glob)  The first file 
+in the list will become the "master" file, defining all the 
+variables with an aggregation dimension which may span 
+subsequent files. Attribute access returns attributes only from "master" 
+file. The files are always opened in read-only mode.
+
+ at keyword check: True if you want to do consistency checking to ensure the 
+correct variables structure for all of the netcdf files.  Checking makes 
+the initialization of the MFDataset instance much slower. Default is 
+False.
+
+ at keyword aggdim: The name of the dimension to aggregate over (must
+be the leftmost dimension of each of the variables to be aggregated).
+If None (default), aggregate over the unlimited dimension.
+
+ at keyword exclude: A list of variable names to exclude from aggregation. 
+Default is an empty list.
+       """
+
+        # Open the master file in the base class, so that the CDFMF instance
+        # can be used like a CDF instance.
+        if isinstance(files, str):
+            if files.startswith('http'):
+                msg='cannot using file globbing for remote (OPeNDAP) datasets'
+                raise ValueError(msg)
+            else:
+                files = sorted(glob(files))
+        
+        master = files[0]
+
+        # Open the master again, this time as a classic CDF instance. This will avoid
+        # calling methods of the CDFMF subclass when querying the master file.
+        cdfm = Dataset(master)
+        # copy attributes from master.
+        for name, value in cdfm.__dict__.items():
+            self.__dict__[name] = value
+
+        # Make sure the master defines a dim with name aggdim,
+        # or an unlimited dimension.
+        aggDimId = None
+        for dimname,dim in cdfm.dimensions.items():
+            if aggdim is None:
+                if dim.isunlimited():
+                    aggDimId = dim
+                    aggDimName = dimname
+            else:
+                if dimname == aggdim:
+                    aggDimId = dim
+                    aggDimName = dimname
+        if aggDimId is None:
+            raise IOError("master dataset %s does not have a aggregation dimension" % master)
+
+        # Get info on all aggregation variables defined in the master.
+        # Make sure the master defines at least one aggregation variable.
+        masterRecVar = {}
+        for vName,v in cdfm.variables.items():
+            # skip variables specified in exclude list.
+            if vName in exclude: continue
+            dims = v.dimensions
+            shape = v.shape
+            dtype = v.dtype
+            # Be carefull: we may deal with a scalar (dimensionless) variable.
+            # Unlimited dimension always occupies index 0.
+            if (len(dims) > 0 and aggDimName == dims[0]):
+                masterRecVar[vName] = (dims, shape, dtype)
+        if len(masterRecVar) == 0:
+            raise IOError("master dataset %s does not have any variables to aggregate" % master)
+
+        # Create the following:
+        #   cdf       list of Dataset instances
+        #   cdfVLen   list unlimited dimension lengths in each CDF instance
+        #   cdfRecVar dictionary indexed by the aggregation var names; each key holds
+        #             a list of the corresponding Variable instance, one for each
+        #             cdf file of the file set
+        cdf = [cdfm]
+        self._cdf = cdf        # Store this now, because dim() method needs it
+        cdfVLen = [len(aggDimId)]
+        cdfRecVar = {}
+        for v in masterRecVar.keys():
+            cdfRecVar[v] = [cdfm.variables[v]]
+        
+        # Open each remaining file in read-only mode.
+        # Make sure each file defines the same aggregation variables as the master
+        # and that the variables are defined in the same way (name, shape and type)
+        for f in files[1:]:
+            part = Dataset(f)
+            varInfo = part.variables
+            for v in masterRecVar.keys():
+                if check:
+                    # Make sure master rec var is also defined here.
+                    if v not in varInfo.keys():
+                        raise IOError("aggregation variable %s not defined in %s" % (v, f))
+
+                    #if not vInst.dimensions[0] != aggDimName:
+
+                    masterDims, masterShape, masterType = masterRecVar[v][:3]
+                    extDims, extShape, extType = varInfo[v][:3]
+                    extDims = varInfo[v].dimensions
+                    extShape = varInfo[v].shape
+                    extType = varInfo[v].dtype
+                    # Check that dimension names are identical.
+                    if masterDims != extDims:
+                        raise IOError("variable %s : dimensions mismatch between "
+                                       "master %s (%s) and extension %s (%s)" %
+                                       (v, master, masterDims, f, extDims))
+
+                    # Check that the ranks are identical, and the dimension lengths are
+                    # identical (except for that of the unlimited dimension, which of
+                    # course may vary.
+                    if len(masterShape) != len(extShape):
+                        raise IOError("variable %s : rank mismatch between "
+                                       "master %s (%s) and extension %s (%s)" %
+                                       (v, master, len(masterShape), f, len(extShape)))
+                    if masterShape[1:] != extShape[1:]:
+                        raise IOError("variable %s : shape mismatch between "
+                                       "master %s (%s) and extension %s (%s)" %
+                                       (v, master, masterShape, f, extShape))
+
+                    # Check that the data types are identical.
+                    if masterType != extType:
+                        raise IOError("variable %s : data type mismatch between "
+                                       "master %s (%s) and extension %s (%s)" %
+                                       (v, master, masterType, f, extType))
+
+                    # Everythig ok.
+                    vInst = part.variables[v]
+                    cdfRecVar[v].append(vInst)
+                else:
+                    # No making sure of anything -- assume this is ok..
+                    vInst = part.variables[v]
+                    cdfRecVar[v].append(vInst)
+
+            cdf.append(part)
+            cdfVLen.append(len(part.dimensions[aggDimName]))
+
+        # Attach attributes to the MFDataset instance.
+        # A local __setattr__() method is required for them.
+        self._files = files            # list of cdf file names in the set
+        self._cdfVLen = cdfVLen              # list of unlimited lengths
+        self._cdfTLen = sum(cdfVLen) # total length
+        self._cdfRecVar = cdfRecVar          # dictionary of Variable instances for all
+                                             # the aggregation variables
+        self._dims = cdfm.dimensions
+        self._grps = cdfm.groups
+        for dimname, dim in self._dims.items():
+            if dimname == aggDimName:
+                self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen)
+        self._vars = cdfm.variables
+        for varname,var in self._vars.items():
+            if varname in self._cdfRecVar.keys():
+                self._vars[varname] = _Variable(self, varname, var, aggDimName)
+        self._file_format = []
+        self._data_model = []
+        self._disk_format = []
+        for dset in self._cdf:
+            if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4':
+                raise ValueError('MFNetCDF4 only works with NETCDF3_CLASSIC, NETCDF3_64BIT and NETCDF4_CLASSIC formatted files, not NETCDF4')
+            self._file_format.append(dset.file_format)
+            self._data_model.append(dset.data_model)
+            self._disk_format.append(dset.disk_format)
+        self._path = '/'
+
+    def __setattr__(self, name, value):
+        """override base class attribute creation"""
+        self.__dict__[name] = value
+
+    def __getattribute__(self, name):
+        if name in ['variables','dimensions','file_format','groups',\
+                    'data_model','disk_format','path']: 
+            if name == 'dimensions': return self._dims
+            if name == 'variables': return self._vars
+            if name == 'file_format': return self._file_format
+            if name == 'data_model': return self._data_model
+            if name == 'disk_format': return self._disk_format
+            if name == 'path': return self._path
+            if name == 'groups': return self._grps
+        else:
+            return Dataset.__getattribute__(self, name)
+
+    def ncattrs(self):
+        return self._cdf[0].__dict__.keys()
+
+    def close(self):
+        for dset in self._cdf:
+            dset.close()
+
+    def __repr__(self):
+        ncdump = ['%r\n' % type(self)]
+        dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
+        varnames = tuple([str(varname) for varname in self.variables.keys()])
+        grpnames = ()
+        if self.path == '/':
+            ncdump.append('root group (%s data model, file format %s):\n' %
+                    (self.data_model[0], self.disk_format[0]))
+        else:
+            ncdump.append('group %s:\n' % self.path)
+        attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\
+                self.ncattrs()]
+        ncdump = ncdump + attrs
+        ncdump.append('    dimensions = %s\n' % str(dimnames))
+        ncdump.append('    variables = %s\n' % str(varnames))
+        ncdump.append('    groups = %s\n' % str(grpnames))
+        return ''.join(ncdump)
+
+class _Dimension(object):
+    def __init__(self, dimname, dim, dimlens, dimtotlen):
+        self.dimlens = dimlens
+        self.dimtotlen = dimtotlen
+        self._name = dimname
+    def __len__(self):
+        return self.dimtotlen
+    def isunlimited(self):
+        return True
+    def __repr__(self):
+        if self.isunlimited():
+            return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
+        else:
+            return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
+
+class _Variable(object):
+    def __init__(self, dset, varname, var, recdimname):
+        self.dimensions = var.dimensions 
+        self._dset = dset
+        self._grp = dset
+        self._mastervar = var
+        self._recVar = dset._cdfRecVar[varname]
+        self._recdimname = recdimname
+        self._recLen = dset._cdfVLen
+        self.dtype = var.dtype
+        self._name = var._name
+        # copy attributes from master.
+        for name, value in var.__dict__.items():
+            self.__dict__[name] = value
+    def typecode(self):
+        return self.dtype
+    def ncattrs(self):
+        return self._mastervar.__dict__.keys()
+    def __getattr__(self,name):
+        if name == 'shape': return self._shape()
+        if name == 'ndim': return len(self._shape())
+        try:
+            return self.__dict__[name]
+        except:
+            raise AttributeError(name)
+    def __repr__(self):
+        ncdump_var = ['%r\n' % type(self)]
+        dimnames = tuple([str(dimname) for dimname in self.dimensions])
+        attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\
+                self.ncattrs()]
+        ncdump_var.append('%s %s%s\n' %\
+        (self.dtype,self._name,dimnames))
+        ncdump_var = ncdump_var + attrs
+        unlimdims = []
+        for dimname in self.dimensions:
+            dim = _find_dim(self._grp, dimname)
+            if dim.isunlimited():
+                unlimdims.append(str(dimname))
+        ncdump_var.append('unlimited dimensions = %s\n' % repr(tuple(unlimdims)))
+        ncdump_var.append('current size = %s\n' % repr(self.shape))
+        return ''.join(ncdump_var)
+    def __len__(self):
+        return self._shape()[0]
+    def _shape(self):
+        recdimlen = len(self._dset.dimensions[self._recdimname])
+        return (recdimlen,) + self._mastervar.shape[1:]
+    def set_auto_maskandscale(self,val):
+        for v in self._recVar:
+            v.set_auto_maskandscale(val)
+    def __getitem__(self, elem):
+        """Get records from a concatenated set of variables."""
+
+        # This special method is used to index the netCDF variable
+        # using the "extended slice syntax". The extended slice syntax
+        # is a perfect match for the "start", "count" and "stride"
+        # arguments to the nc_get_var() function, and is much more easy
+        # to use.
+        start, count, stride, put_ind =\
+        _StartCountStride(elem, self.shape)
+        datashape = _out_array_shape(count)
+        data = ma.empty(datashape, dtype=self.dtype)
+        
+        # Determine which dimensions need to be squeezed
+        # (those for which elem is an integer scalar).
+        # The convention used is that for those cases, 
+        # put_ind for this dimension is set to -1 by _StartCountStride.
+        squeeze = data.ndim * [slice(None),]
+        for i,n in enumerate(put_ind.shape[:-1]):
+            if n == 1 and put_ind[...,i].ravel()[0] == -1:
+                squeeze[i] = 0
+
+        # Reshape the arrays so we can iterate over them. 
+        strt = start.reshape((-1, self.ndim or 1))
+        cnt = count.reshape((-1, self.ndim or 1))
+        strd = stride.reshape((-1, self.ndim or 1))
+        put_ind = put_ind.reshape((-1, self.ndim or 1))
+
+        # Fill output array with data chunks. 
+        # Number of variables making up the MFVariable.Variable.
+        nv = len(self._recLen)
+        for (start,count,stride,ind) in zip(strt, cnt, strd, put_ind):
+            # make sure count=-1 becomes count=1
+            count = [abs(cnt) for cnt in count]
+            if (numpy.array(stride) < 0).any():
+                raise IndexError('negative strides not allowed when slicing MFVariable Variable instance')
+            # Start, stop and step along 1st dimension, eg the unlimited
+            # dimension.
+            sta = start[0]
+            step = stride[0]
+            stop = sta + count[0] * step
+            
+            # Build a list representing the concatenated list of all records in
+            # the MFVariable variable set. The list is composed of 2-elem lists
+            # each holding:
+            #  the record index inside the variables, from 0 to n
+            #  the index of the Variable instance to which each record belongs
+            idx = []    # list of record indices
+            vid = []    # list of Variable indices
+            for n in range(nv):
+                k = self._recLen[n]     # number of records in this variable
+                idx.extend(range(k))
+                vid.extend([n] * k)
+
+            # Merge the two lists to get a list of 2-elem lists.
+            # Slice this list along the first dimension.
+            lst = list(zip(idx, vid)).__getitem__(slice(sta, stop, step))
+
+            # Rebuild the slicing expression for dimensions 1 and ssq.
+            newSlice = [slice(None, None, None)]
+            for n in range(1, len(start)):   # skip dimension 0
+                s = slice(start[n],start[n] + count[n] * stride[n], stride[n])
+                newSlice.append(s)
+                
+            # Apply the slicing expression to each var in turn, extracting records
+            # in a list of arrays.
+            lstArr = []
+            ismasked = False
+            for n in range(nv):
+                # Get the list of indices for variable 'n'.
+                idx = [i for i,numv in lst if numv == n]
+                if idx:
+                    # Rebuild slicing expression for dimension 0.
+                    newSlice[0] = slice(idx[0], idx[-1] + 1, step)
+                    # Extract records from the var, and append them to a list
+                    # of arrays.
+                    dat = Variable.__getitem__(self._recVar[n],tuple(newSlice))
+                    if ma.isMA(dat) and not ismasked:
+                        ismasked=True
+                        fill_value = dat.fill_value
+                    lstArr.append(dat)
+            if ismasked:
+                lstArr = ma.concatenate(lstArr)
+            else:
+                lstArr = numpy.concatenate(lstArr)
+            if lstArr.dtype != data.dtype: data = data.astype(lstArr.dtype)
+            # sometimes there are legitimate singleton dimensions, in which
+            # case the array shapes won't conform. If so, a ValueError will
+            # result, and no squeeze will be done.
+            try:
+                data[tuple(ind)] = lstArr.squeeze()
+            except ValueError:
+                data[tuple(ind)] = lstArr
+
+        # Remove extra singleton dimensions. 
+        data = data[tuple(squeeze)]
+
+        # if no masked elements, return numpy array.
+        if ma.isMA(data) and not data.mask.any():
+           data = data.filled()
+        
+        return data
+
+
+class MFTime(_Variable):
+    """
+MFTime(self, time, units=None)
+
+Class providing an interface to a MFDataset time Variable by imposing a unique common
+time unit to all files.
+
+Example usage:
+
+>>> import numpy
+>>> f1 = Dataset('mftest_1.nc','w', format='NETCDF4_CLASSIC')
+>>> f2 = Dataset('mftest_2.nc','w', format='NETCDF4_CLASSIC')
+>>> f1.createDimension('time',None)
+>>> f2.createDimension('time',None)
+>>> t1 = f1.createVariable('time','i',('time',))
+>>> t2 = f2.createVariable('time','i',('time',))
+>>> t1.units = 'days since 2000-01-01'
+>>> t2.units = 'days since 2000-02-01'
+>>> t1.calendar = 'standard'
+>>> t2.calendar = 'standard'
+>>> t1[:] = numpy.arange(31)
+>>> t2[:] = numpy.arange(30)
+>>> f1.close()
+>>> f2.close()
+>>> # Read the two files in at once, in one Dataset.
+>>> f = MFDataset('mftest*nc')
+>>> t = f.variables['time']
+>>> print t.units
+days since 2000-01-01
+>>> print t[32] # The value written in the file, inconsistent with the MF time units.
+1
+>>> T = MFTime(t)
+>>> print T[32]                        
+32                           
+    """
+    
+    def __init__(self, time, units=None):
+        """
+Create a time Variable with units consistent across a multifile 
+dataset.
+
+ at param time: Time variable from a MFDataset. 
+
+ at keyword units: Time units, for example, 'days since 1979-01-01'. If None, use
+the units from the master variable. 
+        """
+        import datetime
+        self.__time = time
+        
+        # copy attributes from master time variable.
+        for name, value in time.__dict__.items():
+            self.__dict__[name] = value
+           
+        # make sure calendar attribute present in all files.
+        for t in self._recVar:
+            if not hasattr(t,'calendar'):
+                raise ValueError('MFTime requires that the time variable in all files have a calendar attribute')
+        
+        # Check that calendar is the same in all files.
+        if len(set([t.calendar for t in self._recVar])) > 1:
+            raise ValueError('MFTime requires that the same time calendar is used by all files.')
+ 
+        # Override units if units is specified.
+        self.units = units or time.units
+        
+        # Reference date to compute the difference between different time units. 
+        ref_date = datetime.datetime(1900,1,1)
+        ref_num = date2num(ref_date, self.units, self.calendar)
+        
+        # Create delta vector: delta = ref_num(ref_date) - num(ref_date)
+        # So that ref_num(date) = num(date) + delta 
+        self.__delta = numpy.empty(len(self), time.dtype)
+        
+        i0 = 0; i1 = 0
+        for i,v in enumerate(self._recVar):
+            n = self._recLen[i] # Length of time vector.
+            num = date2num(ref_date, v.units, self.calendar)
+            i1 += n            
+            self.__delta[i0:i1] = ref_num - num
+            i0 += n
+        
+                
+    def __getitem__(self, elem):
+        return self.__time[elem] + self.__delta[elem]
diff --git a/utils/nc3tonc4 b/utils/nc3tonc4
new file mode 100755
index 0000000..23e1fbb
--- /dev/null
+++ b/utils/nc3tonc4
@@ -0,0 +1,280 @@
+#!/usr/bin/env python
+from netCDF4 import Dataset
+import numpy as NP
+import sys
+
+
+def nc3tonc4(filename3,filename4,unpackshort=True,
+    zlib=True,complevel=6,shuffle=True,fletcher32=False,
+    clobber=False,lsd_dict=None,nchunk=10,quiet=False,classic=0,
+    vars=None,istart=0,istop=-1):
+    """convert a netcdf 3 file (filename3) to a netcdf 4 file
+    The default format is 'NETCDF4', but can be set
+    to NETCDF4_CLASSIC if classic=1.
+    If unpackshort=True, variables stored as short
+    integers with a scale and offset are unpacked to floats.
+    in the netcdf 4 file.  If the lsd_dict is not None, variable names
+    corresponding to the keys of the dict will be truncated to the decimal place
+    specified by the values of the dict.  This improves compression by
+    making it 'lossy'..
+    If vars is not None, only variable names in the list 
+    will be copied (plus all the dimension variables).
+    The zlib, complevel and shuffle keywords control
+    how the compression is done."""
+
+    ncfile3 = Dataset(filename3,'r')
+    if classic:
+        ncfile4 = Dataset(filename4,'w',clobber=clobber,format='NETCDF4_CLASSIC')
+    else:
+        ncfile4 = Dataset(filename4,'w',clobber=clobber,format='NETCDF4')
+    mval = 1.e30 # missing value if unpackshort=True
+    # create dimensions. Check for unlimited dim.
+    unlimdimname = False
+    unlimdim = None
+    # create global attributes.
+    if not quiet: sys.stdout.write('copying global attributes ..\n')
+    #for attname in ncfile3.ncattrs():
+    #    setattr(ncfile4,attname,getattr(ncfile3,attname))
+    ncfile4.setncatts(ncfile3.__dict__) 
+    if not quiet: sys.stdout.write('copying dimensions ..\n')
+    for dimname,dim in ncfile3.dimensions.items():
+        if dim.isunlimited():
+            unlimdimname = dimname
+            unlimdim = dim
+            ncfile4.createDimension(dimname,None)
+            if istop == -1: istop=len(unlimdim)
+        else:
+            ncfile4.createDimension(dimname,len(dim))
+    # create variables.
+    if vars is None:
+       varnames = ncfile3.variables.keys()
+    else:
+       # variables to copy specified
+       varnames = vars
+       # add dimension variables
+       for dimname in ncfile3.dimensions.keys():
+           if dimname in ncfile3.variables.keys() and\
+              dimname not in varnames:
+               varnames.append(dimname)
+    for varname in varnames:
+        ncvar = ncfile3.variables[varname]
+        if not quiet: sys.stdout.write('copying variable %s\n' % varname)
+        # quantize data?
+        if lsd_dict is not None and lsd_dict.has_key(varname):
+            lsd = lsd_dict[varname]
+            if not quiet: sys.stdout.write('truncating to least_significant_digit = %d\n'%lsd)
+        else:
+            lsd = None # no quantization.
+        # unpack short integers to floats?
+        if unpackshort and hasattr(ncvar,'scale_factor') and hasattr(ncvar,'add_offset'):
+            dounpackshort = True
+            datatype = 'f4'
+        else:
+            dounpackshort = False
+            datatype = ncvar.dtype
+        # is there an unlimited dimension?
+        if unlimdimname and unlimdimname in ncvar.dimensions:
+            hasunlimdim = True
+        else:
+            hasunlimdim = False
+        if dounpackshort:
+            if not quiet: sys.stdout.write('unpacking short integers to floats ...\n')
+            sys.stdout.write('')
+        if hasattr(ncvar, '_FillValue'):
+            FillValue = ncvar._FillValue
+        else:
+            FillValue = None 
+        var = ncfile4.createVariable(varname,datatype,ncvar.dimensions, fill_value=FillValue, least_significant_digit=lsd,zlib=zlib,complevel=complevel,shuffle=shuffle,fletcher32=fletcher32)
+        # fill variable attributes.
+        attdict = ncvar.__dict__
+        if '_FillValue' in attdict: del attdict['_FillValue']
+        if dounpackshort and 'add_offset' in attdict: del attdict['add_offset']
+        if dounpackshort and 'scale_factor' in attdict: del attdict['scale_factor']
+        if dounpackshort and 'missing_value' in attdict: attdict['missing_value']=mval
+        var.setncatts(attdict)
+        #for attname in ncvar.ncattrs():
+        #    if attname == '_FillValue': continue
+        #    if dounpackshort and attname in ['add_offset','scale_factor']: continue
+        #    if dounpackshort and attname == 'missing_value':
+        #        setattr(var,attname,mval)
+        #    else:
+        #        setattr(var,attname,getattr(ncvar,attname))
+        # fill variables with data.
+        if hasunlimdim: # has an unlim dim, loop over unlim dim index.
+            # range to copy
+            if nchunk:
+                start = istart; stop = istop; step = nchunk
+                if step < 1: step = 1
+                for n in range(start, stop, step):
+                    nmax = n+nchunk
+                    if nmax > istop: nmax=istop
+                    idata = ncvar[n:nmax]
+                    if dounpackshort:
+                        tmpdata = (ncvar.scale_factor*idata.astype('f')+ncvar.add_offset).astype('f')
+                        if hasattr(ncvar,'missing_value'):
+                            tmpdata = NP.where(idata == ncvar.missing_value, mval, tmpdata)
+                    else:
+                        tmpdata = idata
+                    var[n-istart:nmax-istart] = tmpdata
+            else:
+                idata = ncvar[:]
+                if dounpackshort:
+                    tmpdata = (ncvar.scale_factor*idata.astype('f')+ncvar.add_offset).astype('f')
+                    if hasattr(ncvar,'missing_value'):
+                        tmpdata = NP.where(idata == ncvar.missing_value, mval, tmpdata)
+                else:
+                    tmpdata = idata
+                var[0:len(unlimdim)] = tmpdata
+        else: # no unlim dim or 1-d variable, just copy all data at once.
+            idata = ncvar[:]
+            if dounpackshort:
+                tmpdata = (ncvar.scale_factor*idata.astype('f')+ncvar.add_offset).astype('f')
+                if hasattr(ncvar,'missing_value'):
+                    tmpdata = NP.where(idata == ncvar.missing_value, mval, tmpdata)
+            else:
+                tmpdata = idata
+            var[:] = tmpdata
+        ncfile4.sync() # flush data to disk
+    # close files.
+    ncfile3.close()
+    ncfile4.close()
+
+if __name__ == '__main__':
+
+    import getopt, os
+
+    usage = """
+ Convert a netCDF 3 file to netCDF 4 format, optionally
+ unpacking variables packed as short integers (with scale_factor and add_offset)
+ to floats, and adding zlib compression (with the HDF5 shuffle filter and fletcher32 checksum).
+ Data may also be quantized (truncated) to a specified precision to improve compression.
+
+ usage: %s [-h] [-o] [--vars=var1,var2,..] [--zlib=(0|1)] [--complevel=(1-9)] [--shuffle=(0|1)] [--fletcher32=(0|1)] [--unpackshort=(0|1)] [--quantize=var1=n1,var2=n2,..] netcdf3filename netcdf4filename
+ -h -- Print usage message.
+ -o -- Overwite destination file (default is to raise an error if output file already exists).
+ --vars -- comma separated list of variable names to copy (default is to copy
+    all variables)
+ --classic=(0|1) -- use NETCDF4_CLASSIC format instead of NETCDF4 (default 1)
+ --zlib=(0|1) -- Activate (or disable) zlib compression (default is activate).
+ --complevel=(1-9) -- Set zlib compression level (6 is default).
+ --shuffle=(0|1) -- Activate (or disable) the shuffle filter (active by default).
+ --fletcher32=(0|1) -- Activate (or disable) the fletcher32 checksum (not
+     active by default).
+ --unpackshort=(0|1) -- Unpack short integer variables to float variables
+     using scale_factor and add_offset netCDF variable attributes (active by default).
+ --quantize=(comma separated list of "variable name=integer" pairs) --
+     Truncate the data in the specified variables to a given decimal precision.
+     For example, 'speed=2, height=-2, temp=0' will cause the variable
+     'speed' to be truncated to a precision of 0.01, 'height' to a precision of 100
+     and 'temp' to 1. This can significantly improve compression. The default
+     is not to quantize any of the variables.
+ --quiet=(0|1)  -- if 1, don't print diagnostic information.
+ --chunk=(integer) -- number of records along unlimited dimension to 
+     write at once.  Default 10.  Ignored if there is no unlimited 
+     dimension.  chunk=0 means write all the data at once.
+ --istart=(integer) -- number of record to start at along unlimited dimension. 
+     Default 0.  Ignored if there is no unlimited dimension.
+ --istop=(integer) -- number of record to stop at along unlimited dimension. 
+     Default -1.  Ignored if there is no unlimited dimension.
+\n""" % os.path.basename(sys.argv[0])
+
+    try:
+        opts, pargs = getopt.getopt(sys.argv[1:], 'ho',
+                                    ['classic=',
+                                     'vars=',
+                                     'zlib=',
+                                     'quiet=',
+                                     'complevel=',
+                                     'shuffle=',
+                                     'fletcher32=',
+                                     'unpackshort=',
+                                     'quantize=',
+                                     'chunk=',
+                                     'istart=',
+                                     'istop='])
+    except:
+        (type, value, traceback) = sys.exc_info()
+        sys.stdout.write("Error parsing the options. The error was: %s\n" % value)
+        sys.stderr.write(usage)
+        sys.exit(0)
+
+    # default options
+    overwritefile = 0
+    complevel = 6
+    classic = 1
+    zlib = 1
+    shuffle = 1
+    fletcher32 = 0
+    unpackshort = 1
+    vars = None
+    quantize = None
+    quiet = 0
+    chunk = 1000
+    istart = 0
+    istop = -1
+
+    # Get the options
+    for option in opts:
+        if option[0] == '-h':
+            sys.stderr.write(usage)
+            sys.exit(0)
+        elif option[0] == '-o':
+            overwritefile = 1
+        elif option[0] == '--classic':
+            classic = int(option[1])
+        elif option[0] == '--zlib':
+            zlib = int(option[1])
+        elif option[0] == '--quiet':
+            quiet = int(option[1])
+        elif option[0] == '--complevel':
+            complevel = int(option[1])
+        elif option[0] == '--shuffle':
+            shuffle = int(option[1])
+        elif option[0] == '--fletcher32':
+            fletcher32 = int(option[1])
+        elif option[0] == '--unpackshort':
+            unpackshort = int(option[1])
+        elif option[0] == '--chunk':
+            chunk = int(option[1])
+        elif option[0] == '--vars':
+            vars = option[1]
+        elif option[0] == '--quantize':
+            quantize = option[1]
+        elif option[0] == '--istart':
+            istart = int(option[1])
+        elif option[0] == '--istop':
+            istop = int(option[1])
+        else:
+            sys.stdout.write("%s: Unrecognized option\n" % option[0])
+            sys.stderr.write(usage)
+            sys.exit(0)
+
+    # if we pass a number of files different from 2, abort
+    if len(pargs) < 2 or len(pargs) > 2:
+        sys.stdout.write("You need to pass both source and destination!.\n")
+        sys.stderr.write(usage)
+        sys.exit(0)
+
+    # Catch the files passed as the last arguments
+    filename3 = pargs[0]
+    filename4 = pargs[1]
+
+    # Parse the quantize option, create a dictionary from key/value pairs.
+    if quantize is not None:
+        lsd_dict = {}
+        for p in quantize.split(','):
+            kv = p.split('=')
+            lsd_dict[kv[0]] = int(kv[1])
+    else:
+        lsd_dict=None
+
+    # Parse the vars option, create a list of variable names.
+    if vars is not None:
+       vars = vars.split(',')
+
+    # copy the data from filename3 to filename4.
+    nc3tonc4(filename3,filename4,unpackshort=unpackshort,
+        zlib=zlib,complevel=complevel,shuffle=shuffle,
+        fletcher32=fletcher32,clobber=overwritefile,lsd_dict=lsd_dict,
+        nchunk=chunk,quiet=quiet,vars=vars,classic=classic,
+        istart=istart,istop=istop)
diff --git a/utils/nc4tonc3 b/utils/nc4tonc3
new file mode 100755
index 0000000..41eaf7b
--- /dev/null
+++ b/utils/nc4tonc3
@@ -0,0 +1,127 @@
+#!/usr/bin/env python
+from netCDF4 import Dataset
+
+def nc4tonc3(filename4,filename3,clobber=False,nchunk=10,quiet=False,format='NETCDF3_64BIT'):
+    """convert a netcdf 4 file (filename4) in NETCDF4_CLASSIC format
+    to a netcdf 3 file (filename3) in NETCDF3_64BIT format."""
+    ncfile4 = Dataset(filename4,'r')
+    if ncfile4.file_format != 'NETCDF4_CLASSIC':
+        raise IOError('input file must be in NETCDF4_CLASSIC format')
+    ncfile3 = Dataset(filename3,'w',clobber=clobber,format=format)
+    # create dimensions. Check for unlimited dim.
+    unlimdimname = False
+    unlimdim = None
+    # create global attributes.
+    if not quiet: sys.stdout.write('copying global attributes ..\n')
+    #for attname in ncfile4.ncattrs():
+    #    setattr(ncfile3,attname,getattr(ncfile4,attname))
+    ncfile3.setncatts(ncfile4.__dict__) 
+    if not quiet: sys.stdout.write('copying dimensions ..\n')
+    for dimname,dim in ncfile4.dimensions.items():
+        if dim.isunlimited():
+            unlimdimname = dimname
+            unlimdim = dim
+            ncfile3.createDimension(dimname,None)
+        else:
+            ncfile3.createDimension(dimname,len(dim))
+    # create variables.
+    for varname,ncvar in ncfile4.variables.items():
+        if not quiet: sys.stdout.write('copying variable %s\n' % varname)
+        # is there an unlimited dimension?
+        if unlimdimname and unlimdimname in ncvar.dimensions:
+            hasunlimdim = True
+        else:
+            hasunlimdim = False
+        if hasattr(ncvar, '_FillValue'):
+            FillValue = ncvar._FillValue
+        else:
+            FillValue = None 
+        var = ncfile3.createVariable(varname,ncvar.dtype,ncvar.dimensions,fill_value=FillValue)
+        # fill variable attributes.
+	attdict = ncvar.__dict__
+	if '_FillValue' in attdict: del attdict['_FillValue']
+	var.setncatts(attdict)
+        #for attname in ncvar.ncattrs():
+        #    if attname == '_FillValue': continue
+        #    setattr(var,attname,getattr(ncvar,attname))
+        # fill variables with data.
+        if hasunlimdim: # has an unlim dim, loop over unlim dim index.
+            # range to copy
+            if nchunk:
+                start = 0; stop = len(unlimdim); step = nchunk
+                if step < 1: step = 1
+                for n in range(start, stop, step):
+                    nmax = n+nchunk
+                    if nmax > len(unlimdim): nmax=len(unlimdim)
+                    var[n:nmax] = ncvar[n:nmax]
+            else:
+                var[0:len(unlimdim)] = ncvar[:]
+        else: # no unlim dim or 1-d variable, just copy all data at once.
+            var[:] = ncvar[:]
+        ncfile3.sync() # flush data to disk
+    # close files.
+    ncfile3.close()
+    ncfile4.close()
+
+if __name__ == '__main__':
+
+    import sys, getopt, os
+
+    usage = """
+ Convert a netCDF 4 file (in NETCDF4_CLASSIC format) to netCDF 3 format.
+
+ usage: %s [-h] [-o] [--chunk] netcdf4filename netcdf3filename
+ -h -- Print usage message.
+ -o -- Overwite destination file (default is to raise an error if output file already exists).
+ --quiet=(0|1)  -- if 1, don't print diagnostic information.
+ --format -- netcdf3 format to use (NETCDF3_64BIT by default, can be set to NETCDF3_CLASSIC)
+ --chunk=(integer) -- number of records along unlimited dimension to 
+     write at once.  Default 10.  Ignored if there is no unlimited 
+     dimension.  chunk=0 means write all the data at once.
+\n""" % os.path.basename(sys.argv[0])
+
+    try:
+        opts, pargs = getopt.getopt(sys.argv[1:], 'ho',
+                                    ['format=','chunk=','quiet='])
+    except:
+        (type, value, traceback) = sys.exc_info()
+        sys.stdout.write("Error parsing the options. The error was: %s\n" % value)
+        sys.stderr.write(usage)
+        sys.exit(0)
+
+    # default options
+    quiet = 0
+    chunk = 1000
+    format = 'NETCDF3_64BIT'
+    overwritefile = 0
+
+    # Get the options
+    for option in opts:
+        if option[0] == '-h':
+            sys.stderr.write(usage)
+            sys.exit(0)
+        elif option[0] == '-o':
+            overwritefile = 1
+        elif option[0] == '--quiet':
+            quiet = int(option[1])
+        elif option[0] == '--format':
+            format = option[1]
+        elif option[0] == '--chunk':
+            chunk = int(option[1])
+        else:
+            sys.stdout.write("%s : Unrecognized option\n" % options[0])
+            sys.stderr.write(usage)
+            sys.exit(0)
+
+    # if we pass a number of files different from 2, abort
+    if len(pargs) < 2 or len(pargs) > 2:
+        sys.stdout.write("You need to pass both source and destination!\n.")
+        sys.stderr.write(usage)
+        sys.exit(0)
+
+    # Catch the files passed as the last arguments
+    filename4 = pargs[0]
+    filename3 = pargs[1]
+
+    # copy the data from filename4 to filename3.
+    nc4tonc3(filename4,filename3,clobber=overwritefile,quiet=quiet,format=format)
diff --git a/utils/ncinfo b/utils/ncinfo
new file mode 100755
index 0000000..101082c
--- /dev/null
+++ b/utils/ncinfo
@@ -0,0 +1,82 @@
+#!/usr/bin/env python
+from __future__ import print_function
+from netCDF4 import Dataset
+import sys
+
+def getgrp(g,p):
+    import posixpath
+    grps = p.split("/")
+    for gname in grps:
+        if gname == "": continue
+        g = g.groups[gname]
+    return g
+
+if __name__ == '__main__':
+
+    import getopt, os
+
+    usage = """
+ Print summary information about a netCDF file.
+
+ usage: %s [-h] [-g grp or --group=grp] [-v var or --variable=var] [-d dim or --dimension=dim] filename 
+
+ -h -- Print usage message.
+ -g <group name> or --group=<group name> -- Print info for this group
+      (default is root group). Nested groups specified
+      using posix paths ("group1/group2/group3").
+ -v <variable name> or --variable=<variable name> -- Print info for this variable.
+ -d <dimension name> or --dimension=<dimension name> -- Print info for this dimension.
+
+ netcdf filename must be last argument.
+\n""" % os.path.basename(sys.argv[0])
+
+    try:
+        opts, pargs = getopt.getopt(sys.argv[1:],'hv:g:d:',
+                                    ['group=',
+                                     'variable=',
+                                     'dimension='])
+    except:
+        (type, value, traceback) = sys.exc_info()
+        sys.stdout.write("Error parsing the options. The error was: %s\n" % value)
+        sys.stderr.write(usage)
+        sys.exit(0)
+
+    # Get the options
+    group = None; var = None; dim=None
+    for option in opts:
+        if option[0] == '-h':
+            sys.stderr.write(usage)
+            sys.exit(0)
+        elif option[0] == '--group' or option[0] == '-g':
+            group = option[1]
+        elif option[0] == '--variable' or option[0] == '-v':
+            var = option[1]
+        elif option[0] == '--dimension' or option[0] == '-d':
+            dim = option[1]
+        else:
+            sys.stdout.write("%s: Unrecognized option\n" % option[0])
+            sys.stderr.write(usage)
+            sys.exit(0)
+
+    # filename passed as last argumenbt
+    filename = pargs[-1]
+
+    f = Dataset(filename)
+    if group is None:
+        if var is None and dim is None:
+            print(f)
+        else:
+            if var is not None:
+                print(f.variables[var])
+            if dim is not None:
+                print(f.dimensions[dim])
+    else:
+        if var is None and dim is None:
+            print(getgrp(f,group))
+        else:
+            g = getgrp(f,group)
+            if var is not None:
+                print(g.variables[var])
+            if dim is not None:
+                print(g.dimensions[var])
+    f.close()

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



More information about the Pkg-grass-devel mailing list